From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krita/HACKING | 6 +- krita/IMAGE_LIBRARIES | 2 +- krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc | 8 +- krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h | 3 +- .../cmyk_u16/kis_cmyk_u16_colorspace.cc | 322 +- .../colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h | 86 +- krita/colorspaces/cmyk_u8/cmyk_plugin.cc | 8 +- krita/colorspaces/cmyk_u8/cmyk_plugin.h | 3 +- krita/colorspaces/cmyk_u8/composite.h | 64 +- krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc | 320 +- krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h | 90 +- krita/colorspaces/gray_u16/gray_u16_plugin.cc | 8 +- krita/colorspaces/gray_u16/gray_u16_plugin.h | 3 +- .../gray_u16/kis_gray_u16_colorspace.cc | 286 +- .../colorspaces/gray_u16/kis_gray_u16_colorspace.h | 72 +- krita/colorspaces/gray_u8/gray_plugin.cc | 8 +- krita/colorspaces/gray_u8/gray_plugin.h | 3 +- krita/colorspaces/gray_u8/kis_gray_colorspace.cc | 550 +- krita/colorspaces/gray_u8/kis_gray_colorspace.h | 88 +- .../kis_strategy_colorspace_grayscale_tester.cpp | 26 +- .../colorspaces/lms_f32/kis_lms_f32_colorspace.cc | 132 +- krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h | 82 +- krita/colorspaces/lms_f32/lms_f32_plugin.cc | 8 +- krita/colorspaces/lms_f32/lms_f32_plugin.h | 3 +- .../rgb_f16half/kis_rgb_f16half_colorspace.cc | 218 +- .../rgb_f16half/kis_rgb_f16half_colorspace.h | 98 +- .../colorspaces/rgb_f16half/rgb_f16half_plugin.cc | 8 +- krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h | 3 +- .../tests/kis_rgb_f16half_colorspace_tester.cc | 148 +- .../tests/kis_rgb_f16half_colorspace_tester.h | 6 +- .../colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc | 218 +- krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h | 100 +- krita/colorspaces/rgb_f32/rgb_f32_plugin.cc | 8 +- krita/colorspaces/rgb_f32/rgb_f32_plugin.h | 3 +- .../kis_strategy_colorspace_rgb_f32_tester.cc | 148 +- .../tests/kis_strategy_colorspace_rgb_f32_tester.h | 6 +- .../colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc | 366 +- krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h | 90 +- krita/colorspaces/rgb_u16/rgb_u16_plugin.cc | 8 +- krita/colorspaces/rgb_u16/rgb_u16_plugin.h | 3 +- .../kis_strategy_colorspace_rgb_u16_tester.cc | 164 +- .../tests/kis_strategy_colorspace_rgb_u16_tester.h | 6 +- krita/colorspaces/rgb_u8/composite.h | 548 +- krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc | 752 +- krita/colorspaces/rgb_u8/kis_rgb_colorspace.h | 90 +- krita/colorspaces/rgb_u8/rgb_plugin.cc | 10 +- krita/colorspaces/rgb_u8/rgb_plugin.h | 3 +- .../tests/kis_strategy_colorspace_rgb_tester.cpp | 38 +- krita/colorspaces/wet/kis_texture_filter.cc | 2 +- krita/colorspaces/wet/kis_texture_filter.h | 8 +- krita/colorspaces/wet/kis_texture_painter.cc | 6 +- krita/colorspaces/wet/kis_texture_painter.h | 2 +- krita/colorspaces/wet/kis_wet_colorspace.cc | 120 +- krita/colorspaces/wet/kis_wet_colorspace.h | 106 +- krita/colorspaces/wet/kis_wet_palette_widget.cc | 146 +- krita/colorspaces/wet/kis_wet_palette_widget.h | 23 +- .../wet/kis_wetness_visualisation_filter.cc | 2 +- .../wet/kis_wetness_visualisation_filter.h | 9 +- krita/colorspaces/wet/kis_wetop.cc | 32 +- krita/colorspaces/wet/kis_wetop.h | 6 +- krita/colorspaces/wet/wdgpressure.ui | 12 +- krita/colorspaces/wet/wet_plugin.cc | 28 +- krita/colorspaces/wet/wet_plugin.h | 3 +- krita/colorspaces/wet/wetphysicsfilter.cc | 44 +- krita/colorspaces/wet/wetphysicsfilter.h | 12 +- .../colorspaces/wetsticky/brushop/kis_wsbrushop.cc | 32 +- .../colorspaces/wetsticky/brushop/kis_wsbrushop.h | 2 +- .../wetsticky/brushop/wsbrushpaintop_plugin.cc | 6 +- .../wetsticky/brushop/wsbrushpaintop_plugin.h | 3 +- .../wetsticky/kis_wet_sticky_colorspace.cc | 230 +- .../wetsticky/kis_wet_sticky_colorspace.h | 100 +- .../colorspaces/wetsticky/kis_ws_engine_filter.cc | 46 +- krita/colorspaces/wetsticky/kis_ws_engine_filter.h | 14 +- krita/colorspaces/wetsticky/wet_sticky_plugin.cc | 6 +- krita/colorspaces/wetsticky/wet_sticky_plugin.h | 3 +- .../wetsticky/ws/GNU Public Licence.txt | 4 +- krita/colorspaces/wetsticky/ws/anim.c | 6 +- krita/colorspaces/wetsticky/ws/canvas.c | 46 +- krita/colorspaces/wetsticky/ws/canvas.h | 10 +- krita/colorspaces/wetsticky/ws/cmap.c | 12 +- krita/colorspaces/wetsticky/ws/engine.c | 4 +- krita/colorspaces/wetsticky/ws/engine3.c | 4 +- krita/colorspaces/wetsticky/ws/ogl_interface.c | 2 +- krita/colorspaces/wetsticky/ws/x_interface.c | 14 +- krita/colorspaces/wetsticky/wstool.ui | 32 +- .../ycbcr_u16/kis_ycbcr_u16_colorspace.cc | 150 +- .../ycbcr_u16/kis_ycbcr_u16_colorspace.h | 100 +- krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc | 8 +- krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h | 3 +- .../ycbcr_u8/kis_ycbcr_u8_colorspace.cc | 148 +- .../colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h | 102 +- krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc | 8 +- krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h | 3 +- krita/core/createdcop.py | 28 +- krita/core/kis_adjustment_layer.cc | 68 +- krita/core/kis_adjustment_layer.h | 25 +- krita/core/kis_alpha_mask.cc | 38 +- krita/core/kis_alpha_mask.h | 56 +- krita/core/kis_autobrush_resource.cc | 18 +- krita/core/kis_autobrush_resource.h | 18 +- krita/core/kis_autogradient_resource.cc | 20 +- krita/core/kis_autogradient_resource.h | 6 +- krita/core/kis_background.cc | 68 +- krita/core/kis_background.h | 10 +- krita/core/kis_basic_math_toolbox.cpp | 4 +- krita/core/kis_basic_math_toolbox.h | 4 +- krita/core/kis_boundary.cc | 18 +- krita/core/kis_boundary.h | 12 +- krita/core/kis_brush.cc | 430 +- krita/core/kis_brush.h | 95 +- krita/core/kis_colorspace_convert_visitor.h | 6 +- krita/core/kis_command.cc | 6 +- krita/core/kis_command.h | 8 +- krita/core/kis_convolution_painter.cc | 104 +- krita/core/kis_convolution_painter.h | 18 +- krita/core/kis_crop_visitor.h | 6 +- krita/core/kis_datamanager.h | 68 +- krita/core/kis_exif_info.cc | 14 +- krita/core/kis_exif_info.h | 16 +- krita/core/kis_exif_value.cc | 188 +- krita/core/kis_exif_value.h | 78 +- krita/core/kis_fill_painter.cc | 70 +- krita/core/kis_fill_painter.h | 38 +- krita/core/kis_filter.cc | 20 +- krita/core/kis_filter.h | 39 +- krita/core/kis_filter_config_widget.cc | 4 +- krita/core/kis_filter_config_widget.h | 7 +- krita/core/kis_filter_configuration.cc | 74 +- krita/core/kis_filter_configuration.h | 38 +- krita/core/kis_filter_registry.cc | 10 +- krita/core/kis_filter_registry.h | 9 +- krita/core/kis_filter_strategy.cc | 8 +- krita/core/kis_filter_strategy.h | 14 +- krita/core/kis_gradient.cc | 30 +- krita/core/kis_gradient.h | 31 +- krita/core/kis_gradient_painter.cc | 104 +- krita/core/kis_gradient_painter.h | 10 +- krita/core/kis_group_layer.cc | 62 +- krita/core/kis_group_layer.h | 35 +- krita/core/kis_histogram.cc | 42 +- krita/core/kis_histogram.h | 22 +- krita/core/kis_image.cc | 312 +- krita/core/kis_image.h | 121 +- krita/core/kis_image_iface.cc | 2 +- krita/core/kis_image_iface.h | 4 +- krita/core/kis_imagepipe_brush.cc | 84 +- krita/core/kis_imagepipe_brush.h | 69 +- krita/core/kis_iterator.cc | 36 +- krita/core/kis_iterator.h | 36 +- krita/core/kis_iteratorpixeltrait.h | 8 +- krita/core/kis_iterators_pixel.cc | 6 +- krita/core/kis_iterators_pixel.h | 44 +- krita/core/kis_layer.cc | 98 +- krita/core/kis_layer.h | 93 +- krita/core/kis_math_toolbox.cpp | 48 +- krita/core/kis_math_toolbox.h | 25 +- krita/core/kis_merge_visitor.h | 56 +- krita/core/kis_meta_registry.cc | 10 +- krita/core/kis_nameserver.cc | 10 +- krita/core/kis_nameserver.h | 14 +- krita/core/kis_paint_device.cc | 330 +- krita/core/kis_paint_device.h | 167 +- krita/core/kis_paint_device_action.h | 8 +- krita/core/kis_paint_device_iface.cc | 18 +- krita/core/kis_paint_device_iface.h | 12 +- krita/core/kis_paint_layer.cc | 186 +- krita/core/kis_paint_layer.h | 71 +- krita/core/kis_painter.cc | 176 +- krita/core/kis_painter.h | 68 +- krita/core/kis_paintop.cc | 30 +- krita/core/kis_paintop.h | 18 +- krita/core/kis_paintop_registry.cc | 18 +- krita/core/kis_paintop_registry.h | 17 +- krita/core/kis_palette.cc | 70 +- krita/core/kis_palette.h | 43 +- krita/core/kis_part_layer_iface.h | 8 +- krita/core/kis_pattern.cc | 118 +- krita/core/kis_pattern.h | 29 +- krita/core/kis_perspective_grid.cpp | 8 +- krita/core/kis_perspective_grid.h | 10 +- krita/core/kis_perspective_math.cpp | 6 +- krita/core/kis_perspective_math.h | 6 +- krita/core/kis_perspectivetransform_worker.cpp | 2 +- krita/core/kis_perspectivetransform_worker.h | 8 +- krita/core/kis_point.h | 14 +- krita/core/kis_random_accessor.cpp | 10 +- krita/core/kis_random_accessor.h | 24 +- krita/core/kis_random_sub_accessor.cpp | 28 +- krita/core/kis_random_sub_accessor.h | 4 +- krita/core/kis_rect.cc | 4 +- krita/core/kis_rect.h | 14 +- krita/core/kis_resource.cc | 10 +- krita/core/kis_resource.h | 29 +- krita/core/kis_rotate_visitor.cc | 72 +- krita/core/kis_rotate_visitor.h | 10 +- krita/core/kis_scale_visitor.cc | 52 +- krita/core/kis_scale_visitor.h | 10 +- krita/core/kis_selected_transaction.cc | 2 +- krita/core/kis_selected_transaction.h | 6 +- krita/core/kis_selection.cc | 282 +- krita/core/kis_selection.h | 50 +- krita/core/kis_strategy_move.cc | 24 +- krita/core/kis_strategy_move.h | 22 +- krita/core/kis_substrate.h | 14 +- krita/core/kis_thread.h | 8 +- krita/core/kis_thread_pool.cc | 6 +- krita/core/kis_thread_pool.h | 14 +- krita/core/kis_transaction.cc | 18 +- krita/core/kis_transaction.h | 8 +- krita/core/kis_transform_visitor.h | 6 +- krita/core/kis_transform_worker.cc | 108 +- krita/core/kis_transform_worker.h | 14 +- krita/core/kis_types.h | 8 +- krita/core/kis_vec.h | 6 +- .../core/tests/kis_filter_configuration_tester.cc | 10 +- krita/core/tests/kis_image_tester.cpp | 16 +- krita/core/tiles/kis_memento.cc | 30 +- krita/core/tiles/kis_memento.h | 34 +- krita/core/tiles/kis_tile.cc | 18 +- krita/core/tiles/kis_tile.h | 40 +- krita/core/tiles/kis_tiled_random_accessor.cc | 20 +- krita/core/tiles/kis_tiled_random_accessor.h | 34 +- krita/core/tiles/kis_tileddatamanager.cc | 282 +- krita/core/tiles/kis_tileddatamanager.h | 100 +- krita/core/tiles/kis_tiledhlineiterator.cc | 4 +- krita/core/tiles/kis_tilediterator.cc | 6 +- krita/core/tiles/kis_tilediterator.h | 102 +- krita/core/tiles/kis_tiledrectiterator.cc | 6 +- krita/core/tiles/kis_tiledvlineiterator.cc | 2 +- krita/core/tiles/kis_tilemanager.cc | 52 +- krita/core/tiles/kis_tilemanager.h | 54 +- krita/core/tiles/tests/kis_tiled_data_tester.cpp | 14 +- krita/data/palettes/Named_Colors.gpl | 2 +- krita/data/patterns/nops.pat | Bin 49178 -> 49177 bytes krita/data/profiles/cmyk.icm | Bin 725408 -> 725407 bytes krita/data/profiles/fogra27l.icm | Bin 225824 -> 225823 bytes krita/doc/DESIGN.obsolete | 10 +- krita/doc/background_paper.txt | 4 +- krita/doc/brush.txt | 14 +- krita/doc/channels_masks_selections | 4 +- krita/doc/colorspaces.xmi | 7528 +++++----- krita/doc/colorstrategyAPI | 14 +- krita/doc/controller.xmi | 5668 +++---- krita/doc/doc-outline | 6 +- krita/doc/histograms.xmi | 74 +- krita/doc/hooks | 2 +- krita/doc/howtofilters.txt | 2 +- krita/doc/krita-features | 8 +- krita/doc/krita.pdf | Bin 2701148 -> 2701147 bytes krita/doc/krita.xmi | 14800 +++++++++---------- krita/doc/manual/krita.kwd | Bin 2505240 -> 2505238 bytes krita/doc/paint_device.txt | 2 +- krita/doc/palettedesign.txt | 2 +- krita/doc/sdk | 2 +- krita/doc/selections | 8 +- krita/doc/the preview widget | 2 +- .../kritacolor/colorspaces/kis_alpha_colorspace.cc | 96 +- .../kritacolor/colorspaces/kis_alpha_colorspace.h | 68 +- krita/kritacolor/colorspaces/kis_lab_colorspace.cc | 218 +- krita/kritacolor/colorspaces/kis_lab_colorspace.h | 114 +- krita/kritacolor/colorspaces/kis_xyz_colorspace.cc | 272 +- krita/kritacolor/colorspaces/kis_xyz_colorspace.h | 86 +- krita/kritacolor/kis_abstract_colorspace.cc | 260 +- krita/kritacolor/kis_abstract_colorspace.h | 162 +- krita/kritacolor/kis_basic_histogram_producers.cc | 98 +- krita/kritacolor/kis_basic_histogram_producers.h | 58 +- krita/kritacolor/kis_channelinfo.h | 26 +- krita/kritacolor/kis_color.cc | 66 +- krita/kritacolor/kis_color.h | 26 +- krita/kritacolor/kis_color_conversions.cc | 36 +- krita/kritacolor/kis_color_conversions.h | 10 +- krita/kritacolor/kis_colorspace.h | 138 +- .../kritacolor/kis_colorspace_factory_registry.cc | 36 +- krita/kritacolor/kis_colorspace_factory_registry.h | 29 +- krita/kritacolor/kis_colorspace_iface.cc | 10 +- krita/kritacolor/kis_colorspace_iface.h | 6 +- krita/kritacolor/kis_composite_op.cc | 2 +- krita/kritacolor/kis_composite_op.h | 6 +- krita/kritacolor/kis_f16half_base_colorspace.cc | 38 +- krita/kritacolor/kis_f16half_base_colorspace.h | 26 +- krita/kritacolor/kis_f32_base_colorspace.cc | 38 +- krita/kritacolor/kis_f32_base_colorspace.h | 24 +- krita/kritacolor/kis_histogram_producer.cc | 6 +- krita/kritacolor/kis_histogram_producer.h | 20 +- krita/kritacolor/kis_profile.cc | 26 +- krita/kritacolor/kis_profile.h | 30 +- krita/kritacolor/kis_u16_base_colorspace.cc | 62 +- krita/kritacolor/kis_u16_base_colorspace.h | 34 +- krita/kritacolor/kis_u8_base_colorspace.cc | 42 +- krita/kritacolor/kis_u8_base_colorspace.h | 34 +- .../tests/kis_color_conversions_tester.h | 4 +- krita/plugins/filters/blur/blur.cc | 10 +- krita/plugins/filters/blur/blur.h | 2 +- krita/plugins/filters/blur/kis_blur_filter.cc | 40 +- krita/plugins/filters/blur/kis_blur_filter.h | 6 +- krita/plugins/filters/blur/kis_wdg_blur.cc | 24 +- krita/plugins/filters/blur/kis_wdg_blur.h | 3 +- krita/plugins/filters/blur/wdgblur.ui | 28 +- krita/plugins/filters/bumpmap/bumpmap.cc | 156 +- krita/plugins/filters/bumpmap/bumpmap.h | 27 +- krita/plugins/filters/bumpmap/wdgbumpmap.ui | 48 +- krita/plugins/filters/cimg/CImg.h | 324 +- krita/plugins/filters/cimg/kis_cimg_filter.cc | 94 +- krita/plugins/filters/cimg/kis_cimg_filter.h | 14 +- krita/plugins/filters/cimg/kis_cimg_plugin.cc | 6 +- krita/plugins/filters/cimg/kis_cimg_plugin.h | 2 +- .../plugins/filters/cimg/kis_cimgconfig_widget.cc | 34 +- krita/plugins/filters/cimg/kis_cimgconfig_widget.h | 3 +- krita/plugins/filters/cimg/wdg_cimg.ui | 32 +- krita/plugins/filters/colorify/Colorify.cpp | 38 +- krita/plugins/filters/colorify/Colorify.h | 8 +- krita/plugins/filters/colorify/KisWdgColorify.cpp | 14 +- krita/plugins/filters/colorify/KisWdgColorify.h | 3 +- krita/plugins/filters/colorify/WdgColorifyBase.ui | 14 +- krita/plugins/filters/colors/colors.cc | 10 +- krita/plugins/filters/colors/colors.h | 2 +- krita/plugins/filters/colors/kis_color_to_alpha.cc | 24 +- krita/plugins/filters/colors/kis_color_to_alpha.h | 6 +- krita/plugins/filters/colors/kis_minmax_filters.cc | 22 +- krita/plugins/filters/colors/kis_minmax_filters.h | 4 +- .../filters/colors/kis_wdg_color_to_alpha.cc | 16 +- .../filters/colors/kis_wdg_color_to_alpha.h | 3 +- .../plugins/filters/colors/wdgcolortoalphabase.ui | 18 +- .../plugins/filters/colorsfilters/colorsfilters.cc | 44 +- .../plugins/filters/colorsfilters/colorsfilters.h | 6 +- .../kis_brightness_contrast_filter.cc | 132 +- .../colorsfilters/kis_brightness_contrast_filter.h | 18 +- .../filters/colorsfilters/kis_perchannel_filter.cc | 144 +- .../filters/colorsfilters/kis_perchannel_filter.h | 25 +- .../colorsfilters/wdg_brightness_contrast.ui | 52 +- .../filters/colorsfilters/wdg_perchannel.ui | 30 +- .../convolutionfilters/convolutionfilters.cc | 24 +- .../convolutionfilters/convolutionfilters.h | 8 +- .../convolutionfilters/kis_convolution_filter.cc | 52 +- .../convolutionfilters/kis_convolution_filter.h | 15 +- .../kis_custom_convolution_filter.cc | 12 +- .../kis_custom_convolution_filter.h | 6 +- ...convolution_filter_configuration_base_widget.ui | 32 +- ...stom_convolution_filter_configuration_widget.cc | 24 +- ...ustom_convolution_filter_configuration_widget.h | 5 +- .../filters/cubismfilter/kis_cubism_filter.cc | 170 +- .../filters/cubismfilter/kis_cubism_filter.h | 26 +- .../cubismfilter/kis_cubism_filter_plugin.cc | 6 +- .../cubismfilter/kis_cubism_filter_plugin.h | 2 +- krita/plugins/filters/cubismfilter/kis_polygon.cc | 6 +- krita/plugins/filters/cubismfilter/kis_polygon.h | 8 +- .../filters/embossfilter/kis_emboss_filter.cc | 38 +- .../filters/embossfilter/kis_emboss_filter.h | 12 +- .../embossfilter/kis_emboss_filter_plugin.cc | 6 +- .../embossfilter/kis_emboss_filter_plugin.h | 2 +- krita/plugins/filters/example/example.cc | 14 +- krita/plugins/filters/example/example.h | 4 +- .../filters/fastcolortransfer/fastcolortransfer.cc | 46 +- .../filters/fastcolortransfer/fastcolortransfer.h | 8 +- .../kis_wdg_fastcolortransfer.cpp | 10 +- .../fastcolortransfer/kis_wdg_fastcolortransfer.h | 2 +- .../fastcolortransfer/wdgfastcolortransfer.ui | 12 +- krita/plugins/filters/halftone/kis_halftone.cpp | 32 +- krita/plugins/filters/halftone/kis_halftone.h | 8 +- .../filters/imageenhancement/imageenhancement.cpp | 12 +- .../filters/imageenhancement/imageenhancement.h | 2 +- .../imageenhancement/kis_simple_noise_reducer.cpp | 18 +- .../imageenhancement/kis_simple_noise_reducer.h | 6 +- .../kis_wavelet_noise_reduction.cpp | 14 +- .../imageenhancement/kis_wavelet_noise_reduction.h | 6 +- .../kis_wdg_lens_correction.cpp | 20 +- .../lenscorrectionfilter/kis_wdg_lens_correction.h | 3 +- .../lenscorrectionfilter/lenscorrectionfilter.cc | 34 +- .../lenscorrectionfilter/lenscorrectionfilter.h | 8 +- .../wdglenscorrectionoptions.ui | 26 +- .../plugins/filters/levelfilter/kgradientslider.cc | 82 +- .../plugins/filters/levelfilter/kgradientslider.h | 25 +- .../filters/levelfilter/kis_level_filter.cc | 84 +- .../plugins/filters/levelfilter/kis_level_filter.h | 19 +- krita/plugins/filters/levelfilter/levelfilter.cc | 14 +- krita/plugins/filters/levelfilter/levelfilter.h | 2 +- krita/plugins/filters/levelfilter/wdg_level.ui | 66 +- .../plugins/filters/noisefilter/kis_wdg_noise.cpp | 14 +- krita/plugins/filters/noisefilter/kis_wdg_noise.h | 3 +- krita/plugins/filters/noisefilter/noisefilter.cc | 34 +- krita/plugins/filters/noisefilter/noisefilter.h | 8 +- .../plugins/filters/noisefilter/wdgnoiseoptions.ui | 12 +- .../filters/oilpaintfilter/kis_oilpaint_filter.cc | 38 +- .../filters/oilpaintfilter/kis_oilpaint_filter.h | 14 +- .../oilpaintfilter/kis_oilpaint_filter_plugin.cc | 6 +- .../oilpaintfilter/kis_oilpaint_filter_plugin.h | 2 +- .../filters/pixelizefilter/kis_pixelize_filter.cc | 52 +- .../filters/pixelizefilter/kis_pixelize_filter.h | 12 +- .../pixelizefilter/kis_pixelize_filter_plugin.cc | 8 +- .../pixelizefilter/kis_pixelize_filter_plugin.h | 2 +- .../raindropsfilter/kis_raindrops_filter.cc | 46 +- .../filters/raindropsfilter/kis_raindrops_filter.h | 16 +- .../raindropsfilter/kis_raindrops_filter_plugin.cc | 6 +- .../raindropsfilter/kis_raindrops_filter_plugin.h | 2 +- .../randompickfilter/kis_wdg_random_pick.cpp | 16 +- .../filters/randompickfilter/kis_wdg_random_pick.h | 3 +- .../filters/randompickfilter/randompickfilter.cc | 28 +- .../filters/randompickfilter/randompickfilter.h | 8 +- .../randompickfilter/wdgrandompickoptions.ui | 14 +- .../roundcorners/kis_round_corners_filter.cc | 28 +- .../roundcorners/kis_round_corners_filter.h | 10 +- .../kis_round_corners_filter_plugin.cc | 8 +- .../roundcorners/kis_round_corners_filter_plugin.h | 2 +- .../smalltilesfilter/kis_small_tiles_filter.cc | 32 +- .../smalltilesfilter/kis_small_tiles_filter.h | 18 +- .../kis_small_tiles_filter_plugin.cc | 8 +- .../kis_small_tiles_filter_plugin.h | 2 +- .../filters/sobelfilter/kis_sobel_filter.cc | 66 +- .../plugins/filters/sobelfilter/kis_sobel_filter.h | 14 +- .../filters/sobelfilter/kis_sobel_filter_plugin.cc | 8 +- .../filters/sobelfilter/kis_sobel_filter_plugin.h | 2 +- krita/plugins/filters/threadtest/threadtest.cc | 42 +- krita/plugins/filters/threadtest/threadtest.h | 4 +- .../plugins/filters/unsharp/kis_unsharp_filter.cc | 34 +- krita/plugins/filters/unsharp/kis_unsharp_filter.h | 8 +- krita/plugins/filters/unsharp/kis_wdg_unsharp.cc | 16 +- krita/plugins/filters/unsharp/kis_wdg_unsharp.h | 3 +- krita/plugins/filters/unsharp/unsharp.cc | 10 +- krita/plugins/filters/unsharp/unsharp.h | 2 +- krita/plugins/filters/unsharp/wdgunsharp.ui | 14 +- krita/plugins/filters/wavefilter/kis_wdg_wave.cpp | 30 +- krita/plugins/filters/wavefilter/kis_wdg_wave.h | 3 +- krita/plugins/filters/wavefilter/wavefilter.cc | 32 +- krita/plugins/filters/wavefilter/wavefilter.h | 8 +- krita/plugins/filters/wavefilter/wdgwaveoptions.ui | 28 +- .../defaultpaintops/defaultpaintops_plugin.cc | 8 +- .../defaultpaintops/defaultpaintops_plugin.h | 3 +- .../paintops/defaultpaintops/kis_airbrushop.cc | 30 +- .../paintops/defaultpaintops/kis_airbrushop.h | 2 +- .../paintops/defaultpaintops/kis_brushop.cc | 86 +- .../plugins/paintops/defaultpaintops/kis_brushop.h | 27 +- .../paintops/defaultpaintops/kis_convolveop.cc | 2 +- .../defaultpaintops/kis_dlgbrushcurvecontrol.ui | 38 +- .../paintops/defaultpaintops/kis_duplicateop.cc | 50 +- .../paintops/defaultpaintops/kis_eraseop.cc | 30 +- .../plugins/paintops/defaultpaintops/kis_eraseop.h | 2 +- .../plugins/paintops/defaultpaintops/kis_penop.cc | 26 +- krita/plugins/paintops/defaultpaintops/kis_penop.h | 6 +- .../paintops/defaultpaintops/kis_smudgeop.cc | 94 +- .../paintops/defaultpaintops/kis_smudgeop.h | 35 +- krita/plugins/tools/defaulttools/default_tools.cc | 10 +- krita/plugins/tools/defaulttools/default_tools.h | 3 +- krita/plugins/tools/defaulttools/kis_tool_brush.cc | 40 +- krita/plugins/tools/defaulttools/kis_tool_brush.h | 27 +- .../tools/defaulttools/kis_tool_colorpicker.cc | 68 +- .../tools/defaulttools/kis_tool_colorpicker.h | 11 +- .../tools/defaulttools/kis_tool_duplicate.cc | 64 +- .../tools/defaulttools/kis_tool_duplicate.h | 13 +- .../plugins/tools/defaulttools/kis_tool_ellipse.cc | 22 +- .../plugins/tools/defaulttools/kis_tool_ellipse.h | 3 +- krita/plugins/tools/defaulttools/kis_tool_fill.cc | 38 +- krita/plugins/tools/defaulttools/kis_tool_fill.h | 25 +- .../tools/defaulttools/kis_tool_gradient.cc | 62 +- .../plugins/tools/defaulttools/kis_tool_gradient.h | 29 +- krita/plugins/tools/defaulttools/kis_tool_line.cc | 38 +- krita/plugins/tools/defaulttools/kis_tool_line.h | 13 +- krita/plugins/tools/defaulttools/kis_tool_move.cc | 64 +- krita/plugins/tools/defaulttools/kis_tool_move.h | 17 +- krita/plugins/tools/defaulttools/kis_tool_pan.cc | 2 +- krita/plugins/tools/defaulttools/kis_tool_pan.h | 11 +- .../tools/defaulttools/kis_tool_rectangle.cc | 20 +- .../tools/defaulttools/kis_tool_rectangle.h | 9 +- krita/plugins/tools/defaulttools/kis_tool_text.cc | 90 +- krita/plugins/tools/defaulttools/kis_tool_text.h | 19 +- krita/plugins/tools/defaulttools/kis_tool_zoom.cc | 46 +- krita/plugins/tools/defaulttools/kis_tool_zoom.h | 19 +- krita/plugins/tools/defaulttools/wdgcolorpicker.ui | 32 +- .../selectiontools/kis_tool_move_selection.cc | 38 +- .../tools/selectiontools/kis_tool_move_selection.h | 9 +- .../tools/selectiontools/kis_tool_select_brush.cc | 28 +- .../tools/selectiontools/kis_tool_select_brush.h | 11 +- .../selectiontools/kis_tool_select_contiguous.cc | 50 +- .../selectiontools/kis_tool_select_contiguous.h | 13 +- .../selectiontools/kis_tool_select_elliptical.cc | 70 +- .../selectiontools/kis_tool_select_elliptical.h | 13 +- .../tools/selectiontools/kis_tool_select_eraser.cc | 26 +- .../tools/selectiontools/kis_tool_select_eraser.h | 9 +- .../selectiontools/kis_tool_select_outline.cc | 58 +- .../tools/selectiontools/kis_tool_select_outline.h | 15 +- .../selectiontools/kis_tool_select_polygonal.cc | 50 +- .../selectiontools/kis_tool_select_polygonal.h | 11 +- .../selectiontools/kis_tool_select_rectangular.cc | 66 +- .../selectiontools/kis_tool_select_rectangular.h | 11 +- .../tools/selectiontools/selection_tools.cc | 10 +- .../plugins/tools/selectiontools/selection_tools.h | 3 +- krita/plugins/tools/tool_crop/kis_tool_crop.cc | 200 +- krita/plugins/tools/tool_crop/kis_tool_crop.h | 57 +- krita/plugins/tools/tool_crop/tool_crop.cc | 10 +- krita/plugins/tools/tool_crop/tool_crop.h | 3 +- krita/plugins/tools/tool_crop/wdg_tool_crop.ui | 28 +- .../tools/tool_curves/kis_curve_framework.cc | 24 +- .../tools/tool_curves/kis_curve_framework.h | 32 +- krita/plugins/tools/tool_curves/kis_tool_bezier.cc | 34 +- krita/plugins/tools/tool_curves/kis_tool_bezier.h | 5 +- .../tools/tool_curves/kis_tool_bezier_paint.cc | 20 +- .../tools/tool_curves/kis_tool_bezier_paint.h | 5 +- .../tools/tool_curves/kis_tool_bezier_select.cc | 24 +- .../tools/tool_curves/kis_tool_bezier_select.h | 5 +- krita/plugins/tools/tool_curves/kis_tool_curve.cc | 108 +- krita/plugins/tools/tool_curves/kis_tool_curve.h | 45 +- .../plugins/tools/tool_curves/kis_tool_example.cc | 12 +- krita/plugins/tools/tool_curves/kis_tool_example.h | 3 +- .../plugins/tools/tool_curves/kis_tool_moutline.cc | 158 +- .../plugins/tools/tool_curves/kis_tool_moutline.h | 35 +- krita/plugins/tools/tool_curves/tool_curves.cc | 10 +- krita/plugins/tools/tool_curves/tool_curves.h | 3 +- .../plugins/tools/tool_curves/wdg_tool_example.ui | 16 +- krita/plugins/tools/tool_filter/kis_filterop.cc | 38 +- krita/plugins/tools/tool_filter/kis_tool_filter.cc | 22 +- krita/plugins/tools/tool_filter/kis_tool_filter.h | 13 +- krita/plugins/tools/tool_filter/tool_filter.cc | 10 +- krita/plugins/tools/tool_filter/tool_filter.h | 3 +- .../kis_tool_perspectivegrid.cc | 90 +- .../kis_tool_perspectivegrid.h | 17 +- .../tool_perspectivegrid/tool_perspectivegrid.cc | 10 +- .../tool_perspectivegrid/tool_perspectivegrid.h | 3 +- .../kis_tool_perspectivetransform.cc | 122 +- .../kis_tool_perspectivetransform.h | 19 +- .../tool_perspectivetransform.cc | 10 +- .../tool_perspectivetransform.h | 3 +- .../plugins/tools/tool_polygon/kis_tool_polygon.cc | 32 +- .../plugins/tools/tool_polygon/kis_tool_polygon.h | 13 +- krita/plugins/tools/tool_polygon/tool_polygon.cc | 10 +- krita/plugins/tools/tool_polygon/tool_polygon.h | 3 +- .../tools/tool_polyline/kis_tool_polyline.cc | 38 +- .../tools/tool_polyline/kis_tool_polyline.h | 15 +- krita/plugins/tools/tool_polyline/tool_polyline.cc | 10 +- krita/plugins/tools/tool_polyline/tool_polyline.h | 3 +- .../tool_selectsimilar/kis_tool_selectsimilar.cc | 60 +- .../tool_selectsimilar/kis_tool_selectsimilar.h | 21 +- .../tools/tool_selectsimilar/selectsimilar.cc | 12 +- .../tools/tool_selectsimilar/selectsimilar.h | 3 +- krita/plugins/tools/tool_star/kis_tool_star.cc | 30 +- krita/plugins/tools/tool_star/kis_tool_star.h | 15 +- krita/plugins/tools/tool_star/tool_star.cc | 10 +- krita/plugins/tools/tool_star/tool_star.h | 3 +- krita/plugins/tools/tool_star/wdg_tool_star.ui | 16 +- .../tools/tool_transform/kis_tool_transform.cc | 170 +- .../tools/tool_transform/kis_tool_transform.h | 33 +- .../plugins/tools/tool_transform/tool_transform.cc | 10 +- .../plugins/tools/tool_transform/tool_transform.h | 3 +- .../tools/tool_transform/wdg_tool_transform.ui | 46 +- krita/plugins/viewplugins/colorrange/colorrange.cc | 14 +- krita/plugins/viewplugins/colorrange/colorrange.h | 3 +- .../viewplugins/colorrange/dlg_colorrange.cc | 82 +- .../viewplugins/colorrange/dlg_colorrange.h | 11 +- .../viewplugins/colorrange/wdg_colorrange.ui | 42 +- .../colorspaceconversion/colorspaceconversion.cc | 42 +- .../colorspaceconversion/colorspaceconversion.h | 3 +- .../dlg_colorspaceconversion.cc | 28 +- .../dlg_colorspaceconversion.h | 3 +- .../colorspaceconversion/wdgconvertcolorspace.ui | 18 +- .../viewplugins/dropshadow/dlg_dropshadow.cc | 44 +- .../viewplugins/dropshadow/dlg_dropshadow.h | 15 +- .../viewplugins/dropshadow/kis_dropshadow.cc | 138 +- .../viewplugins/dropshadow/kis_dropshadow.h | 17 +- .../dropshadow/kis_dropshadow_plugin.cc | 12 +- .../viewplugins/dropshadow/kis_dropshadow_plugin.h | 3 +- .../viewplugins/dropshadow/wdg_dropshadow.ui | 34 +- .../viewplugins/filtersgallery/filters_gallery.cc | 28 +- .../viewplugins/filtersgallery/filters_gallery.h | 3 +- .../filtersgallery/kis_dlg_filtersgallery.cc | 36 +- .../filtersgallery/kis_dlg_filtersgallery.h | 17 +- .../filtersgallery/kis_wdg_filtersgallery.ui | 8 +- .../plugins/viewplugins/histogram/dlg_histogram.cc | 22 +- .../plugins/viewplugins/histogram/dlg_histogram.h | 3 +- krita/plugins/viewplugins/histogram/histogram.cc | 32 +- krita/plugins/viewplugins/histogram/histogram.h | 3 +- .../viewplugins/histogram/kis_histogram_widget.cc | 30 +- .../viewplugins/histogram/kis_histogram_widget.h | 3 +- .../plugins/viewplugins/histogram/wdghistogram.ui | 34 +- .../histogram_docker/histogramdocker.cc | 38 +- .../viewplugins/histogram_docker/histogramdocker.h | 16 +- .../histogram_docker/kis_accumulating_producer.cc | 16 +- .../histogram_docker/kis_accumulating_producer.h | 15 +- .../histogram_docker/kis_cachedhistogram.h | 4 +- .../histogram_docker/kis_imagerasteredcache.cc | 22 +- .../histogram_docker/kis_imagerasteredcache.h | 21 +- .../viewplugins/history_docker/historydocker.cc | 6 +- .../viewplugins/history_docker/historydocker.h | 2 +- .../plugins/viewplugins/imagesize/dlg_imagesize.cc | 84 +- .../plugins/viewplugins/imagesize/dlg_imagesize.h | 21 +- .../plugins/viewplugins/imagesize/dlg_layersize.cc | 84 +- .../plugins/viewplugins/imagesize/dlg_layersize.h | 19 +- krita/plugins/viewplugins/imagesize/imagesize.cc | 42 +- krita/plugins/viewplugins/imagesize/imagesize.h | 3 +- .../plugins/viewplugins/imagesize/wdg_imagesize.ui | 48 +- .../plugins/viewplugins/imagesize/wdg_layersize.ui | 28 +- .../viewplugins/imagesize/wdg_resolution.ui | 22 +- .../modify_selection/dlg_border_selection.cc | 20 +- .../modify_selection/dlg_border_selection.h | 7 +- .../modify_selection/dlg_grow_selection.cc | 20 +- .../modify_selection/dlg_grow_selection.h | 7 +- .../modify_selection/dlg_shrink_selection.cc | 20 +- .../modify_selection/dlg_shrink_selection.h | 7 +- .../modify_selection/modify_selection.cc | 36 +- .../modify_selection/modify_selection.h | 3 +- .../modify_selection/wdg_border_selection.ui | 10 +- .../modify_selection/wdg_grow_selection.ui | 10 +- .../modify_selection/wdg_shrink_selection.ui | 12 +- .../viewplugins/performancetest/dlg_perftest.cc | 22 +- .../viewplugins/performancetest/dlg_perftest.h | 3 +- .../viewplugins/performancetest/perftest.cc | 496 +- .../plugins/viewplugins/performancetest/perftest.h | 43 +- .../viewplugins/performancetest/wdg_perftest.ui | 50 +- .../viewplugins/rotateimage/dlg_rotateimage.cc | 24 +- .../viewplugins/rotateimage/dlg_rotateimage.h | 3 +- .../plugins/viewplugins/rotateimage/rotateimage.cc | 32 +- .../plugins/viewplugins/rotateimage/rotateimage.h | 3 +- .../viewplugins/rotateimage/wdg_rotateimage.ui | 44 +- krita/plugins/viewplugins/screenshot/ksnapshot.cpp | 194 +- krita/plugins/viewplugins/screenshot/ksnapshot.h | 48 +- .../viewplugins/screenshot/ksnapshotwidget.ui | 34 +- .../viewplugins/screenshot/ksnapshotwidget.ui.h | 6 +- .../viewplugins/screenshot/regiongrabber.cpp | 76 +- .../plugins/viewplugins/screenshot/regiongrabber.h | 33 +- .../plugins/viewplugins/screenshot/screenshot.cpp | 10 +- krita/plugins/viewplugins/screenshot/screenshot.h | 3 +- .../scripting/kritacore/kritacoremodule.cpp | 60 +- .../scripting/kritacore/kritacoremodule.h | 16 +- .../viewplugins/scripting/kritacore/krs_color.cpp | 2 +- .../viewplugins/scripting/kritacore/krs_color.h | 10 +- .../viewplugins/scripting/kritacore/krs_doc.cpp | 2 +- .../viewplugins/scripting/kritacore/krs_doc.h | 2 +- .../viewplugins/scripting/kritacore/krs_filter.cpp | 12 +- .../viewplugins/scripting/kritacore/krs_filter.h | 2 +- .../kritacore/krs_filter_configuration.cpp | 12 +- .../scripting/kritacore/krs_filter_configuration.h | 2 +- .../scripting/kritacore/krs_histogram.cpp | 2 +- .../scripting/kritacore/krs_histogram.h | 2 +- .../viewplugins/scripting/kritacore/krs_image.cpp | 8 +- .../viewplugins/scripting/kritacore/krs_image.h | 2 +- .../viewplugins/scripting/kritacore/krs_iterator.h | 61 +- .../scripting/kritacore/krs_paint_layer.cpp | 26 +- .../scripting/kritacore/krs_paint_layer.h | 2 +- .../scripting/kritacore/krs_painter.cpp | 50 +- .../viewplugins/scripting/kritacore/krs_painter.h | 6 +- .../scripting/kritacore/krs_wavelet.cpp | 20 +- .../kritascripting/kis_script_monitor.cpp | 4 +- .../scripting/kritascripting/kis_script_monitor.h | 5 +- .../kritascripting/kis_script_progress.cpp | 10 +- .../scripting/kritascripting/kis_script_progress.h | 14 +- .../scripting/samples/python/reshapehisto.py | 2 +- .../scripting/samples/ruby/randompaint.rb | 16 +- .../scripting/samples/ruby/torture-painting.rb | 16 +- krita/plugins/viewplugins/scripting/scripting.cc | 30 +- krita/plugins/viewplugins/scripting/scripting.h | 3 +- .../viewplugins/selectopaque/selectopaque.cc | 20 +- .../viewplugins/selectopaque/selectopaque.h | 3 +- .../viewplugins/separate_channels/dlg_separate.cc | 30 +- .../viewplugins/separate_channels/dlg_separate.h | 7 +- .../separate_channels/kis_channel_separator.cc | 34 +- .../separate_channels/kis_channel_separator.h | 1 + .../kis_separate_channels_plugin.cc | 12 +- .../kis_separate_channels_plugin.h | 3 +- .../separate_channels/wdg_separations.ui | 34 +- .../viewplugins/shearimage/dlg_shearimage.cc | 32 +- .../viewplugins/shearimage/dlg_shearimage.h | 11 +- krita/plugins/viewplugins/shearimage/shearimage.cc | 28 +- krita/plugins/viewplugins/shearimage/shearimage.h | 3 +- .../viewplugins/shearimage/wdg_shearimage.ui | 12 +- .../plugins/viewplugins/substrate/dlg_substrate.cc | 12 +- .../plugins/viewplugins/substrate/dlg_substrate.h | 9 +- .../substrate/kis_repeating_substrate.h | 4 +- krita/plugins/viewplugins/substrate/substrate.cc | 16 +- krita/plugins/viewplugins/substrate/substrate.h | 3 +- .../plugins/viewplugins/substrate/wdgsubstrate.ui | 48 +- .../viewplugins/variations/dlg_variations.cc | 12 +- .../viewplugins/variations/dlg_variations.h | 9 +- krita/plugins/viewplugins/variations/variations.cc | 22 +- krita/plugins/viewplugins/variations/variations.h | 3 +- .../viewplugins/variations/wdg_variations.ui | 164 +- krita/sdk/kis_annotation.h | 22 +- krita/sdk/kis_canvas_controller.h | 48 +- krita/sdk/kis_canvas_subject.h | 4 +- krita/sdk/kis_generic_registry.h | 16 +- krita/sdk/kis_global.h | 36 +- krita/sdk/kis_id.h | 18 +- krita/sdk/kis_progress_display_interface.h | 24 +- krita/sdk/kis_progress_subject.h | 9 +- krita/sdk/kis_shared_ptr_vector.h | 12 +- krita/sdk/kis_undo_adapter.h | 6 +- krita/ui/imageviewer.cc | 32 +- krita/ui/imageviewer.h | 27 +- krita/ui/kcurve.cc | 126 +- krita/ui/kcurve.h | 45 +- krita/ui/kis_autobrush.cc | 40 +- krita/ui/kis_autobrush.h | 9 +- krita/ui/kis_autogradient.cc | 38 +- krita/ui/kis_autogradient.h | 7 +- krita/ui/kis_birdeye_box.cc | 90 +- krita/ui/kis_birdeye_box.h | 15 +- krita/ui/kis_boundary_painter.cc | 12 +- krita/ui/kis_boundary_painter.h | 2 +- krita/ui/kis_brush_chooser.cc | 28 +- krita/ui/kis_brush_chooser.h | 13 +- krita/ui/kis_button_event.h | 8 +- krita/ui/kis_button_press_event.h | 2 +- krita/ui/kis_button_release_event.h | 2 +- krita/ui/kis_canvas.cc | 324 +- krita/ui/kis_canvas.h | 214 +- krita/ui/kis_canvas_painter.cc | 376 +- krita/ui/kis_canvas_painter.h | 366 +- krita/ui/kis_clipboard.cc | 84 +- krita/ui/kis_clipboard.h | 11 +- krita/ui/kis_cmb_composite.cc | 20 +- krita/ui/kis_cmb_composite.h | 11 +- krita/ui/kis_cmb_idlist.cc | 16 +- krita/ui/kis_cmb_idlist.h | 11 +- krita/ui/kis_color_cup.cc | 68 +- krita/ui/kis_color_cup.h | 38 +- krita/ui/kis_config.cc | 150 +- krita/ui/kis_config.h | 108 +- krita/ui/kis_controlframe.cc | 74 +- krita/ui/kis_controlframe.h | 22 +- krita/ui/kis_cursor.cc | 208 +- krita/ui/kis_cursor.h | 68 +- krita/ui/kis_custom_brush.cc | 38 +- krita/ui/kis_custom_brush.h | 7 +- krita/ui/kis_custom_image_widget.cc | 30 +- krita/ui/kis_custom_image_widget.h | 7 +- krita/ui/kis_custom_palette.cc | 34 +- krita/ui/kis_custom_palette.h | 5 +- krita/ui/kis_custom_pattern.cc | 26 +- krita/ui/kis_custom_pattern.h | 7 +- krita/ui/kis_dlg_adj_layer_props.cc | 40 +- krita/ui/kis_dlg_adj_layer_props.h | 23 +- krita/ui/kis_dlg_adjustment_layer.cc | 46 +- krita/ui/kis_dlg_adjustment_layer.h | 31 +- krita/ui/kis_dlg_apply_profile.cc | 16 +- krita/ui/kis_dlg_apply_profile.h | 3 +- krita/ui/kis_dlg_image_properties.cc | 44 +- krita/ui/kis_dlg_image_properties.h | 9 +- krita/ui/kis_dlg_layer_properties.cc | 30 +- krita/ui/kis_dlg_layer_properties.h | 15 +- krita/ui/kis_dlg_new_layer.cc | 36 +- krita/ui/kis_dlg_new_layer.h | 15 +- krita/ui/kis_dlg_preferences.cc | 162 +- krita/ui/kis_dlg_preferences.h | 93 +- krita/ui/kis_doc.cc | 250 +- krita/ui/kis_doc.h | 93 +- krita/ui/kis_doc_iface.cc | 2 +- krita/ui/kis_doc_iface.h | 4 +- krita/ui/kis_double_click_event.h | 2 +- krita/ui/kis_double_widget.cc | 30 +- krita/ui/kis_double_widget.h | 21 +- krita/ui/kis_event.h | 8 +- krita/ui/kis_factory.cc | 32 +- krita/ui/kis_factory.h | 11 +- krita/ui/kis_filter_manager.cc | 80 +- krita/ui/kis_filter_manager.h | 19 +- krita/ui/kis_filters_listview.cc | 70 +- krita/ui/kis_filters_listview.h | 38 +- krita/ui/kis_gradient_chooser.cc | 22 +- krita/ui/kis_gradient_chooser.h | 14 +- krita/ui/kis_gradient_slider_widget.cc | 98 +- krita/ui/kis_gradient_slider_widget.h | 17 +- krita/ui/kis_grid_drawer.cpp | 70 +- krita/ui/kis_grid_drawer.h | 32 +- krita/ui/kis_grid_manager.cpp | 26 +- krita/ui/kis_grid_manager.h | 9 +- krita/ui/kis_histogram_view.cc | 60 +- krita/ui/kis_histogram_view.h | 33 +- krita/ui/kis_icon_item.cc | 28 +- krita/ui/kis_icon_item.h | 8 +- krita/ui/kis_iconwidget.cc | 26 +- krita/ui/kis_iconwidget.h | 11 +- krita/ui/kis_import_catcher.cc | 16 +- krita/ui/kis_import_catcher.h | 5 +- krita/ui/kis_input_device.cc | 6 +- krita/ui/kis_input_device.h | 20 +- krita/ui/kis_int_spinbox.cc | 60 +- krita/ui/kis_int_spinbox.h | 56 +- krita/ui/kis_itemchooser.cc | 16 +- krita/ui/kis_itemchooser.h | 19 +- krita/ui/kis_label_cursor_pos.cc | 10 +- krita/ui/kis_label_cursor_pos.h | 13 +- krita/ui/kis_label_progress.cc | 52 +- krita/ui/kis_label_progress.h | 21 +- krita/ui/kis_label_zoom.h | 9 +- krita/ui/kis_layerbox.cc | 264 +- krita/ui/kis_layerbox.h | 45 +- krita/ui/kis_layerlist.cc | 74 +- krita/ui/kis_layerlist.h | 25 +- krita/ui/kis_load_visitor.h | 42 +- krita/ui/kis_matrix_widget.ui | 34 +- krita/ui/kis_matrix_widget.ui.h | 2 +- krita/ui/kis_move_event.h | 2 +- krita/ui/kis_multi_bool_filter_widget.cc | 26 +- krita/ui/kis_multi_bool_filter_widget.h | 19 +- krita/ui/kis_multi_double_filter_widget.cc | 34 +- krita/ui/kis_multi_double_filter_widget.h | 20 +- krita/ui/kis_multi_integer_filter_widget.cc | 32 +- krita/ui/kis_multi_integer_filter_widget.h | 26 +- krita/ui/kis_opengl_canvas.cc | 42 +- krita/ui/kis_opengl_canvas.h | 44 +- krita/ui/kis_opengl_canvas_painter.cc | 232 +- krita/ui/kis_opengl_canvas_painter.h | 194 +- krita/ui/kis_opengl_image_context.cc | 46 +- krita/ui/kis_opengl_image_context.h | 33 +- krita/ui/kis_paintop_box.cc | 68 +- krita/ui/kis_paintop_box.h | 31 +- krita/ui/kis_palette_view.cc | 58 +- krita/ui/kis_palette_view.h | 11 +- krita/ui/kis_palette_widget.cc | 72 +- krita/ui/kis_palette_widget.h | 27 +- krita/ui/kis_part_layer.cc | 88 +- krita/ui/kis_part_layer.h | 35 +- krita/ui/kis_part_layer_handler.cc | 22 +- krita/ui/kis_part_layer_handler.h | 17 +- krita/ui/kis_pattern_chooser.cc | 12 +- krita/ui/kis_pattern_chooser.h | 7 +- krita/ui/kis_perspective_grid_manager.cpp | 16 +- krita/ui/kis_perspective_grid_manager.h | 9 +- krita/ui/kis_populate_visitor.h | 6 +- krita/ui/kis_previewdialog.cc | 22 +- krita/ui/kis_previewdialog.h | 9 +- krita/ui/kis_previewwidget.cc | 88 +- krita/ui/kis_previewwidget.h | 23 +- krita/ui/kis_previewwidgetbase.ui | 34 +- krita/ui/kis_qpaintdevice_canvas.cc | 46 +- krita/ui/kis_qpaintdevice_canvas.h | 48 +- krita/ui/kis_qpaintdevice_canvas_painter.cc | 256 +- krita/ui/kis_qpaintdevice_canvas_painter.h | 190 +- krita/ui/kis_resource_mediator.cc | 18 +- krita/ui/kis_resource_mediator.h | 17 +- krita/ui/kis_resourceserver.cc | 42 +- krita/ui/kis_resourceserver.h | 25 +- krita/ui/kis_ruler.cc | 70 +- krita/ui/kis_ruler.h | 39 +- krita/ui/kis_save_visitor.h | 46 +- krita/ui/kis_savexml_visitor.h | 26 +- krita/ui/kis_selection_manager.cc | 368 +- krita/ui/kis_selection_manager.h | 25 +- krita/ui/kis_selection_options.cc | 16 +- krita/ui/kis_selection_options.h | 9 +- krita/ui/kis_text_brush.cc | 32 +- krita/ui/kis_text_brush.h | 15 +- krita/ui/kis_tool.cc | 20 +- krita/ui/kis_tool.h | 45 +- krita/ui/kis_tool_dummy.cc | 18 +- krita/ui/kis_tool_dummy.h | 13 +- krita/ui/kis_tool_freehand.cc | 54 +- krita/ui/kis_tool_freehand.h | 5 +- krita/ui/kis_tool_manager.cc | 28 +- krita/ui/kis_tool_manager.h | 11 +- krita/ui/kis_tool_non_paint.cc | 12 +- krita/ui/kis_tool_non_paint.h | 29 +- krita/ui/kis_tool_paint.cc | 64 +- krita/ui/kis_tool_paint.h | 59 +- krita/ui/kis_tool_registry.cc | 6 +- krita/ui/kis_tool_registry.h | 7 +- krita/ui/kis_tool_shape.cc | 36 +- krita/ui/kis_tool_shape.h | 11 +- krita/ui/kis_view.cc | 924 +- krita/ui/kis_view.h | 177 +- krita/ui/kis_view_iface.h | 2 +- krita/ui/kobirdeyepanel.cpp | 188 +- krita/ui/kobirdeyepanel.h | 61 +- krita/ui/layerlist.cpp | 444 +- krita/ui/layerlist.h | 157 +- krita/ui/squeezedcombobox.cpp | 82 +- krita/ui/squeezedcombobox.h | 59 +- krita/ui/wdgapplyprofile.ui | 22 +- krita/ui/wdgautobrush.ui | 60 +- krita/ui/wdgautogradient.ui | 48 +- krita/ui/wdgbirdeye.ui | 54 +- krita/ui/wdgcolorsettings.ui | 44 +- krita/ui/wdgcustombrush.ui | 40 +- krita/ui/wdgcustompalette.ui | 12 +- krita/ui/wdgcustompattern.ui | 34 +- krita/ui/wdgdisplaysettings.ui | 16 +- krita/ui/wdggeneralsettings.ui | 40 +- krita/ui/wdggridsettings.ui | 58 +- krita/ui/wdglayerbox.ui | 46 +- krita/ui/wdglayerproperties.ui | 16 +- krita/ui/wdgnewimage.ui | 54 +- krita/ui/wdgpalettechooser.ui | 16 +- krita/ui/wdgperformancesettings.ui | 24 +- krita/ui/wdgpressuresettings.ui | 12 +- krita/ui/wdgselectionoptions.ui | 12 +- krita/ui/wdgshapeoptions.ui | 12 +- krita/ui/wdgtabletdevicesettings.ui | 56 +- krita/ui/wdgtabletsettings.ui | 24 +- krita/ui/wdgtextbrush.ui | 32 +- 885 files changed, 32692 insertions(+), 32464 deletions(-) (limited to 'krita') diff --git a/krita/HACKING b/krita/HACKING index 9e89f762..e1c7262b 100644 --- a/krita/HACKING +++ b/krita/HACKING @@ -62,7 +62,7 @@ Variable/Parameter names Designer - Krita has started to use designer. All dialogs and all widgets that have a layout + Krita has started to use designer. All dialogs and all widgets that have a tqlayout manager must be done in designer. We don't add code nor add signal/slot connections in designer @@ -86,8 +86,8 @@ Spaces Keep the source airy and open. (However, maybe I was wrong in wanting spaces around ->...) -Slots and signals +Slots and Q_SIGNALS - Prefix slots with slot and signals with sig: slotUpdateSelection, sigSelectionUpdated. + Prefix Q_SLOTS with slot and Q_SIGNALS with sig: slotUpdateSelection, sigSelectionUpdated. Boudewijn Rempt \ No newline at end of file diff --git a/krita/IMAGE_LIBRARIES b/krita/IMAGE_LIBRARIES index 8b4763d2..4b9bb2e1 100644 --- a/krita/IMAGE_LIBRARIES +++ b/krita/IMAGE_LIBRARIES @@ -153,7 +153,7 @@ Disadvantages: Libart isn't really an image library, but rather a canvas that can be used to paint images on. It is optimized for vector graphics, and is -used by Karbon to render shapes before display. +used by Karbon to render tqshapes before display. Advantages: diff --git a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc index a86b09f4..d7b20b29 100644 --- a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc +++ b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc @@ -34,14 +34,14 @@ typedef KGenericFactory CMYKU16PluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_cmyk_u16_plugin, CMYKU16PluginFactory( "krita" ) ) -CMYKU16Plugin::CMYKU16Plugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +CMYKU16Plugin::CMYKU16Plugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(CMYKU16PluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); KisColorSpace * colorSpaceCMYKU16 = new KisCmykU16ColorSpace(f, 0); KisColorSpaceFactory * csf = new KisCmykU16ColorSpaceFactory(); diff --git a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h index 90dce548..07224a14 100644 --- a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h +++ b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h @@ -27,8 +27,9 @@ class CMYKU16Plugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - CMYKU16Plugin(QObject *parent, const char *name, const QStringList &); + CMYKU16Plugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~CMYKU16Plugin(); }; diff --git a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc index 92ac3c83..3f2ccc80 100644 --- a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc +++ b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc @@ -23,7 +23,7 @@ #include LCMS_HEADER -#include +#include #include #include @@ -36,20 +36,20 @@ #include "kis_colorspace_factory_registry.h" namespace { - const Q_INT32 MAX_CHANNEL_CMYK = 4; - const Q_INT32 MAX_CHANNEL_CMYKA = 5; + const TQ_INT32 MAX_CHANNEL_CMYK = 4; + const TQ_INT32 MAX_CHANNEL_CMYKA = 5; } -KisCmykU16ColorSpace::KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisU16BaseColorSpace(KisID("CMYKA16", i18n("CMYK (16-bit integer/channel)")), TYPE_CMYK5_16, icSigCmykData, parent, p) +KisCmykU16ColorSpace::KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisU16BaseColorSpace(KisID("CMYKA16", i18n("CMYK (16-bit integer/channel)")), TYPE_CMYK5_16, icSigCmykData, tqparent, p) { - m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::cyan)); - m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::magenta)); - m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::yellow)); - m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::black)); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4 * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::cyan)); + m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::magenta)); + m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::yellow)); + m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::black)); + m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4 * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); - m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16); + m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16); init(); } @@ -58,16 +58,16 @@ KisCmykU16ColorSpace::~KisCmykU16ColorSpace() { } -void KisCmykU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisCmykU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalBlack = 0, newAlpha = 0; + TQ_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalBlack = 0, newAlpha = 0; while (nColors--) { const Pixel *pixel = reinterpret_cast(*colors); - Q_UINT32 alpha = pixel->alpha; - Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights)); + TQ_UINT32 alpha = pixel->alpha; + TQ_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights)); totalCyan += UINT16_MULT(pixel->cyan, alphaTimesWeight); totalMagenta += UINT16_MULT(pixel->magenta, alphaTimesWeight); @@ -98,15 +98,15 @@ void KisCmykU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig dstPixel->black = totalBlack; } -void KisCmykU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisCmykU16ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; + TQ_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; while (nColors--) { const Pixel * pixel = reinterpret_cast( *colors ); - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { totalCyan += pixel->cyan * weight; @@ -122,40 +122,40 @@ void KisCmykU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValue Pixel * p = reinterpret_cast< Pixel *>( dst ); if (channelFlags & KisChannelInfo::FLAG_COLOR) { - p->cyan = CLAMP( ( totalCyan / factor) + offset, 0, Q_UINT16_MAX); - p->magenta = CLAMP( ( totalMagenta / factor) + offset, 0, Q_UINT16_MAX); - p->yellow = CLAMP( ( totalYellow / factor) + offset, 0, Q_UINT16_MAX); - p->black = CLAMP( ( totalK / factor) + offset, 0, Q_UINT16_MAX); + p->cyan = CLAMP( ( totalCyan / factor) + offset, 0, TQ_UINT16_MAX); + p->magenta = CLAMP( ( totalMagenta / factor) + offset, 0, TQ_UINT16_MAX); + p->yellow = CLAMP( ( totalYellow / factor) + offset, 0, TQ_UINT16_MAX); + p->black = CLAMP( ( totalK / factor) + offset, 0, TQ_UINT16_MAX); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT16_MAX); + p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT16_MAX); } } -void KisCmykU16ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisCmykU16ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { Pixel * p = reinterpret_cast< Pixel *>( src ); - p->cyan = Q_UINT16_MAX - p->cyan; - p->magenta = Q_UINT16_MAX - p->magenta; - p->yellow = Q_UINT16_MAX - p->yellow; - p->black = Q_UINT16_MAX - p->black; + p->cyan = TQ_UINT16_MAX - p->cyan; + p->magenta = TQ_UINT16_MAX - p->magenta; + p->yellow = TQ_UINT16_MAX - p->yellow; + p->black = TQ_UINT16_MAX - p->black; src += psize; } } -void KisCmykU16ColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels) +void KisCmykU16ColorSpace::applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); - Q_UINT8 * tmp = new Q_UINT8[nPixels * psize]; - Q_UINT8 * tmpPtr = tmp; + TQ_UINT8 * tmp = new TQ_UINT8[nPixels * psize]; + TQ_UINT8 * tmpPtr = tmp; memcpy(tmp, dst, nPixels * psize); KisAbstractColorSpace::applyAdjustment(src, dst, adj, nPixels); @@ -164,8 +164,8 @@ void KisCmykU16ColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, Kis while (nPixels--) { - Q_UINT16 *pixelAlphaSrc = reinterpret_cast(tmpPtr + m_alphaPos); - Q_UINT16 *pixelAlphaDst = reinterpret_cast(dst + m_alphaPos); + TQ_UINT16 *pixelAlphaSrc = reinterpret_cast(tmpPtr + m_alphaPos); + TQ_UINT16 *pixelAlphaDst = reinterpret_cast(dst + m_alphaPos); *pixelAlphaDst= *pixelAlphaSrc; @@ -176,61 +176,61 @@ void KisCmykU16ColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, Kis delete [] tmp; } -QValueVector KisCmykU16ColorSpace::channels() const +TQValueVector KisCmykU16ColorSpace::channels() const { return m_channels; } -Q_UINT32 KisCmykU16ColorSpace::nChannels() const +TQ_UINT32 KisCmykU16ColorSpace::nChannels() const { return MAX_CHANNEL_CMYKA; } -Q_UINT32 KisCmykU16ColorSpace::nColorChannels() const +TQ_UINT32 KisCmykU16ColorSpace::nColorChannels() const { return MAX_CHANNEL_CMYK; } -Q_UINT32 KisCmykU16ColorSpace::pixelSize() const +TQ_UINT32 KisCmykU16ColorSpace::pixelSize() const { - return MAX_CHANNEL_CMYKA * sizeof(Q_UINT16); + return MAX_CHANNEL_CMYKA * sizeof(TQ_UINT16); } -void KisCmykU16ColorSpace::getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex) +void KisCmykU16ColorSpace::getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex) { - if (channelIndex < (Q_UINT32)MAX_CHANNEL_CMYKA) { + if (channelIndex < (TQ_UINT32)MAX_CHANNEL_CMYKA) { - memset(dstPixel, 0, MAX_CHANNEL_CMYKA * sizeof(Q_UINT16)); + memset(dstPixel, 0, MAX_CHANNEL_CMYKA * sizeof(TQ_UINT16)); if (U16_OPACITY_TRANSPARENT != 0) { dstPixel[PIXEL_ALPHA] = U16_OPACITY_TRANSPARENT; } - memcpy(dstPixel + (channelIndex * sizeof(Q_UINT16)), srcPixel + (channelIndex * sizeof(Q_UINT16)), sizeof(Q_UINT16)); + memcpy(dstPixel + (channelIndex * sizeof(TQ_UINT16)), srcPixel + (channelIndex * sizeof(TQ_UINT16)), sizeof(TQ_UINT16)); } } -void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { while (rows > 0) { - const Q_UINT16 *src = reinterpret_cast(srcRowStart); - Q_UINT16 *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } if (srcAlpha != U16_OPACITY_TRANSPARENT) { @@ -240,16 +240,16 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr } if (srcAlpha == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_CMYKA * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_CMYKA * sizeof(TQ_UINT16)); } else { - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; - Q_UINT16 srcBlend; + TQ_UINT16 srcBlend; if (dstAlpha == U16_OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -260,7 +260,7 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr } if (srcBlend == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_CMYK * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_CMYK * sizeof(TQ_UINT16)); } else { dst[PIXEL_CYAN] = UINT16_BLEND(src[PIXEL_CYAN], dst[PIXEL_CYAN], srcBlend); dst[PIXEL_MAGENTA] = UINT16_BLEND(src[PIXEL_MAGENTA], dst[PIXEL_MAGENTA], srcBlend); @@ -278,8 +278,8 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } @@ -287,25 +287,25 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr #define COMMON_COMPOSITE_OP_PROLOG() \ while (rows > 0) { \ \ - const Q_UINT16 *src = reinterpret_cast(srcRowStart); \ - Q_UINT16 *dst = reinterpret_cast(dstRowStart); \ - Q_INT32 columns = numColumns; \ - const Q_UINT8 *mask = maskRowStart; \ + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); \ + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); \ + TQ_INT32 columns = numColumns; \ + const TQ_UINT8 *tqmask = tqmaskRowStart; \ \ while (columns > 0) { \ \ - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ \ - srcAlpha = QMIN(srcAlpha, dstAlpha); \ + srcAlpha = TQMIN(srcAlpha, dstAlpha); \ \ - if (mask != 0) { \ - Q_UINT8 U8_mask = *mask; \ + if (tqmask != 0) { \ + TQ_UINT8 U8_tqmask = *tqmask; \ \ - if (U8_mask != OPACITY_OPAQUE) { \ - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \ + if (U8_tqmask != OPACITY_OPAQUE) { \ + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \ } \ - mask++; \ + tqmask++; \ } \ \ if (srcAlpha != U16_OPACITY_TRANSPARENT) { \ @@ -314,12 +314,12 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr srcAlpha = UINT16_MULT(srcAlpha, opacity); \ } \ \ - Q_UINT16 srcBlend; \ + TQ_UINT16 srcBlend; \ \ if (dstAlpha == U16_OPACITY_OPAQUE) { \ srcBlend = srcAlpha; \ } else { \ - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ dst[PIXEL_ALPHA] = newAlpha; \ \ if (newAlpha != 0) { \ @@ -340,20 +340,20 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; \ srcRowStart += srcRowStride; \ dstRowStart += dstRowStride; \ - if(maskRowStart) { \ - maskRowStart += maskRowStride; \ + if(tqmaskRowStart) { \ + tqmaskRowStart += tqmaskRowStride; \ } \ } -void KisCmykU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MULT(srcColor, dstColor); @@ -366,19 +366,19 @@ void KisCmykU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRo COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -387,19 +387,19 @@ void KisCmykU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MAX - UINT16_MULT(UINT16_MAX - dstColor, UINT16_MAX - srcColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -408,19 +408,19 @@ void KisCmykU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MULT(dstColor, dstColor + 2u * UINT16_MULT(srcColor, UINT16_MAX - dstColor)); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -429,19 +429,19 @@ void KisCmykU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRow COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -450,20 +450,20 @@ void KisCmykU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX); + srcColor = TQMIN(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX); if (srcColor > UINT16_MAX - srcColor) srcColor = UINT16_MAX; - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -472,19 +472,19 @@ void KisCmykU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -493,19 +493,19 @@ void KisCmykU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisCmykU16ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -514,34 +514,34 @@ void KisCmykU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRow COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykU16ColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT16 /*opacity*/) +void KisCmykU16ColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT16 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT16 srcAlpha = s->alpha; + TQ_UINT16 srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = UINT16_MULT(srcAlpha, d->alpha); } @@ -549,31 +549,31 @@ void KisCmykU16ColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisCmykU16ColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { - Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); + TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); switch (op.op()) { case COMPOSITE_UNDEF: // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -602,16 +602,16 @@ void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity); break; case COMPOSITE_COPY_CYAN: //compositeCopyCyan(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -646,22 +646,22 @@ void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -670,24 +670,24 @@ void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: - abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest()); break; default: diff --git a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h index 227e18d2..1a70fc71 100644 --- a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h +++ b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h @@ -18,7 +18,7 @@ #ifndef KIS_STRATEGY_COLORSPACE_CMYK_U16_H_ #define KIS_STRATEGY_COLORSPACE_CMYK_U16_H_ -#include +#include #include @@ -31,15 +31,15 @@ class KRITATOOL_EXPORT KisCmykU16ColorSpace : public KisU16BaseColorSpace { public: struct Pixel { - Q_UINT16 cyan; - Q_UINT16 magenta; - Q_UINT16 yellow; - Q_UINT16 black; - Q_UINT16 alpha; + TQ_UINT16 cyan; + TQ_UINT16 magenta; + TQ_UINT16 yellow; + TQ_UINT16 black; + TQ_UINT16 alpha; }; public: - KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisCmykU16ColorSpace(); virtual bool willDegrade(ColorSpaceIndependence independence) @@ -52,51 +52,51 @@ public: public: - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual void applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual void getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex); + virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex); virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); private: friend class KisCmykU16ColorSpaceTester; - static const Q_UINT8 PIXEL_CYAN = 0; - static const Q_UINT8 PIXEL_MAGENTA = 1; - static const Q_UINT8 PIXEL_YELLOW = 2; - static const Q_UINT8 PIXEL_BLACK = 3; - static const Q_UINT8 PIXEL_ALPHA = 4; + static const TQ_UINT8 PIXEL_CYAN = 0; + static const TQ_UINT8 PIXEL_MAGENTA = 1; + static const TQ_UINT8 PIXEL_YELLOW = 2; + static const TQ_UINT8 PIXEL_BLACK = 3; + static const TQ_UINT8 PIXEL_ALPHA = 4; }; class KisCmykU16ColorSpaceFactory : public KisColorSpaceFactory @@ -111,13 +111,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_CMYK5_16; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_CMYK5_16; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigCmykData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykU16ColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisCmykU16ColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; + virtual TQString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; }; #endif // KIS_STRATEGY_COLORSPACE_CMYK_U16_H_ diff --git a/krita/colorspaces/cmyk_u8/cmyk_plugin.cc b/krita/colorspaces/cmyk_u8/cmyk_plugin.cc index ccd5a1b4..d216417e 100644 --- a/krita/colorspaces/cmyk_u8/cmyk_plugin.cc +++ b/krita/colorspaces/cmyk_u8/cmyk_plugin.cc @@ -39,13 +39,13 @@ typedef KGenericFactory CMYKPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritacmykplugin, CMYKPluginFactory( "krita" ) ) -CMYKPlugin::CMYKPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +CMYKPlugin::CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(CMYKPluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); KisColorSpace * colorSpaceCMYK = new KisCmykColorSpace(f, 0); KisColorSpaceFactory * csf = new KisCmykColorSpaceFactory(); diff --git a/krita/colorspaces/cmyk_u8/cmyk_plugin.h b/krita/colorspaces/cmyk_u8/cmyk_plugin.h index c9cee97d..073a5e61 100644 --- a/krita/colorspaces/cmyk_u8/cmyk_plugin.h +++ b/krita/colorspaces/cmyk_u8/cmyk_plugin.h @@ -27,8 +27,9 @@ class CMYKPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - CMYKPlugin(QObject *parent, const char *name, const QStringList &); + CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~CMYKPlugin(); diff --git a/krita/colorspaces/cmyk_u8/composite.h b/krita/colorspaces/cmyk_u8/composite.h index a037a054..4914a7df 100644 --- a/krita/colorspaces/cmyk_u8/composite.h +++ b/krita/colorspaces/cmyk_u8/composite.h @@ -19,55 +19,55 @@ #ifndef COMPOSITE_CMYK #define COMPOSITE_CMYK -void compositeCopyCyan(Q_INT32 stride, - Q_UINT8 *dst, - Q_INT32 dststride, - Q_UINT8 *src, - Q_INT32 srcstride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyCyan(TQ_INT32 stride, + TQ_UINT8 *dst, + TQ_INT32 dststride, + TQ_UINT8 *src, + TQ_INT32 srcstride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { compositeCopyChannel(PIXEL_CYAN, stride, dst, dststride, src, srcstride, rows, cols, opacity); } -void compositeCopyMagenta(Q_INT32 stride, - Q_UINT8 *dst, - Q_INT32 dststride, - Q_UINT8 *src, - Q_INT32 srcstride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyMagenta(TQ_INT32 stride, + TQ_UINT8 *dst, + TQ_INT32 dststride, + TQ_UINT8 *src, + TQ_INT32 srcstride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { compositeCopyChannel(PIXEL_MAGENTA, stride, dst, dststride, src, srcstride, rows, cols, opacity); } -void compositeCopyYellow(Q_INT32 stride, - Q_UINT8 *dst, - Q_INT32 dststride, - Q_UINT8 *src, - Q_INT32 srcstride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyYellow(TQ_INT32 stride, + TQ_UINT8 *dst, + TQ_INT32 dststride, + TQ_UINT8 *src, + TQ_INT32 srcstride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { compositeCopyChannel(PIXEL_YELLOW, stride, dst, dststride, src, srcstride, rows, cols, opacity); } -void compositeCopyBlack(Q_INT32 stride, - Q_UINT8 *dst, - Q_INT32 dststride, - Q_UINT8 *src, - Q_INT32 srcstride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyBlack(TQ_INT32 stride, + TQ_UINT8 *dst, + TQ_INT32 dststride, + TQ_UINT8 *src, + TQ_INT32 srcstride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { compositeCopyChannel(PIXEL_BLACK, stride, dst, dststride, src, srcstride, rows, cols, opacity); } diff --git a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc index d40be017..49256c26 100644 --- a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc +++ b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc @@ -20,7 +20,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -33,18 +33,18 @@ #include "kis_integer_maths.h" namespace cmyk { - const Q_INT32 MAX_CHANNEL_CMYK = 4; - const Q_INT32 MAX_CHANNEL_CMYKA = 5; + const TQ_INT32 MAX_CHANNEL_CMYK = 4; + const TQ_INT32 MAX_CHANNEL_CMYKA = 5; } -KisCmykColorSpace::KisCmykColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisU8BaseColorSpace(KisID("CMYK", i18n("CMYK")), TYPE_CMYK5_8, icSigCmykData, parent, p) +KisCmykColorSpace::KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisU8BaseColorSpace(KisID("CMYK", i18n("CMYK")), TYPE_CMYK5_8, icSigCmykData, tqparent, p) { - m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::cyan)); - m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::magenta)); - m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::yellow)); - m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::black)); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4, KisChannelInfo::ALPHA, KisChannelInfo::UINT8, 1, Qt::white)); + m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::cyan)); + m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::magenta)); + m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::yellow)); + m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::black)); + m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4, KisChannelInfo::ALPHA, KisChannelInfo::UINT8, 1, TQt::white)); m_alphaPos = PIXEL_CMYK_ALPHA; @@ -55,14 +55,14 @@ KisCmykColorSpace::~KisCmykColorSpace() { } -void KisCmykColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisCmykColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; + TQ_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; while (nColors--) { - Q_UINT32 alpha = (*colors)[4]; - Q_UINT32 alphaTimesWeight = alpha * *weights; + TQ_UINT32 alpha = (*colors)[4]; + TQ_UINT32 alphaTimesWeight = alpha * *weights; totalCyan += (*colors)[0] * alphaTimesWeight; totalMagenta += (*colors)[1] * alphaTimesWeight; @@ -87,31 +87,31 @@ void KisCmykColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights totalK = totalK / totalAlpha; } // else the values are already 0 too - Q_UINT32 dstCyan = totalCyan; + TQ_UINT32 dstCyan = totalCyan; if (dstCyan > 255) dstCyan = 255; dst[0] = dstCyan; - Q_UINT32 dstMagenta = totalMagenta; + TQ_UINT32 dstMagenta = totalMagenta; if (dstMagenta > 255) dstMagenta = 255; dst[1] = dstMagenta; - Q_UINT32 dstYellow = totalYellow; + TQ_UINT32 dstYellow = totalYellow; if (dstYellow > 255) dstYellow = 255; dst[2] = dstYellow; - Q_UINT32 dstK = totalK; + TQ_UINT32 dstK = totalK; if (dstK > 255) dstK = 255; dst[3] = dstK; } -void KisCmykColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisCmykColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; + TQ_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; while (nColors--) { - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { totalCyan += (*colors)[PIXEL_CYAN] * weight; @@ -126,37 +126,37 @@ void KisCmykColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, if (channelFlags & KisChannelInfo::FLAG_COLOR) { - dst[PIXEL_CYAN] = CLAMP((totalCyan / factor) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_MAGENTA] = CLAMP((totalMagenta / factor) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_YELLOW] = CLAMP((totalYellow / factor) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_BLACK] = CLAMP((totalK / factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_CYAN] = CLAMP((totalCyan / factor) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_MAGENTA] = CLAMP((totalMagenta / factor) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_YELLOW] = CLAMP((totalYellow / factor) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_BLACK] = CLAMP((totalK / factor) + offset, 0, TQ_UINT8_MAX); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - dst[PIXEL_CMYK_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_CMYK_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX); } } -void KisCmykColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisCmykColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { - src[PIXEL_CYAN] = Q_UINT8_MAX - src[PIXEL_CYAN]; - src[PIXEL_MAGENTA] = Q_UINT8_MAX - src[PIXEL_MAGENTA]; - src[PIXEL_YELLOW] = Q_UINT8_MAX - src[PIXEL_YELLOW]; - src[PIXEL_BLACK] = Q_UINT8_MAX - src[PIXEL_BLACK]; + src[PIXEL_CYAN] = TQ_UINT8_MAX - src[PIXEL_CYAN]; + src[PIXEL_MAGENTA] = TQ_UINT8_MAX - src[PIXEL_MAGENTA]; + src[PIXEL_YELLOW] = TQ_UINT8_MAX - src[PIXEL_YELLOW]; + src[PIXEL_BLACK] = TQ_UINT8_MAX - src[PIXEL_BLACK]; src += psize; } } -void KisCmykColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels) +void KisCmykColorSpace::applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); - Q_UINT8 * tmp = new Q_UINT8[nPixels * psize]; - Q_UINT8 * tmpPtr = tmp; + TQ_UINT8 * tmp = new TQ_UINT8[nPixels * psize]; + TQ_UINT8 * tmpPtr = tmp; memcpy(tmp, dst, nPixels * psize); KisAbstractColorSpace::applyAdjustment(src, dst, adj, nPixels); @@ -174,61 +174,61 @@ void KisCmykColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisCol delete [] tmp; } -QValueVector KisCmykColorSpace::channels() const +TQValueVector KisCmykColorSpace::channels() const { return m_channels; } -Q_UINT32 KisCmykColorSpace::nChannels() const +TQ_UINT32 KisCmykColorSpace::nChannels() const { return cmyk::MAX_CHANNEL_CMYKA; } -Q_UINT32 KisCmykColorSpace::nColorChannels() const +TQ_UINT32 KisCmykColorSpace::nColorChannels() const { return cmyk::MAX_CHANNEL_CMYK; } -Q_UINT32 KisCmykColorSpace::pixelSize() const +TQ_UINT32 KisCmykColorSpace::pixelSize() const { return cmyk::MAX_CHANNEL_CMYKA; } -void KisCmykColorSpace::getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex) +void KisCmykColorSpace::getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex) { - if (channelIndex < (Q_UINT32)cmyk::MAX_CHANNEL_CMYKA) { + if (channelIndex < (TQ_UINT32)cmyk::MAX_CHANNEL_CMYKA) { - memset(dstPixel, 0, cmyk::MAX_CHANNEL_CMYKA * sizeof(Q_UINT8)); + memset(dstPixel, 0, cmyk::MAX_CHANNEL_CMYKA * sizeof(TQ_UINT8)); if (OPACITY_TRANSPARENT != 0) { dstPixel[PIXEL_CMYK_ALPHA] = OPACITY_TRANSPARENT; } - memcpy(dstPixel + (channelIndex * sizeof(Q_UINT8)), srcPixel + (channelIndex * sizeof(Q_UINT8)), sizeof(Q_UINT8)); + memcpy(dstPixel + (channelIndex * sizeof(TQ_UINT8)), srcPixel + (channelIndex * sizeof(TQ_UINT8)), sizeof(TQ_UINT8)); } } -void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT8_MULT(srcAlpha, U8_mask); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask); } - mask++; + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -238,16 +238,16 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride } if (srcAlpha == OPACITY_OPAQUE) { - memcpy(dst, src, cmyk::MAX_CHANNEL_CMYKA * sizeof(Q_UINT8)); + memcpy(dst, src, cmyk::MAX_CHANNEL_CMYKA * sizeof(TQ_UINT8)); } else { - Q_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_CMYK_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -258,7 +258,7 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride } if (srcBlend == OPACITY_OPAQUE) { - memcpy(dst, src, cmyk::MAX_CHANNEL_CMYK * sizeof(Q_UINT8)); + memcpy(dst, src, cmyk::MAX_CHANNEL_CMYK * sizeof(TQ_UINT8)); } else { dst[PIXEL_CYAN] = UINT8_BLEND(src[PIXEL_CYAN], dst[PIXEL_CYAN], srcBlend); dst[PIXEL_MAGENTA] = UINT8_BLEND(src[PIXEL_MAGENTA], dst[PIXEL_MAGENTA], srcBlend); @@ -276,8 +276,8 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } @@ -285,25 +285,25 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride #define COMMON_COMPOSITE_OP_PROLOG() \ while (rows > 0) { \ \ - const Q_UINT8 *src = srcRowStart; \ - Q_UINT8 *dst = dstRowStart; \ - Q_INT32 columns = numColumns; \ - const Q_UINT8 *mask = maskRowStart; \ + const TQ_UINT8 *src = srcRowStart; \ + TQ_UINT8 *dst = dstRowStart; \ + TQ_INT32 columns = numColumns; \ + const TQ_UINT8 *tqmask = tqmaskRowStart; \ \ while (columns > 0) { \ \ - Q_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; \ - Q_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; \ + TQ_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; \ + TQ_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; \ \ - srcAlpha = QMIN(srcAlpha, dstAlpha); \ + srcAlpha = TQMIN(srcAlpha, dstAlpha); \ \ - if (mask != 0) { \ - Q_UINT8 U8_mask = *mask; \ + if (tqmask != 0) { \ + TQ_UINT8 U8_tqmask = *tqmask; \ \ - if (U8_mask != OPACITY_OPAQUE) { \ - srcAlpha = UINT8_MULT(srcAlpha, U8_mask); \ + if (U8_tqmask != OPACITY_OPAQUE) { \ + srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask); \ } \ - mask++; \ + tqmask++; \ } \ \ if (srcAlpha != OPACITY_TRANSPARENT) { \ @@ -312,12 +312,12 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride srcAlpha = UINT8_MULT(srcAlpha, opacity); \ } \ \ - Q_UINT8 srcBlend; \ + TQ_UINT8 srcBlend; \ \ if (dstAlpha == OPACITY_OPAQUE) { \ srcBlend = srcAlpha; \ } else { \ - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); \ + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); \ dst[PIXEL_CMYK_ALPHA] = newAlpha; \ \ if (newAlpha != 0) { \ @@ -338,20 +338,20 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rows--; \ srcRowStart += srcRowStride; \ dstRowStart += dstRowStride; \ - if(maskRowStart) { \ - maskRowStart += maskRowStride; \ + if(tqmaskRowStart) { \ + tqmaskRowStart += tqmaskRowStride; \ } \ } -void KisCmykColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = UINT8_MULT(srcColor, dstColor); @@ -364,19 +364,19 @@ void KisCmykColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX); + srcColor = TQMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -385,19 +385,19 @@ void KisCmykColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = UINT8_MAX - UINT8_MULT(UINT8_MAX - dstColor, UINT8_MAX - srcColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -406,19 +406,19 @@ void KisCmykColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = UINT8_MULT(dstColor, dstColor + 2u * UINT8_MULT(srcColor, UINT8_MAX - dstColor)); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -427,19 +427,19 @@ void KisCmykColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT8_MAX + 1u)) / (UINT8_MAX + 1u - srcColor), UINT8_MAX); + srcColor = TQMIN((dstColor * (UINT8_MAX + 1u)) / (UINT8_MAX + 1u - srcColor), UINT8_MAX); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -448,20 +448,20 @@ void KisCmykColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1u)) / (srcColor + 1u), UINT8_MAX); + srcColor = TQMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1u)) / (srcColor + 1u), UINT8_MAX); if (srcColor > UINT8_MAX - srcColor) srcColor = UINT8_MAX; - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -470,19 +470,19 @@ void KisCmykColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -491,19 +491,19 @@ void KisCmykColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisCmykColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -512,34 +512,34 @@ void KisCmykColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisCmykColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 /*opacity*/) +void KisCmykColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT8 srcAlpha = s->alpha; + TQ_UINT8 srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, U8_mask); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, U8_tqmask); } - mask++; + tqmask++; } d->alpha = UINT8_MULT(srcAlpha, d->alpha); } @@ -547,20 +547,20 @@ void KisCmykColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisCmykColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { @@ -569,7 +569,7 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst, // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -598,16 +598,16 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COPY_CYAN: //compositeCopyCyan(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -642,22 +642,22 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -666,24 +666,24 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: - abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity, U8Mult(), Uint8ToU8(), U8OpacityTest()); break; default: diff --git a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h index b918f1aa..b02990bf 100644 --- a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h +++ b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h @@ -18,8 +18,8 @@ #ifndef KIS_STRATEGY_COLORSPACE_CMYK_H_ #define KIS_STRATEGY_COLORSPACE_CMYK_H_ -#include -#include +#include +#include #include #include "kis_global.h" #include "kis_u8_base_colorspace.h" @@ -30,14 +30,14 @@ public: struct Pixel { - Q_UINT16 cyan; - Q_UINT16 magenta; - Q_UINT16 yellow; - Q_UINT16 black; - Q_UINT16 alpha; + TQ_UINT16 cyan; + TQ_UINT16 magenta; + TQ_UINT16 yellow; + TQ_UINT16 black; + TQ_UINT16 alpha; }; public: - KisCmykColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisCmykColorSpace(); @@ -53,53 +53,53 @@ public: public: - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels); - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels); + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; // XXX: darken & intensity8? - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; - virtual void getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex); + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; + virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex); virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); private: - Q_UINT8 * m_qcolordata; + TQ_UINT8 * m_qcolordata; - static const Q_UINT8 PIXEL_CYAN = 0; - static const Q_UINT8 PIXEL_MAGENTA = 1; - static const Q_UINT8 PIXEL_YELLOW = 2; - static const Q_UINT8 PIXEL_BLACK = 3; - static const Q_UINT8 PIXEL_CMYK_ALPHA = 4; + static const TQ_UINT8 PIXEL_CYAN = 0; + static const TQ_UINT8 PIXEL_MAGENTA = 1; + static const TQ_UINT8 PIXEL_YELLOW = 2; + static const TQ_UINT8 PIXEL_BLACK = 3; + static const TQ_UINT8 PIXEL_CMYK_ALPHA = 4; }; class KisCmykColorSpaceFactory : public KisColorSpaceFactory @@ -114,13 +114,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_CMYK5_8; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_CMYK5_8; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigCmykData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisCmykColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; // Do not i18n -- this is from a data file + virtual TQString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; // Do not i18n -- this is from a data file }; #endif // KIS_STRATEGY_COLORSPACE_CMYK_H_ diff --git a/krita/colorspaces/gray_u16/gray_u16_plugin.cc b/krita/colorspaces/gray_u16/gray_u16_plugin.cc index da32295f..f48ab6d5 100644 --- a/krita/colorspaces/gray_u16/gray_u16_plugin.cc +++ b/krita/colorspaces/gray_u16/gray_u16_plugin.cc @@ -35,14 +35,14 @@ typedef KGenericFactory GRAYU16PluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_gray_u16_plugin, GRAYU16PluginFactory( "krita" ) ) -GRAYU16Plugin::GRAYU16Plugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +GRAYU16Plugin::GRAYU16Plugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(GRAYU16PluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); KisColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace(f, 0); KisColorSpaceFactory * csf = new KisGrayU16ColorSpaceFactory(); diff --git a/krita/colorspaces/gray_u16/gray_u16_plugin.h b/krita/colorspaces/gray_u16/gray_u16_plugin.h index 89b2e119..39ef6c2a 100644 --- a/krita/colorspaces/gray_u16/gray_u16_plugin.h +++ b/krita/colorspaces/gray_u16/gray_u16_plugin.h @@ -27,8 +27,9 @@ class GRAYU16Plugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - GRAYU16Plugin(QObject *parent, const char *name, const QStringList &); + GRAYU16Plugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~GRAYU16Plugin(); }; diff --git a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc index 410d2c9b..00f3440c 100644 --- a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc +++ b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc @@ -22,7 +22,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -35,22 +35,22 @@ #include "kis_colorspace_factory_registry.h" namespace { - const Q_INT32 MAX_CHANNEL_GRAY = 1; - const Q_INT32 MAX_CHANNEL_GRAYA = 2; + const TQ_INT32 MAX_CHANNEL_GRAY = 1; + const TQ_INT32 MAX_CHANNEL_GRAYA = 2; } -KisGrayU16ColorSpace::KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisU16BaseColorSpace(KisID("GRAYA16", i18n("Grayscale (16-bit integer/channel)")), TYPE_GRAYA_16, icSigGrayData, parent, p) +KisGrayU16ColorSpace::KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisU16BaseColorSpace(KisID("GRAYA16", i18n("Grayscale (16-bit integer/channel)")), TYPE_GRAYA_16, icSigGrayData, tqparent, p) { - m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), PIXEL_GRAY * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16))); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), PIXEL_GRAY * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); /* LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2); cmsHPROFILE hProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma); cmsFreeGamma(Gamma); */ - m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16); + m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16); init(); } @@ -59,16 +59,16 @@ KisGrayU16ColorSpace::~KisGrayU16ColorSpace() { } -void KisGrayU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisGrayU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalGray = 0, newAlpha = 0; + TQ_UINT32 totalGray = 0, newAlpha = 0; while (nColors--) { const Pixel *pixel = reinterpret_cast(*colors); - Q_UINT32 alpha = pixel->alpha; - Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights)); + TQ_UINT32 alpha = pixel->alpha; + TQ_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights)); totalGray += UINT16_MULT(pixel->gray, alphaTimesWeight); newAlpha += alphaTimesWeight; @@ -90,16 +90,16 @@ void KisGrayU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig dstPixel->gray = totalGray; } -void KisGrayU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, - Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisGrayU16ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, + TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalGray = 0, totalAlpha = 0; + TQ_INT32 totalGray = 0, totalAlpha = 0; while (nColors--) { const Pixel * pixel = reinterpret_cast( *colors ); - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { totalGray += pixel->gray * weight; @@ -112,76 +112,76 @@ void KisGrayU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValue Pixel * p = reinterpret_cast< Pixel *>( dst ); if (channelFlags & KisChannelInfo::FLAG_COLOR) { - p->gray = CLAMP( ( totalGray / factor) + offset, 0, Q_UINT16_MAX); + p->gray = CLAMP( ( totalGray / factor) + offset, 0, TQ_UINT16_MAX); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT16_MAX); + p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT16_MAX); } } -void KisGrayU16ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisGrayU16ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { Pixel * p = reinterpret_cast< Pixel *>( src ); - p->gray = Q_UINT16_MAX - p->gray; + p->gray = TQ_UINT16_MAX - p->gray; src += psize; } } -Q_UINT8 KisGrayU16ColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisGrayU16ColorSpace::intensity8(const TQ_UINT8 * src) const { const Pixel * p = reinterpret_cast( src ); return UINT16_TO_UINT8(p->gray); } -QValueVector KisGrayU16ColorSpace::channels() const +TQValueVector KisGrayU16ColorSpace::channels() const { return m_channels; } -Q_UINT32 KisGrayU16ColorSpace::nChannels() const +TQ_UINT32 KisGrayU16ColorSpace::nChannels() const { return MAX_CHANNEL_GRAYA; } -Q_UINT32 KisGrayU16ColorSpace::nColorChannels() const +TQ_UINT32 KisGrayU16ColorSpace::nColorChannels() const { return MAX_CHANNEL_GRAY; } -Q_UINT32 KisGrayU16ColorSpace::pixelSize() const +TQ_UINT32 KisGrayU16ColorSpace::pixelSize() const { - return MAX_CHANNEL_GRAYA * sizeof(Q_UINT16); + return MAX_CHANNEL_GRAYA * sizeof(TQ_UINT16); } -void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { while (rows > 0) { - const Q_UINT16 *src = reinterpret_cast(srcRowStart); - Q_UINT16 *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } if (srcAlpha != U16_OPACITY_TRANSPARENT) { @@ -191,16 +191,16 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr } if (srcAlpha == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_GRAYA * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_GRAYA * sizeof(TQ_UINT16)); } else { - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; - Q_UINT16 srcBlend; + TQ_UINT16 srcBlend; if (dstAlpha == U16_OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -211,7 +211,7 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr } if (srcBlend == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_GRAY * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_GRAY * sizeof(TQ_UINT16)); } else { dst[PIXEL_GRAY] = UINT16_BLEND(src[PIXEL_GRAY], dst[PIXEL_GRAY], srcBlend); } @@ -226,8 +226,8 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } @@ -235,25 +235,25 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr #define COMMON_COMPOSITE_OP_PROLOG() \ while (rows > 0) { \ \ - const Q_UINT16 *src = reinterpret_cast(srcRowStart); \ - Q_UINT16 *dst = reinterpret_cast(dstRowStart); \ - Q_INT32 columns = numColumns; \ - const Q_UINT8 *mask = maskRowStart; \ + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); \ + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); \ + TQ_INT32 columns = numColumns; \ + const TQ_UINT8 *tqmask = tqmaskRowStart; \ \ while (columns > 0) { \ \ - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ \ - srcAlpha = QMIN(srcAlpha, dstAlpha); \ + srcAlpha = TQMIN(srcAlpha, dstAlpha); \ \ - if (mask != 0) { \ - Q_UINT8 U8_mask = *mask; \ + if (tqmask != 0) { \ + TQ_UINT8 U8_tqmask = *tqmask; \ \ - if (U8_mask != OPACITY_OPAQUE) { \ - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \ + if (U8_tqmask != OPACITY_OPAQUE) { \ + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \ } \ - mask++; \ + tqmask++; \ } \ \ if (srcAlpha != U16_OPACITY_TRANSPARENT) { \ @@ -262,12 +262,12 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr srcAlpha = UINT16_MULT(srcAlpha, opacity); \ } \ \ - Q_UINT16 srcBlend; \ + TQ_UINT16 srcBlend; \ \ if (dstAlpha == U16_OPACITY_OPAQUE) { \ srcBlend = srcAlpha; \ } else { \ - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ dst[PIXEL_ALPHA] = newAlpha; \ \ if (newAlpha != 0) { \ @@ -288,18 +288,18 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; \ srcRowStart += srcRowStride; \ dstRowStart += dstRowStride; \ - if(maskRowStart) { \ - maskRowStart += maskRowStride; \ + if(tqmaskRowStart) { \ + tqmaskRowStart += tqmaskRowStride; \ } \ } -void KisGrayU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { - Q_UINT16 srcColor = src[PIXEL_GRAY]; - Q_UINT16 dstColor = dst[PIXEL_GRAY]; + TQ_UINT16 srcColor = src[PIXEL_GRAY]; + TQ_UINT16 dstColor = dst[PIXEL_GRAY]; srcColor = UINT16_MULT(srcColor, dstColor); @@ -310,19 +310,19 @@ void KisGrayU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRo COMMON_COMPOSITE_OP_EPILOG(); } -void KisGrayU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -331,19 +331,19 @@ void KisGrayU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisGrayU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MAX - UINT16_MULT(UINT16_MAX - dstColor, UINT16_MAX - srcColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -352,19 +352,19 @@ void KisGrayU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisGrayU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MULT(dstColor, dstColor + 2u * UINT16_MULT(srcColor, UINT16_MAX - dstColor)); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -373,19 +373,19 @@ void KisGrayU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRow COMMON_COMPOSITE_OP_EPILOG(); } -void KisGrayU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -394,20 +394,20 @@ void KisGrayU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisGrayU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX); srcColor = kClamp(UINT16_MAX - srcColor, 0u, UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -416,19 +416,19 @@ void KisGrayU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisGrayU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -437,19 +437,19 @@ void KisGrayU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisGrayU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisGrayU16ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -459,34 +459,34 @@ void KisGrayU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRow } -void KisGrayU16ColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT16 /*opacity*/) +void KisGrayU16ColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT16 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT16 srcAlpha = s->alpha; + TQ_UINT16 srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = UINT16_MULT(srcAlpha, d->alpha); } @@ -494,30 +494,30 @@ void KisGrayU16ColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisGrayU16ColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { - Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); + TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); switch (op.op()) { case COMPOSITE_UNDEF: // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -546,16 +546,16 @@ void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity); break; case COMPOSITE_COPY_RED: //compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -590,22 +590,22 @@ void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -614,24 +614,24 @@ void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: - abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest()); break; default: diff --git a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h index 2a206564..f5fd6bde 100644 --- a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h +++ b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h @@ -19,7 +19,7 @@ #ifndef KIS_STRATEGY_COLORSPACE_GRAY_U16_H_ #define KIS_STRATEGY_COLORSPACE_GRAY_U16_H_ -#include +#include #include @@ -32,8 +32,8 @@ class KRITATOOL_EXPORT KisGrayU16ColorSpace : public KisU16BaseColorSpace { public: struct Pixel { - Q_UINT16 gray; - Q_UINT16 alpha; + TQ_UINT16 gray; + TQ_UINT16 alpha; }; virtual bool willDegrade(ColorSpaceIndependence independence) @@ -46,52 +46,52 @@ public: public: - KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisGrayU16ColorSpace(); public: - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); private: friend class KisGrayU16ColorSpaceTester; - static const Q_UINT8 PIXEL_GRAY = 0; - static const Q_UINT8 PIXEL_ALPHA = 1; + static const TQ_UINT8 PIXEL_GRAY = 0; + static const TQ_UINT8 PIXEL_ALPHA = 1; }; class KisGrayU16ColorSpaceFactory : public KisColorSpaceFactory @@ -106,13 +106,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_GRAY_16; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_GRAY_16; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigGrayData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisGrayU16ColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisGrayU16ColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "gray built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "gray built-in - (lcms internal)"; }; }; #endif // KIS_STRATEGY_COLORSPACE_GRAY_U16_H_ diff --git a/krita/colorspaces/gray_u8/gray_plugin.cc b/krita/colorspaces/gray_u8/gray_plugin.cc index 50fe51cc..d8df4393 100644 --- a/krita/colorspaces/gray_u8/gray_plugin.cc +++ b/krita/colorspaces/gray_u8/gray_plugin.cc @@ -37,16 +37,16 @@ typedef KGenericFactory GrayPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritagrayplugin, GrayPluginFactory( "kritacore" ) ) -GrayPlugin::GrayPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +GrayPlugin::GrayPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(GrayPluginFactory::instance()); // This is not a gui plugin; only load it when the doc is created. - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); // .22 gamma grayscale or something like that. Taken from the lcms tutorial... LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2); diff --git a/krita/colorspaces/gray_u8/gray_plugin.h b/krita/colorspaces/gray_u8/gray_plugin.h index 9359fa72..f18bf77c 100644 --- a/krita/colorspaces/gray_u8/gray_plugin.h +++ b/krita/colorspaces/gray_u8/gray_plugin.h @@ -27,8 +27,9 @@ class GrayPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - GrayPlugin(QObject *parent, const char *name, const QStringList &); + GrayPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~GrayPlugin(); }; diff --git a/krita/colorspaces/gray_u8/kis_gray_colorspace.cc b/krita/colorspaces/gray_u8/kis_gray_colorspace.cc index f5e46416..dbd475df 100644 --- a/krita/colorspaces/gray_u8/kis_gray_colorspace.cc +++ b/krita/colorspaces/gray_u8/kis_gray_colorspace.cc @@ -24,7 +24,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -36,15 +36,15 @@ #include "kis_integer_maths.h" #define downscale(quantum) (quantum) //((unsigned char) ((quantum)/257UL)) -#define upscale(value) (value) // ((Q_UINT8) (257UL*(value))) +#define upscale(value) (value) // ((TQ_UINT8) (257UL*(value))) namespace { - const Q_INT32 MAX_CHANNEL_GRAYSCALE = 1; - const Q_INT32 MAX_CHANNEL_GRAYSCALEA = 2; + const TQ_INT32 MAX_CHANNEL_GRAYSCALE = 1; + const TQ_INT32 MAX_CHANNEL_GRAYSCALEA = 2; } -KisGrayColorSpace::KisGrayColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisU8BaseColorSpace(KisID("GRAYA", i18n("Grayscale")), TYPE_GRAYA_8, icSigGrayData, parent, p) +KisGrayColorSpace::KisGrayColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisU8BaseColorSpace(KisID("GRAYA", i18n("Grayscale")), TYPE_GRAYA_8, icSigGrayData, tqparent, p) { m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8)); m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 1, KisChannelInfo::ALPHA, KisChannelInfo::UINT8)); @@ -59,24 +59,24 @@ KisGrayColorSpace::~KisGrayColorSpace() { } -void KisGrayColorSpace::setPixel(Q_UINT8 *pixel, Q_UINT8 gray, Q_UINT8 alpha) const +void KisGrayColorSpace::setPixel(TQ_UINT8 *pixel, TQ_UINT8 gray, TQ_UINT8 alpha) const { pixel[PIXEL_GRAY] = gray; pixel[PIXEL_GRAY_ALPHA] = alpha; } -void KisGrayColorSpace::getPixel(const Q_UINT8 *pixel, Q_UINT8 *gray, Q_UINT8 *alpha) const +void KisGrayColorSpace::getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *gray, TQ_UINT8 *alpha) const { *gray = pixel[PIXEL_GRAY]; *alpha = pixel[PIXEL_GRAY_ALPHA]; } -void KisGrayColorSpace::getAlpha(const Q_UINT8 *pixel, Q_UINT8 *alpha) const +void KisGrayColorSpace::getAlpha(const TQ_UINT8 *pixel, TQ_UINT8 *alpha) const { *alpha = pixel[PIXEL_GRAY_ALPHA]; } -void KisGrayColorSpace::setAlpha(Q_UINT8 *pixels, Q_UINT8 alpha, Q_INT32 nPixels) const +void KisGrayColorSpace::setAlpha(TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const { while (nPixels > 0) { pixels[PIXEL_GRAY_ALPHA] = alpha; @@ -85,14 +85,14 @@ void KisGrayColorSpace::setAlpha(Q_UINT8 *pixels, Q_UINT8 alpha, Q_INT32 nPixels } } -void KisGrayColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisGrayColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalGray = 0, newAlpha = 0; + TQ_UINT32 totalGray = 0, newAlpha = 0; while (nColors--) { - Q_UINT32 alpha = (*colors)[PIXEL_GRAY_ALPHA]; - Q_UINT32 alphaTimesWeight = UINT8_MULT(alpha, *weights); + TQ_UINT32 alpha = (*colors)[PIXEL_GRAY_ALPHA]; + TQ_UINT32 alphaTimesWeight = UINT8_MULT(alpha, *weights); totalGray += (*colors)[PIXEL_GRAY] * alphaTimesWeight; newAlpha += alphaTimesWeight; @@ -111,18 +111,18 @@ void KisGrayColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights // Divide by 255. totalGray += 0x80; - Q_UINT32 dstGray = ((totalGray >> 8) + totalGray) >> 8; + TQ_UINT32 dstGray = ((totalGray >> 8) + totalGray) >> 8; Q_ASSERT(dstGray <= 255); dst[PIXEL_GRAY] = dstGray; } -void KisGrayColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisGrayColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalGray = 0, totalAlpha = 0; + TQ_INT32 totalGray = 0, totalAlpha = 0; while (nColors--) { - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { totalGray += (*colors)[PIXEL_GRAY] * weight; @@ -134,117 +134,117 @@ void KisGrayColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, if (channelFlags & KisChannelInfo::FLAG_COLOR) { - dst[PIXEL_GRAY] = CLAMP((totalGray / factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_GRAY] = CLAMP((totalGray / factor) + offset, 0, TQ_UINT8_MAX); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - dst[PIXEL_GRAY_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_GRAY_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX); } } -void KisGrayColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisGrayColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { - src[PIXEL_GRAY] = Q_UINT8_MAX - src[PIXEL_GRAY]; + src[PIXEL_GRAY] = TQ_UINT8_MAX - src[PIXEL_GRAY]; src += psize; } } -void KisGrayColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const +void KisGrayColorSpace::darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const { - Q_UINT32 pSize = pixelSize(); + TQ_UINT32 pSize = pixelSize(); while (nPixels--) { if (compensate) { - dst[PIXEL_GRAY] = (Q_INT8) QMIN(255,((src[PIXEL_GRAY] * shade) / (compensation * 255))); + dst[PIXEL_GRAY] = (TQ_INT8) TQMIN(255,((src[PIXEL_GRAY] * shade) / (compensation * 255))); } else { - dst[PIXEL_GRAY] = (Q_INT8) QMIN(255, (src[PIXEL_GRAY] * shade / 255)); + dst[PIXEL_GRAY] = (TQ_INT8) TQMIN(255, (src[PIXEL_GRAY] * shade / 255)); } dst += pSize; src += pSize; } } -Q_UINT8 KisGrayColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisGrayColorSpace::intensity8(const TQ_UINT8 * src) const { return src[PIXEL_GRAY]; } -QValueVector KisGrayColorSpace::channels() const +TQValueVector KisGrayColorSpace::channels() const { return m_channels; } -Q_UINT32 KisGrayColorSpace::nChannels() const +TQ_UINT32 KisGrayColorSpace::nChannels() const { return MAX_CHANNEL_GRAYSCALEA; } -Q_UINT32 KisGrayColorSpace::nColorChannels() const +TQ_UINT32 KisGrayColorSpace::nColorChannels() const { return MAX_CHANNEL_GRAYSCALE; } -Q_UINT32 KisGrayColorSpace::pixelSize() const +TQ_UINT32 KisGrayColorSpace::pixelSize() const { return MAX_CHANNEL_GRAYSCALEA; } -void KisGrayColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisGrayColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { switch (op.op()) { case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_CLEAR: { - Q_UINT8 *d; - Q_INT32 linesize; + TQ_UINT8 *d; + TQ_INT32 linesize; - linesize = MAX_CHANNEL_GRAYSCALEA*sizeof(Q_UINT8) * cols; + linesize = MAX_CHANNEL_GRAYSCALEA*sizeof(TQ_UINT8) * cols; d = dst; while (rows-- > 0) { memset(d, 0, linesize); @@ -253,7 +253,7 @@ void KisGrayColorSpace::bitBlt(Q_UINT8 *dst, } break; case COMPOSITE_ALPHA_DARKEN: - compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; default: @@ -278,25 +278,25 @@ KisCompositeOpList KisGrayColorSpace::userVisiblecompositeOps() const return list; } -void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -306,16 +306,16 @@ void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride } if (srcAlpha == OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_GRAYSCALEA * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_GRAYSCALEA * sizeof(TQ_UINT8)); } else { - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -326,7 +326,7 @@ void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride } if (srcBlend == OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(TQ_UINT8)); } else { dst[PIXEL_GRAY] = UINT8_BLEND(src[PIXEL_GRAY], dst[PIXEL_GRAY], srcBlend); } @@ -341,33 +341,33 @@ void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -376,12 +376,12 @@ void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -391,8 +391,8 @@ void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt } } - Q_UINT8 srcColor = src[PIXEL_GRAY]; - Q_UINT8 dstColor = dst[PIXEL_GRAY]; + TQ_UINT8 srcColor = src[PIXEL_GRAY]; + TQ_UINT8 dstColor = dst[PIXEL_GRAY]; srcColor = UINT8_MULT(srcColor, dstColor); @@ -407,33 +407,33 @@ void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -442,12 +442,12 @@ void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -459,12 +459,12 @@ void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT8_MAX + 1)) / (1 + srcColor), UINT8_MAX); + srcColor = TQMIN((dstColor * (UINT8_MAX + 1)) / (1 + srcColor), UINT8_MAX); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -478,33 +478,33 @@ void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -513,12 +513,12 @@ void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -530,12 +530,12 @@ void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = UINT8_MAX - UINT8_MULT(UINT8_MAX - dstColor, UINT8_MAX - srcColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -549,33 +549,33 @@ void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -584,12 +584,12 @@ void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -601,12 +601,12 @@ void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = UINT8_MULT(dstColor, dstColor + UINT8_MULT(2 * srcColor, UINT8_MAX - dstColor)); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -620,33 +620,33 @@ void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -655,12 +655,12 @@ void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -672,12 +672,12 @@ void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX); + srcColor = TQMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -691,33 +691,33 @@ void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -726,12 +726,12 @@ void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -743,13 +743,13 @@ void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = kMin(((UINT8_MAX - dstColor) * (UINT8_MAX + 1)) / (srcColor + 1), UINT8_MAX); srcColor = kClamp(UINT8_MAX - srcColor, 0u, UINT8_MAX); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -763,33 +763,33 @@ void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -798,12 +798,12 @@ void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -815,12 +815,12 @@ void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -834,33 +834,33 @@ void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -869,12 +869,12 @@ void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_GRAY_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -886,12 +886,12 @@ void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -905,73 +905,73 @@ void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisGrayColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 /*opacity*/) +void KisGrayColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 /*opacity*/) { - Q_INT32 i; - Q_UINT8 srcAlpha; + TQ_INT32 i; + TQ_UINT8 srcAlpha; while (rows-- > 0) { - const Q_UINT8 *s = src; - Q_UINT8 *d = dst; - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *s = src; + TQ_UINT8 *d = dst; + const TQ_UINT8 *tqmask = srcAlphaMask; for (i = cols; i > 0; i--, s+=MAX_CHANNEL_GRAYSCALEA, d+=MAX_CHANNEL_GRAYSCALEA) { srcAlpha = s[PIXEL_GRAY_ALPHA]; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *tqmask); + tqmask++; } d[PIXEL_GRAY_ALPHA] = UINT8_MULT(srcAlpha, d[PIXEL_GRAY_ALPHA]); } dst += dstRowSize; if(srcAlphaMask) - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; src += srcRowSize; } } -void KisGrayColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, - const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, - const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, - Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisGrayColorSpace::compositeAlphaDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, + const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA]; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (opacity != OPACITY_OPAQUE) { @@ -980,7 +980,7 @@ void KisGrayColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRo if (srcAlpha != OPACITY_TRANSPARENT && srcAlpha >= dstAlpha) { dst[PIXEL_GRAY_ALPHA] = srcAlpha; - memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(TQ_UINT8)); } columns--; @@ -991,7 +991,7 @@ void KisGrayColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRo rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } diff --git a/krita/colorspaces/gray_u8/kis_gray_colorspace.h b/krita/colorspaces/gray_u8/kis_gray_colorspace.h index d6784017..66da3c30 100644 --- a/krita/colorspaces/gray_u8/kis_gray_colorspace.h +++ b/krita/colorspaces/gray_u8/kis_gray_colorspace.h @@ -17,7 +17,7 @@ */ #ifndef KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_ #define KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_ -#include +#include #include @@ -29,7 +29,7 @@ class KRITACORE_EXPORT KisGrayColorSpace : public KisU8BaseColorSpace { public: - KisGrayColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisGrayColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisGrayColorSpace(); virtual bool willDegrade(ColorSpaceIndependence /*independence*/) @@ -39,55 +39,55 @@ public: public: - void setPixel(Q_UINT8 *pixel, Q_UINT8 gray, Q_UINT8 alpha) const; - void getPixel(const Q_UINT8 *pixel, Q_UINT8 *gray, Q_UINT8 *alpha) const; - - virtual void getAlpha(const Q_UINT8 *pixel, Q_UINT8 *alpha) const; - virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; - - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const; - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; - - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; - - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dststride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + void setPixel(TQ_UINT8 *pixel, TQ_UINT8 gray, TQ_UINT8 alpha) const; + void getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *gray, TQ_UINT8 *alpha) const; + + virtual void getAlpha(const TQ_UINT8 *pixel, TQ_UINT8 *alpha) const; + virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; + + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; + + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; + + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dststride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); KisCompositeOpList userVisiblecompositeOps() const; protected: - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeAlphaDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeAlphaDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); private: friend class KisGrayColorSpaceTester; - static const Q_UINT8 PIXEL_GRAY = 0; - static const Q_UINT8 PIXEL_GRAY_ALPHA = 1; + static const TQ_UINT8 PIXEL_GRAY = 0; + static const TQ_UINT8 PIXEL_GRAY_ALPHA = 1; }; class KisGrayColorSpaceFactory : public KisColorSpaceFactory @@ -102,13 +102,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_GRAYA_8; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_GRAYA_8; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigGrayData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisGrayColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisGrayColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "gray built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "gray built-in - (lcms internal)"; }; }; #endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_ diff --git a/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp b/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp index 3c91d6d1..0374c072 100644 --- a/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp +++ b/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp @@ -50,29 +50,29 @@ void KisGrayColorSpaceTester::testBasics() KisGrayColorSpace *cs = new KisGrayColorSpace(profile); - Q_UINT8 pixel[MAX_CHANNEL_GRAYSCALEA]; + TQ_UINT8 pixel[MAX_CHANNEL_GRAYSCALEA]; pixel[KisGrayColorSpace::PIXEL_GRAY] = 255; pixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 128; - QString valueText = cs->channelValueText(pixel, GRAY_CHANNEL); - CHECK(valueText, QString("255")); + TQString valueText = cs->channelValueText(pixel, GRAY_CHANNEL); + CHECK(valueText, TQString("255")); valueText = cs->channelValueText(pixel, ALPHA_CHANNEL); - CHECK(valueText, QString("128")); + CHECK(valueText, TQString("128")); valueText = cs->normalisedChannelValueText(pixel, GRAY_CHANNEL); - CHECK(valueText, QString().setNum(1.0)); + CHECK(valueText, TQString().setNum(1.0)); valueText = cs->normalisedChannelValueText(pixel, ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(128.0 / 255.0)); + CHECK(valueText, TQString().setNum(128.0 / 255.0)); cs->setPixel(pixel, 128, 192l); CHECK((uint)pixel[KisGrayColorSpace::PIXEL_GRAY], 128u); CHECK((uint)pixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 192u); - Q_UINT8 gray; - Q_UINT8 alpha; + TQ_UINT8 gray; + TQ_UINT8 alpha; cs->getPixel(pixel, &gray, &alpha); CHECK((uint)gray, 128u); @@ -86,9 +86,9 @@ void KisGrayColorSpaceTester::testMixColors() KisProfile *profile = new KisProfile(cmsCreate_sRGBProfile()); KisAbstractColorSpace * cs = new KisGrayColorSpace(profile); - Q_UINT8 pixel1[MAX_CHANNEL_GRAYSCALEA]; - Q_UINT8 pixel2[MAX_CHANNEL_GRAYSCALEA]; - Q_UINT8 outputPixel[MAX_CHANNEL_GRAYSCALEA]; + TQ_UINT8 pixel1[MAX_CHANNEL_GRAYSCALEA]; + TQ_UINT8 pixel2[MAX_CHANNEL_GRAYSCALEA]; + TQ_UINT8 outputPixel[MAX_CHANNEL_GRAYSCALEA]; pixel1[KisGrayColorSpace::PIXEL_GRAY] = 255; pixel1[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 255; @@ -96,8 +96,8 @@ void KisGrayColorSpaceTester::testMixColors() pixel2[KisGrayColorSpace::PIXEL_GRAY] = 0; pixel2[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 0; - const Q_UINT8 *pixelPtrs[2]; - Q_UINT8 weights[2]; + const TQ_UINT8 *pixelPtrs[2]; + TQ_UINT8 weights[2]; pixelPtrs[0] = pixel1; pixelPtrs[1] = pixel2; diff --git a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc index 0c8b91bf..57475a03 100644 --- a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc +++ b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc @@ -25,7 +25,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -34,8 +34,8 @@ #include "kis_color_conversions.h" namespace { - const Q_INT32 MAX_CHANNEL_LMS = 3; - const Q_INT32 MAX_CHANNEL_LMSA = 4; + const TQ_INT32 MAX_CHANNEL_LMS = 3; + const TQ_INT32 MAX_CHANNEL_LMSA = 4; } #include "kis_integer_maths.h" @@ -48,8 +48,8 @@ namespace { #define F32_LCMS_TYPE TYPE_BGRA_16 // disable the lcms handling by setting profile=0 -KisLmsF32ColorSpace::KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile */*p*/) : - KisF32BaseColorSpace(KisID("LMSAF32", i18n("LMS (32-bit float/channel)")), F32_LCMS_TYPE, icSig3colorData, parent, 0) +KisLmsF32ColorSpace::KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile */*p*/) : + KisF32BaseColorSpace(KisID("LMSAF32", i18n("LMS (32-bit float/channel)")), F32_LCMS_TYPE, icSig3colorData, tqparent, 0) { m_channels.push_back(new KisChannelInfo(i18n("Long"), i18n("L"), PIXEL_LONGWAVE * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float))); m_channels.push_back(new KisChannelInfo(i18n("Middle"), i18n("M"), PIXEL_MIDDLEWAVE * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float))); @@ -63,7 +63,7 @@ KisLmsF32ColorSpace::~KisLmsF32ColorSpace() { } -void KisLmsF32ColorSpace::setPixel(Q_UINT8 *dst, float longWave, float middleWave, float shortWave, float alpha) const +void KisLmsF32ColorSpace::setPixel(TQ_UINT8 *dst, float longWave, float middleWave, float shortWave, float alpha) const { Pixel *dstPixel = reinterpret_cast(dst); @@ -73,7 +73,7 @@ void KisLmsF32ColorSpace::setPixel(Q_UINT8 *dst, float longWave, float middleWav dstPixel->alpha = alpha; } -void KisLmsF32ColorSpace::getPixel(const Q_UINT8 *src, float *longWave, float *middleWave, float *shortWave, float *alpha) const +void KisLmsF32ColorSpace::getPixel(const TQ_UINT8 *src, float *longWave, float *middleWave, float *shortWave, float *alpha) const { const Pixel *srcPixel = reinterpret_cast(src); @@ -83,7 +83,7 @@ void KisLmsF32ColorSpace::getPixel(const Q_UINT8 *src, float *longWave, float *m *alpha = srcPixel->alpha; } -void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * /*profile*/) +void KisLmsF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * /*profile*/) { Pixel *dst = reinterpret_cast(dstU8); @@ -92,7 +92,7 @@ void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile dst->shortWave = computeShort(c.red(),c.green(),c.blue()); } -void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * /*profile*/) +void KisLmsF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * /*profile*/) { Pixel *dst = reinterpret_cast(dstU8); @@ -102,14 +102,14 @@ void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 * dst->alpha = UINT8_TO_FLOAT(opacity); } -void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * /*profile*/) +void KisLmsF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * /*profile*/) { const Pixel *src = reinterpret_cast(srcU8); c->setRgb(computeRed(src->longWave,src->middleWave,src->shortWave), computeGreen(src->longWave,src->middleWave,src->shortWave), computeBlue(src->longWave,src->middleWave,src->shortWave)); } -void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * /*profile*/) +void KisLmsF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * /*profile*/) { const Pixel *src = reinterpret_cast(srcU8); @@ -117,17 +117,17 @@ void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opa *opacity = FLOAT_TO_UINT8(src->alpha); } -Q_UINT8 KisLmsF32ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8) +TQ_UINT8 KisLmsF32ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8) { const Pixel *src1 = reinterpret_cast(src1U8); const Pixel *src2 = reinterpret_cast(src2U8); - return FLOAT_TO_UINT8(QMAX(QABS(src2->longWave - src1->longWave), - QMAX(QABS(src2->middleWave - src1->middleWave), - QABS(src2->shortWave - src1->shortWave)))); + return FLOAT_TO_UINT8(TQMAX(TQABS(src2->longWave - src1->longWave), + TQMAX(TQABS(src2->middleWave - src1->middleWave), + TQABS(src2->shortWave - src1->shortWave)))); } -void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisLmsF32ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { float totalLong = 0, totalMiddle = 0, totalShort = 0, newAlpha = 0; @@ -164,37 +164,37 @@ void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh dstPixel->shortWave = totalShort; } -QValueVector KisLmsF32ColorSpace::channels() const +TQValueVector KisLmsF32ColorSpace::channels() const { return m_channels; } -Q_UINT32 KisLmsF32ColorSpace::nChannels() const +TQ_UINT32 KisLmsF32ColorSpace::nChannels() const { return MAX_CHANNEL_LMSA; } -Q_UINT32 KisLmsF32ColorSpace::nColorChannels() const +TQ_UINT32 KisLmsF32ColorSpace::nColorChannels() const { return MAX_CHANNEL_LMS; } -Q_UINT32 KisLmsF32ColorSpace::pixelSize() const +TQ_UINT32 KisLmsF32ColorSpace::pixelSize() const { return MAX_CHANNEL_LMSA * sizeof(float); } -QImage KisLmsF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width, Q_INT32 height, +TQImage KisLmsF32ColorSpace::convertToTQImage(const TQ_UINT8 *dataU8, TQ_INT32 width, TQ_INT32 height, KisProfile * /*dstProfile*/, - Q_INT32 /*renderingIntent*/, float /*exposure*/) + TQ_INT32 /*renderingIntent*/, float /*exposure*/) { const float *data = reinterpret_cast(dataU8); - QImage img = QImage(width, height, 32, 0, QImage::LittleEndian); + TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian); img.setAlphaBuffer(true); - Q_INT32 i = 0; + TQ_INT32 i = 0; uchar *j = img.bits(); while ( i < width * height * MAX_CHANNEL_LMSA) { @@ -220,27 +220,27 @@ QImage KisLmsF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width } -void KisLmsF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisLmsF32ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { while (rows > 0) { const float *src = reinterpret_cast(srcRowStart); float *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { float srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha *= UINT8_TO_FLOAT(U8_mask); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha *= UINT8_TO_FLOAT(U8_tqmask); } - mask++; + tqmask++; } if (srcAlpha > F32_OPACITY_TRANSPARENT + EPSILON) { @@ -287,40 +287,40 @@ void KisLmsF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } -void KisLmsF32ColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, +void KisLmsF32ColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, float /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { float srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = srcAlpha * d->alpha; } @@ -328,13 +328,13 @@ void KisLmsF32ColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisLmsF32ColorSpace::compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, - const Q_UINT8 */*maskRowStart*/, Q_INT32 /*maskRowStride*/, Q_INT32 rows, Q_INT32 numColumns, float /*opacity*/) +void KisLmsF32ColorSpace::compositeCopy(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, + const TQ_UINT8 */*tqmaskRowStart*/, TQ_INT32 /*tqmaskRowStride*/, TQ_INT32 rows, TQ_INT32 numColumns, float /*opacity*/) { while (rows > 0) { memcpy(dstRowStart, srcRowStart, numColumns * sizeof(Pixel)); @@ -344,15 +344,15 @@ void KisLmsF32ColorSpace::compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri } } -void KisLmsF32ColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisLmsF32ColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { float opacity = UINT8_TO_FLOAT(U8_opacity); @@ -362,13 +362,13 @@ void KisLmsF32ColorSpace::bitBlt(Q_UINT8 *dst, // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; default: break; diff --git a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h index 8d5d27d9..82a1c2aa 100644 --- a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h +++ b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h @@ -21,7 +21,7 @@ #ifndef KIS_STRATEGY_COLORSPACE_LMS_F32_H_ #define KIS_STRATEGY_COLORSPACE_LMS_F32_H_ -#include +#include #include @@ -34,7 +34,7 @@ class KisColorSpaceFactoryRegistry; class KRITATOOL_EXPORT KisLmsF32ColorSpace : public KisF32BaseColorSpace { public: - KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisLmsF32ColorSpace(); virtual bool willDegrade(ColorSpaceIndependence independence) @@ -47,28 +47,28 @@ public: public: - void setPixel(Q_UINT8 *pixel, float longWave, float middleWave, float shortWave, float alpha) const; - void getPixel(const Q_UINT8 *pixel, float *longWave, float *middleWave, float *shortWave, float *alpha) const; + void setPixel(TQ_UINT8 *pixel, float longWave, float middleWave, float shortWave, float alpha) const; + void getPixel(const TQ_UINT8 *pixel, float *longWave, float *middleWave, float *shortWave, float *alpha) const; - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; + virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; virtual bool hasHighDynamicRange() const { return false; } - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent, + TQ_INT32 renderingIntent, float exposure = 0.0f); virtual KisCompositeOpList userVisiblecompositeOps() const; @@ -76,53 +76,53 @@ public: protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); private: - inline Q_UINT8 computeRed(float l, float m, float s) const + inline TQ_UINT8 computeRed(float l, float m, float s) const { return FLOAT_TO_UINT8(4.4679*l - 3.58738*m + 0.1193*s); } - inline Q_UINT8 computeGreen(float l, float m, float s) const + inline TQ_UINT8 computeGreen(float l, float m, float s) const { return FLOAT_TO_UINT8(-1.2186*l + 2.3809*m - 0.1624*s); } - inline Q_UINT8 computeBlue(float l, float m, float s) const + inline TQ_UINT8 computeBlue(float l, float m, float s) const { return FLOAT_TO_UINT8(0.0497*l - 0.2439*m + 1.2045*s); } - inline float computeLong(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b) const + inline float computeLong(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b) const { return 0.3811*UINT8_TO_FLOAT(r) + 0.5783*UINT8_TO_FLOAT(g) + 0.0402*UINT8_TO_FLOAT(b); } - inline float computeMiddle(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b) const + inline float computeMiddle(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b) const { return 0.1967*UINT8_TO_FLOAT(r) + 0.7244*UINT8_TO_FLOAT(g) + 0.0782*UINT8_TO_FLOAT(b); } - inline float computeShort(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b) const + inline float computeShort(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b) const { return 0.0241*UINT8_TO_FLOAT(r) + 0.1288*UINT8_TO_FLOAT(g) + 0.8444*UINT8_TO_FLOAT(b); } friend class KisLmsF32ColorSpaceTester; - static const Q_UINT8 PIXEL_LONGWAVE = 0; - static const Q_UINT8 PIXEL_MIDDLEWAVE = 1; - static const Q_UINT8 PIXEL_SHORTWAVE = 2; - static const Q_UINT8 PIXEL_ALPHA = 3; + static const TQ_UINT8 PIXEL_LONGWAVE = 0; + static const TQ_UINT8 PIXEL_MIDDLEWAVE = 1; + static const TQ_UINT8 PIXEL_SHORTWAVE = 2; + static const TQ_UINT8 PIXEL_ALPHA = 3; struct Pixel { float longWave; @@ -144,13 +144,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return 0; }; // FIXME: lcms do not support LMS cone space + virtual TQ_UINT32 colorSpaceType() { return 0; }; // FIXME: lcms do not support LMS cone space virtual icColorSpaceSignature colorSpaceSignature() { return icMaxEnumData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisLmsF32ColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisLmsF32ColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; }; #endif // KIS_STRATEGY_COLORSPACE_LMS_F32_H_ diff --git a/krita/colorspaces/lms_f32/lms_f32_plugin.cc b/krita/colorspaces/lms_f32/lms_f32_plugin.cc index 67df5e4f..b04dd86d 100644 --- a/krita/colorspaces/lms_f32/lms_f32_plugin.cc +++ b/krita/colorspaces/lms_f32/lms_f32_plugin.cc @@ -36,14 +36,14 @@ typedef KGenericFactory LMSF32PluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_lms_f32_plugin, LMSF32PluginFactory( "krita" ) ) -LMSF32Plugin::LMSF32Plugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +LMSF32Plugin::LMSF32Plugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(LMSF32PluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast(parent); + KisColorSpaceFactoryRegistry * f = dynamic_cast(tqparent); KisColorSpace * colorSpaceLMSF32 = new KisLmsF32ColorSpace(f, 0); diff --git a/krita/colorspaces/lms_f32/lms_f32_plugin.h b/krita/colorspaces/lms_f32/lms_f32_plugin.h index b8d02b18..7d9229a6 100644 --- a/krita/colorspaces/lms_f32/lms_f32_plugin.h +++ b/krita/colorspaces/lms_f32/lms_f32_plugin.h @@ -29,8 +29,9 @@ class LMSF32Plugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - LMSF32Plugin(QObject *parent, const char *name, const QStringList &); + LMSF32Plugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~LMSF32Plugin(); }; diff --git a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc index a1826b97..fb2df8c1 100644 --- a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc +++ b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc @@ -22,7 +22,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -32,8 +32,8 @@ #include "kis_color_conversions.h" namespace { - const Q_INT32 MAX_CHANNEL_RGB = 3; - const Q_INT32 MAX_CHANNEL_RGBA = 4; + const TQ_INT32 MAX_CHANNEL_RGB = 3; + const TQ_INT32 MAX_CHANNEL_RGBA = 4; } #include "kis_integer_maths.h" @@ -50,8 +50,8 @@ namespace { // FIXME: lcms doesn't support 16-bit float #define RGBAF16HALF_LCMS_TYPE TYPE_BGRA_16 -KisRgbF16HalfColorSpace::KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisF16HalfBaseColorSpace(KisID("RGBAF16HALF", i18n("RGB (16-bit float/channel)")), RGBAF16HALF_LCMS_TYPE, icSigRgbData, parent, p) +KisRgbF16HalfColorSpace::KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisF16HalfBaseColorSpace(KisID("RGBAF16HALF", i18n("RGB (16-bit float/channel)")), RGBAF16HALF_LCMS_TYPE, icSigRgbData, tqparent, p) { m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(half), KisChannelInfo::COLOR, KisChannelInfo::FLOAT16, sizeof(half))); m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(half), KisChannelInfo::COLOR, KisChannelInfo::FLOAT16, sizeof(half))); @@ -68,7 +68,7 @@ KisRgbF16HalfColorSpace::~KisRgbF16HalfColorSpace() { } -void KisRgbF16HalfColorSpace::setPixel(Q_UINT8 *dst, half red, half green, half blue, half alpha) const +void KisRgbF16HalfColorSpace::setPixel(TQ_UINT8 *dst, half red, half green, half blue, half alpha) const { Pixel *dstPixel = reinterpret_cast(dst); @@ -78,7 +78,7 @@ void KisRgbF16HalfColorSpace::setPixel(Q_UINT8 *dst, half red, half green, half dstPixel->alpha = alpha; } -void KisRgbF16HalfColorSpace::getPixel(const Q_UINT8 *src, half *red, half *green, half *blue, half *alpha) const +void KisRgbF16HalfColorSpace::getPixel(const TQ_UINT8 *src, half *red, half *green, half *blue, half *alpha) const { const Pixel *srcPixel = reinterpret_cast(src); @@ -88,7 +88,7 @@ void KisRgbF16HalfColorSpace::getPixel(const Q_UINT8 *src, half *red, half *gree *alpha = srcPixel->alpha; } -void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile *) +void KisRgbF16HalfColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile *) { Pixel *dst = reinterpret_cast(dstU8); @@ -97,7 +97,7 @@ void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisPro dst->blue = UINT8_TO_HALF(c.blue()); } -void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile *) +void KisRgbF16HalfColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile *) { Pixel *dst = reinterpret_cast(dstU8); @@ -107,14 +107,14 @@ void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UIN dst->alpha = UINT8_TO_HALF(opacity); } -void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile *) +void KisRgbF16HalfColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile *) { const Pixel *src = reinterpret_cast(srcU8); c->setRgb(HALF_TO_UINT8(src->red), HALF_TO_UINT8(src->green), HALF_TO_UINT8(src->blue)); } -void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile *) +void KisRgbF16HalfColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile *) { const Pixel *src = reinterpret_cast(srcU8); @@ -122,17 +122,17 @@ void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity = HALF_TO_UINT8(src->alpha); } -Q_UINT8 KisRgbF16HalfColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8) +TQ_UINT8 KisRgbF16HalfColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8) { const Pixel *src1 = reinterpret_cast(src1U8); const Pixel *src2 = reinterpret_cast(src2U8); - return HALF_TO_UINT8(QMAX(QABS(src2->red - src1->red), - QMAX(QABS(src2->green - src1->green), - QABS(src2->blue - src1->blue)))); + return HALF_TO_UINT8(TQMAX(TQABS(src2->red - src1->red), + TQMAX(TQABS(src2->green - src1->green), + TQABS(src2->blue - src1->blue)))); } -void KisRgbF16HalfColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisRgbF16HalfColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { half totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0; @@ -169,7 +169,7 @@ void KisRgbF16HalfColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *w dstPixel->blue = totalBlue; } -void KisRgbF16HalfColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisRgbF16HalfColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { half totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; @@ -202,9 +202,9 @@ void KisRgbF16HalfColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelV } -void KisRgbF16HalfColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisRgbF16HalfColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { @@ -218,7 +218,7 @@ void KisRgbF16HalfColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) } -Q_UINT8 KisRgbF16HalfColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisRgbF16HalfColorSpace::intensity8(const TQ_UINT8 * src) const { const Pixel * p = reinterpret_cast( src ); @@ -226,27 +226,27 @@ Q_UINT8 KisRgbF16HalfColorSpace::intensity8(const Q_UINT8 * src) const } -QValueVector KisRgbF16HalfColorSpace::channels() const +TQValueVector KisRgbF16HalfColorSpace::channels() const { return m_channels; } -Q_UINT32 KisRgbF16HalfColorSpace::nChannels() const +TQ_UINT32 KisRgbF16HalfColorSpace::nChannels() const { return MAX_CHANNEL_RGBA; } -Q_UINT32 KisRgbF16HalfColorSpace::nColorChannels() const +TQ_UINT32 KisRgbF16HalfColorSpace::nColorChannels() const { return MAX_CHANNEL_RGB; } -Q_UINT32 KisRgbF16HalfColorSpace::pixelSize() const +TQ_UINT32 KisRgbF16HalfColorSpace::pixelSize() const { return MAX_CHANNEL_RGBA * sizeof(half); } -Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma) +TQ_UINT8 convertToDisplay(float value, float exposureFactor, float gamma) { //value *= pow(2, exposure + 2.47393); value *= exposureFactor; @@ -262,17 +262,17 @@ Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma) return CLAMP(valueInt, 0, 255); } -QImage KisRgbF16HalfColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width, Q_INT32 height, +TQImage KisRgbF16HalfColorSpace::convertToTQImage(const TQ_UINT8 *dataU8, TQ_INT32 width, TQ_INT32 height, KisProfile * /*dstProfile*/, - Q_INT32 /*renderingIntent*/, float exposure) + TQ_INT32 /*renderingIntent*/, float exposure) { const half *data = reinterpret_cast(dataU8); - QImage img = QImage(width, height, 32, 0, QImage::LittleEndian); + TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian); img.setAlphaBuffer(true); - Q_INT32 i = 0; + TQ_INT32 i = 0; uchar *j = img.bits(); // XXX: For now assume gamma 2.2. @@ -299,27 +299,27 @@ QImage KisRgbF16HalfColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 w } -void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { while (rows > 0) { const half *src = reinterpret_cast(srcRowStart); half *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { half srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha *= UINT8_TO_HALF(U8_mask); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha *= UINT8_TO_HALF(U8_tqmask); } - mask++; + tqmask++; } if (srcAlpha > F16HALF_OPACITY_TRANSPARENT + EPSILON) { @@ -366,8 +366,8 @@ void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRow rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } @@ -377,23 +377,23 @@ void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRow \ const half *src = reinterpret_cast(srcRowStart); \ half *dst = reinterpret_cast(dstRowStart); \ - Q_INT32 columns = numColumns; \ - const Q_UINT8 *mask = maskRowStart; \ + TQ_INT32 columns = numColumns; \ + const TQ_UINT8 *tqmask = tqmaskRowStart; \ \ while (columns > 0) { \ \ half srcAlpha = src[PIXEL_ALPHA]; \ half dstAlpha = dst[PIXEL_ALPHA]; \ \ - srcAlpha = QMIN(srcAlpha, dstAlpha); \ + srcAlpha = TQMIN(srcAlpha, dstAlpha); \ \ - if (mask != 0) { \ - Q_UINT8 U8_mask = *mask; \ + if (tqmask != 0) { \ + TQ_UINT8 U8_tqmask = *tqmask; \ \ - if (U8_mask != OPACITY_OPAQUE) { \ - srcAlpha *= UINT8_TO_HALF(U8_mask); \ + if (U8_tqmask != OPACITY_OPAQUE) { \ + srcAlpha *= UINT8_TO_HALF(U8_tqmask); \ } \ - mask++; \ + tqmask++; \ } \ \ if (srcAlpha > F16HALF_OPACITY_TRANSPARENT + EPSILON) { \ @@ -428,12 +428,12 @@ void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRow rows--; \ srcRowStart += srcRowStride; \ dstRowStart += dstRowStride; \ - if(maskRowStart) { \ - maskRowStart += maskRowStride; \ + if(tqmaskRowStart) { \ + tqmaskRowStart += tqmaskRowStride; \ } \ } -void KisRgbF16HalfColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -463,7 +463,7 @@ void KisRgbF16HalfColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 ds COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -473,7 +473,7 @@ void KisRgbF16HalfColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstR half srcColor = src[channel]; half dstColor = dst[channel]; - srcColor = QMIN(dstColor / (srcColor + EPSILON), HALF_MAX); + srcColor = TQMIN(dstColor / (srcColor + EPSILON), HALF_MAX); half newColor = HALF_BLEND(srcColor, dstColor, srcBlend); @@ -484,7 +484,7 @@ void KisRgbF16HalfColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstR COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -505,7 +505,7 @@ void KisRgbF16HalfColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstR COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -526,7 +526,7 @@ void KisRgbF16HalfColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dst COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -536,7 +536,7 @@ void KisRgbF16HalfColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRo half srcColor = src[channel]; half dstColor = dst[channel]; - srcColor = QMIN(dstColor / (HALF_MAX + EPSILON - srcColor), HALF_MAX); + srcColor = TQMIN(dstColor / (HALF_MAX + EPSILON - srcColor), HALF_MAX); half newColor = HALF_BLEND(srcColor, dstColor, srcBlend); @@ -547,7 +547,7 @@ void KisRgbF16HalfColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRo COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -557,7 +557,7 @@ void KisRgbF16HalfColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRow half srcColor = src[channel]; half dstColor = dst[channel]; - srcColor = QMIN((HALF_MAX - dstColor) / (srcColor + EPSILON), HALF_MAX); + srcColor = TQMIN((HALF_MAX - dstColor) / (srcColor + EPSILON), HALF_MAX); srcColor = CLAMP(HALF_MAX - srcColor, 0, HALF_MAX); half newColor = HALF_BLEND(srcColor, dstColor, srcBlend); @@ -569,7 +569,7 @@ void KisRgbF16HalfColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRow COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -579,7 +579,7 @@ void KisRgbF16HalfColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstR half srcColor = src[channel]; half dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); half newColor = HALF_BLEND(srcColor, dstColor, srcBlend); @@ -590,7 +590,7 @@ void KisRgbF16HalfColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstR COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -600,7 +600,7 @@ void KisRgbF16HalfColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dst half srcColor = src[channel]; half dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); half newColor = HALF_BLEND(srcColor, dstColor, srcBlend); @@ -611,7 +611,7 @@ void KisRgbF16HalfColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dst COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -645,7 +645,7 @@ void KisRgbF16HalfColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -679,7 +679,7 @@ void KisRgbF16HalfColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -713,7 +713,7 @@ void KisRgbF16HalfColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRo COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity) +void KisRgbF16HalfColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -747,34 +747,34 @@ void KisRgbF16HalfColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRo COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF16HalfColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, +void KisRgbF16HalfColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, half /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { half srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = HALF_BLEND(srcAlpha, F16HALF_OPACITY_OPAQUE, UINT8_TO_HALF(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = HALF_BLEND(srcAlpha, F16HALF_OPACITY_OPAQUE, UINT8_TO_HALF(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = srcAlpha * d->alpha; } @@ -782,20 +782,20 @@ void KisRgbF16HalfColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisRgbF16HalfColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { half opacity = UINT8_TO_HALF(U8_opacity); @@ -805,7 +805,7 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst, // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -834,16 +834,16 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity); break; case COMPOSITE_COPY_RED: //compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -878,22 +878,22 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -902,24 +902,24 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity, F16HalfMult(), Uint8ToF16Half(), F16HalfOpacityTest()); break; diff --git a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h index c56d7f63..c4a356c0 100644 --- a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h +++ b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h @@ -19,7 +19,7 @@ #ifndef KIS_RGB_F16HALF_COLORSPACE_H_ #define KIS_RGB_F16HALF_COLORSPACE_H_ -#include +#include #include @@ -31,7 +31,7 @@ class KRITATOOL_EXPORT KisRgbF16HalfColorSpace : public KisF16HalfBaseColorSpace { public: - KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisRgbF16HalfColorSpace(); virtual bool willDegrade(ColorSpaceIndependence independence) @@ -44,29 +44,29 @@ public: public: - void setPixel(Q_UINT8 *pixel, half red, half green, half blue, half alpha) const; - void getPixel(const Q_UINT8 *pixel, half *red, half *green, half *blue, half *alpha) const; + void setPixel(TQ_UINT8 *pixel, half red, half green, half blue, half alpha) const; + void getPixel(const TQ_UINT8 *pixel, half *red, half *green, half *blue, half *alpha) const; - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; + virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent, + TQ_INT32 renderingIntent, float exposure = 0.0f); virtual KisCompositeOpList userVisiblecompositeOps() const; @@ -74,39 +74,39 @@ public: protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity); private: friend class KisRgbF16HalfColorSpaceTester; - static const Q_UINT8 PIXEL_BLUE = 0; - static const Q_UINT8 PIXEL_GREEN = 1; - static const Q_UINT8 PIXEL_RED = 2; - static const Q_UINT8 PIXEL_ALPHA = 3; + static const TQ_UINT8 PIXEL_BLUE = 0; + static const TQ_UINT8 PIXEL_GREEN = 1; + static const TQ_UINT8 PIXEL_RED = 2; + static const TQ_UINT8 PIXEL_ALPHA = 3; struct Pixel { half blue; @@ -131,13 +131,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return RGBAF16HALF_LCMS_TYPE; }; + virtual TQ_UINT32 colorSpaceType() { return RGBAF16HALF_LCMS_TYPE; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisRgbF16HalfColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisRgbF16HalfColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; }; #endif // KIS_RGB_F16HALF_COLORSPACE_H_ diff --git a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc index 0674cde7..52c42c10 100644 --- a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc +++ b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc @@ -35,14 +35,14 @@ typedef KGenericFactory RGBF16HalfPluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_rgb_f16half_plugin, RGBF16HalfPluginFactory( "krita" ) ) -RGBF16HalfPlugin::RGBF16HalfPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +RGBF16HalfPlugin::RGBF16HalfPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(RGBF16HalfPluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); KisColorSpace * colorSpaceRGBF16Half = new KisRgbF16HalfColorSpace(f, 0); KisColorSpaceFactory *csf = new KisRgbF16HalfColorSpaceFactory(); diff --git a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h index 00c361a1..a970247c 100644 --- a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h +++ b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h @@ -28,8 +28,9 @@ class RGBF16HalfPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - RGBF16HalfPlugin(QObject *parent, const char *name, const QStringList &); + RGBF16HalfPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~RGBF16HalfPlugin(); }; diff --git a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc index 20f417d9..59eb8e5f 100644 --- a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc +++ b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc @@ -58,7 +58,7 @@ void KisRgbF16HalfColorSpaceTester::allTests() KisFactory *factory = new KisFactory(); testBasics(); - testToQImage(); + testToTQImage(); testCompositeOps(); testMixColors(); @@ -79,7 +79,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS); CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE); - QValueVector channels = cs->channels(); + TQValueVector channels = cs->channels(); // Red CHECK(channels[0]->pos(), PIXEL_RED * CHANNEL_SIZE); @@ -114,39 +114,39 @@ void KisRgbF16HalfColorSpaceTester::testBasics() half pixel[NUM_CHANNELS]; - cs->fromQColor(qRgb(255, 255, 255), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ONE); - cs->fromQColor(qRgb(0, 0, 0), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(0, 0, 0), reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ZERO); CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ZERO); CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ZERO); - cs->fromQColor(qRgb(128, 64, 192), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(128, 64, 192), reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], UINT8_TO_HALF(128)); CHECK(pixel[PIXEL_GREEN], UINT8_TO_HALF(64)); CHECK(pixel[PIXEL_BLUE], UINT8_TO_HALF(192)); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_ALPHA], CHANNEL_VALUE_ONE); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_ALPHA], F16HALF_OPACITY_TRANSPARENT); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE); CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE); @@ -157,9 +157,9 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = CHANNEL_VALUE_ONE; pixel[PIXEL_BLUE] = CHANNEL_VALUE_ONE; - QColor c; + TQColor c; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -169,7 +169,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = CHANNEL_VALUE_ZERO; pixel[PIXEL_BLUE] = CHANNEL_VALUE_ZERO; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), 0); CHECK(c.green(), 0); @@ -179,7 +179,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = CHANNEL_VALUE_ONE / 2; pixel[PIXEL_BLUE] = (3 * CHANNEL_VALUE_ONE) / 4; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4)); CHECK(c.green(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2)); @@ -190,9 +190,9 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = CHANNEL_VALUE_ONE; pixel[PIXEL_ALPHA] = CHANNEL_VALUE_ONE; - Q_UINT8 opacity; + TQ_UINT8 opacity; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -201,7 +201,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_ALPHA] = F16HALF_OPACITY_OPAQUE; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -213,7 +213,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = CHANNEL_VALUE_ZERO; pixel[PIXEL_ALPHA] = F16HALF_OPACITY_TRANSPARENT; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 0); CHECK(c.green(), 0); @@ -225,7 +225,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = (3 * CHANNEL_VALUE_ONE) / 4; pixel[PIXEL_ALPHA] = CHANNEL_VALUE_ONE / 2; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4)); CHECK(c.green(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2)); @@ -241,7 +241,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() {CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ONE} }; - cs->setAlpha(reinterpret_cast(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS); + cs->setAlpha(reinterpret_cast(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS); CHECK(pixels[0].red, CHANNEL_VALUE_ONE); CHECK(pixels[0].green, CHANNEL_VALUE_ONE); @@ -268,31 +268,31 @@ void KisRgbF16HalfColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = CHANNEL_VALUE_ONE / 4; pixel[PIXEL_ALPHA] = CHANNEL_VALUE_ZERO; - QString valueText = cs->channelValueText(reinterpret_cast(pixel), RED_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE)); + TQString valueText = cs->channelValueText(reinterpret_cast(pixel), RED_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE)); - valueText = cs->channelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 2)); + valueText = cs->channelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 2)); - valueText = cs->channelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 4)); + valueText = cs->channelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 4)); - valueText = cs->channelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ZERO)); + valueText = cs->channelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ZERO)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), RED_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), RED_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 2)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 2)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 4)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 4)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(CHANNEL_VALUE_ZERO)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); + CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ZERO)); - cs->setPixel(reinterpret_cast(pixel), 0.128, 0.192, 0.64, 0.99); + cs->setPixel(reinterpret_cast(pixel), 0.128, 0.192, 0.64, 0.99); CHECK(pixel[PIXEL_RED], (half)0.128f); CHECK(pixel[PIXEL_GREEN], (half)0.192f); CHECK(pixel[PIXEL_BLUE], (half)0.64f); @@ -303,7 +303,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics() half blue; half alpha; - cs->getPixel(reinterpret_cast(pixel), &red, &green, &blue, &alpha); + cs->getPixel(reinterpret_cast(pixel), &red, &green, &blue, &alpha); CHECK(red, (half)0.128f); CHECK(green, (half)0.192f); CHECK(blue, (half)0.64f); @@ -347,16 +347,16 @@ void KisRgbF16HalfColorSpaceTester::testMixColors() pixel2[PIXEL_BLUE] = 0; pixel2[PIXEL_ALPHA] = 0; - const Q_UINT8 *pixelPtrs[2]; - Q_UINT8 weights[2]; + const TQ_UINT8 *pixelPtrs[2]; + TQ_UINT8 weights[2]; - pixelPtrs[0] = reinterpret_cast(pixel1); - pixelPtrs[1] = reinterpret_cast(pixel2); + pixelPtrs[0] = reinterpret_cast(pixel1); + pixelPtrs[1] = reinterpret_cast(pixel2); weights[0] = 255; weights[1] = 0; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], CHANNEL_VALUE_ONE); CHECK(outputPixel[PIXEL_GREEN], CHANNEL_VALUE_ONE); @@ -366,7 +366,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors() weights[0] = 0; weights[1] = 255; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], (half)0.0f); CHECK(outputPixel[PIXEL_GREEN], (half)0.0f); @@ -376,7 +376,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors() weights[0] = 128; weights[1] = 127; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], CHANNEL_VALUE_ONE); CHECK(outputPixel[PIXEL_GREEN], CHANNEL_VALUE_ONE); @@ -393,7 +393,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors() pixel2[PIXEL_BLUE] = 2000; pixel2[PIXEL_ALPHA] = CHANNEL_VALUE_ONE; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK_TOLERANCE(outputPixel[PIXEL_RED], (128 * 20000 + 127 * 10000) / 255, 5); CHECK_TOLERANCE(outputPixel[PIXEL_GREEN], (128 * 10000 + 127 * 20000) / 255, 5); @@ -413,7 +413,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors() weights[0] = 89; weights[1] = 166; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], CHANNEL_VALUE_ONE); CHECK(outputPixel[PIXEL_GREEN], CHANNEL_VALUE_ONE); @@ -424,7 +424,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors() #define PIXELS_WIDTH 2 #define PIXELS_HEIGHT 2 -void KisRgbF16HalfColorSpaceTester::testToQImage() +void KisRgbF16HalfColorSpaceTester::testToTQImage() { KisProfile *profile = new KisProfile(cmsCreate_sRGBProfile()); @@ -437,37 +437,37 @@ void KisRgbF16HalfColorSpaceTester::testToQImage() {CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ONE} }; - QImage image = cs->convertToQImage(reinterpret_cast(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0); + TQImage image = cs->convertToTQImage(reinterpret_cast(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0); - QRgb c = image.pixel(0, 0); + TQRgb c = image.pixel(0, 0); // Exposure comes into play here. /* - CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); - CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); - CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); - CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4)); + CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); + CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); + CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); + CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4)); c = image.pixel(1, 0); - CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 3)); - CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2)); - CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4)); - CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2)); + CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 3)); + CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2)); + CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4)); + CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2)); c = image.pixel(0, 1); - CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); - CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); - CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); - CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); + CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); + CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); + CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); + CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); c = image.pixel(1, 1); - CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); - CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); - CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); - CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); + CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); + CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); + CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO)); + CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE)); */ } @@ -501,22 +501,22 @@ void KisRgbF16HalfColorSpaceTester::testCompositeOps() dstPixel = srcPixel; - cs->compositeDivide(reinterpret_cast(&dstPixel), 1, reinterpret_cast(&srcPixel), + cs->compositeDivide(reinterpret_cast(&dstPixel), 1, reinterpret_cast(&srcPixel), 1, 0, 0, 1, 1, F16HALF_OPACITY_OPAQUE); /* - CHECK(dstPixel.red, (Q_UINT16)UINT8_TO_UINT16(253)); - CHECK(dstPixel.green, (Q_UINT16)UINT8_TO_UINT16(254)); - CHECK(dstPixel.blue, (Q_UINT16)UINT8_TO_UINT16(254)); + CHECK(dstPixel.red, (TQ_UINT16)UINT8_TO_UINT16(253)); + CHECK(dstPixel.green, (TQ_UINT16)UINT8_TO_UINT16(254)); + CHECK(dstPixel.blue, (TQ_UINT16)UINT8_TO_UINT16(254)); CHECK(dstPixel.alpha, KisRgbF16HalfColorSpace::F16HALF_OPACITY_OPAQUE); - Q_UINT16 srcColor = 43690; - Q_UINT16 dstColor = 43690; + TQ_UINT16 srcColor = 43690; + TQ_UINT16 dstColor = 43690; - srcColor = QMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u); + srcColor = TQMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u); CHECK((int)srcColor, 65534); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u); CHECK((int)newColor, 65534); */ @@ -536,8 +536,8 @@ void KisRgbF16HalfColorSpaceTester::testCompositeOps() {CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ONE} }; - cs->compositeOver(reinterpret_cast(dstPixels), DST_ROW_STRIDE, reinterpret_cast(srcPixels), - SRC_ROW_STRIDE, mask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity); + cs->compositeOver(reinterpret_cast(dstPixels), DST_ROW_STRIDE, reinterpret_cast(srcPixels), + SRC_ROW_STRIDE, tqmask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity); */ delete cs; diff --git a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h index db740fa4..6547e35b 100644 --- a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h +++ b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h @@ -26,11 +26,11 @@ #define CHECK_TOLERANCE( x, y, tolerance ) \ if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \ { \ - success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \ + success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #x); \ } \ else \ { \ - failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \ + failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + TQString::number(x)); \ } \ class KisRgbF16HalfColorSpaceTester : public KUnitTest::Tester @@ -39,7 +39,7 @@ public: void allTests(); void testBasics(); void testMixColors(); - void testToQImage(); + void testToTQImage(); void testCompositeOps(); }; diff --git a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc index 7db6bd9e..98e0b28b 100644 --- a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc +++ b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc @@ -24,7 +24,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -33,8 +33,8 @@ #include "kis_color_conversions.h" namespace { - const Q_INT32 MAX_CHANNEL_RGB = 3; - const Q_INT32 MAX_CHANNEL_RGBA = 4; + const TQ_INT32 MAX_CHANNEL_RGB = 3; + const TQ_INT32 MAX_CHANNEL_RGBA = 4; } #include "kis_integer_maths.h" @@ -52,8 +52,8 @@ namespace { #define F32_LCMS_TYPE TYPE_BGRA_16 // disable the lcms handling by setting profile=0 -KisRgbF32ColorSpace::KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile */*p*/) : - KisF32BaseColorSpace(KisID("RGBAF32", i18n("RGB (32-bit float/channel)")), F32_LCMS_TYPE, icSigRgbData, parent, 0) +KisRgbF32ColorSpace::KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile */*p*/) : + KisF32BaseColorSpace(KisID("RGBAF32", i18n("RGB (32-bit float/channel)")), F32_LCMS_TYPE, icSigRgbData, tqparent, 0) { m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float))); m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float))); @@ -67,7 +67,7 @@ KisRgbF32ColorSpace::~KisRgbF32ColorSpace() { } -void KisRgbF32ColorSpace::setPixel(Q_UINT8 *dst, float red, float green, float blue, float alpha) const +void KisRgbF32ColorSpace::setPixel(TQ_UINT8 *dst, float red, float green, float blue, float alpha) const { Pixel *dstPixel = reinterpret_cast(dst); @@ -77,7 +77,7 @@ void KisRgbF32ColorSpace::setPixel(Q_UINT8 *dst, float red, float green, float b dstPixel->alpha = alpha; } -void KisRgbF32ColorSpace::getPixel(const Q_UINT8 *src, float *red, float *green, float *blue, float *alpha) const +void KisRgbF32ColorSpace::getPixel(const TQ_UINT8 *src, float *red, float *green, float *blue, float *alpha) const { const Pixel *srcPixel = reinterpret_cast(src); @@ -87,7 +87,7 @@ void KisRgbF32ColorSpace::getPixel(const Q_UINT8 *src, float *red, float *green, *alpha = srcPixel->alpha; } -void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * /*profile*/) +void KisRgbF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * /*profile*/) { Pixel *dst = reinterpret_cast(dstU8); @@ -96,7 +96,7 @@ void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile dst->blue = UINT8_TO_FLOAT(c.blue()); } -void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * /*profile*/) +void KisRgbF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * /*profile*/) { Pixel *dst = reinterpret_cast(dstU8); @@ -106,14 +106,14 @@ void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 * dst->alpha = UINT8_TO_FLOAT(opacity); } -void KisRgbF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * /*profile*/) +void KisRgbF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * /*profile*/) { const Pixel *src = reinterpret_cast(srcU8); c->setRgb(FLOAT_TO_UINT8(src->red), FLOAT_TO_UINT8(src->green), FLOAT_TO_UINT8(src->blue)); } -void KisRgbF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * /*profile*/) +void KisRgbF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * /*profile*/) { const Pixel *src = reinterpret_cast(srcU8); @@ -121,17 +121,17 @@ void KisRgbF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opa *opacity = FLOAT_TO_UINT8(src->alpha); } -Q_UINT8 KisRgbF32ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8) +TQ_UINT8 KisRgbF32ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8) { const Pixel *src1 = reinterpret_cast(src1U8); const Pixel *src2 = reinterpret_cast(src2U8); - return FLOAT_TO_UINT8(QMAX(QABS(src2->red - src1->red), - QMAX(QABS(src2->green - src1->green), - QABS(src2->blue - src1->blue)))); + return FLOAT_TO_UINT8(TQMAX(TQABS(src2->red - src1->red), + TQMAX(TQABS(src2->green - src1->green), + TQABS(src2->blue - src1->blue)))); } -void KisRgbF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisRgbF32ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { float totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0; @@ -168,7 +168,7 @@ void KisRgbF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh dstPixel->blue = totalBlue; } -void KisRgbF32ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisRgbF32ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { float totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; @@ -201,9 +201,9 @@ void KisRgbF32ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValue } -void KisRgbF32ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisRgbF32ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { @@ -216,7 +216,7 @@ void KisRgbF32ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) } -Q_UINT8 KisRgbF32ColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisRgbF32ColorSpace::intensity8(const TQ_UINT8 * src) const { const Pixel * p = reinterpret_cast( src ); @@ -225,27 +225,27 @@ Q_UINT8 KisRgbF32ColorSpace::intensity8(const Q_UINT8 * src) const -QValueVector KisRgbF32ColorSpace::channels() const +TQValueVector KisRgbF32ColorSpace::channels() const { return m_channels; } -Q_UINT32 KisRgbF32ColorSpace::nChannels() const +TQ_UINT32 KisRgbF32ColorSpace::nChannels() const { return MAX_CHANNEL_RGBA; } -Q_UINT32 KisRgbF32ColorSpace::nColorChannels() const +TQ_UINT32 KisRgbF32ColorSpace::nColorChannels() const { return MAX_CHANNEL_RGB; } -Q_UINT32 KisRgbF32ColorSpace::pixelSize() const +TQ_UINT32 KisRgbF32ColorSpace::pixelSize() const { return MAX_CHANNEL_RGBA * sizeof(float); } -Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma) +TQ_UINT8 convertToDisplay(float value, float exposureFactor, float gamma) { //value *= pow(2, exposure + 2.47393); value *= exposureFactor; @@ -261,17 +261,17 @@ Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma) return CLAMP(valueInt, 0, 255); } -QImage KisRgbF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width, Q_INT32 height, +TQImage KisRgbF32ColorSpace::convertToTQImage(const TQ_UINT8 *dataU8, TQ_INT32 width, TQ_INT32 height, KisProfile * /*dstProfile*/, - Q_INT32 /*renderingIntent*/, float exposure) + TQ_INT32 /*renderingIntent*/, float exposure) { const float *data = reinterpret_cast(dataU8); - QImage img = QImage(width, height, 32, 0, QImage::LittleEndian); + TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian); img.setAlphaBuffer(true); - Q_INT32 i = 0; + TQ_INT32 i = 0; uchar *j = img.bits(); // XXX: For now assume gamma 2.2. @@ -298,27 +298,27 @@ QImage KisRgbF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width } -void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { while (rows > 0) { const float *src = reinterpret_cast(srcRowStart); float *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { float srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha *= UINT8_TO_FLOAT(U8_mask); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha *= UINT8_TO_FLOAT(U8_tqmask); } - mask++; + tqmask++; } if (srcAlpha > F32_OPACITY_TRANSPARENT + EPSILON) { @@ -365,8 +365,8 @@ void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } @@ -376,23 +376,23 @@ void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri \ const float *src = reinterpret_cast(srcRowStart); \ float *dst = reinterpret_cast(dstRowStart); \ - Q_INT32 columns = numColumns; \ - const Q_UINT8 *mask = maskRowStart; \ + TQ_INT32 columns = numColumns; \ + const TQ_UINT8 *tqmask = tqmaskRowStart; \ \ while (columns > 0) { \ \ float srcAlpha = src[PIXEL_ALPHA]; \ float dstAlpha = dst[PIXEL_ALPHA]; \ \ - srcAlpha = QMIN(srcAlpha, dstAlpha); \ + srcAlpha = TQMIN(srcAlpha, dstAlpha); \ \ - if (mask != 0) { \ - Q_UINT8 U8_mask = *mask; \ + if (tqmask != 0) { \ + TQ_UINT8 U8_tqmask = *tqmask; \ \ - if (U8_mask != OPACITY_OPAQUE) { \ - srcAlpha *= UINT8_TO_FLOAT(U8_mask); \ + if (U8_tqmask != OPACITY_OPAQUE) { \ + srcAlpha *= UINT8_TO_FLOAT(U8_tqmask); \ } \ - mask++; \ + tqmask++; \ } \ \ if (srcAlpha > F32_OPACITY_TRANSPARENT + EPSILON) { \ @@ -427,12 +427,12 @@ void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; \ srcRowStart += srcRowStride; \ dstRowStart += dstRowStride; \ - if(maskRowStart) { \ - maskRowStart += maskRowStride; \ + if(tqmaskRowStart) { \ + tqmaskRowStart += tqmaskRowStride; \ } \ } -void KisRgbF32ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -462,7 +462,7 @@ void KisRgbF32ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRow COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -472,7 +472,7 @@ void KisRgbF32ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt float srcColor = src[channel]; float dstColor = dst[channel]; - srcColor = QMIN(dstColor / (srcColor + EPSILON), FLOAT_MAX); + srcColor = TQMIN(dstColor / (srcColor + EPSILON), FLOAT_MAX); float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend); @@ -483,7 +483,7 @@ void KisRgbF32ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -504,7 +504,7 @@ void KisRgbF32ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -525,7 +525,7 @@ void KisRgbF32ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -535,7 +535,7 @@ void KisRgbF32ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr float srcColor = src[channel]; float dstColor = dst[channel]; - srcColor = QMIN(dstColor / (FLOAT_MAX + EPSILON - srcColor), FLOAT_MAX); + srcColor = TQMIN(dstColor / (FLOAT_MAX + EPSILON - srcColor), FLOAT_MAX); float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend); @@ -546,7 +546,7 @@ void KisRgbF32ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -556,7 +556,7 @@ void KisRgbF32ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri float srcColor = src[channel]; float dstColor = dst[channel]; - srcColor = QMIN((FLOAT_MAX - dstColor) / (srcColor + EPSILON), FLOAT_MAX); + srcColor = TQMIN((FLOAT_MAX - dstColor) / (srcColor + EPSILON), FLOAT_MAX); srcColor = CLAMP(FLOAT_MAX - srcColor, 0, FLOAT_MAX); float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend); @@ -568,7 +568,7 @@ void KisRgbF32ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -578,7 +578,7 @@ void KisRgbF32ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt float srcColor = src[channel]; float dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend); @@ -589,7 +589,7 @@ void KisRgbF32ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -599,7 +599,7 @@ void KisRgbF32ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowS float srcColor = src[channel]; float dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend); @@ -610,7 +610,7 @@ void KisRgbF32ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -644,7 +644,7 @@ void KisRgbF32ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -678,7 +678,7 @@ void KisRgbF32ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -712,7 +712,7 @@ void KisRgbF32ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity) +void KisRgbF32ColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -746,34 +746,34 @@ void KisRgbF32ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbF32ColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, +void KisRgbF32ColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, float /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { float srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = srcAlpha * d->alpha; } @@ -781,20 +781,20 @@ void KisRgbF32ColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisRgbF32ColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { float opacity = UINT8_TO_FLOAT(U8_opacity); @@ -804,7 +804,7 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst, // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -833,16 +833,16 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity); break; case COMPOSITE_COPY_RED: //compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -877,22 +877,22 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -901,24 +901,24 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity, F32Mult(), Uint8ToF32(), F32OpacityTest()); default: break; diff --git a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h index a1681be5..615025cd 100644 --- a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h +++ b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h @@ -20,7 +20,7 @@ #ifndef KIS_STRATEGY_COLORSPACE_RGB_F32_H_ #define KIS_STRATEGY_COLORSPACE_RGB_F32_H_ -#include +#include #include @@ -33,7 +33,7 @@ class KisColorSpaceFactoryRegistry; class KRITATOOL_EXPORT KisRgbF32ColorSpace : public KisF32BaseColorSpace { public: - KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisRgbF32ColorSpace(); virtual bool willDegrade(ColorSpaceIndependence independence) @@ -47,30 +47,30 @@ public: public: - void setPixel(Q_UINT8 *pixel, float red, float green, float blue, float alpha) const; - void getPixel(const Q_UINT8 *pixel, float *red, float *green, float *blue, float *alpha) const; + void setPixel(TQ_UINT8 *pixel, float red, float green, float blue, float alpha) const; + void getPixel(const TQ_UINT8 *pixel, float *red, float *green, float *blue, float *alpha) const; - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; + virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent, + TQ_INT32 renderingIntent, float exposure = 0.0f); virtual KisCompositeOpList userVisiblecompositeOps() const; @@ -78,39 +78,39 @@ public: protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity); private: friend class KisRgbF32ColorSpaceTester; - static const Q_UINT8 PIXEL_BLUE = 0; - static const Q_UINT8 PIXEL_GREEN = 1; - static const Q_UINT8 PIXEL_RED = 2; - static const Q_UINT8 PIXEL_ALPHA = 3; + static const TQ_UINT8 PIXEL_BLUE = 0; + static const TQ_UINT8 PIXEL_GREEN = 1; + static const TQ_UINT8 PIXEL_RED = 2; + static const TQ_UINT8 PIXEL_ALPHA = 3; struct Pixel { float blue; @@ -126,7 +126,7 @@ private: } }; struct Uint8ToF32 { - inline float operator()(const Q_UINT8 src) const { + inline float operator()(const TQ_UINT8 src) const { return UINT8_TO_FLOAT(src); } }; @@ -152,13 +152,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return F32_LCMS_TYPE; }; + virtual TQ_UINT32 colorSpaceType() { return F32_LCMS_TYPE; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisRgbF32ColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisRgbF32ColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; }; #endif // KIS_STRATEGY_COLORSPACE_RGB_F32_H_ diff --git a/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc b/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc index 01dc514a..b8dad3da 100644 --- a/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc +++ b/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc @@ -35,14 +35,14 @@ typedef KGenericFactory RGBF32PluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_rgb_f32_plugin, RGBF32PluginFactory( "krita" ) ) -RGBF32Plugin::RGBF32Plugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +RGBF32Plugin::RGBF32Plugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(RGBF32PluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast(parent); + KisColorSpaceFactoryRegistry * f = dynamic_cast(tqparent); KisColorSpace * colorSpaceRGBF32 = new KisRgbF32ColorSpace(f, 0); diff --git a/krita/colorspaces/rgb_f32/rgb_f32_plugin.h b/krita/colorspaces/rgb_f32/rgb_f32_plugin.h index f847dc3d..22ec674f 100644 --- a/krita/colorspaces/rgb_f32/rgb_f32_plugin.h +++ b/krita/colorspaces/rgb_f32/rgb_f32_plugin.h @@ -28,8 +28,9 @@ class RGBF32Plugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - RGBF32Plugin(QObject *parent, const char *name, const QStringList &); + RGBF32Plugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~RGBF32Plugin(); }; diff --git a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc index 5694f3e3..b4ec34e9 100644 --- a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc +++ b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc @@ -55,7 +55,7 @@ void KisRgbF32ColorSpaceTester::allTests() KisFactory *factory = new KisFactory(); testBasics(); - testToQImage(); + testToTQImage(); testCompositeOps(); testMixColors(); @@ -74,7 +74,7 @@ void KisRgbF32ColorSpaceTester::testBasics() CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS); CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE); - QValueVector channels = cs->channels(); + TQValueVector channels = cs->channels(); // Red CHECK(channels[0]->pos(), PIXEL_RED * CHANNEL_SIZE); @@ -109,39 +109,39 @@ void KisRgbF32ColorSpaceTester::testBasics() float pixel[NUM_CHANNELS]; - cs->fromQColor(qRgb(255, 255, 255), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE); - cs->fromQColor(qRgb(0, 0, 0), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(0, 0, 0), reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], MIN_CHANNEL_VALUE); CHECK(pixel[PIXEL_GREEN], MIN_CHANNEL_VALUE); CHECK(pixel[PIXEL_BLUE], MIN_CHANNEL_VALUE); - cs->fromQColor(qRgb(128, 64, 192), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(128, 64, 192), reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], UINT8_TO_FLOAT(128)); CHECK(pixel[PIXEL_GREEN], UINT8_TO_FLOAT(64)); CHECK(pixel[PIXEL_BLUE], UINT8_TO_FLOAT(192)); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_ALPHA], MAX_CHANNEL_VALUE); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_ALPHA], F32_OPACITY_TRANSPARENT); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast(pixel)); CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); @@ -152,9 +152,9 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE; pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE; - QColor c; + TQColor c; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -164,7 +164,7 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = MIN_CHANNEL_VALUE; pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), 0); CHECK(c.green(), 0); @@ -174,7 +174,7 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE / 2; pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4)); CHECK(c.green(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2)); @@ -185,9 +185,9 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE; pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE; - Q_UINT8 opacity; + TQ_UINT8 opacity; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -196,7 +196,7 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_ALPHA] = F32_OPACITY_OPAQUE; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -208,7 +208,7 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE; pixel[PIXEL_ALPHA] = F32_OPACITY_TRANSPARENT; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 0); CHECK(c.green(), 0); @@ -220,7 +220,7 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4; pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE / 2; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4)); CHECK(c.green(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2)); @@ -236,7 +236,7 @@ void KisRgbF32ColorSpaceTester::testBasics() {MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE} }; - cs->setAlpha(reinterpret_cast(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS); + cs->setAlpha(reinterpret_cast(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS); CHECK(pixels[0].red, MAX_CHANNEL_VALUE); CHECK(pixels[0].green, MAX_CHANNEL_VALUE); @@ -263,31 +263,31 @@ void KisRgbF32ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE / 4; pixel[PIXEL_ALPHA] = MIN_CHANNEL_VALUE; - QString valueText = cs->channelValueText(reinterpret_cast(pixel), RED_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE)); + TQString valueText = cs->channelValueText(reinterpret_cast(pixel), RED_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE)); - valueText = cs->channelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 2)); + valueText = cs->channelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 2)); - valueText = cs->channelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 4)); + valueText = cs->channelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 4)); - valueText = cs->channelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(MIN_CHANNEL_VALUE)); + valueText = cs->channelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); + CHECK(valueText, TQString().setNum(MIN_CHANNEL_VALUE)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), RED_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), RED_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 2)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 2)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 4)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 4)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(MIN_CHANNEL_VALUE)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); + CHECK(valueText, TQString().setNum(MIN_CHANNEL_VALUE)); - cs->setPixel(reinterpret_cast(pixel), 0.128, 0.192, 0.64, 0.99); + cs->setPixel(reinterpret_cast(pixel), 0.128, 0.192, 0.64, 0.99); CHECK(pixel[PIXEL_RED], 0.128f); CHECK(pixel[PIXEL_GREEN], 0.192f); CHECK(pixel[PIXEL_BLUE], 0.64f); @@ -298,7 +298,7 @@ void KisRgbF32ColorSpaceTester::testBasics() float blue; float alpha; - cs->getPixel(reinterpret_cast(pixel), &red, &green, &blue, &alpha); + cs->getPixel(reinterpret_cast(pixel), &red, &green, &blue, &alpha); CHECK(red, 0.128f); CHECK(green, 0.192f); CHECK(blue, 0.64f); @@ -343,16 +343,16 @@ void KisRgbF32ColorSpaceTester::testMixColors() pixel2[PIXEL_BLUE] = 0; pixel2[PIXEL_ALPHA] = 0; - const Q_UINT8 *pixelPtrs[2]; - Q_UINT8 weights[2]; + const TQ_UINT8 *pixelPtrs[2]; + TQ_UINT8 weights[2]; - pixelPtrs[0] = reinterpret_cast(pixel1); - pixelPtrs[1] = reinterpret_cast(pixel2); + pixelPtrs[0] = reinterpret_cast(pixel1); + pixelPtrs[1] = reinterpret_cast(pixel2); weights[0] = 255; weights[1] = 0; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK(outputPixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); @@ -362,7 +362,7 @@ void KisRgbF32ColorSpaceTester::testMixColors() weights[0] = 0; weights[1] = 255; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], 0.0f); CHECK(outputPixel[PIXEL_GREEN], 0.0f); @@ -372,7 +372,7 @@ void KisRgbF32ColorSpaceTester::testMixColors() weights[0] = 128; weights[1] = 127; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK(outputPixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); @@ -389,7 +389,7 @@ void KisRgbF32ColorSpaceTester::testMixColors() pixel2[PIXEL_BLUE] = 2000; pixel2[PIXEL_ALPHA] = MAX_CHANNEL_VALUE; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK_TOLERANCE(outputPixel[PIXEL_RED], (128 * 20000 + 127 * 10000) / 255, 5); CHECK_TOLERANCE(outputPixel[PIXEL_GREEN], (128 * 10000 + 127 * 20000) / 255, 5); @@ -409,7 +409,7 @@ void KisRgbF32ColorSpaceTester::testMixColors() weights[0] = 89; weights[1] = 166; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK(outputPixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK(outputPixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); @@ -420,7 +420,7 @@ void KisRgbF32ColorSpaceTester::testMixColors() #define PIXELS_WIDTH 2 #define PIXELS_HEIGHT 2 -void KisRgbF32ColorSpaceTester::testToQImage() +void KisRgbF32ColorSpaceTester::testToTQImage() { KisProfile *profile = new KisProfile(cmsCreate_sRGBProfile()); @@ -433,37 +433,37 @@ void KisRgbF32ColorSpaceTester::testToQImage() {MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE} }; - QImage image = cs->convertToQImage(reinterpret_cast(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0); + TQImage image = cs->convertToTQImage(reinterpret_cast(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0); - QRgb c = image.pixel(0, 0); + TQRgb c = image.pixel(0, 0); // Exposure comes into play here. /* - CHECK(qRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4)); + CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4)); c = image.pixel(1, 0); - CHECK(qRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 3)); - CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2)); - CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4)); - CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2)); + CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 3)); + CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2)); + CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4)); + CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2)); c = image.pixel(0, 1); - CHECK(qRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); c = image.pixel(1, 1); - CHECK(qRed(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); - CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); - CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); - CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE)); */ } @@ -497,22 +497,22 @@ void KisRgbF32ColorSpaceTester::testCompositeOps() dstPixel = srcPixel; - cs->compositeDivide(reinterpret_cast(&dstPixel), 1, reinterpret_cast(&srcPixel), + cs->compositeDivide(reinterpret_cast(&dstPixel), 1, reinterpret_cast(&srcPixel), 1, 0, 0, 1, 1, F32_OPACITY_OPAQUE); /* - CHECK(dstPixel.red, (Q_UINT16)UINT8_TO_UINT16(253)); - CHECK(dstPixel.green, (Q_UINT16)UINT8_TO_UINT16(254)); - CHECK(dstPixel.blue, (Q_UINT16)UINT8_TO_UINT16(254)); + CHECK(dstPixel.red, (TQ_UINT16)UINT8_TO_UINT16(253)); + CHECK(dstPixel.green, (TQ_UINT16)UINT8_TO_UINT16(254)); + CHECK(dstPixel.blue, (TQ_UINT16)UINT8_TO_UINT16(254)); CHECK(dstPixel.alpha, KisRgbF32ColorSpace::F32_OPACITY_OPAQUE); - Q_UINT16 srcColor = 43690; - Q_UINT16 dstColor = 43690; + TQ_UINT16 srcColor = 43690; + TQ_UINT16 dstColor = 43690; - srcColor = QMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u); + srcColor = TQMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u); CHECK((int)srcColor, 65534); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u); CHECK((int)newColor, 65534); */ @@ -532,8 +532,8 @@ void KisRgbF32ColorSpaceTester::testCompositeOps() {MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE} }; - cs->compositeOver(reinterpret_cast(dstPixels), DST_ROW_STRIDE, reinterpret_cast(srcPixels), - SRC_ROW_STRIDE, mask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity); + cs->compositeOver(reinterpret_cast(dstPixels), DST_ROW_STRIDE, reinterpret_cast(srcPixels), + SRC_ROW_STRIDE, tqmask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity); */ delete cs; diff --git a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h index d6e47704..1153f147 100644 --- a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h +++ b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h @@ -26,11 +26,11 @@ #define CHECK_TOLERANCE( x, y, tolerance ) \ if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \ { \ - success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \ + success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #x); \ } \ else \ { \ - failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \ + failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + TQString::number(x)); \ } \ class KisRgbF32ColorSpaceTester : public KUnitTest::Tester @@ -39,7 +39,7 @@ public: void allTests(); void testBasics(); void testMixColors(); - void testToQImage(); + void testToTQImage(); void testCompositeOps(); }; diff --git a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc index 7ec94671..c61433d2 100644 --- a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc +++ b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc @@ -23,8 +23,8 @@ #include #include LCMS_HEADER -#include -#include +#include +#include #include #include @@ -36,23 +36,23 @@ #include "kis_integer_maths.h" namespace { - const Q_INT32 MAX_CHANNEL_RGB = 3; - const Q_INT32 MAX_CHANNEL_RGBA = 4; + const TQ_INT32 MAX_CHANNEL_RGB = 3; + const TQ_INT32 MAX_CHANNEL_RGBA = 4; } // XXX: already defined is superclass? -//const Q_UINT16 KisRgbU16ColorSpace::U16_OPACITY_OPAQUE; -//const Q_UINT16 KisRgbU16ColorSpace::U16_OPACITY_TRANSPARENT; +//const TQ_UINT16 KisRgbU16ColorSpace::U16_OPACITY_OPAQUE; +//const TQ_UINT16 KisRgbU16ColorSpace::U16_OPACITY_TRANSPARENT; -KisRgbU16ColorSpace::KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisU16BaseColorSpace(KisID("RGBA16", i18n("RGB (16-bit integer/channel)")), TYPE_BGRA_16, icSigRgbData, parent, p) +KisRgbU16ColorSpace::KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisU16BaseColorSpace(KisID("RGBA16", i18n("RGB (16-bit integer/channel)")), TYPE_BGRA_16, icSigRgbData, tqparent, p) { - m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(255,0,0))); - m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(0,255,0))); - m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), PIXEL_BLUE * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(0,0,255))); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(255,0,0))); + m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(0,255,0))); + m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), PIXEL_BLUE * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(0,0,255))); + m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); - m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16); + m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16); init(); } @@ -61,7 +61,7 @@ KisRgbU16ColorSpace::~KisRgbU16ColorSpace() { } -void KisRgbU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 red, Q_UINT16 green, Q_UINT16 blue, Q_UINT16 alpha) const +void KisRgbU16ColorSpace::setPixel(TQ_UINT8 *dst, TQ_UINT16 red, TQ_UINT16 green, TQ_UINT16 blue, TQ_UINT16 alpha) const { Pixel *dstPixel = reinterpret_cast(dst); @@ -71,7 +71,7 @@ void KisRgbU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 red, Q_UINT16 green, Q dstPixel->alpha = alpha; } -void KisRgbU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *red, Q_UINT16 *green, Q_UINT16 *blue, Q_UINT16 *alpha) const +void KisRgbU16ColorSpace::getPixel(const TQ_UINT8 *src, TQ_UINT16 *red, TQ_UINT16 *green, TQ_UINT16 *blue, TQ_UINT16 *alpha) const { const Pixel *srcPixel = reinterpret_cast(src); @@ -81,16 +81,16 @@ void KisRgbU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *red, Q_UINT16 * *alpha = srcPixel->alpha; } -void KisRgbU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisRgbU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0; + TQ_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0; while (nColors--) { const Pixel *pixel = reinterpret_cast(*colors); - Q_UINT32 alpha = pixel->alpha; - Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights)); + TQ_UINT32 alpha = pixel->alpha; + TQ_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights)); totalRed += UINT16_MULT(pixel->red, alphaTimesWeight); totalGreen += UINT16_MULT(pixel->green, alphaTimesWeight); @@ -119,16 +119,16 @@ void KisRgbU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh } -void KisRgbU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, - Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisRgbU16ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, + TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; + TQ_INT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; while (nColors--) { const Pixel * pixel = reinterpret_cast( *colors ); - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { totalRed += pixel->red * weight; @@ -143,80 +143,80 @@ void KisRgbU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues Pixel * p = reinterpret_cast< Pixel *>( dst ); if (channelFlags & KisChannelInfo::FLAG_COLOR) { - p->red = CLAMP( ( totalRed / factor) + offset, 0, Q_UINT16_MAX); - p->green = CLAMP( ( totalGreen / factor) + offset, 0, Q_UINT16_MAX); - p->blue = CLAMP( ( totalBlue / factor) + offset, 0, Q_UINT16_MAX); + p->red = CLAMP( ( totalRed / factor) + offset, 0, TQ_UINT16_MAX); + p->green = CLAMP( ( totalGreen / factor) + offset, 0, TQ_UINT16_MAX); + p->blue = CLAMP( ( totalBlue / factor) + offset, 0, TQ_UINT16_MAX); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT16_MAX); + p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT16_MAX); } } -void KisRgbU16ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisRgbU16ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { Pixel * p = reinterpret_cast< Pixel *>( src ); - p->red = Q_UINT16_MAX - p->red; - p->green = Q_UINT16_MAX - p->green; - p->blue = Q_UINT16_MAX - p->blue; + p->red = TQ_UINT16_MAX - p->red; + p->green = TQ_UINT16_MAX - p->green; + p->blue = TQ_UINT16_MAX - p->blue; src += psize; } } -Q_UINT8 KisRgbU16ColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisRgbU16ColorSpace::intensity8(const TQ_UINT8 * src) const { const Pixel * p = reinterpret_cast( src ); - return UINT16_TO_UINT8(static_cast((p->red * 0.30 + p->green * 0.59 + p->blue * 0.11) + 0.5)); + return UINT16_TO_UINT8(static_cast((p->red * 0.30 + p->green * 0.59 + p->blue * 0.11) + 0.5)); } -QValueVector KisRgbU16ColorSpace::channels() const +TQValueVector KisRgbU16ColorSpace::channels() const { return m_channels; } -Q_UINT32 KisRgbU16ColorSpace::nChannels() const +TQ_UINT32 KisRgbU16ColorSpace::nChannels() const { return MAX_CHANNEL_RGBA; } -Q_UINT32 KisRgbU16ColorSpace::nColorChannels() const +TQ_UINT32 KisRgbU16ColorSpace::nColorChannels() const { return MAX_CHANNEL_RGB; } -Q_UINT32 KisRgbU16ColorSpace::pixelSize() const +TQ_UINT32 KisRgbU16ColorSpace::pixelSize() const { - return MAX_CHANNEL_RGBA * sizeof(Q_UINT16); + return MAX_CHANNEL_RGBA * sizeof(TQ_UINT16); } -void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { while (rows > 0) { - const Q_UINT16 *src = reinterpret_cast(srcRowStart); - Q_UINT16 *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } if (srcAlpha != U16_OPACITY_TRANSPARENT) { @@ -226,16 +226,16 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri } if (srcAlpha == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(TQ_UINT16)); } else { - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; - Q_UINT16 srcBlend; + TQ_UINT16 srcBlend; if (dstAlpha == U16_OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -246,7 +246,7 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri } if (srcBlend == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(TQ_UINT16)); } else { dst[PIXEL_RED] = UINT16_BLEND(src[PIXEL_RED], dst[PIXEL_RED], srcBlend); dst[PIXEL_GREEN] = UINT16_BLEND(src[PIXEL_GREEN], dst[PIXEL_GREEN], srcBlend); @@ -263,8 +263,8 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } @@ -272,25 +272,25 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri #define COMMON_COMPOSITE_OP_PROLOG() \ while (rows > 0) { \ \ - const Q_UINT16 *src = reinterpret_cast(srcRowStart); \ - Q_UINT16 *dst = reinterpret_cast(dstRowStart); \ - Q_INT32 columns = numColumns; \ - const Q_UINT8 *mask = maskRowStart; \ + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); \ + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); \ + TQ_INT32 columns = numColumns; \ + const TQ_UINT8 *tqmask = tqmaskRowStart; \ \ while (columns > 0) { \ \ - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ \ - srcAlpha = QMIN(srcAlpha, dstAlpha); \ + srcAlpha = TQMIN(srcAlpha, dstAlpha); \ \ - if (mask != 0) { \ - Q_UINT8 U8_mask = *mask; \ + if (tqmask != 0) { \ + TQ_UINT8 U8_tqmask = *tqmask; \ \ - if (U8_mask != OPACITY_OPAQUE) { \ - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \ + if (U8_tqmask != OPACITY_OPAQUE) { \ + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \ } \ - mask++; \ + tqmask++; \ } \ \ if (srcAlpha != U16_OPACITY_TRANSPARENT) { \ @@ -299,12 +299,12 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri srcAlpha = UINT16_MULT(srcAlpha, opacity); \ } \ \ - Q_UINT16 srcBlend; \ + TQ_UINT16 srcBlend; \ \ if (dstAlpha == U16_OPACITY_OPAQUE) { \ srcBlend = srcAlpha; \ } else { \ - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ dst[PIXEL_ALPHA] = newAlpha; \ \ if (newAlpha != 0) { \ @@ -325,20 +325,20 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; \ srcRowStart += srcRowStride; \ dstRowStart += dstRowStride; \ - if(maskRowStart) { \ - maskRowStart += maskRowStride; \ + if(tqmaskRowStart) { \ + tqmaskRowStart += tqmaskRowStride; \ } \ } -void KisRgbU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MULT(srcColor, dstColor); @@ -350,19 +350,19 @@ void KisRgbU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRow COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -371,19 +371,19 @@ void KisRgbU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MAX - UINT16_MULT(UINT16_MAX - dstColor, UINT16_MAX - srcColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -392,19 +392,19 @@ void KisRgbU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MULT(dstColor, dstColor + 2u * UINT16_MULT(srcColor, UINT16_MAX - dstColor)); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -413,19 +413,19 @@ void KisRgbU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -434,20 +434,20 @@ void KisRgbU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX); srcColor = kClamp(UINT16_MAX - srcColor, 0u, UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -456,19 +456,19 @@ void KisRgbU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -477,19 +477,19 @@ void KisRgbU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -498,7 +498,7 @@ void KisRgbU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowS COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -507,9 +507,9 @@ void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid float FSrcGreen = static_cast(src[PIXEL_GREEN]) / UINT16_MAX; float FSrcBlue = static_cast(src[PIXEL_BLUE]) / UINT16_MAX; - Q_UINT16 dstRed = dst[PIXEL_RED]; - Q_UINT16 dstGreen = dst[PIXEL_GREEN]; - Q_UINT16 dstBlue = dst[PIXEL_BLUE]; + TQ_UINT16 dstRed = dst[PIXEL_RED]; + TQ_UINT16 dstGreen = dst[PIXEL_GREEN]; + TQ_UINT16 dstBlue = dst[PIXEL_BLUE]; float FDstRed = static_cast(dstRed) / UINT16_MAX; float FDstGreen = static_cast(dstGreen) / UINT16_MAX; @@ -528,9 +528,9 @@ void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid HSVToRGB(srcHue, dstSaturation, dstValue, &FSrcRed, &FSrcGreen, &FSrcBlue); - Q_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); - Q_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); - Q_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); + TQ_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); + TQ_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); + TQ_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend); dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend); @@ -540,7 +540,7 @@ void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -549,9 +549,9 @@ void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR float FSrcGreen = static_cast(src[PIXEL_GREEN]) / UINT16_MAX; float FSrcBlue = static_cast(src[PIXEL_BLUE]) / UINT16_MAX; - Q_UINT16 dstRed = dst[PIXEL_RED]; - Q_UINT16 dstGreen = dst[PIXEL_GREEN]; - Q_UINT16 dstBlue = dst[PIXEL_BLUE]; + TQ_UINT16 dstRed = dst[PIXEL_RED]; + TQ_UINT16 dstGreen = dst[PIXEL_GREEN]; + TQ_UINT16 dstBlue = dst[PIXEL_BLUE]; float FDstRed = static_cast(dstRed) / UINT16_MAX; float FDstGreen = static_cast(dstGreen) / UINT16_MAX; @@ -570,9 +570,9 @@ void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR HSVToRGB(dstHue, srcSaturation, dstValue, &FSrcRed, &FSrcGreen, &FSrcBlue); - Q_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); - Q_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); - Q_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); + TQ_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); + TQ_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); + TQ_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend); dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend); @@ -582,7 +582,7 @@ void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -591,9 +591,9 @@ void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr float FSrcGreen = static_cast(src[PIXEL_GREEN]) / UINT16_MAX; float FSrcBlue = static_cast(src[PIXEL_BLUE]) / UINT16_MAX; - Q_UINT16 dstRed = dst[PIXEL_RED]; - Q_UINT16 dstGreen = dst[PIXEL_GREEN]; - Q_UINT16 dstBlue = dst[PIXEL_BLUE]; + TQ_UINT16 dstRed = dst[PIXEL_RED]; + TQ_UINT16 dstGreen = dst[PIXEL_GREEN]; + TQ_UINT16 dstBlue = dst[PIXEL_BLUE]; float FDstRed = static_cast(dstRed) / UINT16_MAX; float FDstGreen = static_cast(dstGreen) / UINT16_MAX; @@ -612,9 +612,9 @@ void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr HSVToRGB(dstHue, dstSaturation, srcValue, &FSrcRed, &FSrcGreen, &FSrcBlue); - Q_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); - Q_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); - Q_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); + TQ_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); + TQ_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); + TQ_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend); dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend); @@ -624,7 +624,7 @@ void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisRgbU16ColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); @@ -633,9 +633,9 @@ void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr float FSrcGreen = static_cast(src[PIXEL_GREEN]) / UINT16_MAX; float FSrcBlue = static_cast(src[PIXEL_BLUE]) / UINT16_MAX; - Q_UINT16 dstRed = dst[PIXEL_RED]; - Q_UINT16 dstGreen = dst[PIXEL_GREEN]; - Q_UINT16 dstBlue = dst[PIXEL_BLUE]; + TQ_UINT16 dstRed = dst[PIXEL_RED]; + TQ_UINT16 dstGreen = dst[PIXEL_GREEN]; + TQ_UINT16 dstBlue = dst[PIXEL_BLUE]; float FDstRed = static_cast(dstRed) / UINT16_MAX; float FDstGreen = static_cast(dstGreen) / UINT16_MAX; @@ -654,9 +654,9 @@ void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr HSLToRGB(srcHue, srcSaturation, dstLightness, &FSrcRed, &FSrcGreen, &FSrcBlue); - Q_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); - Q_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); - Q_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); + TQ_UINT16 srcRed = static_cast(FSrcRed * UINT16_MAX + 0.5); + TQ_UINT16 srcGreen = static_cast(FSrcGreen * UINT16_MAX + 0.5); + TQ_UINT16 srcBlue = static_cast(FSrcBlue * UINT16_MAX + 0.5); dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend); dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend); @@ -666,34 +666,34 @@ void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisRgbU16ColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT16 /*opacity*/) +void KisRgbU16ColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT16 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT16 srcAlpha = s->alpha; + TQ_UINT16 srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = UINT16_MULT(srcAlpha, d->alpha); } @@ -701,30 +701,30 @@ void KisRgbU16ColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisRgbU16ColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { - Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); + TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); switch (op.op()) { case COMPOSITE_UNDEF: // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -753,16 +753,16 @@ void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity); break; case COMPOSITE_COPY_RED: //compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -797,22 +797,22 @@ void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -821,24 +821,24 @@ void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: - abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest()); break; default: diff --git a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h index 73a79eb3..abb9b42b 100644 --- a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h +++ b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h @@ -32,13 +32,13 @@ class KRITATOOL_EXPORT KisRgbU16ColorSpace : public KisU16BaseColorSpace { public: struct Pixel { - Q_UINT16 blue; - Q_UINT16 green; - Q_UINT16 red; - Q_UINT16 alpha; + TQ_UINT16 blue; + TQ_UINT16 green; + TQ_UINT16 red; + TQ_UINT16 alpha; }; public: - KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisRgbU16ColorSpace(); virtual bool willDegrade(ColorSpaceIndependence independence) @@ -52,56 +52,56 @@ public: public: - void setPixel(Q_UINT8 *pixel, Q_UINT16 red, Q_UINT16 green, Q_UINT16 blue, Q_UINT16 alpha) const; - void getPixel(const Q_UINT8 *pixel, Q_UINT16 *red, Q_UINT16 *green, Q_UINT16 *blue, Q_UINT16 *alpha) const; + void setPixel(TQ_UINT8 *pixel, TQ_UINT16 red, TQ_UINT16 green, TQ_UINT16 blue, TQ_UINT16 alpha) const; + void getPixel(const TQ_UINT8 *pixel, TQ_UINT16 *red, TQ_UINT16 *green, TQ_UINT16 *blue, TQ_UINT16 *alpha) const; - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); private: friend class KisRgbU16ColorSpaceTester; - static const Q_UINT8 PIXEL_BLUE = 0; - static const Q_UINT8 PIXEL_GREEN = 1; - static const Q_UINT8 PIXEL_RED = 2; - static const Q_UINT8 PIXEL_ALPHA = 3; + static const TQ_UINT8 PIXEL_BLUE = 0; + static const TQ_UINT8 PIXEL_GREEN = 1; + static const TQ_UINT8 PIXEL_RED = 2; + static const TQ_UINT8 PIXEL_ALPHA = 3; }; class KisRgbU16ColorSpaceFactory : public KisColorSpaceFactory @@ -116,13 +116,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_BGRA_16; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_BGRA_16; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisRgbU16ColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisRgbU16ColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; }; #endif // KIS_STRATEGY_COLORSPACE_RGB_U16_H_ diff --git a/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc b/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc index 0f88b158..d05e59f9 100644 --- a/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc +++ b/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc @@ -34,14 +34,14 @@ typedef KGenericFactory RGBU16PluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_rgb_u16_plugin, RGBU16PluginFactory( "krita" ) ) -RGBU16Plugin::RGBU16Plugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +RGBU16Plugin::RGBU16Plugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(RGBU16PluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); KisColorSpace * colorSpaceRGBU16 = new KisRgbU16ColorSpace(f, 0); KisColorSpaceFactory * csFactory = new KisRgbU16ColorSpaceFactory(); diff --git a/krita/colorspaces/rgb_u16/rgb_u16_plugin.h b/krita/colorspaces/rgb_u16/rgb_u16_plugin.h index 643833ce..d5cf4d14 100644 --- a/krita/colorspaces/rgb_u16/rgb_u16_plugin.h +++ b/krita/colorspaces/rgb_u16/rgb_u16_plugin.h @@ -27,8 +27,9 @@ class RGBU16Plugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - RGBU16Plugin(QObject *parent, const char *name, const QStringList &); + RGBU16Plugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~RGBU16Plugin(); }; diff --git a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc index b41d46bc..7861b8e1 100644 --- a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc +++ b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc @@ -53,7 +53,7 @@ void KisRgbU16ColorSpaceTester::allTests() KisFactory *factory = new KisFactory(); testBasics(); - testToQImage(); + testToTQImage(); testCompositeOps(); testMixColors(); @@ -72,7 +72,7 @@ void KisRgbU16ColorSpaceTester::testBasics() CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS); CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE); - QValueVector channels = cs->channels(); + TQValueVector channels = cs->channels(); // Red CHECK(channels[0]->pos(), PIXEL_RED * CHANNEL_SIZE); @@ -105,41 +105,41 @@ void KisRgbU16ColorSpaceTester::testBasics() CHECK((int)defaultPixel.blue, 0); CHECK((int)defaultPixel.alpha, 0); - Q_UINT16 pixel[NUM_CHANNELS]; + TQ_UINT16 pixel[NUM_CHANNELS]; - cs->fromQColor(qRgb(255, 255, 255), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), reinterpret_cast(pixel)); CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE); - cs->fromQColor(qRgb(0, 0, 0), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(0, 0, 0), reinterpret_cast(pixel)); CHECK((uint)pixel[PIXEL_RED], MIN_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_GREEN], MIN_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_BLUE], MIN_CHANNEL_VALUE); - cs->fromQColor(qRgb(128, 64, 192), reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(128, 64, 192), reinterpret_cast(pixel)); CHECK((uint)pixel[PIXEL_RED], (uint)UINT8_TO_UINT16(128)); CHECK((uint)pixel[PIXEL_GREEN], (uint)UINT8_TO_UINT16(64)); CHECK((uint)pixel[PIXEL_BLUE], (uint)UINT8_TO_UINT16(192)); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast(pixel)); CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_ALPHA], MAX_CHANNEL_VALUE); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast(pixel)); CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_ALPHA], MIN_CHANNEL_VALUE); - cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast(pixel)); + cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast(pixel)); CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE); CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE); @@ -150,9 +150,9 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE; pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE; - QColor c; + TQColor c; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -162,7 +162,7 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = MIN_CHANNEL_VALUE; pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), 0); CHECK(c.green(), 0); @@ -172,7 +172,7 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE / 2; pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4; - cs->toQColor(reinterpret_cast(pixel), &c); + cs->toTQColor(reinterpret_cast(pixel), &c); CHECK(c.red(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4)); CHECK(c.green(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2)); @@ -183,9 +183,9 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE; pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE; - Q_UINT8 opacity; + TQ_UINT8 opacity; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -194,7 +194,7 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 255); CHECK(c.green(), 255); @@ -206,7 +206,7 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE; pixel[PIXEL_ALPHA] = MIN_CHANNEL_VALUE; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), 0); CHECK(c.green(), 0); @@ -218,7 +218,7 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4; pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE / 2; - cs->toQColor(reinterpret_cast(pixel), &c, &opacity); + cs->toTQColor(reinterpret_cast(pixel), &c, &opacity); CHECK(c.red(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4)); CHECK(c.green(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2)); @@ -234,7 +234,7 @@ void KisRgbU16ColorSpaceTester::testBasics() {MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE} }; - cs->setAlpha(reinterpret_cast(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS); + cs->setAlpha(reinterpret_cast(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS); CHECK((uint)pixels[0].red, MAX_CHANNEL_VALUE); CHECK((uint)pixels[0].green, MAX_CHANNEL_VALUE); @@ -261,42 +261,42 @@ void KisRgbU16ColorSpaceTester::testBasics() pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE / 4; pixel[PIXEL_ALPHA] = MIN_CHANNEL_VALUE; - QString valueText = cs->channelValueText(reinterpret_cast(pixel), RED_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE)); + TQString valueText = cs->channelValueText(reinterpret_cast(pixel), RED_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE)); - valueText = cs->channelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 2)); + valueText = cs->channelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 2)); - valueText = cs->channelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); - CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 4)); + valueText = cs->channelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); + CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 4)); - valueText = cs->channelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(MIN_CHANNEL_VALUE)); + valueText = cs->channelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); + CHECK(valueText, TQString().setNum(MIN_CHANNEL_VALUE)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), RED_CHANNEL); - CHECK(valueText, QString().setNum(static_cast(MAX_CHANNEL_VALUE) / MAX_CHANNEL_VALUE)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), RED_CHANNEL); + CHECK(valueText, TQString().setNum(static_cast(MAX_CHANNEL_VALUE) / MAX_CHANNEL_VALUE)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); - CHECK(valueText, QString().setNum(static_cast(MAX_CHANNEL_VALUE / 2) / MAX_CHANNEL_VALUE)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), GREEN_CHANNEL); + CHECK(valueText, TQString().setNum(static_cast(MAX_CHANNEL_VALUE / 2) / MAX_CHANNEL_VALUE)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); - CHECK(valueText, QString().setNum(static_cast(MAX_CHANNEL_VALUE / 4) / MAX_CHANNEL_VALUE)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), BLUE_CHANNEL); + CHECK(valueText, TQString().setNum(static_cast(MAX_CHANNEL_VALUE / 4) / MAX_CHANNEL_VALUE)); - valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(static_cast(MIN_CHANNEL_VALUE) / MAX_CHANNEL_VALUE)); + valueText = cs->normalisedChannelValueText(reinterpret_cast(pixel), ALPHA_CHANNEL); + CHECK(valueText, TQString().setNum(static_cast(MIN_CHANNEL_VALUE) / MAX_CHANNEL_VALUE)); - cs->setPixel(reinterpret_cast(pixel), 128, 192, 64, 99); + cs->setPixel(reinterpret_cast(pixel), 128, 192, 64, 99); CHECK((uint)pixel[PIXEL_RED], 128u); CHECK((uint)pixel[PIXEL_GREEN], 192u); CHECK((uint)pixel[PIXEL_BLUE], 64u); CHECK((uint)pixel[PIXEL_ALPHA], 99u); - Q_UINT16 red; - Q_UINT16 green; - Q_UINT16 blue; - Q_UINT16 alpha; + TQ_UINT16 red; + TQ_UINT16 green; + TQ_UINT16 blue; + TQ_UINT16 alpha; - cs->getPixel(reinterpret_cast(pixel), &red, &green, &blue, &alpha); + cs->getPixel(reinterpret_cast(pixel), &red, &green, &blue, &alpha); CHECK((uint)red, 128u); CHECK((uint)green, 192u); CHECK((uint)blue, 64u); @@ -310,9 +310,9 @@ void KisRgbU16ColorSpaceTester::testMixColors() KisAbstractColorSpace * cs = new KisRgbU16ColorSpace(defProfile); // Test mixColors. - Q_UINT16 pixel1[NUM_CHANNELS]; - Q_UINT16 pixel2[NUM_CHANNELS]; - Q_UINT16 outputPixel[NUM_CHANNELS]; + TQ_UINT16 pixel1[NUM_CHANNELS]; + TQ_UINT16 pixel2[NUM_CHANNELS]; + TQ_UINT16 outputPixel[NUM_CHANNELS]; outputPixel[PIXEL_RED] = 0; outputPixel[PIXEL_GREEN] = 0; @@ -329,16 +329,16 @@ void KisRgbU16ColorSpaceTester::testMixColors() pixel2[PIXEL_BLUE] = 0; pixel2[PIXEL_ALPHA] = 0; - const Q_UINT8 *pixelPtrs[2]; - Q_UINT8 weights[2]; + const TQ_UINT8 *pixelPtrs[2]; + TQ_UINT8 weights[2]; - pixelPtrs[0] = reinterpret_cast(pixel1); - pixelPtrs[1] = reinterpret_cast(pixel2); + pixelPtrs[0] = reinterpret_cast(pixel1); + pixelPtrs[1] = reinterpret_cast(pixel2); weights[0] = 255; weights[1] = 0; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK((uint)outputPixel[PIXEL_RED], UINT16_MAX); CHECK((uint)outputPixel[PIXEL_GREEN], UINT16_MAX); @@ -348,7 +348,7 @@ void KisRgbU16ColorSpaceTester::testMixColors() weights[0] = 0; weights[1] = 255; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK((int)outputPixel[PIXEL_RED], 0); CHECK((int)outputPixel[PIXEL_GREEN], 0); @@ -358,7 +358,7 @@ void KisRgbU16ColorSpaceTester::testMixColors() weights[0] = 128; weights[1] = 127; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK((uint)outputPixel[PIXEL_RED], UINT16_MAX); CHECK((uint)outputPixel[PIXEL_GREEN], UINT16_MAX); @@ -375,7 +375,7 @@ void KisRgbU16ColorSpaceTester::testMixColors() pixel2[PIXEL_BLUE] = 2000; pixel2[PIXEL_ALPHA] = UINT16_MAX; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK_TOLERANCE((uint)outputPixel[PIXEL_RED], (128u * 20000u + 127u * 10000u) / 255u, 5u); CHECK_TOLERANCE((uint)outputPixel[PIXEL_GREEN], (128u * 10000u + 127u * 20000u) / 255u, 5u); @@ -395,7 +395,7 @@ void KisRgbU16ColorSpaceTester::testMixColors() weights[0] = 89; weights[1] = 166; - cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); + cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast(outputPixel)); CHECK((uint)outputPixel[PIXEL_RED], UINT16_MAX); CHECK((uint)outputPixel[PIXEL_GREEN], UINT16_MAX); @@ -406,7 +406,7 @@ void KisRgbU16ColorSpaceTester::testMixColors() #define PIXELS_WIDTH 2 #define PIXELS_HEIGHT 2 -void KisRgbU16ColorSpaceTester::testToQImage() +void KisRgbU16ColorSpaceTester::testToTQImage() { KisProfile *defProfile = new KisProfile(cmsCreate_sRGBProfile()); @@ -419,35 +419,35 @@ void KisRgbU16ColorSpaceTester::testToQImage() {MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE} }; - QImage image = cs->convertToQImage(reinterpret_cast(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0); + TQImage image = cs->convertToTQImage(reinterpret_cast(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0); - QRgb c = image.pixel(0, 0); + TQRgb c = image.pixel(0, 0); - CHECK(qRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4)); + CHECK(tqRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4)); c = image.pixel(1, 0); - CHECK(qRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 3)); - CHECK(qGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2)); - CHECK_TOLERANCE(qBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4), 1u); - CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2)); + CHECK(tqRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 3)); + CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2)); + CHECK_TOLERANCE(tqBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4), 1u); + CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2)); c = image.pixel(0, 1); - CHECK(qRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); - CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); c = image.pixel(1, 1); - CHECK(qRed(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); - CHECK(qGreen(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); - CHECK(qBlue(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); - CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); + CHECK(tqRed(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqBlue(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE)); + CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE)); } #define NUM_ROWS 2 @@ -480,22 +480,22 @@ void KisRgbU16ColorSpaceTester::testCompositeOps() dstPixel = srcPixel; - cs->compositeDivide(reinterpret_cast(&dstPixel), 1, reinterpret_cast(&srcPixel), + cs->compositeDivide(reinterpret_cast(&dstPixel), 1, reinterpret_cast(&srcPixel), 1, 0, 0, 1, 1, KisRgbU16ColorSpace::U16_OPACITY_OPAQUE); /* - CHECK(dstPixel.red, (Q_UINT16)UINT8_TO_UINT16(253)); - CHECK(dstPixel.green, (Q_UINT16)UINT8_TO_UINT16(254)); - CHECK(dstPixel.blue, (Q_UINT16)UINT8_TO_UINT16(254)); + CHECK(dstPixel.red, (TQ_UINT16)UINT8_TO_UINT16(253)); + CHECK(dstPixel.green, (TQ_UINT16)UINT8_TO_UINT16(254)); + CHECK(dstPixel.blue, (TQ_UINT16)UINT8_TO_UINT16(254)); CHECK(dstPixel.alpha, KisRgbU16ColorSpace::U16_OPACITY_OPAQUE); - Q_UINT16 srcColor = 43690; - Q_UINT16 dstColor = 43690; + TQ_UINT16 srcColor = 43690; + TQ_UINT16 dstColor = 43690; - srcColor = QMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u); + srcColor = TQMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u); CHECK((int)srcColor, 65534); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u); CHECK((int)newColor, 65534); */ @@ -515,8 +515,8 @@ void KisRgbU16ColorSpaceTester::testCompositeOps() {MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE} }; - cs->compositeOver(reinterpret_cast(dstPixels), DST_ROW_STRIDE, reinterpret_cast(srcPixels), - SRC_ROW_STRIDE, mask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity); + cs->compositeOver(reinterpret_cast(dstPixels), DST_ROW_STRIDE, reinterpret_cast(srcPixels), + SRC_ROW_STRIDE, tqmask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity); */ delete cs; diff --git a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h index e80a7a43..848cf1ac 100644 --- a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h +++ b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h @@ -25,11 +25,11 @@ #define CHECK_TOLERANCE( x, y, tolerance ) \ if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \ { \ - success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \ + success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #x); \ } \ else \ { \ - failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \ + failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + TQString::number(x)); \ } \ class KisRgbU16ColorSpaceTester : public KUnitTest::Tester @@ -38,7 +38,7 @@ public: void allTests(); void testBasics(); void testMixColors(); - void testToQImage(); + void testToTQImage(); void testCompositeOps(); }; diff --git a/krita/colorspaces/rgb_u8/composite.h b/krita/colorspaces/rgb_u8/composite.h index 961130ba..d55487b6 100644 --- a/krita/colorspaces/rgb_u8/composite.h +++ b/krita/colorspaces/rgb_u8/composite.h @@ -81,36 +81,36 @@ (double)117.0 * (pixel[PIXEL_BLUE)) \ / 1024.0)) -#define PixelIntensityToQuantum(pixel) ((Q_UINT8)PixelIntensity(pixel)) +#define PixelIntensityToQuantum(pixel) ((TQ_UINT8)PixelIntensity(pixel)) #define PixelIntensityToDouble(pixel) ((double)PixelIntensity(pixel)) -#define RoundSignedToQuantum(value) ((Q_UINT8) (value < 0 ? 0 : \ - (value > Q_UINT8_MAX) ? Q_UINT8_MAX : value + 0.5)) +#define RoundSignedToQuantum(value) ((TQ_UINT8) (value < 0 ? 0 : \ + (value > TQ_UINT8_MAX) ? TQ_UINT8_MAX : value + 0.5)) -#define RoundToQuantum(value) ((Q_UINT8) (value > Q_UINT8_MAX ? Q_UINT8_MAX : \ +#define RoundToQuantum(value) ((TQ_UINT8) (value > TQ_UINT8_MAX ? TQ_UINT8_MAX : \ value + 0.5)) // And from studio.h #define AbsoluteValue(x) ((x) < 0 ? -(x) : (x)) -void compositeIn(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeIn(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; double alpha; @@ -122,7 +122,7 @@ void compositeIn(Q_INT32 pixelSize, if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT) { - memcpy(d, s, pixelSize * sizeof(Q_UINT8)); + memcpy(d, s, pixelSize * sizeof(TQ_UINT8)); continue; } if (d[PIXEL_ALPHA] == OPACITY_TRANSPARENT) @@ -132,13 +132,13 @@ void compositeIn(Q_INT32 pixelSize, dAlpha = UINT8_MAX - d[PIXEL_ALPHA]; alpha=(double) (((double) UINT8_MAX - sAlpha) * (UINT8_MAX - dAlpha) / UINT8_MAX); - d[PIXEL_RED]=(Q_UINT8) (((double) UINT8_MAX - sAlpha) * + d[PIXEL_RED]=(TQ_UINT8) (((double) UINT8_MAX - sAlpha) * (UINT8_MAX-dAlpha) * s[PIXEL_RED] / UINT8_MAX / alpha + 0.5); - d[PIXEL_GREEN]=(Q_UINT8) (((double) UINT8_MAX - sAlpha)* + d[PIXEL_GREEN]=(TQ_UINT8) (((double) UINT8_MAX - sAlpha)* (UINT8_MAX-dAlpha) * s[PIXEL_GREEN] / UINT8_MAX / alpha + 0.5); - d[PIXEL_BLUE]=(Q_UINT8) (((double) UINT8_MAX - sAlpha)* + d[PIXEL_BLUE]=(TQ_UINT8) (((double) UINT8_MAX - sAlpha)* (UINT8_MAX - dAlpha) * s[PIXEL_BLUE] / UINT8_MAX / alpha + 0.5); - d[PIXEL_ALPHA]=(Q_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5); + d[PIXEL_ALPHA]=(TQ_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5); } dst += dstRowSize; @@ -147,22 +147,22 @@ void compositeIn(Q_INT32 pixelSize, } -void compositeOut(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeOut(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; double alpha; @@ -173,7 +173,7 @@ void compositeOut(Q_INT32 pixelSize, for (i = cols; i > 0; i--, d += pixelSize, s += pixelSize) { if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT) { - memcpy(d, s, pixelSize * sizeof(Q_UINT8)); + memcpy(d, s, pixelSize * sizeof(TQ_UINT8)); break; } if (d[PIXEL_ALPHA] == OPACITY_OPAQUE) @@ -185,10 +185,10 @@ void compositeOut(Q_INT32 pixelSize, dAlpha = UINT8_MAX - d[PIXEL_ALPHA]; alpha=(double) (UINT8_MAX - sAlpha) * d[PIXEL_ALPHA]/UINT8_MAX; - d[PIXEL_RED] = (Q_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_RED] / UINT8_MAX / alpha + 0.5); - d[PIXEL_GREEN] = (Q_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_GREEN] / UINT8_MAX / alpha + 0.5); - d[PIXEL_BLUE] = (Q_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_BLUE] / UINT8_MAX / alpha + 0.5); - d[PIXEL_ALPHA]=(Q_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5); + d[PIXEL_RED] = (TQ_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_RED] / UINT8_MAX / alpha + 0.5); + d[PIXEL_GREEN] = (TQ_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_GREEN] / UINT8_MAX / alpha + 0.5); + d[PIXEL_BLUE] = (TQ_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_BLUE] / UINT8_MAX / alpha + 0.5); + d[PIXEL_ALPHA]=(TQ_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5); } dst += dstRowSize; src += srcRowSize; @@ -196,23 +196,23 @@ void compositeOut(Q_INT32 pixelSize, } -void compositeAtop(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeAtop(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; double alpha, red, green, blue; @@ -230,16 +230,16 @@ void compositeAtop(Q_INT32 pixelSize, red = ((double)(UINT8_MAX - sAlpha) * (UINT8_MAX - dAlpha) * s[PIXEL_RED] / UINT8_MAX + (double) sAlpha * (UINT8_MAX-dAlpha) * d[PIXEL_RED]/UINT8_MAX) / alpha; - d[PIXEL_RED] = (Q_UINT8) (red > UINT8_MAX ? UINT8_MAX : red + 0.5); + d[PIXEL_RED] = (TQ_UINT8) (red > UINT8_MAX ? UINT8_MAX : red + 0.5); green = ((double) (UINT8_MAX - sAlpha) * (UINT8_MAX - dAlpha) * s[PIXEL_GREEN] / UINT8_MAX + (double) sAlpha * (UINT8_MAX-dAlpha) * d[PIXEL_GREEN]/UINT8_MAX)/alpha; - d[PIXEL_GREEN] = (Q_UINT8) (green > UINT8_MAX ? UINT8_MAX : green + 0.5); + d[PIXEL_GREEN] = (TQ_UINT8) (green > UINT8_MAX ? UINT8_MAX : green + 0.5); blue = ((double) (UINT8_MAX - sAlpha) * (UINT8_MAX- dAlpha) * s[PIXEL_BLUE] / UINT8_MAX + (double) sAlpha * (UINT8_MAX - dAlpha) * d[PIXEL_BLUE]/UINT8_MAX) / alpha; - d[PIXEL_BLUE] = (Q_UINT8) (blue > UINT8_MAX ? UINT8_MAX : blue + 0.5); - d[PIXEL_ALPHA]=(Q_UINT8) (UINT8_MAX - (alpha > UINT8_MAX ? UINT8_MAX : alpha) + 0.5); + d[PIXEL_BLUE] = (TQ_UINT8) (blue > UINT8_MAX ? UINT8_MAX : blue + 0.5); + d[PIXEL_ALPHA]=(TQ_UINT8) (UINT8_MAX - (alpha > UINT8_MAX ? UINT8_MAX : alpha) + 0.5); } dst += dstRowSize; src += srcRowSize; @@ -247,22 +247,22 @@ void compositeAtop(Q_INT32 pixelSize, } -void compositeXor(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeXor(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; double alpha, red, green, blue; @@ -298,22 +298,22 @@ void compositeXor(Q_INT32 pixelSize, } -void compositePlus(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositePlus(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; double alpha, red, green, blue; @@ -345,22 +345,22 @@ void compositePlus(Q_INT32 pixelSize, -void compositeMinus(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeMinus(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; double alpha, red, green, blue; @@ -392,22 +392,22 @@ void compositeMinus(Q_INT32 pixelSize, } -void compositeAdd(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeAdd(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; double red, green, blue; @@ -420,13 +420,13 @@ void compositeAdd(Q_INT32 pixelSize, dAlpha = UINT8_MAX - d[PIXEL_ALPHA]; red=(double) s[PIXEL_RED]+d[PIXEL_RED]; - d[PIXEL_RED]=(Q_UINT8) + d[PIXEL_RED]=(TQ_UINT8) (red > UINT8_MAX ? red-=UINT8_MAX : red+0.5); green=(double) s[PIXEL_GREEN]+d[PIXEL_GREEN]; - d[PIXEL_GREEN]=(Q_UINT8) + d[PIXEL_GREEN]=(TQ_UINT8) (green > UINT8_MAX ? green-=UINT8_MAX : green+0.5); blue=(double) s[PIXEL_BLUE]+d[PIXEL_BLUE]; - d[PIXEL_BLUE]=(Q_UINT8) + d[PIXEL_BLUE]=(TQ_UINT8) (blue > UINT8_MAX ? blue-=UINT8_MAX : blue+0.5); d[PIXEL_ALPHA]=OPACITY_OPAQUE; } @@ -436,22 +436,22 @@ void compositeAdd(Q_INT32 pixelSize, } -void compositeSubtract(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeSubtract(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double red, green, blue; @@ -461,13 +461,13 @@ void compositeSubtract(Q_INT32 pixelSize, for (i = cols; i > 0; i--, d += pixelSize, s += pixelSize) { red=(double) s[PIXEL_RED]-d[PIXEL_RED]; - d[PIXEL_RED]=(Q_UINT8) + d[PIXEL_RED]=(TQ_UINT8) (red < 0 ? red+=UINT8_MAX : red+0.5); green=(double) s[PIXEL_GREEN]-d[PIXEL_GREEN]; - d[PIXEL_GREEN]=(Q_UINT8) + d[PIXEL_GREEN]=(TQ_UINT8) (green < 0 ? green+=UINT8_MAX : green+0.5); blue=(double) s[PIXEL_BLUE]-d[PIXEL_BLUE]; - d[PIXEL_BLUE]=(Q_UINT8) + d[PIXEL_BLUE]=(TQ_UINT8) (blue < 0 ? blue+=UINT8_MAX : blue+0.5); d[PIXEL_ALPHA]=OPACITY_OPAQUE; @@ -478,22 +478,22 @@ void compositeSubtract(Q_INT32 pixelSize, } -void compositeDiff(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeDiff(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; @@ -504,13 +504,13 @@ void compositeDiff(Q_INT32 pixelSize, sAlpha = UINT8_MAX - s[PIXEL_ALPHA]; dAlpha = UINT8_MAX - d[PIXEL_ALPHA]; - d[PIXEL_RED]=(Q_UINT8) + d[PIXEL_RED]=(TQ_UINT8) AbsoluteValue(s[PIXEL_RED]-(double) d[PIXEL_RED]); - d[PIXEL_GREEN]=(Q_UINT8) + d[PIXEL_GREEN]=(TQ_UINT8) AbsoluteValue(s[PIXEL_GREEN]-(double) d[PIXEL_GREEN]); - d[PIXEL_BLUE]=(Q_UINT8) + d[PIXEL_BLUE]=(TQ_UINT8) AbsoluteValue(s[PIXEL_BLUE]-(double) d[PIXEL_BLUE]); - d[PIXEL_ALPHA]=UINT8_MAX - (Q_UINT8) + d[PIXEL_ALPHA]=UINT8_MAX - (TQ_UINT8) AbsoluteValue(sAlpha-(double) dAlpha); } @@ -520,22 +520,22 @@ void compositeDiff(Q_INT32 pixelSize, } -void compositeBumpmap(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeBumpmap(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double intensity; @@ -552,13 +552,13 @@ void compositeBumpmap(Q_INT32 pixelSize, (double)601.0 * s[PIXEL_GREEN] + (double)117.0 * s[PIXEL_BLUE]) / 1024.0; - d[PIXEL_RED]=(Q_UINT8) (((double) + d[PIXEL_RED]=(TQ_UINT8) (((double) intensity * d[PIXEL_RED])/UINT8_MAX +0.5); - d[PIXEL_GREEN]=(Q_UINT8) (((double) + d[PIXEL_GREEN]=(TQ_UINT8) (((double) intensity * d[PIXEL_GREEN])/UINT8_MAX +0.5); - d[PIXEL_BLUE]=(Q_UINT8) (((double) + d[PIXEL_BLUE]=(TQ_UINT8) (((double) intensity * d[PIXEL_BLUE])/UINT8_MAX +0.5); - d[PIXEL_ALPHA]= (Q_UINT8) (((double) + d[PIXEL_ALPHA]= (TQ_UINT8) (((double) intensity * d[PIXEL_ALPHA])/UINT8_MAX +0.5); @@ -569,20 +569,20 @@ void compositeBumpmap(Q_INT32 pixelSize, } -void compositeCopy(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 /*opacity*/ = OPACITY_OPAQUE) +void compositeCopy(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE) { - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; d = dst; s = src; - Q_UINT32 len = cols * pixelSize; + TQ_UINT32 len = cols * pixelSize; while (rows-- > 0) { memcpy(d, s, len); @@ -591,19 +591,19 @@ void compositeCopy(Q_INT32 pixelSize, } } -void compositeCopyChannel(Q_UINT8 pixel, - Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 /*opacity*/ = OPACITY_OPAQUE) +void compositeCopyChannel(TQ_UINT8 pixel, + TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE) { - Q_UINT8 *d; - const Q_UINT8 *s; - Q_INT32 i; + TQ_UINT8 *d; + const TQ_UINT8 *s; + TQ_INT32 i; while (rows-- > 0) { d = dst; @@ -619,51 +619,51 @@ void compositeCopyChannel(Q_UINT8 pixel, } -void compositeCopyRed(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyRed(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { compositeCopyChannel(PIXEL_RED, pixelSize, dst, dstRowSize, src, srcRowSize, rows, cols, opacity); } -void compositeCopyGreen(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyGreen(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { compositeCopyChannel(PIXEL_GREEN, pixelSize, dst, dstRowSize, src, srcRowSize, rows, cols, opacity); } -void compositeCopyBlue(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyBlue(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { compositeCopyChannel(PIXEL_BLUE, pixelSize, dst, dstRowSize, src, srcRowSize, rows, cols, opacity); } -void compositeCopyOpacity(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeCopyOpacity(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { // XXX: mess with intensity if there isn't an alpha channel, according to GM. @@ -672,19 +672,19 @@ void compositeCopyOpacity(Q_INT32 pixelSize, } -void compositeClear(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 /*srcRowSize*/, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 /*opacity*/ = OPACITY_OPAQUE) +void compositeClear(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 /*srcRowSize*/, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE) { - Q_INT32 linesize = pixelSize * sizeof(Q_UINT8) * cols; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_INT32 linesize = pixelSize * sizeof(TQ_UINT8) * cols; + TQ_UINT8 *d; + const TQ_UINT8 *s; d = dst; s = src; @@ -697,22 +697,22 @@ void compositeClear(Q_INT32 pixelSize, } -void compositeDissolve(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeDissolve(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; @@ -726,11 +726,11 @@ void compositeDissolve(Q_INT32 pixelSize, sAlpha = UINT8_MAX - s[PIXEL_ALPHA]; dAlpha = UINT8_MAX - d[PIXEL_ALPHA]; - d[PIXEL_RED]=(Q_UINT8) (((double) sAlpha*s[PIXEL_RED]+ + d[PIXEL_RED]=(TQ_UINT8) (((double) sAlpha*s[PIXEL_RED]+ (UINT8_MAX -sAlpha)*d[PIXEL_RED])/UINT8_MAX +0.5); - d[PIXEL_GREEN]= (Q_UINT8) (((double) sAlpha*s[PIXEL_GREEN]+ + d[PIXEL_GREEN]= (TQ_UINT8) (((double) sAlpha*s[PIXEL_GREEN]+ (UINT8_MAX -sAlpha)*d[PIXEL_GREEN])/UINT8_MAX +0.5); - d[PIXEL_BLUE] = (Q_UINT8) (((double) sAlpha*s[PIXEL_BLUE]+ + d[PIXEL_BLUE] = (TQ_UINT8) (((double) sAlpha*s[PIXEL_BLUE]+ (UINT8_MAX -sAlpha)*d[PIXEL_BLUE])/UINT8_MAX +0.5); d[PIXEL_ALPHA] = OPACITY_OPAQUE; } @@ -741,18 +741,18 @@ void compositeDissolve(Q_INT32 pixelSize, } -void compositeDisplace(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 /*opacity*/ = OPACITY_OPAQUE) +void compositeDisplace(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE) { - Q_INT32 linesize = pixelSize * sizeof(Q_UINT8) * cols; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_INT32 linesize = pixelSize * sizeof(TQ_UINT8) * cols; + TQ_UINT8 *d; + const TQ_UINT8 *s; d = dst; s = src; @@ -765,22 +765,22 @@ void compositeDisplace(Q_INT32 pixelSize, } #if 0 -void compositeModulate(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeModulate(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { if (opacity == OPACITY_TRANSPARENT) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 i; + TQ_INT32 i; double sAlpha, dAlpha; long offset; @@ -820,46 +820,46 @@ void compositeModulate(Q_INT32 pixelSize, } -void compositeThreshold(Q_INT32 pixelSize, - Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 opacity = OPACITY_OPAQUE) +void compositeThreshold(TQ_INT32 pixelSize, + TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 opacity = OPACITY_OPAQUE) { - Q_INT32 linesize = pixelSize * sizeof(Q_UINT8) * cols; - Q_UINT8 *d; - const Q_UINT8 *s; - Q_UINT8 alpha; - Q_UINT8 invAlpha; - Q_INT32 i; + TQ_INT32 linesize = pixelSize * sizeof(TQ_UINT8) * cols; + TQ_UINT8 *d; + const TQ_UINT8 *s; + TQ_UINT8 alpha; + TQ_UINT8 invAlpha; + TQ_INT32 i; } #endif -void compositeColorize(Q_INT32, - Q_UINT8 *, - Q_INT32 , - const Q_UINT8 *, - Q_INT32 , - Q_INT32 , - Q_INT32 , - Q_UINT8 ) +void compositeColorize(TQ_INT32, + TQ_UINT8 *, + TQ_INT32 , + const TQ_UINT8 *, + TQ_INT32 , + TQ_INT32 , + TQ_INT32 , + TQ_UINT8 ) { } -void compositeLuminize(Q_INT32 , - Q_UINT8 *, - Q_INT32 , - const Q_UINT8 *, - Q_INT32 , - Q_INT32 , - Q_INT32 , - Q_UINT8 ) +void compositeLuminize(TQ_INT32 , + TQ_UINT8 *, + TQ_INT32 , + const TQ_UINT8 *, + TQ_INT32 , + TQ_INT32 , + TQ_INT32 , + TQ_UINT8 ) { } diff --git a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc index 61272e36..34ab79fc 100644 --- a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc +++ b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc @@ -22,8 +22,8 @@ #include #include LCMS_HEADER -#include -#include +#include +#include #include #include @@ -37,19 +37,19 @@ #include "composite.h" #define downscale(quantum) (quantum) //((unsigned char) ((quantum)/257UL)) -#define upscale(value) (value) // ((Q_UINT8) (257UL*(value))) +#define upscale(value) (value) // ((TQ_UINT8) (257UL*(value))) namespace { - const Q_INT32 MAX_CHANNEL_RGB = 3; - const Q_INT32 MAX_CHANNEL_RGBA = 4; + const TQ_INT32 MAX_CHANNEL_RGB = 3; + const TQ_INT32 MAX_CHANNEL_RGBA = 4; } -KisRgbColorSpace::KisRgbColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisU8BaseColorSpace(KisID("RGBA", i18n("RGB (8-bit integer/channel)")), TYPE_BGRA_8, icSigRgbData, parent, p) +KisRgbColorSpace::KisRgbColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisU8BaseColorSpace(KisID("RGBA", i18n("RGB (8-bit integer/channel)")), TYPE_BGRA_8, icSigRgbData, tqparent, p) { - m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(255,0,0))); - m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(0,255,0))); - m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(0,0,255))); + m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(255,0,0))); + m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(0,255,0))); + m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(0,0,255))); m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 3, KisChannelInfo::ALPHA, KisChannelInfo::UINT8)); m_alphaPos = PIXEL_ALPHA; @@ -60,7 +60,7 @@ KisRgbColorSpace::~KisRgbColorSpace() { } -void KisRgbColorSpace::setPixel(Q_UINT8 *pixel, Q_UINT8 red, Q_UINT8 green, Q_UINT8 blue, Q_UINT8 alpha) const +void KisRgbColorSpace::setPixel(TQ_UINT8 *pixel, TQ_UINT8 red, TQ_UINT8 green, TQ_UINT8 blue, TQ_UINT8 alpha) const { pixel[PIXEL_RED] = red; pixel[PIXEL_GREEN] = green; @@ -68,7 +68,7 @@ void KisRgbColorSpace::setPixel(Q_UINT8 *pixel, Q_UINT8 red, Q_UINT8 green, Q_UI pixel[PIXEL_ALPHA] = alpha; } -void KisRgbColorSpace::getPixel(const Q_UINT8 *pixel, Q_UINT8 *red, Q_UINT8 *green, Q_UINT8 *blue, Q_UINT8 *alpha) const +void KisRgbColorSpace::getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *red, TQ_UINT8 *green, TQ_UINT8 *blue, TQ_UINT8 *alpha) const { *red = pixel[PIXEL_RED]; *green = pixel[PIXEL_GREEN]; @@ -76,16 +76,16 @@ void KisRgbColorSpace::getPixel(const Q_UINT8 *pixel, Q_UINT8 *red, Q_UINT8 *gre *alpha = pixel[PIXEL_ALPHA]; } -void KisRgbColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisRgbColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; + TQ_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; while (nColors--) { - Q_UINT32 alpha = (*colors)[PIXEL_ALPHA]; + TQ_UINT32 alpha = (*colors)[PIXEL_ALPHA]; // although we only mult by weight and not by weight*256/255 // we divide by the same amount later, so there is no need - Q_UINT32 alphaTimesWeight = alpha * *weights; + TQ_UINT32 alphaTimesWeight = alpha * *weights; totalRed += (*colors)[PIXEL_RED] * alphaTimesWeight; totalGreen += (*colors)[PIXEL_GREEN] * alphaTimesWeight; @@ -108,29 +108,29 @@ void KisRgbColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, totalBlue = totalBlue / totalAlpha; } // else the values are already 0 too - Q_UINT32 dstRed = totalRed; + TQ_UINT32 dstRed = totalRed; //Q_ASSERT(dstRed <= 255); if (dstRed > 255) dstRed = 255; dst[PIXEL_RED] = dstRed; - Q_UINT32 dstGreen = totalGreen; + TQ_UINT32 dstGreen = totalGreen; //Q_ASSERT(dstGreen <= 255); if (dstGreen > 255) dstGreen = 255; dst[PIXEL_GREEN] = dstGreen; - Q_UINT32 dstBlue = totalBlue; + TQ_UINT32 dstBlue = totalBlue; //Q_ASSERT(dstBlue <= 255); if (dstBlue > 255) dstBlue = 255; dst[PIXEL_BLUE] = dstBlue; } -void KisRgbColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisRgbColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT64 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; - Q_INT32 totalWeight = 0, totalWeightTransparent = 0; + TQ_INT64 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; + TQ_INT32 totalWeight = 0, totalWeightTransparent = 0; while (nColors--) { - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { if((*colors)[PIXEL_ALPHA] == 0) @@ -150,100 +150,100 @@ void KisRgbColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, K if(totalWeightTransparent == 0) { if (channelFlags & KisChannelInfo::FLAG_COLOR) { - dst[PIXEL_RED] = CLAMP((totalRed / factor) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_GREEN] = CLAMP((totalGreen / factor) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_BLUE] = CLAMP((totalBlue / factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_RED] = CLAMP((totalRed / factor) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_GREEN] = CLAMP((totalGreen / factor) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_BLUE] = CLAMP((totalBlue / factor) + offset, 0, TQ_UINT8_MAX); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX); } } else if(totalWeightTransparent != totalWeight && (channelFlags & KisChannelInfo::FLAG_COLOR)) { if(totalWeight == factor) { - Q_INT64 a = ( totalWeight - totalWeightTransparent ); - dst[PIXEL_RED] = CLAMP((totalRed / a) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_GREEN] = CLAMP((totalGreen / a) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_BLUE] = CLAMP((totalBlue / a) + offset, 0, Q_UINT8_MAX); + TQ_INT64 a = ( totalWeight - totalWeightTransparent ); + dst[PIXEL_RED] = CLAMP((totalRed / a) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_GREEN] = CLAMP((totalGreen / a) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_BLUE] = CLAMP((totalBlue / a) + offset, 0, TQ_UINT8_MAX); } else { double a = totalWeight / ( factor * ( totalWeight - totalWeightTransparent ) ); // use double as it can saturate - dst[PIXEL_RED] = CLAMP( (Q_UINT8)(totalRed * a) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_GREEN] = CLAMP( (Q_UINT8)(totalGreen * a) + offset, 0, Q_UINT8_MAX); - dst[PIXEL_BLUE] = CLAMP( (Q_UINT8)(totalBlue * a) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_RED] = CLAMP( (TQ_UINT8)(totalRed * a) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_GREEN] = CLAMP( (TQ_UINT8)(totalGreen * a) + offset, 0, TQ_UINT8_MAX); + dst[PIXEL_BLUE] = CLAMP( (TQ_UINT8)(totalBlue * a) + offset, 0, TQ_UINT8_MAX); } } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX); } } -void KisRgbColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisRgbColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { - src[PIXEL_RED] = Q_UINT8_MAX - src[PIXEL_RED]; - src[PIXEL_GREEN] = Q_UINT8_MAX - src[PIXEL_GREEN]; - src[PIXEL_BLUE] = Q_UINT8_MAX - src[PIXEL_BLUE]; + src[PIXEL_RED] = TQ_UINT8_MAX - src[PIXEL_RED]; + src[PIXEL_GREEN] = TQ_UINT8_MAX - src[PIXEL_GREEN]; + src[PIXEL_BLUE] = TQ_UINT8_MAX - src[PIXEL_BLUE]; src += psize; } } -void KisRgbColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const +void KisRgbColorSpace::darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const { - Q_UINT32 pSize = pixelSize(); + TQ_UINT32 pSize = pixelSize(); while (nPixels--) { if (compensate) { - dst[PIXEL_RED] = (Q_INT8) QMIN(255,((src[PIXEL_RED] * shade) / (compensation * 255))); - dst[PIXEL_GREEN] = (Q_INT8) QMIN(255,((src[PIXEL_GREEN] * shade) / (compensation * 255))); - dst[PIXEL_BLUE] = (Q_INT8) QMIN(255,((src[PIXEL_BLUE] * shade) / (compensation * 255))); + dst[PIXEL_RED] = (TQ_INT8) TQMIN(255,((src[PIXEL_RED] * shade) / (compensation * 255))); + dst[PIXEL_GREEN] = (TQ_INT8) TQMIN(255,((src[PIXEL_GREEN] * shade) / (compensation * 255))); + dst[PIXEL_BLUE] = (TQ_INT8) TQMIN(255,((src[PIXEL_BLUE] * shade) / (compensation * 255))); } else { - dst[PIXEL_RED] = (Q_INT8) QMIN(255, (src[PIXEL_RED] * shade / 255)); - dst[PIXEL_BLUE] = (Q_INT8) QMIN(255, (src[PIXEL_BLUE] * shade / 255)); - dst[PIXEL_GREEN] = (Q_INT8) QMIN(255, (src[PIXEL_GREEN] * shade / 255)); + dst[PIXEL_RED] = (TQ_INT8) TQMIN(255, (src[PIXEL_RED] * shade / 255)); + dst[PIXEL_BLUE] = (TQ_INT8) TQMIN(255, (src[PIXEL_BLUE] * shade / 255)); + dst[PIXEL_GREEN] = (TQ_INT8) TQMIN(255, (src[PIXEL_GREEN] * shade / 255)); } dst += pSize; src += pSize; } } -Q_UINT8 KisRgbColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisRgbColorSpace::intensity8(const TQ_UINT8 * src) const { - return (Q_UINT8)((src[PIXEL_RED] * 0.30 + src[PIXEL_GREEN] * 0.59 + src[PIXEL_BLUE] * 0.11) + 0.5); + return (TQ_UINT8)((src[PIXEL_RED] * 0.30 + src[PIXEL_GREEN] * 0.59 + src[PIXEL_BLUE] * 0.11) + 0.5); } -QValueVector KisRgbColorSpace::channels() const +TQValueVector KisRgbColorSpace::channels() const { return m_channels; } -Q_UINT32 KisRgbColorSpace::nChannels() const +TQ_UINT32 KisRgbColorSpace::nChannels() const { return MAX_CHANNEL_RGBA; } -Q_UINT32 KisRgbColorSpace::nColorChannels() const +TQ_UINT32 KisRgbColorSpace::nColorChannels() const { return MAX_CHANNEL_RGB; } -Q_UINT32 KisRgbColorSpace::pixelSize() const +TQ_UINT32 KisRgbColorSpace::pixelSize() const { return MAX_CHANNEL_RGBA; } -QImage KisRgbColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, +TQImage KisRgbColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent, float /*exposure*/) + TQ_INT32 renderingIntent, float /*exposure*/) { Q_ASSERT(data); - QImage img = QImage(const_cast(data), width, height, 32, 0, 0, QImage::LittleEndian); + TQImage img = TQImage(const_cast(data), width, height, 32, 0, 0, TQImage::LittleEndian); img.setAlphaBuffer(true); // XXX: The previous version of this code used the quantum data directly // as an optimisation. We're introducing a copy overhead here which could @@ -263,28 +263,28 @@ QImage KisRgbColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I -void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, - const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, - const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, - Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, + const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -294,16 +294,16 @@ void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, } if (srcAlpha == OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(TQ_UINT8)); } else { - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -314,7 +314,7 @@ void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, } if (srcBlend == OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(TQ_UINT8)); } else { dst[PIXEL_RED] = UINT8_BLEND(src[PIXEL_RED], dst[PIXEL_RED], srcBlend); dst[PIXEL_GREEN] = UINT8_BLEND(src[PIXEL_GREEN], dst[PIXEL_GREEN], srcBlend); @@ -331,35 +331,35 @@ void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, - const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, - const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, - Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeAlphaDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, + const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (opacity != OPACITY_OPAQUE) { @@ -368,7 +368,7 @@ void KisRgbColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRow if (srcAlpha != OPACITY_TRANSPARENT && srcAlpha >= dstAlpha) { dst[PIXEL_ALPHA] = srcAlpha; - memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(TQ_UINT8)); } columns--; @@ -379,34 +379,34 @@ void KisRgbColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRow rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } @@ -416,12 +416,12 @@ void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -431,8 +431,8 @@ void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr } } - Q_UINT8 srcColor = src[PIXEL_RED]; - Q_UINT8 dstColor = dst[PIXEL_RED]; + TQ_UINT8 srcColor = src[PIXEL_RED]; + TQ_UINT8 dstColor = dst[PIXEL_RED]; srcColor = UINT8_MULT(srcColor, dstColor); @@ -461,33 +461,33 @@ void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -496,12 +496,12 @@ void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -513,12 +513,12 @@ void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX); + srcColor = TQMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -532,33 +532,33 @@ void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -567,12 +567,12 @@ void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -584,12 +584,12 @@ void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = UINT8_MAX - UINT8_MULT(UINT8_MAX - dstColor, UINT8_MAX - srcColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -603,33 +603,33 @@ void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } @@ -639,12 +639,12 @@ void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -656,12 +656,12 @@ void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; srcColor = UINT8_MULT(dstColor, dstColor + UINT8_MULT(2 * srcColor, UINT8_MAX - dstColor)); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -675,33 +675,33 @@ void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } @@ -711,12 +711,12 @@ void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -728,12 +728,12 @@ void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX); + srcColor = TQMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -747,33 +747,33 @@ void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -782,12 +782,12 @@ void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -799,13 +799,13 @@ void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1)) / (srcColor + 1), UINT8_MAX); + srcColor = TQMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1)) / (srcColor + 1), UINT8_MAX); if (UINT8_MAX - srcColor > UINT8_MAX) srcColor = UINT8_MAX; - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -819,33 +819,33 @@ void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -854,12 +854,12 @@ void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -871,12 +871,12 @@ void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -890,33 +890,33 @@ void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -925,12 +925,12 @@ void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -942,12 +942,12 @@ void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) { - Q_UINT8 srcColor = src[channel]; - Q_UINT8 dstColor = dst[channel]; + TQ_UINT8 srcColor = src[channel]; + TQ_UINT8 dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); - Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -961,33 +961,33 @@ void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -996,12 +996,12 @@ void KisRgbColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -1044,33 +1044,33 @@ void KisRgbColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -1079,12 +1079,12 @@ void KisRgbColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowS srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -1127,33 +1127,33 @@ void KisRgbColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowS rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -1162,12 +1162,12 @@ void KisRgbColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -1210,33 +1210,33 @@ void KisRgbColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisRgbColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - Q_INT32 columns = numColumns; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + TQ_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - srcAlpha = QMIN(srcAlpha, dstAlpha); + srcAlpha = TQMIN(srcAlpha, dstAlpha); - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -1245,12 +1245,12 @@ void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity); } - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -1274,9 +1274,9 @@ void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rgb_to_hls(src[PIXEL_RED], src[PIXEL_GREEN], src[PIXEL_BLUE], &srcHue, &srcLightness, &srcSaturation); rgb_to_hls(dstRed, dstGreen, dstBlue, &dstHue, &dstLightness, &dstSaturation); - Q_UINT8 srcRed; - Q_UINT8 srcGreen; - Q_UINT8 srcBlue; + TQ_UINT8 srcRed; + TQ_UINT8 srcGreen; + TQ_UINT8 srcBlue; hls_to_rgb(srcHue, dstLightness, srcSaturation, &srcRed, &srcGreen, &srcBlue); @@ -1293,59 +1293,59 @@ void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisRgbColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT8 /*opacity*/) +void KisRgbColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT8 /*opacity*/) { - Q_INT32 i; - Q_UINT8 srcAlpha; + TQ_INT32 i; + TQ_UINT8 srcAlpha; while (rows-- > 0) { - const Q_UINT8 *s = src; - Q_UINT8 *d = dst; - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *s = src; + TQ_UINT8 *d = dst; + const TQ_UINT8 *tqmask = srcAlphaMask; for (i = cols; i > 0; i--, s+=MAX_CHANNEL_RGBA, d+=MAX_CHANNEL_RGBA) { srcAlpha = s[PIXEL_ALPHA]; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *tqmask); + tqmask++; } d[PIXEL_ALPHA] = UINT8_MULT(srcAlpha, d[PIXEL_ALPHA]); } dst += dstRowSize; if(srcAlphaMask) - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; src += srcRowSize; } } -void KisRgbColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisRgbColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { @@ -1354,10 +1354,10 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst, // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: - compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -1387,16 +1387,16 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst, compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COPY_RED: compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -1431,22 +1431,22 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -1455,19 +1455,19 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst, compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; default: break; diff --git a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h index 40718251..37c54d7f 100644 --- a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h +++ b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h @@ -24,14 +24,14 @@ #include "kis_u8_base_colorspace.h" #include "koffice_export.h" -const Q_UINT8 PIXEL_BLUE = 0; -const Q_UINT8 PIXEL_GREEN = 1; -const Q_UINT8 PIXEL_RED = 2; -const Q_UINT8 PIXEL_ALPHA = 3; +const TQ_UINT8 PIXEL_BLUE = 0; +const TQ_UINT8 PIXEL_GREEN = 1; +const TQ_UINT8 PIXEL_RED = 2; +const TQ_UINT8 PIXEL_ALPHA = 3; class KRITATOOL_EXPORT KisRgbColorSpace : public KisU8BaseColorSpace { public: - KisRgbColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisRgbColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisRgbColorSpace(); virtual bool willDegrade(ColorSpaceIndependence) @@ -41,55 +41,55 @@ public: public: - void setPixel(Q_UINT8 *pixel, Q_UINT8 red, Q_UINT8 green, Q_UINT8 blue, Q_UINT8 alpha) const; - void getPixel(const Q_UINT8 *pixel, Q_UINT8 *red, Q_UINT8 *green, Q_UINT8 *blue, Q_UINT8 *alpha) const; + void setPixel(TQ_UINT8 *pixel, TQ_UINT8 red, TQ_UINT8 green, TQ_UINT8 blue, TQ_UINT8 alpha) const; + void getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *red, TQ_UINT8 *green, TQ_UINT8 *blue, TQ_UINT8 *alpha) const; - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const; - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile = 0, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL, float exposure = 0.0f); virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeAlphaDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeAlphaDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); }; class KisRgbColorSpaceFactory : public KisColorSpaceFactory @@ -104,13 +104,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_BGRA_8; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_BGRA_8; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile * p) { return new KisRgbColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile * p) { return new KisRgbColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; }; }; #endif // KIS_STRATEGY_COLORSPACE_RGB_H_ diff --git a/krita/colorspaces/rgb_u8/rgb_plugin.cc b/krita/colorspaces/rgb_u8/rgb_plugin.cc index 018c1491..61384632 100644 --- a/krita/colorspaces/rgb_u8/rgb_plugin.cc +++ b/krita/colorspaces/rgb_u8/rgb_plugin.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -43,14 +43,14 @@ typedef KGenericFactory RGBPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritargbplugin, RGBPluginFactory( "krita" ) ) -RGBPlugin::RGBPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +RGBPlugin::RGBPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(RGBPluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast(parent); + KisColorSpaceFactoryRegistry * f = dynamic_cast(tqparent); KisProfile *defProfile = new KisProfile(cmsCreate_sRGBProfile()); f->addProfile(defProfile); diff --git a/krita/colorspaces/rgb_u8/rgb_plugin.h b/krita/colorspaces/rgb_u8/rgb_plugin.h index 262d0bb4..08ccd890 100644 --- a/krita/colorspaces/rgb_u8/rgb_plugin.h +++ b/krita/colorspaces/rgb_u8/rgb_plugin.h @@ -27,8 +27,9 @@ class RGBPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - RGBPlugin(QObject *parent, const char *name, const QStringList &); + RGBPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~RGBPlugin(); }; diff --git a/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp b/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp index 7ad4cfae..1d3526f4 100644 --- a/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp +++ b/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp @@ -51,36 +51,36 @@ void KisRgbColorSpaceTester::testBasics() KisProfile *defProfile = new KisProfile(cmsCreate_sRGBProfile()); KisRgbColorSpace *cs = new KisRgbColorSpace(defProfile); - Q_UINT8 pixel[NUM_CHANNELS]; + TQ_UINT8 pixel[NUM_CHANNELS]; pixel[PIXEL_RED] = 255; pixel[PIXEL_GREEN] = 128; pixel[PIXEL_BLUE] = 64; pixel[PIXEL_ALPHA] = 0; - QString valueText = cs->channelValueText(pixel, RED_CHANNEL); - CHECK(valueText, QString("255")); + TQString valueText = cs->channelValueText(pixel, RED_CHANNEL); + CHECK(valueText, TQString("255")); valueText = cs->channelValueText(pixel, GREEN_CHANNEL); - CHECK(valueText, QString("128")); + CHECK(valueText, TQString("128")); valueText = cs->channelValueText(pixel, BLUE_CHANNEL); - CHECK(valueText, QString("64")); + CHECK(valueText, TQString("64")); valueText = cs->channelValueText(pixel, ALPHA_CHANNEL); - CHECK(valueText, QString("0")); + CHECK(valueText, TQString("0")); valueText = cs->normalisedChannelValueText(pixel, RED_CHANNEL); - CHECK(valueText, QString().setNum(1.0)); + CHECK(valueText, TQString().setNum(1.0)); valueText = cs->normalisedChannelValueText(pixel, GREEN_CHANNEL); - CHECK(valueText, QString().setNum(128.0 / 255.0)); + CHECK(valueText, TQString().setNum(128.0 / 255.0)); valueText = cs->normalisedChannelValueText(pixel, BLUE_CHANNEL); - CHECK(valueText, QString().setNum(64.0 / 255.0)); + CHECK(valueText, TQString().setNum(64.0 / 255.0)); valueText = cs->normalisedChannelValueText(pixel, ALPHA_CHANNEL); - CHECK(valueText, QString().setNum(0.0)); + CHECK(valueText, TQString().setNum(0.0)); cs->setPixel(pixel, 128, 192, 64, 99); CHECK((uint)pixel[PIXEL_RED], 128u); @@ -88,10 +88,10 @@ void KisRgbColorSpaceTester::testBasics() CHECK((uint)pixel[PIXEL_BLUE], 64u); CHECK((uint)pixel[PIXEL_ALPHA], 99u); - Q_UINT8 red; - Q_UINT8 green; - Q_UINT8 blue; - Q_UINT8 alpha; + TQ_UINT8 red; + TQ_UINT8 green; + TQ_UINT8 blue; + TQ_UINT8 alpha; cs->getPixel(pixel, &red, &green, &blue, &alpha); CHECK((uint)red, 128u); @@ -107,9 +107,9 @@ void KisRgbColorSpaceTester::testMixColors() // Test mixColors. - Q_UINT8 pixel1[4]; - Q_UINT8 pixel2[4]; - Q_UINT8 outputPixel[4]; + TQ_UINT8 pixel1[4]; + TQ_UINT8 pixel2[4]; + TQ_UINT8 outputPixel[4]; pixel1[PIXEL_RED] = 255; pixel1[PIXEL_GREEN] = 255; @@ -121,8 +121,8 @@ void KisRgbColorSpaceTester::testMixColors() pixel2[PIXEL_BLUE] = 0; pixel2[PIXEL_ALPHA] = 0; - const Q_UINT8 *pixelPtrs[2]; - Q_UINT8 weights[2]; + const TQ_UINT8 *pixelPtrs[2]; + TQ_UINT8 weights[2]; pixelPtrs[0] = pixel1; pixelPtrs[1] = pixel2; diff --git a/krita/colorspaces/wet/kis_texture_filter.cc b/krita/colorspaces/wet/kis_texture_filter.cc index 1fc2e4d3..57ff1db0 100644 --- a/krita/colorspaces/wet/kis_texture_filter.cc +++ b/krita/colorspaces/wet/kis_texture_filter.cc @@ -25,7 +25,7 @@ #include "kis_texture_painter.h" #include "kis_texture_filter.h" -void WetPaintDevAction::act(KisPaintDeviceSP device, Q_INT32 w, Q_INT32 h) const { +void WetPaintDevAction::act(KisPaintDeviceSP device, TQ_INT32 w, TQ_INT32 h) const { KisColorSpace * cs = device->colorSpace(); if (cs->id() != KisID("WET","")) { diff --git a/krita/colorspaces/wet/kis_texture_filter.h b/krita/colorspaces/wet/kis_texture_filter.h index fb2ef021..b4b32825 100644 --- a/krita/colorspaces/wet/kis_texture_filter.h +++ b/krita/colorspaces/wet/kis_texture_filter.h @@ -21,7 +21,7 @@ #ifndef _TEXTURE_FILTER_H #define _TEXTURE_FILTER_H -#include +#include #include #include @@ -30,9 +30,9 @@ class WetPaintDevAction : public KisPaintDeviceAction { public: virtual ~WetPaintDevAction() {} - virtual void act(KisPaintDeviceSP device, Q_INT32 w = 0, Q_INT32 h = 0) const; - virtual QString name() const { return i18n("Wet Texture"); } - virtual QString description() const { return i18n("Add a texture to the wet canvas"); } + virtual void act(KisPaintDeviceSP device, TQ_INT32 w = 0, TQ_INT32 h = 0) const; + virtual TQString name() const { return i18n("Wet Texture"); } + virtual TQString description() const { return i18n("Add a texture to the wet canvas"); } }; #endif // _TEXTURE_FILTER_H diff --git a/krita/colorspaces/wet/kis_texture_painter.cc b/krita/colorspaces/wet/kis_texture_painter.cc index a98038e6..4b11b989 100644 --- a/krita/colorspaces/wet/kis_texture_painter.cc +++ b/krita/colorspaces/wet/kis_texture_painter.cc @@ -44,7 +44,7 @@ KisTexturePainter::KisTexturePainter(KisPaintDeviceSP device) : super(device) m_blurh = 0.7; } -void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisTexturePainter::createTexture( TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { double hscale = 128 * m_height / RAND_MAX; @@ -56,7 +56,7 @@ void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT while (!i.isDone()) { WetPack* pack = reinterpret_cast(i.rawData()); WetPix* w = &(pack->adsorb); - w->h = ( Q_UINT16)floor(128 + hscale * rand()); + w->h = ( TQ_UINT16)floor(128 + hscale * rand()); ++i; } } @@ -85,7 +85,7 @@ void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT } } - // Vertical blurring was commented out in wetdreams, the effect seems to be achievable + //Qt::Vertical blurring was commented out in wetdreams, the effect seems to be achievable // without this. // I think this is because with blur in one direction, you get more the effect of // having 'fibers' in your paper diff --git a/krita/colorspaces/wet/kis_texture_painter.h b/krita/colorspaces/wet/kis_texture_painter.h index a3323492..00bcd135 100644 --- a/krita/colorspaces/wet/kis_texture_painter.h +++ b/krita/colorspaces/wet/kis_texture_painter.h @@ -31,7 +31,7 @@ public: KisTexturePainter(); KisTexturePainter(KisPaintDeviceSP device); - void createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + void createTexture( TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); private: double m_blurh, m_height; diff --git a/krita/colorspaces/wet/kis_wet_colorspace.cc b/krita/colorspaces/wet/kis_wet_colorspace.cc index 4ca96eb5..7d6f0d67 100644 --- a/krita/colorspaces/wet/kis_wet_colorspace.cc +++ b/krita/colorspaces/wet/kis_wet_colorspace.cc @@ -22,7 +22,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -104,13 +104,13 @@ void wetPixFromDouble(WetPix * dst, WetPixDbl *src) int getH(int r, int g, int b) { int h, s, v; - QColor c(r,g, b); + TQColor c(r,g, b); c.getHsv(&h, &s, &v); return h; } -KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisAbstractColorSpace(KisID("WET", i18n("Watercolors")), 0, icMaxEnumData, parent, p) +KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisAbstractColorSpace(KisID("WET", i18n("Watercolors")), 0, icMaxEnumData, tqparent, p) { wet_init_render_tab(); @@ -148,7 +148,7 @@ KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisPro m_channels.push_back(new KisChannelInfo(i18n("Adsorbed Water Volume"), "W", 14, KisChannelInfo::SUBSTANCE, KisChannelInfo::UINT16)); m_channels.push_back(new KisChannelInfo(i18n("Adsorbed Paper Height"), "H", 15, KisChannelInfo::SUBSTANCE, KisChannelInfo::UINT16)); - // Store the hue; we'll pick the paintbox color that closest to the given QColor's hue. + // Store the hue; we'll pick the paintbox color that closest to the given TQColor's hue. m_conversionMap[getH(240, 32, 160)] = m_paintbox[0]; // Quinacridone Rose m_conversionMap[getH(159, 88, 43)] = m_paintbox[1]; // Indian Red m_conversionMap[getH(254, 220, 64)] = m_paintbox[2]; // Cadmium Yellow @@ -173,15 +173,15 @@ KisWetColorSpace::~KisWetColorSpace() { } -void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /*profile*/) +void KisWetColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * /*profile*/) { WetPack* p = reinterpret_cast(dst); int h = getH(c.red(), c.green(), c.blue()); int delta = 256; int key = 0; - QMap::Iterator it; - QMap::Iterator end = m_conversionMap.end(); + TQMap::Iterator it; + TQMap::Iterator end = m_conversionMap.end(); for (it = m_conversionMap.begin(); it != end; ++it) { if (abs(it.key() - h) < delta) { delta = abs(it.key() - h); @@ -189,8 +189,8 @@ void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /* } } - // Translate the special QCOlors from our paintbox to wetpaint paints. - if (m_conversionMap.contains(key)) { + // Translate the special TQCOlors from our paintbox to wetpaint paints. + if (m_conversionMap.tqcontains(key)) { (*p).paint = m_conversionMap[key]; (*p).adsorb = m_conversionMap[key]; // or maybe best add water here? } else { @@ -200,46 +200,46 @@ void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /* } } -void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 /*opacity*/, Q_UINT8 *dst, KisProfile * /*profile*/) +void KisWetColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 /*opacity*/, TQ_UINT8 *dst, KisProfile * /*profile*/) { - fromQColor(c, dst); + fromTQColor(c, dst); } - Q_UINT8 KisWetColorSpace::getAlpha(const Q_UINT8 */*pixel*/) const + TQ_UINT8 KisWetColorSpace::getAlpha(const TQ_UINT8 */*pixel*/) const { return OPACITY_OPAQUE; } -void KisWetColorSpace::setAlpha( Q_UINT8 * /*pixels*/, Q_UINT8 /*alpha*/, Q_INT32 /*nPixels*/) const +void KisWetColorSpace::setAlpha( TQ_UINT8 * /*pixels*/, TQ_UINT8 /*alpha*/, TQ_INT32 /*nPixels*/) const { } -void KisWetColorSpace::multiplyAlpha( Q_UINT8 * /*pixels*/, Q_UINT8 /*alpha*/, Q_INT32 /*nPixels*/) +void KisWetColorSpace::multiplyAlpha( TQ_UINT8 * /*pixels*/, TQ_UINT8 /*alpha*/, TQ_INT32 /*nPixels*/) { } -void KisWetColorSpace::applyAlphaU8Mask( Q_UINT8 * /*pixels*/, Q_UINT8 * /*alpha*/, Q_INT32 /*nPixels*/) +void KisWetColorSpace::applyAlphaU8Mask( TQ_UINT8 * /*pixels*/, TQ_UINT8 * /*alpha*/, TQ_INT32 /*nPixels*/) { } -void KisWetColorSpace::applyInverseAlphaU8Mask( Q_UINT8 * /*pixels*/, Q_UINT8 * /*alpha*/, Q_INT32 /*nPixels*/) +void KisWetColorSpace::applyInverseAlphaU8Mask( TQ_UINT8 * /*pixels*/, TQ_UINT8 * /*alpha*/, TQ_INT32 /*nPixels*/) { } - Q_UINT8 KisWetColorSpace::scaleToU8(const Q_UINT8 * /*srcPixel*/, Q_INT32 /*channelPos*/) + TQ_UINT8 KisWetColorSpace::scaleToU8(const TQ_UINT8 * /*srcPixel*/, TQ_INT32 /*channelPos*/) { return 0; } -Q_UINT16 KisWetColorSpace::scaleToU16(const Q_UINT8 * /*srcPixel*/, Q_INT32 /*channelPos*/) +TQ_UINT16 KisWetColorSpace::scaleToU16(const TQ_UINT8 * /*srcPixel*/, TQ_INT32 /*channelPos*/) { return 0; } -void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * /*profile*/) +void KisWetColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * /*profile*/) { - Q_UINT8 * rgb = new Q_UINT8[3]; + TQ_UINT8 * rgb = new TQ_UINT8[3]; Q_CHECK_PTR(rgb); memset(rgb, 255, 3); @@ -259,37 +259,37 @@ void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * /*pr delete[]rgb; } -void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 */*opacity*/, KisProfile * /*profile*/) +void KisWetColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 */*opacity*/, KisProfile * /*profile*/) { - toQColor(src, c); + toTQColor(src, c); } -void KisWetColorSpace::mixColors(const Q_UINT8 **/*colors*/, const Q_UINT8 */*weights*/, Q_UINT32 /*nColors*/, Q_UINT8 */*dst*/) const +void KisWetColorSpace::mixColors(const TQ_UINT8 **/*colors*/, const TQ_UINT8 */*weights*/, TQ_UINT32 /*nColors*/, TQ_UINT8 */*dst*/) const { } -QValueVector KisWetColorSpace::channels() const +TQValueVector KisWetColorSpace::channels() const { return m_channels; } - Q_UINT32 KisWetColorSpace::nChannels() const + TQ_UINT32 KisWetColorSpace::nChannels() const { return 16; } - Q_UINT32 KisWetColorSpace::nColorChannels() const + TQ_UINT32 KisWetColorSpace::nColorChannels() const { return 12; } - Q_UINT32 KisWetColorSpace::nSubstanceChannels() const + TQ_UINT32 KisWetColorSpace::nSubstanceChannels() const { return 4; } - Q_UINT32 KisWetColorSpace::pixelSize() const + TQ_UINT32 KisWetColorSpace::pixelSize() const { return 32; // This color strategy wants an unsigned short for each // channel, and every pixel consists of two wetpix structs @@ -300,14 +300,14 @@ QValueVector KisWetColorSpace::channels() const // XXX: use profiles to display correctly on calibrated displays. -QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, +TQImage KisWetColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * /*dstProfile*/, - Q_INT32 /*renderingIntent*/, float /*exposure*/) + TQ_INT32 /*renderingIntent*/, float /*exposure*/) { - QImage img(width, height, 32); + TQImage img(width, height, 32); - Q_UINT8 *rgb = (Q_UINT8*) img.bits(); + TQ_UINT8 *rgb = (TQ_UINT8*) img.bits(); const WetPack* wetData = reinterpret_cast(data); // Clear to white -- the following code actually composits the contents of the @@ -316,7 +316,7 @@ QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I memset(rgb, 255, width * height * 4); // Composite the two layers in each pixelSize - Q_INT32 i = 0; + TQ_INT32 i = 0; while ( i < width * height) { // First the adsorption layers WetPack* wp = const_cast(&wetData[i]); // XXX don't do these things! @@ -338,31 +338,31 @@ QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I } i++; - rgb += sizeof( Q_UINT32); // Because the QImage is 4 bytes deep. + rgb += sizeof( TQ_UINT32); // Because the TQImage is 4 bytes deep. } return img; } -void KisWetColorSpace::bitBlt( Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 */*srcAlphaMask*/, - Q_INT32 /*maskRowStride*/, - Q_UINT8 /*opacity*/, - Q_INT32 rows, - Q_INT32 cols, +void KisWetColorSpace::bitBlt( TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 */*srcAlphaMask*/, + TQ_INT32 /*tqmaskRowStride*/, + TQ_UINT8 /*opacity*/, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { if (rows <= 0 || cols <= 0) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 linesize = pixelSize() * cols; + TQ_INT32 linesize = pixelSize() * cols; d = dst; s = src; @@ -400,7 +400,7 @@ void KisWetColorSpace::wet_init_render_tab() double d; int a, b; - wet_render_tab = new Q_UINT32[4096]; + wet_render_tab = new TQ_UINT32[4096]; Q_CHECK_PTR(wet_render_tab); for (i = 0; i < 4096; i++) @@ -418,7 +418,7 @@ void KisWetColorSpace::wet_init_render_tab() } -void KisWetColorSpace::wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet) +void KisWetColorSpace::wet_composite(RGBMode m, TQ_UINT8 *rgb, WetPix * wet) { int r, g, b; int d, w; @@ -467,7 +467,7 @@ void KisWetColorSpace::wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet) rgb[0] = b; } -void KisWetColorSpace::wet_render_wetness( Q_UINT8 * rgb, WetPack * pack) +void KisWetColorSpace::wet_render_wetness( TQ_UINT8 * rgb, WetPack * pack) { int highlight = 255 - (pack->paint.w >> 1); @@ -487,27 +487,27 @@ KisCompositeOpList KisWetColorSpace::userVisiblecompositeOps() const return list; } -QString KisWetColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisWetColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); - const Q_UINT16 *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + const TQ_UINT16 *pixel = reinterpret_cast(U8_pixel); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(pixel[channelPosition]); + return TQString().setNum(pixel[channelPosition]); } -QString KisWetColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisWetColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); - const Q_UINT16 *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + const TQ_UINT16 *pixel = reinterpret_cast(U8_pixel); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(static_cast(pixel[channelPosition]) / UINT16_MAX); + return TQString().setNum(static_cast(pixel[channelPosition]) / UINT16_MAX); } -QValueList KisWetColorSpace::createBackgroundFilters() +TQValueList KisWetColorSpace::createBackgroundFilters() { - QValueList filterList; + TQValueList filterList; KisFilter * f = new WetPhysicsFilter(); filterList << f; return filterList; diff --git a/krita/colorspaces/wet/kis_wet_colorspace.h b/krita/colorspaces/wet/kis_wet_colorspace.h index 9c66c52e..3d6c6e57 100644 --- a/krita/colorspaces/wet/kis_wet_colorspace.h +++ b/krita/colorspaces/wet/kis_wet_colorspace.h @@ -18,10 +18,10 @@ #ifndef KIS_STRATEGY_COLORSPACE_WET_H_ #define KIS_STRATEGY_COLORSPACE_WET_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "kis_global.h" #include "kis_abstract_colorspace.h" @@ -53,17 +53,17 @@ typedef struct _WetPack WetPack; */ struct _WetPix { - Q_UINT16 rd; /* Total red channel concentration */ - Q_UINT16 rw; /* Myth-red concentration */ + TQ_UINT16 rd; /* Total red channel concentration */ + TQ_UINT16 rw; /* Myth-red concentration */ - Q_UINT16 gd; /* Total green channel concentration */ - Q_UINT16 gw; /* Myth-green concentration */ + TQ_UINT16 gd; /* Total green channel concentration */ + TQ_UINT16 gw; /* Myth-green concentration */ - Q_UINT16 bd; /* Total blue channel concentration */ - Q_UINT16 bw; /* Myth-blue concentration */ + TQ_UINT16 bd; /* Total blue channel concentration */ + TQ_UINT16 bw; /* Myth-blue concentration */ - Q_UINT16 w; /* Water volume */ - Q_UINT16 h; /* Height of paper surface XXX: This might just as well be a single + TQ_UINT16 w; /* Water volume */ + TQ_UINT16 h; /* Height of paper surface XXX: This might just as well be a single channel in our colour model that has two of these wetpix structs for every paint device pixels*/ }; @@ -92,7 +92,7 @@ void wetPixFromDouble(WetPix * dst, WetPixDbl *src); class KisWetColorSpace : public KisAbstractColorSpace { public: - KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisWetColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisWetColorSpace(); @@ -111,40 +111,40 @@ public: // Semi-clever: we have only fifteen wet paint colors that are mapped to the // qcolors that are put in the painter by the special wet paint palette. Other - // QColors are mapped to plain water... - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + // TQColors are mapped to plain water... + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const; - virtual void setAlpha( Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; - virtual void multiplyAlpha( Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels); + virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const; + virtual void setAlpha( TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; + virtual void multiplyAlpha( TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels); - virtual void applyAlphaU8Mask( Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); - virtual void applyInverseAlphaU8Mask( Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); + virtual void applyAlphaU8Mask( TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); + virtual void applyInverseAlphaU8Mask( TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos); - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos); + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 nSubstanceChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 nSubstanceChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL, float exposure = 0.0f); - virtual QValueList createBackgroundFilters(); + virtual TQValueList createBackgroundFilters(); virtual KisCompositeOpList userVisiblecompositeOps() const; @@ -162,15 +162,15 @@ public: dst->w = src1->w + src2->w; } protected: - virtual void bitBlt( Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt( TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); private: @@ -180,15 +180,15 @@ private: /// Convert a single pixel from its wet representation to rgb: internal rgb: rgb[0] = R, etc typedef enum { RGB, BGR } RGBMode; - void wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet); + void wet_composite(RGBMode m, TQ_UINT8 *rgb, WetPix * wet); - void wet_render_wetness( Q_UINT8 * rgb, WetPack * pack); + void wet_render_wetness( TQ_UINT8 * rgb, WetPack * pack); private: - Q_UINT32 * wet_render_tab; + TQ_UINT32 * wet_render_tab; - QStringList m_paintNames; - QMap m_conversionMap; + TQStringList m_paintNames; + TQMap m_conversionMap; bool m_paintwetness; int phase, phasebig; @@ -207,13 +207,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return 0; }; + virtual TQ_UINT32 colorSpaceType() { return 0; }; virtual icColorSpaceSignature colorSpaceSignature() { return icMaxEnumData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisWetColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisWetColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return ""; }; + virtual TQString defaultProfile() { return ""; }; }; #endif // KIS_STRATEGY_COLORSPACE_WET_H_ diff --git a/krita/colorspaces/wet/kis_wet_palette_widget.cc b/krita/colorspaces/wet/kis_wet_palette_widget.cc index ae405f94..21876a39 100644 --- a/krita/colorspaces/wet/kis_wet_palette_widget.cc +++ b/krita/colorspaces/wet/kis_wet_palette_widget.cc @@ -19,18 +19,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#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 @@ -46,140 +46,140 @@ #include "kis_wet_colorspace.h" #include "kis_wet_palette_widget.h" -KisWetPaletteWidget::KisWetPaletteWidget(QWidget *parent, const char *name) : super(parent, name) +KisWetPaletteWidget::KisWetPaletteWidget(TQWidget *tqparent, const char *name) : super(tqparent, name) { m_subject = 0; - QVBoxLayout * vl = new QVBoxLayout(this, 0, -1, "main layout"); + TQVBoxLayout * vl = new TQVBoxLayout(this, 0, -1, "main tqlayout"); - QGridLayout * l = new QGridLayout(vl, 2, 8, 2, "color wells grid"); + TQGridLayout * l = new TQGridLayout(vl, 2, 8, 2, "color wells grid"); KisColorCup * b; int WIDTH = 24; int HEIGHT = 24; b = new KisColorCup(this); - b->setColor( QColor(240, 32, 160) ); + b->setColor( TQColor(240, 32, 160) ); l->addWidget(b, 0, 0); - QToolTip::add(b, i18n("Quinacridone Rose")); + TQToolTip::add(b, i18n("Quinacridone Rose")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(159, 88, 43)); + b->setColor(TQColor(159, 88, 43)); l->addWidget(b, 0, 1); - QToolTip::add(b,i18n("Indian Red")); + TQToolTip::add(b,i18n("Indian Red")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor( QColor(254, 220, 64) ); + b->setColor( TQColor(254, 220, 64) ); l->addWidget(b, 0, 2); - QToolTip::add(b,i18n("Cadmium Yellow")); + TQToolTip::add(b,i18n("Cadmium Yellow")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(36, 180, 32)); + b->setColor(TQColor(36, 180, 32)); l->addWidget(b, 0, 3); - QToolTip::add(b,i18n("Hookers Green")); + TQToolTip::add(b,i18n("Hookers Green")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(16, 185, 215)); + b->setColor(TQColor(16, 185, 215)); l->addWidget(b, 0, 4); - QToolTip::add(b,i18n("Cerulean Blue")); + TQToolTip::add(b,i18n("Cerulean Blue")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(96, 32, 8)); + b->setColor(TQColor(96, 32, 8)); l->addWidget(b, 0, 5); - QToolTip::add(b,i18n("Burnt Umber")); + TQToolTip::add(b,i18n("Burnt Umber")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(254, 96, 8)); + b->setColor(TQColor(254, 96, 8)); l->addWidget(b, 0, 6); - QToolTip::add(b,i18n("Cadmium Red")); + TQToolTip::add(b,i18n("Cadmium Red")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(255, 136, 8)); + b->setColor(TQColor(255, 136, 8)); l->addWidget(b, 0, 7); - QToolTip::add(b,i18n("Brilliant Orange")); + TQToolTip::add(b,i18n("Brilliant Orange")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(240, 199, 8)); + b->setColor(TQColor(240, 199, 8)); l->addWidget(b, 1, 0); - QToolTip::add(b,i18n("Hansa Yellow")); + TQToolTip::add(b,i18n("Hansa Yellow")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(96, 170, 130)); + b->setColor(TQColor(96, 170, 130)); l->addWidget(b, 1, 1); - QToolTip::add(b,i18n("Phthalo Green")); + TQToolTip::add(b,i18n("Phthalo Green")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(48, 32, 170)); + b->setColor(TQColor(48, 32, 170)); l->addWidget(b, 1, 2); - QToolTip::add(b,i18n("French Ultramarine")); + TQToolTip::add(b,i18n("French Ultramarine")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(118, 16, 135)); + b->setColor(TQColor(118, 16, 135)); l->addWidget(b, 1, 3); - QToolTip::add(b,i18n("Interference Lilac")); + TQToolTip::add(b,i18n("Interference Lilac")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(254, 254, 254)); + b->setColor(TQColor(254, 254, 254)); l->addWidget(b, 1, 4); - QToolTip::add(b,i18n("Titanium White")); + TQToolTip::add(b,i18n("Titanium White")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(64, 64, 74)); + b->setColor(TQColor(64, 64, 74)); l->addWidget(b, 1, 5); - QToolTip::add(b,i18n("Ivory Black")); + TQToolTip::add(b,i18n("Ivory Black")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(255, 255, 255)); + b->setColor(TQColor(255, 255, 255)); l->addWidget(b, 1, 6); - QToolTip::add(b,i18n("Pure Water")); + TQToolTip::add(b,i18n("Pure Water")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); - QGridLayout * g2 = new QGridLayout(vl, 2, 2); + TQGridLayout * g2 = new TQGridLayout(vl, 2, 2); - QLabel * label = new QLabel(i18n("Paint strength:"), this); + TQLabel * label = new TQLabel(i18n("Paint strength:"), this); g2->addWidget(label, 0, 0); m_strength = new KDoubleNumInput(0.0, 2.0, 1.0, 0.1, 1, this); m_strength->setRange(0.0, 2.0, 0.1, true); - connect(m_strength, SIGNAL(valueChanged(double)), this, SLOT(slotStrengthChanged(double))); + connect(m_strength, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotStrengthChanged(double))); g2->addWidget(m_strength, 0, 1); - label = new QLabel(i18n("Wetness:"), this); + label = new TQLabel(i18n("Wetness:"), this); g2->addWidget(label, 1, 0); m_wetness = new KIntNumInput(16, this); - connect(m_wetness, SIGNAL(valueChanged(int)), this, SLOT(slotWetnessChanged(int))); + connect(m_wetness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWetnessChanged(int))); m_wetness->setRange(0, 16, true); g2->addWidget(m_wetness, 1, 1); - g2->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum)); + g2->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); } @@ -189,17 +189,17 @@ void KisWetPaletteWidget::update(KisCanvasSubject *subject) } -void KisWetPaletteWidget::slotFGColorSelected(const QColor& c) +void KisWetPaletteWidget::slotFGColorSelected(const TQColor& c) { KisWetColorSpace* cs = dynamic_cast(KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("WET", ""), "")); Q_ASSERT(cs); WetPack pack; - Q_UINT8* data = reinterpret_cast< Q_UINT8*>(&pack); - cs->fromQColor(c, data); + TQ_UINT8* data = reinterpret_cast< TQ_UINT8*>(&pack); + cs->fromTQColor(c, data); pack.paint.w = 15 * m_wetness->value(); // upscale from double to uint16: - pack.paint.h = static_cast< Q_UINT16>(m_strength->value() * (double)(0xffff/2)); + pack.paint.h = static_cast< TQ_UINT16>(m_strength->value() * (double)(0xffff/2)); KisColor color(data, cs); if(m_subject) @@ -219,7 +219,7 @@ void KisWetPaletteWidget::slotWetnessChanged(int n) WetPack pack = *(reinterpret_cast(color.data())); pack.paint.w = 15 * n; - color.setColor(reinterpret_cast< Q_UINT8*>(&pack), cs); + color.setColor(reinterpret_cast< TQ_UINT8*>(&pack), cs); m_subject->setFGColor(color); } @@ -235,9 +235,9 @@ void KisWetPaletteWidget::slotStrengthChanged(double n) KisColor color = m_subject->fgColor(); color.convertTo(cs); WetPack pack = *(reinterpret_cast(color.data())); - pack.paint.h = static_cast< Q_UINT16>(n * (double)(0xffff/2)); // upscale from double to uint16 + pack.paint.h = static_cast< TQ_UINT16>(n * (double)(0xffff/2)); // upscale from double to uint16 - color.setColor(reinterpret_cast< Q_UINT8*>(&pack), cs); + color.setColor(reinterpret_cast< TQ_UINT8*>(&pack), cs); m_subject->setFGColor(color); } diff --git a/krita/colorspaces/wet/kis_wet_palette_widget.h b/krita/colorspaces/wet/kis_wet_palette_widget.h index fb2800d3..10c177e6 100644 --- a/krita/colorspaces/wet/kis_wet_palette_widget.h +++ b/krita/colorspaces/wet/kis_wet_palette_widget.h @@ -19,8 +19,8 @@ #ifndef KIS_WET_PALETTE_WIDGET_H #define KIS_WET_PALETTE_WIDGET_H -#include "qwidget.h" -#include "qpushbutton.h" +#include "tqwidget.h" +#include "tqpushbutton.h" #include "kis_canvas_subject.h" #include "kis_canvas_observer.h" @@ -28,28 +28,29 @@ #include class KoFrameButton; -class QGridLayout; -class QColor; -class QLabel; -class QSpinBox; -class QColor; +class TQGridLayout; +class TQColor; +class TQLabel; +class TQSpinBox; +class TQColor; class KIntNumInput; class KDoubleNumInput; class KRITAUI_EXPORT KisWetPaletteWidget - : public QWidget, + : public TQWidget, public KisCanvasObserver { Q_OBJECT - typedef QWidget super; + TQ_OBJECT + typedef TQWidget super; public: - KisWetPaletteWidget(QWidget *parent = 0L, const char *name = 0); + KisWetPaletteWidget(TQWidget *tqparent = 0L, const char *name = 0); virtual ~KisWetPaletteWidget() {} protected slots: - void slotFGColorSelected(const QColor& c); + void slotFGColorSelected(const TQColor& c); void slotWetnessChanged(int); void slotStrengthChanged(double); diff --git a/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc b/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc index 411a3495..53bff69e 100644 --- a/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc +++ b/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc @@ -32,7 +32,7 @@ WetnessVisualisationFilter::WetnessVisualisationFilter(KisView* view) : m_view(view), m_action(0) { - connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } // XXX this needs to work on a per-layer basis! diff --git a/krita/colorspaces/wet/kis_wetness_visualisation_filter.h b/krita/colorspaces/wet/kis_wetness_visualisation_filter.h index ad5da5d3..55c1e817 100644 --- a/krita/colorspaces/wet/kis_wetness_visualisation_filter.h +++ b/krita/colorspaces/wet/kis_wetness_visualisation_filter.h @@ -21,15 +21,16 @@ #ifndef _WETNESS_VISUALISATION_FILTER_H #define _WETNESS_VISUALISATION_FILTER_H -#include -#include +#include +#include #include class KisView; -class WetnessVisualisationFilter : public QObject +class WetnessVisualisationFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: WetnessVisualisationFilter(KisView* view); virtual ~WetnessVisualisationFilter() {} @@ -44,7 +45,7 @@ private slots: private: KisView * m_view; KToggleAction * m_action; - QTimer m_timer; + TQTimer m_timer; }; #endif // _WETNESS_VISUALISATION_FILTER_H diff --git a/krita/colorspaces/wet/kis_wetop.cc b/krita/colorspaces/wet/kis_wetop.cc index cff3ac1e..70e07280 100644 --- a/krita/colorspaces/wet/kis_wetop.cc +++ b/krita/colorspaces/wet/kis_wetop.cc @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -36,10 +36,10 @@ #include "kis_wetop.h" #include "kis_wet_colorspace.h" -KisWetOpSettings::KisWetOpSettings(QWidget *parent) - : super(parent) +KisWetOpSettings::KisWetOpSettings(TQWidget *tqparent) + : super(tqparent) { - m_options = new WetPaintOptions(parent, "wet option widget"); + m_options = new WetPaintOptions(tqparent, "wet option widget"); } bool KisWetOpSettings::varySize() const @@ -67,13 +67,13 @@ KisPaintOp * KisWetOpFactory::createOp(const KisPaintOpSettings *settings, KisPa return op; } -KisPaintOpSettings* KisWetOpFactory::settings(QWidget * parent, const KisInputDevice& inputDevice) +KisPaintOpSettings* KisWetOpFactory::settings(TQWidget * tqparent, const KisInputDevice& inputDevice) { if (inputDevice == KisInputDevice::mouse()) { // No options for mouse, only tablet devices return 0; } else { - return new KisWetOpSettings(parent); + return new KisWetOpSettings(tqparent); } } @@ -120,8 +120,8 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab = brush->image(KisMetaRegistry::instance()->csRegistry()->getAlpha8(), inf); } else { - KisAlphaMaskSP mask = brush->mask(inf); - dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); + KisAlphaMaskSP tqmask = brush->tqmask(inf); + dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } KisColorSpace * cs = device->colorSpace(); @@ -143,7 +143,7 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Get the paint info (we store the strength in the otherwise unused (?) height field of // the paint // double wetness = paint.w; // XXX: Was unused - // strength is a double in the 0 - 2 range, but upscaled to Q_UINT16: + // strength is a double in the 0 - 2 range, but upscaled to TQ_UINT16: //kdDebug() << "Original strength as in paint.h: " << paint.h << endl; double strength = 2.0 * static_cast(paint.h) / (double)(0xffff); @@ -164,15 +164,15 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) double eff_height; double press, contact; - int maskW = brush->maskWidth(inf); - int maskH = brush->maskHeight(inf); + int tqmaskW = brush->tqmaskWidth(inf); + int tqmaskH = brush->tqmaskHeight(inf); KoPoint dest = (pos - (brush->hotSpot(inf))); int xStart = (int)dest.x(); int yStart = (int)dest.y(); - for (int y = 0; y < maskH; y++) { - KisHLineIteratorPixel dabIt = dab->createHLineIterator(0, y, maskW, false); - KisHLineIteratorPixel it = device->createHLineIterator(xStart, yStart+y, maskW, true); + for (int y = 0; y < tqmaskH; y++) { + KisHLineIteratorPixel dabIt = dab->createHLineIterator(0, y, tqmaskW, false); + KisHLineIteratorPixel it = device->createHLineIterator(xStart, yStart+y, tqmaskW, true); while (!dabIt.isDone()) { // This only does something with .paint, and not with adsorb. @@ -226,5 +226,5 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) } } - m_painter->addDirtyRect(QRect(xStart, yStart, maskW, maskH)); + m_painter->addDirtyRect(TQRect(xStart, yStart, tqmaskW, tqmaskH)); } diff --git a/krita/colorspaces/wet/kis_wetop.h b/krita/colorspaces/wet/kis_wetop.h index cc488bf9..37cd594a 100644 --- a/krita/colorspaces/wet/kis_wetop.h +++ b/krita/colorspaces/wet/kis_wetop.h @@ -36,19 +36,19 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("wetbrush", i18n("Watercolor Brush")); } virtual bool userVisible(KisColorSpace* cs) { return cs->id() == KisID("WET", ""); } - virtual KisPaintOpSettings *settings(QWidget * parent, const KisInputDevice& inputDevice); + virtual KisPaintOpSettings *settings(TQWidget * tqparent, const KisInputDevice& inputDevice); }; class KisWetOpSettings : public KisPaintOpSettings { typedef KisPaintOpSettings super; public: - KisWetOpSettings(QWidget *parent); + KisWetOpSettings(TQWidget *tqparent); bool varySize() const; bool varyWetness() const; bool varyStrength() const; - virtual QWidget *widget() const { return m_options; } + virtual TQWidget *widget() const { return m_options; } private: WetPaintOptions *m_options; diff --git a/krita/colorspaces/wet/wdgpressure.ui b/krita/colorspaces/wet/wdgpressure.ui index 92161294..96727ff1 100644 --- a/krita/colorspaces/wet/wdgpressure.ui +++ b/krita/colorspaces/wet/wdgpressure.ui @@ -1,6 +1,6 @@ WetPaintOptions - + WetPaintOptions @@ -19,7 +19,7 @@ 0 - + textLabel1 @@ -27,7 +27,7 @@ Pressure effects: - + checkSize @@ -38,7 +38,7 @@ true - + checkWetness @@ -46,7 +46,7 @@ Wetness - + checkStrength @@ -56,5 +56,5 @@ - + diff --git a/krita/colorspaces/wet/wet_plugin.cc b/krita/colorspaces/wet/wet_plugin.cc index cbb4787b..764d104e 100644 --- a/krita/colorspaces/wet/wet_plugin.cc +++ b/krita/colorspaces/wet/wet_plugin.cc @@ -20,13 +20,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -66,14 +66,14 @@ typedef KGenericFactory WetPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritawetplugin, WetPluginFactory( "kritacore" ) ) -WetPlugin::WetPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +WetPlugin::WetPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(WetPluginFactory::instance()); // This is not a gui plugin; only load it when the doc is created. - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast(parent); + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { + KisColorSpaceFactoryRegistry * f = dynamic_cast(tqparent); KisColorSpace* colorSpaceWet = new KisWetColorSpace(f, 0); @@ -97,16 +97,16 @@ WetPlugin::WetPlugin(QObject *parent, const char *name, const QStringList &) // Texture Action: f->addPaintDeviceAction(colorSpaceWet, new WetPaintDevAction); } - else if (parent->inherits("KisView")) + else if (tqparent->inherits("KisView")) { setInstance(WetPluginFactory::instance()); setXMLFile(locate("data","kritaplugins/wetplugin.rc"), true); - m_view = dynamic_cast(parent); + m_view = dynamic_cast(tqparent); // Wetness visualisation WetnessVisualisationFilter * wf = new WetnessVisualisationFilter(m_view); wf->setAction(new KToggleAction(i18n("Wetness Visualisation"), 0, 0, wf, - SLOT(slotActivated()), actionCollection(), "wetnessvisualisation")); + TQT_SLOT(slotActivated()), actionCollection(), "wetnessvisualisation")); // Create the wet palette KisWetPaletteWidget * w = new KisWetPaletteWidget(m_view); diff --git a/krita/colorspaces/wet/wet_plugin.h b/krita/colorspaces/wet/wet_plugin.h index 117ee253..d2fdc083 100644 --- a/krita/colorspaces/wet/wet_plugin.h +++ b/krita/colorspaces/wet/wet_plugin.h @@ -32,8 +32,9 @@ class KisWetColorSpace; class WetPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - WetPlugin(QObject *parent, const char *name, const QStringList &); + WetPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~WetPlugin(); private: diff --git a/krita/colorspaces/wet/wetphysicsfilter.cc b/krita/colorspaces/wet/wetphysicsfilter.cc index 195a17be..d63574fd 100644 --- a/krita/colorspaces/wet/wetphysicsfilter.cc +++ b/krita/colorspaces/wet/wetphysicsfilter.cc @@ -43,7 +43,7 @@ * [11:16] boud: which one then ? * [11:16] the error is distributed to the neighbour pixels (to the right, down and down to the left in pixels which have not yet been processed * [11:16] ) - * [11:16] CyrilleB: it's only apparent when you let something dry for some time, it looks like meandering snakes (like the old game "snake") + * [11:16] CyrilleB: it's only aptqparent when you let something dry for some time, it looks like meandering snakes (like the old game "snake") * [11:16] pippin: somehow yes * [11:16] pippin: that is possible * [11:17] boud: this leads to "bleeding" of data to the right and down,.. @@ -55,7 +55,7 @@ * [11:27] Well, I don't have time to investigate right now, but it sounds very plausible. * [11:27] pippin: :) * [11:28] of course, the code _is_ available :-) - * [11:28] if there is some form of diffusion matrix that is directional around the current pixel,. having that mask rotate depending on the modulus of the current iteration # should cancel such an effect out + * [11:28] if there is some form of diffusion matrix that is directional around the current pixel,. having that tqmask rotate depending on the modulus of the current iteration # should cancel such an effect out */ WetPhysicsFilter::WetPhysicsFilter() : KisFilter(id(), "artistic", i18n("Dry the Paint")) @@ -63,7 +63,7 @@ WetPhysicsFilter::WetPhysicsFilter() m_adsorbCount = 0; } -void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect) +void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect) { kdDebug() << "Physics processing " << src->name() << m_adsorbCount << endl; // XXX: It would be nice be able to interleave this, instead of @@ -79,7 +79,7 @@ void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi } -void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const QRect & r) +void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const TQRect & r) { /* XXX: Is this like a convolution operation? BSAR */ int width = r.width(); @@ -88,7 +88,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons kdDebug() << "Flowing: " << r << endl; /* width of a line in a layer in pixel units, not in bytes -- used to move to the next - line in the fluid masks below */ + line in the fluid tqmasks below */ int rs = width; // rowstride double * flow_t = new double[width * height]; @@ -124,13 +124,13 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons // We need three iterators, because we're working on a five-point convolution kernel (no corner pixels are being used) // First iteration: compute fluid deposits around the paper. - Q_INT32 dx, dy; + TQ_INT32 dx, dy; dx = r.x(); dy = r.y(); int ix = width + 1; // keeps track where we are in the one-dimensional arrays - for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) { + for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) { KisHLineIteratorPixel srcIt = src->createHLineIterator(dx, dy + y2, width, false); KisHLineIteratorPixel upIt = src->createHLineIterator(dx + 1, dy + y2 - 1, width - 2, false); KisHLineIteratorPixel downIt = src->createHLineIterator(dx + 1, dy + y2 + 1, width - 2, false); @@ -181,7 +181,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons // Second iteration: Reduce flow in dry areas ix = width + 1; - for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) { + for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) { KisHLineIteratorPixel srcIt = src->createHLineIterator(dx + 1, dy + y2, width - 2, false); while (!srcIt.isDone()) { if ((reinterpret_cast(srcIt.rawData()))->w > 0) { @@ -203,7 +203,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons // Third iteration: Combine the paint from the flow areas. ix = width + 1; - for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) { + for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) { KisHLineIteratorPixel srcIt = src->createHLineIterator(dx, dy + y2, width, false); KisHLineIteratorPixel upIt = src->createHLineIterator(dx + 1, dy + y2 - 1, width - 2, false); KisHLineIteratorPixel downIt = src->createHLineIterator(dx + 1, dy + y2 + 1, width - 2, false); @@ -255,14 +255,14 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons delete[] outflow; } -void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r) +void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r) { kdDebug () << "Drying " << r << endl; - for (Q_INT32 y = 0; y < r.height(); y++) { + for (TQ_INT32 y = 0; y < r.height(); y++) { KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), r.y() + y, r.width(), false); KisHLineIteratorPixel dstIt = dst->createHLineIterator(r.x(), r.y() + y, r.width(), true); - Q_UINT16 w; + TQ_UINT16 w; while (!srcIt.isDone()) { // Two wet pixels in one KisWetColorSpace pixels. @@ -284,10 +284,10 @@ void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRe } } -void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const QRect & r) +void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const TQRect & r) { kdDebug() << "Adsorbing " << r << endl; - for (Q_INT32 y = 0; y < r.height(); y++) { + for (TQ_INT32 y = 0; y < r.height(); y++) { KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), r.y() + y, r.width(), true); double ads; @@ -296,7 +296,7 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co WetPixDbl wet_bot; WetPack * pack; - Q_UINT16 w; + TQ_UINT16 w; while (!srcIt.isDone()) { // Two wet pixels in one KisWetColorSpace pixels. @@ -312,7 +312,7 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co } else { - ads = 0.5 / QMAX(w, 1); + ads = 0.5 / TQMAX(w, 1); wetPixToDouble(&wet_top, paint); wetPixToDouble(&wet_bot, adsorb); @@ -320,12 +320,12 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co mergePixel(&wet_bot, &wet_top, ads, &wet_bot); wetPixFromDouble(adsorb, &wet_bot); - paint->rd = (Q_UINT16) (paint->rd*(1 - ads)); - paint->rw = (Q_UINT16) (paint->rw*(1 - ads)); - paint->gd = (Q_UINT16) (paint->gd*(1 - ads)); - paint->gw = (Q_UINT16) (paint->gw*(1 - ads)); - paint->bd = (Q_UINT16) (paint->bd*(1 - ads)); - paint->bw = (Q_UINT16) (paint->bw*(1 - ads)); + paint->rd = (TQ_UINT16) (paint->rd*(1 - ads)); + paint->rw = (TQ_UINT16) (paint->rw*(1 - ads)); + paint->gd = (TQ_UINT16) (paint->gd*(1 - ads)); + paint->gw = (TQ_UINT16) (paint->gw*(1 - ads)); + paint->bd = (TQ_UINT16) (paint->bd*(1 - ads)); + paint->bw = (TQ_UINT16) (paint->bw*(1 - ads)); ++srcIt; } diff --git a/krita/colorspaces/wet/wetphysicsfilter.h b/krita/colorspaces/wet/wetphysicsfilter.h index a02f8402..a461ab18 100644 --- a/krita/colorspaces/wet/wetphysicsfilter.h +++ b/krita/colorspaces/wet/wetphysicsfilter.h @@ -29,7 +29,7 @@ #include "kis_wet_colorspace.h" class KisID; -class QRect; +class TQRect; /** @@ -46,7 +46,7 @@ class WetPhysicsFilter: public KisFilter public: WetPhysicsFilter(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect& r); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect& r); static inline KisID id() { return KisID("wetphysics", i18n("Watercolor Physics Simulation Filter")); }; @@ -57,11 +57,11 @@ public: private: - void flow(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r); - void dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r); + void flow(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r); + void dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r); // Move stuff from the upperlayer to the lower layer. This is filter-level stuff. - void adsorb(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r); + void adsorb(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r); // NOTE: this does not set the height fields void combinePixels (WetPixDbl *dst, WetPixDbl *src1, WetPixDbl *src2); @@ -79,7 +79,7 @@ private: private: - Q_INT32 m_adsorbCount; + TQ_INT32 m_adsorbCount; }; diff --git a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc index 50b8b4ca..8b182e08 100644 --- a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc +++ b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include @@ -52,13 +52,13 @@ void KisWSBrushOp::paintAt(const KisPoint &pos, { // Painting should be implemented according to the following algorithm: // retrieve brush - // if brush == mask - // retrieve mask + // if brush == tqmask + // retrieve tqmask // else if brush == image // retrieve image - // subsample (mask | image) for position -- pos should be double! - // apply filters to mask (colour | gradient | pattern | etc. - // composite filtered mask into temporary layer + // subsample (tqmask | image) for position -- pos should be double! + // apply filters to tqmask (colour | gradient | pattern | etc. + // composite filtered tqmask into temporary layer // composite temporary layer into target layer // @see: doc/brush.txt @@ -77,9 +77,9 @@ void KisWSBrushOp::paintAt(const KisPoint &pos, // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -91,13 +91,13 @@ void KisWSBrushOp::paintAt(const KisPoint &pos, dab = brush -> image(device -> colorSpace(), pressure, xFraction, yFraction); } else { - KisAlphaMaskSP mask = brush -> mask(pressure, xFraction, yFraction); - dab = computeDab(mask); + KisAlphaMaskSP tqmask = brush -> tqmask(pressure, xFraction, yFraction); + dab = computeDab(tqmask); } m_painter -> setPressure(pressure); - QRect dabRect = QRect(0, 0, brush -> maskWidth(pressure), brush -> maskHeight(pressure)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush -> tqmaskWidth(pressure), brush -> tqmaskHeight(pressure)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device -> image(); @@ -107,10 +107,10 @@ void KisWSBrushOp::paintAt(const KisPoint &pos, if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); m_painter -> bltSelection(dstRect.x(), dstRect.y(), m_painter -> compositeOp(), dab.data(), m_painter -> opacity(), sx, sy, sw, sh); m_painter -> addDirtyRect(dstRect); diff --git a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h index 34f50207..65f5fb6c 100644 --- a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h +++ b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h @@ -34,7 +34,7 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("wsbrush", i18n("Wet & Sticky Paintbrush")); } - virtual QString pixmap() { return "wetpaintbrush.png"; } + virtual TQString pixmap() { return "wetpaintbrush.png"; } }; class KisWSBrushOp : public KisPaintOp { diff --git a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc index fe0e1eb4..83129296 100644 --- a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc +++ b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc @@ -36,13 +36,13 @@ typedef KGenericFactory WSBrushPaintOpPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritawsbrushpaintop, WSBrushPaintOpPluginFactory( "kritacore" ) ) -WSBrushPaintOpPlugin::WSBrushPaintOpPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +WSBrushPaintOpPlugin::WSBrushPaintOpPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(WSBrushPaintOpPluginFactory::instance()); // This is not a gui plugin; only load it when the doc is created. - if ( parent->inherits("KisFactory") ) + if ( tqparent->inherits("KisFactory") ) { KisPaintOpRegistry::instance() -> add ( new KisWSBrushOpFactory ); } diff --git a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h index f668aabf..7e77afec 100644 --- a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h +++ b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h @@ -31,8 +31,9 @@ class KisView; class WSBrushPaintOpPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - WSBrushPaintOpPlugin(QObject *parent, const char *name, const QStringList &); + WSBrushPaintOpPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~WSBrushPaintOpPlugin(); private: diff --git a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc index c837a558..44426382 100644 --- a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc +++ b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc @@ -22,7 +22,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -48,7 +48,7 @@ enum WetStickyChannelIndex { HUE_CHANNEL_INDEX, SATURATION_CHANNEL_INDEX, LIGHTNESS_CHANNEL_INDEX, - LIQUID_CONTENT_CHANNEL_INDEX, + LITQUID_CONTENT_CHANNEL_INDEX, DRYING_RATE_CHANNEL_INDEX, MISCIBILITY_CHANNEL_INDEX, GRAVITATIONAL_DIRECTION_INDEX, @@ -60,7 +60,7 @@ enum WetStickyChannelIndex { KisWetStickyColorSpace::KisWetStickyColorSpace() : KisAbstractColorSpace(KisID("W&S", i18n("Wet & Sticky")), 0, icMaxEnumData) { - Q_INT32 pos = 0; + TQ_INT32 pos = 0; // Basic representational definition m_channels.push_back(new KisChannelInfo(i18n("Blue"), "B", pos, COLOR, 1)); @@ -89,7 +89,7 @@ KisWetStickyColorSpace::KisWetStickyColorSpace() : setDefaultProfile( 0 ); #ifdef WSDEBUG - QValueVector_it it; + TQValueVector_it it; int i = 0; for (it = m_channels.begin(); it != m_channels.end(); ++it) { @@ -107,10 +107,10 @@ KisWetStickyColorSpace::~KisWetStickyColorSpace() { } -void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile) +void KisWetStickyColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile) { CELL_PTR p = (CELL_PTR) dst; - Q_UINT8 r, g, b; + TQ_UINT8 r, g, b; r = c.red(); g = c.green(); @@ -136,20 +136,20 @@ void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfil #ifdef WSDEBUG kdDebug(DBG_AREA_CMS) << "qcolor: " << " r: " << c.red() << " b: " << c.blue() << " g: " << c.red() - << " native color: (" << QString().setNum(p->red) << ", " - << QString().setNum(p->green) << ", " - << QString().setNum(p->blue) << ", " - << QString().setNum(p->alpha) << ") " + << " native color: (" << TQString().setNum(p->red) << ", " + << TQString().setNum(p->green) << ", " + << TQString().setNum(p->blue) << ", " + << TQString().setNum(p->alpha) << ") " << ", hls: (" << p->hue << ", " << p->lightness << ", " << p->saturation << ")\n"; #endif } -void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile) +void KisWetStickyColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile) { CELL_PTR p = (CELL_PTR) dst; - Q_UINT8 r, g, b; + TQ_UINT8 r, g, b; r = c.red(); g = c.green(); @@ -174,17 +174,17 @@ void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT #ifdef WSDEBUG kdDebug(DBG_AREA_CMS) << "qcolor: " << " r: " << c.red() << " b: " << c.blue() << " g: " << c.red() << " opacity: " << opacity - << " native color: (" << QString().setNum(p->red) << ", " - << QString().setNum(p->green) << ", " - << QString().setNum(p->blue) << ", " - << QString().setNum(p->alpha) << ") " + << " native color: (" << TQString().setNum(p->red) << ", " + << TQString().setNum(p->green) << ", " + << TQString().setNum(p->blue) << ", " + << TQString().setNum(p->alpha) << ") " << ", hls: (" << p->hue << ", " << p->lightness << ", " << p->saturation << ")\n"; #endif } -void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile) +void KisWetStickyColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile) { CELL_PTR p = (CELL_PTR) src; @@ -196,7 +196,7 @@ void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile #endif } -void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile) +void KisWetStickyColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile) { CELL_PTR p = (CELL_PTR) src; @@ -213,26 +213,26 @@ void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *op -KisPixelRO KisWetStickyColorSpace::toKisPixelRO(const Q_UINT8 *src, KisProfile * profile) +KisPixelRO KisWetStickyColorSpace::toKisPixelRO(const TQ_UINT8 *src, KisProfile * profile) { return KisPixelRO (src, src, this, profile); } -KisPixel KisWetStickyColorSpace::toKisPixel(Q_UINT8 *src, KisProfile * profile) +KisPixel KisWetStickyColorSpace::toKisPixel(TQ_UINT8 *src, KisProfile * profile) { return KisPixel (src, src, this, profile); } -void KisWetStickyColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisWetStickyColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { } -Q_UINT8 KisWetStickyColorSpace::getAlpha(const Q_UINT8 *pixel) const +TQ_UINT8 KisWetStickyColorSpace::getAlpha(const TQ_UINT8 *pixel) const { return ((CELL_PTR)pixel)->alpha; } -void KisWetStickyColorSpace::setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const +void KisWetStickyColorSpace::setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const { while (nPixels > 0) { ((CELL_PTR)pixels)->alpha = alpha; @@ -241,26 +241,26 @@ void KisWetStickyColorSpace::setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 n } } -void KisWetStickyColorSpace::applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels) +void KisWetStickyColorSpace::applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) { } -void KisWetStickyColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels) +void KisWetStickyColorSpace::applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) { } -Q_UINT8 KisWetStickyColorSpace::scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos) +TQ_UINT8 KisWetStickyColorSpace::scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos) { return 0; } -Q_UINT16 KisWetStickyColorSpace::scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos) +TQ_UINT16 KisWetStickyColorSpace::scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos) { return 0; } -QValueVector KisWetStickyColorSpace::channels() const +TQValueVector KisWetStickyColorSpace::channels() const { return m_channels; } @@ -270,46 +270,46 @@ bool KisWetStickyColorSpace::hasAlpha() const return true; } -Q_INT32 KisWetStickyColorSpace::nChannels() const +TQ_INT32 KisWetStickyColorSpace::nChannels() const { return 14; } -Q_INT32 KisWetStickyColorSpace::nColorChannels() const +TQ_INT32 KisWetStickyColorSpace::nColorChannels() const { return 3; } -Q_INT32 KisWetStickyColorSpace::nSubstanceChannels() const +TQ_INT32 KisWetStickyColorSpace::nSubstanceChannels() const { return 4; } -Q_INT32 KisWetStickyColorSpace::pixelSize() const +TQ_INT32 KisWetStickyColorSpace::pixelSize() const { return sizeof(CELL); } -QImage KisWetStickyColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, +TQImage KisWetStickyColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * /*srcProfile*/, KisProfile * /*dstProfile*/, - Q_INT32 /*renderingIntent*/, float /*exposure*/) + TQ_INT32 /*renderingIntent*/, float /*exposure*/) { - QImage img(width, height, 32, 0, QImage::LittleEndian); + TQImage img(width, height, 32, 0, TQImage::LittleEndian); - Q_INT32 i = 0; + TQ_INT32 i = 0; uchar *j = img.bits(); CELL_PTR p = (CELL_PTR) data; while ( i < width * height) { - const Q_UINT8 PIXEL_BLUE = 0; - const Q_UINT8 PIXEL_GREEN = 1; - const Q_UINT8 PIXEL_RED = 2; - const Q_UINT8 PIXEL_ALPHA = 3; + const TQ_UINT8 PIXEL_BLUE = 0; + const TQ_UINT8 PIXEL_GREEN = 1; + const TQ_UINT8 PIXEL_RED = 2; + const TQ_UINT8 PIXEL_ALPHA = 3; *( j + PIXEL_ALPHA ) = p -> alpha; *( j + PIXEL_RED ) = p -> red; @@ -323,17 +323,17 @@ QImage KisWetStickyColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 widt return img; } -bool KisWetStickyColorSpace::convertPixelsTo(const Q_UINT8 * src, KisProfile * /*srcProfile*/, - Q_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile, - Q_UINT32 numPixels, - Q_INT32 /*renderingIntent*/) +bool KisWetStickyColorSpace::convertPixelsTo(const TQ_UINT8 * src, KisProfile * /*srcProfile*/, + TQ_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile, + TQ_UINT32 numPixels, + TQ_INT32 /*renderingIntent*/) { - Q_INT32 dSize = dstColorSpace -> pixelSize(); - Q_INT32 sSize = pixelSize(); + TQ_INT32 dSize = dstColorSpace -> pixelSize(); + TQ_INT32 sSize = pixelSize(); - Q_UINT32 j = 0; - Q_UINT32 i = 0; - QColor c; + TQ_UINT32 j = 0; + TQ_UINT32 i = 0; + TQColor c; CELL_PTR cp; while ( i < numPixels ) { cp = (CELL_PTR) (src + i); @@ -342,7 +342,7 @@ bool KisWetStickyColorSpace::convertPixelsTo(const Q_UINT8 * src, KisProfile * cp -> green, cp -> blue); - dstColorSpace -> fromQColor(c, cp -> alpha, (dst + j), dstProfile); + dstColorSpace -> fromTQColor(c, cp -> alpha, (dst + j), dstProfile); i += sSize; j += dSize; @@ -352,15 +352,15 @@ bool KisWetStickyColorSpace::convertPixelsTo(const Q_UINT8 * src, KisProfile * } -void KisWetStickyColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisWetStickyColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { switch (op.op()) { @@ -368,18 +368,18 @@ void KisWetStickyColorSpace::bitBlt(Q_UINT8 *dst, // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: default: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; } } -void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisWetStickyColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { // XXX: This is basically the same as with rgb and used to composite layers for Composition for // painting works differently @@ -387,11 +387,11 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - const Q_UINT8 *mask = maskRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + const TQ_UINT8 *tqmask = tqmaskRowStart; - Q_INT32 columns = numColumns; + TQ_INT32 columns = numColumns; while (columns > 0) { @@ -408,14 +408,14 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS #endif - Q_UINT8 srcAlpha = srcCell->alpha; + TQ_UINT8 srcAlpha = srcCell->alpha; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = UINT8_MULT(srcAlpha, *mask); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = UINT8_MULT(srcAlpha, *tqmask); + tqmask++; } if (srcAlpha != OPACITY_TRANSPARENT) { @@ -427,14 +427,14 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS if (srcAlpha == OPACITY_OPAQUE) { memcpy(dst, src, 3); // XXX: First three bytes for rgb? } else { - Q_UINT8 dstAlpha = dstCell->alpha; + TQ_UINT8 dstAlpha = dstCell->alpha; - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); dstCell->alpha = newAlpha; if (newAlpha != 0) { @@ -461,17 +461,17 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } -void KisWetStickyColorSpace::compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity) +void KisWetStickyColorSpace::compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity) { - Q_INT32 linesize = sizeof(CELL) * columns; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_INT32 linesize = sizeof(CELL) * columns; + TQ_UINT8 *d; + const TQ_UINT8 *s; d = dst; s = src; @@ -493,32 +493,32 @@ KisCompositeOpList KisWetStickyColorSpace::userVisiblecompositeOps() const return list; } -QString KisWetStickyColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisWetStickyColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); const CELL *pixel = reinterpret_cast(U8_pixel); switch (channelIndex) { case BLUE_CHANNEL_INDEX: - return QString().setNum(pixel -> blue); + return TQString().setNum(pixel -> blue); case GREEN_CHANNEL_INDEX: - return QString().setNum(pixel -> green); + return TQString().setNum(pixel -> green); case RED_CHANNEL_INDEX: - return QString().setNum(pixel -> red); + return TQString().setNum(pixel -> red); case ALPHA_CHANNEL_INDEX: - return QString().setNum(pixel -> alpha); + return TQString().setNum(pixel -> alpha); case HUE_CHANNEL_INDEX: - return QString().setNum(pixel -> hue); + return TQString().setNum(pixel -> hue); case SATURATION_CHANNEL_INDEX: - return QString().setNum(pixel -> saturation); + return TQString().setNum(pixel -> saturation); case LIGHTNESS_CHANNEL_INDEX: - return QString().setNum(pixel -> lightness); - case LIQUID_CONTENT_CHANNEL_INDEX: - return QString().setNum(pixel -> liquid_content); + return TQString().setNum(pixel -> lightness); + case LITQUID_CONTENT_CHANNEL_INDEX: + return TQString().setNum(pixel -> liquid_content); case DRYING_RATE_CHANNEL_INDEX: - return QString().setNum(pixel -> drying_rate); + return TQString().setNum(pixel -> drying_rate); case MISCIBILITY_CHANNEL_INDEX: - return QString().setNum(pixel -> miscibility); + return TQString().setNum(pixel -> miscibility); case GRAVITATIONAL_DIRECTION_INDEX: { switch (pixel -> direction) { @@ -532,22 +532,22 @@ QString KisWetStickyColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT return i18n("Right"); default: Q_ASSERT(false); - return QString(); + return TQString(); } } case GRAVITATIONAL_STRENGTH_CHANNEL_INDEX: - return QString().setNum(pixel -> strength); + return TQString().setNum(pixel -> strength); case ABSORBANCY_CHANNEL_INDEX: - return QString().setNum(pixel -> absorbancy); + return TQString().setNum(pixel -> absorbancy); case PAINT_VOLUME_CHANNEL_INDEX: - return QString().setNum(pixel -> volume); + return TQString().setNum(pixel -> volume); default: Q_ASSERT(false); - return QString(); + return TQString(); } } -QString KisWetStickyColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisWetStickyColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); const CELL *pixel = reinterpret_cast(U8_pixel); @@ -556,25 +556,25 @@ QString KisWetStickyColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pix switch (channelIndex) { case BLUE_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> blue) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> blue) / UINT8_MAX); case GREEN_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> green) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> green) / UINT8_MAX); case RED_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> red) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> red) / UINT8_MAX); case ALPHA_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> alpha) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> alpha) / UINT8_MAX); case HUE_CHANNEL_INDEX: - return QString().setNum(pixel -> hue); + return TQString().setNum(pixel -> hue); case SATURATION_CHANNEL_INDEX: - return QString().setNum(pixel -> saturation); + return TQString().setNum(pixel -> saturation); case LIGHTNESS_CHANNEL_INDEX: - return QString().setNum(pixel -> lightness); - case LIQUID_CONTENT_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> liquid_content) / UINT8_MAX); + return TQString().setNum(pixel -> lightness); + case LITQUID_CONTENT_CHANNEL_INDEX: + return TQString().setNum(static_cast(pixel -> liquid_content) / UINT8_MAX); case DRYING_RATE_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> drying_rate) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> drying_rate) / UINT8_MAX); case MISCIBILITY_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> miscibility) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> miscibility) / UINT8_MAX); case GRAVITATIONAL_DIRECTION_INDEX: { switch (pixel -> direction) { @@ -588,18 +588,18 @@ QString KisWetStickyColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pix return i18n("Right"); default: Q_ASSERT(false); - return QString(); + return TQString(); } } case GRAVITATIONAL_STRENGTH_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> strength) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> strength) / UINT8_MAX); case ABSORBANCY_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> absorbancy) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> absorbancy) / UINT8_MAX); case PAINT_VOLUME_CHANNEL_INDEX: - return QString().setNum(static_cast(pixel -> volume) / UINT8_MAX); + return TQString().setNum(static_cast(pixel -> volume) / UINT8_MAX); default: Q_ASSERT(false); - return QString(); + return TQString(); } } diff --git a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h index 758cb57e..57f3ac70 100644 --- a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h +++ b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h @@ -18,7 +18,7 @@ #ifndef KIS_COLORSPACE_WET_STICKY_H_ #define KIS_COLORSPACE_WET_STICKY_H_ -#include +#include #include "kis_global.h" #include "kis_abstract_colorspace.h" @@ -44,24 +44,24 @@ namespace WetAndSticky { * Defines the contents and attributes of a cell on the canvas. */ typedef struct cell { - Q_UINT8 blue; - Q_UINT8 green; - Q_UINT8 red; - Q_UINT8 alpha; + TQ_UINT8 blue; + TQ_UINT8 green; + TQ_UINT8 red; + TQ_UINT8 alpha; float hue; float saturation; float lightness; - Q_UINT8 liquid_content; - Q_UINT8 drying_rate; - Q_UINT8 miscibility; + TQ_UINT8 liquid_content; + TQ_UINT8 drying_rate; + TQ_UINT8 miscibility; enumDirection direction; - Q_UINT8 strength; + TQ_UINT8 strength; - Q_UINT8 absorbancy; /* How much paint can this cell hold? */ - Q_UINT8 volume; /* The volume of paint. */ + TQ_UINT8 absorbancy; /* How much paint can this cell hold? */ + TQ_UINT8 volume; /* The volume of paint. */ } CELL, *CELL_PTR; @@ -79,69 +79,69 @@ public: - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 getAlpha(const Q_UINT8 *pixel) const; - virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; + virtual TQ_UINT8 getAlpha(const TQ_UINT8 *pixel) const; + virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; - virtual void applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); - virtual void applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); + virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); + virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos); - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos); + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); - virtual QValueVector channels() const; + virtual TQValueVector channels() const; virtual bool hasAlpha() const; - virtual Q_INT32 nChannels() const; - virtual Q_INT32 nColorChannels() const; - virtual Q_INT32 nSubstanceChannels() const; - virtual Q_INT32 pixelSize() const; + virtual TQ_INT32 nChannels() const; + virtual TQ_INT32 nColorChannels() const; + virtual TQ_INT32 nSubstanceChannels() const; + virtual TQ_INT32 pixelSize() const; - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * srcProfile, KisProfile * dstProfile, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL, float exposure = 0.0f); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const; virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - virtual bool convertPixelsTo(const Q_UINT8 * src, KisProfile * srcProfile, - Q_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile, - Q_UINT32 numPixels, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL); + virtual bool convertPixelsTo(const TQ_UINT8 * src, KisProfile * srcProfile, + TQ_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile, + TQ_UINT32 numPixels, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL); private: - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeClear(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeClear(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); }; diff --git a/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc b/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc index 365b5f2a..040d3002 100644 --- a/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc +++ b/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc @@ -19,10 +19,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -66,37 +66,37 @@ KisWSEngineFilter::KisWSEngineFilter() : KisFilter(id(), "", i18n("&Wet & Sticky * cell on the canvas to be visited. There is an even probability * of each cell being visited. */ -QPoint next_cell(Q_UINT32 width, Q_UINT32 height) +TQPoint next_cell(TQ_UINT32 width, TQ_UINT32 height) { - return QPoint(random() * width, random() * height); + return TQPoint(random() * width, random() * height); } -void single_step(KisColorSpace * cs, KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & rect, bool native) +void single_step(KisColorSpace * cs, KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & rect, bool native) { using namespace WetAndSticky; - QPoint p = next_cell( rect.width(), rect.height() ); + TQPoint p = next_cell( rect.width(), rect.height() ); // XXX: We could optimize by randomly doing lines of 64 pixels // -- maybe that would be enough to avoid the windscreen wiper // effect. KisHLineIterator iter = src -> createHLineIterator(p.x(), p.y(), 1, false); - Q_UINT8 *orig = iter.rawData(); - Q_UINT8 *pix = orig; + TQ_UINT8 *orig = iter.rawData(); + TQ_UINT8 *pix = orig; if (!orig) return; if (!native ) { - QColor c; - Q_UINT8 opacity; + TQColor c; + TQ_UINT8 opacity; - src -> colorSpace() -> toQColor(pix, &c, &opacity); - Q_UINT8 *pix = new Q_UINT8[sizeof( cell )]; + src -> colorSpace() -> toTQColor(pix, &c, &opacity); + TQ_UINT8 *pix = new TQ_UINT8[sizeof( cell )]; Q_CHECK_PTR(pix); - cs -> fromQColor(c, opacity, pix); + cs -> fromTQColor(c, opacity, pix); } // Process @@ -110,7 +110,7 @@ void single_step(KisColorSpace * cs, KisPaintDeviceSP src, KisPaintDeviceSP dst } -void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { m_src = src; @@ -120,7 +120,7 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF kdDebug(DBG_AREA_FILTERS) << "WSEnginefilter called!\n"; - QTime t; + TQTime t; t.restart(); // Two possibilities: we have our own, cool w&s pixel, and @@ -134,7 +134,7 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF // XXX: We need a better way to ID color strategies KisColorSpace * cs = KisColorSpaceRegistry::instance()->get("W&S"); - Q_UINT32 pixels = 400; //m_cfg -> pixels(); + TQ_UINT32 pixels = 400; //m_cfg -> pixels(); kdDebug(DBG_AREA_FILTERS) << "Going to singlestep " << pixels << " pixels.\n"; @@ -145,7 +145,7 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF } // Or not. else { - for ( Q_UINT32 i = 0; i < pixels; ++i ) { + for ( TQ_UINT32 i = 0; i < pixels; ++i ) { single_step (cs, src, dst, rect, native); } } @@ -153,15 +153,15 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF } -KisFilterConfigWidget * KisWSEngineFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev) +KisFilterConfigWidget * KisWSEngineFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev) { -// KisWSEngineFilterConfigurationWidget* kefcw = new KisWSEngineFilterConfigurationWidget(this,parent, ""); +// KisWSEngineFilterConfigurationWidget* kefcw = new KisWSEngineFilterConfigurationWidget(this,tqparent, ""); // kdDebug(DBG_AREA_FILTERS) << kefcw << endl; // return kefcw ; return 0; } -KisFilterConfiguration* KisWSEngineFilter::configuration(QWidget* nwidget, KisPaintDeviceSP dev) +KisFilterConfiguration* KisWSEngineFilter::configuration(TQWidget* nwidget, KisPaintDeviceSP dev) { // KisWSEngineFilterConfigurationWidget* widget = (KisWSEngineFilterConfigurationWidget*) nwidget; @@ -169,7 +169,7 @@ KisFilterConfiguration* KisWSEngineFilter::configuration(QWidget* nwidget, KisPa // { // return new KisWSEngineFilterConfiguration(30); // } else { -// Q_UINT32 depth = widget -> baseWidget() -> depthSpinBox -> value(); +// TQ_UINT32 depth = widget -> baseWidget() -> depthSpinBox -> value(); // return new KisWSEngineFilterConfiguration(depth); // } diff --git a/krita/colorspaces/wetsticky/kis_ws_engine_filter.h b/krita/colorspaces/wetsticky/kis_ws_engine_filter.h index 5eb8ca81..d1c23810 100644 --- a/krita/colorspaces/wetsticky/kis_ws_engine_filter.h +++ b/krita/colorspaces/wetsticky/kis_ws_engine_filter.h @@ -31,13 +31,13 @@ public: KisWSEngineFilterConfiguration() { m_pixels = 10000; } - KisWSEngineFilterConfiguration(Q_UINT32 pixels = 0) { m_pixels = pixels; } + KisWSEngineFilterConfiguration(TQ_UINT32 pixels = 0) { m_pixels = pixels; } - Q_UINT32 pixels() { return m_pixels; } + TQ_UINT32 pixels() { return m_pixels; } private: - Q_UINT32 m_pixels; // The number of pixels the filter should + TQ_UINT32 m_pixels; // The number of pixels the filter should // move. 0 means keep running indefinitely @@ -51,7 +51,7 @@ public: KisWSEngineFilter(); - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* cfg, const QRect& rc); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* cfg, const TQRect& rc); static inline KisID id() { return KisID("Wet & Sticky Engine", i18n("Wet & Sticky")); }; virtual bool supportsPainting() { return false; } @@ -59,8 +59,8 @@ public: virtual bool supportsIncrementalPainting() { return false; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*, KisPaintDeviceSP dev); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*, KisPaintDeviceSP dev); private: @@ -70,7 +70,7 @@ private: KisWSEngineFilterConfiguration * m_cfg; KisPaintDeviceSP m_src; KisPaintDeviceSP m_dst; - QRect m_rect; + TQRect m_rect; }; diff --git a/krita/colorspaces/wetsticky/wet_sticky_plugin.cc b/krita/colorspaces/wetsticky/wet_sticky_plugin.cc index 858b4810..19752465 100644 --- a/krita/colorspaces/wetsticky/wet_sticky_plugin.cc +++ b/krita/colorspaces/wetsticky/wet_sticky_plugin.cc @@ -37,13 +37,13 @@ typedef KGenericFactory WetStickyPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritawsplugin, WetStickyPluginFactory( "kritacore" ) ) -WetStickyPlugin::WetStickyPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +WetStickyPlugin::WetStickyPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(WetStickyPluginFactory::instance()); // This is not a gui plugin; only load it when the doc is created. - if ( parent->inherits("KisFactory") ) + if ( tqparent->inherits("KisFactory") ) { KisColorSpace * colorSpaceWS = new KisWetStickyColorSpace(); Q_CHECK_PTR(colorSpaceWS); diff --git a/krita/colorspaces/wetsticky/wet_sticky_plugin.h b/krita/colorspaces/wetsticky/wet_sticky_plugin.h index 35b8207c..fe981a59 100644 --- a/krita/colorspaces/wetsticky/wet_sticky_plugin.h +++ b/krita/colorspaces/wetsticky/wet_sticky_plugin.h @@ -32,8 +32,9 @@ class WetStickyPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - WetStickyPlugin(QObject *parent, const char *name, const QStringList &); + WetStickyPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~WetStickyPlugin(); }; diff --git a/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt b/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt index a3f2100e..5e79907b 100644 --- a/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt +++ b/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains + 0. This License applies to any program or other work which tqcontains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any +code means all the source code for all modules it tqcontains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/krita/colorspaces/wetsticky/ws/anim.c b/krita/colorspaces/wetsticky/ws/anim.c index fed5379f..995a3dff 100644 --- a/krita/colorspaces/wetsticky/ws/anim.c +++ b/krita/colorspaces/wetsticky/ws/anim.c @@ -53,7 +53,7 @@ static Pixmap colour_pm[FRAME_LIMIT]; static GC gc; static GC tmp_gc; -static long mask; +static long tqmask; static XGCValues values; Display *display; @@ -117,14 +117,14 @@ char *argv[]; XSynchronize(display, True); - mask = GCBackground| GCForeground| GCFunction; + tqmask = GCBackground| GCForeground| GCFunction; values.function = GXcopy; values.background = 0; values.foreground = 1; - gc = XtGetGC(colour_canvas, mask, &values); + gc = XtGetGC(colour_canvas, tqmask, &values); diff --git a/krita/colorspaces/wetsticky/ws/canvas.c b/krita/colorspaces/wetsticky/ws/canvas.c index d2e27cd1..77cfa17d 100644 --- a/krita/colorspaces/wetsticky/ws/canvas.c +++ b/krita/colorspaces/wetsticky/ws/canvas.c @@ -31,18 +31,18 @@ CELL canvas[CANVAS_WIDTH][CANVAS_HEIGHT]; /* This module maintains a list of the addresses of cells that have been modified since the last redraw and therefore need updating. - Points are added to this list by the need_to_repaint() routine - and are removed by the next_cell_for_repaint() function. The + Points are added to this list by the need_to_tqrepaint() routine + and are removed by the next_cell_for_tqrepaint() function. The pointer to the current tail of the list is updated by side-effect. */ -static POINT need_repainting[REDRAW_LIMIT]; +static POINT need_tqrepainting[REDRAW_LIMIT]; static int next_free = 0; -static int next_to_repaint = 0; +static int next_to_tqrepaint = 0; /* *********************************************************************** */ -int number_of_repaints_needed() -/* Returns the number of cells that need to be repainted. */ +int number_of_tqrepaints_needed() +/* Returns the number of cells that need to be tqrepainted. */ { return (next_free); @@ -50,10 +50,10 @@ int number_of_repaints_needed() /* *********************************************************************** */ -void need_to_repaint(point) +void need_to_tqrepaint(point) /* The cell at this location needs to be redrawn since it has been altered. Scan the list to see if it is already - scheduled for a repainting operation and only add it if + scheduled for a tqrepainting operation and only add it if it is not there. */ POINT point; @@ -62,7 +62,7 @@ POINT point; int k; - /* If the list is already full then simply ignore the repaint + /* If the list is already full then simply ignore the tqrepaint request - it will get done eventually anyway. */ if (next_free == REDRAW_LIMIT) return; @@ -70,43 +70,43 @@ POINT point; /* Check whether this point is already on the list. */ for (k=0; k < next_free; k++) { - if ((need_repainting[k].x == point.x) && - (need_repainting[k].y == point.y)) break; + if ((need_tqrepainting[k].x == point.x) && + (need_tqrepainting[k].y == point.y)) break; } if (k < next_free) return; /* Already in the list. */ /* Add this new cell address to the end of the list. */ - need_repainting[next_free].x = point.x; - need_repainting[next_free].y = point.y; + need_tqrepainting[next_free].x = point.x; + need_tqrepainting[next_free].y = point.y; next_free++; } /* *********************************************************************** */ -void next_cell_for_repaint(cell, locus) -/* This routine returns the next cell to be repainted, together with its +void next_cell_for_tqrepaint(cell, locus) +/* This routine returns the next cell to be tqrepainted, together with its location on the canvas. This is determined by taking the next point - from the need_repainting list and accessing its cell. If the list is + from the need_tqrepainting list and accessing its cell. If the list is empty then return NIL. - Note that the repainting operation will clear out the list before + Note that the tqrepainting operation will clear out the list before any other new positions are added. */ CELL_PTR *cell; POINT_PTR locus; { - if (next_to_repaint >= next_free) { - next_to_repaint = next_free = 0; + if (next_to_tqrepaint >= next_free) { + next_to_tqrepaint = next_free = 0; *(cell) = NIL; return; } - *(cell) = get_cell(need_repainting[next_to_repaint]); - locus->x = need_repainting[next_to_repaint].x; - locus->y = need_repainting[next_to_repaint].y; - next_to_repaint++; + *(cell) = get_cell(need_tqrepainting[next_to_tqrepaint]); + locus->x = need_tqrepainting[next_to_tqrepaint].x; + locus->y = need_tqrepainting[next_to_tqrepaint].y; + next_to_tqrepaint++; } /* *********************************************************************** */ diff --git a/krita/colorspaces/wetsticky/ws/canvas.h b/krita/colorspaces/wetsticky/ws/canvas.h index 2df50140..c2f2bcbf 100644 --- a/krita/colorspaces/wetsticky/ws/canvas.h +++ b/krita/colorspaces/wetsticky/ws/canvas.h @@ -19,14 +19,14 @@ Wet and Sticky is free software; you can redistribute it and/or modify it under */ -extern int number_of_repaints_needed(); -/* Returns the number of cells needing to repainted. */ +extern int number_of_tqrepaints_needed(); +/* Returns the number of cells needing to tqrepainted. */ -extern void need_to_repaint (/* POINT */); -/* Requests that the cell at the given point be repainted +extern void need_to_tqrepaint (/* POINT */); +/* Requests that the cell at the given point be tqrepainted at the next update as it has been modified. */ -extern void next_cell_for_repaint (/* *CELL_PTR, POINT_PTR */); +extern void next_cell_for_tqrepaint (/* *CELL_PTR, POINT_PTR */); /* Returns a pointer to a cell that needs to be updated as well as the location of that cell on the canvas. If there are no more cells to be redrawn then the pointer will be NIL. */ diff --git a/krita/colorspaces/wetsticky/ws/cmap.c b/krita/colorspaces/wetsticky/ws/cmap.c index 9e53b0ae..0f11eaf7 100644 --- a/krita/colorspaces/wetsticky/ws/cmap.c +++ b/krita/colorspaces/wetsticky/ws/cmap.c @@ -59,7 +59,7 @@ static Pixmap dryness_pm; static GC gc; static GC tmp_gc; -static long mask; +static long tqmask; static XGCValues values; static Colormap cmap; @@ -216,7 +216,7 @@ Drawable win; /* Fill a window with a solid, white rectangle */ { XGCValues values; -long mask; +long tqmask; values.background = colours[0].pixel; values.foreground = colours[255].pixel;; @@ -224,9 +224,9 @@ long mask; values.function = GXclear; - mask = GCBackground| GCForeground| GCFillStyle | GCFunction; + tqmask = GCBackground| GCForeground| GCFillStyle | GCFunction; - tmp_gc = XtGetGC(top_level, mask, &values); + tmp_gc = XtGetGC(top_level, tqmask, &values); XFillRectangle(XtDisplay(top_level), win, tmp_gc, 0, 0, 300, 300); @@ -371,14 +371,14 @@ int height; XInstallColormap(display, cmap); - mask = GCBackground| GCForeground| GCFunction; + tqmask = GCBackground| GCForeground| GCFunction; values.function = GXcopy; values.background = colours[0].pixel; values.foreground = colours[255].pixel; - gc = XtGetGC(colour_canvas, mask, &values); + gc = XtGetGC(colour_canvas, tqmask, &values); colour_pm = XCreatePixmap(XtDisplay(top_level), XtWindow(colour_shell), width, height, diff --git a/krita/colorspaces/wetsticky/ws/engine.c b/krita/colorspaces/wetsticky/ws/engine.c index 19097d9f..2fb4917e 100644 --- a/krita/colorspaces/wetsticky/ws/engine.c +++ b/krita/colorspaces/wetsticky/ws/engine.c @@ -122,7 +122,7 @@ void donate_paint(source, srcLocus, amount, dest, destLocus) to the destination cell. The destination cell must mix this new paint with its existing paint to yield a new paint. This routine is also responsible for recording which cells - have been updated and so need repainting. + have been updated and so need tqrepainting. A special case is recognised where the destination has not yet had any paint applied. This causes the donated paint to become @@ -192,7 +192,7 @@ int amount; } - need_to_repaint(destLocus); + need_to_tqrepaint(destLocus); } /* *********************************************************************** */ diff --git a/krita/colorspaces/wetsticky/ws/engine3.c b/krita/colorspaces/wetsticky/ws/engine3.c index 03a7d4f3..9fd274cd 100644 --- a/krita/colorspaces/wetsticky/ws/engine3.c +++ b/krita/colorspaces/wetsticky/ws/engine3.c @@ -122,7 +122,7 @@ void donate_paint(source, srcLocus, amount, dest, destLocus) to the destination cell. The destination cell must mix this new paint with its existing paint to yield a new paint. This routine is also responsible for recording which cells - have been updated and so need repainting. + have been updated and so need tqrepainting. A special case is recognised where the destination has not yet had any paint applied. This causes the donated paint to become @@ -191,7 +191,7 @@ int amount; } - need_to_repaint(destLocus); + need_to_tqrepaint(destLocus); } /* *********************************************************************** */ diff --git a/krita/colorspaces/wetsticky/ws/ogl_interface.c b/krita/colorspaces/wetsticky/ws/ogl_interface.c index 76a552a9..953b10c8 100644 --- a/krita/colorspaces/wetsticky/ws/ogl_interface.c +++ b/krita/colorspaces/wetsticky/ws/ogl_interface.c @@ -255,7 +255,7 @@ void evolve_paint() for (k=0; k < STEP_LIMIT; k++) single_step(); while (TRUE) { - next_cell_for_repaint(&cell, &p); + next_cell_for_tqrepaint(&cell, &p); if (cell == NIL) return; paint_cell(cell, p.x, p.y); glFlush(); diff --git a/krita/colorspaces/wetsticky/ws/x_interface.c b/krita/colorspaces/wetsticky/ws/x_interface.c index f4cb4901..a8b54b3e 100644 --- a/krita/colorspaces/wetsticky/ws/x_interface.c +++ b/krita/colorspaces/wetsticky/ws/x_interface.c @@ -68,7 +68,7 @@ static Pixmap dryness_pm; static GC gc; static GC tmp_gc; -static long mask; +static long tqmask; static XGCValues values; static Colormap cmap; @@ -272,7 +272,7 @@ Drawable win; /* Fill a window with a solid, white rectangle */ { XGCValues values; -long mask; +long tqmask; values.background = colours[0].pixel; values.foreground = colours[255].pixel;; @@ -280,9 +280,9 @@ long mask; values.function = GXclear; - mask = GCBackground| GCForeground| GCFillStyle | GCFunction; + tqmask = GCBackground| GCForeground| GCFillStyle | GCFunction; - tmp_gc = XtGetGC(top_level, mask, &values); + tmp_gc = XtGetGC(top_level, tqmask, &values); XFillRectangle(XtDisplay(top_level), win, tmp_gc, 0, 0, 300, 300); @@ -423,14 +423,14 @@ int height; XInstallColormap(display, cmap); - mask = GCBackground| GCForeground| GCFunction; + tqmask = GCBackground| GCForeground| GCFunction; values.function = GXcopy; values.background = colours[0].pixel; values.foreground = colours[255].pixel; - gc = XtGetGC(colour_canvas, mask, &values); + gc = XtGetGC(colour_canvas, tqmask, &values); colour_pm = XCreatePixmap(XtDisplay(top_level), XtWindow(colour_shell), width, height, @@ -700,7 +700,7 @@ void evolve_paint() for (k=0; k < STEP_LIMIT; k++) single_step(); while (TRUE) { - next_cell_for_repaint(&cell, &p); + next_cell_for_tqrepaint(&cell, &p); if (cell == NIL) return; paint_cell(cell, p.x, p.y); } diff --git a/krita/colorspaces/wetsticky/wstool.ui b/krita/colorspaces/wetsticky/wstool.ui index 4dab3233..2f95d18b 100644 --- a/krita/colorspaces/wetsticky/wstool.ui +++ b/krita/colorspaces/wetsticky/wstool.ui @@ -1,6 +1,6 @@ WdgWSPaintOp - + WdgWSPaintOp @@ -16,7 +16,7 @@ unnamed - + grpGravity @@ -27,7 +27,7 @@ unnamed - + chkGravity @@ -35,7 +35,7 @@ Paint &gravity - + lblDirection @@ -46,7 +46,7 @@ intDryingRate - + Up @@ -71,7 +71,7 @@ cmbGravitationalDirection - + lblStrength @@ -92,7 +92,7 @@ - + grpPaint @@ -103,7 +103,7 @@ unnamed - + lblDryingRate @@ -114,7 +114,7 @@ intDryingRate - + chkLiquid @@ -152,7 +152,7 @@ 100 - + lblMiscibility @@ -165,7 +165,7 @@ - + grpSubstrate @@ -181,7 +181,7 @@ intHeight - + lblHeight @@ -203,7 +203,7 @@ 100 - + lblAbsorbency @@ -214,7 +214,7 @@ intAbsorbency - + lblColor @@ -225,7 +225,7 @@ bnCanvasColor - + chkCanvas @@ -250,7 +250,7 @@ - + knuminput.h knuminput.h diff --git a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc index 3155457f..d8ea896b 100644 --- a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc +++ b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc @@ -19,22 +19,22 @@ #include "kis_ycbcr_u16_colorspace.h" -#include +#include #include -const Q_INT32 MAX_CHANNEL_YCbCr = 3; -const Q_INT32 MAX_CHANNEL_YCbCrA = 4; +const TQ_INT32 MAX_CHANNEL_YCbCr = 3; +const TQ_INT32 MAX_CHANNEL_YCbCrA = 4; -KisYCbCrU16ColorSpace::KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* /*p*/) - : KisU16BaseColorSpace(KisID("YCbCrAU16", i18n("YCbCr (16-bit integer/channel)")), TYPE_YCbCr_16, icSigYCbCrData, parent, 0) +KisYCbCrU16ColorSpace::KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* /*p*/) + : KisU16BaseColorSpace(KisID("YCbCrAU16", i18n("YCbCr (16-bit integer/channel)")), TYPE_YCbCr_16, icSigYCbCrData, tqparent, 0) { - m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16))); - m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16))); - m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16))); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); - m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16); + m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16); KisAbstractColorSpace::init(); } @@ -43,7 +43,7 @@ KisYCbCrU16ColorSpace::~KisYCbCrU16ColorSpace() { } -void KisYCbCrU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 Cr, Q_UINT16 alpha) const +void KisYCbCrU16ColorSpace::setPixel(TQ_UINT8 *dst, TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 Cr, TQ_UINT16 alpha) const { Pixel *dstPixel = reinterpret_cast(dst); @@ -53,7 +53,7 @@ void KisYCbCrU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 Y, Q_UINT16 Cb, Q_UI dstPixel->alpha = alpha; } -void KisYCbCrU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *Y, Q_UINT16 *Cb, Q_UINT16 *Cr, Q_UINT16 *alpha) const +void KisYCbCrU16ColorSpace::getPixel(const TQ_UINT8 *src, TQ_UINT16 *Y, TQ_UINT16 *Cb, TQ_UINT16 *Cr, TQ_UINT16 *alpha) const { const Pixel *srcPixel = reinterpret_cast(src); @@ -64,11 +64,11 @@ void KisYCbCrU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *Y, Q_UINT16 * } -void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * profile ) +void KisYCbCrU16ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * profile ) { if(getProfile()) { - KisU16BaseColorSpace::fromQColor(c, dstU8, profile); + KisU16BaseColorSpace::fromTQColor(c, dstU8, profile); } else { Pixel *dst = reinterpret_cast(dstU8); dst->Y = computeY( c.red(), c.green(), c.blue()); @@ -77,11 +77,11 @@ void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfi } } -void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * profile ) +void KisYCbCrU16ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * profile ) { if(getProfile()) { - KisU16BaseColorSpace::fromQColor(c, opacity, dstU8, profile); + KisU16BaseColorSpace::fromTQColor(c, opacity, dstU8, profile); } else { Pixel *dst = reinterpret_cast(dstU8); dst->Y = computeY( c.red(), c.green(), c.blue()); @@ -91,11 +91,11 @@ void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 } } -void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * profile) +void KisYCbCrU16ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * profile) { if(getProfile()) { - KisU16BaseColorSpace::toQColor(srcU8, c, profile); + KisU16BaseColorSpace::toTQColor(srcU8, c, profile); } else { const Pixel *src = reinterpret_cast(srcU8); @@ -103,11 +103,11 @@ void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile } } -void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * profile) +void KisYCbCrU16ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile) { if(getProfile()) { - KisU16BaseColorSpace::toQColor(srcU8, c, opacity, profile); + KisU16BaseColorSpace::toTQColor(srcU8, c, opacity, profile); } else { const Pixel *src = reinterpret_cast(srcU8); c->setRgb(computeRed(src->Y,src->Cb,src->Cr) >> 8, computeGreen(src->Y,src->Cb,src->Cr) >> 8, computeBlue(src->Y,src->Cb,src->Cr) >> 8); @@ -115,32 +115,32 @@ void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *o } } -Q_UINT8 KisYCbCrU16ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8) +TQ_UINT8 KisYCbCrU16ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8) { if(getProfile()) return KisU16BaseColorSpace::difference(src1U8, src2U8); const Pixel *src1 = reinterpret_cast(src1U8); const Pixel *src2 = reinterpret_cast(src2U8); - return QMAX(QABS(src2->Y - src1->Y), QMAX(QABS(src2->Cb - src1->Cb), QABS(src2->Cr - src1->Cr))) >> 8; + return TQMAX(TQABS(src2->Y - src1->Y), TQMAX(TQABS(src2->Cb - src1->Cb), TQABS(src2->Cr - src1->Cr))) >> 8; } -void KisYCbCrU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisYCbCrU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT16 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0; + TQ_UINT16 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0; while (nColors--) { const Pixel *pixel = reinterpret_cast(*colors); - Q_UINT16 alpha = pixel->alpha; + TQ_UINT16 alpha = pixel->alpha; float alphaTimesWeight = alpha * *weights; - totalY += (Q_UINT16)(pixel->Y * alphaTimesWeight); - totalCb += (Q_UINT16)(pixel->Cb * alphaTimesWeight); - totalCr += (Q_UINT16)(pixel->Cr * alphaTimesWeight); - newAlpha += (Q_UINT16)(alphaTimesWeight); + totalY += (TQ_UINT16)(pixel->Y * alphaTimesWeight); + totalCb += (TQ_UINT16)(pixel->Cb * alphaTimesWeight); + totalCr += (TQ_UINT16)(pixel->Cr * alphaTimesWeight); + newAlpha += (TQ_UINT16)(alphaTimesWeight); weights++; colors++; @@ -161,38 +161,38 @@ void KisYCbCrU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *wei dstPixel->Cr = totalCr; } -QValueVector KisYCbCrU16ColorSpace::channels() const { +TQValueVector KisYCbCrU16ColorSpace::channels() const { return m_channels; } -Q_UINT32 KisYCbCrU16ColorSpace::nChannels() const { +TQ_UINT32 KisYCbCrU16ColorSpace::nChannels() const { return MAX_CHANNEL_YCbCrA; } -Q_UINT32 KisYCbCrU16ColorSpace::nColorChannels() const { +TQ_UINT32 KisYCbCrU16ColorSpace::nColorChannels() const { return MAX_CHANNEL_YCbCr; } -Q_UINT32 KisYCbCrU16ColorSpace::pixelSize() const { - return MAX_CHANNEL_YCbCrA * sizeof(Q_UINT16); +TQ_UINT32 KisYCbCrU16ColorSpace::pixelSize() const { + return MAX_CHANNEL_YCbCrA * sizeof(TQ_UINT16); } -QImage KisYCbCrU16ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, KisProfile * dstProfile, Q_INT32 renderingIntent, float exposure ) +TQImage KisYCbCrU16ColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, TQ_INT32 renderingIntent, float exposure ) { if(getProfile()) - return KisU16BaseColorSpace::convertToQImage( data, width, height, dstProfile, renderingIntent, exposure); + return KisU16BaseColorSpace::convertToTQImage( data, width, height, dstProfile, renderingIntent, exposure); - QImage img = QImage(width, height, 32, 0, QImage::LittleEndian); + TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian); img.setAlphaBuffer(true); - Q_INT32 i = 0; + TQ_INT32 i = 0; uchar *j = img.bits(); while ( i < width * height * MAX_CHANNEL_YCbCrA) { - Q_UINT16 Y = *( data + i + PIXEL_Y ); - Q_UINT16 Cb = *( data + i + PIXEL_Cb ); - Q_UINT16 Cr = *( data + i + PIXEL_Cr ); + TQ_UINT16 Y = *( data + i + PIXEL_Y ); + TQ_UINT16 Cb = *( data + i + PIXEL_Cb ); + TQ_UINT16 Cr = *( data + i + PIXEL_Cr ); *( j + 3) = *( data + i + PIXEL_ALPHA ) >> 8; *( j + 2 ) = computeRed(Y,Cb,Cr) >> 8; *( j + 1 ) = computeGreen(Y,Cb,Cr) >> 8; @@ -204,47 +204,47 @@ QImage KisYCbCrU16ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width } -void KisYCbCrU16ColorSpace::bitBlt(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_UINT8 opacity, Q_INT32 rows, Q_INT32 cols, const KisCompositeOp& op) +void KisYCbCrU16ColorSpace::bitBlt(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_UINT8 opacity, TQ_INT32 rows, TQ_INT32 cols, const KisCompositeOp& op) { switch (op.op()) { case COMPOSITE_UNDEF: // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity); break; default: break; } } -void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisYCbCrU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT16 *src = reinterpret_cast(srcRowStart); - Q_UINT16 *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } if (srcAlpha != U16_OPACITY_TRANSPARENT) { @@ -254,16 +254,16 @@ void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt } if (srcAlpha == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(TQ_UINT16)); } else { - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; - Q_UINT16 srcBlend; + TQ_UINT16 srcBlend; if (dstAlpha == U16_OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -274,7 +274,7 @@ void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt } if (srcBlend == U16_OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(Q_UINT16)); + memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(TQ_UINT16)); } else { dst[PIXEL_Y] = UINT16_BLEND(src[PIXEL_Y], dst[PIXEL_Y], srcBlend); dst[PIXEL_Cb] = UINT16_BLEND(src[PIXEL_Cb], dst[PIXEL_Cb], srcBlend); @@ -291,32 +291,32 @@ void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } -void KisYCbCrU16ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, const Q_UINT8 *src, Q_INT32 srcRowSize, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 cols, Q_UINT8 /*opacity*/) +void KisYCbCrU16ColorSpace::compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowSize, const TQ_UINT8 *src, TQ_INT32 srcRowSize, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 cols, TQ_UINT8 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT16 srcAlpha = s->alpha; + TQ_UINT16 srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = UINT16_MULT(srcAlpha, d->alpha); } @@ -324,7 +324,7 @@ void KisYCbCrU16ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, con dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } diff --git a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h index b2dcd341..9ee173de 100644 --- a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h +++ b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h @@ -31,91 +31,91 @@ class KisYCbCrU16ColorSpace : public KisU16BaseColorSpace { public: - KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* p); + KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* p); ~KisYCbCrU16ColorSpace(); virtual bool willDegrade(ColorSpaceIndependence ) { return false; }; public: - void setPixel(Q_UINT8 *pixel, Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 Cr, Q_UINT16 alpha) const; - void getPixel(const Q_UINT8 *pixel, Q_UINT16 *Y, Q_UINT16 *Cb, Q_UINT16 *Cr, Q_UINT16 *alpha) const; + void setPixel(TQ_UINT8 *pixel, TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 Cr, TQ_UINT16 alpha) const; + void getPixel(const TQ_UINT8 *pixel, TQ_UINT16 *Y, TQ_UINT16 *Cb, TQ_UINT16 *Cr, TQ_UINT16 *alpha) const; - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; + virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent, + TQ_INT32 renderingIntent, float exposure = 0.0f); virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); private: -#define CLAMP_TO_16BITCHANNEL(a) CLAMP(a, 0, Q_UINT16_MAX) - inline Q_UINT16 computeRed(Q_UINT16 Y, Q_UINT16 /*Cb*/, Q_UINT16 Cr) +#define CLAMP_TO_16BITCHANNEL(a) CLAMP(a, 0, TQ_UINT16_MAX) + inline TQ_UINT16 computeRed(TQ_UINT16 Y, TQ_UINT16 /*Cb*/, TQ_UINT16 Cr) { - return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (Cr - 32768)* (2-2*LUMA_RED) + Y ) ); + return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (Cr - 32768)* (2-2*LUMA_RED) + Y ) ); } - inline Q_UINT16 computeGreen(Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 Cr) + inline TQ_UINT16 computeGreen(TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 Cr) { - return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) ); + return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) ); } - inline Q_UINT16 computeBlue(Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 /*Cr*/) + inline TQ_UINT16 computeBlue(TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 /*Cr*/) { - return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (Cb - 32768)*(2 - 2 * LUMA_BLUE) + Y) ); + return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (Cb - 32768)*(2 - 2 * LUMA_BLUE) + Y) ); } - inline Q_UINT16 computeY( Q_UINT16 r, Q_UINT16 b, Q_UINT16 g) + inline TQ_UINT16 computeY( TQ_UINT16 r, TQ_UINT16 b, TQ_UINT16 g) { - return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) ); + return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) ); } - inline Q_UINT16 computeCb( Q_UINT16 r, Q_UINT16 b, Q_UINT16 g) + inline TQ_UINT16 computeCb( TQ_UINT16 r, TQ_UINT16 b, TQ_UINT16 g) { - return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 32768) ); + return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 32768) ); } - inline Q_UINT16 computeCr( Q_UINT16 r, Q_UINT16 b, Q_UINT16 g) + inline TQ_UINT16 computeCr( TQ_UINT16 r, TQ_UINT16 b, TQ_UINT16 g) { - return (Q_UINT8)( CLAMP_TO_16BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 32768) ); + return (TQ_UINT8)( CLAMP_TO_16BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 32768) ); } #undef CLAMP_TO_16BITCHANNEL - static const Q_UINT8 PIXEL_Y = 0; - static const Q_UINT8 PIXEL_Cb = 1; - static const Q_UINT8 PIXEL_Cr = 2; - static const Q_UINT8 PIXEL_ALPHA = 3; + static const TQ_UINT8 PIXEL_Y = 0; + static const TQ_UINT8 PIXEL_Cb = 1; + static const TQ_UINT8 PIXEL_Cr = 2; + static const TQ_UINT8 PIXEL_ALPHA = 3; struct Pixel { - Q_UINT16 Y; - Q_UINT16 Cb; - Q_UINT16 Cr; - Q_UINT16 alpha; + TQ_UINT16 Y; + TQ_UINT16 Cb; + TQ_UINT16 Cr; + TQ_UINT16 alpha; }; }; @@ -131,13 +131,13 @@ class KisYCbCrU16ColorSpaceFactory : public KisColorSpaceFactory /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_YCbCr_16; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_YCbCr_16; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigYCbCrData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisYCbCrU16ColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisYCbCrU16ColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return ""; }; + virtual TQString defaultProfile() { return ""; }; }; diff --git a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc index 0ab9ed4b..f29f5603 100644 --- a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc +++ b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc @@ -33,14 +33,14 @@ typedef KGenericFactory YCbCrU16PluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_ycbcr_u16_plugin, YCbCrU16PluginFactory( "krita" ) ) -YCbCrU16Plugin::YCbCrU16Plugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +YCbCrU16Plugin::YCbCrU16Plugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(YCbCrU16PluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); KisColorSpace * colorSpaceYCbCrU16 = new KisYCbCrU16ColorSpace(f, 0); KisColorSpaceFactory * csf = new KisYCbCrU16ColorSpaceFactory(); diff --git a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h index 3b079ee7..ceb8ec6f 100644 --- a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h +++ b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h @@ -27,8 +27,9 @@ class YCbCrU16Plugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - YCbCrU16Plugin(QObject *parent, const char *name, const QStringList &); + YCbCrU16Plugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~YCbCrU16Plugin(); }; diff --git a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc index 7c6707c5..9c7548bf 100644 --- a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc +++ b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc @@ -19,22 +19,22 @@ #include "kis_ycbcr_u8_colorspace.h" -#include +#include #include -const Q_INT32 MAX_CHANNEL_YCbCr = 3; -const Q_INT32 MAX_CHANNEL_YCbCrA = 4; +const TQ_INT32 MAX_CHANNEL_YCbCr = 3; +const TQ_INT32 MAX_CHANNEL_YCbCrA = 4; -KisYCbCrU8ColorSpace::KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* /*p*/) - : KisU8BaseColorSpace(KisID("YCbCrAU8", i18n("YCbCr (8-bit integer/channel)")), TYPE_YCbCr_8, icSigYCbCrData, parent, 0) +KisYCbCrU8ColorSpace::KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* /*p*/) + : KisU8BaseColorSpace(KisID("YCbCrAU8", i18n("YCbCr (8-bit integer/channel)")), TYPE_YCbCr_8, icSigYCbCrData, tqparent, 0) { - m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8))); - m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8))); - m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8))); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(Q_UINT8), KisChannelInfo::ALPHA, KisChannelInfo::UINT8, sizeof(Q_UINT8))); + m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(TQ_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(TQ_UINT8))); + m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(TQ_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(TQ_UINT8))); + m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(TQ_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(TQ_UINT8))); + m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(TQ_UINT8), KisChannelInfo::ALPHA, KisChannelInfo::UINT8, sizeof(TQ_UINT8))); - m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT8); + m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT8); KisAbstractColorSpace::init(); } @@ -43,7 +43,7 @@ KisYCbCrU8ColorSpace::~KisYCbCrU8ColorSpace() { } -void KisYCbCrU8ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 Cr, Q_UINT8 alpha) const +void KisYCbCrU8ColorSpace::setPixel(TQ_UINT8 *dst, TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 Cr, TQ_UINT8 alpha) const { Pixel *dstPixel = reinterpret_cast(dst); @@ -53,7 +53,7 @@ void KisYCbCrU8ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 dstPixel->alpha = alpha; } -void KisYCbCrU8ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT8 *Y, Q_UINT8 *Cb, Q_UINT8 *Cr, Q_UINT8 *alpha) const +void KisYCbCrU8ColorSpace::getPixel(const TQ_UINT8 *src, TQ_UINT8 *Y, TQ_UINT8 *Cb, TQ_UINT8 *Cr, TQ_UINT8 *alpha) const { const Pixel *srcPixel = reinterpret_cast(src); @@ -64,11 +64,11 @@ void KisYCbCrU8ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT8 *Y, Q_UINT8 *Cb, } -void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * profile ) +void KisYCbCrU8ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * profile ) { if(getProfile()) { - KisU8BaseColorSpace::fromQColor(c, dstU8, profile); + KisU8BaseColorSpace::fromTQColor(c, dstU8, profile); } else { Pixel *dst = reinterpret_cast(dstU8); dst->Y = computeY( c.red(), c.green(), c.blue()); @@ -77,11 +77,11 @@ void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfil } } -void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * profile ) +void KisYCbCrU8ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * profile ) { if(getProfile()) { - KisU8BaseColorSpace::fromQColor(c, opacity, dstU8, profile); + KisU8BaseColorSpace::fromTQColor(c, opacity, dstU8, profile); } else { Pixel *dst = reinterpret_cast(dstU8); dst->Y = computeY( c.red(), c.green(), c.blue()); @@ -91,11 +91,11 @@ void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 } } -void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * profile) +void KisYCbCrU8ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * profile) { if(getProfile()) { - KisU8BaseColorSpace::toQColor(srcU8, c, profile); + KisU8BaseColorSpace::toTQColor(srcU8, c, profile); } else { const Pixel *src = reinterpret_cast(srcU8); @@ -103,11 +103,11 @@ void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile } } -void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * profile) +void KisYCbCrU8ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile) { if(getProfile()) { - KisU8BaseColorSpace::toQColor(srcU8, c, opacity, profile); + KisU8BaseColorSpace::toTQColor(srcU8, c, opacity, profile); } else { const Pixel *src = reinterpret_cast(srcU8); c->setRgb(computeRed(src->Y,src->Cb,src->Cr), computeGreen(src->Y,src->Cb,src->Cr), computeBlue(src->Y,src->Cb,src->Cr)); @@ -115,32 +115,32 @@ void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *op } } -Q_UINT8 KisYCbCrU8ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8) +TQ_UINT8 KisYCbCrU8ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8) { if(getProfile()) return KisU8BaseColorSpace::difference(src1U8, src2U8); const Pixel *src1 = reinterpret_cast(src1U8); const Pixel *src2 = reinterpret_cast(src2U8); - return QMAX(QABS(src2->Y - src1->Y), QMAX(QABS(src2->Cb - src1->Cb), QABS(src2->Cr - src1->Cr))); + return TQMAX(TQABS(src2->Y - src1->Y), TQMAX(TQABS(src2->Cb - src1->Cb), TQABS(src2->Cr - src1->Cr))); } -void KisYCbCrU8ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisYCbCrU8ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT8 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0; + TQ_UINT8 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0; while (nColors--) { const Pixel *pixel = reinterpret_cast(*colors); - Q_UINT8 alpha = pixel->alpha; + TQ_UINT8 alpha = pixel->alpha; float alphaTimesWeight = alpha * *weights; - totalY += (Q_UINT8)(pixel->Y * alphaTimesWeight); - totalCb += (Q_UINT8)(pixel->Cb * alphaTimesWeight); - totalCr += (Q_UINT8)(pixel->Cr * alphaTimesWeight); - newAlpha += (Q_UINT8)(alphaTimesWeight); + totalY += (TQ_UINT8)(pixel->Y * alphaTimesWeight); + totalCb += (TQ_UINT8)(pixel->Cb * alphaTimesWeight); + totalCr += (TQ_UINT8)(pixel->Cr * alphaTimesWeight); + newAlpha += (TQ_UINT8)(alphaTimesWeight); weights++; colors++; @@ -161,38 +161,38 @@ void KisYCbCrU8ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig dstPixel->Cr = totalCr; } -QValueVector KisYCbCrU8ColorSpace::channels() const { +TQValueVector KisYCbCrU8ColorSpace::channels() const { return m_channels; } -Q_UINT32 KisYCbCrU8ColorSpace::nChannels() const { +TQ_UINT32 KisYCbCrU8ColorSpace::nChannels() const { return MAX_CHANNEL_YCbCrA; } -Q_UINT32 KisYCbCrU8ColorSpace::nColorChannels() const { +TQ_UINT32 KisYCbCrU8ColorSpace::nColorChannels() const { return MAX_CHANNEL_YCbCr; } -Q_UINT32 KisYCbCrU8ColorSpace::pixelSize() const { - return MAX_CHANNEL_YCbCrA*sizeof(Q_UINT8); +TQ_UINT32 KisYCbCrU8ColorSpace::pixelSize() const { + return MAX_CHANNEL_YCbCrA*sizeof(TQ_UINT8); } -QImage KisYCbCrU8ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, KisProfile * dstProfile, Q_INT32 renderingIntent, float exposure ) +TQImage KisYCbCrU8ColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, TQ_INT32 renderingIntent, float exposure ) { if(getProfile()) - return KisU8BaseColorSpace::convertToQImage( data, width, height, dstProfile, renderingIntent, exposure); + return KisU8BaseColorSpace::convertToTQImage( data, width, height, dstProfile, renderingIntent, exposure); - QImage img = QImage(width, height, 32, 0, QImage::LittleEndian); + TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian); img.setAlphaBuffer(true); - Q_INT32 i = 0; + TQ_INT32 i = 0; uchar *j = img.bits(); while ( i < width * height * MAX_CHANNEL_YCbCrA) { - Q_UINT8 Y = *( data + i + PIXEL_Y ); - Q_UINT8 Cb = *( data + i + PIXEL_Cb ); - Q_UINT8 Cr = *( data + i + PIXEL_Cr ); + TQ_UINT8 Y = *( data + i + PIXEL_Y ); + TQ_UINT8 Cb = *( data + i + PIXEL_Cb ); + TQ_UINT8 Cr = *( data + i + PIXEL_Cr ); *( j + 3) = *( data + i + PIXEL_ALPHA ); *( j + 2 ) = computeRed(Y,Cb,Cr); *( j + 1 ) = computeGreen(Y,Cb,Cr); @@ -204,45 +204,45 @@ QImage KisYCbCrU8ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, } -void KisYCbCrU8ColorSpace::bitBlt(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_UINT8 opacity, Q_INT32 rows, Q_INT32 cols, const KisCompositeOp& op) +void KisYCbCrU8ColorSpace::bitBlt(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_UINT8 opacity, TQ_INT32 rows, TQ_INT32 cols, const KisCompositeOp& op) { switch (op.op()) { case COMPOSITE_UNDEF: // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity); break; default: break; } } -void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisYCbCrU8ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { while (rows > 0) { - const Q_UINT8 *src = srcRowStart; - Q_UINT8 *dst = dstRowStart; - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *src = srcRowStart; + TQ_UINT8 *dst = dstRowStart; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT8 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT8 srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - if (*mask != OPACITY_OPAQUE) { - srcAlpha *= *mask; + // apply the alphatqmask + if (tqmask != 0) { + if (*tqmask != OPACITY_OPAQUE) { + srcAlpha *= *tqmask; } - mask++; + tqmask++; } if (srcAlpha > OPACITY_TRANSPARENT) { @@ -252,16 +252,16 @@ void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr } if (srcAlpha == OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(TQ_UINT8)); } else { - Q_UINT8 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA]; - Q_UINT8 srcBlend; + TQ_UINT8 srcBlend; if (dstAlpha == OPACITY_OPAQUE ) { srcBlend = srcAlpha; } else { - Q_UINT8 newAlpha = dstAlpha + (OPACITY_OPAQUE - dstAlpha) * srcAlpha; + TQ_UINT8 newAlpha = dstAlpha + (OPACITY_OPAQUE - dstAlpha) * srcAlpha; dst[PIXEL_ALPHA] = newAlpha; if (newAlpha > 0) { @@ -272,7 +272,7 @@ void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr } if (srcBlend == OPACITY_OPAQUE) { - memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(Q_UINT8)); + memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(TQ_UINT8)); } else { dst[PIXEL_Y] = UINT8_BLEND(src[PIXEL_Y], dst[PIXEL_Y], srcBlend); dst[PIXEL_Cb] = UINT8_BLEND(src[PIXEL_Cb], dst[PIXEL_Cb], srcBlend); @@ -289,30 +289,30 @@ void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } -void KisYCbCrU8ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, const Q_UINT8 *src, Q_INT32 srcRowSize, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 cols, Q_UINT8 /*opacity*/) +void KisYCbCrU8ColorSpace::compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowSize, const TQ_UINT8 *src, TQ_INT32 srcRowSize, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 cols, TQ_UINT8 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT8 srcAlpha = s -> alpha; + TQ_UINT8 srcAlpha = s -> alpha; - // apply the alphamask - if (mask != 0) { - if (*mask != OPACITY_OPAQUE) { - srcAlpha = *mask; + // apply the alphatqmask + if (tqmask != 0) { + if (*tqmask != OPACITY_OPAQUE) { + srcAlpha = *tqmask; } - mask++; + tqmask++; } d -> alpha = srcAlpha * d -> alpha; } @@ -320,12 +320,12 @@ void KisYCbCrU8ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, cons dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisYCbCrU8ColorSpace::compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 */*mask*/, Q_INT32 /*maskRowStride*/, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 /*opacity*/) +void KisYCbCrU8ColorSpace::compositeCopy(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 */*tqmask*/, TQ_INT32 /*tqmaskRowStride*/, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 /*opacity*/) { while (rows > 0) { memcpy(dstRowStart, srcRowStart, numColumns * sizeof(Pixel)); diff --git a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h index bc4d8329..479a7179 100644 --- a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h +++ b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h @@ -31,92 +31,92 @@ class KisYCbCrU8ColorSpace : public KisU8BaseColorSpace { public: - KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* p); + KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* p); ~KisYCbCrU8ColorSpace(); virtual bool willDegrade(ColorSpaceIndependence ) { return false; }; public: - void setPixel(Q_UINT8 *pixel, Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 Cr, Q_UINT8 alpha) const; - void getPixel(const Q_UINT8 *pixel, Q_UINT8 *Y, Q_UINT8 *Cb, Q_UINT8 *Cr, Q_UINT8 *alpha) const; + void setPixel(TQ_UINT8 *pixel, TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 Cr, TQ_UINT8 alpha) const; + void getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *Y, TQ_UINT8 *Cb, TQ_UINT8 *Cr, TQ_UINT8 *alpha) const; - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; + virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent, + TQ_INT32 renderingIntent, float exposure = 0.0f); virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); - void compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); + void compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); private: -#define CLAMP_TO_8BITCHANNEL(a) CLAMP(a, 0, Q_UINT8_MAX) - inline Q_UINT8 computeRed(Q_UINT8 Y, Q_UINT8 /*Cb*/, Q_UINT8 Cr) +#define CLAMP_TO_8BITCHANNEL(a) CLAMP(a, 0, TQ_UINT8_MAX) + inline TQ_UINT8 computeRed(TQ_UINT8 Y, TQ_UINT8 /*Cb*/, TQ_UINT8 Cr) { - return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (Cr - 128)* (2-2*LUMA_RED) + Y ) ); + return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (Cr - 128)* (2-2*LUMA_RED) + Y ) ); } - inline Q_UINT8 computeGreen(Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 Cr) + inline TQ_UINT8 computeGreen(TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 Cr) { - return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) ); + return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) ); } - inline Q_UINT8 computeBlue(Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 /*Cr*/) + inline TQ_UINT8 computeBlue(TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 /*Cr*/) { - return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (Cb - 128)*(2 - 2 * LUMA_BLUE) + Y) ); + return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (Cb - 128)*(2 - 2 * LUMA_BLUE) + Y) ); } - inline Q_UINT8 computeY( Q_UINT8 r, Q_UINT8 b, Q_UINT8 g) + inline TQ_UINT8 computeY( TQ_UINT8 r, TQ_UINT8 b, TQ_UINT8 g) { - return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) ); + return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) ); } - inline Q_UINT8 computeCb( Q_UINT8 r, Q_UINT8 b, Q_UINT8 g) + inline TQ_UINT8 computeCb( TQ_UINT8 r, TQ_UINT8 b, TQ_UINT8 g) { - return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 128) ); + return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 128) ); } - inline Q_UINT8 computeCr( Q_UINT8 r, Q_UINT8 b, Q_UINT8 g) + inline TQ_UINT8 computeCr( TQ_UINT8 r, TQ_UINT8 b, TQ_UINT8 g) { - return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 128) ); + return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 128) ); } #undef CLAMP_TO_8BITCHANNEL - static const Q_UINT8 PIXEL_Y = 0; - static const Q_UINT8 PIXEL_Cb = 1; - static const Q_UINT8 PIXEL_Cr = 2; - static const Q_UINT8 PIXEL_ALPHA = 3; + static const TQ_UINT8 PIXEL_Y = 0; + static const TQ_UINT8 PIXEL_Cb = 1; + static const TQ_UINT8 PIXEL_Cr = 2; + static const TQ_UINT8 PIXEL_ALPHA = 3; struct Pixel { - Q_UINT8 Y; - Q_UINT8 Cb; - Q_UINT8 Cr; - Q_UINT8 alpha; + TQ_UINT8 Y; + TQ_UINT8 Cb; + TQ_UINT8 Cr; + TQ_UINT8 alpha; }; }; @@ -132,13 +132,13 @@ class KisYCbCrU8ColorSpaceFactory : public KisColorSpaceFactory /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return TYPE_YCbCr_8; }; + virtual TQ_UINT32 colorSpaceType() { return TYPE_YCbCr_8; }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigYCbCrData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisYCbCrU8ColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisYCbCrU8ColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return ""; }; + virtual TQString defaultProfile() { return ""; }; }; #endif diff --git a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc index 751e3f31..471b203e 100644 --- a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc +++ b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc @@ -35,14 +35,14 @@ typedef KGenericFactory YCbCrU8PluginFactory; K_EXPORT_COMPONENT_FACTORY( krita_ycbcr_u8_plugin, YCbCrU8PluginFactory( "krita" ) ) -YCbCrU8Plugin::YCbCrU8Plugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +YCbCrU8Plugin::YCbCrU8Plugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(YCbCrU8PluginFactory::instance()); - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( tqparent ); KisColorSpace * colorSpaceYCbCrU8 = new KisYCbCrU8ColorSpace(f, 0); KisColorSpaceFactory * csf = new KisYCbCrU8ColorSpaceFactory(); diff --git a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h index ef418784..98274614 100644 --- a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h +++ b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h @@ -27,8 +27,9 @@ class YCbCrU8Plugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - YCbCrU8Plugin(QObject *parent, const char *name, const QStringList &); + YCbCrU8Plugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~YCbCrU8Plugin(); }; diff --git a/krita/core/createdcop.py b/krita/core/createdcop.py index b3395ea2..bac48f33 100755 --- a/krita/core/createdcop.py +++ b/krita/core/createdcop.py @@ -34,7 +34,7 @@ class %(classname)sIface : virtual public DCOPObject { K_DCOP public: - %(classname)sIface( %(classname)s * parent ); + %(classname)sIface( %(classname)s * tqparent ); k_dcop: private: @@ -73,10 +73,10 @@ dcopiface_template = """/* #include -%(classname)sIface::%(classname)sIface( %(classname)s * parent ) +%(classname)sIface::%(classname)sIface( %(classname)s * tqparent ) : DCOPObject() { - m_parent = parent; + m_parent = tqparent; } """ @@ -84,10 +84,10 @@ dcopiface_template = """/* def parseHeader(headerfile, classname): # parse the source class header to get a list of functions we're going to wrap functions = [] - if (headerfile.find("private:") > -1): - lines = headerfile[headerfile.find(classname):headerfile.find("private")].splitlines() + if (headerfile.tqfind("private:") > -1): + lines = headerfile[headerfile.tqfind(classname):headerfile.tqfind("private")].splitlines() else: - lines = headerfile[headerfile.find(classname):headerfile.find("#endif")].splitlines() + lines = headerfile[headerfile.tqfind(classname):headerfile.tqfind("#endif")].splitlines() i = 0 while i < len(lines): line = lines[i].strip() @@ -99,8 +99,8 @@ def parseHeader(headerfile, classname): line.startswith("Q_OBJECT") or line.startswith("#") or line.startswith("}") or - line.startswith("public slots:") or - line.find("~") != -1 or + line.startswith("public Q_SLOTS:") or + line.tqfind("~") != -1 or len(line) == 0 ): i+=1 @@ -112,17 +112,17 @@ def parseHeader(headerfile, classname): function = line complete = 0 # strip the inline implementation - if (line.find("{") > -1): - function = line[:line.find("{")] - if function.find("}") > -1: - function += line[line.find("}") + 1:] + if (line.tqfind("{") > -1): + function = line[:line.tqfind("{")] + if function.tqfind("}") > -1: + function += line[line.tqfind("}") + 1:] complete = 1 else: i += 1 # search for the missing } on the next lines while i < len(lines): - if (lines[i].find("}") > -1): - function += lines[i][lines[i].find("}") + 1:] + if (lines[i].tqfind("}") > -1): + function += lines[i][lines[i].tqfind("}") + 1:] complete = 1 i += 1 else: diff --git a/krita/core/kis_adjustment_layer.cc b/krita/core/kis_adjustment_layer.cc index 873b24cf..69e8b939 100644 --- a/krita/core/kis_adjustment_layer.cc +++ b/krita/core/kis_adjustment_layer.cc @@ -18,7 +18,7 @@ */ #include -#include +#include #include "kis_debug_areas.h" #include "kis_group_layer.h" @@ -30,7 +30,7 @@ #include "kis_selection.h" #include "kis_fill_painter.h" -KisAdjustmentLayer::KisAdjustmentLayer(KisImageSP img, const QString &name, KisFilterConfiguration * kfc, KisSelectionSP selection) +KisAdjustmentLayer::KisAdjustmentLayer(KisImageSP img, const TQString &name, KisFilterConfiguration * kfc, KisSelectionSP selection) : KisLayer (img, name, OPACITY_OPAQUE) { m_filterConfig = kfc; @@ -38,8 +38,8 @@ KisAdjustmentLayer::KisAdjustmentLayer(KisImageSP img, const QString &name, KisF m_cachedPaintDev = new KisPaintDevice( img->colorSpace(), name.latin1()); m_showSelection = true; Q_ASSERT(m_cachedPaintDev); - connect(img, SIGNAL(sigSelectionChanged(KisImageSP)), - this, SLOT(slotSelectionChanged(KisImageSP))); + connect(img, TQT_SIGNAL(sigSelectionChanged(KisImageSP)), + this, TQT_SLOT(slotSelectionChanged(KisImageSP))); } KisAdjustmentLayer::KisAdjustmentLayer(const KisAdjustmentLayer& rhs) @@ -50,8 +50,8 @@ KisAdjustmentLayer::KisAdjustmentLayer(const KisAdjustmentLayer& rhs) m_selection = new KisSelection( *rhs.m_selection.data() ); m_selection->setParentLayer(this); m_selection->setInterestedInDirtyness(true); - connect(rhs.image(), SIGNAL(sigSelectionChanged(KisImageSP)), - this, SLOT(slotSelectionChanged(KisImageSP))); + connect(rhs.image(), TQT_SIGNAL(sigSelectionChanged(KisImageSP)), + this, TQT_SLOT(slotSelectionChanged(KisImageSP))); } m_cachedPaintDev = new KisPaintDevice( *rhs.m_cachedPaintDev.data() ); m_showSelection = false; @@ -104,7 +104,7 @@ void KisAdjustmentLayer::setSelection(KisSelectionSP selection) gc.bitBlt(0, 0, COMPOSITE_COPY, selection.data(), 0, 0, image()->bounds().width(), image()->bounds().height()); } else { - gc.fillRect(image()->bounds(), KisColor(Qt::white, cs), MAX_SELECTED); + gc.fillRect(image()->bounds(), KisColor(TQt::white, cs), MAX_SELECTED); } gc.end(); @@ -118,14 +118,14 @@ void KisAdjustmentLayer::clearSelection() KisFillPainter gc(m_selection.data()); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - QRect bounds = extent(); + TQRect bounds = extent(); bounds |= image()->bounds(); - gc.fillRect(bounds, KisColor(Qt::white, cs), MIN_SELECTED); + gc.fillRect(bounds, KisColor(TQt::white, cs), MIN_SELECTED); gc.end(); } -Q_INT32 KisAdjustmentLayer::x() const +TQ_INT32 KisAdjustmentLayer::x() const { if (m_selection) return m_selection->getX(); @@ -133,7 +133,7 @@ Q_INT32 KisAdjustmentLayer::x() const return 0; } -void KisAdjustmentLayer::setX(Q_INT32 x) +void KisAdjustmentLayer::setX(TQ_INT32 x) { if (m_selection) { m_selection->setX(x); @@ -142,7 +142,7 @@ void KisAdjustmentLayer::setX(Q_INT32 x) } -Q_INT32 KisAdjustmentLayer::y() const +TQ_INT32 KisAdjustmentLayer::y() const { if (m_selection) return m_selection->getY(); @@ -150,7 +150,7 @@ Q_INT32 KisAdjustmentLayer::y() const return 0; } -void KisAdjustmentLayer::setY(Q_INT32 y) +void KisAdjustmentLayer::setY(TQ_INT32 y) { if (m_selection) { m_selection->setY(y); @@ -158,24 +158,24 @@ void KisAdjustmentLayer::setY(Q_INT32 y) } } -QRect KisAdjustmentLayer::extent() const +TQRect KisAdjustmentLayer::extent() const { if (m_selection) return m_selection->selectedRect(); else if (image()) return image()->bounds(); else - return QRect(); + return TQRect(); } -QRect KisAdjustmentLayer::exactBounds() const +TQRect KisAdjustmentLayer::exactBounds() const { if (m_selection) return m_selection->selectedRect(); else if (image()) return image()->bounds(); else - return QRect(); + return TQRect(); } bool KisAdjustmentLayer::accept(KisLayerVisitor & v) @@ -183,22 +183,22 @@ bool KisAdjustmentLayer::accept(KisLayerVisitor & v) return v.visit( this ); } -void KisAdjustmentLayer::paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisAdjustmentLayer::paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { if (showSelection() && selection()) selection()->paintSelection(img, x, y, w, h); } -void KisAdjustmentLayer::paintSelection(QImage &img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize) +void KisAdjustmentLayer::paintSelection(TQImage &img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize) { if (showSelection() && selection()) selection()->paintSelection(img, scaledImageRect, scaledImageSize, imageSize); } -QImage KisAdjustmentLayer::createThumbnail(Q_INT32 w, Q_INT32 h) +TQImage KisAdjustmentLayer::createThumbnail(TQ_INT32 w, TQ_INT32 h) { if (!selection()) - return QImage(); + return TQImage(); int srcw, srch; if( image() ) @@ -208,7 +208,7 @@ QImage KisAdjustmentLayer::createThumbnail(Q_INT32 w, Q_INT32 h) } else { - const QRect e = extent(); + const TQRect e = extent(); srcw = e.width(); srch = e.height(); } @@ -216,29 +216,29 @@ QImage KisAdjustmentLayer::createThumbnail(Q_INT32 w, Q_INT32 h) if (w > srcw) { w = srcw; - h = Q_INT32(double(srcw) / w * h); + h = TQ_INT32(double(srcw) / w * h); } if (h > srch) { h = srch; - w = Q_INT32(double(srch) / h * w); + w = TQ_INT32(double(srch) / h * w); } if (srcw > srch) - h = Q_INT32(double(srch) / srcw * w); + h = TQ_INT32(double(srch) / srcw * w); else if (srch > srcw) - w = Q_INT32(double(srcw) / srch * h); + w = TQ_INT32(double(srcw) / srch * h); - QColor c; - Q_UINT8 opacity; - QImage img(w,h,32); + TQColor c; + TQ_UINT8 opacity; + TQImage img(w,h,32); - for (Q_INT32 y=0; y < h; ++y) { - Q_INT32 iY = (y * srch ) / h; - for (Q_INT32 x=0; x < w; ++x) { - Q_INT32 iX = (x * srcw ) / w; + for (TQ_INT32 y=0; y < h; ++y) { + TQ_INT32 iY = (y * srch ) / h; + for (TQ_INT32 x=0; x < w; ++x) { + TQ_INT32 iX = (x * srcw ) / w; m_selection->pixel(iX, iY, &c, &opacity); - img.setPixel(x, y, qRgb(opacity, opacity, opacity)); + img.setPixel(x, y, tqRgb(opacity, opacity, opacity)); } } diff --git a/krita/core/kis_adjustment_layer.h b/krita/core/kis_adjustment_layer.h index 0137bc8f..b8b76437 100644 --- a/krita/core/kis_adjustment_layer.h +++ b/krita/core/kis_adjustment_layer.h @@ -18,14 +18,14 @@ #ifndef KIS_ADJUSTMENT_LAYER_H_ #define KIS_ADJUSTMENT_LAYER_H_ -#include +#include #include "kis_types.h" #include "kis_layer_visitor.h" #include "kis_composite_op.h" #include class KNamedCommand; -class QPainter; +class TQPainter; class KisUndoAdapter; class KisGroupLayer; class KisFilterConfiguration; @@ -38,13 +38,14 @@ class KisFilterConfiguration; class KRITACORE_EXPORT KisAdjustmentLayer : public KisLayer, public KisLayerSupportsIndirectPainting { Q_OBJECT + TQ_OBJECT public: /** * Create a new adjustment layer with the given configuration and selection. * Note that the selection will be _copied_. */ - KisAdjustmentLayer(KisImageSP img, const QString &name, KisFilterConfiguration * kfc, KisSelectionSP selection); + KisAdjustmentLayer(KisImageSP img, const TQString &name, KisFilterConfiguration * kfc, KisSelectionSP selection); KisAdjustmentLayer(const KisAdjustmentLayer& rhs); virtual ~KisAdjustmentLayer(); @@ -64,21 +65,21 @@ public: /// Clears the selection (doesn't call any of the update or dirty methods) void clearSelection(); - virtual void paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - virtual void paintSelection(QImage &img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize); + virtual void paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + virtual void paintSelection(TQImage &img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize); public: - virtual Q_INT32 x() const; - virtual void setX(Q_INT32); + virtual TQ_INT32 x() const; + virtual void setX(TQ_INT32); - virtual Q_INT32 y() const; - virtual void setY(Q_INT32); + virtual TQ_INT32 y() const; + virtual void setY(TQ_INT32); /// Returns an approximation of where the bounds on actual data are in this layer - virtual QRect extent() const; + virtual TQRect extent() const; /// Returns the exact bounds of where the actual data resides in this layer - virtual QRect exactBounds() const; + virtual TQRect exactBounds() const; virtual bool accept(KisLayerVisitor &); @@ -88,7 +89,7 @@ public: bool showSelection() const { return m_showSelection; } void setSelection(bool b) { m_showSelection = b; } - virtual QImage createThumbnail(Q_INT32 w, Q_INT32 h); + virtual TQImage createThumbnail(TQ_INT32 w, TQ_INT32 h); // KisLayerSupportsIndirectPainting virtual KisLayer* layer() { return this; } diff --git a/krita/core/kis_alpha_mask.cc b/krita/core/kis_alpha_mask.cc index 7a0fcd81..6409cfc6 100644 --- a/krita/core/kis_alpha_mask.cc +++ b/krita/core/kis_alpha_mask.cc @@ -17,15 +17,15 @@ */ #include -#include -#include +#include +#include #include #include "kis_global.h" -#include "kis_alpha_mask.h" +#include "kis_alpha_tqmask.h" -KisAlphaMask::KisAlphaMask(const QImage& img, bool hasColor) +KisAlphaMask::KisAlphaMask(const TQImage& img, bool hasColor) { m_width = img.width(); m_height = img.height(); @@ -38,7 +38,7 @@ KisAlphaMask::KisAlphaMask(const QImage& img, bool hasColor) } } -KisAlphaMask::KisAlphaMask(const QImage& img) +KisAlphaMask::KisAlphaMask(const TQImage& img) { m_width = img.width(); m_height = img.height(); @@ -51,7 +51,7 @@ KisAlphaMask::KisAlphaMask(const QImage& img) } } -KisAlphaMask::KisAlphaMask(Q_INT32 width, Q_INT32 height) +KisAlphaMask::KisAlphaMask(TQ_INT32 width, TQ_INT32 height) { m_width = width; m_height = height; @@ -63,36 +63,36 @@ KisAlphaMask::~KisAlphaMask() { } -Q_INT32 KisAlphaMask::width() const +TQ_INT32 KisAlphaMask::width() const { return m_width; } -Q_INT32 KisAlphaMask::height() const +TQ_INT32 KisAlphaMask::height() const { return m_height; } -void KisAlphaMask::setAlphaAt(Q_INT32 x, Q_INT32 y, Q_UINT8 alpha) +void KisAlphaMask::setAlphaAt(TQ_INT32 x, TQ_INT32 y, TQ_UINT8 alpha) { if (y >= 0 && y < m_height && x >= 0 && x < m_width) { m_data[(y * m_width) + x] = alpha; } } -void KisAlphaMask::copyAlpha(const QImage& img) +void KisAlphaMask::copyAlpha(const TQImage& img) { for (int y = 0; y < img.height(); y++) { for (int x = 0; x < img.width(); x++) { - QRgb c = img.pixel(x,y); - Q_UINT8 a = (qGray(c) * qAlpha(c)) / 255; + TQRgb c = img.pixel(x,y); + TQ_UINT8 a = (tqGray(c) * tqAlpha(c)) / 255; m_data.push_back(a); } } } -void KisAlphaMask::computeAlpha(const QImage& img) +void KisAlphaMask::computeAlpha(const TQImage& img) { // The brushes are mostly grayscale on a white background, // although some do have a colors. The alpha channel is seldom @@ -104,24 +104,24 @@ void KisAlphaMask::computeAlpha(const QImage& img) for (int y = 0; y < img.height(); y++) { for (int x = 0; x < img.width(); x++) { - m_data.push_back(255 - qRed(img.pixel(x, y))); + m_data.push_back(255 - tqRed(img.pixel(x, y))); } } } -KisAlphaMaskSP KisAlphaMask::interpolate(KisAlphaMaskSP mask1, KisAlphaMaskSP mask2, double t) +KisAlphaMaskSP KisAlphaMask::interpolate(KisAlphaMaskSP tqmask1, KisAlphaMaskSP tqmask2, double t) { - Q_ASSERT((mask1->width() == mask2->width()) && (mask1->height() == mask2->height())); + Q_ASSERT((tqmask1->width() == tqmask2->width()) && (tqmask1->height() == tqmask2->height())); Q_ASSERT(t > -DBL_EPSILON && t < 1 + DBL_EPSILON); - int width = mask1->width(); - int height = mask1->height(); + int width = tqmask1->width(); + int height = tqmask1->height(); KisAlphaMaskSP outputMask = new KisAlphaMask(width, height); Q_CHECK_PTR(outputMask); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { - Q_UINT8 d = static_cast((1 - t) * mask1->alphaAt(x, y) + t * mask2->alphaAt(x, y)); + TQ_UINT8 d = static_cast((1 - t) * tqmask1->alphaAt(x, y) + t * tqmask2->alphaAt(x, y)); outputMask->setAlphaAt(x, y, d); } } diff --git a/krita/core/kis_alpha_mask.h b/krita/core/kis_alpha_mask.h index 1da3384d..4665857e 100644 --- a/krita/core/kis_alpha_mask.h +++ b/krita/core/kis_alpha_mask.h @@ -18,8 +18,8 @@ #ifndef KIS_ALPHA_MASK_ #define KIS_ALPHA_MASK_ -#include -#include +#include +#include #include @@ -27,57 +27,57 @@ #include "kis_types.h" /** - * KisAlphaMask is intended to create alpha values from a QImage for use - * in brush creation. It is not a generic alpha mask that can be used with + * KisAlphaMask is intended to create alpha values from a TQImage for use + * in brush creation. It is not a generic alpha tqmask that can be used with * KisPaintDevices: use a KisSelection for that. */ class KisAlphaMask : public KShared { public: /** - Create an alpha mask based on the specified QImage. If the image is - not a grayscale, the mask value is calculated from the effective grey + Create an alpha tqmask based on the specified TQImage. If the image is + not a grayscale, the tqmask value is calculated from the effective grey level and alpha value. */ - KisAlphaMask(const QImage& img); + KisAlphaMask(const TQImage& img); /** As above except quicker as the image does not need to be scanned to see if it has any colour pixels. */ - KisAlphaMask(const QImage& img, bool hasColor); + KisAlphaMask(const TQImage& img, bool hasColor); /** - Create a transparent mask. + Create a transparent tqmask. */ - KisAlphaMask(Q_INT32 width, Q_INT32 height); + KisAlphaMask(TQ_INT32 width, TQ_INT32 height); virtual ~KisAlphaMask(); /** @return the number of alpha values in a scanline. */ - Q_INT32 height() const; + TQ_INT32 height() const; /** - @return the number of lines in the mask. + @return the number of lines in the tqmask. */ - Q_INT32 width() const; + TQ_INT32 width() const; /** @return the alpha value at the specified position. - Returns Q_UINT8 OPACITY_TRANSPARENT if the value is - outside the bounds of the mask. + Returns TQ_UINT8 OPACITY_TRANSPARENT if the value is + outside the bounds of the tqmask. - XXX: this is, of course, not the best way of masking. + XXX: this is, of course, not the best way of tqmasking. Better would be to let KisAlphaMask fill a chunk of memory with the alpha values at the right position, something like - void applyMask(Q_UINT8 *pixeldata, Q_INT32 pixelWidth, - Q_INT32 alphaPos). That would be fastest, or we could - provide an iterator over the mask, that would be nice, too. + void applyMask(TQ_UINT8 *pixeldata, TQ_INT32 pixelWidth, + TQ_INT32 alphaPos). That would be fastest, or we could + provide an iterator over the tqmask, that would be nice, too. */ - inline Q_UINT8 alphaAt(Q_INT32 x, Q_INT32 y) const + inline TQ_UINT8 alphaAt(TQ_INT32 x, TQ_INT32 y) const { if (y >= 0 && y < m_height && x >= 0 && x < m_width) { return m_data[(y * m_width) + x]; @@ -87,19 +87,19 @@ class KisAlphaMask : public KShared { } } - void setAlphaAt(Q_INT32 x, Q_INT32 y, Q_UINT8 alpha); + void setAlphaAt(TQ_INT32 x, TQ_INT32 y, TQ_UINT8 alpha); - // Create a new mask by interpolating between mask1 and mask2 as t + // Create a new tqmask by interpolating between tqmask1 and tqmask2 as t // goes from 0 to 1. - static KisAlphaMaskSP interpolate(KisAlphaMaskSP mask1, KisAlphaMaskSP mask2, double t); + static KisAlphaMaskSP interpolate(KisAlphaMaskSP tqmask1, KisAlphaMaskSP tqmask2, double t); private: - void computeAlpha(const QImage& img); - void copyAlpha(const QImage& img); + void computeAlpha(const TQImage& img); + void copyAlpha(const TQImage& img); - QValueVector m_data; - Q_INT32 m_width; - Q_INT32 m_height; + TQValueVector m_data; + TQ_INT32 m_width; + TQ_INT32 m_height; }; #endif // KIS_ALPHA_MASK_ diff --git a/krita/core/kis_autobrush_resource.cc b/krita/core/kis_autobrush_resource.cc index 6e45c64a..9a09fe78 100644 --- a/krita/core/kis_autobrush_resource.cc +++ b/krita/core/kis_autobrush_resource.cc @@ -19,20 +19,20 @@ #include "kis_autobrush_resource.h" #include -void KisAutobrushShape::createBrush( QImage* img) +void KisAutobrushShape::createBrush( TQImage* img) { img->create(m_w, m_h, 32); for(int j = 0; j < m_h; j++) { for(int i = 0; i < m_w; i++) { - Q_INT8 v = valueAt(i,j); - img->setPixel( i, j, qRgb(v,v,v)); + TQ_INT8 v = valueAt(i,j); + img->setPixel( i, j, tqRgb(v,v,v)); } } } -KisAutobrushCircleShape::KisAutobrushCircleShape(Q_INT32 w, Q_INT32 h, double fh, double fv) +KisAutobrushCircleShape::KisAutobrushCircleShape(TQ_INT32 w, TQ_INT32 h, double fh, double fv) : KisAutobrushShape( w, h, w / 2.0 - fh, h / 2.0 - fv), m_xcentre ( w / 2.0 ), m_ycentre ( h / 2.0 ), @@ -42,7 +42,7 @@ KisAutobrushCircleShape::KisAutobrushCircleShape(Q_INT32 w, Q_INT32 h, double fh m_yfadecoef ( (m_fv == 0) ? 1 : ( 1.0 / m_fv)) { } -Q_INT8 KisAutobrushCircleShape::valueAt(Q_INT32 x, Q_INT32 y) +TQ_INT8 KisAutobrushCircleShape::valueAt(TQ_INT32 x, TQ_INT32 y) { double xr = (x - m_xcentre) + 0.5; double yr = (y - m_ycentre) + 0.5; @@ -80,17 +80,17 @@ Q_INT8 KisAutobrushCircleShape::valueAt(Q_INT32 x, Q_INT32 y) } } -KisAutobrushRectShape::KisAutobrushRectShape(Q_INT32 w, Q_INT32 h, double fh, double fv) +KisAutobrushRectShape::KisAutobrushRectShape(TQ_INT32 w, TQ_INT32 h, double fh, double fv) : KisAutobrushShape( w, h, w / 2.0 - fh, h / 2.0 - fv), m_xcentre ( w / 2.0 ), m_ycentre ( h / 2.0 ), m_c( fv/fh) { } -Q_INT8 KisAutobrushRectShape::valueAt(Q_INT32 x, Q_INT32 y) +TQ_INT8 KisAutobrushRectShape::valueAt(TQ_INT32 x, TQ_INT32 y) { - double xr = QABS(x - m_xcentre); - double yr = QABS(y - m_ycentre); + double xr = TQABS(x - m_xcentre); + double yr = TQABS(y - m_ycentre); if( xr > m_fh || yr > m_fv ) { if( yr <= ((xr - m_fh) * m_c + m_fv ) ) diff --git a/krita/core/kis_autobrush_resource.h b/krita/core/kis_autobrush_resource.h index d0c77767..44708efa 100644 --- a/krita/core/kis_autobrush_resource.h +++ b/krita/core/kis_autobrush_resource.h @@ -23,20 +23,20 @@ class KisAutobrushShape { public: - KisAutobrushShape(Q_INT32 w, Q_INT32 h, double fh, double fv) : m_w(w), m_h(h), m_fh(fh), m_fv(fv) + KisAutobrushShape(TQ_INT32 w, TQ_INT32 h, double fh, double fv) : m_w(w), m_h(h), m_fh(fh), m_fv(fv) { }; - void createBrush( QImage* img); + void createBrush( TQImage* img); protected: - virtual Q_INT8 valueAt(Q_INT32 x, Q_INT32 y) =0; - Q_INT32 m_w, m_h; + virtual TQ_INT8 valueAt(TQ_INT32 x, TQ_INT32 y) =0; + TQ_INT32 m_w, m_h; double m_fh, m_fv; }; class KisAutobrushCircleShape : public KisAutobrushShape { public: - KisAutobrushCircleShape(Q_INT32 w, Q_INT32 h, double fh, double fv); + KisAutobrushCircleShape(TQ_INT32 w, TQ_INT32 h, double fh, double fv); public: - virtual Q_INT8 valueAt(Q_INT32 x, Q_INT32 y); + virtual TQ_INT8 valueAt(TQ_INT32 x, TQ_INT32 y); private: double norme(double a, double b) { @@ -50,9 +50,9 @@ class KisAutobrushCircleShape : public KisAutobrushShape { class KisAutobrushRectShape : public KisAutobrushShape { public: - KisAutobrushRectShape(Q_INT32 w, Q_INT32 h, double fh, double fv); + KisAutobrushRectShape(TQ_INT32 w, TQ_INT32 h, double fh, double fv); protected: - virtual Q_INT8 valueAt(Q_INT32 x, Q_INT32 y); + virtual TQ_INT8 valueAt(TQ_INT32 x, TQ_INT32 y); private: double m_xcentre, m_ycentre, m_c; }; @@ -60,7 +60,7 @@ class KisAutobrushRectShape : public KisAutobrushShape { class KisAutobrushResource : public KisBrush { public: - KisAutobrushResource(QImage& img) : KisBrush("") + KisAutobrushResource(TQImage& img) : KisBrush("") { setImage(img); setBrushType(MASK); diff --git a/krita/core/kis_autogradient_resource.cc b/krita/core/kis_autogradient_resource.cc index f021222d..671e8fc2 100644 --- a/krita/core/kis_autogradient_resource.cc +++ b/krita/core/kis_autogradient_resource.cc @@ -25,15 +25,15 @@ #define PREVIEW_HEIGHT 64 -void KisAutogradientResource::createSegment( int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, QColor left, QColor right ) +void KisAutogradientResource::createSegment( int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, TQColor left, TQColor right ) { pushSegment(new KisGradientSegment(interpolation, colorInterpolation, startOffset, middleOffset, endOffset, Color( left, 1 ), Color( right, 1 ))); } -const QValueVector KisAutogradientResource::getHandlePositions() const +const TQValueVector KisAutogradientResource::getHandlePositions() const { - QValueVector handlePositions; + TQValueVector handlePositions; handlePositions.push_back(m_segments[0]->startOffset()); for (uint i = 0; i < m_segments.count(); i++) @@ -43,9 +43,9 @@ const QValueVector KisAutogradientResource::getHandlePositions() const return handlePositions; } -const QValueVector KisAutogradientResource::getMiddleHandlePositions() const +const TQValueVector KisAutogradientResource::getMiddleHandlePositions() const { - QValueVector middleHandlePositions; + TQValueVector middleHandlePositions; for (uint i = 0; i < m_segments.count(); i++) { @@ -56,7 +56,7 @@ const QValueVector KisAutogradientResource::getMiddleHandlePositions() c void KisAutogradientResource::moveSegmentStartOffset( KisGradientSegment* segment, double t) { - QValueVector::iterator it = qFind( m_segments.begin(), m_segments.end(), segment ); + TQValueVector::iterator it = tqFind( m_segments.begin(), m_segments.end(), segment ); if ( it != m_segments.end() ) { if ( it == m_segments.begin() ) @@ -81,7 +81,7 @@ void KisAutogradientResource::moveSegmentStartOffset( KisGradientSegment* segmen void KisAutogradientResource::moveSegmentEndOffset( KisGradientSegment* segment, double t) { - QValueVector::iterator it = qFind( m_segments.begin(), m_segments.end(), segment ); + TQValueVector::iterator it = tqFind( m_segments.begin(), m_segments.end(), segment ); if ( it != m_segments.end() ) { if ( it+1 == m_segments.end() ) @@ -120,7 +120,7 @@ void KisAutogradientResource::moveSegmentMiddleOffset( KisGradientSegment* segme void KisAutogradientResource::splitSegment( KisGradientSegment* segment ) { Q_ASSERT(segment != 0); - QValueVector::iterator it = qFind( m_segments.begin(), m_segments.end(), segment ); + TQValueVector::iterator it = tqFind( m_segments.begin(), m_segments.end(), segment ); if ( it != m_segments.end() ) { KisGradientSegment* newSegment = new KisGradientSegment( @@ -140,7 +140,7 @@ void KisAutogradientResource::splitSegment( KisGradientSegment* segment ) void KisAutogradientResource::duplicateSegment( KisGradientSegment* segment ) { Q_ASSERT(segment != 0); - QValueVector::iterator it = qFind( m_segments.begin(), m_segments.end(), segment ); + TQValueVector::iterator it = tqFind( m_segments.begin(), m_segments.end(), segment ); if ( it != m_segments.end() ) { double middlePostionPercentage = ( segment->middleOffset() - segment->startOffset() ) / segment->length(); @@ -181,7 +181,7 @@ KisGradientSegment* KisAutogradientResource::removeSegment( KisGradientSegment* Q_ASSERT(segment != 0); if( m_segments.count() < 2 ) return 0; - QValueVector::iterator it = qFind( m_segments.begin(), m_segments.end(), segment ); + TQValueVector::iterator it = tqFind( m_segments.begin(), m_segments.end(), segment ); if ( it != m_segments.end() ) { double middlePostionPercentage; diff --git a/krita/core/kis_autogradient_resource.h b/krita/core/kis_autogradient_resource.h index 972ec8f6..37546a02 100644 --- a/krita/core/kis_autogradient_resource.h +++ b/krita/core/kis_autogradient_resource.h @@ -30,10 +30,10 @@ public: public: - void createSegment( int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, QColor left, QColor right ); + void createSegment( int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, TQColor left, TQColor right ); - const QValueVector getHandlePositions() const; - const QValueVector getMiddleHandlePositions() const; + const TQValueVector getHandlePositions() const; + const TQValueVector getMiddleHandlePositions() const; /** * Moves the StartOffset of the specified segment to the specified value diff --git a/krita/core/kis_background.cc b/krita/core/kis_background.cc index 8fff32ec..6f881d33 100644 --- a/krita/core/kis_background.cc +++ b/krita/core/kis_background.cc @@ -22,15 +22,15 @@ KisBackground::KisBackground() : KShared() { - m_patternTile = QImage(PATTERN_WIDTH, PATTERN_HEIGHT, 32); + m_patternTile = TQImage(PATTERN_WIDTH, PATTERN_HEIGHT, 32); m_patternTile.setAlphaBuffer(false); for (int y = 0; y < PATTERN_HEIGHT; y++) { for (int x = 0; x < PATTERN_WIDTH; x++) { - Q_UINT8 v = 128 + 63 * ((x / 16 + y / 16) % 2); - m_patternTile.setPixel(x, y, qRgb(v, v, v)); + TQ_UINT8 v = 128 + 63 * ((x / 16 + y / 16) % 2); + m_patternTile.setPixel(x, y, tqRgb(v, v, v)); } } } @@ -39,12 +39,12 @@ KisBackground::~KisBackground() { } -const QImage& KisBackground::patternTile() const +const TQImage& KisBackground::patternTile() const { return m_patternTile; } -void KisBackground::paintBackground(QImage image, int imageLeftX, int imageTopY) +void KisBackground::paintBackground(TQImage image, int imageLeftX, int imageTopY) { int patternLeftX; @@ -69,23 +69,23 @@ void KisBackground::paintBackground(QImage image, int imageLeftX, int imageTopY) for (int y = 0; y < imageHeight; y++) { - QRgb *imagePixelPtr = reinterpret_cast(image.scanLine(y)); - const QRgb *patternScanLine = reinterpret_cast(m_patternTile.scanLine(patternY)); + TQRgb *imagePixelPtr = reinterpret_cast(image.scanLine(y)); + const TQRgb *patternScanLine = reinterpret_cast(m_patternTile.scanLine(patternY)); int patternX = patternLeftX; for (int x = 0; x < imageWidth; x++) { - QRgb imagePixel = *imagePixelPtr; - Q_UINT8 imagePixelAlpha = qAlpha(imagePixel); + TQRgb imagePixel = *imagePixelPtr; + TQ_UINT8 imagePixelAlpha = tqAlpha(imagePixel); if (imagePixelAlpha != 255) { - QRgb patternPixel = patternScanLine[patternX]; - Q_UINT8 imageRed = UINT8_BLEND(qRed(imagePixel), qRed(patternPixel), imagePixelAlpha); - Q_UINT8 imageGreen = UINT8_BLEND(qGreen(imagePixel), qGreen(patternPixel), imagePixelAlpha); - Q_UINT8 imageBlue = UINT8_BLEND(qBlue(imagePixel), qBlue(patternPixel), imagePixelAlpha); + TQRgb patternPixel = patternScanLine[patternX]; + TQ_UINT8 imageRed = UINT8_BLEND(tqRed(imagePixel), tqRed(patternPixel), imagePixelAlpha); + TQ_UINT8 imageGreen = UINT8_BLEND(tqGreen(imagePixel), tqGreen(patternPixel), imagePixelAlpha); + TQ_UINT8 imageBlue = UINT8_BLEND(tqBlue(imagePixel), tqBlue(patternPixel), imagePixelAlpha); - *imagePixelPtr = qRgba(imageRed, imageGreen, imageBlue, 255); + *imagePixelPtr = tqRgba(imageRed, imageGreen, imageBlue, 255); } ++imagePixelPtr; @@ -104,7 +104,7 @@ void KisBackground::paintBackground(QImage image, int imageLeftX, int imageTopY) } } -void KisBackground::paintBackground(QImage img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize) +void KisBackground::paintBackground(TQImage img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize) { if (scaledImageRect.isEmpty() || scaledImageSize.isEmpty() || imageSize.isEmpty()) { return; @@ -116,35 +116,35 @@ void KisBackground::paintBackground(QImage img, const QRect& scaledImageRect, co return; } - Q_INT32 imageWidth = imageSize.width(); - Q_INT32 imageHeight = imageSize.height(); + TQ_INT32 imageWidth = imageSize.width(); + TQ_INT32 imageHeight = imageSize.height(); - for (Q_INT32 y = 0; y < scaledImageRect.height(); ++y) { + for (TQ_INT32 y = 0; y < scaledImageRect.height(); ++y) { - Q_INT32 scaledY = scaledImageRect.y() + y; - Q_INT32 srcY = (scaledY * imageHeight) / scaledImageSize.height(); - Q_INT32 patternY = srcY % PATTERN_HEIGHT; + TQ_INT32 scaledY = scaledImageRect.y() + y; + TQ_INT32 srcY = (scaledY * imageHeight) / scaledImageSize.height(); + TQ_INT32 patternY = srcY % PATTERN_HEIGHT; - QRgb *imagePixelPtr = reinterpret_cast(img.scanLine(y)); - const QRgb *patternScanLine = reinterpret_cast(m_patternTile.scanLine(patternY)); + TQRgb *imagePixelPtr = reinterpret_cast(img.scanLine(y)); + const TQRgb *patternScanLine = reinterpret_cast(m_patternTile.scanLine(patternY)); - for (Q_INT32 x = 0; x < scaledImageRect.width(); ++x) { + for (TQ_INT32 x = 0; x < scaledImageRect.width(); ++x) { - QRgb imagePixel = *imagePixelPtr; - Q_UINT8 imagePixelAlpha = qAlpha(imagePixel); + TQRgb imagePixel = *imagePixelPtr; + TQ_UINT8 imagePixelAlpha = tqAlpha(imagePixel); if (imagePixelAlpha != 255) { - Q_INT32 scaledX = scaledImageRect.x() + x; - Q_INT32 srcX = (scaledX * imageWidth) / scaledImageSize.width(); - Q_INT32 patternX = srcX % PATTERN_WIDTH; + TQ_INT32 scaledX = scaledImageRect.x() + x; + TQ_INT32 srcX = (scaledX * imageWidth) / scaledImageSize.width(); + TQ_INT32 patternX = srcX % PATTERN_WIDTH; - QRgb patternPixel = patternScanLine[patternX]; - Q_UINT8 imageRed = UINT8_BLEND(qRed(imagePixel), qRed(patternPixel), imagePixelAlpha); - Q_UINT8 imageGreen = UINT8_BLEND(qGreen(imagePixel), qGreen(patternPixel), imagePixelAlpha); - Q_UINT8 imageBlue = UINT8_BLEND(qBlue(imagePixel), qBlue(patternPixel), imagePixelAlpha); + TQRgb patternPixel = patternScanLine[patternX]; + TQ_UINT8 imageRed = UINT8_BLEND(tqRed(imagePixel), tqRed(patternPixel), imagePixelAlpha); + TQ_UINT8 imageGreen = UINT8_BLEND(tqGreen(imagePixel), tqGreen(patternPixel), imagePixelAlpha); + TQ_UINT8 imageBlue = UINT8_BLEND(tqBlue(imagePixel), tqBlue(patternPixel), imagePixelAlpha); - *imagePixelPtr = qRgba(imageRed, imageGreen, imageBlue, 255); + *imagePixelPtr = tqRgba(imageRed, imageGreen, imageBlue, 255); } ++imagePixelPtr; diff --git a/krita/core/kis_background.h b/krita/core/kis_background.h index 59016ffb..f5b52903 100644 --- a/krita/core/kis_background.h +++ b/krita/core/kis_background.h @@ -18,7 +18,7 @@ #ifndef KIS_BACKGROUND_H_ #define KIS_BACKGROUND_H_ -#include +#include #include @@ -31,18 +31,18 @@ public: // Paint the background pattern into the image, 'behind' the image // contents. The coordinates are for the image's top-left corner // in image space. - void paintBackground(QImage image, int leftX, int topY); + void paintBackground(TQImage image, int leftX, int topY); - void paintBackground(QImage image, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize); + void paintBackground(TQImage image, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize); // Returns the pattern tile. - const QImage& patternTile() const; + const TQImage& patternTile() const; protected: static const int PATTERN_WIDTH = 32; static const int PATTERN_HEIGHT = 32; - QImage m_patternTile; + TQImage m_patternTile; }; #endif // KIS_BACKGROUND_H_ diff --git a/krita/core/kis_basic_math_toolbox.cpp b/krita/core/kis_basic_math_toolbox.cpp index d20544af..1b397ab5 100644 --- a/krita/core/kis_basic_math_toolbox.cpp +++ b/krita/core/kis_basic_math_toolbox.cpp @@ -112,7 +112,7 @@ void KisBasicMathToolbox::waveuntrans(KisMathToolbox::KisWavelet* wav, KisMathTo } } -KisMathToolbox::KisWavelet* KisBasicMathToolbox::fastWaveletTransformation(KisPaintDeviceSP src, const QRect& rect, KisWavelet* buff) +KisMathToolbox::KisWavelet* KisBasicMathToolbox::fastWaveletTransformation(KisPaintDeviceSP src, const TQRect& rect, KisWavelet* buff) { if(buff == 0) { @@ -125,7 +125,7 @@ KisMathToolbox::KisWavelet* KisBasicMathToolbox::fastWaveletTransformation(KisPa return wav; } -void KisBasicMathToolbox::fastWaveletUntransformation(KisPaintDeviceSP dst, const QRect& rect, KisWavelet* wav, KisWavelet* buff) +void KisBasicMathToolbox::fastWaveletUntransformation(KisPaintDeviceSP dst, const TQRect& rect, KisWavelet* wav, KisWavelet* buff) { if(buff == 0) { diff --git a/krita/core/kis_basic_math_toolbox.h b/krita/core/kis_basic_math_toolbox.h index ce80e55c..e5fa66cd 100644 --- a/krita/core/kis_basic_math_toolbox.h +++ b/krita/core/kis_basic_math_toolbox.h @@ -33,8 +33,8 @@ class KisBasicMathToolbox : public KisMathToolbox KisBasicMathToolbox(); ~KisBasicMathToolbox(); public: - virtual KisWavelet* fastWaveletTransformation(KisPaintDeviceSP src, const QRect&, KisWavelet* buff = 0); - virtual void fastWaveletUntransformation(KisPaintDeviceSP dst, const QRect&, KisWavelet* wav, KisWavelet* buff = 0); + virtual KisWavelet* fastWaveletTransformation(KisPaintDeviceSP src, const TQRect&, KisWavelet* buff = 0); + virtual void fastWaveletUntransformation(KisPaintDeviceSP dst, const TQRect&, KisWavelet* wav, KisWavelet* buff = 0); private: void wavetrans(KisWavelet* wav, KisWavelet* buff, uint halfsize); void waveuntrans(KisWavelet* wav, KisWavelet* buff, uint halfsize); diff --git a/krita/core/kis_boundary.cc b/krita/core/kis_boundary.cc index 24524aeb..0c9681c2 100644 --- a/krita/core/kis_boundary.cc +++ b/krita/core/kis_boundary.cc @@ -15,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include "kis_colorspace.h" #include "kis_iterators_pixel.h" @@ -28,7 +28,7 @@ KisBoundary::KisBoundary(KisPaintDevice* dev) { m_fuzzyness = 255 / 2; } -bool KisBoundary::isDark(Q_UINT8 val) { +bool KisBoundary::isDark(TQ_UINT8 val) { return val < m_fuzzyness; } @@ -38,42 +38,42 @@ void KisBoundary::generateBoundary(int w, int h) { KisColorSpace* cs = m_device->colorSpace(); - // Horizontal + //Qt::Horizontal for (int currentY = - 1; currentY < h; currentY++) { KisHLineIteratorPixel topIt = m_device->createHLineIterator(0, currentY, w, false); KisHLineIteratorPixel botIt = m_device->createHLineIterator(0, currentY + 1, w, false); bool darkTop; bool darkBot; - m_horSegments.append(QValueList()); + m_horSegments.append(TQValueList()); while (!topIt.isDone()) { darkTop = cs->getAlpha(topIt.rawData()); darkBot = cs->getAlpha(botIt.rawData()); if (darkTop != darkBot) { // detected a change - m_horSegments.back().append(qMakePair(KisPoint(botIt.x(), botIt.y()), 1)); + m_horSegments.back().append(tqMakePair(KisPoint(botIt.x(), botIt.y()), 1)); } ++topIt; ++botIt; } } - // Vertical + //Qt::Vertical for (int currentX = - 1; currentX < w; currentX++) { KisVLineIteratorPixel leftIt = m_device->createVLineIterator(currentX, 0, h, false); KisVLineIteratorPixel rightIt = m_device->createVLineIterator(currentX + 1, 0, h, false); bool darkLeft; bool darkRight; - m_vertSegments.append(QValueList()); + m_vertSegments.append(TQValueList()); while (!leftIt.isDone()) { darkLeft = cs->getAlpha(leftIt.rawData()); darkRight = cs->getAlpha(rightIt.rawData()); if (darkLeft != darkRight) { // detected a change - m_vertSegments.back().append(qMakePair(KisPoint(rightIt.x(), rightIt.y()), 1)); + m_vertSegments.back().append(tqMakePair(KisPoint(rightIt.x(), rightIt.y()), 1)); } ++leftIt; ++rightIt; diff --git a/krita/core/kis_boundary.h b/krita/core/kis_boundary.h index 069d0289..6c5ce8c6 100644 --- a/krita/core/kis_boundary.h +++ b/krita/core/kis_boundary.h @@ -18,8 +18,8 @@ #ifndef _KIS_BOUNDARY_H_ #define _KIS_BOUNDARY_H_ -#include -#include +#include +#include #include #include "kis_point.h" @@ -40,13 +40,13 @@ public: void generateBoundary(int w, int h); private: - typedef QPair PointPair; // int->length - bool isDark(Q_UINT8 val); + typedef TQPair PointPair; // int->length + bool isDark(TQ_UINT8 val); KisPaintDevice* m_device; int m_fuzzyness; - typedef QValueList PointPairList; - typedef QValueList< PointPairList > PointPairListList; + typedef TQValueList PointPairList; + typedef TQValueList< PointPairList > PointPairListList; PointPairListList m_horSegments; PointPairListList m_vertSegments; diff --git a/krita/core/kis_brush.cc b/krita/core/kis_brush.cc index 57ee2584..a590248d 100644 --- a/krita/core/kis_brush.cc +++ b/krita/core/kis_brush.cc @@ -33,10 +33,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -45,7 +45,7 @@ #include "kis_paint_device.h" #include "kis_global.h" #include "kis_brush.h" -#include "kis_alpha_mask.h" +#include "kis_alpha_tqmask.h" #include "kis_colorspace_factory_registry.h" #include "kis_iterators_pixel.h" #include "kis_image.h" @@ -53,34 +53,34 @@ namespace { struct GimpBrushV1Header { - Q_UINT32 header_size; /* header_size = sizeof (BrushHeader) + brush name */ - Q_UINT32 version; /* brush file version # */ - Q_UINT32 width; /* width of brush */ - Q_UINT32 height; /* height of brush */ - Q_UINT32 bytes; /* depth of brush in bytes */ + TQ_UINT32 header_size; /* header_size = sizeof (BrushHeader) + brush name */ + TQ_UINT32 version; /* brush file version # */ + TQ_UINT32 width; /* width of brush */ + TQ_UINT32 height; /* height of brush */ + TQ_UINT32 bytes; /* depth of brush in bytes */ }; /// All fields are in MSB on disk! struct GimpBrushHeader { - Q_UINT32 header_size; /* header_size = sizeof (BrushHeader) + brush name */ - Q_UINT32 version; /* brush file version # */ - Q_UINT32 width; /* width of brush */ - Q_UINT32 height; /* height of brush */ - Q_UINT32 bytes; /* depth of brush in bytes */ + TQ_UINT32 header_size; /* header_size = sizeof (BrushHeader) + brush name */ + TQ_UINT32 version; /* brush file version # */ + TQ_UINT32 width; /* width of brush */ + TQ_UINT32 height; /* height of brush */ + TQ_UINT32 bytes; /* depth of brush in bytes */ /* The following are only defined in version 2 */ - Q_UINT32 magic_number; /* GIMP brush magic number */ - Q_UINT32 spacing; /* brush spacing as % of width & height, 0 - 1000 */ + TQ_UINT32 magic_number; /* GIMP brush magic number */ + TQ_UINT32 spacing; /* brush spacing as % of width & height, 0 - 1000 */ }; // Needed, or the GIMP won't open it! - Q_UINT32 const GimpV2BrushMagic = ('G' << 24) + ('I' << 16) + ('M' << 8) + ('P' << 0); + TQ_UINT32 const GimpV2BrushMagic = ('G' << 24) + ('I' << 16) + ('M' << 8) + ('P' << 0); } #define DEFAULT_SPACING 0.25 #define MAXIMUM_SCALE 2 -KisBrush::KisBrush(const QString& filename) : super(filename) +KisBrush::KisBrush(const TQString& filename) : super(filename) { m_brushType = INVALID; m_ownData = true; @@ -90,9 +90,9 @@ KisBrush::KisBrush(const QString& filename) : super(filename) m_boundary = 0; } -KisBrush::KisBrush(const QString& filename, - const QByteArray& data, - Q_UINT32 & dataPos) : super(filename) +KisBrush::KisBrush(const TQString& filename, + const TQByteArray& data, + TQ_UINT32 & dataPos) : super(filename) { m_brushType = INVALID; m_ownData = false; @@ -108,7 +108,7 @@ KisBrush::KisBrush(const QString& filename, } KisBrush::KisBrush(KisPaintDevice* image, int x, int y, int w, int h) - : super(QString("")) + : super(TQString("")) { m_brushType = INVALID; m_ownData = true; @@ -120,8 +120,8 @@ KisBrush::KisBrush(KisPaintDevice* image, int x, int y, int w, int h) initFromPaintDev(image, x, y, w, h); } -KisBrush::KisBrush(const QImage& image, const QString& name) - : super(QString("")) +KisBrush::KisBrush(const TQImage& image, const TQString& name) + : super(TQString("")) { m_ownData = false; m_useColorAsMask = false; @@ -144,7 +144,7 @@ KisBrush::~KisBrush() bool KisBrush::load() { if (m_ownData) { - QFile file(filename()); + TQFile file(filename()); file.open(IO_ReadOnly); m_data = file.readAll(); file.close(); @@ -194,17 +194,17 @@ bool KisBrush::init() return false; } - QString name; + TQString name; if (bh.version == 1) { // Version 1 has no magic number or spacing, so the name // is at a different offset. Character encoding is undefined. const char *text = &m_data[sizeof(GimpBrushV1Header)]; - name = QString::fromAscii(text, bh.header_size - sizeof(GimpBrushV1Header)); + name = TQString::fromAscii(text, bh.header_size - sizeof(GimpBrushV1Header)); } else { // ### Version = 3->cinepaint; may be float16 data! // Version >=2: UTF-8 encoding is used - name = QString::fromUtf8(&m_data[sizeof(GimpBrushHeader)], + name = TQString::fromUtf8(&m_data[sizeof(GimpBrushHeader)], bh.header_size - sizeof(GimpBrushHeader)); } @@ -214,28 +214,28 @@ bool KisBrush::init() return false; } - Q_INT32 k = bh.header_size; + TQ_INT32 k = bh.header_size; if (bh.bytes == 1) { // Grayscale - if (static_cast(k + bh.width * bh.height) > m_data.size()) { + if (static_cast(k + bh.width * bh.height) > m_data.size()) { return false; } m_brushType = MASK; m_hasColor = false; - for (Q_UINT32 y = 0; y < bh.height; y++) { - for (Q_UINT32 x = 0; x < bh.width; x++, k++) { - Q_INT32 val = 255 - static_cast(m_data[k]); - m_img.setPixel(x, y, qRgb(val, val, val)); + for (TQ_UINT32 y = 0; y < bh.height; y++) { + for (TQ_UINT32 x = 0; x < bh.width; x++, k++) { + TQ_INT32 val = 255 - static_cast(m_data[k]); + m_img.setPixel(x, y, tqRgb(val, val, val)); } } } else if (bh.bytes == 4) { // RGBA - if (static_cast(k + (bh.width * bh.height * 4)) > m_data.size()) { + if (static_cast(k + (bh.width * bh.height * 4)) > m_data.size()) { return false; } @@ -243,9 +243,9 @@ bool KisBrush::init() m_img.setAlphaBuffer(true); m_hasColor = true; - for (Q_UINT32 y = 0; y < bh.height; y++) { - for (Q_UINT32 x = 0; x < bh.width; x++, k += 4) { - m_img.setPixel(x, y, qRgba(m_data[k], + for (TQ_UINT32 y = 0; y < bh.height; y++) { + for (TQ_UINT32 x = 0; x < bh.width; x++, k += 4) { + m_img.setPixel(x, y, tqRgba(m_data[k], m_data[k+1], m_data[k+2], m_data[k+3])); @@ -274,7 +274,7 @@ bool KisBrush::init() bool KisBrush::initFromPaintDev(KisPaintDevice* image, int x, int y, int w, int h) { // Forcefully convert to RGBA8 // XXX profile and exposure? - setImage(image->convertToQImage(0, x, y, w, h)); + setImage(image->convertToTQImage(0, x, y, w, h)); setName(image->name()); m_brushType = IMAGE; @@ -285,19 +285,19 @@ bool KisBrush::initFromPaintDev(KisPaintDevice* image, int x, int y, int w, int bool KisBrush::save() { - QFile file(filename()); + TQFile file(filename()); file.open(IO_WriteOnly | IO_Truncate); bool ok = saveToDevice(&file); file.close(); return ok; } -bool KisBrush::saveToDevice(QIODevice* dev) const +bool KisBrush::saveToDevice(TQIODevice* dev) const { GimpBrushHeader bh; - QCString utf8Name = name().utf8(); // Names in v2 brushes are in UTF-8 + TQCString utf8Name = name().utf8(); // Names in v2 brushes are in UTF-8 char const* name = utf8Name.data(); - int nameLength = qstrlen(name); + int nameLength = tqstrlen(name); int wrote; bh.header_size = htonl(sizeof(GimpBrushHeader) + nameLength); @@ -310,10 +310,10 @@ bool KisBrush::saveToDevice(QIODevice* dev) const else bh.bytes = htonl(4); bh.magic_number = htonl(GimpV2BrushMagic); - bh.spacing = htonl(static_cast(spacing() * 100.0)); + bh.spacing = htonl(static_cast(spacing() * 100.0)); // Write header: first bh, then the name - QByteArray bytes; + TQByteArray bytes; bytes.setRawData(reinterpret_cast(&bh), sizeof(GimpBrushHeader)); wrote = dev->writeBlock(bytes); bytes.resetRawData(reinterpret_cast(&bh), sizeof(GimpBrushHeader)); @@ -329,22 +329,22 @@ bool KisBrush::saveToDevice(QIODevice* dev) const if (!hasColor()) { bytes.resize(width() * height()); - for (Q_INT32 y = 0; y < height(); y++) { - for (Q_INT32 x = 0; x < width(); x++) { - QRgb c = m_img.pixel(x, y); - bytes[k++] = static_cast(255 - qRed(c)); // red == blue == green + for (TQ_INT32 y = 0; y < height(); y++) { + for (TQ_INT32 x = 0; x < width(); x++) { + TQRgb c = m_img.pixel(x, y); + bytes[k++] = static_cast(255 - tqRed(c)); // red == blue == green } } } else { bytes.resize(width() * height() * 4); - for (Q_INT32 y = 0; y < height(); y++) { - for (Q_INT32 x = 0; x < width(); x++) { + for (TQ_INT32 y = 0; y < height(); y++) { + for (TQ_INT32 x = 0; x < width(); x++) { // order for gimp brushes, v2 is: RGBA - QRgb pixel = m_img.pixel(x,y); - bytes[k++] = static_cast(qRed(pixel)); - bytes[k++] = static_cast(qGreen(pixel)); - bytes[k++] = static_cast(qBlue(pixel)); - bytes[k++] = static_cast(qAlpha(pixel)); + TQRgb pixel = m_img.pixel(x,y); + bytes[k++] = static_cast(tqRed(pixel)); + bytes[k++] = static_cast(tqGreen(pixel)); + bytes[k++] = static_cast(tqBlue(pixel)); + bytes[k++] = static_cast(tqAlpha(pixel)); } } } @@ -356,18 +356,18 @@ bool KisBrush::saveToDevice(QIODevice* dev) const return true; } -QImage KisBrush::img() +TQImage KisBrush::img() { - QImage image = m_img; + TQImage image = m_img; if (hasColor() && useColorAsMask()) { image.detach(); for (int x = 0; x < image.width(); x++) { for (int y = 0; y < image.height(); y++) { - QRgb c = image.pixel(x, y); - int a = (qGray(c) * qAlpha(c)) / 255; - image.setPixel(x, y, qRgba(a, 0, a, a)); + TQRgb c = image.pixel(x, y); + int a = (tqGray(c) * tqAlpha(c)) / 255; + image.setPixel(x, y, tqRgba(a, 0, a, a)); } } } @@ -375,7 +375,7 @@ QImage KisBrush::img() return image; } -KisAlphaMaskSP KisBrush::mask(const KisPaintInformation& info, double subPixelX, double subPixelY) const +KisAlphaMaskSP KisBrush::tqmask(const KisPaintInformation& info, double subPixelX, double subPixelY) const { if (m_scaledBrushes.isEmpty()) { createScaledBrushes(); @@ -392,7 +392,7 @@ KisAlphaMaskSP KisBrush::mask(const KisPaintInformation& info, double subPixelX, KisAlphaMaskSP outputMask = 0; if (belowBrush != 0) { - // We're in between two masks. Interpolate between them. + // We're in between two tqmasks. Interpolate between them. KisAlphaMaskSP scaledAboveMask = scaleMask(aboveBrush, scale, subPixelX, subPixelY); KisAlphaMaskSP scaledBelowMask = scaleMask(belowBrush, scale, subPixelX, subPixelY); @@ -405,9 +405,9 @@ KisAlphaMaskSP KisBrush::mask(const KisPaintInformation& info, double subPixelX, // Exact match. outputMask = scaleMask(aboveBrush, scale, subPixelX, subPixelY); } else { - // We are smaller than the smallest mask, which is always 1x1. + // We are smaller than the smallest tqmask, which is always 1x1. double s = scale / aboveBrush->scale(); - outputMask = scaleSinglePixelMask(s, aboveBrush->mask()->alphaAt(0, 0), subPixelX, subPixelY); + outputMask = scaleSinglePixelMask(s, aboveBrush->tqmask()->alphaAt(0, 0), subPixelX, subPixelY); } } @@ -428,13 +428,13 @@ KisPaintDeviceSP KisBrush::image(KisColorSpace * /*colorSpace*/, const KisPaintI findScaledBrushes(scale, &aboveBrush, &belowBrush); Q_ASSERT(aboveBrush != 0); - QImage outputImage; + TQImage outputImage; if (belowBrush != 0) { // We're in between two brushes. Interpolate between them. - QImage scaledAboveImage = scaleImage(aboveBrush, scale, subPixelX, subPixelY); - QImage scaledBelowImage = scaleImage(belowBrush, scale, subPixelX, subPixelY); + TQImage scaledAboveImage = scaleImage(aboveBrush, scale, subPixelX, subPixelY); + TQImage scaledBelowImage = scaleImage(belowBrush, scale, subPixelX, subPixelY); double t = (scale - belowBrush->scale()) / (aboveBrush->scale() - belowBrush->scale()); @@ -460,13 +460,13 @@ KisPaintDeviceSP KisBrush::image(KisColorSpace * /*colorSpace*/, const KisPaintI for (int y = 0; y < outputHeight; y++) { KisHLineIterator iter = layer->createHLineIterator( 0, y, outputWidth, true); for (int x = 0; x < outputWidth; x++) { - Q_UINT8 * p = iter.rawData(); + TQ_UINT8 * p = iter.rawData(); - QRgb pixel = outputImage.pixel(x, y); - int red = qRed(pixel); - int green = qGreen(pixel); - int blue = qBlue(pixel); - int alpha = qAlpha(pixel); + TQRgb pixel = outputImage.pixel(x, y); + int red = tqRed(pixel); + int green = tqGreen(pixel); + int blue = tqBlue(pixel); + int alpha = tqAlpha(pixel); // Scaled images are in pre-multiplied alpha form so // divide by alpha. @@ -550,7 +550,7 @@ void KisBrush::createScaledBrushes() const int width = m_img.width() * MAXIMUM_SCALE; int height = m_img.height() * MAXIMUM_SCALE; - QImage scaledImage; + TQImage scaledImage; while (true) { @@ -569,7 +569,7 @@ void KisBrush::createScaledBrushes() const double yScale = static_cast(height) / m_img.height(); double scale = xScale; - m_scaledBrushes.append(ScaledBrush(scaledMask, hasColor() ? scaledImage : QImage(), scale, xScale, yScale)); + m_scaledBrushes.append(ScaledBrush(scaledMask, hasColor() ? scaledImage : TQImage(), scale, xScale, yScale)); if (width == 1 && height == 1) { break; @@ -608,16 +608,16 @@ double KisBrush::scaleForPressure(double pressure) return scale; } -Q_INT32 KisBrush::maskWidth(const KisPaintInformation& info) const +TQ_INT32 KisBrush::tqmaskWidth(const KisPaintInformation& info) const { // Add one for sub-pixel shift - return static_cast(ceil(width() * scaleForPressure(info.pressure)) + 1); + return static_cast(ceil(width() * scaleForPressure(info.pressure)) + 1); } -Q_INT32 KisBrush::maskHeight(const KisPaintInformation& info) const +TQ_INT32 KisBrush::tqmaskHeight(const KisPaintInformation& info) const { // Add one for sub-pixel shift - return static_cast(ceil(height() * scaleForPressure(info.pressure)) + 1); + return static_cast(ceil(height() * scaleForPressure(info.pressure)) + 1); } KisAlphaMaskSP KisBrush::scaleMask(const ScaledBrush *srcBrush, double scale, double subPixelX, double subPixelY) const @@ -629,7 +629,7 @@ KisAlphaMaskSP KisBrush::scaleMask(const ScaledBrush *srcBrush, double scale, do KisAlphaMaskSP dstMask = new KisAlphaMask(dstWidth, dstHeight); Q_CHECK_PTR(dstMask); - KisAlphaMaskSP srcMask = srcBrush->mask(); + KisAlphaMaskSP srcMask = srcBrush->tqmask(); // Compute scales to map the scaled brush onto the required scale. double xScale = srcBrush->xScale() / scale; @@ -663,10 +663,10 @@ KisAlphaMaskSP KisBrush::scaleMask(const ScaledBrush *srcBrush, double scale, do double yInterp = srcY - topY; - Q_UINT8 topLeft = (leftX >= 0 && leftX < srcWidth && topY >= 0 && topY < srcHeight) ? srcMask->alphaAt(leftX, topY) : OPACITY_TRANSPARENT; - Q_UINT8 bottomLeft = (leftX >= 0 && leftX < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcMask->alphaAt(leftX, topY + 1) : OPACITY_TRANSPARENT; - Q_UINT8 topRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY >= 0 && topY < srcHeight) ? srcMask->alphaAt(leftX + 1, topY) : OPACITY_TRANSPARENT; - Q_UINT8 bottomRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcMask->alphaAt(leftX + 1, topY + 1) : OPACITY_TRANSPARENT; + TQ_UINT8 topLeft = (leftX >= 0 && leftX < srcWidth && topY >= 0 && topY < srcHeight) ? srcMask->alphaAt(leftX, topY) : OPACITY_TRANSPARENT; + TQ_UINT8 bottomLeft = (leftX >= 0 && leftX < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcMask->alphaAt(leftX, topY + 1) : OPACITY_TRANSPARENT; + TQ_UINT8 topRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY >= 0 && topY < srcHeight) ? srcMask->alphaAt(leftX + 1, topY) : OPACITY_TRANSPARENT; + TQ_UINT8 bottomRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcMask->alphaAt(leftX + 1, topY + 1) : OPACITY_TRANSPARENT; double a = 1 - xInterp; double b = 1 - yInterp; @@ -685,23 +685,23 @@ KisAlphaMaskSP KisBrush::scaleMask(const ScaledBrush *srcBrush, double scale, do d = OPACITY_OPAQUE; } - dstMask->setAlphaAt(dstX, dstY, static_cast(d)); + dstMask->setAlphaAt(dstX, dstY, static_cast(d)); } } return dstMask; } -QImage KisBrush::scaleImage(const ScaledBrush *srcBrush, double scale, double subPixelX, double subPixelY) const +TQImage KisBrush::scaleImage(const ScaledBrush *srcBrush, double scale, double subPixelX, double subPixelY) const { // Add one pixel for sub-pixel shifting int dstWidth = static_cast(ceil(scale * width())) + 1; int dstHeight = static_cast(ceil(scale * height())) + 1; - QImage dstImage(dstWidth, dstHeight, 32); + TQImage dstImage(dstWidth, dstHeight, 32); dstImage.setAlphaBuffer(true); - const QImage srcImage = srcBrush->image(); + const TQImage srcImage = srcBrush->image(); // Compute scales to map the scaled brush onto the required scale. double xScale = srcBrush->xScale() / scale; @@ -735,31 +735,31 @@ QImage KisBrush::scaleImage(const ScaledBrush *srcBrush, double scale, double su double yInterp = srcY - topY; - QRgb topLeft = (leftX >= 0 && leftX < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX, topY) : qRgba(0, 0, 0, 0); - QRgb bottomLeft = (leftX >= 0 && leftX < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX, topY + 1) : qRgba(0, 0, 0, 0); - QRgb topRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX + 1, topY) : qRgba(0, 0, 0, 0); - QRgb bottomRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX + 1, topY + 1) : qRgba(0, 0, 0, 0); + TQRgb topLeft = (leftX >= 0 && leftX < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX, topY) : tqRgba(0, 0, 0, 0); + TQRgb bottomLeft = (leftX >= 0 && leftX < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX, topY + 1) : tqRgba(0, 0, 0, 0); + TQRgb topRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX + 1, topY) : tqRgba(0, 0, 0, 0); + TQRgb bottomRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX + 1, topY + 1) : tqRgba(0, 0, 0, 0); double a = 1 - xInterp; double b = 1 - yInterp; // Bi-linear interpolation. Image is pre-multiplied by alpha. - int red = static_cast(a * b * qRed(topLeft) - + a * (1 - b) * qRed(bottomLeft) - + (1 - a) * b * qRed(topRight) - + (1 - a) * (1 - b) * qRed(bottomRight) + 0.5); - int green = static_cast(a * b * qGreen(topLeft) - + a * (1 - b) * qGreen(bottomLeft) - + (1 - a) * b * qGreen(topRight) - + (1 - a) * (1 - b) * qGreen(bottomRight) + 0.5); - int blue = static_cast(a * b * qBlue(topLeft) - + a * (1 - b) * qBlue(bottomLeft) - + (1 - a) * b * qBlue(topRight) - + (1 - a) * (1 - b) * qBlue(bottomRight) + 0.5); - int alpha = static_cast(a * b * qAlpha(topLeft) - + a * (1 - b) * qAlpha(bottomLeft) - + (1 - a) * b * qAlpha(topRight) - + (1 - a) * (1 - b) * qAlpha(bottomRight) + 0.5); + int red = static_cast(a * b * tqRed(topLeft) + + a * (1 - b) * tqRed(bottomLeft) + + (1 - a) * b * tqRed(topRight) + + (1 - a) * (1 - b) * tqRed(bottomRight) + 0.5); + int green = static_cast(a * b * tqGreen(topLeft) + + a * (1 - b) * tqGreen(bottomLeft) + + (1 - a) * b * tqGreen(topRight) + + (1 - a) * (1 - b) * tqGreen(bottomRight) + 0.5); + int blue = static_cast(a * b * tqBlue(topLeft) + + a * (1 - b) * tqBlue(bottomLeft) + + (1 - a) * b * tqBlue(topRight) + + (1 - a) * (1 - b) * tqBlue(bottomRight) + 0.5); + int alpha = static_cast(a * b * tqAlpha(topLeft) + + a * (1 - b) * tqAlpha(bottomLeft) + + (1 - a) * b * tqAlpha(topRight) + + (1 - a) * (1 - b) * tqAlpha(bottomRight) + 0.5); if (red < 0) { red = 0; @@ -793,17 +793,17 @@ QImage KisBrush::scaleImage(const ScaledBrush *srcBrush, double scale, double su alpha = 255; } - dstImage.setPixel(dstX, dstY, qRgba(red, green, blue, alpha)); + dstImage.setPixel(dstX, dstY, tqRgba(red, green, blue, alpha)); } } return dstImage; } -QImage KisBrush::scaleImage(const QImage& srcImage, int width, int height) +TQImage KisBrush::scaleImage(const TQImage& srcImage, int width, int height) { - QImage scaledImage; - //QString filename; + TQImage scaledImage; + //TQString filename; int srcWidth = srcImage.width(); int srcHeight = srcImage.height(); @@ -816,7 +816,7 @@ QImage KisBrush::scaleImage(const QImage& srcImage, int width, int height) // or scaling it to less than half size. scaledImage = srcImage.smoothScale(width, height); - //filename = QString("smoothScale_%1x%2.png").arg(width).arg(height); + //filename = TQString("smoothScale_%1x%2.png").tqarg(width).tqarg(height); } else { scaledImage.create(width, height, 32); @@ -847,10 +847,10 @@ QImage KisBrush::scaleImage(const QImage& srcImage, int width, int height) double yInterp = srcY - topY; - QRgb topLeft = (leftX >= 0 && leftX < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX, topY) : qRgba(0, 0, 0, 0); - QRgb bottomLeft = (leftX >= 0 && leftX < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX, topY + 1) : qRgba(0, 0, 0, 0); - QRgb topRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX + 1, topY) : qRgba(0, 0, 0, 0); - QRgb bottomRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX + 1, topY + 1) : qRgba(0, 0, 0, 0); + TQRgb topLeft = (leftX >= 0 && leftX < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX, topY) : tqRgba(0, 0, 0, 0); + TQRgb bottomLeft = (leftX >= 0 && leftX < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX, topY + 1) : tqRgba(0, 0, 0, 0); + TQRgb topRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY >= 0 && topY < srcHeight) ? srcImage.pixel(leftX + 1, topY) : tqRgba(0, 0, 0, 0); + TQRgb bottomRight = (leftX + 1 >= 0 && leftX + 1 < srcWidth && topY + 1 >= 0 && topY + 1 < srcHeight) ? srcImage.pixel(leftX + 1, topY + 1) : tqRgba(0, 0, 0, 0); double a = 1 - xInterp; double b = 1 - yInterp; @@ -861,22 +861,22 @@ QImage KisBrush::scaleImage(const QImage& srcImage, int width, int height) int alpha; if (srcImage.hasAlphaBuffer()) { - red = static_cast(a * b * qRed(topLeft) * qAlpha(topLeft) - + a * (1 - b) * qRed(bottomLeft) * qAlpha(bottomLeft) - + (1 - a) * b * qRed(topRight) * qAlpha(topRight) - + (1 - a) * (1 - b) * qRed(bottomRight) * qAlpha(bottomRight) + 0.5); - green = static_cast(a * b * qGreen(topLeft) * qAlpha(topLeft) - + a * (1 - b) * qGreen(bottomLeft) * qAlpha(bottomLeft) - + (1 - a) * b * qGreen(topRight) * qAlpha(topRight) - + (1 - a) * (1 - b) * qGreen(bottomRight) * qAlpha(bottomRight) + 0.5); - blue = static_cast(a * b * qBlue(topLeft) * qAlpha(topLeft) - + a * (1 - b) * qBlue(bottomLeft) * qAlpha(bottomLeft) - + (1 - a) * b * qBlue(topRight) * qAlpha(topRight) - + (1 - a) * (1 - b) * qBlue(bottomRight) * qAlpha(bottomRight) + 0.5); - alpha = static_cast(a * b * qAlpha(topLeft) - + a * (1 - b) * qAlpha(bottomLeft) - + (1 - a) * b * qAlpha(topRight) - + (1 - a) * (1 - b) * qAlpha(bottomRight) + 0.5); + red = static_cast(a * b * tqRed(topLeft) * tqAlpha(topLeft) + + a * (1 - b) * tqRed(bottomLeft) * tqAlpha(bottomLeft) + + (1 - a) * b * tqRed(topRight) * tqAlpha(topRight) + + (1 - a) * (1 - b) * tqRed(bottomRight) * tqAlpha(bottomRight) + 0.5); + green = static_cast(a * b * tqGreen(topLeft) * tqAlpha(topLeft) + + a * (1 - b) * tqGreen(bottomLeft) * tqAlpha(bottomLeft) + + (1 - a) * b * tqGreen(topRight) * tqAlpha(topRight) + + (1 - a) * (1 - b) * tqGreen(bottomRight) * tqAlpha(bottomRight) + 0.5); + blue = static_cast(a * b * tqBlue(topLeft) * tqAlpha(topLeft) + + a * (1 - b) * tqBlue(bottomLeft) * tqAlpha(bottomLeft) + + (1 - a) * b * tqBlue(topRight) * tqAlpha(topRight) + + (1 - a) * (1 - b) * tqBlue(bottomRight) * tqAlpha(bottomRight) + 0.5); + alpha = static_cast(a * b * tqAlpha(topLeft) + + a * (1 - b) * tqAlpha(bottomLeft) + + (1 - a) * b * tqAlpha(topRight) + + (1 - a) * (1 - b) * tqAlpha(bottomRight) + 0.5); if (alpha != 0) { red /= alpha; @@ -885,18 +885,18 @@ QImage KisBrush::scaleImage(const QImage& srcImage, int width, int height) } } else { - red = static_cast(a * b * qRed(topLeft) - + a * (1 - b) * qRed(bottomLeft) - + (1 - a) * b * qRed(topRight) - + (1 - a) * (1 - b) * qRed(bottomRight) + 0.5); - green = static_cast(a * b * qGreen(topLeft) - + a * (1 - b) * qGreen(bottomLeft) - + (1 - a) * b * qGreen(topRight) - + (1 - a) * (1 - b) * qGreen(bottomRight) + 0.5); - blue = static_cast(a * b * qBlue(topLeft) - + a * (1 - b) * qBlue(bottomLeft) - + (1 - a) * b * qBlue(topRight) - + (1 - a) * (1 - b) * qBlue(bottomRight) + 0.5); + red = static_cast(a * b * tqRed(topLeft) + + a * (1 - b) * tqRed(bottomLeft) + + (1 - a) * b * tqRed(topRight) + + (1 - a) * (1 - b) * tqRed(bottomRight) + 0.5); + green = static_cast(a * b * tqGreen(topLeft) + + a * (1 - b) * tqGreen(bottomLeft) + + (1 - a) * b * tqGreen(topRight) + + (1 - a) * (1 - b) * tqGreen(bottomRight) + 0.5); + blue = static_cast(a * b * tqBlue(topLeft) + + a * (1 - b) * tqBlue(bottomLeft) + + (1 - a) * b * tqBlue(topRight) + + (1 - a) * (1 - b) * tqBlue(bottomRight) + 0.5); alpha = 255; } @@ -932,11 +932,11 @@ QImage KisBrush::scaleImage(const QImage& srcImage, int width, int height) alpha = 255; } - scaledImage.setPixel(dstX, dstY, qRgba(red, green, blue, alpha)); + scaledImage.setPixel(dstX, dstY, tqRgba(red, green, blue, alpha)); } } - //filename = QString("bilinear_%1x%2.png").arg(width).arg(height); + //filename = TQString("bilinear_%1x%2.png").tqarg(width).tqarg(height); } //scaledImage.save(filename, "PNG"); @@ -971,7 +971,7 @@ void KisBrush::findScaledBrushes(double scale, const ScaledBrush **aboveBrush, c } } -KisAlphaMaskSP KisBrush::scaleSinglePixelMask(double scale, Q_UINT8 maskValue, double subPixelX, double subPixelY) +KisAlphaMaskSP KisBrush::scaleSinglePixelMask(double scale, TQ_UINT8 tqmaskValue, double subPixelX, double subPixelY) { int srcWidth = 1; int srcHeight = 1; @@ -986,10 +986,10 @@ KisAlphaMaskSP KisBrush::scaleSinglePixelMask(double scale, Q_UINT8 maskValue, d for (int y = 0; y < dstHeight; y++) { for (int x = 0; x < dstWidth; x++) { - Q_UINT8 topLeft = (x > 0 && y > 0) ? maskValue : OPACITY_TRANSPARENT; - Q_UINT8 bottomLeft = (x > 0 && y < srcHeight) ? maskValue : OPACITY_TRANSPARENT; - Q_UINT8 topRight = (x < srcWidth && y > 0) ? maskValue : OPACITY_TRANSPARENT; - Q_UINT8 bottomRight = (x < srcWidth && y < srcHeight) ? maskValue : OPACITY_TRANSPARENT; + TQ_UINT8 topLeft = (x > 0 && y > 0) ? tqmaskValue : OPACITY_TRANSPARENT; + TQ_UINT8 bottomLeft = (x > 0 && y < srcHeight) ? tqmaskValue : OPACITY_TRANSPARENT; + TQ_UINT8 topRight = (x < srcWidth && y > 0) ? tqmaskValue : OPACITY_TRANSPARENT; + TQ_UINT8 bottomRight = (x < srcWidth && y < srcHeight) ? tqmaskValue : OPACITY_TRANSPARENT; // Bi-linear interpolation int d = static_cast(a * b * topLeft @@ -1009,21 +1009,21 @@ KisAlphaMaskSP KisBrush::scaleSinglePixelMask(double scale, Q_UINT8 maskValue, d d = OPACITY_OPAQUE; } - outputMask->setAlphaAt(x, y, static_cast(d)); + outputMask->setAlphaAt(x, y, static_cast(d)); } } return outputMask; } -QImage KisBrush::scaleSinglePixelImage(double scale, QRgb pixel, double subPixelX, double subPixelY) +TQImage KisBrush::scaleSinglePixelImage(double scale, TQRgb pixel, double subPixelX, double subPixelY) { int srcWidth = 1; int srcHeight = 1; int dstWidth = 2; int dstHeight = 2; - QImage outputImage(dstWidth, dstHeight, 32); + TQImage outputImage(dstWidth, dstHeight, 32); outputImage.setAlphaBuffer(true); double a = subPixelX; @@ -1032,28 +1032,28 @@ QImage KisBrush::scaleSinglePixelImage(double scale, QRgb pixel, double subPixel for (int y = 0; y < dstHeight; y++) { for (int x = 0; x < dstWidth; x++) { - QRgb topLeft = (x > 0 && y > 0) ? pixel : qRgba(0, 0, 0, 0); - QRgb bottomLeft = (x > 0 && y < srcHeight) ? pixel : qRgba(0, 0, 0, 0); - QRgb topRight = (x < srcWidth && y > 0) ? pixel : qRgba(0, 0, 0, 0); - QRgb bottomRight = (x < srcWidth && y < srcHeight) ? pixel : qRgba(0, 0, 0, 0); + TQRgb topLeft = (x > 0 && y > 0) ? pixel : tqRgba(0, 0, 0, 0); + TQRgb bottomLeft = (x > 0 && y < srcHeight) ? pixel : tqRgba(0, 0, 0, 0); + TQRgb topRight = (x < srcWidth && y > 0) ? pixel : tqRgba(0, 0, 0, 0); + TQRgb bottomRight = (x < srcWidth && y < srcHeight) ? pixel : tqRgba(0, 0, 0, 0); // Bi-linear interpolation. Images are in pre-multiplied form. - int red = static_cast(a * b * qRed(topLeft) - + a * (1 - b) * qRed(bottomLeft) - + (1 - a) * b * qRed(topRight) - + (1 - a) * (1 - b) * qRed(bottomRight) + 0.5); - int green = static_cast(a * b * qGreen(topLeft) - + a * (1 - b) * qGreen(bottomLeft) - + (1 - a) * b * qGreen(topRight) - + (1 - a) * (1 - b) * qGreen(bottomRight) + 0.5); - int blue = static_cast(a * b * qBlue(topLeft) - + a * (1 - b) * qBlue(bottomLeft) - + (1 - a) * b * qBlue(topRight) - + (1 - a) * (1 - b) * qBlue(bottomRight) + 0.5); - int alpha = static_cast(a * b * qAlpha(topLeft) - + a * (1 - b) * qAlpha(bottomLeft) - + (1 - a) * b * qAlpha(topRight) - + (1 - a) * (1 - b) * qAlpha(bottomRight) + 0.5); + int red = static_cast(a * b * tqRed(topLeft) + + a * (1 - b) * tqRed(bottomLeft) + + (1 - a) * b * tqRed(topRight) + + (1 - a) * (1 - b) * tqRed(bottomRight) + 0.5); + int green = static_cast(a * b * tqGreen(topLeft) + + a * (1 - b) * tqGreen(bottomLeft) + + (1 - a) * b * tqGreen(topRight) + + (1 - a) * (1 - b) * tqGreen(bottomRight) + 0.5); + int blue = static_cast(a * b * tqBlue(topLeft) + + a * (1 - b) * tqBlue(bottomLeft) + + (1 - a) * b * tqBlue(topRight) + + (1 - a) * (1 - b) * tqBlue(bottomRight) + 0.5); + int alpha = static_cast(a * b * tqAlpha(topLeft) + + a * (1 - b) * tqAlpha(bottomLeft) + + (1 - a) * b * tqAlpha(topRight) + + (1 - a) * (1 - b) * tqAlpha(bottomRight) + 0.5); // Multiply by the square of the scale because a 0.5x0.5 pixel // has 0.25 the value of the 1x1. @@ -1097,14 +1097,14 @@ QImage KisBrush::scaleSinglePixelImage(double scale, QRgb pixel, double subPixel alpha = 255; } - outputImage.setPixel(x, y, qRgba(red, green, blue, alpha)); + outputImage.setPixel(x, y, tqRgba(red, green, blue, alpha)); } } return outputImage; } -QImage KisBrush::interpolate(const QImage& image1, const QImage& image2, double t) +TQImage KisBrush::interpolate(const TQImage& image1, const TQImage& image2, double t) { Q_ASSERT((image1.width() == image2.width()) && (image1.height() == image2.height())); Q_ASSERT(t > -DBL_EPSILON && t < 1 + DBL_EPSILON); @@ -1112,19 +1112,19 @@ QImage KisBrush::interpolate(const QImage& image1, const QImage& image2, double int width = image1.width(); int height = image1.height(); - QImage outputImage(width, height, 32); + TQImage outputImage(width, height, 32); outputImage.setAlphaBuffer(true); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { - QRgb image1pixel = image1.pixel(x, y); - QRgb image2pixel = image2.pixel(x, y); + TQRgb image1pixel = image1.pixel(x, y); + TQRgb image2pixel = image2.pixel(x, y); // Images are in pre-multiplied alpha format. - int red = static_cast((1 - t) * qRed(image1pixel) + t * qRed(image2pixel) + 0.5); - int green = static_cast((1 - t) * qGreen(image1pixel) + t * qGreen(image2pixel) + 0.5); - int blue = static_cast((1 - t) * qBlue(image1pixel) + t * qBlue(image2pixel) + 0.5); - int alpha = static_cast((1 - t) * qAlpha(image1pixel) + t * qAlpha(image2pixel) + 0.5); + int red = static_cast((1 - t) * tqRed(image1pixel) + t * tqRed(image2pixel) + 0.5); + int green = static_cast((1 - t) * tqGreen(image1pixel) + t * tqGreen(image2pixel) + 0.5); + int blue = static_cast((1 - t) * tqBlue(image1pixel) + t * tqBlue(image2pixel) + 0.5); + int alpha = static_cast((1 - t) * tqAlpha(image1pixel) + t * tqAlpha(image2pixel) + 0.5); if (red < 0) { red = 0; @@ -1158,7 +1158,7 @@ QImage KisBrush::interpolate(const QImage& image1, const QImage& image2, double alpha = 255; } - outputImage.setPixel(x, y, qRgba(red, green, blue, alpha)); + outputImage.setPixel(x, y, tqRgba(red, green, blue, alpha)); } } @@ -1167,16 +1167,16 @@ QImage KisBrush::interpolate(const QImage& image1, const QImage& image2, double KisBrush::ScaledBrush::ScaledBrush() { - m_mask = 0; - m_image = QImage(); + m_tqmask = 0; + m_image = TQImage(); m_scale = 1; m_xScale = 1; m_yScale = 1; } -KisBrush::ScaledBrush::ScaledBrush(KisAlphaMaskSP scaledMask, const QImage& scaledImage, double scale, double xScale, double yScale) +KisBrush::ScaledBrush::ScaledBrush(KisAlphaMaskSP scaledMask, const TQImage& scaledImage, double scale, double xScale, double yScale) { - m_mask = scaledMask; + m_tqmask = scaledMask; m_image = scaledImage; m_scale = scale; m_xScale = xScale; @@ -1190,24 +1190,24 @@ KisBrush::ScaledBrush::ScaledBrush(KisAlphaMaskSP scaledMask, const QImage& scal for (int y = 0; y < m_image.height(); y++) { for (int x = 0; x < m_image.width(); x++) { - QRgb pixel = m_image.pixel(x, y); + TQRgb pixel = m_image.pixel(x, y); - int red = qRed(pixel); - int green = qGreen(pixel); - int blue = qBlue(pixel); - int alpha = qAlpha(pixel); + int red = tqRed(pixel); + int green = tqGreen(pixel); + int blue = tqBlue(pixel); + int alpha = tqAlpha(pixel); red = (red * alpha) / 255; green = (green * alpha) / 255; blue = (blue * alpha) / 255; - m_image.setPixel(x, y, qRgba(red, green, blue, alpha)); + m_image.setPixel(x, y, tqRgba(red, green, blue, alpha)); } } } } -void KisBrush::setImage(const QImage& img) +void KisBrush::setImage(const TQImage& img) { m_img = img; m_img.detach(); @@ -1220,49 +1220,49 @@ void KisBrush::setImage(const QImage& img) setValid(true); } -Q_INT32 KisBrush::width() const +TQ_INT32 KisBrush::width() const { return m_width; } -void KisBrush::setWidth(Q_INT32 w) +void KisBrush::setWidth(TQ_INT32 w) { m_width = w; } -Q_INT32 KisBrush::height() const +TQ_INT32 KisBrush::height() const { return m_height; } -void KisBrush::setHeight(Q_INT32 h) +void KisBrush::setHeight(TQ_INT32 h) { m_height = h; } -/*QImage KisBrush::outline(double pressure) { +/*TQImage KisBrush::outline(double pressure) { KisLayerSP layer = image(KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),""), KisPaintInformation(pressure)); KisBoundary bounds(layer.data()); - int w = maskWidth(pressure); - int h = maskHeight(pressure); + int w = tqmaskWidth(pressure); + int h = tqmaskHeight(pressure); bounds.generateBoundary(w, h); - QPixmap pix(bounds.pixmap(w, h)); - QImage result; + TQPixmap pix(bounds.pixmap(w, h)); + TQImage result; result = pix; return result; }*/ void KisBrush::generateBoundary() { KisPaintDeviceSP dev; - int w = maskWidth(KisPaintInformation()); - int h = maskHeight(KisPaintInformation()); + int w = tqmaskWidth(KisPaintInformation()); + int h = tqmaskHeight(KisPaintInformation()); if (brushType() == IMAGE || brushType() == PIPE_IMAGE) { dev = image(KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("RGBA",""),""), KisPaintInformation()); } else { - KisAlphaMaskSP amask = mask(KisPaintInformation()); + KisAlphaMaskSP atqmask = tqmask(KisPaintInformation()); KisColorSpace* cs = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),""); dev = new KisPaintDevice(cs, "tmp for generateBoundary"); for (int y = 0; y < h; y++) { @@ -1270,7 +1270,7 @@ void KisBrush::generateBoundary() { int x = 0; while(!it.isDone()) { - cs->setAlpha(it.rawData(), amask->alphaAt(x++, y), 1); + cs->setAlpha(it.rawData(), atqmask->alphaAt(x++, y), 1); ++it; } } @@ -1290,15 +1290,15 @@ void KisBrush::makeMaskImage() { if (!hasColor()) return; - QImage img; + TQImage img; img.create(width(), height(), 32); if (m_img.width() == img.width() && m_img.height() == img.height()) { for (int x = 0; x < width(); x++) { for (int y = 0; y < height(); y++) { - QRgb c = m_img.pixel(x, y); - int a = (qGray(c) * qAlpha(c)) / 255; // qGray(black) = 0 - img.setPixel(x, y, qRgba(a, a, a, 255)); + TQRgb c = m_img.pixel(x, y); + int a = (tqGray(c) * tqAlpha(c)) / 255; // tqGray(black) = 0 + img.setPixel(x, y, tqRgba(a, a, a, 255)); } } diff --git a/krita/core/kis_brush.h b/krita/core/kis_brush.h index 7de2c8b7..43fc3259 100644 --- a/krita/core/kis_brush.h +++ b/krita/core/kis_brush.h @@ -20,27 +20,27 @@ #ifndef KIS_BRUSH_ #define KIS_BRUSH_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include "kis_resource.h" #include "kis_types.h" #include "kis_point.h" -#include "kis_alpha_mask.h" +#include "kis_alpha_tqmask.h" #include "koffice_export.h" #include "kis_boundary.h" #include "kis_paintop.h" -class QPoint; -class QPixmap; +class TQPoint; +class TQPixmap; class KisBoundary; class KisColorSpace; -class QIODevice; +class TQIODevice; enum enumBrushType { INVALID, @@ -54,32 +54,33 @@ enum enumBrushType { class KRITACORE_EXPORT KisBrush : public KisResource { typedef KisResource super; Q_OBJECT + TQ_OBJECT public: /// Construct brush to load filename later as brush - KisBrush(const QString& filename); + KisBrush(const TQString& filename); /// Load brush from the specified data, at position dataPos, and set the filename - KisBrush(const QString& filename, - const QByteArray & data, - Q_UINT32 & dataPos); + KisBrush(const TQString& filename, + const TQByteArray & data, + TQ_UINT32 & dataPos); /// Load brush from the specified paint device, in the specified region KisBrush(KisPaintDevice* image, int x, int y, int w, int h); - /// Load brush as a copy from the specified QImage (handy when you need to copy a brush!) - KisBrush(const QImage& image, const QString& name = QString("")); + /// Load brush as a copy from the specified TQImage (handy when you need to copy a brush!) + KisBrush(const TQImage& image, const TQString& name = TQString("")); virtual ~KisBrush(); virtual bool load(); /// synchronous, doesn't emit any signal (none defined!) virtual bool save(); - virtual QImage img(); - virtual bool saveToDevice(QIODevice* dev) const; + virtual TQImage img(); + virtual bool saveToDevice(TQIODevice* dev) const; /** - @return a mask computed from the grey-level values of the + @return a tqmask computed from the grey-level values of the pixels in the brush. */ - virtual KisAlphaMaskSP mask(const KisPaintInformation& info, + virtual KisAlphaMaskSP tqmask(const KisPaintInformation& info, double subPixelX = 0, double subPixelY = 0) const; // XXX: return non-tiled simple buffer virtual KisPaintDeviceSP image(KisColorSpace * colorSpace, const KisPaintInformation& info, @@ -93,21 +94,21 @@ public: double xSpacing(double pressure = PRESSURE_DEFAULT) const; double ySpacing(double pressure = PRESSURE_DEFAULT) const; - // Dimensions in pixels of the mask/image at a given pressure. - Q_INT32 maskWidth(const KisPaintInformation& info) const; - Q_INT32 maskHeight(const KisPaintInformation& info) const; + // Dimensions in pixels of the tqmask/image at a given pressure. + TQ_INT32 tqmaskWidth(const KisPaintInformation& info) const; + TQ_INT32 tqmaskHeight(const KisPaintInformation& info) const; virtual void setUseColorAsMask(bool useColorAsMask) { m_useColorAsMask = useColorAsMask; } virtual bool useColorAsMask() const { return m_useColorAsMask; } virtual bool hasColor() const; virtual void makeMaskImage(); - Q_INT32 width() const; - Q_INT32 height() const; + TQ_INT32 width() const; + TQ_INT32 height() const; virtual enumBrushType brushType() const; - //QImage outline(double pressure = PRESSURE_DEFAULT); + //TQImage outline(double pressure = PRESSURE_DEFAULT); virtual KisBoundary boundary(); /** @@ -119,9 +120,9 @@ public: virtual KisBrush* clone() const; protected: - void setWidth(Q_INT32 w); - void setHeight(Q_INT32 h); - void setImage(const QImage& img); + void setWidth(TQ_INT32 w); + void setHeight(TQ_INT32 h); + void setImage(const TQImage& img); void setBrushType(enumBrushType type) { m_brushType = type; }; static double scaleForPressure(double pressure); @@ -129,17 +130,17 @@ private: class ScaledBrush { public: ScaledBrush(); - ScaledBrush(KisAlphaMaskSP scaledMask, const QImage& scaledImage, double scale, double xScale, double yScale); + ScaledBrush(KisAlphaMaskSP scaledMask, const TQImage& scaledImage, double scale, double xScale, double yScale); double scale() const { return m_scale; } double xScale() const { return m_xScale; } double yScale() const { return m_yScale; } - KisAlphaMaskSP mask() const { return m_mask; } - QImage image() const { return m_image; } + KisAlphaMaskSP tqmask() const { return m_tqmask; } + TQImage image() const { return m_image; } private: - KisAlphaMaskSP m_mask; - QImage m_image; + KisAlphaMaskSP m_tqmask; + TQImage m_image; double m_scale; double m_xScale; double m_yScale; @@ -151,13 +152,13 @@ private: void createScaledBrushes() const; KisAlphaMaskSP scaleMask(const ScaledBrush *srcBrush, double scale, double subPixelX, double subPixelY) const; - QImage scaleImage(const ScaledBrush *srcBrush, double scale, double subPixelX, double subPixelY) const; + TQImage scaleImage(const ScaledBrush *srcBrush, double scale, double subPixelX, double subPixelY) const; - static QImage scaleImage(const QImage& srcImage, int width, int height); - static QImage interpolate(const QImage& image1, const QImage& image2, double t); + static TQImage scaleImage(const TQImage& srcImage, int width, int height); + static TQImage interpolate(const TQImage& image1, const TQImage& image2, double t); - static KisAlphaMaskSP scaleSinglePixelMask(double scale, Q_UINT8 maskValue, double subPixelX, double subPixelY); - static QImage scaleSinglePixelImage(double scale, QRgb pixel, double subPixelX, double subPixelY); + static KisAlphaMaskSP scaleSinglePixelMask(double scale, TQ_UINT8 tqmaskValue, double subPixelX, double subPixelY); + static TQImage scaleSinglePixelImage(double scale, TQRgb pixel, double subPixelX, double subPixelY); // Find the scaled brush(es) nearest to the given scale. void findScaledBrushes(double scale, const ScaledBrush **aboveBrush, const ScaledBrush **belowBrush) const; @@ -165,22 +166,22 @@ private: // Initialize our boundary void generateBoundary(); - QByteArray m_data; + TQByteArray m_data; bool m_ownData; KisPoint m_hotSpot; double m_spacing; bool m_useColorAsMask; bool m_hasColor; - QImage m_img; - mutable QValueVector m_scaledBrushes; + TQImage m_img; + mutable TQValueVector m_scaledBrushes; - Q_INT32 m_width; - Q_INT32 m_height; + TQ_INT32 m_width; + TQ_INT32 m_height; - Q_UINT32 m_header_size; /* header_size = sizeof (BrushHeader) + brush name */ - Q_UINT32 m_version; /* brush file version # */ - Q_UINT32 m_bytes; /* depth of brush in bytes */ - Q_UINT32 m_magic_number; /* GIMP brush magic number */ + TQ_UINT32 m_header_size; /* header_size = sizeof (BrushHeader) + brush name */ + TQ_UINT32 m_version; /* brush file version # */ + TQ_UINT32 m_bytes; /* depth of brush in bytes */ + TQ_UINT32 m_magic_number; /* GIMP brush magic number */ enumBrushType m_brushType; diff --git a/krita/core/kis_colorspace_convert_visitor.h b/krita/core/kis_colorspace_convert_visitor.h index ce4ee787..e42c0893 100644 --- a/krita/core/kis_colorspace_convert_visitor.h +++ b/krita/core/kis_colorspace_convert_visitor.h @@ -28,7 +28,7 @@ class KisColorSpaceConvertVisitor :public KisLayerVisitor { public: - KisColorSpaceConvertVisitor(KisColorSpace *dstColorSpace, Q_INT32 renderingIntent); + KisColorSpaceConvertVisitor(KisColorSpace *dstColorSpace, TQ_INT32 renderingIntent); virtual ~KisColorSpaceConvertVisitor(); public: @@ -39,10 +39,10 @@ public: private: KisColorSpace *m_dstColorSpace; - Q_INT32 m_renderingIntent; + TQ_INT32 m_renderingIntent; }; -KisColorSpaceConvertVisitor::KisColorSpaceConvertVisitor(KisColorSpace *dstColorSpace, Q_INT32 renderingIntent) : +KisColorSpaceConvertVisitor::KisColorSpaceConvertVisitor(KisColorSpace *dstColorSpace, TQ_INT32 renderingIntent) : KisLayerVisitor(), m_dstColorSpace(dstColorSpace), m_renderingIntent(renderingIntent) diff --git a/krita/core/kis_command.cc b/krita/core/kis_command.cc index bcc997ea..11da634b 100644 --- a/krita/core/kis_command.cc +++ b/krita/core/kis_command.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include "kis_command.h" KisCommand::KisCommand(KisUndoAdapter *adapter) @@ -26,7 +26,7 @@ KisCommand::KisCommand(KisUndoAdapter *adapter) m_undoAdapter = adapter; } -KisCommand::KisCommand(const QString& name, KisUndoAdapter *adapter) +KisCommand::KisCommand(const TQString& name, KisUndoAdapter *adapter) { m_name = name; m_undoAdapter = adapter; @@ -36,7 +36,7 @@ KisCommand::~KisCommand() { } -QString KisCommand::name() const +TQString KisCommand::name() const { return m_name; } diff --git a/krita/core/kis_command.h b/krita/core/kis_command.h index f391c087..bc87bc5d 100644 --- a/krita/core/kis_command.h +++ b/krita/core/kis_command.h @@ -20,7 +20,7 @@ #ifndef KIS_COMMAND_H_ #define KIS_COMMAND_H_ -#include +#include #include class KisUndoAdapter; @@ -30,19 +30,19 @@ class KisCommand : public KCommand { public: KisCommand(KisUndoAdapter *undoAdapter); - KisCommand(const QString& name, KisUndoAdapter *undoAdapter); + KisCommand(const TQString& name, KisUndoAdapter *undoAdapter); virtual ~KisCommand(); virtual void execute() = 0; virtual void unexecute() = 0; - virtual QString name() const; + virtual TQString name() const; protected: KisUndoAdapter *adapter() const; private: KisUndoAdapter *m_undoAdapter; - QString m_name; + TQString m_name; }; inline diff --git a/krita/core/kis_convolution_painter.cc b/krita/core/kis_convolution_painter.cc index cb51480c..c9146527 100644 --- a/krita/core/kis_convolution_painter.cc +++ b/krita/core/kis_convolution_painter.cc @@ -20,25 +20,25 @@ #include #include -#include "qbrush.h" -#include "qcolor.h" -#include "qfontinfo.h" -#include "qfontmetrics.h" -#include "qpen.h" -#include "qregion.h" -#include "qwmatrix.h" -#include -#include -#include -#include -#include -#include -#include +#include "tqbrush.h" +#include "tqcolor.h" +#include "tqfontinfo.h" +#include "tqfontmetrics.h" +#include "tqpen.h" +#include "tqregion.h" +#include "tqwmatrix.h" +#include +#include +#include +#include +#include +#include +#include #include #include -#include +#include #include "kis_brush.h" #include "kis_global.h" @@ -56,16 +56,16 @@ #include "kis_convolution_painter.h" -KisKernelSP KisKernel::fromQImage(const QImage& img) +KisKernelSP KisKernel::fromTQImage(const TQImage& img) { KisKernelSP k = new KisKernel; k->width = img.width(); k->height = img.height(); k->offset = 0; uint count = k->width * k->height; - k->data = new Q_INT32[count]; - Q_INT32* itData = k->data; - Q_UINT8* itImg = img.bits(); + k->data = new TQ_INT32[count]; + TQ_INT32* itData = k->data; + TQ_UINT8* itImg = img.bits(); k->factor = 0; for(uint i = 0; i < count; ++i , ++itData, itImg+=4) { @@ -85,14 +85,14 @@ KisConvolutionPainter::KisConvolutionPainter(KisPaintDeviceSP device) : super(de { } -void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, +void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, KisConvolutionBorderOp borderOp, KisChannelInfo::enumChannelFlags channelFlags ) { // Make the area we cover as small as possible if (m_device->hasSelection()) { - QRect r = m_device->selection()->selectedRect().intersect(QRect(x, y, w, h)); + TQRect r = m_device->selection()->selectedRect().intersect(TQRect(x, y, w, h)); x = r.x(); y = r.y(); w = r.width(); @@ -103,7 +103,7 @@ void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y if ( w == 0 && h == 0 ) return; // Determine the kernel's extent from the center pixel - Q_INT32 kw, kh, khalfWidth, khalfHeight, xLastMinuskhw, yLastMinuskhh; + TQ_INT32 kw, kh, khalfWidth, khalfHeight, xLastMinuskhw, yLastMinuskhh; kw = kernel->width; kh = kernel->height; khalfWidth = (kw - 1) / 2; @@ -141,9 +141,9 @@ void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y int cacheSize = kw * kh; int cdepth = cs -> pixelSize(); - Q_UINT8** pixelPtrCache = new Q_UINT8*[cacheSize]; + TQ_UINT8** pixelPtrCache = new TQ_UINT8*[cacheSize]; for (int i = 0; i < cacheSize; i++) - pixelPtrCache[i] = new Q_UINT8[cdepth]; + pixelPtrCache[i] = new TQ_UINT8[cdepth]; // pixelPtrCache.fill(0); // row == the y position of the pixel we want to change in the paint device @@ -162,8 +162,8 @@ void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y // krow = the y position in the kernel matrix if(needFull) { - Q_INT32 i = 0; - for (Q_INT32 krow = 0; krow < kh; ++krow) { + TQ_INT32 i = 0; + for (TQ_INT32 krow = 0; krow < kh; ++krow) { // col - khalfWidth = the left starting point of the kernel as centered on our pixel // krow - khalfHeight = the offset for the top of the kernel as centered on our pixel @@ -180,14 +180,14 @@ void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y needFull = false; Q_ASSERT (i==kw*kh); } else { - for (Q_INT32 krow = 0; krow < kh; ++krow) { // shift the cache to the left - Q_UINT8** d = pixelPtrCache + krow * kw; - //memmove( d, d + 1, (kw-1)*sizeof(Q_UINT8*)); + for (TQ_INT32 krow = 0; krow < kh; ++krow) { // shift the cache to the left + TQ_UINT8** d = pixelPtrCache + krow * kw; + //memmove( d, d + 1, (kw-1)*sizeof(TQ_UINT8*)); for (int i = 0; i < (kw-1); i++) { memcpy(d[i], d[i+1], cdepth); } } - Q_INT32 i = kw - 1; + TQ_INT32 i = kw - 1; KisVLineIteratorPixel kit = m_device->createVLineIterator(col + khalfWidth, row - khalfHeight, kh, false); while (!kit.isDone()) { memcpy(pixelPtrCache[i], kit.oldRawData(), cdepth); @@ -220,7 +220,7 @@ void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y } - addDirtyRect(QRect(x, y, w, h)); + addDirtyRect(TQRect(x, y, w, h)); emit notifyProgressDone(); @@ -229,12 +229,12 @@ void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y delete[] pixelPtrCache; } -void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, +void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, KisChannelInfo::enumChannelFlags channelFlags) { int lastProgressPercent = 0; // Determine the kernel's extent from the center pixel - Q_INT32 kw, kh, khalfWidth, khalfHeight, xLastMinuskhw, yLastMinuskhh; + TQ_INT32 kw, kh, khalfWidth, khalfHeight, xLastMinuskhw, yLastMinuskhh; kw = kernel->width; kh = kernel->height; khalfWidth = (kw - 1) / 2; @@ -249,9 +249,9 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I int cacheSize = kw * kh; int cdepth = cs -> pixelSize(); - Q_UINT8** pixelPtrCache = new Q_UINT8*[cacheSize]; + TQ_UINT8** pixelPtrCache = new TQ_UINT8*[cacheSize]; for (int i = 0; i < cacheSize; i++) - pixelPtrCache[i] = new Q_UINT8[cdepth]; + pixelPtrCache[i] = new TQ_UINT8[cdepth]; // row == the y position of the pixel we want to change in the paint device int row = y; @@ -264,8 +264,8 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I KisHLineIteratorPixel hit = m_device->createHLineIterator(x, row, w, true); bool needFull = true; - Q_INT32 itStart = row - khalfHeight; - Q_INT32 itH = kh; + TQ_INT32 itStart = row - khalfHeight; + TQ_INT32 itH = kh; if(itStart < 0) { itH += itStart; @@ -281,15 +281,15 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I // krow = the y position in the kernel matrix if(needFull) // The cache has not been fill, so we need to fill it { - Q_INT32 i = 0; - Q_INT32 krow = 0; + TQ_INT32 i = 0; + TQ_INT32 krow = 0; if( row < khalfHeight ) { // We are just outside the layer, all the row in the cache will be identical // so we need to create them only once, and then to copy them if( x < khalfWidth) { // the left pixels are outside of the layer, in the corner - Q_INT32 kcol = 0; + TQ_INT32 kcol = 0; KisHLineIteratorPixel kit = m_device->createHLineIterator(0, 0, kw, false); for(; kcol < (khalfWidth - x) + 1; ++kcol) { // First copy the address of the topleft pixel @@ -318,7 +318,7 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I } i = krow * kw; } - Q_INT32 itH = kh; + TQ_INT32 itH = kh; if(row + khalfHeight > yLastMinuskhh) { itH += yLastMinuskhh - row - khalfHeight; @@ -330,8 +330,8 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I // kw = the width of the kernel // Fill the cache with pointers to the pixels under the kernel - Q_INT32 itHStart = col - khalfWidth; - Q_INT32 itW = kw; + TQ_INT32 itHStart = col - khalfWidth; + TQ_INT32 itW = kw; if(itHStart < 0) { itW += itHStart; @@ -351,7 +351,7 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I ++i; } } - Q_INT32 lastvalid = i - kw; + TQ_INT32 lastvalid = i - kw; for(; krow < kh; ++krow) { // Copy the last valid line in the current line for (int i = 0; i < kw; i++) @@ -360,19 +360,19 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I } needFull = false; } else { -/* for (Q_INT32 krow = 0; krow < kh; ++krow) { // shift the cache to the left - Q_UINT8** d = pixelPtrCache + krow * kw; -// memmove( d, d + 1, (kw-1)*sizeof(Q_UINT8*)); +/* for (TQ_INT32 krow = 0; krow < kh; ++krow) { // shift the cache to the left + TQ_UINT8** d = pixelPtrCache + krow * kw; +// memmove( d, d + 1, (kw-1)*sizeof(TQ_UINT8*)); for (int i = 0; i < (kw-1); i++) { memcpy(d[i], d[i+1], cdepth); } }*/ - Q_UINT8* firstincache = pixelPtrCache[0]; - memmove(pixelPtrCache, pixelPtrCache + 1, (cacheSize - 1) * sizeof(Q_UINT8*) ); + TQ_UINT8* firstincache = pixelPtrCache[0]; + memmove(pixelPtrCache, pixelPtrCache + 1, (cacheSize - 1) * sizeof(TQ_UINT8*) ); pixelPtrCache[cacheSize - 1] = firstincache; if(col < xLastMinuskhw) { - Q_INT32 i = kw - 1; + TQ_INT32 i = kw - 1; // KisVLineIteratorPixel kit = m_device->createVLineIterator(col + khalfWidth, itStart, itH, false); kit.nextCol(); if( row < khalfHeight ) @@ -387,7 +387,7 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I ++kit; i += kw; } - Q_INT32 lastvalid = i - kw; + TQ_INT32 lastvalid = i - kw; for(;i < kw*kh; i+=kw) { memcpy(pixelPtrCache[i], pixelPtrCache[lastvalid], cdepth); @@ -417,7 +417,7 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_I } - addDirtyRect(QRect(x, y, w, h)); + addDirtyRect(TQRect(x, y, w, h)); emit notifyProgressDone(); for (int i = 0; i < cacheSize; i++) diff --git a/krita/core/kis_convolution_painter.h b/krita/core/kis_convolution_painter.h index d4aa8efb..8c0b2bba 100644 --- a/krita/core/kis_convolution_painter.h +++ b/krita/core/kis_convolution_painter.h @@ -18,7 +18,7 @@ #ifndef KIS_CONVOLUTION_PAINTER_H_ #define KIS_CONVOLUTION_PAINTER_H_ -#include +#include #include "ksharedptr.h" #include "kis_types.h" @@ -42,17 +42,17 @@ class KisKernel : public KShared public: - Q_UINT32 width; - Q_UINT32 height; - Q_INT32 offset; - Q_INT32 factor; - Q_INT32 * data; + TQ_UINT32 width; + TQ_UINT32 height; + TQ_INT32 offset; + TQ_INT32 factor; + TQ_INT32 * data; KisKernel() : width(0), height(0), offset(0), factor(0), data(0) {}; virtual ~KisKernel() { delete [] data; }; - static KisKernelSP fromQImage(const QImage& img); + static KisKernelSP fromTQImage(const TQImage& img); }; @@ -80,14 +80,14 @@ public: * * Note that we do not (currently) support different kernels for different channels _or_ channel types. */ - void applyMatrix(KisKernelSP kernel, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, + void applyMatrix(KisKernelSP kernel, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, KisConvolutionBorderOp borderOp = BORDER_AVOID, KisChannelInfo::enumChannelFlags channelFlags = KisChannelInfo::FLAG_COLOR); private: /** * This function is called by applyMatrix when borderOp == BORDER_REPEAT */ - void applyMatrixRepeat(KisKernelSP kernel, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, + void applyMatrixRepeat(KisKernelSP kernel, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, KisChannelInfo::enumChannelFlags channelFlags); diff --git a/krita/core/kis_crop_visitor.h b/krita/core/kis_crop_visitor.h index 6e5c826c..0988a920 100644 --- a/krita/core/kis_crop_visitor.h +++ b/krita/core/kis_crop_visitor.h @@ -18,7 +18,7 @@ #ifndef KIS_CROP_VISITOR_H_ #define KIS_CROP_VISITOR_H_ -#include "qrect.h" +#include "tqrect.h" #include "klocale.h" @@ -38,7 +38,7 @@ class KisCropVisitor : public KisLayerVisitor { public: - KisCropVisitor( const QRect & rc, bool movelayers = true) + KisCropVisitor( const TQRect & rc, bool movelayers = true) : KisLayerVisitor() , m_rect(rc), m_movelayers(movelayers) { @@ -101,7 +101,7 @@ public: private: - QRect m_rect; + TQRect m_rect; bool m_movelayers; }; diff --git a/krita/core/kis_datamanager.h b/krita/core/kis_datamanager.h index 2c450004..79f7ddb8 100644 --- a/krita/core/kis_datamanager.h +++ b/krita/core/kis_datamanager.h @@ -18,9 +18,9 @@ #ifndef KIS_DATAMANAGER_H_ #define KIS_DATAMANAGER_H_ -#include -#include -#include +#include +#include +#include class KoStore; @@ -40,12 +40,12 @@ class KoStore; * that may allow deferred loading. * * A datamanager knows nothing about the type of pixel data except - * how many Q_UINT8's a single pixel takes. + * how many TQ_UINT8's a single pixel takes. */ class KisDataManager : public ACTUAL_DATAMGR { public: - KisDataManager(Q_UINT32 pixelSize, const Q_UINT8 *defPixel) : ACTUAL_DATAMGR(pixelSize, defPixel) {} + KisDataManager(TQ_UINT32 pixelSize, const TQ_UINT8 *defPixel) : ACTUAL_DATAMGR(pixelSize, defPixel) {} KisDataManager(const KisDataManager& dm) : ACTUAL_DATAMGR(dm) { } public: @@ -53,12 +53,12 @@ public: * Sets the default pixel. Note that this might change every occurrance, and it might not, but new data * well be initialised with this pixel */ - inline void setDefaultPixel(const Q_UINT8 *defPixel) { return ACTUAL_DATAMGR::setDefaultPixel(defPixel); } + inline void setDefaultPixel(const TQ_UINT8 *defPixel) { return ACTUAL_DATAMGR::setDefaultPixel(defPixel); } /** * Gets the default pixel. */ - inline const Q_UINT8 *defaultPixel() const { return ACTUAL_DATAMGR::defaultPixel(); } + inline const TQ_UINT8 *defaultPixel() const { return ACTUAL_DATAMGR::defaultPixel(); } /** * Reguests a memento from the data manager. There is only one memento active @@ -98,15 +98,15 @@ public: /** * Returns the number of bytes a pixel takes */ - inline Q_UINT32 pixelSize() { return ACTUAL_DATAMGR::pixelSize(); } + inline TQ_UINT32 pixelSize() { return ACTUAL_DATAMGR::pixelSize(); } /** * Return the extent of the data in x,y,w,h. */ - inline void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const + inline void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const { return ACTUAL_DATAMGR::extent(x, y, w, h); } - QRect extent() const { return ACTUAL_DATAMGR::extent(); } + TQRect extent() const { return ACTUAL_DATAMGR::extent(); } public: @@ -114,26 +114,26 @@ public: /** * Crop or extend the data to x, y, w, h. */ - inline void setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) + inline void setExtent(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { return ACTUAL_DATAMGR::setExtent(x, y, w, h); } - inline void setExtent(const QRect & rect) { setExtent(rect.x(), rect.y(), rect.width(), rect.height()); } + inline void setExtent(const TQRect & rect) { setExtent(rect.x(), rect.y(), rect.width(), rect.height()); } public: /** * Clear the specified rect to the specified value. */ - inline void clear(Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h, - Q_UINT8 def) { ACTUAL_DATAMGR::clear(x, y, w, h, def); } + inline void clear(TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h, + TQ_UINT8 def) { ACTUAL_DATAMGR::clear(x, y, w, h, def); } /** * Clear the specified rect to the specified pixel value. */ - inline void clear(Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h, - const Q_UINT8 * def) { ACTUAL_DATAMGR::clear(x, y, w, h, def); } + inline void clear(TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h, + const TQ_UINT8 * def) { ACTUAL_DATAMGR::clear(x, y, w, h, def); } /** * Clear all back to default values. @@ -147,63 +147,63 @@ public: * Copy the specified rect from the specified data into this * data. */ - inline void paste(KisDataManagerSP data, Q_INT32 sx, Q_INT32 sy, Q_INT32 dx, Q_INT32 dy, - Q_INT32 w, Q_INT32 h) { ACTUAL_DATAMGR::paste(data, sx, sy, dx, dy, w, h); } + inline void paste(KisDataManagerSP data, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 dx, TQ_INT32 dy, + TQ_INT32 w, TQ_INT32 h) { ACTUAL_DATAMGR::paste(data, sx, sy, dx, dy, w, h); } public: /** * Get a read-only pointer to the specified pixel. */ - inline KDE_DEPRECATED const Q_UINT8* pixel(Q_INT32 x, Q_INT32 y) + inline KDE_DEPRECATED const TQ_UINT8* pixel(TQ_INT32 x, TQ_INT32 y) { return ACTUAL_DATAMGR::pixel(x, y); } /** * Get a read-write pointer to the specified pixel. */ - inline KDE_DEPRECATED Q_UINT8* writablePixel(Q_INT32 x, Q_INT32 y) + inline KDE_DEPRECATED TQ_UINT8* writablePixel(TQ_INT32 x, TQ_INT32 y) { return ACTUAL_DATAMGR::writablePixel(x, y); } /** * Write the specified data to x, y. There is no checking on pixelSize! */ - inline void setPixel(Q_INT32 x, Q_INT32 y, const Q_UINT8 * data) + inline void setPixel(TQ_INT32 x, TQ_INT32 y, const TQ_UINT8 * data) { ACTUAL_DATAMGR::setPixel(x, y, data);} /** * Copy the bytes in the specified rect to a chunk of memory. * The pixelSize in bytes is w * h * pixelSize. XXX: Better - * use QValueVector? + * use TQValueVector? */ - inline void readBytes(Q_UINT8 * data, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h) + inline void readBytes(TQ_UINT8 * data, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h) { ACTUAL_DATAMGR::readBytes(data, x, y, w, h);} /** * Copy the bytes to the specified rect. w * h * pixelSize bytes will be read, whether - * the caller prepared them or not. XXX: Better use QValueVector? + * the caller prepared them or not. XXX: Better use TQValueVector? */ - inline void writeBytes(const Q_UINT8 * data, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h) + inline void writeBytes(const TQ_UINT8 * data, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h) {ACTUAL_DATAMGR::writeBytes( data, x, y, w, h); } // Get the number of contiguous columns starting at x, valid for all values // of y between minY and maxY. - inline Q_INT32 numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT32 maxY) + inline TQ_INT32 numContiguousColumns(TQ_INT32 x, TQ_INT32 minY, TQ_INT32 maxY) { return ACTUAL_DATAMGR::numContiguousColumns(x, minY, maxY); } // Get the number of contiguous rows starting at y, valid for all values // of x between minX and maxX. - inline Q_INT32 numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 maxX) + inline TQ_INT32 numContiguousRows(TQ_INT32 y, TQ_INT32 minX, TQ_INT32 maxX) { return ACTUAL_DATAMGR::numContiguousRows(y, minX, maxX); } // Get the row stride at pixel (x, y). This is the number of bytes to add to a // pointer to pixel (x, y) to access (x, y + 1). - inline Q_INT32 rowStride(Q_INT32 x, Q_INT32 y) + inline TQ_INT32 rowStride(TQ_INT32 x, TQ_INT32 y) { return ACTUAL_DATAMGR::rowStride(x, y); } protected: diff --git a/krita/core/kis_exif_info.cc b/krita/core/kis_exif_info.cc index f81a1566..c389c7ba 100644 --- a/krita/core/kis_exif_info.cc +++ b/krita/core/kis_exif_info.cc @@ -31,18 +31,18 @@ KisExifInfo::~KisExifInfo() {} -bool KisExifInfo::load(const QDomElement& elmt) +bool KisExifInfo::load(const TQDomElement& elmt) { if(elmt.tagName() != "ExifInfo") return false; - for( QDomNode node = elmt.firstChild(); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node = elmt.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if ( !e.isNull() ) { if(e.tagName() == "ExifValue") { - QString key = e.attribute("name"); + TQString key = e.attribute("name"); ExifValue eV; eV.load(e); setValue(key, eV); @@ -52,13 +52,13 @@ bool KisExifInfo::load(const QDomElement& elmt) return true; } -QDomElement KisExifInfo::save(QDomDocument& doc) +TQDomElement KisExifInfo::save(TQDomDocument& doc) { - QDomElement elmt = doc.createElement("ExifInfo"); + TQDomElement elmt = doc.createElement("ExifInfo"); for( KisExifInfo::evMap::const_iterator it = begin(); it != end(); ++it) { ExifValue ev = it.data(); - QDomElement evD = ev.save( doc); + TQDomElement evD = ev.save( doc); evD.setAttribute("name", it.key()); elmt.appendChild(evD); } diff --git a/krita/core/kis_exif_info.h b/krita/core/kis_exif_info.h index aaebf3a9..5cc9cfeb 100644 --- a/krita/core/kis_exif_info.h +++ b/krita/core/kis_exif_info.h @@ -22,8 +22,8 @@ #include "kis_exif_value.h" -#include -#include +#include +#include class KisExifInfo { @@ -31,12 +31,12 @@ class KisExifInfo KisExifInfo(); virtual ~KisExifInfo(); - virtual bool load(const QDomElement& elmt); - virtual QDomElement save(QDomDocument& doc); + virtual bool load(const TQDomElement& elmt); + virtual TQDomElement save(TQDomDocument& doc); - bool getValue(QString name, ExifValue& value) + bool getValue(TQString name, ExifValue& value) { - if ( m_values.find( name ) == m_values.end() ) { + if ( m_values.tqfind( name ) == m_values.end() ) { return false; } else { @@ -44,11 +44,11 @@ class KisExifInfo return true; } } - void setValue(QString name, ExifValue value) + void setValue(TQString name, ExifValue value) { m_values[name] = value; } - typedef QMap evMap; + typedef TQMap evMap; evMap::const_iterator begin() const { return m_values.begin(); } evMap::const_iterator end() const { return m_values.end(); } private: diff --git a/krita/core/kis_exif_value.cc b/krita/core/kis_exif_value.cc index 25e78208..fb1cdd03 100644 --- a/krita/core/kis_exif_value.cc +++ b/krita/core/kis_exif_value.cc @@ -24,7 +24,7 @@ #include namespace { -void set16Bit (unsigned char *data, ExifValue::ByteOrder order, const Q_UINT16* value) +void set16Bit (unsigned char *data, ExifValue::ByteOrder order, const TQ_UINT16* value) { switch (order) { case ExifValue::BYTE_ORDER_MOTOROLA: @@ -38,7 +38,7 @@ void set16Bit (unsigned char *data, ExifValue::ByteOrder order, const Q_UINT16* } } -void get16Bit (const unsigned char *data, ExifValue::ByteOrder order, Q_UINT16* value) +void get16Bit (const unsigned char *data, ExifValue::ByteOrder order, TQ_UINT16* value) { switch (order) { case ExifValue::BYTE_ORDER_MOTOROLA: @@ -50,7 +50,7 @@ void get16Bit (const unsigned char *data, ExifValue::ByteOrder order, Q_UINT16* } } -void get32Bit (const unsigned char *data, ExifValue::ByteOrder order, Q_UINT32* value) +void get32Bit (const unsigned char *data, ExifValue::ByteOrder order, TQ_UINT32* value) { switch (order) { case ExifValue::BYTE_ORDER_MOTOROLA: @@ -61,7 +61,7 @@ void get32Bit (const unsigned char *data, ExifValue::ByteOrder order, Q_UINT32* } } -void set32Bit(unsigned char *data, ExifValue::ByteOrder order, const Q_UINT32* value) +void set32Bit(unsigned char *data, ExifValue::ByteOrder order, const TQ_UINT32* value) { switch (order) { case ExifValue::BYTE_ORDER_MOTOROLA: @@ -79,18 +79,18 @@ void set32Bit(unsigned char *data, ExifValue::ByteOrder order, const Q_UINT32* v } } -void get64Bit (const unsigned char *data, ExifValue::ByteOrder order, Q_UINT64* value) +void get64Bit (const unsigned char *data, ExifValue::ByteOrder order, TQ_UINT64* value) { switch (order) { case ExifValue::BYTE_ORDER_MOTOROLA: - *value = (((Q_UINT64)data[0] << 56) | ((Q_UINT64)data[1] << 48) | ((Q_UINT64)data[2] << 40) | ((Q_UINT64)data[3] << 32) | ((Q_UINT64)data[4] << 24) | ((Q_UINT64)data[5] << 16) | ((Q_UINT64)data[6] << 8) | (Q_UINT64)data[7]); + *value = (((TQ_UINT64)data[0] << 56) | ((TQ_UINT64)data[1] << 48) | ((TQ_UINT64)data[2] << 40) | ((TQ_UINT64)data[3] << 32) | ((TQ_UINT64)data[4] << 24) | ((TQ_UINT64)data[5] << 16) | ((TQ_UINT64)data[6] << 8) | (TQ_UINT64)data[7]); break; case ExifValue::BYTE_ORDER_INTEL: - *value = (((Q_UINT64)data[7] << 56) | ((Q_UINT64)data[6] << 48) | ((Q_UINT64)data[5] << 40) | ((Q_UINT64)data[4] << 32) | ((Q_UINT64)data[3] << 24) | ((Q_UINT64)data[2] << 16) | ((Q_UINT64)data[1] << 8) | (Q_UINT64)data[0]); + *value = (((TQ_UINT64)data[7] << 56) | ((TQ_UINT64)data[6] << 48) | ((TQ_UINT64)data[5] << 40) | ((TQ_UINT64)data[4] << 32) | ((TQ_UINT64)data[3] << 24) | ((TQ_UINT64)data[2] << 16) | ((TQ_UINT64)data[1] << 8) | (TQ_UINT64)data[0]); } } -void set64Bit(unsigned char *data, ExifValue::ByteOrder order, const Q_UINT64* value) +void set64Bit(unsigned char *data, ExifValue::ByteOrder order, const TQ_UINT64* value) { switch (order) { case ExifValue::BYTE_ORDER_MOTOROLA: @@ -132,16 +132,16 @@ void ExifValue::allocData() m_value = new ExifNumber[components()]; } else if ( type() == EXIF_TYPE_ASCII ) { - m_value = new QString(); + m_value = new TQString(); } else if ( type() == EXIF_TYPE_UNDEFINED) { m_value = new UByteArray(); } } -bool ExifValue::load(const QDomElement& elmt) +bool ExifValue::load(const TQDomElement& elmt) { - QString attr; + TQString attr; if( (attr = elmt.attribute("ifd")).isNull() ) return false; m_ifd = attr.toInt(); @@ -157,11 +157,11 @@ bool ExifValue::load(const QDomElement& elmt) case EXIF_TYPE_BYTE: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { - setValue(i, (Q_UINT8)0); + setValue(i, (TQ_UINT8)0); } else { - setValue(i, (Q_UINT8) attr.toUInt()); + setValue(i, (TQ_UINT8) attr.toUInt()); } } break; @@ -171,22 +171,22 @@ bool ExifValue::load(const QDomElement& elmt) case EXIF_TYPE_SHORT: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { - setValue(i, (Q_UINT16)0); + setValue(i, (TQ_UINT16)0); } else { - setValue(i, (Q_UINT16) attr.toUInt()); + setValue(i, (TQ_UINT16) attr.toUInt()); } } break; case EXIF_TYPE_LONG: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { - setValue(i, (Q_UINT32)0); + setValue(i, (TQ_UINT32)0); } else { - setValue(i, (Q_UINT32) attr.toUInt()); + setValue(i, (TQ_UINT32) attr.toUInt()); } } break; @@ -194,17 +194,17 @@ bool ExifValue::load(const QDomElement& elmt) for(uint i = 0; i < components(); i++) { KisExifRational r; - if( (attr = elmt.attribute(QString("numerator%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("numerator%1").tqarg(i) ) ).isNull() ) { - r.numerator = (Q_UINT32)0; + r.numerator = (TQ_UINT32)0; } else { - r.numerator = (Q_UINT32) attr.toUInt(); + r.numerator = (TQ_UINT32) attr.toUInt(); } - if( (attr = elmt.attribute(QString("denominator%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("denominator%1").tqarg(i) ) ).isNull() ) { - r.denominator = (Q_UINT32)0; + r.denominator = (TQ_UINT32)0; } else { - r.denominator = (Q_UINT32) attr.toUInt(); + r.denominator = (TQ_UINT32) attr.toUInt(); } setValue(i, r); } @@ -212,19 +212,19 @@ bool ExifValue::load(const QDomElement& elmt) case EXIF_TYPE_SBYTE: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { - setValue(i, (Q_INT8)0); + setValue(i, (TQ_INT8)0); } else { - setValue(i, (Q_INT8) attr.toInt()); + setValue(i, (TQ_INT8) attr.toInt()); } } break; case EXIF_TYPE_UNDEFINED: { - QString instr = elmt.attribute("value"); - QByteArray out; - QByteArray in = instr.utf8(); + TQString instr = elmt.attribute("value"); + TQByteArray out; + TQByteArray in = instr.utf8(); KCodecs::base64Decode( in, out); out.resize(out.size() - 2 ); setAsUndefined((uchar*)out.data(), out.size() ); @@ -233,22 +233,22 @@ bool ExifValue::load(const QDomElement& elmt) case EXIF_TYPE_SSHORT: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { - setValue(i, (Q_INT16)0); + setValue(i, (TQ_INT16)0); } else { - setValue(i, (Q_INT16) attr.toInt()); + setValue(i, (TQ_INT16) attr.toInt()); } } break; case EXIF_TYPE_SLONG: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { - setValue(i, (Q_INT32)0); + setValue(i, (TQ_INT32)0); } else { - setValue(i, (Q_INT32) attr.toInt()); + setValue(i, (TQ_INT32) attr.toInt()); } } break; @@ -256,17 +256,17 @@ bool ExifValue::load(const QDomElement& elmt) for(uint i = 0; i < components(); i++) { KisExifSRational r; - if( (attr = elmt.attribute(QString("numerator%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("numerator%1").tqarg(i) ) ).isNull() ) { - r.numerator = (Q_INT32)0; + r.numerator = (TQ_INT32)0; } else { - r.numerator = (Q_INT32) attr.toInt(); + r.numerator = (TQ_INT32) attr.toInt(); } - if( (attr = elmt.attribute(QString("denominator%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("denominator%1").tqarg(i) ) ).isNull() ) { - r.denominator = (Q_UINT32)0; + r.denominator = (TQ_UINT32)0; } else { - r.denominator = (Q_UINT32) attr.toInt(); + r.denominator = (TQ_UINT32) attr.toInt(); } setValue(i, r); } @@ -274,7 +274,7 @@ bool ExifValue::load(const QDomElement& elmt) case EXIF_TYPE_FLOAT: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { setValue(i, (float)0); } else { @@ -285,7 +285,7 @@ bool ExifValue::load(const QDomElement& elmt) case EXIF_TYPE_DOUBLE: for(uint i = 0; i < components(); i++) { - if( (attr = elmt.attribute(QString("value%1").arg(i) ) ).isNull() ) + if( (attr = elmt.attribute(TQString("value%1").tqarg(i) ) ).isNull() ) { setValue(i, (double)0); } else { @@ -300,9 +300,9 @@ bool ExifValue::load(const QDomElement& elmt) return true; } -QDomElement ExifValue::save(QDomDocument& doc) +TQDomElement ExifValue::save(TQDomDocument& doc) { - QDomElement elmt = doc.createElement("ExifValue"); + TQDomElement elmt = doc.createElement("ExifValue"); elmt.setAttribute("ifd", ifd()); elmt.setAttribute("components", components() ); elmt.setAttribute("type", type() ); @@ -310,65 +310,65 @@ QDomElement ExifValue::save(QDomDocument& doc) { case EXIF_TYPE_BYTE: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asByte( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asByte( i ) ); break; case EXIF_TYPE_ASCII: elmt.setAttribute("value", asAscii() ); break; case EXIF_TYPE_SHORT: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asShort( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asShort( i ) ); break; case EXIF_TYPE_LONG: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asLong( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asLong( i ) ); break; case EXIF_TYPE_RATIONAL: for(uint i = 0; i < components(); i++) { KisExifRational r = asRational(i); - elmt.setAttribute(QString("numerator%1").arg(i), r.numerator ); - elmt.setAttribute(QString("denominator%1").arg(i), r.denominator ); + elmt.setAttribute(TQString("numerator%1").tqarg(i), r.numerator ); + elmt.setAttribute(TQString("denominator%1").tqarg(i), r.denominator ); } break; case EXIF_TYPE_SBYTE: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asSByte( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asSByte( i ) ); break; case EXIF_TYPE_UNDEFINED: { UByteArray value = asUndefined(); - QByteArray data; + TQByteArray data; data.setRawData((char*)value.data(), value.size()); - QByteArray encodedData; - KCodecs::base64Encode( data, encodedData ); + TQByteArray tqencodedData; + KCodecs::base64Encode( data, tqencodedData ); data.resetRawData( (char*)value.data(), value.size()); - elmt.setAttribute("value", encodedData); + elmt.setAttribute("value", tqencodedData); } break; case EXIF_TYPE_SSHORT: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asSShort( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asSShort( i ) ); break; case EXIF_TYPE_SLONG: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asSLong( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asSLong( i ) ); break; case EXIF_TYPE_SRATIONAL: for(uint i = 0; i < components(); i++) { KisExifSRational r = asSRational(i); - elmt.setAttribute(QString("numerator%1").arg(i), r.numerator ); - elmt.setAttribute(QString("denominator%1").arg(i), r.denominator ); + elmt.setAttribute(TQString("numerator%1").tqarg(i), r.numerator ); + elmt.setAttribute(TQString("denominator%1").tqarg(i), r.denominator ); } break; case EXIF_TYPE_FLOAT: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asFloat( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asFloat( i ) ); break; case EXIF_TYPE_DOUBLE: for(uint i = 0; i < components(); i++) - elmt.setAttribute(QString("value%1").arg(i), asDouble( i ) ); + elmt.setAttribute(TQString("value%1").tqarg(i), asDouble( i ) ); break; case EXIF_TYPE_UNKNOW: break; @@ -435,7 +435,7 @@ void ExifValue::setValue(const unsigned char *data, unsigned int size, ExifValue ExifNumber n; for(uint i = 0; i < components(); i++) { - n.m_sbyte = ((Q_INT8*)data)[i]; + n.m_sbyte = ((TQ_INT8*)data)[i]; setAsExifNumber( i, n); } } @@ -449,7 +449,7 @@ void ExifValue::setValue(const unsigned char *data, unsigned int size, ExifValue ExifNumber n; for(uint i = 0; i < components(); i++) { - get16Bit( data + 2 * i, order, (Q_UINT16*)&n.m_sshort); + get16Bit( data + 2 * i, order, (TQ_UINT16*)&n.m_sshort); setAsExifNumber( i, n); } } @@ -460,7 +460,7 @@ void ExifValue::setValue(const unsigned char *data, unsigned int size, ExifValue ExifNumber n; for(uint i = 0; i < components(); i++) { - get32Bit( data + 4 * i, order, (Q_UINT32*)&n.m_slong); + get32Bit( data + 4 * i, order, (TQ_UINT32*)&n.m_slong); setAsExifNumber( i, n); } } @@ -471,8 +471,8 @@ void ExifValue::setValue(const unsigned char *data, unsigned int size, ExifValue ExifNumber n; for(uint i = 0; i < components(); i++) { - get32Bit( data + 8 * i, order, (Q_UINT32*)&n.m_srational.numerator); - get32Bit( data + 8 * i + 4, order, (Q_UINT32*)&n.m_srational.denominator); + get32Bit( data + 8 * i, order, (TQ_UINT32*)&n.m_srational.numerator); + get32Bit( data + 8 * i + 4, order, (TQ_UINT32*)&n.m_srational.denominator); setAsExifNumber( i, n); } } @@ -483,7 +483,7 @@ void ExifValue::setValue(const unsigned char *data, unsigned int size, ExifValue ExifNumber n; for(uint i = 0; i < components(); i++) { - get32Bit( data + 4 * i, order, (Q_UINT32*)&n.m_float); + get32Bit( data + 4 * i, order, (TQ_UINT32*)&n.m_float); setAsExifNumber( i, n); } } @@ -494,7 +494,7 @@ void ExifValue::setValue(const unsigned char *data, unsigned int size, ExifValue ExifNumber n; for(uint i = 0; i < components(); i++) { - get64Bit( data + 8 * i, order, (Q_UINT64*)&n.m_double); + get64Bit( data + 8 * i, order, (TQ_UINT64*)&n.m_double); setAsExifNumber( i, n); } } @@ -518,7 +518,7 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal return; case EXIF_TYPE_ASCII: { - QString str = asAscii(); + TQString str = asAscii(); *size = str.length(); *data = new uchar[ *size ]; uchar* ptr = *data; @@ -561,7 +561,7 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal *data = new uchar[*size]; for(uint i = 0; i < components(); i++) { - *(((Q_INT8*)*data) + i) = asExifNumber(i).m_sbyte; + *(((TQ_INT8*)*data) + i) = asExifNumber(i).m_sbyte; } return; case EXIF_TYPE_UNDEFINED: @@ -577,7 +577,7 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal *data = new uchar[*size]; for(uint i = 0; i < components(); i++) { - set16Bit( (*data) + 2 * i, order, (Q_UINT16*)&asExifNumber(i).m_sshort); + set16Bit( (*data) + 2 * i, order, (TQ_UINT16*)&asExifNumber(i).m_sshort); } return; case EXIF_TYPE_SLONG: @@ -585,7 +585,7 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal *data = new uchar[*size]; for(uint i = 0; i < components(); i++) { - set32Bit( (*data) + 4 * i, order, (Q_UINT32*)&asExifNumber(i).m_slong); + set32Bit( (*data) + 4 * i, order, (TQ_UINT32*)&asExifNumber(i).m_slong); } return; case EXIF_TYPE_SRATIONAL: @@ -594,8 +594,8 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal for(uint i = 0; i < components(); i++) { ExifNumber n = asExifNumber(i); - set32Bit( (*data) + 4 * i, order, (Q_UINT32*)&asExifNumber(i).m_srational.numerator); - set32Bit( (*data) + 4 * i + 4, order, (Q_UINT32*)&asExifNumber(i).m_srational.denominator); + set32Bit( (*data) + 4 * i, order, (TQ_UINT32*)&asExifNumber(i).m_srational.numerator); + set32Bit( (*data) + 4 * i + 4, order, (TQ_UINT32*)&asExifNumber(i).m_srational.denominator); } return; case EXIF_TYPE_FLOAT: @@ -603,7 +603,7 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal *data = new uchar[*size]; for(uint i = 0; i < components(); i++) { - set32Bit( (*data) + 4 * i, order, (Q_UINT32*)&asExifNumber(i).m_float); + set32Bit( (*data) + 4 * i, order, (TQ_UINT32*)&asExifNumber(i).m_float); } return; case EXIF_TYPE_DOUBLE: @@ -611,7 +611,7 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal *data = new uchar[*size]; for(uint i = 0; i < components(); i++) { - set64Bit( (*data) + 4 * i, order, (Q_UINT64*)&asExifNumber(i).m_double); + set64Bit( (*data) + 4 * i, order, (TQ_UINT64*)&asExifNumber(i).m_double); } return; case EXIF_TYPE_UNKNOW: @@ -619,7 +619,7 @@ void ExifValue::convertToData(unsigned char ** data, unsigned int* size, ExifVal } } -QString ExifValue::toString() +TQString ExifValue::toString() { switch(type()) { @@ -627,17 +627,17 @@ QString ExifValue::toString() return asAscii(); case EXIF_TYPE_UNDEFINED: { - QString undefined = "undefined"; + TQString undefined = "undefined"; UByteArray array = asUndefined(); for(uint i = 0; i < components(); i++) { - undefined += "\\" + QString().setNum( array[i] ); + undefined += "\\" + TQString().setNum( array[i] ); } return undefined; } default: { - QString str = ""; + TQString str = ""; for(uint i = 0; i < components(); i++) { str += toString(i); @@ -647,30 +647,30 @@ QString ExifValue::toString() } } -QString ExifValue::toString(uint i) +TQString ExifValue::toString(uint i) { switch(type()) { case EXIF_TYPE_BYTE: - return QString("%1 ").arg( asExifNumber( i ).m_byte ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_byte ); case EXIF_TYPE_SHORT: - return QString("%1 ").arg( asExifNumber( i ).m_short ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_short ); case EXIF_TYPE_LONG: - return QString("%1 ").arg( asExifNumber( i ).m_long ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_long ); case EXIF_TYPE_RATIONAL: - return QString("%1 / %2 ").arg( asExifNumber( i ).m_rational.numerator ).arg( asExifNumber( i ).m_rational.denominator ); + return TQString("%1 / %2 ").tqarg( asExifNumber( i ).m_rational.numerator ).tqarg( asExifNumber( i ).m_rational.denominator ); case EXIF_TYPE_SBYTE: - return QString("%1 ").arg( asExifNumber( i ).m_sbyte ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_sbyte ); case EXIF_TYPE_SSHORT: - return QString("%1 ").arg( asExifNumber( i ).m_sshort ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_sshort ); case EXIF_TYPE_SLONG: - return QString("%1 ").arg( asExifNumber( i ).m_slong ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_slong ); case EXIF_TYPE_SRATIONAL: - return QString("%1 / %2 ").arg( asExifNumber( i ).m_srational.numerator ).arg( asExifNumber( i ).m_srational.denominator ); + return TQString("%1 / %2 ").tqarg( asExifNumber( i ).m_srational.numerator ).tqarg( asExifNumber( i ).m_srational.denominator ); case EXIF_TYPE_FLOAT: - return QString("%1 ").arg( asExifNumber( i ).m_float ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_float ); case EXIF_TYPE_DOUBLE: - return QString("%1 ").arg( asExifNumber( i ).m_double ); + return TQString("%1 ").tqarg( asExifNumber( i ).m_double ); default: return "unknow "; } diff --git a/krita/core/kis_exif_value.h b/krita/core/kis_exif_value.h index 6e37e0a3..a61e305a 100644 --- a/krita/core/kis_exif_value.h +++ b/krita/core/kis_exif_value.h @@ -20,32 +20,32 @@ #ifndef KIS_EXIF_VALUE_H #define KIS_EXIF_VALUE_H -#include +#include -#include -#include +#include +#include -typedef QMemArray UByteArray; +typedef TQMemArray UByteArray; struct KisExifRational { - Q_UINT32 numerator; - Q_UINT32 denominator; + TQ_UINT32 numerator; + TQ_UINT32 denominator; }; struct KisExifSRational { - Q_INT32 numerator; - Q_INT32 denominator; + TQ_INT32 numerator; + TQ_INT32 denominator; }; class ExifValue { typedef union { - Q_UINT8 m_byte; - Q_UINT16 m_short; - Q_UINT32 m_long; + TQ_UINT8 m_byte; + TQ_UINT16 m_short; + TQ_UINT32 m_long; KisExifRational m_rational; - Q_INT8 m_sbyte; - Q_INT16 m_sshort; - Q_INT32 m_slong; + TQ_INT8 m_sbyte; + TQ_INT16 m_sshort; + TQ_INT32 m_slong; KisExifSRational m_srational; float m_float; double m_double; @@ -73,8 +73,8 @@ class ExifValue { ExifValue() : m_ifd(-1), m_type(EXIF_TYPE_UNKNOW), m_components(0), m_value(0) { } ExifValue(ExifType type, unsigned char *data, unsigned int size, int ifd, uint components, ExifValue::ByteOrder order); - virtual bool load(const QDomElement& elmt); - virtual QDomElement save(QDomDocument& doc); + virtual bool load(const TQDomElement& elmt); + virtual TQDomElement save(TQDomDocument& doc); /** * Return the type of the array @@ -93,23 +93,23 @@ class ExifValue { m_components = size; } } - inline const QString asAscii() { + inline const TQString asAscii() { if(m_type == EXIF_TYPE_ASCII) - return QString(*(QString*) m_value); - return QString(); + return TQString(*(TQString*) m_value); + return TQString(); } inline void setAsAscii(char* data) { if(m_type == EXIF_TYPE_ASCII) { - QString str = QString((char*) data); - *(QString*)m_value = str; + TQString str = TQString((char*) data); + *(TQString*)m_value = str; m_components = str.length(); } } - inline void setAsAscii(QString str) + inline void setAsAscii(TQString str) { - *(QString*)m_value = str; + *(TQString*)m_value = str; m_components = str.length(); } void convertToData(unsigned char ** data, unsigned int* size, ExifValue::ByteOrder order); @@ -125,35 +125,35 @@ class ExifValue { /** * This function return the value of a the ExifValue as a string. */ - QString toString(); + TQString toString(); - inline Q_UINT8 asByte(uint i) + inline TQ_UINT8 asByte(uint i) { if(m_type == EXIF_TYPE_BYTE) return asExifNumber(i).m_byte; return 0; } - inline void setValue(uint i, Q_UINT8 v) + inline void setValue(uint i, TQ_UINT8 v) { ((ExifNumber*)m_value)[i].m_byte = v; } - inline Q_UINT8 asShort(uint i) + inline TQ_UINT8 asShort(uint i) { if(m_type == EXIF_TYPE_SHORT) return asExifNumber(i).m_short; return 0; } - inline void setValue(uint i, Q_UINT16 v) + inline void setValue(uint i, TQ_UINT16 v) { ((ExifNumber*)m_value)[i].m_short = v; } - inline Q_UINT8 asLong(uint i) + inline TQ_UINT8 asLong(uint i) { if(m_type == EXIF_TYPE_LONG) return asExifNumber(i).m_long; return 0; } - inline void setValue(uint i, Q_UINT32 v) + inline void setValue(uint i, TQ_UINT32 v) { ((ExifNumber*)m_value)[i].m_long = v; } @@ -163,7 +163,7 @@ class ExifValue { return asExifNumber(i).m_rational; return KisExifRational(); } - inline void setValue(uint i, Q_UINT32 n, Q_UINT32 d) + inline void setValue(uint i, TQ_UINT32 n, TQ_UINT32 d) { ((ExifNumber*)m_value)[i].m_rational.numerator = n; ((ExifNumber*)m_value)[i].m_rational.denominator = d; @@ -172,33 +172,33 @@ class ExifValue { { ((ExifNumber*)m_value)[i].m_rational = r; } - inline Q_INT8 asSByte(uint i) + inline TQ_INT8 asSByte(uint i) { if(m_type == EXIF_TYPE_SBYTE) return asExifNumber(i).m_sbyte; return 0; } - inline void setValue(uint i, Q_INT8 v) + inline void setValue(uint i, TQ_INT8 v) { ((ExifNumber*)m_value)[i].m_sbyte = v; } - inline Q_INT16 asSShort(uint i) + inline TQ_INT16 asSShort(uint i) { if(m_type == EXIF_TYPE_SSHORT) return asExifNumber(i).m_sshort; return 0; } - inline void setValue(uint i, Q_INT16 v) + inline void setValue(uint i, TQ_INT16 v) { ((ExifNumber*)m_value)[i].m_sshort = v; } - inline Q_INT32 asSLong(uint i) + inline TQ_INT32 asSLong(uint i) { if(m_type == EXIF_TYPE_SLONG) return asExifNumber(i).m_slong; return 0; } - inline void setValue(uint i, Q_INT32 v) + inline void setValue(uint i, TQ_INT32 v) { ((ExifNumber*)m_value)[i].m_slong = v; } @@ -212,7 +212,7 @@ class ExifValue { { ((ExifNumber*)m_value)[i].m_srational = r; } - inline void setValue(uint i, Q_INT32 n, Q_INT32 d) + inline void setValue(uint i, TQ_INT32 n, TQ_INT32 d) { ((ExifNumber*)m_value)[i].m_srational.numerator = n; ((ExifNumber*)m_value)[i].m_srational.denominator = d; @@ -241,7 +241,7 @@ class ExifValue { /** * Return the ith component as a string. */ - QString toString(uint i); + TQString toString(uint i); void setValue(const unsigned char *data, unsigned int size, ExifValue::ByteOrder order); /** * Return the ExifValue as a number. diff --git a/krita/core/kis_fill_painter.cc b/krita/core/kis_fill_painter.cc index 0ccb9e8a..5b8fdcc9 100644 --- a/krita/core/kis_fill_painter.cc +++ b/krita/core/kis_fill_painter.cc @@ -22,19 +22,19 @@ #include #include -#include "qbrush.h" -#include "qfontinfo.h" -#include "qfontmetrics.h" -#include "qpen.h" -#include "qregion.h" -#include "qwmatrix.h" -#include -#include -#include -#include -#include -#include -#include +#include "tqbrush.h" +#include "tqfontinfo.h" +#include "tqfontmetrics.h" +#include "tqpen.h" +#include "tqregion.h" +#include "tqwmatrix.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -82,23 +82,23 @@ KisFillPainter::KisFillPainter(KisPaintDeviceSP device) : super(device) // 'regular' filling // XXX: This also needs renaming, since filling ought to keep the opacity and the composite op in mind, // this is more eraseToColor. -void KisFillPainter::fillRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, const KisColor& kc, Q_UINT8 opacity) +void KisFillPainter::fillRect(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h, const KisColor& kc, TQ_UINT8 opacity) { if (w > 0 && h > 0) { // Make sure we're in the right colorspace KisColor kc2(kc); // get rid of const kc2.convertTo(m_device->colorSpace()); - Q_UINT8 * data = kc2.data(); + TQ_UINT8 * data = kc2.data(); m_device->colorSpace()->setAlpha(data, opacity, 1); m_device->fill(x1, y1, w, h, data); - addDirtyRect(QRect(x1, y1, w, h)); + addDirtyRect(TQRect(x1, y1, w, h)); } } -void KisFillPainter::fillRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, KisPattern * pattern) { +void KisFillPainter::fillRect(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h, KisPattern * pattern) { if (!pattern) return; if (!pattern->valid()) return; if (!m_device) return; @@ -117,7 +117,7 @@ void KisFillPainter::fillRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, KisP } while (y < y1 + h) { - sh = QMIN((y1 + h) - y, pattern->height() - sy); + sh = TQMIN((y1 + h) - y, pattern->height() - sy); int x = x1; @@ -128,7 +128,7 @@ void KisFillPainter::fillRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, KisP } while (x < x1 + w) { - sw = QMIN((x1 + w) - x, pattern->width() - sx); + sw = TQMIN((x1 + w) - x, pattern->width() - sx); bitBlt(x, y, m_compositeOp, patternLayer.data(), m_opacity, sx, sy, sw, sh); x += sw; sx = 0; @@ -137,7 +137,7 @@ void KisFillPainter::fillRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, KisP y+=sh; sy = 0; } - addDirtyRect(QRect(x1, y1, w, h)); + addDirtyRect(TQRect(x1, y1, w, h)); } // flood filling @@ -192,7 +192,7 @@ void KisFillPainter::genericFillEnd(KisPaintDeviceSP filled) { return; } - QRect rc = m_selection->selectedRect(); + TQRect rc = m_selection->selectedRect(); bltSelection(rc.x(), rc.y(), m_compositeOp, filled, m_selection, m_opacity, rc.x(), rc.y(), rc.width(), rc.height()); @@ -203,19 +203,19 @@ void KisFillPainter::genericFillEnd(KisPaintDeviceSP filled) { } struct FillSegment { - FillSegment(int x, int y/*, FillSegment* parent*/) : x(x), y(y)/*, parent(parent)*/ {} + FillSegment(int x, int y/*, FillSegment* tqparent*/) : x(x), y(y)/*, tqparent(tqparent)*/ {} int x; int y; -// FillSegment* parent; +// FillSegment* tqparent; }; -typedef enum { None = 0, Added = 1, Checked = 2 } Status; +typedef enum { None = 0, Added = 1, Checked = 2 } tqStatus; KisSelectionSP KisFillPainter::createFloodSelection(int startX, int startY) { if (m_width < 0 || m_height < 0) { if (m_device->hasSelection() && m_careForSelection) { - QRect rc = m_device->selection()->selectedRect(); + TQRect rc = m_device->selection()->selectedRect(); m_width = rc.width() - (startX - rc.x()); m_height = rc.height() - (startY - rc.y()); @@ -251,7 +251,7 @@ KisSelectionSP KisFillPainter::createFloodSelection(int startX, int startY) { KisColorSpace * colorSpace = selection->colorSpace(); KisColorSpace * devColorSpace = sourceDevice->colorSpace(); - Q_UINT8* source = new Q_UINT8[sourceDevice->pixelSize()]; + TQ_UINT8* source = new TQ_UINT8[sourceDevice->pixelSize()]; KisHLineIteratorPixel pixelIt = sourceDevice->createHLineIterator(startX, startY, startX+1, false); memcpy(source, pixelIt.rawData(), sourceDevice->pixelSize()); @@ -260,9 +260,9 @@ KisSelectionSP KisFillPainter::createFloodSelection(int startX, int startY) { stack.push(new FillSegment(startX, startY/*, 0*/)); - Status* map = new Status[m_size]; + tqStatus* map = new tqStatus[m_size]; - memset(map, None, m_size * sizeof(Status)); + memset(map, None, m_size * sizeof(tqStatus)); int progressPercent = 0; int pixelsDone = 0; int currentPercent = 0; emit notifyProgressStage(i18n("Making fill outline..."), 0); @@ -288,7 +288,7 @@ KisSelectionSP KisFillPainter::createFloodSelection(int startX, int startY) { it is needed to start the iterator at the first position, and then skip to (x,y). */ pixelIt = sourceDevice->createHLineIterator(0, y, m_width, false); pixelIt += x; - Q_UINT8 diff = devColorSpace->difference(source, pixelIt.rawData()); + TQ_UINT8 diff = devColorSpace->difference(source, pixelIt.rawData()); if (diff >= m_threshold || (hasSelection && srcSel->selected(pixelIt.x(), pixelIt.y()) == MIN_SELECTED)) { @@ -300,9 +300,9 @@ KisSelectionSP KisFillPainter::createFloodSelection(int startX, int startY) { KisHLineIteratorPixel selIt = selection->createHLineIterator(0, y, m_width, true); selIt += x; if (m_fuzzy) - colorSpace->fromQColor(Qt::white, MAX_SELECTED - diff, selIt.rawData()); + colorSpace->fromTQColor(TQt::white, MAX_SELECTED - diff, selIt.rawData()); else - colorSpace->fromQColor(Qt::white, MAX_SELECTED, selIt.rawData()); + colorSpace->fromTQColor(TQt::white, MAX_SELECTED, selIt.rawData()); if (y > 0 && (map[m_width * (y - 1) + x] == None)) { map[m_width * (y - 1) + x] = Added; @@ -332,9 +332,9 @@ KisSelectionSP KisFillPainter::createFloodSelection(int startX, int startY) { } if (m_fuzzy) - colorSpace->fromQColor(Qt::white, MAX_SELECTED - diff, selIt.rawData()); + colorSpace->fromTQColor(TQt::white, MAX_SELECTED - diff, selIt.rawData()); else - colorSpace->fromQColor(Qt::white, MAX_SELECTED, selIt.rawData()); + colorSpace->fromTQColor(TQt::white, MAX_SELECTED, selIt.rawData()); if (y > 0 && (map[m_width * (y - 1) + x] == None)) { map[m_width * (y - 1) + x] = Added; @@ -372,9 +372,9 @@ KisSelectionSP KisFillPainter::createFloodSelection(int startX, int startY) { } if (m_fuzzy) - colorSpace->fromQColor(Qt::white, MAX_SELECTED - diff, selIt.rawData()); + colorSpace->fromTQColor(TQt::white, MAX_SELECTED - diff, selIt.rawData()); else - colorSpace->fromQColor(Qt::white, MAX_SELECTED, selIt.rawData()); + colorSpace->fromTQColor(TQt::white, MAX_SELECTED, selIt.rawData()); if (y > 0 && (map[m_width * (y - 1) + x] == None)) { map[m_width * (y - 1) + x] = Added; diff --git a/krita/core/kis_fill_painter.h b/krita/core/kis_fill_painter.h index 63591350..da244a67 100644 --- a/krita/core/kis_fill_painter.h +++ b/krita/core/kis_fill_painter.h @@ -19,7 +19,7 @@ #ifndef KIS_FILL_PAINTER_H_ #define KIS_FILL_PAINTER_H_ -#include +#include #include "kis_meta_registry.h" #include "kis_color.h" @@ -55,39 +55,39 @@ public: /** * Fill a rectangle with black transparent pixels (0, 0, 0, 0 for RGBA). */ - void eraseRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h); + void eraseRect(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h); /** * Overloaded version of the above function. */ - void eraseRect(const QRect& rc); + void eraseRect(const TQRect& rc); /** * Fill a rectangle with a certain color. */ - void fillRect(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const KisColor& c); + void fillRect(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const KisColor& c); /** * Overloaded version of the above function. */ - void fillRect(const QRect& rc, const KisColor& c); + void fillRect(const TQRect& rc, const KisColor& c); /** * Fill a rectangle with a certain color and opacity. */ - void fillRect(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const KisColor& c, Q_UINT8 opacity); + void fillRect(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const KisColor& c, TQ_UINT8 opacity); /** * Overloaded version of the above function. */ - void fillRect(const QRect& rc, const KisColor& c, Q_UINT8 opacity); + void fillRect(const TQRect& rc, const KisColor& c, TQ_UINT8 opacity); /** * Fill a rectangle with a certain pattern. The pattern is repeated if it does not fit the * entire rectangle. */ - void fillRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, KisPattern * pattern); + void fillRect(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h, KisPattern * pattern); /** * Overloaded version of the above function. */ - void fillRect(const QRect& rc, KisPattern * pattern); + void fillRect(const TQRect& rc, KisPattern * pattern); /** * Fills the enclosed area around the point with the set color. If there is a @@ -102,7 +102,7 @@ public: void fillPattern(int startX, int startY); /** - * Returns a selection mask for the floodfill starting at the specified position. + * Returns a selection tqmask for the floodfill starting at the specified position. **/ KisSelectionSP createFloodSelection(int startX, int startY); @@ -150,7 +150,7 @@ private: int m_threshold; int m_size; int m_width, m_height; - QRect m_rect; + TQRect m_rect; bool m_sampleMerged; bool m_careForSelection; bool m_fuzzy; @@ -158,41 +158,41 @@ private: inline -void KisFillPainter::fillRect(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const KisColor& c) +void KisFillPainter::fillRect(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const KisColor& c) { fillRect(x, y, w, h, c, OPACITY_OPAQUE); } inline -void KisFillPainter::fillRect(const QRect& rc, const KisColor& c) +void KisFillPainter::fillRect(const TQRect& rc, const KisColor& c) { fillRect(rc.x(), rc.y(), rc.width(), rc.height(), c, OPACITY_OPAQUE); } inline -void KisFillPainter::eraseRect(Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h) +void KisFillPainter::eraseRect(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h) { KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - KisColor c(Qt::black, cs); + KisColor c(TQt::black, cs); fillRect(x1, y1, w, h, c, OPACITY_TRANSPARENT); } inline -void KisFillPainter::eraseRect(const QRect& rc) +void KisFillPainter::eraseRect(const TQRect& rc) { KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - KisColor c(Qt::black, cs); + KisColor c(TQt::black, cs); fillRect(rc.x(), rc.y(), rc.width(), rc.height(), c, OPACITY_TRANSPARENT); } inline -void KisFillPainter::fillRect(const QRect& rc, const KisColor& c, Q_UINT8 opacity) +void KisFillPainter::fillRect(const TQRect& rc, const KisColor& c, TQ_UINT8 opacity) { fillRect(rc.x(), rc.y(), rc.width(), rc.height(), c, opacity); } inline -void KisFillPainter::fillRect(const QRect& rc, KisPattern *pattern) +void KisFillPainter::fillRect(const TQRect& rc, KisPattern *pattern) { fillRect(rc.x(), rc.y(), rc.width(), rc.height(), pattern); } diff --git a/krita/core/kis_filter.cc b/krita/core/kis_filter.cc index 05e1a92d..ee396596 100644 --- a/krita/core/kis_filter.cc +++ b/krita/core/kis_filter.cc @@ -17,12 +17,12 @@ */ #include "kis_filter.h" -#include +#include #include "kis_types.h" #include "kis_filter_configuration.h" -KisFilter::KisFilter(const KisID& id, const QString & category, const QString & entry) +KisFilter::KisFilter(const KisID& id, const TQString & category, const TQString & entry) : KisProgressSubject(0, id.id().latin1()) , m_id(id) , m_progressDisplay(0) @@ -31,7 +31,7 @@ KisFilter::KisFilter(const KisID& id, const QString & category, const QString & { } -KisFilterConfiguration * KisFilter::configuration(QWidget*) +KisFilterConfiguration * KisFilter::configuration(TQWidget*) { return new KisFilterConfiguration(m_id.id(), 0); } @@ -41,7 +41,7 @@ KisFilterConfiguration * KisFilter::configuration() return new KisFilterConfiguration(m_id.id(), 0); } -KisFilterConfigWidget * KisFilter::createConfigurationWidget(QWidget *, KisPaintDeviceSP) +KisFilterConfigWidget * KisFilter::createConfigurationWidget(TQWidget *, KisPaintDeviceSP) { return 0; } @@ -63,7 +63,7 @@ void KisFilter::disableProgress() { m_progressDisplay = 0; } -void KisFilter::setProgressTotalSteps(Q_INT32 totalSteps) +void KisFilter::setProgressTotalSteps(TQ_INT32 totalSteps) { if (m_progressEnabled) { @@ -74,10 +74,10 @@ void KisFilter::setProgressTotalSteps(Q_INT32 totalSteps) } } -void KisFilter::setProgress(Q_INT32 progress) +void KisFilter::setProgress(TQ_INT32 progress) { if (m_progressEnabled) { - Q_INT32 progressPerCent = (progress * 100) / m_progressTotalSteps; + TQ_INT32 progressPerCent = (progress * 100) / m_progressTotalSteps; m_progressSteps = progress; if (progressPerCent != m_lastProgressPerCent) { @@ -94,11 +94,11 @@ void KisFilter::incProgress() } -void KisFilter::setProgressStage(const QString& stage, Q_INT32 progress) +void KisFilter::setProgressStage(const TQString& stage, TQ_INT32 progress) { if (m_progressEnabled) { - Q_INT32 progressPerCent = (progress * 100) / m_progressTotalSteps; + TQ_INT32 progressPerCent = (progress * 100) / m_progressTotalSteps; m_lastProgressPerCent = progressPerCent; emit notifyProgressStage(stage, progressPerCent); @@ -121,7 +121,7 @@ void KisFilter::setAutoUpdate(bool set) { m_autoUpdate = set; } -QRect KisFilter::enlargeRect(QRect rect, KisFilterConfiguration* c) const { +TQRect KisFilter::enlargeRect(TQRect rect, KisFilterConfiguration* c) const { int margin = overlapMarginNeeded(c); rect.rLeft() -= margin; rect.rTop() -= margin; diff --git a/krita/core/kis_filter.h b/krita/core/kis_filter.h index dd0f5186..c54b4041 100644 --- a/krita/core/kis_filter.h +++ b/krita/core/kis_filter.h @@ -20,7 +20,7 @@ #include -#include +#include #include #include @@ -38,33 +38,34 @@ class KisColorSpace; class KisPreviewDialog; class KisProgressDisplayInterface; class KisFilterConfigWidget; -class QWidget; +class TQWidget; /** * Basic interface of a Krita filter. */ class KRITACORE_EXPORT KisFilter : public KisProgressSubject, public KShared { Q_OBJECT + TQ_OBJECT public: /** * Construct a Krita filter */ - KisFilter(const KisID& id, const QString & category, const QString & entry); + KisFilter(const KisID& id, const TQString & category, const TQString & entry); virtual ~KisFilter() {} public: virtual void setProgressDisplay(KisProgressDisplayInterface * progressDisplay); - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&) = 0; + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&) = 0; public: /** * @return a new configuration derived from the widget. If the widget is NULL or not the correct type, * a default configuration object will be returned */ - virtual KisFilterConfiguration * configuration(QWidget*); + virtual KisFilterConfiguration * configuration(TQWidget*); /** * @return a default configuration object @@ -118,7 +119,7 @@ public: * might be bigger. Use this function to detirmine that rect. * The default implementation makes a guess using overlapMarginNeeded. */ - virtual QRect enlargeRect(QRect rect, KisFilterConfiguration* = 0) const; + virtual TQRect enlargeRect(TQRect rect, KisFilterConfiguration* = 0) const; /** * Determine the colorspace independence of this filter. @@ -149,20 +150,20 @@ public: inline const KisID id() const { return m_id; }; // Which submenu in the filters menu does filter want to go? - inline QString menuCategory() const { return m_category; }; + inline TQString menuCategory() const { return m_category; }; // The i18n'ed string this filter wants to show itself in the menu - inline QString menuEntry() const { return m_entry; }; + inline TQString menuEntry() const { return m_entry; }; /** * Create the configuration widget for this filter. * - * @param parent the Qt owner widget of this widget + * @param tqparent the TQt owner widget of this widget * @param dev the paintdevice this filter will act on     * @return NULL if the filter does not use user-settable configuration settings.     *         else return a pointer to the new configuration widget */ - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget * parent, KisPaintDeviceSP dev); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget * tqparent, KisPaintDeviceSP dev); virtual void cancel() { m_cancelRequested = true; } @@ -173,26 +174,26 @@ public: protected slots: // Convenience functions for progress display. - void setProgressTotalSteps(Q_INT32 totalSteps); - void setProgress(Q_INT32 progress); + void setProgressTotalSteps(TQ_INT32 totalSteps); + void setProgress(TQ_INT32 progress); void incProgress(); - void setProgressStage(const QString& stage, Q_INT32 progress); + void setProgressStage(const TQString& stage, TQ_INT32 progress); void setProgressDone(); - inline Q_INT32 progress() { return m_progressSteps; } + inline TQ_INT32 progress() { return m_progressSteps; } private: bool m_cancelRequested; bool m_progressEnabled; bool m_autoUpdate; protected: - Q_INT32 m_progressTotalSteps; - Q_INT32 m_lastProgressPerCent; - Q_INT32 m_progressSteps; + TQ_INT32 m_progressTotalSteps; + TQ_INT32 m_lastProgressPerCent; + TQ_INT32 m_progressSteps; KisID m_id; KisProgressDisplayInterface * m_progressDisplay; - QString m_category; // The category in the filter menu this filter fits - QString m_entry; // the i18n'ed accelerated menu text + TQString m_category; // The category in the filter menu this filter fits + TQString m_entry; // the i18n'ed accelerated menu text }; diff --git a/krita/core/kis_filter_config_widget.cc b/krita/core/kis_filter_config_widget.cc index e694189d..df7c13d5 100644 --- a/krita/core/kis_filter_config_widget.cc +++ b/krita/core/kis_filter_config_widget.cc @@ -19,8 +19,8 @@ #include "kis_filter_config_widget.h" -KisFilterConfigWidget::KisFilterConfigWidget(QWidget * parent, const char * name, WFlags f) - : QWidget(parent, name, f) +KisFilterConfigWidget::KisFilterConfigWidget(TQWidget * tqparent, const char * name, WFlags f) + : TQWidget(tqparent, name, f) { } diff --git a/krita/core/kis_filter_config_widget.h b/krita/core/kis_filter_config_widget.h index 4d93f60b..ddb600ab 100644 --- a/krita/core/kis_filter_config_widget.h +++ b/krita/core/kis_filter_config_widget.h @@ -18,7 +18,7 @@ #ifndef _KIS_FILTER_CONFIG_WIDGET_H_ #define _KIS_FILTER_CONFIG_WIDGET_H_ -#include +#include #include "kis_filter_configuration.h" /** @@ -26,13 +26,14 @@ * inherit this class. The configuration widget can emit sigPleaseUpdatePreview * when it wants the preview in the filter dialog to be updated. */ -class KisFilterConfigWidget : public QWidget { +class KisFilterConfigWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KisFilterConfigWidget(QWidget * parent, const char * name = 0, WFlags f = 0 ); + KisFilterConfigWidget(TQWidget * tqparent, const char * name = 0, WFlags f = 0 ); virtual ~KisFilterConfigWidget(); virtual void setConfiguration(KisFilterConfiguration * config) = 0; diff --git a/krita/core/kis_filter_configuration.cc b/krita/core/kis_filter_configuration.cc index 999edc5c..b25dcb24 100644 --- a/krita/core/kis_filter_configuration.cc +++ b/krita/core/kis_filter_configuration.cc @@ -18,8 +18,8 @@ #include "kis_filter.h" #include -#include -#include +#include +#include #include "kis_filter_registry.h" #include "kis_transaction.h" @@ -40,24 +40,24 @@ KisFilterConfiguration::KisFilterConfiguration(const KisFilterConfiguration & rh m_properties = rhs.m_properties; } -void KisFilterConfiguration::fromXML(const QString & s ) +void KisFilterConfiguration::fromXML(const TQString & s ) { m_properties.clear(); - QDomDocument doc; + TQDomDocument doc; doc.setContent( s ); - QDomElement e = doc.documentElement(); - QDomNode n = e.firstChild(); + TQDomElement e = doc.documentElement(); + TQDomNode n = e.firstChild(); m_name = e.attribute("name"); m_version = e.attribute("version").toInt(); while (!n.isNull()) { // We don't nest elements in filter configuration. For now... - QDomElement e = n.toElement(); - QString name; - QString type; - QString value; + TQDomElement e = n.toElement(); + TQString name; + TQString type; + TQString value; if (!e.isNull()) { if (e.tagName() == "property") { @@ -65,7 +65,7 @@ void KisFilterConfiguration::fromXML(const QString & s ) type = e.attribute("type"); value = e.text(); // XXX Convert the variant pro-actively to the right type? - m_properties[name] = QVariant(value); + m_properties[name] = TQVariant(value); } } n = n.nextSibling(); @@ -73,23 +73,23 @@ void KisFilterConfiguration::fromXML(const QString & s ) //dump(); } -QString KisFilterConfiguration::toString() +TQString KisFilterConfiguration::toString() { - QDomDocument doc = QDomDocument("filterconfig"); - QDomElement root = doc.createElement( "filterconfig" ); + TQDomDocument doc = TQDomDocument("filterconfig"); + TQDomElement root = doc.createElement( "filterconfig" ); root.setAttribute( "name", m_name ); root.setAttribute( "version", m_version ); doc.appendChild( root ); - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) { - QDomElement e = doc.createElement( "property" ); + TQDomElement e = doc.createElement( "property" ); e.setAttribute( "name", it.key().latin1() ); - QVariant v = it.data(); + TQVariant v = it.data(); e.setAttribute( "type", v.typeName() ); - QString s = v.asString(); - QDomText text = doc.createCDATASection(v.asString() ); // XXX: Unittest this! + TQString s = v.asString(); + TQDomText text = doc.createCDATASection(v.asString() ); // XXX: Unittest this! e.appendChild(text); root.appendChild(e); } @@ -97,19 +97,19 @@ QString KisFilterConfiguration::toString() return doc.toString(); } -const QString & KisFilterConfiguration::name() const +const TQString & KisFilterConfiguration::name() const { return m_name; } -Q_INT32 KisFilterConfiguration::version() const +TQ_INT32 KisFilterConfiguration::version() const { return m_version; } -void KisFilterConfiguration::setProperty(const QString & name, const QVariant & value) +void KisFilterConfiguration::setProperty(const TQString & name, const TQVariant & value) { - if ( m_properties.find( name ) == m_properties.end() ) { + if ( m_properties.tqfind( name ) == m_properties.end() ) { m_properties.insert( name, value ); } else { @@ -117,9 +117,9 @@ void KisFilterConfiguration::setProperty(const QString & name, const QVariant & } } -bool KisFilterConfiguration::getProperty(const QString & name, QVariant & value) +bool KisFilterConfiguration::getProperty(const TQString & name, TQVariant & value) { - if ( m_properties.find( name ) == m_properties.end() ) { + if ( m_properties.tqfind( name ) == m_properties.end() ) { return false; } else { @@ -128,10 +128,10 @@ bool KisFilterConfiguration::getProperty(const QString & name, QVariant & value) } } -QVariant KisFilterConfiguration::getProperty(const QString & name) +TQVariant KisFilterConfiguration::getProperty(const TQString & name) { - if ( m_properties.find( name ) == m_properties.end() ) { - return QVariant(); + if ( m_properties.tqfind( name ) == m_properties.end() ) { + return TQVariant(); } else { return m_properties[name]; @@ -139,9 +139,9 @@ QVariant KisFilterConfiguration::getProperty(const QString & name) } -int KisFilterConfiguration::getInt(const QString & name, int def) +int KisFilterConfiguration::getInt(const TQString & name, int def) { - QVariant v = getProperty(name); + TQVariant v = getProperty(name); if (v.isValid()) return v.asInt(); else @@ -149,27 +149,27 @@ int KisFilterConfiguration::getInt(const QString & name, int def) } -double KisFilterConfiguration::getDouble(const QString & name, double def) +double KisFilterConfiguration::getDouble(const TQString & name, double def) { - QVariant v = getProperty(name); + TQVariant v = getProperty(name); if (v.isValid()) return v.asDouble(); else return def; } -bool KisFilterConfiguration::getBool(const QString & name, bool def) +bool KisFilterConfiguration::getBool(const TQString & name, bool def) { - QVariant v = getProperty(name); + TQVariant v = getProperty(name); if (v.isValid()) return v.asBool(); else return def; } -QString KisFilterConfiguration::getString(const QString & name, QString def) +TQString KisFilterConfiguration::getString(const TQString & name, TQString def) { - QVariant v = getProperty(name); + TQVariant v = getProperty(name); if (v.isValid()) return v.asString(); else @@ -178,7 +178,7 @@ QString KisFilterConfiguration::getString(const QString & name, QString def) void KisFilterConfiguration::dump() { - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) { } diff --git a/krita/core/kis_filter_configuration.h b/krita/core/kis_filter_configuration.h index 10f9a6f4..8361861a 100644 --- a/krita/core/kis_filter_configuration.h +++ b/krita/core/kis_filter_configuration.h @@ -18,16 +18,16 @@ #ifndef _KIS_FILTER_CONFIGURATION_H_ #define _KIS_FILTER_CONFIGURATION_H_ -#include -#include -#include +#include +#include +#include #include #include "koffice_export.h" class KisPreviewDialog; class KisProgressDisplayInterface; class KisFilterConfigWidget; -class QWidget; +class TQWidget; /** * A KisFilterConfiguration is the serializable representation of @@ -42,7 +42,7 @@ public: /** * Create a new filter config. */ - KisFilterConfiguration(const QString & name, Q_INT32 version) + KisFilterConfiguration(const TQString & name, TQ_INT32 version) : m_name(name) , m_version(version) {} @@ -56,49 +56,49 @@ public: /** * Fill the filter configuration object from the XML encoded representation in s. */ - virtual void fromXML(const QString &); + virtual void fromXML(const TQString &); /** * Create a serialized version of this filter config */ - virtual QString toString(); + virtual TQString toString(); /** * Get the unique, language independent name of the filter. */ - const QString & name() const; + const TQString & name() const; /** * Get the version of the filter that has created this config */ - Q_INT32 version() const; + TQ_INT32 version() const; /** * Set the property with name to value. */ - virtual void setProperty(const QString & name, const QVariant & value); + virtual void setProperty(const TQString & name, const TQVariant & value); /** * Set value to the value associated with property name * @return false if the specified property did not exist. */ - virtual bool getProperty(const QString & name, QVariant & value); + virtual bool getProperty(const TQString & name, TQVariant & value); - virtual QVariant getProperty(const QString & name); + virtual TQVariant getProperty(const TQString & name); - int getInt(const QString & name, int def = 0); - double getDouble(const QString & name, double def = 0.0); - bool getBool(const QString & name, bool def = false); - QString getString(const QString & name, QString def = QString::null); + int getInt(const TQString & name, int def = 0); + double getDouble(const TQString & name, double def = 0.0); + bool getBool(const TQString & name, bool def = false); + TQString getString(const TQString & name, TQString def = TQString()); private: void dump(); protected: - QString m_name; - Q_INT32 m_version; - QMap m_properties; + TQString m_name; + TQ_INT32 m_version; + TQMap m_properties; }; diff --git a/krita/core/kis_filter_registry.cc b/krita/core/kis_filter_registry.cc index 1b453878..43d745f4 100644 --- a/krita/core/kis_filter_registry.cc +++ b/krita/core/kis_filter_registry.cc @@ -16,8 +16,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -40,8 +40,8 @@ KisFilterRegistry::KisFilterRegistry() Q_ASSERT(KisFilterRegistry::m_singleton == 0); KisFilterRegistry::m_singleton = this; - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/Filter"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/Filter"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); KTrader::OfferList::ConstIterator iter; @@ -51,7 +51,7 @@ KisFilterRegistry::KisFilterRegistry() KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService ( service, this, 0, TQStringList(), &errCode); if ( plugin ) kdDebug(DBG_AREA_PLUGINS) << "found plugin " << service->property("Name").toString() << "\n"; else { diff --git a/krita/core/kis_filter_registry.h b/krita/core/kis_filter_registry.h index 89cf1341..9ad9901d 100644 --- a/krita/core/kis_filter_registry.h +++ b/krita/core/kis_filter_registry.h @@ -20,20 +20,21 @@ #ifndef KIS_FILTER_REGISTRY_H_ #define KIS_FILTER_REGISTRY_H_ -#include +#include #include "kis_types.h" #include "kis_generic_registry.h" #include -class QString; -class QStringList; +class TQString; +class TQStringList; -class KRITACORE_EXPORT KisFilterRegistry : public QObject, public KisGenericRegistry +class KRITACORE_EXPORT KisFilterRegistry : public TQObject, public KisGenericRegistry { Q_OBJECT + TQ_OBJECT public: virtual ~KisFilterRegistry(); diff --git a/krita/core/kis_filter_strategy.cc b/krita/core/kis_filter_strategy.cc index 78dbcd41..f82e6cb5 100644 --- a/krita/core/kis_filter_strategy.cc +++ b/krita/core/kis_filter_strategy.cc @@ -29,7 +29,7 @@ double KisHermiteFilterStrategy::valueAt(double t) const { return(0.0); } -Q_UINT32 KisHermiteFilterStrategy::intValueAt(Q_INT32 t) const { +TQ_UINT32 KisHermiteFilterStrategy::intValueAt(TQ_INT32 t) const { /* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */ if(t < 0) t = -t; if(t < 256) @@ -61,7 +61,7 @@ double KisCubicFilterStrategy::valueAt(double x) const { return(0.0); } -Q_UINT32 KisCubicFilterStrategy::intValueAt(Q_INT32 x) const { +TQ_UINT32 KisCubicFilterStrategy::intValueAt(TQ_INT32 x) const { if (x < 2) return 0; if (x < -1) @@ -80,7 +80,7 @@ double KisBoxFilterStrategy::valueAt(double t) const { return(0.0); } -Q_UINT32 KisBoxFilterStrategy::intValueAt(Q_INT32 t) const { +TQ_UINT32 KisBoxFilterStrategy::intValueAt(TQ_INT32 t) const { /* f(t) = 1, -0.5 < t <= 0.5 */ if((t > -128) && (t <= 128)) return 255; @@ -93,7 +93,7 @@ double KisTriangleFilterStrategy::valueAt(double t) const { return(0.0); } -Q_UINT32 KisTriangleFilterStrategy::intValueAt(Q_INT32 t) const { +TQ_UINT32 KisTriangleFilterStrategy::intValueAt(TQ_INT32 t) const { /* f(t) = |t|, -1 <= t <= 1 */ if(t < 0) t = -t; if(t < 256) diff --git a/krita/core/kis_filter_strategy.h b/krita/core/kis_filter_strategy.h index 91385239..55ef3d06 100644 --- a/krita/core/kis_filter_strategy.h +++ b/krita/core/kis_filter_strategy.h @@ -34,13 +34,13 @@ class KisFilterStrategy KisID id() {return m_id;}; virtual double valueAt(double /*t*/) const {return 0;}; - virtual Q_UINT32 intValueAt(Q_INT32 t) const {return Q_UINT32(255*valueAt(t/256.0));}; + virtual TQ_UINT32 intValueAt(TQ_INT32 t) const {return TQ_UINT32(255*valueAt(t/256.0));}; double support() { return supportVal;}; - Q_UINT32 intSupport() { return intSupportVal;}; + TQ_UINT32 intSupport() { return intSupportVal;}; virtual bool boxSpecial() { return false;}; protected: double supportVal; - Q_UINT32 intSupportVal; + TQ_UINT32 intSupportVal; KisID m_id; }; @@ -51,7 +51,7 @@ class KisHermiteFilterStrategy : public KisFilterStrategy {supportVal = 1.0; intSupportVal = 256;} virtual ~KisHermiteFilterStrategy() {} - virtual Q_UINT32 intValueAt(Q_INT32 t) const; + virtual TQ_UINT32 intValueAt(TQ_INT32 t) const; virtual double valueAt(double t) const; }; @@ -62,7 +62,7 @@ class KisCubicFilterStrategy : public KisFilterStrategy {supportVal = 1.0; intSupportVal = 256;} virtual ~KisCubicFilterStrategy() {} - virtual Q_UINT32 intValueAt(Q_INT32 t) const; + virtual TQ_UINT32 intValueAt(TQ_INT32 t) const; virtual double valueAt(double t) const; }; @@ -73,7 +73,7 @@ class KisBoxFilterStrategy : public KisFilterStrategy {supportVal = 0.5; intSupportVal = 128;} virtual ~KisBoxFilterStrategy() {} - virtual Q_UINT32 intValueAt(Q_INT32 t) const; + virtual TQ_UINT32 intValueAt(TQ_INT32 t) const; virtual double valueAt(double t) const; virtual bool boxSpecial() { return true;}; }; @@ -85,7 +85,7 @@ class KisTriangleFilterStrategy : public KisFilterStrategy {supportVal = 1.0; intSupportVal = 256;} virtual ~KisTriangleFilterStrategy() {} - virtual Q_UINT32 intValueAt(Q_INT32 t) const; + virtual TQ_UINT32 intValueAt(TQ_INT32 t) const; virtual double valueAt(double t) const; }; diff --git a/krita/core/kis_gradient.cc b/krita/core/kis_gradient.cc index 33714461..efc370bb 100644 --- a/krita/core/kis_gradient.cc +++ b/krita/core/kis_gradient.cc @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -50,7 +50,7 @@ KisGradientSegment::SineInterpolationStrategy *KisGradientSegment::SineInterpola KisGradientSegment::SphereIncreasingInterpolationStrategy *KisGradientSegment::SphereIncreasingInterpolationStrategy::m_instance = 0; KisGradientSegment::SphereDecreasingInterpolationStrategy *KisGradientSegment::SphereDecreasingInterpolationStrategy::m_instance = 0; -KisGradient::KisGradient(const QString& file) : super(file) +KisGradient::KisGradient(const TQString& file) : super(file) { } @@ -72,7 +72,7 @@ bool KisGradient::save() return false; } -QImage KisGradient::img() +TQImage KisGradient::img() { return m_img; } @@ -132,7 +132,7 @@ bool KisGradient::init() } } -void KisGradient::setImage(const QImage& img) +void KisGradient::setImage(const TQImage& img) { m_img = img; m_img.detach(); @@ -145,7 +145,7 @@ KisGradientSegment *KisGradient::segmentAt(double t) const Q_ASSERT(t >= 0 || t <= 1); Q_ASSERT(!m_segments.empty()); - for(QValueVector::const_iterator it = m_segments.begin(); it!= m_segments.end(); ++it) + for(TQValueVector::const_iterator it = m_segments.begin(); it!= m_segments.end(); ++it) { if (t > (*it)->startOffset() - DBL_EPSILON && t < (*it)->endOffset() + DBL_EPSILON) { return *it; @@ -155,7 +155,7 @@ KisGradientSegment *KisGradient::segmentAt(double t) const return 0; } -void KisGradient::colorAt(double t, QColor *color, Q_UINT8 *opacity) const +void KisGradient::colorAt(double t, TQColor *color, TQ_UINT8 *opacity) const { const KisGradientSegment *segment = segmentAt(t); Q_ASSERT(segment != 0); @@ -163,13 +163,13 @@ void KisGradient::colorAt(double t, QColor *color, Q_UINT8 *opacity) const if (segment) { Color col = segment->colorAt(t); *color = col.color(); - *opacity = static_cast(col.alpha() * OPACITY_OPAQUE + 0.5); + *opacity = static_cast(col.alpha() * OPACITY_OPAQUE + 0.5); } } -QImage KisGradient::generatePreview(int width, int height) const +TQImage KisGradient::generatePreview(int width, int height) const { - QImage img(width, height, 32); + TQImage img(width, height, 32); for (int y = 0; y < img.height(); y++) { for (int x = 0; x < img.width(); x++) { @@ -178,8 +178,8 @@ QImage KisGradient::generatePreview(int width, int height) const int backgroundGreen = backgroundRed; int backgroundBlue = backgroundRed; - QColor color; - Q_UINT8 opacity; + TQColor color; + TQ_UINT8 opacity; double t = static_cast(x) / (img.width() - 1); colorAt(t, &color, &opacity); @@ -190,7 +190,7 @@ QImage KisGradient::generatePreview(int width, int height) const int green = static_cast((1 - alpha) * backgroundGreen + alpha * color.green() + 0.5); int blue = static_cast((1 - alpha) * backgroundBlue + alpha * color.blue() + 0.5); - img.setPixel(x, y, qRgb(red, green, blue)); + img.setPixel(x, y, tqRgb(red, green, blue)); } } @@ -435,7 +435,7 @@ Color KisGradientSegment::RGBColorInterpolationStrategy::colorAt(double t, Color int blue = static_cast(startBlue + t * (end.color().blue() - startBlue) + 0.5); double alpha = startAlpha + t * (end.alpha() - startAlpha); - return Color(QColor(red, green, blue), alpha); + return Color(TQColor(red, green, blue), alpha); } KisGradientSegment::HSVCWColorInterpolationStrategy *KisGradientSegment::HSVCWColorInterpolationStrategy::instance() diff --git a/krita/core/kis_gradient.h b/krita/core/kis_gradient.h index 3610e0e0..50bc0fd8 100644 --- a/krita/core/kis_gradient.h +++ b/krita/core/kis_gradient.h @@ -24,15 +24,15 @@ #ifndef KIS_GRADIENT_H #define KIS_GRADIENT_H -#include -#include +#include +#include #include #include "kis_resource.h" #include "kis_global.h" -class QImage; +class TQImage; enum { INTERP_LINEAR = 0, @@ -48,17 +48,17 @@ enum { COLOR_INTERP_HSV_CW }; -// TODO: Replace QColor with KisColor +// TODO: Replace TQColor with KisColor class Color { public: Color() { m_alpha = 0; } - Color(const QColor& color, double alpha) { m_color = color; m_alpha = alpha; } + Color(const TQColor& color, double alpha) { m_color = color; m_alpha = alpha; } - const QColor& color() const { return m_color; } + const TQColor& color() const { return m_color; } double alpha() const { return m_alpha; } private: - QColor m_color; + TQColor m_color; double m_alpha; }; @@ -232,32 +232,33 @@ class KisGradientSegment { class KisGradient : public KisResource { typedef KisResource super; Q_OBJECT + TQ_OBJECT public: - KisGradient(const QString& file); + KisGradient(const TQString& file); virtual ~KisGradient(); virtual bool load(); virtual bool save(); - virtual QImage img(); - virtual QImage generatePreview(int width, int height) const; + virtual TQImage img(); + virtual TQImage generatePreview(int width, int height) const; - void colorAt(double t, QColor *color, Q_UINT8 *opacity) const; + void colorAt(double t, TQColor *color, TQ_UINT8 *opacity) const; KisGradientSegment *segmentAt(double t) const; protected: inline void pushSegment( KisGradientSegment* segment ) { m_segments.push_back(segment); }; - void setImage(const QImage& img); + void setImage(const TQImage& img); - QValueVector m_segments; + TQValueVector m_segments; private: bool init(); private: - QByteArray m_data; - QImage m_img; + TQByteArray m_data; + TQImage m_img; }; #endif // KIS_GRADIENT_H diff --git a/krita/core/kis_gradient_painter.cc b/krita/core/kis_gradient_painter.cc index b73623aa..2258d899 100644 --- a/krita/core/kis_gradient_painter.cc +++ b/krita/core/kis_gradient_painter.cc @@ -20,20 +20,20 @@ #include #include -#include "qbrush.h" -#include "qcolor.h" -#include "qfontinfo.h" -#include "qfontmetrics.h" -#include "qpen.h" -#include "qregion.h" -#include "qwmatrix.h" -#include -#include -#include -#include -#include -#include -#include +#include "tqbrush.h" +#include "tqcolor.h" +#include "tqfontinfo.h" +#include "tqfontmetrics.h" +#include "tqpen.h" +#include "tqregion.h" +#include "tqwmatrix.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -246,7 +246,7 @@ namespace { distance2 = fabs(distance2); } - double t = QMAX(distance1, distance2) / m_vectorLength; + double t = TQMAX(distance1, distance2) / m_vectorLength; return t; } @@ -483,42 +483,42 @@ KisGradientPainter::KisGradientPainter(KisPaintDeviceSP device) : super(device), bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, const KisPoint& gradientVectorEnd, - enumGradientShape shape, + enumGradientShape tqshape, enumGradientRepeat repeat, double antiAliasThreshold, bool reverseGradient, - Q_INT32 startx, - Q_INT32 starty, - Q_INT32 width, - Q_INT32 height) + TQ_INT32 startx, + TQ_INT32 starty, + TQ_INT32 width, + TQ_INT32 height) { m_cancelRequested = false; if (!m_gradient) return false; - GradientShapeStrategy *shapeStrategy = 0; + GradientShapeStrategy *tqshapeStrategy = 0; - switch (shape) { + switch (tqshape) { case GradientShapeLinear: - shapeStrategy = new LinearGradientStrategy(gradientVectorStart, gradientVectorEnd); + tqshapeStrategy = new LinearGradientStrategy(gradientVectorStart, gradientVectorEnd); break; case GradientShapeBiLinear: - shapeStrategy = new BiLinearGradientStrategy(gradientVectorStart, gradientVectorEnd); + tqshapeStrategy = new BiLinearGradientStrategy(gradientVectorStart, gradientVectorEnd); break; case GradientShapeRadial: - shapeStrategy = new RadialGradientStrategy(gradientVectorStart, gradientVectorEnd); + tqshapeStrategy = new RadialGradientStrategy(gradientVectorStart, gradientVectorEnd); break; case GradientShapeSquare: - shapeStrategy = new SquareGradientStrategy(gradientVectorStart, gradientVectorEnd); + tqshapeStrategy = new SquareGradientStrategy(gradientVectorStart, gradientVectorEnd); break; case GradientShapeConical: - shapeStrategy = new ConicalGradientStrategy(gradientVectorStart, gradientVectorEnd); + tqshapeStrategy = new ConicalGradientStrategy(gradientVectorStart, gradientVectorEnd); break; case GradientShapeConicalSymetric: - shapeStrategy = new ConicalSymetricGradientStrategy(gradientVectorStart, gradientVectorEnd); + tqshapeStrategy = new ConicalSymetricGradientStrategy(gradientVectorStart, gradientVectorEnd); break; } - Q_CHECK_PTR(shapeStrategy); + Q_CHECK_PTR(tqshapeStrategy); GradientRepeatStrategy *repeatStrategy = 0; @@ -537,7 +537,7 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, //If the device has a selection only iterate over that selection - QRect r; + TQRect r; if( m_device->hasSelection() ) { r = m_device->selection()->selectedExactRect(); startx = r.x(); @@ -546,10 +546,10 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, height = r.height(); } - Q_INT32 endx = startx + width - 1; - Q_INT32 endy = starty + height - 1; + TQ_INT32 endx = startx + width - 1; + TQ_INT32 endy = starty + height - 1; - QImage layer (width, height, 32); + TQImage layer (width, height, 32); layer.setAlphaBuffer(true); int pixelsProcessed = 0; @@ -566,20 +566,20 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, for (int y = starty; y <= endy; y++) { for (int x = startx; x <= endx; x++) { - double t = shapeStrategy->valueAt( x, y); + double t = tqshapeStrategy->valueAt( x, y); t = repeatStrategy->valueAt(t); if (reverseGradient) { t = 1 - t; } - QColor color; - Q_UINT8 opacity; + TQColor color; + TQ_UINT8 opacity; m_gradient->colorAt(t, &color, &opacity); layer.setPixel(x - startx, y - starty, - qRgba(color.red(), color.green(), color.blue(), opacity)); + tqRgba(color.red(), color.green(), color.blue(), opacity)); pixelsProcessed++; @@ -601,18 +601,18 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, if (!m_cancelRequested && antiAliasThreshold < 1 - DBL_EPSILON) { - QColor color; + TQColor color; emit notifyProgressStage(i18n("Anti-aliasing gradient..."), lastProgressPercent); - Q_UINT8 * layerPointer = layer.bits(); + TQ_UINT8 * layerPointer = layer.bits(); for (int y = starty; y <= endy; y++) { for (int x = startx; x <= endx; x++) { double maxDistance = 0; - Q_UINT8 redThis = layerPointer[2]; - Q_UINT8 greenThis = layerPointer[1]; - Q_UINT8 blueThis = layerPointer[0]; - Q_UINT8 thisPixelOpacity = layerPointer[3]; + TQ_UINT8 redThis = layerPointer[2]; + TQ_UINT8 greenThis = layerPointer[1]; + TQ_UINT8 blueThis = layerPointer[0]; + TQ_UINT8 thisPixelOpacity = layerPointer[3]; for (int yOffset = -1; yOffset < 2; yOffset++) { for (int xOffset = -1; xOffset < 2; xOffset++) { @@ -624,11 +624,11 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, if (sampleX >= startx && sampleX <= endx && sampleY >= starty && sampleY <= endy) { uint x = sampleX - startx; uint y = sampleY - starty; - Q_UINT8 * pixelPos = layer.bits() + (y * width * 4) + (x * 4); - Q_UINT8 red = *(pixelPos +2); - Q_UINT8 green = *(pixelPos + 1); - Q_UINT8 blue = *pixelPos; - Q_UINT8 opacity = *(pixelPos + 3); + TQ_UINT8 * pixelPos = layer.bits() + (y * width * 4) + (x * 4); + TQ_UINT8 red = *(pixelPos +2); + TQ_UINT8 green = *(pixelPos + 1); + TQ_UINT8 blue = *pixelPos; + TQ_UINT8 opacity = *(pixelPos + 3); double dRed = (red * opacity - redThis * thisPixelOpacity) / 65535.0; double dGreen = (green * opacity - greenThis * thisPixelOpacity) / 65535.0; @@ -662,14 +662,14 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, double sampleX = x - 0.5 + (sampleWidth / 2) + xSample * sampleWidth; double sampleY = y - 0.5 + (sampleWidth / 2) + ySample * sampleWidth; - double t = shapeStrategy->valueAt(sampleX, sampleY); + double t = tqshapeStrategy->valueAt(sampleX, sampleY); t = repeatStrategy->valueAt(t); if (reverseGradient) { t = 1 - t; } - Q_UINT8 opacity; + TQ_UINT8 opacity; m_gradient->colorAt(t, &color, &opacity); @@ -685,7 +685,7 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, int blue = totalBlue / (numSamples * numSamples); int opacity = totalOpacity / (numSamples * numSamples); - layer.setPixel(x - startx, y - starty, qRgba(red, green, blue, opacity)); + layer.setPixel(x - startx, y - starty, tqRgba(red, green, blue, opacity)); } pixelsProcessed++; @@ -715,7 +715,7 @@ bool KisGradientPainter::paintGradient(const KisPoint& gradientVectorStart, dev->writeBytes(layer.bits(), startx, starty, width, height); bltSelection(startx, starty, m_compositeOp, dev, m_opacity, startx, starty, width, height); } - delete shapeStrategy; + delete tqshapeStrategy; emit notifyProgressDone(); diff --git a/krita/core/kis_gradient_painter.h b/krita/core/kis_gradient_painter.h index ccfd5c3c..fc31b117 100644 --- a/krita/core/kis_gradient_painter.h +++ b/krita/core/kis_gradient_painter.h @@ -66,14 +66,14 @@ public: */ bool paintGradient(const KisPoint& gradientVectorStart, const KisPoint& gradientVectorEnd, - enumGradientShape shape, + enumGradientShape tqshape, enumGradientRepeat repeat, double antiAliasThreshold, bool reverseGradient, - Q_INT32 startx, - Q_INT32 starty, - Q_INT32 width, - Q_INT32 height); + TQ_INT32 startx, + TQ_INT32 starty, + TQ_INT32 width, + TQ_INT32 height); private: diff --git a/krita/core/kis_group_layer.cc b/krita/core/kis_group_layer.cc index 2a2ed325..a3a35339 100644 --- a/krita/core/kis_group_layer.cc +++ b/krita/core/kis_group_layer.cc @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #include "kis_types.h" #include "kis_layer.h" @@ -31,7 +31,7 @@ #include "kis_merge_visitor.h" #include "kis_fill_painter.h" -KisGroupLayer::KisGroupLayer(KisImage *img, const QString &name, Q_UINT8 opacity) : +KisGroupLayer::KisGroupLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity) : super(img, name, opacity), m_x(0), m_y(0) @@ -69,7 +69,7 @@ void KisGroupLayer::setDirty(bool propagate) if (propagate) emit (sigDirty(m_dirtyRect)); } -void KisGroupLayer::setDirty(const QRect & rc, bool propagate) +void KisGroupLayer::setDirty(const TQRect & rc, bool propagate) { KisLayer::setDirty(rc, propagate); if (propagate) emit sigDirty(rc); @@ -88,11 +88,11 @@ bool KisGroupLayer::paintLayerInducesProjectionOptimization(KisPaintLayer* l) { && l->opacity() == OPACITY_OPAQUE && !l->temporaryTarget() && !l->hasMask(); } -KisPaintDeviceSP KisGroupLayer::projection(const QRect & rect) +KisPaintDeviceSP KisGroupLayer::projection(const TQRect & rect) { - // We don't have a parent, and we've got only one child: abuse the child's + // We don't have a tqparent, and we've got only one child: abuse the child's // paint device as the projection if the child is visible and 100% opaque - if (parent() == 0 && childCount() == 1) { + if (tqparent() == 0 && childCount() == 1) { KisPaintLayerSP l = dynamic_cast(firstChild().data()); if (paintLayerInducesProjectionOptimization(l)) { l->setClean(rect); @@ -113,8 +113,8 @@ KisPaintDeviceSP KisGroupLayer::projection(const QRect & rect) // Okay, we need to update the intersection between // what's dirty and what's asked us to be updated. // XXX Nooo, that doesn't work, since the call to setClean following this, is actually: - // m_dirtyRect = QRect(); So the non-intersecting part gets brilliantly lost otherwise. - const QRect rc = m_dirtyRect;//rect.intersect(m_dirtyRect); + // m_dirtyRect = TQRect(); So the non-intersecting part gets brilliantly lost otherwise. + const TQRect rc = m_dirtyRect;//rect.intersect(m_dirtyRect); updateProjection(rc); setClean(rect); @@ -146,14 +146,14 @@ KisLayerSP KisGroupLayer::at(int index) const int KisGroupLayer::index(KisLayerSP layer) const { - if (layer->parent().data() == this) + if (layer->tqparent().data() == this) return layer->index(); return -1; } void KisGroupLayer::setIndex(KisLayerSP layer, int index) { - if (layer->parent().data() != this) + if (layer->tqparent().data() != this) return; //TODO optimize removeLayer(layer); @@ -163,7 +163,7 @@ void KisGroupLayer::setIndex(KisLayerSP layer, int index) bool KisGroupLayer::addLayer(KisLayerSP newLayer, int x) { if (x < 0 || kClamp(uint(x), uint(0), childCount()) != uint(x) || - newLayer->parent() || m_layers.contains(newLayer)) + newLayer->tqparent() || m_layers.tqcontains(newLayer)) { kdWarning() << "invalid input to KisGroupLayer::addLayer(KisLayerSP newLayer, int x)!" << endl; return false; @@ -185,7 +185,7 @@ bool KisGroupLayer::addLayer(KisLayerSP newLayer, int x) bool KisGroupLayer::addLayer(KisLayerSP newLayer, KisLayerSP aboveThis) { - if (aboveThis && aboveThis->parent().data() != this) + if (aboveThis && aboveThis->tqparent().data() != this) { kdWarning() << "invalid input to KisGroupLayer::addLayer(KisLayerSP newLayer, KisLayerSP aboveThis)!" << endl; return false; @@ -207,7 +207,7 @@ bool KisGroupLayer::removeLayer(int x) m_layers.erase(m_layers.begin() + reverseIndex(index)); setDirty(removedLayer->extent()); if (childCount() < 1) { - // No children, nothing to show for it. + // No tqchildren, nothing to show for it. m_projection->clear(); setDirty(); } @@ -219,7 +219,7 @@ bool KisGroupLayer::removeLayer(int x) bool KisGroupLayer::removeLayer(KisLayerSP layer) { - if (layer->parent().data() != this) + if (layer->tqparent().data() != this) { kdWarning() << "invalid input to KisGroupLayer::removeLayer()!" << endl; return false; @@ -237,9 +237,9 @@ void KisGroupLayer::setImage(KisImage *image) } } -QRect KisGroupLayer::extent() const +TQRect KisGroupLayer::extent() const { - QRect groupExtent; + TQRect groupExtent; for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it) { @@ -249,9 +249,9 @@ QRect KisGroupLayer::extent() const return groupExtent; } -QRect KisGroupLayer::exactBounds() const +TQRect KisGroupLayer::exactBounds() const { - QRect groupExactBounds; + TQRect groupExactBounds; for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it) { @@ -261,14 +261,14 @@ QRect KisGroupLayer::exactBounds() const return groupExactBounds; } -Q_INT32 KisGroupLayer::x() const +TQ_INT32 KisGroupLayer::x() const { return m_x; } -void KisGroupLayer::setX(Q_INT32 x) +void KisGroupLayer::setX(TQ_INT32 x) { - Q_INT32 delta = x - m_x; + TQ_INT32 delta = x - m_x; for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it) { @@ -278,14 +278,14 @@ void KisGroupLayer::setX(Q_INT32 x) m_x = x; } -Q_INT32 KisGroupLayer::y() const +TQ_INT32 KisGroupLayer::y() const { return m_y; } -void KisGroupLayer::setY(Q_INT32 y) +void KisGroupLayer::setY(TQ_INT32 y) { - Q_INT32 delta = y - m_y; + TQ_INT32 delta = y - m_y; for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it) { @@ -296,19 +296,19 @@ void KisGroupLayer::setY(Q_INT32 y) m_y = y; } -QImage KisGroupLayer::createThumbnail(Q_INT32 w, Q_INT32 h) +TQImage KisGroupLayer::createThumbnail(TQ_INT32 w, TQ_INT32 h) { return m_projection->createThumbnail(w, h); } -void KisGroupLayer::updateProjection(const QRect & rc) +void KisGroupLayer::updateProjection(const TQRect & rc) { if (!m_dirtyRect.isValid()) return; // Get the first layer in this group to start compositing with KisLayerSP child = lastChild(); - // No child -- clear the projection. Without children, a group layer is empty. + // No child -- clear the projection. Without tqchildren, a group layer is empty. if (!child) m_projection->clear(); KisLayerSP startWith = 0; @@ -317,7 +317,7 @@ void KisGroupLayer::updateProjection(const QRect & rc) // If this is the rootlayer, don't do anything with adj. layers that are below the // first paintlayer - bool gotPaintLayer = (parent() != 0); + bool gotPaintLayer = (tqparent() != 0); // Look through all the child layers, searching for the first dirty layer // if it's found, and if we have found an adj. layer before the the dirty layer, @@ -404,8 +404,8 @@ void KisGroupLayer::updateProjection(const QRect & rc) const KisCompositeOp cop = child->compositeOp(); const bool block = child->signalsBlocked(); child->blockSignals(true); - // Composite op copy doesn't take a mask/selection into account, so we need - // to make a difference between a paintlayer with a mask, and one without + // Composite op copy doesn't take a tqmask/selection into account, so we need + // to make a difference between a paintlayer with a tqmask, and one without KisPaintLayer* l = dynamic_cast(child.data()); if (l && l->hasMask()) child->m_compositeOp = COMPOSITE_OVER; diff --git a/krita/core/kis_group_layer.h b/krita/core/kis_group_layer.h index 7b1a764a..3a2e042a 100644 --- a/krita/core/kis_group_layer.h +++ b/krita/core/kis_group_layer.h @@ -37,9 +37,10 @@ class KisGroupLayer : public KisLayer { typedef KisLayer super; Q_OBJECT + TQ_OBJECT public: - KisGroupLayer(KisImage *img, const QString &name, Q_UINT8 opacity); + KisGroupLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity); KisGroupLayer(const KisGroupLayer& rhs); virtual ~KisGroupLayer(); @@ -47,46 +48,46 @@ public: public: /** - * Set the entire layer extent dirty; this percolates up to parent layers all the + * Set the entire layer extent dirty; this percolates up to tqparent layers all the * way to the root layer. */ virtual void setDirty(bool propagate = true); /** * Add the given rect to the set of dirty rects for this layer; - * this percolates up to parent layers all the way to the root + * this percolates up to tqparent layers all the way to the root * layer. */ - virtual void setDirty(const QRect & rect, bool propagate = true); + virtual void setDirty(const TQRect & rect, bool propagate = true); virtual void activate() {}; virtual void deactivate() {}; - virtual Q_INT32 x() const; - virtual void setX(Q_INT32); + virtual TQ_INT32 x() const; + virtual void setX(TQ_INT32); - virtual Q_INT32 y() const; - virtual void setY(Q_INT32); + virtual TQ_INT32 y() const; + virtual void setY(TQ_INT32); // Sets this layer and all its descendants' owner image to the given image. virtual void setImage(KisImage *image); - virtual QRect extent() const; - virtual QRect exactBounds() const; + virtual TQRect extent() const; + virtual TQRect exactBounds() const; virtual bool accept(KisLayerVisitor &v) { // kdDebug(41001) << "GROUP\t\t" << name() // << " dirty: " << dirty() -// << ", " << m_layers.count() << " children " +// << ", " << m_layers.count() << " tqchildren " // << ", projection: " << m_projection // << "\n"; return v.visit(this); }; virtual void resetProjection(KisPaintDevice* to = 0); /// will copy from to, if !0, CoW!! - virtual KisPaintDeviceSP projection(const QRect & rect); + virtual KisPaintDeviceSP projection(const TQRect & rect); virtual uint childCount() const; @@ -116,24 +117,24 @@ public: /// Removes the layer from this group. Fails if there's no such layer in this group. virtual bool removeLayer(KisLayerSP layer); - virtual QImage createThumbnail(Q_INT32 w, Q_INT32 h); + virtual TQImage createThumbnail(TQ_INT32 w, TQ_INT32 h); /// Returns if the layer will induce the projection hack (if the only layer in this group) virtual bool paintLayerInducesProjectionOptimization(KisPaintLayer* l); signals: - void sigDirty(QRect rc); + void sigDirty(TQRect rc); private: - void updateProjection(const QRect & rc); + void updateProjection(const TQRect & rc); inline int reverseIndex(int index) const { return childCount() - 1 - index; }; vKisLayerSP m_layers; // Contains the list of all layers KisPaintDeviceSP m_projection; // The cached composition of all layers in this group - Q_INT32 m_x; - Q_INT32 m_y; + TQ_INT32 m_x; + TQ_INT32 m_y; }; #endif // KIS_GROUP_LAYER_H_ diff --git a/krita/core/kis_histogram.cc b/krita/core/kis_histogram.cc index 97fdeac4..1b4db526 100644 --- a/krita/core/kis_histogram.cc +++ b/krita/core/kis_histogram.cc @@ -18,7 +18,7 @@ */ #include -#include // ### Debug +#include // ### Debug #include "kis_types.h" #include "kis_histogram.h" @@ -59,12 +59,12 @@ KisHistogram::~KisHistogram() void KisHistogram::updateHistogram() { - Q_INT32 x,y,w,h; + TQ_INT32 x,y,w,h; m_dev->exactBounds(x,y,w,h); KisRectIteratorPixel srcIt = m_dev->createRectIterator(x,y,w,h, false); KisColorSpace* cs = m_dev->colorSpace(); - QTime t; + TQTime t; t.start(); // Let the producer do it's work @@ -109,8 +109,8 @@ KisHistogram::Calculations KisHistogram::selectionCalculations() { return m_selectionCalculations.at(m_channel); } -QValueVector KisHistogram::calculateForRange(double from, double to) { - QValueVector calculations; +TQValueVector KisHistogram::calculateForRange(double from, double to) { + TQValueVector calculations; uint count = m_producer->channels().count(); for (uint i = 0; i < count; i++) { @@ -126,7 +126,7 @@ KisHistogram::Calculations KisHistogram::calculateSingleRange(int channel, doubl // XXX If from == to, we only want a specific bin, handle that properly! double max = from, min = to, total = 0.0, mean = 0.0; //, median = 0.0, stddev = 0.0; - Q_UINT32 high = 0, low = (Q_UINT32) -1, count = 0; + TQ_UINT32 high = 0, low = (TQ_UINT32) -1, count = 0; if (m_producer->count() == 0) { // We won't get anything, even if a range is specified @@ -134,17 +134,17 @@ KisHistogram::Calculations KisHistogram::calculateSingleRange(int channel, doubl return c; } - Q_INT32 totbins = m_producer->numberOfBins(); - Q_UINT32 current; + TQ_INT32 totbins = m_producer->numberOfBins(); + TQ_UINT32 current; // convert the double range into actual bins: double factor = static_cast(totbins) / m_producer->viewWidth(); - Q_INT32 fromBin = static_cast((from - m_producer->viewFrom()) * factor); - Q_INT32 toBin = fromBin + static_cast((to - from) * factor); + TQ_INT32 fromBin = static_cast((from - m_producer->viewFrom()) * factor); + TQ_INT32 toBin = fromBin + static_cast((to - from) * factor); // Min, max, count, low, high - for (Q_INT32 i = fromBin; i < toBin; i++) { + for (TQ_INT32 i = fromBin; i < toBin; i++) { current = m_producer->getBinAt(channel, i); double pos = static_cast(i) / factor + from; if (current > high) @@ -194,22 +194,22 @@ void KisHistogram::dump() { /* for( int i = 0; i <256; ++i ) { kdDebug(DBG_AREA_MATH) << "Value " - << QString().setNum(i) + << TQString().setNum(i) << ": " - << QString().setNum(m_values[i]) + << TQString().setNum(m_values[i]) << "\n"; }*/ kdDebug(DBG_AREA_MATH) << "\n"; - kdDebug(DBG_AREA_MATH) << "Max: " << QString().setNum(c.getMax()) << "\n"; - kdDebug(DBG_AREA_MATH) << "Min: " << QString().setNum(c.getMin()) << "\n"; - kdDebug(DBG_AREA_MATH) << "High: " << QString().setNum(c.getHighest()) << "\n"; - kdDebug(DBG_AREA_MATH) << "Low: " << QString().setNum(c.getLowest()) << "\n"; + kdDebug(DBG_AREA_MATH) << "Max: " << TQString().setNum(c.getMax()) << "\n"; + kdDebug(DBG_AREA_MATH) << "Min: " << TQString().setNum(c.getMin()) << "\n"; + kdDebug(DBG_AREA_MATH) << "High: " << TQString().setNum(c.getHighest()) << "\n"; + kdDebug(DBG_AREA_MATH) << "Low: " << TQString().setNum(c.getLowest()) << "\n"; kdDebug(DBG_AREA_MATH) << "Mean: " << m_producer->positionToString(c.getMean()) << "\n"; - kdDebug(DBG_AREA_MATH) << "Total: " << QString().setNum(c.getTotal()) << "\n"; -// kdDebug(DBG_AREA_MATH) << "Median: " << QString().setNum(m_median) << "\n"; -// kdDebug(DBG_AREA_MATH) << "Stddev: " << QString().setNum(m_stddev) << "\n"; -// kdDebug(DBG_AREA_MATH) << "percentile: " << QString().setNum(m_percentile) << "\n"; + kdDebug(DBG_AREA_MATH) << "Total: " << TQString().setNum(c.getTotal()) << "\n"; +// kdDebug(DBG_AREA_MATH) << "Median: " << TQString().setNum(m_median) << "\n"; +// kdDebug(DBG_AREA_MATH) << "Stddev: " << TQString().setNum(m_stddev) << "\n"; +// kdDebug(DBG_AREA_MATH) << "percentile: " << TQString().setNum(m_percentile) << "\n"; kdDebug(DBG_AREA_MATH) << "\n"; } diff --git a/krita/core/kis_histogram.h b/krita/core/kis_histogram.h index 3365bde1..3d315994 100644 --- a/krita/core/kis_histogram.h +++ b/krita/core/kis_histogram.h @@ -51,7 +51,7 @@ public: double m_max, m_min, m_mean, m_total, m_median, m_stddev; - Q_UINT32 m_high, m_low, m_count; + TQ_UINT32 m_high, m_low, m_count; friend class KisHistogram; @@ -70,18 +70,18 @@ public: */ inline double getMin() { return m_min; } /// This function return the highest value of the histogram - inline Q_UINT32 getHighest() { return m_high; } + inline TQ_UINT32 getHighest() { return m_high; } /// This function return the lowest value of the histogram - inline Q_UINT32 getLowest() { return m_low; } + inline TQ_UINT32 getLowest() { return m_low; } /// This function return the mean of value of the histogram inline double getMean() { return m_mean; } //double getMedian() { return m_median; } //double getStandardDeviation() { return m_stddev; } /// This function return the number of pixels used by the histogram - inline Q_UINT32 getCount() { return m_count; } + inline TQ_UINT32 getCount() { return m_count; } /** The sum of (the contents of every bin * the double value of that bin)*/ inline double getTotal() { return m_total; } - //Q_UINT8 getPercentile() { return m_percentile; } // What is this exactly? XXX + //TQ_UINT8 getPercentile() { return m_percentile; } // What is this exactly? XXX }; KisHistogram(KisPaintLayerSP layer, @@ -108,14 +108,14 @@ public: /** The information on the current selection for the current channel */ Calculations selectionCalculations(); - inline Q_UINT32 getValue(Q_UINT8 i) { return m_producer->getBinAt(m_channel, i); } + inline TQ_UINT32 getValue(TQ_UINT8 i) { return m_producer->getBinAt(m_channel, i); } inline enumHistogramType getHistogramType() { return m_type; } inline void setHistogramType(enumHistogramType type) { m_type = type; } inline void setProducer(KisHistogramProducerSP producer) { m_producer = producer; } - inline void setChannel(Q_INT32 channel) { m_channel = channel; } + inline void setChannel(TQ_INT32 channel) { m_channel = channel; } inline KisHistogramProducerSP producer() { return m_producer; } - inline Q_INT32 channel() { return m_channel; } + inline TQ_INT32 channel() { return m_channel; } inline bool hasSelection() { return m_selection; } inline double selectionFrom() { return m_selFrom; } @@ -129,7 +129,7 @@ public: private: // Dump the histogram to debug. void dump(); - QValueVector calculateForRange(double from, double to); + TQValueVector calculateForRange(double from, double to); Calculations calculateSingleRange(int channel, double from, double to); KisPaintDeviceSP m_device; @@ -137,13 +137,13 @@ private: enumHistogramType m_type; - Q_INT32 m_channel; + TQ_INT32 m_channel; double m_selFrom, m_selTo; bool m_selection; KisPaintDeviceSP m_dev; - QValueVector m_completeCalculations, m_selectionCalculations; + TQValueVector m_completeCalculations, m_selectionCalculations; }; diff --git a/krita/core/kis_image.cc b/krita/core/kis_image.cc index 2c56b606..30f3ad36 100644 --- a/krita/core/kis_image.cc +++ b/krita/core/kis_image.cc @@ -22,13 +22,13 @@ #include #include LCMS_HEADER -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -74,7 +74,7 @@ class KisImage::KisImagePrivate { public: KisColor backgroundColor; - Q_UINT32 lockCount; + TQ_UINT32 lockCount; bool sizeChangedWhileLocked; bool selectionChangedWhileLocked; KisSubstrateSP substrate; @@ -90,15 +90,15 @@ namespace { public: KisResizeImageCmd(KisUndoAdapter *adapter, KisImageSP img, - Q_INT32 width, - Q_INT32 height, - Q_INT32 oldWidth, - Q_INT32 oldHeight) : super(i18n("Resize Image")) + TQ_INT32 width, + TQ_INT32 height, + TQ_INT32 oldWidth, + TQ_INT32 oldHeight) : super(i18n("Resize Image")) { m_adapter = adapter; m_img = img; - m_before = QSize(oldWidth, oldHeight); - m_after = QSize(width, height); + m_before = TQSize(oldWidth, oldHeight); + m_after = TQSize(width, height); } virtual ~KisResizeImageCmd() @@ -123,8 +123,8 @@ namespace { private: KisUndoAdapter *m_adapter; KisImageSP m_img; - QSize m_before; - QSize m_after; + TQSize m_before; + TQSize m_after; }; // ------------------------------------------------------- @@ -134,7 +134,7 @@ namespace { public: KisChangeLayersCmd(KisUndoAdapter *adapter, KisImageSP img, - KisGroupLayerSP oldRootLayer, KisGroupLayerSP newRootLayer, const QString& name) + KisGroupLayerSP oldRootLayer, KisGroupLayerSP newRootLayer, const TQString& name) : super(name) { m_adapter = adapter; @@ -227,7 +227,7 @@ namespace { typedef KNamedCommand super; public: - KisImageCommand(const QString& name, KisImageSP image); + KisImageCommand(const TQString& name, KisImageSP image); virtual ~KisImageCommand() {} virtual void execute() = 0; @@ -239,7 +239,7 @@ namespace { KisImageSP m_image; }; - KisImageCommand::KisImageCommand(const QString& name, KisImageSP image) : + KisImageCommand::KisImageCommand(const TQString& name, KisImageSP image) : super(name), m_image(image) { } @@ -258,12 +258,12 @@ namespace { typedef KisImageCommand super; public: - KisLayerPositionCommand(const QString& name, KisImageSP image, KisLayerSP layer, KisGroupLayerSP parent, KisLayerSP aboveThis) : super(name, image) + KisLayerPositionCommand(const TQString& name, KisImageSP image, KisLayerSP layer, KisGroupLayerSP tqparent, KisLayerSP aboveThis) : super(name, image) { m_layer = layer; - m_oldParent = layer->parent(); + m_oldParent = layer->tqparent(); m_oldAboveThis = layer->nextSibling(); - m_newParent = parent; + m_newParent = tqparent; m_newAboveThis = aboveThis; } @@ -300,7 +300,7 @@ namespace { { m_img = img; m_layer = layer; - m_parent = layer->parent(); + m_parent = layer->tqparent(); m_aboveThis = layer->nextSibling(); } @@ -385,7 +385,7 @@ namespace { m_layer = layer; m_prevParent = wasParent; m_prevAbove = wasAbove; - m_newParent = layer->parent(); + m_newParent = layer->tqparent(); m_newAbove = layer->nextSibling(); } @@ -427,8 +427,8 @@ namespace { LayerPropsCmd(KisLayerSP layer, KisImageSP img, KisUndoAdapter *adapter, - const QString& name, - Q_INT32 opacity, + const TQString& name, + TQ_INT32 opacity, const KisCompositeOp& compositeOp) : super(i18n("Layer Property Changes")) { m_layer = layer; @@ -446,8 +446,8 @@ namespace { public: virtual void execute() { - QString name = m_layer->name(); - Q_INT32 opacity = m_layer->opacity(); + TQString name = m_layer->name(); + TQ_INT32 opacity = m_layer->opacity(); KisCompositeOp compositeOp = m_layer->compositeOp(); m_adapter->setUndo(false); @@ -471,8 +471,8 @@ namespace { KisUndoAdapter *m_adapter; KisLayerSP m_layer; KisImageSP m_img; - QString m_name; - Q_INT32 m_opacity; + TQString m_name; + TQ_INT32 m_opacity; KisCompositeOp m_compositeOp; }; @@ -516,22 +516,22 @@ namespace { }; } -KisImage::KisImage(KisUndoAdapter *adapter, Q_INT32 width, Q_INT32 height, KisColorSpace * colorSpace, const QString& name) - : QObject(0, name.latin1()), KShared() +KisImage::KisImage(KisUndoAdapter *adapter, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorSpace, const TQString& name) + : TQObject(0, name.latin1()), KShared() { init(adapter, width, height, colorSpace, name); setName(name); m_dcop = 0L; } -KisImage::KisImage(const KisImage& rhs) : QObject(), KShared(rhs) +KisImage::KisImage(const KisImage& rhs) : TQObject(), KShared(rhs) { m_dcop = 0L; if (this != &rhs) { m_private = new KisImagePrivate(*rhs.m_private); m_private->perspectiveGrid = new KisPerspectiveGrid(*rhs.m_private->perspectiveGrid); m_uri = rhs.m_uri; - m_name = QString::null; + m_name = TQString(); m_width = rhs.m_width; m_height = rhs.m_height; m_xres = rhs.m_xres; @@ -545,7 +545,7 @@ KisImage::KisImage(const KisImage& rhs) : QObject(), KShared(rhs) Q_CHECK_PTR(m_bkg); m_rootLayer = static_cast(rhs.m_rootLayer->clone().data()); - connect(m_rootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + connect(m_rootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); m_annotations = rhs.m_annotations; // XXX the annotations would probably need to be deep-copied @@ -558,7 +558,7 @@ KisImage::KisImage(const KisImage& rhs) : QObject(), KShared(rhs) m_rootLayer->setImage(this); // Set the active paint layer if(rhs.activeLayer() != NULL) { - QString layerName = rhs.activeLayer()->name(); + TQString layerName = rhs.activeLayer()->name(); // kdDebug(12345) << "KisImage::KisImage: active layer = " << layerName << "\n"; KisLayerSP activeLayer = rootLayer()->findLayer(layerName); Q_ASSERT(activeLayer); @@ -588,23 +588,23 @@ KisImage::~KisImage() delete m_dcop; } -QString KisImage::name() const +TQString KisImage::name() const { return m_name; } -void KisImage::setName(const QString& name) +void KisImage::setName(const TQString& name) { if (!name.isEmpty()) m_name = name; } -QString KisImage::description() const +TQString KisImage::description() const { return m_description; } -void KisImage::setDescription(const QString& description) +void KisImage::setDescription(const TQString& description) { if (!description.isEmpty()) m_description = description; @@ -622,7 +622,7 @@ void KisImage::setBackgroundColor(const KisColor & color) } -QString KisImage::nextLayerName() const +TQString KisImage::nextLayerName() const { if (m_nserver->currentSeed() == 0) { m_nserver->number(); @@ -637,7 +637,7 @@ void KisImage::rollBackLayerName() m_nserver->rollback(); } -void KisImage::init(KisUndoAdapter *adapter, Q_INT32 width, Q_INT32 height, KisColorSpace * colorSpace, const QString& name) +void KisImage::init(KisUndoAdapter *adapter, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorSpace, const TQString& name) { Q_ASSERT(colorSpace); @@ -647,7 +647,7 @@ void KisImage::init(KisUndoAdapter *adapter, Q_INT32 width, Q_INT32 height, Kis } m_private = new KisImagePrivate(); - m_private->backgroundColor = KisColor(Qt::white, colorSpace); + m_private->backgroundColor = KisColor(TQt::white, colorSpace); m_private->lockCount = 0; m_private->sizeChangedWhileLocked = false; m_private->selectionChangedWhileLocked = false; @@ -663,7 +663,7 @@ void KisImage::init(KisUndoAdapter *adapter, Q_INT32 width, Q_INT32 height, Kis m_bkg = new KisBackground(); m_rootLayer = new KisGroupLayer(this,"root", OPACITY_OPAQUE); - connect(m_rootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + connect(m_rootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); m_xres = 1.0; m_yres = 1.0; @@ -681,7 +681,7 @@ bool KisImage::locked() const void KisImage::lock() { if (!locked()) { - if (m_rootLayer) disconnect(m_rootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + if (m_rootLayer) disconnect(m_rootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); m_private->sizeChangedWhileLocked = false; m_private->selectionChangedWhileLocked = false; } @@ -707,7 +707,7 @@ void KisImage::unlock() emit sigActiveSelectionChanged(this); } - if (m_rootLayer) connect(m_rootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + if (m_rootLayer) connect(m_rootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); } } } @@ -721,12 +721,12 @@ void KisImage::emitSizeChanged() } } -void KisImage::notifyLayerUpdated(KisLayerSP layer, QRect rc) +void KisImage::notifyLayerUpdated(KisLayerSP layer, TQRect rc) { emit sigLayerUpdated(layer, rc); } -void KisImage::resize(Q_INT32 w, Q_INT32 h, Q_INT32 x, Q_INT32 y, bool cropLayers) +void KisImage::resize(TQ_INT32 w, TQ_INT32 h, TQ_INT32 x, TQ_INT32 y, bool cropLayers) { if (w != width() || h != height()) { @@ -746,7 +746,7 @@ void KisImage::resize(Q_INT32 w, Q_INT32 h, Q_INT32 x, Q_INT32 y, bool cropLayer m_height = h; if (cropLayers) { - KisCropVisitor v(QRect(x, y, w, h)); + KisCropVisitor v(TQRect(x, y, w, h)); m_rootLayer->accept(v); } @@ -761,7 +761,7 @@ void KisImage::resize(Q_INT32 w, Q_INT32 h, Q_INT32 x, Q_INT32 y, bool cropLayer } } -void KisImage::resize(const QRect& rc, bool cropLayers) +void KisImage::resize(const TQRect& rc, bool cropLayers) { resize(rc.width(), rc.height(), rc.x(), rc.y(), cropLayers); } @@ -772,9 +772,9 @@ void KisImage::scale(double sx, double sy, KisProgressDisplayInterface *progress if (nlayers() == 0) return; // Nothing to scale // New image size. XXX: Pass along to discourage rounding errors? - Q_INT32 w, h; - w = (Q_INT32)(( width() * sx) + 0.5); - h = (Q_INT32)(( height() * sy) + 0.5); + TQ_INT32 w, h; + w = (TQ_INT32)(( width() * sx) + 0.5); + h = (TQ_INT32)(( height() * sy) + 0.5); if (w != width() || h != height()) { @@ -819,12 +819,12 @@ void KisImage::rotate(double radians, KisProgressDisplayInterface *progress) { lock(); - Q_INT32 w = width(); - Q_INT32 h = height(); - Q_INT32 tx = Q_INT32((w*cos(radians) - h*sin(radians) - w) / 2 + 0.5); - Q_INT32 ty = Q_INT32((h*cos(radians) + w*sin(radians) - h) / 2 + 0.5); - w = (Q_INT32)(width()*QABS(cos(radians)) + height()*QABS(sin(radians)) + 0.5); - h = (Q_INT32)(height()*QABS(cos(radians)) + width()*QABS(sin(radians)) + 0.5); + TQ_INT32 w = width(); + TQ_INT32 h = height(); + TQ_INT32 tx = TQ_INT32((w*cos(radians) - h*sin(radians) - w) / 2 + 0.5); + TQ_INT32 ty = TQ_INT32((h*cos(radians) + w*sin(radians) - h) / 2 + 0.5); + w = (TQ_INT32)(width()*TQABS(cos(radians)) + height()*TQABS(sin(radians)) + 0.5); + h = (TQ_INT32)(height()*TQABS(cos(radians)) + width()*TQABS(sin(radians)) + 0.5); tx -= (w - width()) / 2; ty -= (h - height()) / 2; @@ -858,23 +858,23 @@ void KisImage::shear(double angleX, double angleY, KisProgressDisplayInterface * const double pi=3.1415926535897932385; //new image size - Q_INT32 w=width(); - Q_INT32 h=height(); + TQ_INT32 w=width(); + TQ_INT32 h=height(); if(angleX != 0 || angleY != 0){ - double deltaY=height()*QABS(tan(angleX*pi/180)*tan(angleY*pi/180)); - w = (Q_INT32) ( width() + QABS(height()*tan(angleX*pi/180)) ); + double deltaY=height()*TQABS(tan(angleX*pi/180)*tan(angleY*pi/180)); + w = (TQ_INT32) ( width() + TQABS(height()*tan(angleX*pi/180)) ); //ugly fix for the problem of having two extra pixels if only a shear along one //axis is done. This has to be fixed in the cropping code in KisRotateVisitor! if (angleX == 0 || angleY == 0) - h = (Q_INT32) ( height() + QABS(w*tan(angleY*pi/180)) ); + h = (TQ_INT32) ( height() + TQABS(w*tan(angleY*pi/180)) ); else if (angleX > 0 && angleY > 0) - h = (Q_INT32) ( height() + QABS(w*tan(angleY*pi/180))- 2 * deltaY + 2 ); + h = (TQ_INT32) ( height() + TQABS(w*tan(angleY*pi/180))- 2 * deltaY + 2 ); else if (angleX < 0 && angleY < 0) - h = (Q_INT32) ( height() + QABS(w*tan(angleY*pi/180))- 2 * deltaY + 2 ); + h = (TQ_INT32) ( height() + TQABS(w*tan(angleY*pi/180))- 2 * deltaY + 2 ); else - h = (Q_INT32) ( height() + QABS(w*tan(angleY*pi/180)) ); + h = (TQ_INT32) ( height() + TQABS(w*tan(angleY*pi/180)) ); } if (w != width() || h != height()) { @@ -906,7 +906,7 @@ void KisImage::shear(double angleX, double angleY, KisProgressDisplayInterface * } } -void KisImage::convertTo(KisColorSpace * dstColorSpace, Q_INT32 renderingIntent) +void KisImage::convertTo(KisColorSpace * dstColorSpace, TQ_INT32 renderingIntent) { if ( m_colorSpace == dstColorSpace ) { @@ -982,12 +982,12 @@ void KisImage::setResolution(double xres, double yres) m_yres = yres; } -Q_INT32 KisImage::width() const +TQ_INT32 KisImage::width() const { return m_width; } -Q_INT32 KisImage::height() const +TQ_INT32 KisImage::height() const { return m_height; } @@ -1034,7 +1034,7 @@ KisPaintDeviceSP KisImage::activeDevice() return 0; } -KisLayerSP KisImage::newLayer(const QString& name, Q_UINT8 opacity, const KisCompositeOp& compositeOp, KisColorSpace * colorstrategy) +KisLayerSP KisImage::newLayer(const TQString& name, TQ_UINT8 opacity, const KisCompositeOp& compositeOp, KisColorSpace * colorstrategy) { KisPaintLayer * layer; if (colorstrategy) @@ -1048,7 +1048,7 @@ KisLayerSP KisImage::newLayer(const QString& name, Q_UINT8 opacity, const KisCom layer->setVisible(true); if (m_activeLayer != 0) { - addLayer(layer, m_activeLayer->parent().data(), m_activeLayer->nextSibling()); + addLayer(layer, m_activeLayer->tqparent().data(), m_activeLayer->nextSibling()); } else { addLayer(layer, m_rootLayer, 0); @@ -1058,12 +1058,12 @@ KisLayerSP KisImage::newLayer(const QString& name, Q_UINT8 opacity, const KisCom return layer; } -void KisImage::setLayerProperties(KisLayerSP layer, Q_UINT8 opacity, const KisCompositeOp& compositeOp, const QString& name) +void KisImage::setLayerProperties(KisLayerSP layer, TQ_UINT8 opacity, const KisCompositeOp& compositeOp, const TQString& name) { if (layer && (layer->opacity() != opacity || layer->compositeOp() != compositeOp || layer->name() != name)) { if (undo()) { - QString oldname = layer->name(); - Q_INT32 oldopacity = layer->opacity(); + TQString oldname = layer->name(); + TQ_INT32 oldopacity = layer->opacity(); KisCompositeOp oldCompositeOp = layer->compositeOp(); layer->setName(name); layer->setOpacity(opacity); @@ -1089,7 +1089,7 @@ KisLayerSP KisImage::activeLayer() const KisPaintDeviceSP KisImage::projection() { - return m_rootLayer->projection(QRect(0, 0, m_width, m_height)); + return m_rootLayer->projection(TQRect(0, 0, m_width, m_height)); } KisLayerSP KisImage::activate(KisLayerSP layer) @@ -1105,7 +1105,7 @@ KisLayerSP KisImage::activate(KisLayerSP layer) return layer; } -KisLayerSP KisImage::findLayer(const QString& name) const +KisLayerSP KisImage::findLayer(const TQString& name) const { return rootLayer()->findLayer(name); } @@ -1116,30 +1116,30 @@ KisLayerSP KisImage::findLayer(int id) const } -bool KisImage::addLayer(KisLayerSP layer, KisGroupLayerSP parent) +bool KisImage::addLayer(KisLayerSP layer, KisGroupLayerSP tqparent) { - return addLayer(layer, parent, parent->firstChild()); + return addLayer(layer, tqparent, tqparent->firstChild()); } -bool KisImage::addLayer(KisLayerSP layer, KisGroupLayerSP parent, KisLayerSP aboveThis) +bool KisImage::addLayer(KisLayerSP layer, KisGroupLayerSP tqparent, KisLayerSP aboveThis) { - if (!parent) + if (!tqparent) return false; - const bool success = parent->addLayer(layer, aboveThis); + const bool success = tqparent->addLayer(layer, aboveThis); if (success) { KisPaintLayerSP player = dynamic_cast(layer.data()); if (player != 0) { // XXX: This should also be done whenever a layer grows! - QValueVector actions = KisMetaRegistry::instance() -> + TQValueVector actions = KisMetaRegistry::instance() -> csRegistry()->paintDeviceActionsFor(player->paintDevice()->colorSpace()); for (uint i = 0; i < actions.count(); i++) { actions.at(i)->act(player.data()->paintDevice(), width(), height()); } - connect(player, SIGNAL(sigMaskInfoChanged()), this, SIGNAL(sigMaskInfoChanged())); + connect(player, TQT_SIGNAL(sigMaskInfoChanged()), this, TQT_SIGNAL(sigMaskInfoChanged())); } if (layer->extent().isValid()) layer->setDirty(); @@ -1163,12 +1163,12 @@ bool KisImage::removeLayer(KisLayerSP layer) if (!layer || layer->image() != this) return false; - if (KisGroupLayerSP parent = layer->parent()) { + if (KisGroupLayerSP tqparent = layer->tqparent()) { // Adjustment layers should mark the layers underneath them, whose rendering // they have cached, diryt on removal. Otherwise, the group won't be re-rendered. KisAdjustmentLayer * al = dynamic_cast(layer.data()); if (al) { - QRect r = al->extent(); + TQRect r = al->extent(); lock(); // Lock the image, because we are going to dirty a lot of layers KisLayerSP l = layer->nextSibling(); while (l) { @@ -1181,11 +1181,11 @@ bool KisImage::removeLayer(KisLayerSP layer) } KisPaintLayerSP player = dynamic_cast(layer.data()); if (player != 0) { - disconnect(player, SIGNAL(sigMaskInfoChanged()), - this, SIGNAL(sigMaskInfoChanged())); + disconnect(player, TQT_SIGNAL(sigMaskInfoChanged()), + this, TQT_SIGNAL(sigMaskInfoChanged())); } KisLayerSP l = layer->prevSibling(); - QRect r = layer->extent(); + TQRect r = layer->extent(); while (l) { l->setDirty(r, false); l = l->prevSibling(); @@ -1196,21 +1196,21 @@ bool KisImage::removeLayer(KisLayerSP layer) const bool wasActive = layer == activeLayer(); // sigLayerRemoved can set it to 0, we don't want that in the else of wasActive! KisLayerSP actLayer = activeLayer(); - const bool success = parent->removeLayer(layer); + const bool success = tqparent->removeLayer(layer); if (success) { layer->setImage(0); if (!layer->temporary() && undo()) { - m_adapter->addCommand(new LayerRmCmd(m_adapter, this, layer, parent, wasAbove)); + m_adapter->addCommand(new LayerRmCmd(m_adapter, this, layer, tqparent, wasAbove)); } if (!layer->temporary()) { - emit sigLayerRemoved(layer, parent, wasAbove); + emit sigLayerRemoved(layer, tqparent, wasAbove); if (wasActive) { if (wasBelow) activate(wasBelow); else if (wasAbove) activate(wasAbove); - else if (parent != rootLayer()) - activate(parent.data()); + else if (tqparent != rootLayer()) + activate(tqparent.data()); else activate(rootLayer()->firstChild()); } else { @@ -1228,7 +1228,7 @@ bool KisImage::raiseLayer(KisLayerSP layer) { if (!layer) return false; - return moveLayer(layer, layer->parent().data(), layer->prevSibling()); + return moveLayer(layer, layer->tqparent().data(), layer->prevSibling()); } bool KisImage::lowerLayer(KisLayerSP layer) @@ -1236,7 +1236,7 @@ bool KisImage::lowerLayer(KisLayerSP layer) if (!layer) return false; if (KisLayerSP next = layer->nextSibling()) - return moveLayer(layer, layer->parent().data(), next->nextSibling()); + return moveLayer(layer, layer->tqparent().data(), next->nextSibling()); return false; } @@ -1254,15 +1254,15 @@ bool KisImage::toBottom(KisLayerSP layer) return moveLayer(layer, rootLayer(), 0); } -bool KisImage::moveLayer(KisLayerSP layer, KisGroupLayerSP parent, KisLayerSP aboveThis) +bool KisImage::moveLayer(KisLayerSP layer, KisGroupLayerSP tqparent, KisLayerSP aboveThis) { - if (!parent) + if (!tqparent) return false; - KisGroupLayerSP wasParent = layer->parent(); + KisGroupLayerSP wasParent = layer->tqparent(); KisLayerSP wasAbove = layer->nextSibling(); - if (wasParent.data() == parent.data() && wasAbove.data() == aboveThis.data()) + if (wasParent.data() == tqparent.data() && wasAbove.data() == aboveThis.data()) return false; lock(); @@ -1272,7 +1272,7 @@ bool KisImage::moveLayer(KisLayerSP layer, KisGroupLayerSP parent, KisLayerSP ab return false; } - const bool success = parent->addLayer(layer, aboveThis); + const bool success = tqparent->addLayer(layer, aboveThis); layer->setDirty(); @@ -1294,12 +1294,12 @@ bool KisImage::moveLayer(KisLayerSP layer, KisGroupLayerSP parent, KisLayerSP ab return success; } -Q_INT32 KisImage::nlayers() const +TQ_INT32 KisImage::nlayers() const { return rootLayer()->numLayers() - 1; } -Q_INT32 KisImage::nHiddenLayers() const +TQ_INT32 KisImage::nHiddenLayers() const { return rootLayer()->numLayers(KisLayer::Hidden); } @@ -1307,18 +1307,18 @@ Q_INT32 KisImage::nHiddenLayers() const void KisImage::flatten() { KisGroupLayerSP oldRootLayer = m_rootLayer; - disconnect(oldRootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + disconnect(oldRootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); KisPaintLayer *dst = new KisPaintLayer(this, nextLayerName(), OPACITY_OPAQUE, colorSpace()); Q_CHECK_PTR(dst); - QRect rc = mergedImage()->extent(); + TQRect rc = mergedImage()->extent(); KisPainter gc(dst->paintDevice()); gc.bitBlt(rc.x(), rc.y(), COMPOSITE_COPY, mergedImage(), OPACITY_OPAQUE, rc.left(), rc.top(), rc.width(), rc.height()); m_rootLayer = new KisGroupLayer(this, "", OPACITY_OPAQUE); - connect(m_rootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + connect(m_rootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); if (undo()) { m_adapter->beginMacro(i18n("Flatten Image")); @@ -1347,7 +1347,7 @@ void KisImage::mergeLayer(KisLayerSP layer) KisPaintLayer *player = new KisPaintLayer(this, layer->name(), OPACITY_OPAQUE, colorSpace()); Q_CHECK_PTR(player); - QRect rc = layer->extent() | layer->nextSibling()->extent(); + TQRect rc = layer->extent() | layer->nextSibling()->extent(); undoAdapter()->beginMacro(i18n("Merge with Layer Below")); @@ -1357,7 +1357,7 @@ void KisImage::mergeLayer(KisLayerSP layer) layer->accept(visitor); removeLayer(layer->nextSibling()); - addLayer(player, layer->parent(), layer); + addLayer(player, layer->tqparent(), layer); removeLayer(layer); undoAdapter()->endMacro(); @@ -1369,20 +1369,20 @@ void KisImage::setModified() emit sigImageModified(); } -void KisImage::renderToPainter(Q_INT32 x1, - Q_INT32 y1, - Q_INT32 x2, - Q_INT32 y2, - QPainter &painter, +void KisImage::renderToPainter(TQ_INT32 x1, + TQ_INT32 y1, + TQ_INT32 x2, + TQ_INT32 y2, + TQPainter &painter, KisProfile * monitorProfile, PaintFlags paintFlags, float exposure) { - QImage img = convertToQImage(x1, y1, x2, y2, monitorProfile, exposure); + TQImage img = convertToTQImage(x1, y1, x2, y2, monitorProfile, exposure); - Q_INT32 w = x2 - x1 + 1; - Q_INT32 h = y2 - y1 + 1; + TQ_INT32 w = x2 - x1 + 1; + TQ_INT32 h = y2 - y1 + 1; if (paintFlags & PAINT_BACKGROUND) { @@ -1405,18 +1405,18 @@ void KisImage::renderToPainter(Q_INT32 x1, painter.drawImage(x1, y1, img, 0, 0, w, h); } -QImage KisImage::convertToQImage(Q_INT32 x1, - Q_INT32 y1, - Q_INT32 x2, - Q_INT32 y2, +TQImage KisImage::convertToTQImage(TQ_INT32 x1, + TQ_INT32 y1, + TQ_INT32 x2, + TQ_INT32 y2, KisProfile * profile, float exposure) { - Q_INT32 w = x2 - x1 + 1; - Q_INT32 h = y2 - y1 + 1; + TQ_INT32 w = x2 - x1 + 1; + TQ_INT32 h = y2 - y1 + 1; - KisPaintDeviceSP dev = m_rootLayer->projection(QRect(x1, y1, w, h)); - QImage img = dev->convertToQImage(profile, x1, y1, w, h, exposure); + KisPaintDeviceSP dev = m_rootLayer->projection(TQRect(x1, y1, w, h)); + TQImage img = dev->convertToTQImage(profile, x1, y1, w, h, exposure); if (!img.isNull()) { @@ -1439,24 +1439,24 @@ QImage KisImage::convertToQImage(Q_INT32 x1, return img; } - return QImage(); + return TQImage(); } -QImage KisImage::convertToQImage(const QRect& r, const QSize& scaledImageSize, KisProfile *profile, PaintFlags paintFlags, float exposure) +TQImage KisImage::convertToTQImage(const TQRect& r, const TQSize& scaledImageSize, KisProfile *profile, PaintFlags paintFlags, float exposure) { if (r.isEmpty() || scaledImageSize.isEmpty()) { - return QImage(); + return TQImage(); } - Q_INT32 imageWidth = width(); - Q_INT32 imageHeight = height(); - Q_UINT32 pixelSize = colorSpace()->pixelSize(); + TQ_INT32 imageWidth = width(); + TQ_INT32 imageHeight = height(); + TQ_UINT32 pixelSize = colorSpace()->pixelSize(); double xScale = static_cast(imageWidth) / scaledImageSize.width(); double yScale = static_cast(imageHeight) / scaledImageSize.height(); - QRect srcRect; + TQRect srcRect; srcRect.setLeft(static_cast(r.left() * xScale)); srcRect.setRight(static_cast(ceil((r.right() + 1) * xScale)) - 1); @@ -1464,28 +1464,28 @@ QImage KisImage::convertToQImage(const QRect& r, const QSize& scaledImageSize, K srcRect.setBottom(static_cast(ceil((r.bottom() + 1) * yScale)) - 1); KisPaintDeviceSP mergedImage = m_rootLayer->projection(srcRect); - QTime t; + TQTime t; t.start(); - Q_UINT8 *scaledImageData = new Q_UINT8[r.width() * r.height() * pixelSize]; + TQ_UINT8 *scaledImageData = new TQ_UINT8[r.width() * r.height() * pixelSize]; - Q_UINT8 *imageRow = new Q_UINT8[srcRect.width() * pixelSize]; - const Q_INT32 imageRowX = srcRect.x(); + TQ_UINT8 *imageRow = new TQ_UINT8[srcRect.width() * pixelSize]; + const TQ_INT32 imageRowX = srcRect.x(); - for (Q_INT32 y = 0; y < r.height(); ++y) { + for (TQ_INT32 y = 0; y < r.height(); ++y) { - Q_INT32 dstY = r.y() + y; - Q_INT32 dstX = r.x(); - Q_INT32 srcY = (dstY * imageHeight) / scaledImageSize.height(); + TQ_INT32 dstY = r.y() + y; + TQ_INT32 dstX = r.x(); + TQ_INT32 srcY = (dstY * imageHeight) / scaledImageSize.height(); mergedImage->readBytes(imageRow, imageRowX, srcY, srcRect.width(), 1); - Q_UINT8 *dstPixel = scaledImageData + (y * r.width() * pixelSize); - Q_UINT32 columnsRemaining = r.width(); + TQ_UINT8 *dstPixel = scaledImageData + (y * r.width() * pixelSize); + TQ_UINT32 columnsRemaining = r.width(); while (columnsRemaining > 0) { - Q_INT32 srcX = (dstX * imageWidth) / scaledImageSize.width(); + TQ_INT32 srcX = (dstX * imageWidth) / scaledImageSize.width(); memcpy(dstPixel, imageRow + ((srcX - imageRowX) * pixelSize), pixelSize); @@ -1498,7 +1498,7 @@ QImage KisImage::convertToQImage(const QRect& r, const QSize& scaledImageSize, K delete [] imageRow; - QImage image = colorSpace()->convertToQImage(scaledImageData, r.width(), r.height(), profile, INTENT_PERCEPTUAL, exposure); + TQImage image = colorSpace()->convertToTQImage(scaledImageData, r.width(), r.height(), profile, INTENT_PERCEPTUAL, exposure); delete [] scaledImageData; #ifdef __BIG_ENDIAN__ @@ -1518,13 +1518,13 @@ QImage KisImage::convertToQImage(const QRect& r, const QSize& scaledImageSize, K #endif if (paintFlags & PAINT_BACKGROUND) { - m_bkg->paintBackground(image, r, scaledImageSize, QSize(imageWidth, imageHeight)); + m_bkg->paintBackground(image, r, scaledImageSize, TQSize(imageWidth, imageHeight)); image.setAlphaBuffer(false); } if (paintFlags & PAINT_SELECTION) { if (m_activeLayer != 0) { - m_activeLayer->paintSelection(image, r, scaledImageSize, QSize(imageWidth, imageHeight)); + m_activeLayer->paintSelection(image, r, scaledImageSize, TQSize(imageWidth, imageHeight)); } } @@ -1539,12 +1539,12 @@ QImage KisImage::convertToQImage(const QRect& r, const QSize& scaledImageSize, K KisPaintDeviceSP KisImage::mergedImage() { - return m_rootLayer->projection(QRect(0, 0, m_width, m_height)); + return m_rootLayer->projection(TQRect(0, 0, m_width, m_height)); } -KisColor KisImage::mergedPixel(Q_INT32 x, Q_INT32 y) +KisColor KisImage::mergedPixel(TQ_INT32 x, TQ_INT32 y) { - return m_rootLayer->projection(QRect(x, y, 1, 1))->colorAt(x, y); + return m_rootLayer->projection(TQRect(x, y, 1, 1))->colorAt(x, y); } void KisImage::notifyLayersChanged() @@ -1561,9 +1561,9 @@ void KisImage::notifyImageLoaded() { } -QRect KisImage::bounds() const +TQRect KisImage::bounds() const { - return QRect(0, 0, width(), height()); + return TQRect(0, 0, width(), height()); } @@ -1593,9 +1593,9 @@ void KisImage::slotSelectionChanged() slotSelectionChanged(bounds()); } -void KisImage::slotSelectionChanged(const QRect& r) +void KisImage::slotSelectionChanged(const TQRect& r) { - QRect r2(r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2); + TQRect r2(r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2); if (!locked()) { emit sigActiveSelectionChanged(this); @@ -1619,12 +1619,12 @@ void KisImage::setColorSpace(KisColorSpace * colorSpace) void KisImage::setRootLayer(KisGroupLayerSP rootLayer) { - disconnect(m_rootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + disconnect(m_rootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); m_rootLayer = rootLayer; if (!locked()) { - connect(m_rootLayer, SIGNAL(sigDirty(QRect)), this, SIGNAL(sigImageUpdated(QRect))); + connect(m_rootLayer, TQT_SIGNAL(sigDirty(TQRect)), this, TQT_SIGNAL(sigImageUpdated(TQRect))); } activate(m_rootLayer->firstChild()); } @@ -1643,7 +1643,7 @@ void KisImage::addAnnotation(KisAnnotationSP annotation) m_annotations.push_back(annotation); } -KisAnnotationSP KisImage::annotation(QString type) +KisAnnotationSP KisImage::annotation(TQString type) { vKisAnnotationSP_it it = m_annotations.begin(); while (it != m_annotations.end()) { @@ -1655,7 +1655,7 @@ KisAnnotationSP KisImage::annotation(QString type) return 0; } -void KisImage::removeAnnotation(QString type) +void KisImage::removeAnnotation(TQString type) { vKisAnnotationSP_it it = m_annotations.begin(); while (it != m_annotations.end()) { diff --git a/krita/core/kis_image.h b/krita/core/kis_image.h index fccb2fd3..a3917953 100644 --- a/krita/core/kis_image.h +++ b/krita/core/kis_image.h @@ -19,10 +19,10 @@ #ifndef KIS_IMAGE_H_ #define KIS_IMAGE_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -58,11 +58,12 @@ class KisProgressDisplayInterface; class KisPaintLayer; class KisPerspectiveGrid; -class KRITACORE_EXPORT KisImage : public QObject, public KShared { +class KRITACORE_EXPORT KisImage : public TQObject, public KShared { Q_OBJECT + TQ_OBJECT public: - KisImage(KisUndoAdapter * adapter, Q_INT32 width, Q_INT32 height, KisColorSpace * colorSpace, const QString& name); + KisImage(KisUndoAdapter * adapter, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorSpace, const TQString& name); KisImage(const KisImage& rhs); virtual ~KisImage(); virtual DCOPObject *dcopObject(); @@ -78,26 +79,26 @@ public: /// Paint the specified rect onto the painter, adjusting the colors using the /// given profile. The exposure setting is used if the image has a high dynamic range. - virtual void renderToPainter(Q_INT32 x1, - Q_INT32 y1, - Q_INT32 x2, - Q_INT32 y2, - QPainter &painter, + virtual void renderToPainter(TQ_INT32 x1, + TQ_INT32 y1, + TQ_INT32 x2, + TQ_INT32 y2, + TQPainter &painter, KisProfile *profile, PaintFlags paintFlags, float exposure = 0.0f); /** - * Render the projection onto a QImage. In contrast with the above method, the + * Render the projection onto a TQImage. In contrast with the above method, the * selection is not rendered. */ - virtual QImage convertToQImage(Q_INT32 x1, - Q_INT32 y1, - Q_INT32 x2, - Q_INT32 y2, + virtual TQImage convertToTQImage(TQ_INT32 x1, + TQ_INT32 y1, + TQ_INT32 x2, + TQ_INT32 y2, KisProfile * profile, float exposure = 0.0f); - virtual QImage convertToQImage(const QRect& r, const QSize& fullImageSize, KisProfile *profile, PaintFlags paintFlags, float exposure = 0.0f); + virtual TQImage convertToTQImage(const TQRect& r, const TQSize& fullImageSize, KisProfile *profile, PaintFlags paintFlags, float exposure = 0.0f); KisBackgroundSP background() const; KisSubstrateSP substrate() const; @@ -126,17 +127,17 @@ public: KisColor backgroundColor() const; void setBackgroundColor(const KisColor & color); - QString name() const; - void setName(const QString& name); + TQString name() const; + void setName(const TQString& name); - QString description() const; - void setDescription(const QString& description); + TQString description() const; + void setDescription(const TQString& description); - QString nextLayerName() const; + TQString nextLayerName() const; void rollBackLayerName(); KisPerspectiveGrid* perspectiveGrid(); - void createPerspectiveGrid(QPoint topLeft, QPoint topRight, QPoint bottomRight, QPoint bottomLeft); + void createPerspectiveGrid(TQPoint topLeft, TQPoint topRight, TQPoint bottomRight, TQPoint bottomLeft); /** * Resize the image to the specified width and height. The resize * method handles the creating on an undo step itself. @@ -147,7 +148,7 @@ public: * @param y the y position of the crop on all layer if cropLayers is true * @param cropLayers if true, all layers are cropped to the new size. */ - void resize(Q_INT32 w, Q_INT32 h, Q_INT32 x = 0, Q_INT32 y = 0, bool cropLayers = false); + void resize(TQ_INT32 w, TQ_INT32 h, TQ_INT32 x = 0, TQ_INT32 y = 0, bool cropLayers = false); /** * Resize the image to the specified width and height. The resize @@ -156,7 +157,7 @@ public: * @param rc the rect describing the new width and height of the image * @param cropLayers if true, all layers are cropped to the new rect */ - void resize(const QRect& rc, bool cropLayers = false); + void resize(const TQRect& rc, bool cropLayers = false); void scale(double sx, double sy, KisProgressDisplayInterface *m_progress, KisFilterStrategy *filterStrategy); void rotate(double radians, KisProgressDisplayInterface *m_progress); @@ -165,7 +166,7 @@ public: /** * Convert the image and all its layers to the dstColorSpace */ - void convertTo(KisColorSpace * dstColorSpace, Q_INT32 renderingIntent = INTENT_PERCEPTUAL); + void convertTo(KisColorSpace * dstColorSpace, TQ_INT32 renderingIntent = INTENT_PERCEPTUAL); // Get the profile associated with this image KisProfile * getProfile() const; @@ -210,8 +211,8 @@ public: double yRes(); void setResolution(double xres, double yres); - Q_INT32 width() const; - Q_INT32 height() const; + TQ_INT32 width() const; + TQ_INT32 height() const; bool empty() const; @@ -224,16 +225,16 @@ public: /* * Returns the colour of the merged image at pixel (x, y). */ - KisColor mergedPixel(Q_INT32 x, Q_INT32 y); + KisColor mergedPixel(TQ_INT32 x, TQ_INT32 y); /// Creates a new paint layer with the specified properties, adds it to the image, and returns it. - KisLayerSP newLayer(const QString& name, Q_UINT8 opacity, + KisLayerSP newLayer(const TQString& name, TQ_UINT8 opacity, const KisCompositeOp& compositeOp = KisCompositeOp(), KisColorSpace * colorstrategy = 0); /// Get the active painting device. Returns 0 if the active layer does not have a paint device. KisPaintDeviceSP activeDevice(); - void setLayerProperties(KisLayerSP layer, Q_UINT8 opacity, const KisCompositeOp& compositeOp, const QString& name); + void setLayerProperties(KisLayerSP layer, TQ_UINT8 opacity, const KisCompositeOp& compositeOp, const TQString& name); KisGroupLayerSP rootLayer() const; KisLayerSP activeLayer() const; @@ -243,27 +244,27 @@ public: KisPaintDeviceSP projection(); KisLayerSP activate(KisLayerSP layer); - KisLayerSP findLayer(const QString& name) const; + KisLayerSP findLayer(const TQString& name) const; KisLayerSP findLayer(int id) const; /// Move layer to specified position - bool moveLayer(KisLayerSP layer, KisGroupLayerSP parent, KisLayerSP aboveThis); + bool moveLayer(KisLayerSP layer, KisGroupLayerSP tqparent, KisLayerSP aboveThis); /** * Add an already existing layer to the image. The layer is put on top * of the layers in the specified layergroup * @param layer the layer to be added - * @param parent the parent layer + * @param tqparent the tqparent layer */ - bool addLayer(KisLayerSP layer, KisGroupLayerSP parent); + bool addLayer(KisLayerSP layer, KisGroupLayerSP tqparent); /** * Add already existing layer to image. * * @param layer the layer to be added - * @param parent the parent layer + * @param tqparent the tqparent layer * @param aboveThis in the list with child layers of the specified - * parent, add this layer above the specified sibling. + * tqparent, add this layer above the specified sibling. * if 0, the layer is put in the lowermost position in * its group. * @param notify If true, the image is immediately recomposited, if false, @@ -271,7 +272,7 @@ public: * * returns false if adding the layer didn't work, true if the layer got added */ - bool addLayer(KisLayerSP layer, KisGroupLayerSP parent, KisLayerSP aboveThis); + bool addLayer(KisLayerSP layer, KisGroupLayerSP tqparent, KisLayerSP aboveThis); /// Remove layer bool removeLayer(KisLayerSP layer); @@ -288,8 +289,8 @@ public: /// Move layer to bottom slot bool toBottom(KisLayerSP layer); - Q_INT32 nlayers() const; - Q_INT32 nHiddenLayers() const; + TQ_INT32 nlayers() const; + TQ_INT32 nHiddenLayers() const; KCommand *raiseLayerCommand(KisLayerSP layer); KCommand *lowerLayerCommand(KisLayerSP layer); @@ -308,7 +309,7 @@ public: */ void mergeLayer(KisLayerSP l); - QRect bounds() const; + TQRect bounds() const; /// use if the layers have changed _completely_ (eg. when flattening) void notifyLayersChanged(); @@ -317,7 +318,7 @@ public: void notifyImageLoaded(); - void notifyLayerUpdated(KisLayerSP layer, QRect rc); + void notifyLayerUpdated(KisLayerSP layer, TQRect rc); void setColorSpace(KisColorSpace * colorSpace); void setRootLayer(KisGroupLayerSP rootLayer); @@ -332,10 +333,10 @@ public: void addAnnotation(KisAnnotationSP annotation); /** get the annotation with the given type, can return 0 */ - KisAnnotationSP annotation(QString type); + KisAnnotationSP annotation(TQString type); /** delete the annotation, if the image contains it */ - void removeAnnotation(QString type); + void removeAnnotation(TQString type); /** * Start of an iteration over the annotations of this image (including the ICC Profile) @@ -349,26 +350,26 @@ signals: void sigActiveSelectionChanged(KisImageSP image); void sigSelectionChanged(KisImageSP image); - void sigSelectionChanged(KisImageSP image, const QRect& rect); + void sigSelectionChanged(KisImageSP image, const TQRect& rect); /// Emitted after a different layer is made active. void sigLayerActivated(KisLayerSP layer); - /// Emitted after a layer is added: you can find out where by asking it for its parent(), et al. + /// Emitted after a layer is added: you can find out where by asking it for its tqparent(), et al. void sigLayerAdded(KisLayerSP layer); /** Emitted after a layer is removed. It's no longer in the image, but still exists, so @p layer is valid. @param layer the removed layer - @param parent the parent of the layer, before it was removed + @param tqparent the tqparent of the layer, before it was removed @param wasAboveThis the layer it was above, before it was removed. */ void sigLayerRemoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP wasAboveThis); - /** Emitted after a layer is moved to a different position under its parent layer, or its parent changes. + /** Emitted after a layer is moved to a different position under its tqparent layer, or its tqparent changes. - @param previousParent the parent of the layer, before it was moved + @param previousParent the tqparent of the layer, before it was moved @param wasAboveThis the layer it was above, before it was moved. */ void sigLayerMoved(KisLayerSP layer, KisGroupLayerSP previousParent, KisLayerSP wasAboveThis); @@ -388,7 +389,7 @@ signals: * * @param rc The rect that has been recomposited. */ - void sigImageUpdated(QRect rc); + void sigImageUpdated(TQRect rc); /** * Emitted whenever a layer is modified. @@ -396,38 +397,38 @@ signals: * @param layer The layer that has been modified. * @param rc The rectangle that has been modified. */ - void sigLayerUpdated(KisLayerSP layer, QRect rc); + void sigLayerUpdated(KisLayerSP layer, TQRect rc); /** * Emitted whenever the image has been modified, so that it doesn't match with the version saved on disk. */ void sigImageModified(); - void sigSizeChanged(Q_INT32 w, Q_INT32 h); + void sigSizeChanged(TQ_INT32 w, TQ_INT32 h); void sigProfileChanged(KisProfile * profile); void sigColorSpaceChanged(KisColorSpace* cs); - /// Emitted when any layer's mask info got updated (or when the current layer changes) + /// Emitted when any layer's tqmask info got updated (or when the current layer changes) void sigMaskInfoChanged(); public slots: void slotSelectionChanged(); - void slotSelectionChanged(const QRect& r); + void slotSelectionChanged(const TQRect& r); private: KisImage& operator=(const KisImage& rhs); - void init(KisUndoAdapter * adapter, Q_INT32 width, Q_INT32 height, KisColorSpace * colorSpace, const QString& name); + void init(KisUndoAdapter * adapter, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorSpace, const TQString& name); void emitSizeChanged(); private: KURL m_uri; - QString m_name; - QString m_description; + TQString m_name; + TQString m_description; - Q_INT32 m_width; - Q_INT32 m_height; + TQ_INT32 m_width; + TQ_INT32 m_height; double m_xres; double m_yres; @@ -437,7 +438,7 @@ private: KisColorSpace * m_colorSpace; bool m_dirty; - QRect m_dirtyRect; + TQRect m_dirtyRect; KisBackgroundSP m_bkg; diff --git a/krita/core/kis_image_iface.cc b/krita/core/kis_image_iface.cc index 5a74c480..a52cc8a4 100644 --- a/krita/core/kis_image_iface.cc +++ b/krita/core/kis_image_iface.cc @@ -42,7 +42,7 @@ int KisImageIface::width() const return m_img->width(); } -void KisImageIface::setName(const QString& name) +void KisImageIface::setName(const TQString& name) { m_img->setName( name ); } diff --git a/krita/core/kis_image_iface.h b/krita/core/kis_image_iface.h index 77baa516..acf36738 100644 --- a/krita/core/kis_image_iface.h +++ b/krita/core/kis_image_iface.h @@ -24,7 +24,7 @@ #include -#include +#include class KisImage; class KisPaintDeviceIface; @@ -39,7 +39,7 @@ k_dcop: int height() const; int width() const; - void setName(const QString& name); + void setName(const TQString& name); void rotateCCW(); void rotateCW(); diff --git a/krita/core/kis_imagepipe_brush.cc b/krita/core/kis_imagepipe_brush.cc index ad745014..2b926dd0 100644 --- a/krita/core/kis_imagepipe_brush.cc +++ b/krita/core/kis_imagepipe_brush.cc @@ -31,13 +31,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -47,25 +47,25 @@ #include "kis_paint_device.h" #include "kis_imagepipe_brush.h" #include "kis_brush.h" -#include "kis_alpha_mask.h" +#include "kis_alpha_tqmask.h" #include "kis_layer.h" #include "kis_meta_registry.h" #include "kis_colorspace_factory_registry.h" -KisPipeBrushParasite::KisPipeBrushParasite(const QString& source) +KisPipeBrushParasite::KisPipeBrushParasite(const TQString& source) { needsMovement = false; - QRegExp basicSplitter(" ", true); - QRegExp parasiteSplitter(":", true); - QStringList parasites = QStringList::split(basicSplitter, source); + TQRegExp basicSplitter(" ", true); + TQRegExp parasiteSplitter(":", true); + TQStringList parasites = TQStringList::split(basicSplitter, source); for (uint i = 0; i < parasites.count(); i++) { - QStringList splitted = QStringList::split(parasiteSplitter, *parasites.at(i)); + TQStringList splitted = TQStringList::split(parasiteSplitter, *parasites.at(i)); if (splitted.count() != 2) { kdWarning(41001) << "Wrong count for this parasite key/value:" << *parasites.at(i) << endl; continue; } - QString index = *splitted.at(0); + TQString index = *splitted.at(0); if (index == "dim") { dim = (*splitted.at(1)).toInt(); if (dim < 1 || dim > MaxDim) { @@ -74,7 +74,7 @@ KisPipeBrushParasite::KisPipeBrushParasite(const QString& source) } else if (index.startsWith("sel")) { int selIndex = index.mid(strlen("sel")).toInt(); if (selIndex >= 0 && selIndex < dim) { - QString selectionMode = *splitted.at(1); + TQString selectionMode = *splitted.at(1); if (selectionMode == "incremental") selection[selIndex] = Incremental; else if (selectionMode == "angular") { @@ -124,11 +124,11 @@ void KisPipeBrushParasite::setBrushesCount() { } } -bool KisPipeBrushParasite::saveToDevice(QIODevice* dev) const { +bool KisPipeBrushParasite::saveToDevice(TQIODevice* dev) const { // write out something like // ncells: dim: rank0: sel0: <...> - QTextStream stream(dev); + TQTextStream stream(dev); /// FIXME things like step, placement and so are not added (nor loaded, as a matter of fact) stream << ncells << " ncells:" << ncells << " dim:" << dim; @@ -149,16 +149,16 @@ bool KisPipeBrushParasite::saveToDevice(QIODevice* dev) const { return true; } -KisImagePipeBrush::KisImagePipeBrush(const QString& filename) : super(filename) +KisImagePipeBrush::KisImagePipeBrush(const TQString& filename) : super(filename) { m_brushType = INVALID; m_numOfBrushes = 0; m_currentBrush = 0; } -KisImagePipeBrush::KisImagePipeBrush(const QString& name, int w, int h, - QValueVector< QValueVector > devices, - QValueVector modes) +KisImagePipeBrush::KisImagePipeBrush(const TQString& name, int w, int h, + TQValueVector< TQValueVector > devices, + TQValueVector modes) : super("") { Q_ASSERT(devices.count() == modes.count()); @@ -193,7 +193,7 @@ KisImagePipeBrush::~KisImagePipeBrush() bool KisImagePipeBrush::load() { - QFile file(filename()); + TQFile file(filename()); file.open(IO_ReadOnly); m_data = file.readAll(); file.close(); @@ -206,33 +206,33 @@ bool KisImagePipeBrush::init() // XXX: This stuff is in utf-8, too. // The first line contains the name -- this means we look until we arrive at the first newline - QValueVector line1; + TQValueVector line1; - Q_UINT32 i = 0; + TQ_UINT32 i = 0; while (m_data[i] != '\n' && i < m_data.size()) { line1.append(m_data[i]); i++; } - setName(i18n(QString::fromUtf8(&line1[0], i).ascii())); + setName(i18n(TQString::fromUtf8(&line1[0], i).ascii())); i++; // Skip past the first newline // The second line contains the number of brushes, separated by a space from the parasite // XXX: This stuff is in utf-8, too. - QValueVector line2; + TQValueVector line2; while (m_data[i] != '\n' && i < m_data.size()) { line2.append(m_data[i]); i++; } - QString paramline = QString::fromUtf8((&line2[0]), line2.size()); - Q_UINT32 m_numOfBrushes = paramline.left(paramline.find(' ')).toUInt(); - m_parasite = paramline.mid(paramline.find(' ') + 1); + TQString paramline = TQString::fromUtf8((&line2[0]), line2.size()); + TQ_UINT32 m_numOfBrushes = paramline.left(paramline.tqfind(' ')).toUInt(); + m_parasite = paramline.mid(paramline.tqfind(' ') + 1); i++; // Skip past the second newline - Q_UINT32 numOfBrushes = 0; + TQ_UINT32 numOfBrushes = 0; while (numOfBrushes < m_numOfBrushes && i < m_data.size()){ KisBrush * brush = new KisBrush(name() + "_" + numOfBrushes, m_data, @@ -263,18 +263,18 @@ bool KisImagePipeBrush::init() bool KisImagePipeBrush::save() { - QFile file(filename()); + TQFile file(filename()); file.open(IO_WriteOnly | IO_Truncate); bool ok = saveToDevice(&file); file.close(); return ok; } -bool KisImagePipeBrush::saveToDevice(QIODevice* dev) const +bool KisImagePipeBrush::saveToDevice(TQIODevice* dev) const { - QCString utf8Name = name().utf8(); // Names in v2 brushes are in UTF-8 + TQCString utf8Name = name().utf8(); // Names in v2 brushes are in UTF-8 char const* name = utf8Name.data(); - int len = qstrlen(name); + int len = tqstrlen(name); if (parasite().dim != 1) { kdWarning(41001) << "Save to file for pipe brushes with dim != not yet supported!" << endl; @@ -308,7 +308,7 @@ bool KisImagePipeBrush::saveToDevice(QIODevice* dev) const return true; } -QImage KisImagePipeBrush::img() +TQImage KisImagePipeBrush::img() { if (m_brushes.isEmpty()) { return 0; @@ -318,11 +318,11 @@ QImage KisImagePipeBrush::img() } } -KisAlphaMaskSP KisImagePipeBrush::mask(const KisPaintInformation& info, double subPixelX, double subPixelY) const +KisAlphaMaskSP KisImagePipeBrush::tqmask(const KisPaintInformation& info, double subPixelX, double subPixelY) const { if (m_brushes.isEmpty()) return 0; selectNextBrush(info); - return m_brushes.at(m_currentBrush)->mask(info, subPixelX, subPixelY); + return m_brushes.at(m_currentBrush)->tqmask(info, subPixelX, subPixelY); } KisPaintDeviceSP KisImagePipeBrush::image(KisColorSpace * colorSpace, const KisPaintInformation& info, double subPixelX, double subPixelY) const @@ -332,7 +332,7 @@ KisPaintDeviceSP KisImagePipeBrush::image(KisColorSpace * colorSpace, const KisP return m_brushes.at(m_currentBrush)->image(colorSpace, info, subPixelX, subPixelY); } -void KisImagePipeBrush::setParasiteString(const QString& parasite) +void KisImagePipeBrush::setParasiteString(const TQString& parasite) { m_parasiteString = parasite; m_parasite = KisPipeBrushParasite(parasite); @@ -433,16 +433,16 @@ KisImagePipeBrush* KisImagePipeBrush::clone() const { // The obvious way of cloning each brush in this one doesn't work for some reason... // XXX Multidimensionals not supported yet, change together with the constructor... - QValueVector< QValueVector > devices; - QValueVector modes; + TQValueVector< TQValueVector > devices; + TQValueVector modes; - devices.push_back(QValueVector()); + devices.push_back(TQValueVector()); modes.push_back(m_parasite.selection[0]); for (uint i = 0; i < m_brushes.count(); i++) { KisPaintDevice* pd = new KisPaintDevice( KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),""), "clone pd" ); - pd->convertFromQImage(m_brushes.at(i)->img(), ""); + pd->convertFromTQImage(m_brushes.at(i)->img(), ""); devices.at(0).append(pd); } diff --git a/krita/core/kis_imagepipe_brush.h b/krita/core/kis_imagepipe_brush.h index 8a183848..bc54204b 100644 --- a/krita/core/kis_imagepipe_brush.h +++ b/krita/core/kis_imagepipe_brush.h @@ -19,11 +19,11 @@ #ifndef KIS_IMAGEPIPE_BRUSH_ #define KIS_IMAGEPIPE_BRUSH_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -31,10 +31,10 @@ #include "kis_brush.h" #include "kis_global.h" -class QCString; -class QImage; -class QPoint; -class QSize; +class TQCString; +class TQImage; +class TQPoint; +class TQSize; /** * The parasite info that gets loaded from the terribly documented gimp pipe brush parasite. @@ -66,11 +66,11 @@ public: /// Initializes the brushesCount helper void setBrushesCount(); /// Load the parasite from the source string - KisPipeBrushParasite(const QString& source); + KisPipeBrushParasite(const TQString& source); /** * Saves a GIMP-compatible representation of this parasite to the device. Also writes the * number of brushes (== ncells) (no trailing '\n') */ - bool saveToDevice(QIODevice* dev) const; + bool saveToDevice(TQIODevice* dev) const; /** Velocity won't be supported, atm Angular and Tilt aren't either, but have chances of implementation */ enum SelectionMode { @@ -78,21 +78,21 @@ public: }; enum Placement { DefaultPlacement, ConstantPlacement, RandomPlacement }; static int const MaxDim = 4; - //Q_INT32 step; - Q_INT32 ncells; - Q_INT32 dim; + //TQ_INT32 step; + TQ_INT32 ncells; + TQ_INT32 dim; // Apparantly only used for editing a pipe brush, which we won't at the moment - // Q_INT32 cols, rows; - // Q_INT32 cellwidth, cellheight; + // TQ_INT32 cols, rows; + // TQ_INT32 cellwidth, cellheight; // Aparantly the gimp doesn't use this anymore? Anyway it is a bit weird to // paint at someplace else than where your cursor displays it will... //Placement placement; - Q_INT32 rank[MaxDim]; + TQ_INT32 rank[MaxDim]; SelectionMode selection[MaxDim]; /// The total count of brushes in each dimension (helper) - Q_INT32 brushesCount[MaxDim]; + TQ_INT32 brushesCount[MaxDim]; /// The current index in each dimension, so that the selection modes know where to start - Q_INT32 index[MaxDim]; + TQ_INT32 index[MaxDim]; /// If true, the brush won't be painted when there is no motion bool needsMovement; }; @@ -101,32 +101,33 @@ public: class KisImagePipeBrush : public KisBrush { typedef KisBrush super; Q_OBJECT + TQ_OBJECT public: - KisImagePipeBrush(const QString& filename); + KisImagePipeBrush(const TQString& filename); /** * Specialized constructor that makes a new pipe brush from a sequence of samesize * devices. The fact that it's a vector of a vector, is to support multidimensional * brushes (not yet supported!) */ - KisImagePipeBrush(const QString& name, int w, int h, - QValueVector< QValueVector > devices, - QValueVector modes); + KisImagePipeBrush(const TQString& name, int w, int h, + TQValueVector< TQValueVector > devices, + TQValueVector modes); virtual ~KisImagePipeBrush(); virtual bool load(); virtual bool save(); /// Will call KisBrush's saveToDevice as well - virtual bool saveToDevice(QIODevice* dev) const; + virtual bool saveToDevice(TQIODevice* dev) const; /** @return the next image in the pipe. */ - virtual QImage img(); + virtual TQImage img(); /** - @return the next mask in the pipe. + @return the next tqmask in the pipe. */ - virtual KisAlphaMaskSP mask(const KisPaintInformation& info, + virtual KisAlphaMaskSP tqmask(const KisPaintInformation& info, double subPixelX = 0, double subPixelY = 0) const; virtual KisPaintDeviceSP image(KisColorSpace * colorSpace, const KisPaintInformation& info, double subPixelX = 0, double subPixelY = 0) const; @@ -149,17 +150,17 @@ public: private: bool init(); - void setParasiteString(const QString& parasite); + void setParasiteString(const TQString& parasite); void selectNextBrush(const KisPaintInformation& info) const; - QString m_name; - QString m_parasiteString; // Contains instructions on how to use the brush + TQString m_name; + TQString m_parasiteString; // Contains instructions on how to use the brush mutable KisPipeBrushParasite m_parasite; - Q_UINT32 m_numOfBrushes; - mutable Q_UINT32 m_currentBrush; + TQ_UINT32 m_numOfBrushes; + mutable TQ_UINT32 m_currentBrush; - QByteArray m_data; - mutable QPtrList m_brushes; + TQByteArray m_data; + mutable TQPtrList m_brushes; enumBrushType m_brushType; diff --git a/krita/core/kis_iterator.cc b/krita/core/kis_iterator.cc index f43f3d5b..0e0c2d81 100644 --- a/krita/core/kis_iterator.cc +++ b/krita/core/kis_iterator.cc @@ -17,7 +17,7 @@ */ -#include +#include #include @@ -25,7 +25,7 @@ #include "kis_datamanager.h" #include "kis_tilediterator.h" -KisRectIterator::KisRectIterator ( KisDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, bool writable) +KisRectIterator::KisRectIterator ( KisDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, bool writable) { m_iter = new KisTiledRectIterator(dm, x, y, w, h, writable); } @@ -44,11 +44,11 @@ KisRectIterator::~KisRectIterator() { } -Q_UINT8 * KisRectIterator::rawData() const { return m_iter->rawData();} +TQ_UINT8 * KisRectIterator::rawData() const { return m_iter->rawData();} -const Q_UINT8 * KisRectIterator::oldRawData() const { return m_iter->oldRawData();} +const TQ_UINT8 * KisRectIterator::oldRawData() const { return m_iter->oldRawData();} -Q_INT32 KisRectIterator::nConseqPixels() const { return m_iter->nConseqPixels(); } +TQ_INT32 KisRectIterator::nConseqPixels() const { return m_iter->nConseqPixels(); } KisRectIterator & KisRectIterator::operator+=(int n) { m_iter->operator+=(n); return *this; } @@ -56,12 +56,12 @@ KisRectIterator & KisRectIterator::operator++() { m_iter->operator++(); return * bool KisRectIterator::isDone() const { return m_iter->isDone(); } -Q_INT32 KisRectIterator::x() const { return m_iter->x(); } -Q_INT32 KisRectIterator::y() const { return m_iter->y(); } +TQ_INT32 KisRectIterator::x() const { return m_iter->x(); } +TQ_INT32 KisRectIterator::y() const { return m_iter->y(); } //--------------------------------------------------------------------------------------- -KisHLineIterator::KisHLineIterator ( KisDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, bool writable) +KisHLineIterator::KisHLineIterator ( KisDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, bool writable) { m_iter = new KisTiledHLineIterator(dm, x, y, w, writable); } @@ -82,16 +82,16 @@ KisHLineIterator::~KisHLineIterator() { } -Q_UINT8 *KisHLineIterator::rawData() const +TQ_UINT8 *KisHLineIterator::rawData() const { return m_iter->rawData(); } -const Q_UINT8 *KisHLineIterator::oldRawData() const { return m_iter->oldRawData();} +const TQ_UINT8 *KisHLineIterator::oldRawData() const { return m_iter->oldRawData();} KisHLineIterator & KisHLineIterator::operator++() { m_iter->operator++(); return *this; } -Q_INT32 KisHLineIterator::nConseqHPixels() const { return m_iter->nConseqHPixels(); } +TQ_INT32 KisHLineIterator::nConseqHPixels() const { return m_iter->nConseqHPixels(); } KisHLineIterator & KisHLineIterator::operator+=(int n) { m_iter->operator+=(n); return *this; } @@ -99,15 +99,15 @@ KisHLineIterator & KisHLineIterator::operator--() { m_iter->operator--(); return bool KisHLineIterator::isDone() const { return m_iter->isDone(); } -Q_INT32 KisHLineIterator::x() const { return m_iter->x(); } +TQ_INT32 KisHLineIterator::x() const { return m_iter->x(); } -Q_INT32 KisHLineIterator::y() const { return m_iter->y(); } +TQ_INT32 KisHLineIterator::y() const { return m_iter->y(); } void KisHLineIterator::nextRow() { m_iter->nextRow(); } //--------------------------------------------------------------------------------------- -KisVLineIterator::KisVLineIterator ( KisDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 h, bool writable) +KisVLineIterator::KisVLineIterator ( KisDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, bool writable) { m_iter = new KisTiledVLineIterator(dm, x, y, h, writable); } @@ -127,16 +127,16 @@ KisVLineIterator::~KisVLineIterator() { } -Q_UINT8 *KisVLineIterator::rawData() const { return m_iter->rawData();} +TQ_UINT8 *KisVLineIterator::rawData() const { return m_iter->rawData();} -const Q_UINT8 * KisVLineIterator::oldRawData() const { return m_iter->oldRawData();} +const TQ_UINT8 * KisVLineIterator::oldRawData() const { return m_iter->oldRawData();} KisVLineIterator & KisVLineIterator::operator++() { m_iter->operator++(); return *this; } bool KisVLineIterator::isDone() const { return m_iter->isDone(); } -Q_INT32 KisVLineIterator::x() const { return m_iter->x(); } +TQ_INT32 KisVLineIterator::x() const { return m_iter->x(); } -Q_INT32 KisVLineIterator::y() const { return m_iter->y(); } +TQ_INT32 KisVLineIterator::y() const { return m_iter->y(); } void KisVLineIterator::nextCol() { return m_iter->nextCol(); } diff --git a/krita/core/kis_iterator.h b/krita/core/kis_iterator.h index 67206272..893461a5 100644 --- a/krita/core/kis_iterator.h +++ b/krita/core/kis_iterator.h @@ -19,7 +19,7 @@ #ifndef KIS_ITERATOR_H_ #define KIS_ITERATOR_H_ -#include +#include #include class KisTiledRectIterator; @@ -42,7 +42,7 @@ class KisRectIterator public: - KisRectIterator ( KisDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, bool writable); + KisRectIterator ( KisDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, bool writable); public: virtual ~KisRectIterator(); @@ -52,14 +52,14 @@ public: public: /// returns a pointer to the pixel data. Do NOT interpret the data - leave that to a colorstrategy - Q_UINT8 * rawData() const; + TQ_UINT8 * rawData() const; /// Returns a pointer to the pixel data as it was at the moment of the last memento creation. - const Q_UINT8 * oldRawData() const; + const TQ_UINT8 * oldRawData() const; /// Returns the number of consequtive pixels that we point at /// This is useful for optimizing - Q_INT32 nConseqPixels() const; + TQ_INT32 nConseqPixels() const; /// Advances a number of pixels until it reaches the end of the rect KisRectIterator & operator+=(int n); @@ -71,10 +71,10 @@ public: bool isDone() const; // current x position - Q_INT32 x() const; + TQ_INT32 x() const; // current y position - Q_INT32 y() const; + TQ_INT32 y() const; private: @@ -86,7 +86,7 @@ class KisHLineIterator public: - KisHLineIterator ( KisDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, bool writable); + KisHLineIterator ( KisDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, bool writable); public: @@ -96,17 +96,17 @@ public: public: /// Returns a pointer to the pixel data. Do NOT interpret the data - leave that to a colorstrategy - Q_UINT8 *rawData() const; + TQ_UINT8 *rawData() const; /// Returns a pointer to the pixel data as it was at the moment of the last memento creation. - const Q_UINT8 *oldRawData() const; + const TQ_UINT8 *oldRawData() const; /// Advances one pixel until it reaches the end of the line KisHLineIterator & operator++(); /// Returns the number of consequtive horizontal pixels that we point at /// This is useful for optimizing - Q_INT32 nConseqHPixels() const; + TQ_INT32 nConseqHPixels() const; /// Advances a number of pixels until it reaches the end of the line KisHLineIterator & operator+=(int n); @@ -118,10 +118,10 @@ public: bool isDone() const; /// current x position - Q_INT32 x() const; + TQ_INT32 x() const; /// current y position - Q_INT32 y() const; + TQ_INT32 y() const; /// increment to the next row and rewind to the begining void nextRow(); @@ -136,7 +136,7 @@ class KisVLineIterator { public: - KisVLineIterator ( KisDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 h, bool writable); + KisVLineIterator ( KisDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, bool writable); public: ~KisVLineIterator(); KisVLineIterator(const KisVLineIterator& rhs); @@ -144,10 +144,10 @@ public: public: /// returns a pointer to the pixel data. Do NOT interpret the data - leave that to a colorstrategy - Q_UINT8 *rawData() const; + TQ_UINT8 *rawData() const; /// Returns a pointer to the pixel data as it was at the moment of the last memento creation. - const Q_UINT8 * oldRawData() const; + const TQ_UINT8 * oldRawData() const; /// Advances one pixel until it reaches the end of the line KisVLineIterator & operator++(); @@ -156,10 +156,10 @@ public: bool isDone() const; /// current x position - Q_INT32 x() const; + TQ_INT32 x() const; /// current y position - Q_INT32 y() const; + TQ_INT32 y() const; /// increment to the next column and rewind to the begining void nextCol(); diff --git a/krita/core/kis_iteratorpixeltrait.h b/krita/core/kis_iteratorpixeltrait.h index 5aadad56..5d2c957f 100644 --- a/krita/core/kis_iteratorpixeltrait.h +++ b/krita/core/kis_iteratorpixeltrait.h @@ -76,7 +76,7 @@ public: * Return one channel from the current kispixel. Does not check whether * channel index actually exists in this colorspace. */ - inline Q_UINT8 operator[](int index) const + inline TQ_UINT8 operator[](int index) const { return m_underlyingIterator->rawData()[index]; }; /** @@ -93,7 +93,7 @@ public: /** * Returns the degree of selectedness of the pixel. */ - inline Q_UINT8 selectedness() const + inline TQ_UINT8 selectedness() const { if (m_selectionIterator) return *(m_selectionIterator->rawData()); @@ -103,11 +103,11 @@ public: }; /** - * Returns the selectionmask from the current point; this is guaranteed + * Returns the selectiontqmask from the current point; this is guaranteed * to have the same number of consecutive pixels that the iterator has * at a given point. It return a 0 if there is no selection. */ - inline Q_UINT8 * selectionMask() const + inline TQ_UINT8 * selectionMask() const { if ( m_selectionIterator ) return m_selectionIterator->rawData(); diff --git a/krita/core/kis_iterators_pixel.cc b/krita/core/kis_iterators_pixel.cc index 062fde73..e543714c 100644 --- a/krita/core/kis_iterators_pixel.cc +++ b/krita/core/kis_iterators_pixel.cc @@ -22,7 +22,7 @@ #include "kis_global.h" #include "kis_paint_device.h" -KisHLineIteratorPixel::KisHLineIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 offsetx, Q_INT32 offsety, bool writable) : +KisHLineIteratorPixel::KisHLineIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable) : KisHLineIterator(dm, x - offsetx, y - offsety, w, writable), KisIteratorPixelTrait ( ndevice, this ), m_offsetx(offsetx), m_offsety(offsety) @@ -34,7 +34,7 @@ KisHLineIteratorPixel::KisHLineIteratorPixel( KisPaintDevice *ndevice, KisDataMa } } -KisVLineIteratorPixel::KisVLineIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, Q_INT32 x, Q_INT32 y, Q_INT32 h, Q_INT32 offsetx, Q_INT32 offsety, bool writable) : +KisVLineIteratorPixel::KisVLineIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable) : KisVLineIterator(dm, x - offsetx, y - offsety, h, writable), KisIteratorPixelTrait ( ndevice, this ), m_offsetx(offsetx), m_offsety(offsety) @@ -46,7 +46,7 @@ KisVLineIteratorPixel::KisVLineIteratorPixel( KisPaintDevice *ndevice, KisDataMa } } -KisRectIteratorPixel::KisRectIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, Q_INT32 offsetx, Q_INT32 offsety, bool writable) : +KisRectIteratorPixel::KisRectIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable) : KisRectIterator(dm, x - offsetx, y - offsety, w, h, writable), KisIteratorPixelTrait ( ndevice, this ), m_offsetx(offsetx), m_offsety(offsety) diff --git a/krita/core/kis_iterators_pixel.h b/krita/core/kis_iterators_pixel.h index ad7d7f1f..bd82f856 100644 --- a/krita/core/kis_iterators_pixel.h +++ b/krita/core/kis_iterators_pixel.h @@ -35,7 +35,7 @@ class KisHLineIteratorPixel : public KisHLineIterator, public KisIteratorPixelTr public: KisHLineIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, - Q_INT32 x , Q_INT32 y , Q_INT32 w, Q_INT32 offsetx, Q_INT32 offsety, + TQ_INT32 x , TQ_INT32 y , TQ_INT32 w, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable); KisHLineIteratorPixel(const KisHLineIteratorPixel& rhs) : KisHLineIterator(rhs), KisIteratorPixelTrait(rhs) @@ -60,30 +60,30 @@ public: /// Advances a number of pixels until it reaches the end of the line KisHLineIteratorPixel & operator+=(int n) { KisHLineIterator::operator+=(n); advance(n); return *this; }; - Q_INT32 x() const { return KisHLineIterator::x() + m_offsetx; } + TQ_INT32 x() const { return KisHLineIterator::x() + m_offsetx; } - Q_INT32 y() const { return KisHLineIterator::y() + m_offsety; } + TQ_INT32 y() const { return KisHLineIterator::y() + m_offsety; } - Q_INT32 nConseqHPixels() const { + TQ_INT32 nConseqHPixels() const { if (m_selectionIterator) { - Q_INT32 parent = KisHLineIteratorPixel::nConseqHPixels(); - Q_INT32 selection = m_selectionIterator->nConseqHPixels(); - if (parent < selection) - return parent; + TQ_INT32 tqparent = KisHLineIteratorPixel::nConseqHPixels(); + TQ_INT32 selection = m_selectionIterator->nConseqHPixels(); + if (tqparent < selection) + return tqparent; return selection; } return KisHLineIteratorPixel::nConseqHPixels(); } protected: - Q_INT32 m_offsetx, m_offsety; + TQ_INT32 m_offsetx, m_offsety; }; class KisVLineIteratorPixel : public KisVLineIterator, public KisIteratorPixelTrait { public: KisVLineIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, - Q_INT32 xpos , Q_INT32 ypos , Q_INT32 height, Q_INT32 offsetx, Q_INT32 offsety, + TQ_INT32 xpos , TQ_INT32 ypos , TQ_INT32 height, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable); KisVLineIteratorPixel(const KisVLineIteratorPixel& rhs) : KisVLineIterator(rhs), KisIteratorPixelTrait(rhs) @@ -103,20 +103,20 @@ public: if (m_selectionIterator) m_selectionIterator->nextCol(); } - Q_INT32 x() const { return KisVLineIterator::x() + m_offsetx; } + TQ_INT32 x() const { return KisVLineIterator::x() + m_offsetx; } - Q_INT32 y() const { return KisVLineIterator::y() + m_offsety; } + TQ_INT32 y() const { return KisVLineIterator::y() + m_offsety; } protected: - Q_INT32 m_offsetx, m_offsety; + TQ_INT32 m_offsetx, m_offsety; }; class KisRectIteratorPixel : public KisRectIterator, public KisIteratorPixelTrait { public: KisRectIteratorPixel( KisPaintDevice *ndevice, KisDataManager *dm, KisDataManager *sel_dm, - Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, Q_INT32 offsetx, Q_INT32 offsety, + TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable); KisRectIteratorPixel(const KisRectIteratorPixel& rhs) : KisRectIterator(rhs), KisIteratorPixelTrait(rhs) @@ -131,16 +131,16 @@ public: inline KisRectIteratorPixel & operator ++() { KisRectIterator::operator++(); advance(1); return *this;} - Q_INT32 x() const { return KisRectIterator::x() + m_offsetx; } + TQ_INT32 x() const { return KisRectIterator::x() + m_offsetx; } - Q_INT32 y() const { return KisRectIterator::y() + m_offsety; } + TQ_INT32 y() const { return KisRectIterator::y() + m_offsety; } - Q_INT32 nConseqPixels() const { + TQ_INT32 nConseqPixels() const { if (m_selectionIterator) { - Q_INT32 parent = KisRectIterator::nConseqPixels(); - Q_INT32 selection = m_selectionIterator->nConseqPixels(); - if (parent < selection) - return parent; + TQ_INT32 tqparent = KisRectIterator::nConseqPixels(); + TQ_INT32 selection = m_selectionIterator->nConseqPixels(); + if (tqparent < selection) + return tqparent; return selection; } return KisRectIterator::nConseqPixels(); @@ -148,7 +148,7 @@ public: protected: - Q_INT32 m_offsetx, m_offsety; + TQ_INT32 m_offsetx, m_offsety; }; #endif diff --git a/krita/core/kis_layer.cc b/krita/core/kis_layer.cc index b19a4dcf..cac178e5 100644 --- a/krita/core/kis_layer.cc +++ b/krita/core/kis_layer.cc @@ -18,7 +18,7 @@ */ #include -#include +#include #include "kis_debug_areas.h" #include "kis_group_layer.h" @@ -33,7 +33,7 @@ namespace { typedef KNamedCommand super; public: - KisLayerCommand(const QString& name, KisLayerSP layer); + KisLayerCommand(const TQString& name, KisLayerSP layer); virtual ~KisLayerCommand() {} virtual void execute() = 0; @@ -45,7 +45,7 @@ namespace { KisLayerSP m_layer; }; - KisLayerCommand::KisLayerCommand(const QString& name, KisLayerSP layer) : + KisLayerCommand::KisLayerCommand(const TQString& name, KisLayerSP layer) : super(name), m_layer(layer) { } @@ -94,17 +94,17 @@ namespace { typedef KisLayerCommand super; public: - KisLayerOpacityCommand(KisLayerSP layer, Q_UINT8 oldOpacity, Q_UINT8 newOpacity); + KisLayerOpacityCommand(KisLayerSP layer, TQ_UINT8 oldOpacity, TQ_UINT8 newOpacity); virtual void execute(); virtual void unexecute(); private: - Q_UINT8 m_oldOpacity; - Q_UINT8 m_newOpacity; + TQ_UINT8 m_oldOpacity; + TQ_UINT8 m_newOpacity; }; - KisLayerOpacityCommand::KisLayerOpacityCommand(KisLayerSP layer, Q_UINT8 oldOpacity, Q_UINT8 newOpacity) : + KisLayerOpacityCommand::KisLayerOpacityCommand(KisLayerSP layer, TQ_UINT8 oldOpacity, TQ_UINT8 newOpacity) : super(i18n("Layer Opacity"), layer) { m_oldOpacity = oldOpacity; @@ -198,31 +198,31 @@ namespace { typedef KNamedCommand super; public: - KisLayerOffsetCommand(KisLayerSP layer, const QPoint& oldpos, const QPoint& newpos); + KisLayerOffsetCommand(KisLayerSP layer, const TQPoint& oldpos, const TQPoint& newpos); virtual ~KisLayerOffsetCommand(); virtual void execute(); virtual void unexecute(); private: - void moveTo(const QPoint& pos); + void moveTo(const TQPoint& pos); private: KisLayerSP m_layer; - QRect m_updateRect; - QPoint m_oldPos; - QPoint m_newPos; + TQRect m_updateRect; + TQPoint m_oldPos; + TQPoint m_newPos; }; - KisLayerOffsetCommand::KisLayerOffsetCommand(KisLayerSP layer, const QPoint& oldpos, const QPoint& newpos) : + KisLayerOffsetCommand::KisLayerOffsetCommand(KisLayerSP layer, const TQPoint& oldpos, const TQPoint& newpos) : super(i18n("Move Layer")) { m_layer = layer; m_oldPos = oldpos; m_newPos = newpos; - QRect currentBounds = m_layer->exactBounds(); - QRect oldBounds = currentBounds; + TQRect currentBounds = m_layer->exactBounds(); + TQRect oldBounds = currentBounds; oldBounds.moveBy(oldpos.x() - newpos.x(), oldpos.y() - newpos.y()); m_updateRect = currentBounds | oldBounds; @@ -242,7 +242,7 @@ namespace { moveTo(m_oldPos); } - void KisLayerOffsetCommand::moveTo(const QPoint& pos) + void KisLayerOffsetCommand::moveTo(const TQPoint& pos) { if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(false); @@ -266,8 +266,8 @@ static int getID() } -KisLayer::KisLayer(KisImage *img, const QString &name, Q_UINT8 opacity) : - QObject(0, name.latin1()), +KisLayer::KisLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity) : + TQObject(0, name.latin1()), KShared(), m_id(getID()), m_index(-1), @@ -283,7 +283,7 @@ KisLayer::KisLayer(KisImage *img, const QString &name, Q_UINT8 opacity) : } KisLayer::KisLayer(const KisLayer& rhs) : - QObject(), + TQObject(), KShared(rhs) { if (this != &rhs) { @@ -305,14 +305,14 @@ KisLayer::~KisLayer() { } -void KisLayer::setClean(const QRect & rect) +void KisLayer::setClean(const TQRect & rect) { if (m_dirtyRect.isValid() && rect.isValid()) { // XXX: We should only set the parts clean that were actually cleaned. However, extent and exactBounds conspire // to make that very hard atm. - //if (rect.contains(m_dirtyRect)) m_dirtyRect = QRect(); - m_dirtyRect = QRect(); + //if (rect.tqcontains(m_dirtyRect)) m_dirtyRect = TQRect(); + m_dirtyRect = TQRect(); } } @@ -323,25 +323,25 @@ bool KisLayer::dirty() } -bool KisLayer::dirty(const QRect & rc) +bool KisLayer::dirty(const TQRect & rc) { if (!m_dirtyRect.isValid() || !rc.isValid()) return false; return rc.intersects(m_dirtyRect); } -QRect KisLayer::dirtyRect() const +TQRect KisLayer::dirtyRect() const { return m_dirtyRect; } void KisLayer::setDirty(bool propagate) { - QRect rc = extent(); + TQRect rc = extent(); if (rc.isValid()) m_dirtyRect = rc; - // If we're dirty, our parent is dirty, if we've got a parent + // If we're dirty, our tqparent is dirty, if we've got a tqparent if (propagate && m_parent && rc.isValid()) m_parent->setDirty(m_dirtyRect); if (m_image && rc.isValid()) { @@ -349,9 +349,9 @@ void KisLayer::setDirty(bool propagate) } } -void KisLayer::setDirty(const QRect & rc, bool propagate) +void KisLayer::setDirty(const TQRect & rc, bool propagate) { - // If we're dirty, our parent is dirty, if we've got a parent + // If we're dirty, our tqparent is dirty, if we've got a tqparent if (rc.isValid()) m_dirtyRect |= rc; @@ -364,23 +364,23 @@ void KisLayer::setDirty(const QRect & rc, bool propagate) } } -KisGroupLayerSP KisLayer::parent() const +KisGroupLayerSP KisLayer::tqparent() const { return m_parent; } KisLayerSP KisLayer::prevSibling() const { - if (!parent()) + if (!tqparent()) return 0; - return parent()->at(index() - 1); + return tqparent()->at(index() - 1); } KisLayerSP KisLayer::nextSibling() const { - if (!parent()) + if (!tqparent()) return 0; - return parent()->at(index() + 1); + return tqparent()->at(index() + 1); } int KisLayer::index() const @@ -390,12 +390,12 @@ int KisLayer::index() const void KisLayer::setIndex(int i) { - if (!parent()) + if (!tqparent()) return; - parent()->setIndex(this, i); + tqparent()->setIndex(this, i); } -KisLayerSP KisLayer::findLayer(const QString& n) const +KisLayerSP KisLayer::findLayer(const TQString& n) const { if (name() == n) return const_cast(this); //HACK any less ugly way? findLayer() is conceptually const... @@ -437,12 +437,12 @@ bool KisLayer::matchesFlags(int flags) const return true; } -Q_UINT8 KisLayer::opacity() const +TQ_UINT8 KisLayer::opacity() const { return m_opacity; } -void KisLayer::setOpacity(Q_UINT8 val) +void KisLayer::setOpacity(TQ_UINT8 val) { if (m_opacity != val) { @@ -452,12 +452,12 @@ void KisLayer::setOpacity(Q_UINT8 val) } } -KNamedCommand *KisLayer::setOpacityCommand(Q_UINT8 newOpacity) +KNamedCommand *KisLayer::setOpacityCommand(TQ_UINT8 newOpacity) { return new KisLayerOpacityCommand(this, opacity(), newOpacity); } -KNamedCommand *KisLayer::setOpacityCommand(Q_UINT8 prevOpacity, Q_UINT8 newOpacity) +KNamedCommand *KisLayer::setOpacityCommand(TQ_UINT8 prevOpacity, TQ_UINT8 newOpacity) { return new KisLayerOpacityCommand(this, prevOpacity, newOpacity); } @@ -518,12 +518,12 @@ KNamedCommand *KisLayer::setLockedCommand(bool newLocked) return new KisLayerLockedCommand(this, newLocked); } -QString KisLayer::name() const +TQString KisLayer::name() const { return m_name; } -void KisLayer::setName(const QString& name) +void KisLayer::setName(const TQString& name) { if (!name.isEmpty() && m_name != name) { @@ -548,7 +548,7 @@ KNamedCommand *KisLayer::setCompositeOpCommand(const KisCompositeOp& newComposit return new KisLayerCompositeOpCommand(this, compositeOp(), newCompositeOp); } -KNamedCommand *KisLayer::moveCommand(QPoint oldPosition, QPoint newPosition) +KNamedCommand *KisLayer::moveCommand(TQPoint oldPosition, TQPoint newPosition) { return new KisLayerOffsetCommand(this, oldPosition, newPosition); } @@ -561,19 +561,19 @@ KisUndoAdapter *KisLayer::undoAdapter() const return 0; } -void KisLayer::paintMaskInactiveLayers(QImage &, Q_INT32, Q_INT32, Q_INT32, Q_INT32) +void KisLayer::paintMaskInactiveLayers(TQImage &, TQ_INT32, TQ_INT32, TQ_INT32, TQ_INT32) { } -void KisLayer::paintSelection(QImage &, Q_INT32, Q_INT32, Q_INT32, Q_INT32) +void KisLayer::paintSelection(TQImage &, TQ_INT32, TQ_INT32, TQ_INT32, TQ_INT32) { } -void KisLayer::paintSelection(QImage &, const QRect&, const QSize&, const QSize&) +void KisLayer::paintSelection(TQImage &, const TQRect&, const TQSize&, const TQSize&) { } -QImage KisLayer::createThumbnail(Q_INT32, Q_INT32) +TQImage KisLayer::createThumbnail(TQ_INT32, TQ_INT32) { return 0; } @@ -592,7 +592,7 @@ void KisLayerSupportsIndirectPainting::setTemporaryCompositeOp(const KisComposit m_compositeOp = c; } -void KisLayerSupportsIndirectPainting::setTemporaryOpacity(Q_UINT8 o) { +void KisLayerSupportsIndirectPainting::setTemporaryOpacity(TQ_UINT8 o) { m_compositeOpacity = o; } @@ -604,7 +604,7 @@ KisCompositeOp KisLayerSupportsIndirectPainting::temporaryCompositeOp() const { return m_compositeOp; } -Q_UINT8 KisLayerSupportsIndirectPainting::temporaryOpacity() const { +TQ_UINT8 KisLayerSupportsIndirectPainting::temporaryOpacity() const { return m_compositeOpacity; } diff --git a/krita/core/kis_layer.h b/krita/core/kis_layer.h index 5da5181d..fd710839 100644 --- a/krita/core/kis_layer.h +++ b/krita/core/kis_layer.h @@ -19,14 +19,14 @@ #ifndef KIS_LAYER_H_ #define KIS_LAYER_H_ -#include +#include #include "kis_types.h" #include "kis_layer_visitor.h" #include "kis_composite_op.h" #include class KNamedCommand; -class QPainter; +class TQPainter; class KisUndoAdapter; class KisGroupLayer; @@ -38,12 +38,13 @@ class KisGroupLayer; * is at the top of the group in the layerlist, using next will iterate to the bottom to last, * whereas previous will go up to first again. **/ -class KRITACORE_EXPORT KisLayer : public QObject, public KShared +class KRITACORE_EXPORT KisLayer : public TQObject, public KShared { Q_OBJECT + TQ_OBJECT public: - KisLayer(KisImage *img, const QString &name, Q_UINT8 opacity); + KisLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity); KisLayer(const KisLayer& rhs); virtual ~KisLayer(); @@ -51,7 +52,7 @@ public: /** * Set the specified rect to clean */ - virtual void setClean(const QRect & rect); + virtual void setClean(const TQRect & rect); /** * If the layer has been changed and not been composited yet, this returns true @@ -61,24 +62,24 @@ public: /** * Return true if the given rect intersects the dirty rect(s) of this layer */ - virtual bool dirty(const QRect & rc); + virtual bool dirty(const TQRect & rc); - virtual QRect dirtyRect() const; + virtual TQRect dirtyRect() const; /** - * Set the entire layer extent dirty; this percolates up to parent layers all the + * Set the entire layer extent dirty; this percolates up to tqparent layers all the * way to the root layer. */ virtual void setDirty(bool propagate = true); /** * Add the given rect to the set of dirty rects for this layer; - * this percolates up to parent layers all the way to the root + * this percolates up to tqparent layers all the way to the root * layer. */ - virtual void setDirty(const QRect & rect, bool propagate = true); + virtual void setDirty(const TQRect & rect, bool propagate = true); /// Return a copy of this layer virtual KisLayerSP clone() const = 0; @@ -86,41 +87,41 @@ public: /// Returns the ID of the layer, which is guaranteed to be unique among all KisLayers. int id() const { return m_id; } - /* Returns the index of the layer in its parent's list of child layers. Indices + /* Returns the index of the layer in its tqparent's list of child layers. Indices * increase from 0, which is the topmost layer in the list, to the bottommost. */ virtual int index() const; - /// Moves this layer to the specified index within its parent's list of child layers. + /// Moves this layer to the specified index within its tqparent's list of child layers. virtual void setIndex(int index); /** - * Returns the parent layer of a layer. This is 0 only for a root layer; otherwise + * Returns the tqparent layer of a layer. This is 0 only for a root layer; otherwise * this will be an actual GroupLayer */ - virtual KisGroupLayerSP parent() const; + virtual KisGroupLayerSP tqparent() const; /** - * Returns the previous sibling of this layer in the parent's list. This is the layer - * *above* this layer. 0 is returned if there is no parent, or if this child has no more + * Returns the previous sibling of this layer in the tqparent's list. This is the layer + * *above* this layer. 0 is returned if there is no tqparent, or if this child has no more * previous siblings (== firstChild()) */ virtual KisLayerSP prevSibling() const; /** - * Returns the next sibling of this layer in the parent's list. This is the layer *below* - * this layer. 0 is returned if there is no parent, or if this child has no more next + * Returns the next sibling of this layer in the tqparent's list. This is the layer *below* + * this layer. 0 is returned if there is no tqparent, or if this child has no more next * siblings (== lastChild()) */ virtual KisLayerSP nextSibling() const; /** - * Returns the sibling above this layer in its parent's list. 0 is returned if there is no parent, + * Returns the sibling above this layer in its tqparent's list. 0 is returned if there is no tqparent, * or if this layer is the topmost layer in its group. This is the same as calling prevSibling(). */ KisLayerSP siblingAbove() const { return prevSibling(); } /** - * Returns the sibling below this layer in its parent's list. 0 is returned if there is no parent, + * Returns the sibling below this layer in its tqparent's list. 0 is returned if there is no tqparent, * or if this layer is the bottommost layer in its group. This is the same as calling nextSibling(). */ KisLayerSP siblingBelow() const { return nextSibling(); } @@ -135,7 +136,7 @@ public: virtual KisLayerSP lastChild() const { return 0; } /// Recursively searches this layer and any child layers for a layer with the specified name. - virtual KisLayerSP findLayer(const QString& name) const; + virtual KisLayerSP findLayer(const TQString& name) const; /// Recursively searches this layer and any child layers for a layer with the specified ID. virtual KisLayerSP findLayer(int id) const; @@ -153,27 +154,27 @@ public: virtual void deactivate() {}; public: - virtual Q_INT32 x() const = 0; - virtual void setX(Q_INT32) = 0; + virtual TQ_INT32 x() const = 0; + virtual void setX(TQ_INT32) = 0; - virtual Q_INT32 y() const = 0; - virtual void setY(Q_INT32) = 0; + virtual TQ_INT32 y() const = 0; + virtual void setY(TQ_INT32) = 0; - virtual KNamedCommand *moveCommand(QPoint oldPosition, QPoint newPosition); + virtual KNamedCommand *moveCommand(TQPoint oldPosition, TQPoint newPosition); /// Returns an approximation of where the bounds on actual data are in this layer - virtual QRect extent() const = 0; + virtual TQRect extent() const = 0; /// Returns the exact bounds of where the actual data resides in this layer - virtual QRect exactBounds() const = 0; + virtual TQRect exactBounds() const = 0; virtual const bool visible() const; virtual void setVisible(bool v); KNamedCommand *setVisibleCommand(bool visiblel); - Q_UINT8 opacity() const; - void setOpacity(Q_UINT8 val); - KNamedCommand *setOpacityCommand(Q_UINT8 val); - KNamedCommand *setOpacityCommand(Q_UINT8 prevOpacity, Q_UINT8 newOpacity); + TQ_UINT8 opacity() const; + void setOpacity(TQ_UINT8 val); + KNamedCommand *setOpacityCommand(TQ_UINT8 val); + KNamedCommand *setOpacityCommand(TQ_UINT8 prevOpacity, TQ_UINT8 newOpacity); bool locked() const; void setLocked(bool l); @@ -184,8 +185,8 @@ public: bool temporary() const; void setTemporary(bool t); - virtual QString name() const; - virtual void setName(const QString& name); + virtual TQString name() const; + virtual void setName(const TQString& name); KisCompositeOp compositeOp() { return m_compositeOp; } void setCompositeOp(const KisCompositeOp& compositeOp); @@ -196,16 +197,16 @@ public: KisUndoAdapter *undoAdapter() const; - /// paints a mask where the selection on this layer resides - virtual void paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - virtual void paintSelection(QImage &img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize); + /// paints a tqmask where the selection on this layer resides + virtual void paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + virtual void paintSelection(TQImage &img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize); /// paints where no data is on this layer. Useful when it is a transparent layer stacked on top of another one - virtual void paintMaskInactiveLayers(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + virtual void paintMaskInactiveLayers(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); - /// Returns a thumbnail in requested size. The QImage may have transparent parts. + /// Returns a thumbnail in requested size. The TQImage may have transparent parts. /// May also return 0 - virtual QImage createThumbnail(Q_INT32 w, Q_INT32 h); + virtual TQImage createThumbnail(TQ_INT32 w, TQ_INT32 h); /// Accept the KisLayerVisitor (for the Visitor design pattern), should call the correct function on the KisLayerVisitor for this layer type virtual bool accept(KisLayerVisitor &) = 0; @@ -217,14 +218,14 @@ private: int m_id; int m_index; - Q_UINT8 m_opacity; + TQ_UINT8 m_opacity; bool m_locked; bool m_visible; bool m_temporary; // XXX: keep a list of dirty rects instead of always aggegrating them - QRect m_dirtyRect; - QString m_name; + TQRect m_dirtyRect; + TQString m_name; KisGroupLayerSP m_parent; KisImage *m_image; @@ -237,15 +238,15 @@ class KRITACORE_EXPORT KisLayerSupportsIndirectPainting { // To simulate the indirect painting KisPaintDeviceSP m_temporaryTarget; KisCompositeOp m_compositeOp; - Q_UINT8 m_compositeOpacity; + TQ_UINT8 m_compositeOpacity; public: // Indirect painting void setTemporaryTarget(KisPaintDeviceSP t); void setTemporaryCompositeOp(const KisCompositeOp& c); - void setTemporaryOpacity(Q_UINT8 o); + void setTemporaryOpacity(TQ_UINT8 o); KisPaintDeviceSP temporaryTarget(); KisCompositeOp temporaryCompositeOp() const; - Q_UINT8 temporaryOpacity() const; + TQ_UINT8 temporaryOpacity() const; // Or I could make KisLayer a virtual base of KisLayerSupportsIndirectPainting and so, but // I'm sure virtual diamond inheritance isn't as appreciated as this diff --git a/krita/core/kis_math_toolbox.cpp b/krita/core/kis_math_toolbox.cpp index d0f49e71..f4fdf88c 100644 --- a/krita/core/kis_math_toolbox.cpp +++ b/krita/core/kis_math_toolbox.cpp @@ -44,36 +44,36 @@ KisMathToolboxFactoryRegistry::~KisMathToolboxFactoryRegistry() { } template -double toDouble(Q_UINT8* data, int channelpos ) +double toDouble(TQ_UINT8* data, int channelpos ) { return (float)( *((T*)(data + channelpos)) ); } -typedef double (*PtrToDouble)(Q_UINT8*, int); +typedef double (*PtrToDouble)(TQ_UINT8*, int); template -void fromDouble(Q_UINT8* data, int channelpos, double v ) +void fromDouble(TQ_UINT8* data, int channelpos, double v ) { *((T*)(data + channelpos)) = (T)v; } -typedef void (*PtrFromDouble)(Q_UINT8*, int, double); +typedef void (*PtrFromDouble)(TQ_UINT8*, int, double); -void KisMathToolbox::transformToFR(KisPaintDeviceSP src, KisFloatRepresentation* fr, const QRect& rect) +void KisMathToolbox::transformToFR(KisPaintDeviceSP src, KisFloatRepresentation* fr, const TQRect& rect) { - Q_INT32 depth = src->colorSpace()->nColorChannels(); - QMemArray f(depth); - QValueVector cis = src->colorSpace()->channels(); - for(Q_INT32 k = 0; k < depth; k++) + TQ_INT32 depth = src->colorSpace()->nColorChannels(); + TQMemArray f(depth); + TQValueVector cis = src->colorSpace()->channels(); + for(TQ_INT32 k = 0; k < depth; k++) { switch( cis[k]->channelValueType() ) { case KisChannelInfo::UINT8: - f[k] = toDouble; + f[k] = toDouble; break; case KisChannelInfo::UINT16: - f[k] = toDouble; + f[k] = toDouble; break; #ifdef HAVE_OPENEXR case KisChannelInfo::FLOAT16: @@ -84,10 +84,10 @@ void KisMathToolbox::transformToFR(KisPaintDeviceSP src, KisFloatRepresentation* f[k] = toDouble; break; case KisChannelInfo::INT8: - f[k] = toDouble; + f[k] = toDouble; break; case KisChannelInfo::INT16: - f[k] = toDouble; + f[k] = toDouble; break; default: kdWarning() << "Unsupported value type in KisMathToolbox" << endl; @@ -101,7 +101,7 @@ void KisMathToolbox::transformToFR(KisPaintDeviceSP src, KisFloatRepresentation* float *dstIt = fr->coeffs + (i-rect.y()) * fr->size * fr->depth; while( ! srcIt.isDone() ) { - Q_UINT8* v1 = srcIt.rawData(); + TQ_UINT8* v1 = srcIt.rawData(); for( int k = 0; k < depth; k++) { *dstIt = f[k](v1, cis[k]->pos()); @@ -112,20 +112,20 @@ void KisMathToolbox::transformToFR(KisPaintDeviceSP src, KisFloatRepresentation* } } -void KisMathToolbox::transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentation* fr, const QRect& rect) +void KisMathToolbox::transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentation* fr, const TQRect& rect) { - Q_INT32 depth = dst->colorSpace()->nColorChannels(); - QMemArray f(depth); - QValueVector cis = dst->colorSpace()->channels(); - for(Q_INT32 k = 0; k < depth; k++) + TQ_INT32 depth = dst->colorSpace()->nColorChannels(); + TQMemArray f(depth); + TQValueVector cis = dst->colorSpace()->channels(); + for(TQ_INT32 k = 0; k < depth; k++) { switch( cis[k]->channelValueType() ) { case KisChannelInfo::UINT8: - f[k] = fromDouble; + f[k] = fromDouble; break; case KisChannelInfo::UINT16: - f[k] = fromDouble; + f[k] = fromDouble; break; #ifdef HAVE_OPENEXR case KisChannelInfo::FLOAT16: @@ -136,10 +136,10 @@ void KisMathToolbox::transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentatio f[k] = fromDouble; break; case KisChannelInfo::INT8: - f[k] = fromDouble; + f[k] = fromDouble; break; case KisChannelInfo::INT16: - f[k] = fromDouble; + f[k] = fromDouble; break; default: kdWarning() << "Unsupported value type in KisMathToolbox" << endl; @@ -152,7 +152,7 @@ void KisMathToolbox::transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentatio float *srcIt = fr->coeffs + (i-rect.y()) * fr->size * fr->depth; while( ! dstIt.isDone() ) { - Q_UINT8* v1 = dstIt.rawData(); + TQ_UINT8* v1 = dstIt.rawData(); for( int k = 0; k < depth; k++) { f[k](v1, cis[k]->pos(), *srcIt); diff --git a/krita/core/kis_math_toolbox.h b/krita/core/kis_math_toolbox.h index 0ddc545f..8d5bef50 100644 --- a/krita/core/kis_math_toolbox.h +++ b/krita/core/kis_math_toolbox.h @@ -21,7 +21,7 @@ #ifndef KIS_MATH_TOOLBOX_H #define KIS_MATH_TOOLBOX_H -#include +#include // typedef unsigned int uint; @@ -31,14 +31,15 @@ #include -class KisMathToolbox : public QObject { +class KisMathToolbox : public TQObject { Q_OBJECT + TQ_OBJECT public: struct KisFloatRepresentation { KisFloatRepresentation(uint nsize, uint ndepth) throw(std::bad_alloc ) : coeffs(new float[nsize*nsize*ndepth]) ,size(nsize), depth(ndepth) { // XXX: Valgrind shows that these are being used without being initialised. - for (Q_UINT32 i = 0; i < nsize*nsize*ndepth; ++i) { + for (TQ_UINT32 i = 0; i < nsize*nsize*ndepth; ++i) { coeffs[i] = 0; } } @@ -57,8 +58,8 @@ class KisMathToolbox : public QObject { * This function initialize a wavelet structure * @param lay the layer that will be used for the transformation */ - inline KisWavelet* initWavelet(KisPaintDeviceSP lay, const QRect&) throw(std::bad_alloc ); - inline uint fastWaveletTotalSteps(const QRect&); + inline KisWavelet* initWavelet(KisPaintDeviceSP lay, const TQRect&) throw(std::bad_alloc ); + inline uint fastWaveletTotalSteps(const TQRect&); /** * This function reconstruct the layer from the information of a wavelet * @param src layer from which the wavelet will be computed @@ -67,7 +68,7 @@ class KisMathToolbox : public QObject { * in transformToWavelet and in untransformToWavelet, use initWavelet to initialize * the buffer */ - virtual KisWavelet* fastWaveletTransformation(KisPaintDeviceSP src, const QRect&, KisWavelet* buff = 0) =0; + virtual KisWavelet* fastWaveletTransformation(KisPaintDeviceSP src, const TQRect&, KisWavelet* buff = 0) =0; /** * This function reconstruct the layer from the information of a wavelet * @param dst layer on which the wavelet will be untransform @@ -77,7 +78,7 @@ class KisMathToolbox : public QObject { * in transformToWavelet and in untransformToWavelet, use initWavelet to initialize * the buffer */ - virtual void fastWaveletUntransformation(KisPaintDeviceSP dst, const QRect&, KisWavelet* wav, KisWavelet* buff = 0) =0; + virtual void fastWaveletUntransformation(KisPaintDeviceSP dst, const TQRect&, KisWavelet* wav, KisWavelet* buff = 0) =0; signals: void nextStep(); protected: @@ -85,12 +86,12 @@ class KisMathToolbox : public QObject { * This function transform a paint device into a KisFloatRepresentation, this function is colorspace independant, * for Wavelet, Pyramid and FFT the data is allways the exact value of the channel stored in a float. */ - void transformToFR(KisPaintDeviceSP src, KisFloatRepresentation*, const QRect&); + void transformToFR(KisPaintDeviceSP src, KisFloatRepresentation*, const TQRect&); /** * This function transform a KisFloatRepresentation into a paint device, this function is colorspace independant, * for Wavelet, Pyramid and FFT the data is allways the exact value of the channel stored in a float. */ - void transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentation*, const QRect&); + void transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentation*, const TQRect&); private: KisID m_id; }; @@ -102,16 +103,16 @@ class KisMathToolboxFactoryRegistry : public KisGenericRegistry }; -inline KisMathToolbox::KisWavelet* KisMathToolbox::initWavelet(KisPaintDeviceSP src, const QRect& rect) throw(std::bad_alloc ) +inline KisMathToolbox::KisWavelet* KisMathToolbox::initWavelet(KisPaintDeviceSP src, const TQRect& rect) throw(std::bad_alloc ) { int size; int maxrectsize = (rect.height() < rect.width()) ? rect.width() : rect.height(); for(size = 2; size < maxrectsize; size *= 2) ; - Q_INT32 depth = src->colorSpace()->nColorChannels(); + TQ_INT32 depth = src->colorSpace()->nColorChannels(); return new KisWavelet(size, depth); } -inline uint KisMathToolbox::fastWaveletTotalSteps(const QRect& rect) +inline uint KisMathToolbox::fastWaveletTotalSteps(const TQRect& rect) { int size, steps; int maxrectsize = (rect.height() < rect.width()) ? rect.width() : rect.height(); diff --git a/krita/core/kis_merge_visitor.h b/krita/core/kis_merge_visitor.h index 73331591..68053384 100644 --- a/krita/core/kis_merge_visitor.h +++ b/krita/core/kis_merge_visitor.h @@ -20,7 +20,7 @@ #ifndef KIS_MERGE_H_ #define KIS_MERGE_H_ -#include +#include #include "kis_types.h" #include "kis_paint_device.h" @@ -45,7 +45,7 @@ public: * Don't even _think_ of creating a merge visitor without a projection; without a projection, * the adjustmentlayers won't work. */ - KisMergeVisitor(KisPaintDeviceSP projection, const QRect& rc) : + KisMergeVisitor(KisPaintDeviceSP projection, const TQRect& rc) : KisLayerVisitor() { Q_ASSERT(projection); @@ -60,8 +60,8 @@ private: KSharedPtr paintIndirect(KisPaintDeviceSP source, KSharedPtr target, KisLayerSupportsIndirectPainting* layer, - Q_INT32 sx, Q_INT32 sy, Q_INT32 dx, Q_INT32 dy, - Q_INT32 w, Q_INT32 h) { + TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 dx, TQ_INT32 dy, + TQ_INT32 w, TQ_INT32 h) { KisPainter gc2(target.data()); gc2.bitBlt(dx, dy, COMPOSITE_COPY, source, OPACITY_OPAQUE, sx, sy, w, h); @@ -85,9 +85,9 @@ public: if (!layer->visible()) return true; - Q_INT32 sx, sy, dx, dy, w, h; + TQ_INT32 sx, sy, dx, dy, w, h; - QRect rc = layer->paintDevice()->extent() & m_rc; + TQRect rc = layer->paintDevice()->extent() & m_rc; // Indirect painting? KisPaintDeviceSP tempTarget = layer->temporaryTarget(); @@ -114,11 +114,11 @@ public: gc.bitBlt(dx, dy, layer->compositeOp(), source, layer->opacity(), sx, sy, w, h); } else { if (layer->renderMask()) { - // To display the mask, we don't do things with composite op and opacity + // To display the tqmask, we don't do things with composite op and opacity // This is like the gimp does it, I guess that's ok? // Note that here we'll use m_rc, because even if the extent of the device is - // empty, we want a full mask to be drawn! (we don't change rc, since + // empty, we want a full tqmask to be drawn! (we don't change rc, since // it'd mess with setClean). This is because KisPainter::bitBlt &'s with // the source device's extent. This is ok in normal circumstances, but // we changed the default tile. Fixing this properly would mean fixing it there. @@ -129,36 +129,36 @@ public: dx = sx; dy = sy; - // The problem is that the extent of the layer mask might not be extended + // The problem is that the extent of the layer tqmask might not be extended // enough. Check if that is the case - KisPaintDeviceSP mask = layer->getMask(); - QRect mextent = mask->extent(); + KisPaintDeviceSP tqmask = layer->getMask(); + TQRect mextent = tqmask->extent(); if ((mextent & m_rc) != m_rc) { // Iterate over all pixels in the m_rc area. With just accessing the // tiles in read-write mode, we ensure that the tiles get created if they // do not exist. If they do, they'll remain untouched since we don't // actually write data to it. // XXX Admission: this is actually kind of a hack :-( - KisRectIteratorPixel it = mask->createRectIterator(sx, sy, w, h, true); + KisRectIteratorPixel it = tqmask->createRectIterator(sx, sy, w, h, true); while (!it.isDone()) ++it; } if (tempTarget) { KisPaintDeviceSP temp = new KisPaintDevice(source->colorSpace()); - mask = paintIndirect(mask, temp, layer, sx, sy, dx, dy, w, h); + tqmask = paintIndirect(tqmask, temp, layer, sx, sy, dx, dy, w, h); } - gc.bitBlt(dx, dy, COMPOSITE_OVER, mask, OPACITY_OPAQUE, sx, sy, w, h); + gc.bitBlt(dx, dy, COMPOSITE_OVER, tqmask, OPACITY_OPAQUE, sx, sy, w, h); } else { - KisSelectionSP mask = layer->getMaskAsSelection(); - // The indirect painting happens on the mask + KisSelectionSP tqmask = layer->getMaskAsSelection(); + // The indirect painting happens on the tqmask if (tempTarget && layer->editMask()) { - KisPaintDeviceSP maskSrc = layer->getMask(); - KisPaintDeviceSP temp = new KisPaintDevice(maskSrc->colorSpace()); - temp = paintIndirect(maskSrc, temp, layer, sx, sy, dx, dy, w, h); + KisPaintDeviceSP tqmaskSrc = layer->getMask(); + KisPaintDeviceSP temp = new KisPaintDevice(tqmaskSrc->colorSpace()); + temp = paintIndirect(tqmaskSrc, temp, layer, sx, sy, dx, dy, w, h); // Blegh KisRectIteratorPixel srcIt = temp->createRectIterator(sx, sy, w, h, false); - KisRectIteratorPixel dstIt = mask->createRectIterator(sx, sy, w, h, true); + KisRectIteratorPixel dstIt = tqmask->createRectIterator(sx, sy, w, h, true); while(!dstIt.isDone()) { // Same as in convertMaskToSelection @@ -167,7 +167,7 @@ public: ++dstIt; } } else if (tempTarget) { - // We have a mask, and paint indirect, but not on the mask + // We have a tqmask, and paint indirect, but not on the tqmask KisPaintDeviceSP temp = new KisPaintDevice(source->colorSpace()); source = paintIndirect(source, temp, layer, sx, sy, dx, dy, w, h); } @@ -175,7 +175,7 @@ public: gc.bltSelection(dx, dy, layer->compositeOp(), source, - mask, + tqmask, layer->opacity(), sx, sy, w, h); } } @@ -197,11 +197,11 @@ public: if (!layer->visible()) return true; - Q_INT32 sx, sy, dx, dy, w, h; + TQ_INT32 sx, sy, dx, dy, w, h; // This automatically makes sure the projection is up-to-date for the specified rect. KisPaintDeviceSP dev = layer->projection(m_rc); - QRect rc = dev->extent() & m_rc; + TQRect rc = dev->extent() & m_rc; sx = rc.left(); sy = rc.top(); @@ -232,9 +232,9 @@ public: if (!dev) return true; - Q_INT32 sx, sy, dx, dy, w, h; + TQ_INT32 sx, sy, dx, dy, w, h; - QRect rc = dev->extent() & m_rc; + TQRect rc = dev->extent() & m_rc; sx= rc.left(); sy = rc.top(); @@ -290,7 +290,7 @@ public: tmp = new KisPaintDevice(m_projection->colorSpace()); KisPainter gc(tmp); - QRect selectedRect = selection->selectedRect(); + TQRect selectedRect = selection->selectedRect(); selectedRect &= m_rc; if (selectedRect.width() == 0 || selectedRect.height() == 0) // Don't even try @@ -351,7 +351,7 @@ public: private: KisPaintDeviceSP m_projection; - QRect m_rc; + TQRect m_rc; }; #endif // KIS_MERGE_H_ diff --git a/krita/core/kis_meta_registry.cc b/krita/core/kis_meta_registry.cc index 70f21f76..9ef2c67f 100644 --- a/krita/core/kis_meta_registry.cc +++ b/krita/core/kis_meta_registry.cc @@ -15,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -39,10 +39,10 @@ KisMetaRegistry::KisMetaRegistry() // Add those things here as well, since we are not yet using KisDoc's KisFactory instance (which inits these as well) KGlobal::instance()->dirs()->addResourceType("kis_profiles", KStandardDirs::kde_default("data") + "krita/profiles/"); KGlobal::instance()->dirs()->addResourceDir("kis_profiles", "/usr/share/color/icc"); - KGlobal::instance()->dirs()->addResourceDir("kis_profiles", QDir::homeDirPath() + QString("/.icc/")); - KGlobal::instance()->dirs()->addResourceDir("kis_profiles", QDir::homeDirPath() + QString("/.color/icc/")); + KGlobal::instance()->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.icc/")); + KGlobal::instance()->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.color/icc/")); - QStringList profileFilenames; + TQStringList profileFilenames; profileFilenames += KGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.icm", true /* recursive */); profileFilenames += KGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.ICM", true); profileFilenames += KGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.ICC", true); diff --git a/krita/core/kis_nameserver.cc b/krita/core/kis_nameserver.cc index bdc59ca2..ff66144d 100644 --- a/krita/core/kis_nameserver.cc +++ b/krita/core/kis_nameserver.cc @@ -17,7 +17,7 @@ */ #include "kis_nameserver.h" -KisNameServer::KisNameServer(const QString& prefix, Q_INT32 seed) +KisNameServer::KisNameServer(const TQString& prefix, TQ_INT32 seed) { m_prefix = prefix; m_generator = seed; @@ -27,17 +27,17 @@ KisNameServer::~KisNameServer() { } -QString KisNameServer::name() +TQString KisNameServer::name() { - return m_prefix.arg(m_generator++); + return m_prefix.tqarg(m_generator++); } -Q_INT32 KisNameServer::currentSeed() const +TQ_INT32 KisNameServer::currentSeed() const { return m_generator; } -Q_INT32 KisNameServer::number() +TQ_INT32 KisNameServer::number() { return m_generator++; } diff --git a/krita/core/kis_nameserver.h b/krita/core/kis_nameserver.h index 1e4c560d..a6989853 100644 --- a/krita/core/kis_nameserver.h +++ b/krita/core/kis_nameserver.h @@ -18,22 +18,22 @@ #ifndef KIS_NAMESERVER_H_ #define KIS_NAMESERVER_H_ -#include +#include #include "kis_global.h" class KisNameServer { public: - KisNameServer(const QString& prefix, Q_INT32 seed = 1); + KisNameServer(const TQString& prefix, TQ_INT32 seed = 1); ~KisNameServer(); - QString name(); - Q_INT32 number(); - Q_INT32 currentSeed() const; + TQString name(); + TQ_INT32 number(); + TQ_INT32 currentSeed() const; void rollback(); private: - Q_INT32 m_generator; - QString m_prefix; + TQ_INT32 m_generator; + TQString m_prefix; }; #endif // KIS_NAMESERVER_H_ diff --git a/krita/core/kis_paint_device.cc b/krita/core/kis_paint_device.cc index 4bf15c1d..a6942626 100644 --- a/krita/core/kis_paint_device.cc +++ b/krita/core/kis_paint_device.cc @@ -16,13 +16,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -61,7 +61,7 @@ namespace { typedef KNamedCommand super; public: - KisPaintDeviceCommand(const QString& name, KisPaintDeviceSP paintDevice); + KisPaintDeviceCommand(const TQString& name, KisPaintDeviceSP paintDevice); virtual ~KisPaintDeviceCommand() {} virtual void execute() = 0; @@ -73,7 +73,7 @@ namespace { KisPaintDeviceSP m_paintDevice; }; - KisPaintDeviceCommand::KisPaintDeviceCommand(const QString& name, KisPaintDeviceSP paintDevice) : + KisPaintDeviceCommand::KisPaintDeviceCommand(const TQString& name, KisPaintDeviceSP paintDevice) : super(name), m_paintDevice(paintDevice) { } @@ -89,24 +89,24 @@ namespace { typedef KNamedCommand super; public: - MoveCommand(KisPaintDeviceSP device, const QPoint& oldpos, const QPoint& newpos); + MoveCommand(KisPaintDeviceSP device, const TQPoint& oldpos, const TQPoint& newpos); virtual ~MoveCommand(); virtual void execute(); virtual void unexecute(); private: - void moveTo(const QPoint& pos); + void moveTo(const TQPoint& pos); void undoOff(); void undoOn(); private: KisPaintDeviceSP m_device; - QPoint m_oldPos; - QPoint m_newPos; + TQPoint m_oldPos; + TQPoint m_newPos; }; - MoveCommand::MoveCommand(KisPaintDeviceSP device, const QPoint& oldpos, const QPoint& newpos) : + MoveCommand::MoveCommand(KisPaintDeviceSP device, const TQPoint& oldpos, const TQPoint& newpos) : super(i18n("Move Layer")) { m_device = device; @@ -146,7 +146,7 @@ namespace { undoOn(); } - void MoveCommand::moveTo(const QPoint& pos) + void MoveCommand::moveTo(const TQPoint& pos) { m_device->move(pos.x(), pos.y()); } @@ -202,7 +202,7 @@ namespace { } KisPaintDevice::KisPaintDevice(KisColorSpace * colorSpace, const char * name) : - QObject(0, name), KShared(), m_exifInfo(0), m_lock( false ) + TQObject(0, name), KShared(), m_exifInfo(0), m_lock( false ) { if (colorSpace == 0) { kdWarning(41001) << "Cannot create paint device without colorstrategy!\n"; @@ -217,8 +217,8 @@ KisPaintDevice::KisPaintDevice(KisColorSpace * colorSpace, const char * name) : m_pixelSize = colorSpace->pixelSize(); m_nChannels = colorSpace->nChannels(); - Q_UINT8* defPixel = new Q_UINT8 [ m_pixelSize ]; - colorSpace->fromQColor(Qt::black, OPACITY_TRANSPARENT, defPixel); + TQ_UINT8* defPixel = new TQ_UINT8 [ m_pixelSize ]; + colorSpace->fromTQColor(TQt::black, OPACITY_TRANSPARENT, defPixel); m_datamanager = new KisDataManager(m_pixelSize, defPixel); delete [] defPixel; @@ -236,8 +236,8 @@ KisPaintDevice::KisPaintDevice(KisColorSpace * colorSpace, const char * name) : } -KisPaintDevice::KisPaintDevice(KisLayer *parent, KisColorSpace * colorSpace, const char * name) : - QObject(0, name), KShared(), m_exifInfo(0), m_lock( false ) +KisPaintDevice::KisPaintDevice(KisLayer *tqparent, KisColorSpace * colorSpace, const char * name) : + TQObject(0, name), KShared(), m_exifInfo(0), m_lock( false ) { m_longRunningFilterTimer = 0; @@ -250,10 +250,10 @@ KisPaintDevice::KisPaintDevice(KisLayer *parent, KisColorSpace * colorSpace, con m_selectionDeselected = false; m_selection = 0; - m_parentLayer = parent; + m_parentLayer = tqparent; - if (colorSpace == 0 && parent != 0 && parent->image() != 0) { - m_colorSpace = parent->image()->colorSpace(); + if (colorSpace == 0 && tqparent != 0 && tqparent->image() != 0) { + m_colorSpace = tqparent->image()->colorSpace(); } else { m_colorSpace = colorSpace; @@ -264,27 +264,27 @@ KisPaintDevice::KisPaintDevice(KisLayer *parent, KisColorSpace * colorSpace, con m_pixelSize = m_colorSpace->pixelSize(); m_nChannels = m_colorSpace->nChannels(); - Q_UINT8* defPixel = new Q_UINT8[ m_pixelSize ]; - m_colorSpace->fromQColor(Qt::black, OPACITY_TRANSPARENT, defPixel); + TQ_UINT8* defPixel = new TQ_UINT8[ m_pixelSize ]; + m_colorSpace->fromTQColor(TQt::black, OPACITY_TRANSPARENT, defPixel); m_datamanager = new KisDataManager(m_pixelSize, defPixel); delete [] defPixel; Q_CHECK_PTR(m_datamanager); m_extentIsValid = true; - if ( QString ( name ) == QString( "Layer 1" ) ) { + if ( TQString ( name ) == TQString( "Layer 1" ) ) { m_longRunningFilters = m_colorSpace->createBackgroundFilters(); if (!m_longRunningFilters.isEmpty()) { - m_longRunningFilterTimer = new QTimer(this); - connect(m_longRunningFilterTimer, SIGNAL(timeout()), this, SLOT(runBackgroundFilters())); + m_longRunningFilterTimer = new TQTimer(this); + connect(m_longRunningFilterTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(runBackgroundFilters())); m_longRunningFilterTimer->start(2000); } } } -KisPaintDevice::KisPaintDevice(const KisPaintDevice& rhs) : QObject(), KShared(rhs) +KisPaintDevice::KisPaintDevice(const KisPaintDevice& rhs) : TQObject(), KShared(rhs) { if (this != &rhs) { m_longRunningFilterTimer = 0; @@ -324,8 +324,8 @@ KisPaintDevice::~KisPaintDevice() { delete m_dcop; delete m_longRunningFilterTimer; - QValueList::iterator it; - QValueList::iterator end = m_longRunningFilters.end(); + TQValueList::iterator it; + TQValueList::iterator end = m_longRunningFilters.end(); for (it = m_longRunningFilters.begin(); it != end; ++it) { KisFilter * f = (*it); delete f; @@ -343,17 +343,17 @@ DCOPObject *KisPaintDevice::dcopObject() return m_dcop; } -KisLayer *KisPaintDevice::parentLayer() const +KisLayer *KisPaintDevice::tqparentLayer() const { return m_parentLayer; } -void KisPaintDevice::setParentLayer(KisLayer *parentLayer) +void KisPaintDevice::setParentLayer(KisLayer *tqparentLayer) { - m_parentLayer = parentLayer; + m_parentLayer = tqparentLayer; } -void KisPaintDevice::setDirty(const QRect & rc) +void KisPaintDevice::setDirty(const TQRect & rc) { if (m_parentLayer) m_parentLayer->setDirty(rc); } @@ -373,9 +373,9 @@ KisImage *KisPaintDevice::image() const } -void KisPaintDevice::move(Q_INT32 x, Q_INT32 y) +void KisPaintDevice::move(TQ_INT32 x, TQ_INT32 y) { - QRect dirtyRect = extent(); + TQRect dirtyRect = extent(); m_x = x; m_y = y; @@ -393,31 +393,31 @@ void KisPaintDevice::move(Q_INT32 x, Q_INT32 y) emit positionChanged(this); } -void KisPaintDevice::move(const QPoint& pt) +void KisPaintDevice::move(const TQPoint& pt) { move(pt.x(), pt.y()); } -KNamedCommand * KisPaintDevice::moveCommand(Q_INT32 x, Q_INT32 y) +KNamedCommand * KisPaintDevice::moveCommand(TQ_INT32 x, TQ_INT32 y) { - KNamedCommand * cmd = new MoveCommand(this, QPoint(m_x, m_y), QPoint(x, y)); + KNamedCommand * cmd = new MoveCommand(this, TQPoint(m_x, m_y), TQPoint(x, y)); Q_CHECK_PTR(cmd); cmd->execute(); return cmd; } -void KisPaintDevice::extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const +void KisPaintDevice::extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const { m_datamanager->extent(x, y, w, h); x += m_x; y += m_y; } -QRect KisPaintDevice::extent() const +TQRect KisPaintDevice::extent() const { - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; extent(x, y, w, h); - return QRect(x, y, w, h); + return TQRect(x, y, w, h); } bool KisPaintDevice::extentIsValid() const @@ -430,27 +430,27 @@ void KisPaintDevice::setExtentIsValid(bool isValid) m_extentIsValid = isValid; } -void KisPaintDevice::exactBounds(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const +void KisPaintDevice::exactBounds(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const { - QRect r = exactBounds(); + TQRect r = exactBounds(); x = r.x(); y = r.y(); w = r.width(); h = r.height(); } -QRect KisPaintDevice::exactBoundsOldMethod() const +TQRect KisPaintDevice::exactBoundsOldMethod() const { - Q_INT32 x, y, w, h, boundX, boundY, boundW, boundH; + TQ_INT32 x, y, w, h, boundX, boundY, boundW, boundH; extent(x, y, w, h); extent(boundX, boundY, boundW, boundH); - const Q_UINT8* defaultPixel = m_datamanager->defaultPixel(); + const TQ_UINT8* defaultPixel = m_datamanager->defaultPixel(); bool found = false; - for (Q_INT32 y2 = y; y2 < y + h ; ++y2) { + for (TQ_INT32 y2 = y; y2 < y + h ; ++y2) { KisHLineIterator it = const_cast(this)->createHLineIterator(x, y2, w, false); while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { @@ -465,7 +465,7 @@ QRect KisPaintDevice::exactBoundsOldMethod() const found = false; - for (Q_INT32 y2 = y + h; y2 > y ; --y2) { + for (TQ_INT32 y2 = y + h; y2 > y ; --y2) { KisHLineIterator it = const_cast(this)->createHLineIterator(x, y2, w, false); while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { @@ -479,7 +479,7 @@ QRect KisPaintDevice::exactBoundsOldMethod() const } found = false; - for (Q_INT32 x2 = x; x2 < x + w ; ++x2) { + for (TQ_INT32 x2 = x; x2 < x + w ; ++x2) { KisVLineIterator it = const_cast(this)->createVLineIterator(x2, y, h, false); while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { @@ -495,7 +495,7 @@ QRect KisPaintDevice::exactBoundsOldMethod() const found = false; // Look for right edge ) - for (Q_INT32 x2 = x + w; x2 > x ; --x2) { + for (TQ_INT32 x2 = x + w; x2 > x ; --x2) { KisVLineIterator it = const_cast(this)->createVLineIterator(x2, y, h, false); while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { @@ -514,21 +514,21 @@ QRect KisPaintDevice::exactBoundsOldMethod() const if (found) break; } - return QRect(boundX, boundY, boundW, boundH); + return TQRect(boundX, boundY, boundW, boundH); } -QRect KisPaintDevice::exactBoundsImprovedOldMethod() const +TQRect KisPaintDevice::exactBoundsImprovedOldMethod() const { // Solution n°2 - Q_INT32 x, y, w, h, boundX2, boundY2, boundW2, boundH2; + TQ_INT32 x, y, w, h, boundX2, boundY2, boundW2, boundH2; extent(x, y, w, h); extent(boundX2, boundY2, boundW2, boundH2); - const Q_UINT8* defaultPixel = m_datamanager->defaultPixel(); + const TQ_UINT8* defaultPixel = m_datamanager->defaultPixel(); bool found = false; { KisHLineIterator it = const_cast(this)->createHLineIterator(x, y, w, false); - for (Q_INT32 y2 = y; y2 < y + h ; ++y2) { + for (TQ_INT32 y2 = y; y2 < y + h ; ++y2) { while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { boundY2 = y2; @@ -544,7 +544,7 @@ QRect KisPaintDevice::exactBoundsImprovedOldMethod() const found = false; - for (Q_INT32 y2 = y + h; y2 > y ; --y2) { + for (TQ_INT32 y2 = y + h; y2 > y ; --y2) { KisHLineIterator it = const_cast(this)->createHLineIterator(x, y2, w, false); while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { @@ -560,7 +560,7 @@ QRect KisPaintDevice::exactBoundsImprovedOldMethod() const { KisVLineIterator it = const_cast(this)->createVLineIterator(x, boundY2, boundH2, false); - for (Q_INT32 x2 = x; x2 < x + w ; ++x2) { + for (TQ_INT32 x2 = x; x2 < x + w ; ++x2) { while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { boundX2 = x2; @@ -578,7 +578,7 @@ QRect KisPaintDevice::exactBoundsImprovedOldMethod() const // Look for right edge ) { - for (Q_INT32 x2 = x + w; x2 > x ; --x2) { + for (TQ_INT32 x2 = x + w; x2 > x ; --x2) { KisVLineIterator it = const_cast(this)->createVLineIterator(/*x + w*/ x2, boundY2, boundH2, false); while (!it.isDone() && found == false) { if (memcmp(it.rawData(), defaultPixel, m_pixelSize) != 0) { @@ -597,23 +597,23 @@ QRect KisPaintDevice::exactBoundsImprovedOldMethod() const if (found) break; } } - return QRect(boundX2, boundY2, boundW2, boundH2); + return TQRect(boundX2, boundY2, boundW2, boundH2); } -QRect KisPaintDevice::exactBounds() const +TQRect KisPaintDevice::exactBounds() const { - QRect r2 = exactBoundsImprovedOldMethod(); + TQRect r2 = exactBoundsImprovedOldMethod(); return r2; } -void KisPaintDevice::crop(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisPaintDevice::crop(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { m_datamanager->setExtent(x - m_x, y - m_y, w, h); } -void KisPaintDevice::crop(QRect r) +void KisPaintDevice::crop(TQRect r) { r.moveBy(-m_x, -m_y); m_datamanager->setExtent(r); } @@ -623,14 +623,14 @@ void KisPaintDevice::clear() m_datamanager->clear(); } -void KisPaintDevice::fill(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const Q_UINT8 *fillPixel) +void KisPaintDevice::fill(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const TQ_UINT8 *fillPixel) { m_datamanager->clear(x, y, w, h, fillPixel); } void KisPaintDevice::mirrorX() { - QRect r; + TQRect r; if (hasSelection()) { r = selection()->selectedRect(); } @@ -638,7 +638,7 @@ void KisPaintDevice::mirrorX() r = exactBounds(); } - for (Q_INT32 y = r.top(); y <= r.bottom(); ++y) { + for (TQ_INT32 y = r.top(); y <= r.bottom(); ++y) { KisHLineIteratorPixel srcIt = createHLineIterator(r.x(), y, r.width(), false); KisHLineIteratorPixel dstIt = createHLineIterator(r.x(), y, r.width(), true); @@ -661,7 +661,7 @@ void KisPaintDevice::mirrorX() void KisPaintDevice::mirrorY() { /* Read a line from bottom to top and and from top to bottom and write their values to each other */ - QRect r; + TQRect r; if (hasSelection()) { r = selection()->selectedRect(); } @@ -670,7 +670,7 @@ void KisPaintDevice::mirrorY() } - Q_INT32 y1, y2; + TQ_INT32 y1, y2; for (y1 = r.top(), y2 = r.bottom(); y1 <= r.bottom(); ++y1, --y2) { KisHLineIteratorPixel itTop = createHLineIterator(r.x(), y1, r.width(), true); KisHLineIteratorPixel itBottom = createHLineIterator(r.x(), y2, r.width(), false); @@ -713,7 +713,7 @@ bool KisPaintDevice::read(KoStore *store) return retval; } -void KisPaintDevice::convertTo(KisColorSpace * dstColorSpace, Q_INT32 renderingIntent) +void KisPaintDevice::convertTo(KisColorSpace * dstColorSpace, TQ_INT32 renderingIntent) { kdDebug(41004) << "Converting " << name() << " to " << dstColorSpace->id().id() << " from " << m_colorSpace->id().id() << "\n"; @@ -726,29 +726,29 @@ void KisPaintDevice::convertTo(KisColorSpace * dstColorSpace, Q_INT32 renderingI dst.setX(getX()); dst.setY(getY()); - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; extent(x, y, w, h); - for (Q_INT32 row = y; row < y + h; ++row) { + for (TQ_INT32 row = y; row < y + h; ++row) { - Q_INT32 column = x; - Q_INT32 columnsRemaining = w; + TQ_INT32 column = x; + TQ_INT32 columnsRemaining = w; while (columnsRemaining > 0) { - Q_INT32 numContiguousDstColumns = dst.numContiguousColumns(column, row, row); - Q_INT32 numContiguousSrcColumns = numContiguousColumns(column, row, row); + TQ_INT32 numContiguousDstColumns = dst.numContiguousColumns(column, row, row); + TQ_INT32 numContiguousSrcColumns = numContiguousColumns(column, row, row); - Q_INT32 columns = QMIN(numContiguousDstColumns, numContiguousSrcColumns); - columns = QMIN(columns, columnsRemaining); + TQ_INT32 columns = TQMIN(numContiguousDstColumns, numContiguousSrcColumns); + columns = TQMIN(columns, columnsRemaining); - //const Q_UINT8 *srcData = pixel(column, row); - //Q_UINT8 *dstData = dst.writablePixel(column, row); + //const TQ_UINT8 *srcData = pixel(column, row); + //TQ_UINT8 *dstData = dst.writablePixel(column, row); KisHLineIteratorPixel srcIt = createHLineIterator(column, row, columns, false); KisHLineIteratorPixel dstIt = dst.createHLineIterator(column, row, columns, true); - const Q_UINT8 *srcData = srcIt.rawData(); - Q_UINT8 *dstData = dstIt.rawData(); + const TQ_UINT8 *srcData = srcIt.rawData(); + TQ_UINT8 *dstData = dstIt.rawData(); m_colorSpace->convertPixelsTo(srcData, dstData, dstColorSpace, columns, renderingIntent); @@ -801,14 +801,14 @@ KisUndoAdapter *KisPaintDevice::undoAdapter() const return 0; } -void KisPaintDevice::convertFromQImage(const QImage& image, const QString &srcProfileName, - Q_INT32 offsetX, Q_INT32 offsetY) +void KisPaintDevice::convertFromTQImage(const TQImage& image, const TQString &srcProfileName, + TQ_INT32 offsetX, TQ_INT32 offsetY) { - QImage img = image; + TQImage img = image; // Krita is little-endian inside. - if (img.bitOrder() == QImage::LittleEndian) { - img = img.convertBitOrder(QImage::BigEndian); + if (img.bitOrder() == TQImage::LittleEndian) { + img = img.convertBitOrder(TQImage::BigEndian); } kdDebug() << k_funcinfo << img.bitOrder()<< endl; // Krita likes bgra (convertDepth returns *this is the img is alread 32 bits) @@ -820,7 +820,7 @@ void KisPaintDevice::convertFromQImage(const QImage& image, const QString &srcPr } else { #endif - Q_UINT8 * dstData = new Q_UINT8[img.width() * img.height() * pixelSize()]; + TQ_UINT8 * dstData = new TQ_UINT8[img.width() * img.height() * pixelSize()]; KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("RGBA",""),srcProfileName)-> convertPixelsTo(img.bits(), dstData, colorSpace(), img.width() * img.height()); @@ -828,12 +828,12 @@ void KisPaintDevice::convertFromQImage(const QImage& image, const QString &srcPr // } } -QImage KisPaintDevice::convertToQImage(KisProfile * dstProfile, float exposure) +TQImage KisPaintDevice::convertToTQImage(KisProfile * dstProfile, float exposure) { - Q_INT32 x1; - Q_INT32 y1; - Q_INT32 w; - Q_INT32 h; + TQ_INT32 x1; + TQ_INT32 y1; + TQ_INT32 w; + TQ_INT32 h; x1 = - getX(); y1 = - getY(); @@ -846,31 +846,31 @@ QImage KisPaintDevice::convertToQImage(KisProfile * dstProfile, float exposure) extent(x1, y1, w, h); } - return convertToQImage(dstProfile, x1, y1, w, h, exposure); + return convertToTQImage(dstProfile, x1, y1, w, h, exposure); } -// XXX: is this faster than building the QImage ourselves? It makes -QImage KisPaintDevice::convertToQImage(KisProfile * dstProfile, Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, float exposure) +// XXX: is this faster than building the TQImage ourselves? It makes +TQImage KisPaintDevice::convertToTQImage(KisProfile * dstProfile, TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h, float exposure) { if (w < 0) - return QImage(); + return TQImage(); if (h < 0) - return QImage(); + return TQImage(); - Q_UINT8 * data = new Q_UINT8 [w * h * m_pixelSize]; + TQ_UINT8 * data = new TQ_UINT8 [w * h * m_pixelSize]; Q_CHECK_PTR(data); - // XXX: Is this really faster than converting line by line and building the QImage directly? + // XXX: Is this really faster than converting line by line and building the TQImage directly? // This copies potentially a lot of data. readBytes(data, x1, y1, w, h); - QImage image = colorSpace()->convertToQImage(data, w, h, dstProfile, INTENT_PERCEPTUAL, exposure); + TQImage image = colorSpace()->convertToTQImage(data, w, h, dstProfile, INTENT_PERCEPTUAL, exposure); delete[] data; return image; } -KisPaintDeviceSP KisPaintDevice::createThumbnailDevice(Q_INT32 w, Q_INT32 h) +KisPaintDeviceSP KisPaintDevice::createThumbnailDevice(TQ_INT32 w, TQ_INT32 h) { KisPaintDeviceSP thumbnail = new KisPaintDevice(colorSpace(), "thumbnail"); @@ -884,7 +884,7 @@ KisPaintDeviceSP KisPaintDevice::createThumbnailDevice(Q_INT32 w, Q_INT32 h) } else { - const QRect e = exactBounds(); + const TQRect e = exactBounds(); srcw = e.width(); srch = e.height(); } @@ -892,23 +892,23 @@ KisPaintDeviceSP KisPaintDevice::createThumbnailDevice(Q_INT32 w, Q_INT32 h) if (w > srcw) { w = srcw; - h = Q_INT32(double(srcw) / w * h); + h = TQ_INT32(double(srcw) / w * h); } if (h > srch) { h = srch; - w = Q_INT32(double(srch) / h * w); + w = TQ_INT32(double(srch) / h * w); } if (srcw > srch) - h = Q_INT32(double(srch) / srcw * w); + h = TQ_INT32(double(srch) / srcw * w); else if (srch > srcw) - w = Q_INT32(double(srcw) / srch * h); + w = TQ_INT32(double(srcw) / srch * h); - for (Q_INT32 y=0; y < h; ++y) { - Q_INT32 iY = (y * srch ) / h; - for (Q_INT32 x=0; x < w; ++x) { - Q_INT32 iX = (x * srcw ) / w; + for (TQ_INT32 y=0; y < h; ++y) { + TQ_INT32 iY = (y * srch ) / h; + for (TQ_INT32 x=0; x < w; ++x) { + TQ_INT32 iX = (x * srcw ) / w; thumbnail->setPixel(x, y, colorAt(iX, iY)); } } @@ -918,7 +918,7 @@ KisPaintDeviceSP KisPaintDevice::createThumbnailDevice(Q_INT32 w, Q_INT32 h) } -QImage KisPaintDevice::createThumbnail(Q_INT32 w, Q_INT32 h) +TQImage KisPaintDevice::createThumbnail(TQ_INT32 w, TQ_INT32 h) { int srcw, srch; if( image() ) @@ -928,7 +928,7 @@ QImage KisPaintDevice::createThumbnail(Q_INT32 w, Q_INT32 h) } else { - const QRect e = extent(); + const TQRect e = extent(); srcw = e.width(); srch = e.height(); } @@ -936,37 +936,37 @@ QImage KisPaintDevice::createThumbnail(Q_INT32 w, Q_INT32 h) if (w > srcw) { w = srcw; - h = Q_INT32(double(srcw) / w * h); + h = TQ_INT32(double(srcw) / w * h); } if (h > srch) { h = srch; - w = Q_INT32(double(srch) / h * w); + w = TQ_INT32(double(srch) / h * w); } if (srcw > srch) - h = Q_INT32(double(srch) / srcw * w); + h = TQ_INT32(double(srch) / srcw * w); else if (srch > srcw) - w = Q_INT32(double(srcw) / srch * h); + w = TQ_INT32(double(srcw) / srch * h); - QColor c; - Q_UINT8 opacity; - QImage img(w,h,32); + TQColor c; + TQ_UINT8 opacity; + TQImage img(w,h,32); - for (Q_INT32 y=0; y < h; ++y) { - Q_INT32 iY = (y * srch ) / h; - for (Q_INT32 x=0; x < w; ++x) { - Q_INT32 iX = (x * srcw ) / w; + for (TQ_INT32 y=0; y < h; ++y) { + TQ_INT32 iY = (y * srch ) / h; + for (TQ_INT32 x=0; x < w; ++x) { + TQ_INT32 iX = (x * srcw ) / w; pixel(iX, iY, &c, &opacity); - const QRgb rgb = c.rgb(); - img.setPixel(x, y, qRgba(qRed(rgb), qGreen(rgb), qBlue(rgb), opacity)); + const TQRgb rgb = c.rgb(); + img.setPixel(x, y, tqRgba(tqRed(rgb), tqGreen(rgb), tqBlue(rgb), opacity)); } } return img; } -KisRectIteratorPixel KisPaintDevice::createRectIterator(Q_INT32 left, Q_INT32 top, Q_INT32 w, Q_INT32 h, bool writable) +KisRectIteratorPixel KisPaintDevice::createRectIterator(TQ_INT32 left, TQ_INT32 top, TQ_INT32 w, TQ_INT32 h, bool writable) { if(hasSelection()) return KisRectIteratorPixel(this, m_datamanager, m_selection->m_datamanager, left, top, w, h, m_x, m_y, writable); @@ -974,7 +974,7 @@ KisRectIteratorPixel KisPaintDevice::createRectIterator(Q_INT32 left, Q_INT32 to return KisRectIteratorPixel(this, m_datamanager, NULL, left, top, w, h, m_x, m_y, writable); } -KisHLineIteratorPixel KisPaintDevice::createHLineIterator(Q_INT32 x, Q_INT32 y, Q_INT32 w, bool writable) +KisHLineIteratorPixel KisPaintDevice::createHLineIterator(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, bool writable) { if(hasSelection()) return KisHLineIteratorPixel(this, m_datamanager, m_selection->m_datamanager, x, y, w, m_x, m_y, writable); @@ -982,7 +982,7 @@ KisHLineIteratorPixel KisPaintDevice::createHLineIterator(Q_INT32 x, Q_INT32 y, return KisHLineIteratorPixel(this, m_datamanager, NULL, x, y, w, m_x, m_y, writable); } -KisVLineIteratorPixel KisPaintDevice::createVLineIterator(Q_INT32 x, Q_INT32 y, Q_INT32 h, bool writable) +KisVLineIteratorPixel KisPaintDevice::createVLineIterator(TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, bool writable) { if(hasSelection()) return KisVLineIteratorPixel(this, m_datamanager, m_selection->m_datamanager, x, y, h, m_x, m_y, writable); @@ -991,7 +991,7 @@ KisVLineIteratorPixel KisPaintDevice::createVLineIterator(Q_INT32 x, Q_INT32 y, } -KisRandomAccessorPixel KisPaintDevice::createRandomAccessor(Q_INT32 x, Q_INT32 y, bool writable) { +KisRandomAccessorPixel KisPaintDevice::createRandomAccessor(TQ_INT32 x, TQ_INT32 y, bool writable) { if(hasSelection()) return KisRandomAccessorPixel(m_datamanager, m_selection->m_datamanager, x, y, m_x, m_y, writable); else @@ -1010,7 +1010,7 @@ void KisPaintDevice::emitSelectionChanged() } } -void KisPaintDevice::emitSelectionChanged(const QRect& r) +void KisPaintDevice::emitSelectionChanged(const TQRect& r) { if (m_parentLayer && m_parentLayer->image()) { m_parentLayer->image()->slotSelectionChanged(r); @@ -1062,7 +1062,7 @@ void KisPaintDevice::reselect() void KisPaintDevice::addSelection(KisSelectionSP selection) { KisPainter painter(this->selection().data()); - QRect r = selection->selectedExactRect(); + TQRect r = selection->selectedExactRect(); painter.bitBlt(r.x(), r.y(), COMPOSITE_OVER, selection.data(), r.x(), r.y(), r.width(), r.height()); painter.end(); } @@ -1071,7 +1071,7 @@ void KisPaintDevice::subtractSelection(KisSelectionSP selection) { KisPainter painter(this->selection().data()); selection->invert(); - QRect r = selection->selectedExactRect(); + TQRect r = selection->selectedExactRect(); painter.bitBlt(r.x(), r.y(), COMPOSITE_ERASE, selection.data(), r.x(), r.y(), r.width(), r.height()); selection->invert(); @@ -1082,11 +1082,11 @@ void KisPaintDevice::clearSelection() { if (!hasSelection()) return; - QRect r = m_selection->selectedExactRect(); + TQRect r = m_selection->selectedExactRect(); if (r.isValid()) { - for (Q_INT32 y = 0; y < r.height(); y++) { + for (TQ_INT32 y = 0; y < r.height(); y++) { KisHLineIterator devIt = createHLineIterator(r.x(), r.y() + y, r.width(), true); KisHLineIterator selectionIt = m_selection->createHLineIterator(r.x(), r.y() + y, r.width(), false); @@ -1107,23 +1107,23 @@ void KisPaintDevice::clearSelection() } } -void KisPaintDevice::applySelectionMask(KisSelectionSP mask) +void KisPaintDevice::applySelectionMask(KisSelectionSP tqmask) { - QRect r = mask->selectedRect(); + TQRect r = tqmask->selectedRect(); crop(r); - for (Q_INT32 y = r.top(); y <= r.bottom(); ++y) { + for (TQ_INT32 y = r.top(); y <= r.bottom(); ++y) { KisHLineIterator pixelIt = createHLineIterator(r.x(), y, r.width(), true); - KisHLineIterator maskIt = mask->createHLineIterator(r.x(), y, r.width(), false); + KisHLineIterator tqmaskIt = tqmask->createHLineIterator(r.x(), y, r.width(), false); while (!pixelIt.isDone()) { // XXX: Optimize by using stretches - m_colorSpace->applyAlphaU8Mask( pixelIt.rawData(), maskIt.rawData(), 1); + m_colorSpace->applyAlphaU8Mask( pixelIt.rawData(), tqmaskIt.rawData(), 1); ++pixelIt; - ++maskIt; + ++tqmaskIt; } } } @@ -1139,25 +1139,25 @@ KisSelectionSP KisPaintDevice::setSelection( KisSelectionSP selection) else return 0; } -bool KisPaintDevice::pixel(Q_INT32 x, Q_INT32 y, QColor *c, Q_UINT8 *opacity) +bool KisPaintDevice::pixel(TQ_INT32 x, TQ_INT32 y, TQColor *c, TQ_UINT8 *opacity) { KisHLineIteratorPixel iter = createHLineIterator(x, y, 1, false); - Q_UINT8 *pix = iter.rawData(); + TQ_UINT8 *pix = iter.rawData(); if (!pix) return false; - colorSpace()->toQColor(pix, c, opacity); + colorSpace()->toTQColor(pix, c, opacity); return true; } -bool KisPaintDevice::pixel(Q_INT32 x, Q_INT32 y, KisColor * kc) +bool KisPaintDevice::pixel(TQ_INT32 x, TQ_INT32 y, KisColor * kc) { KisHLineIteratorPixel iter = createHLineIterator(x, y, 1, false); - Q_UINT8 *pix = iter.rawData(); + TQ_UINT8 *pix = iter.rawData(); if (!pix) return false; @@ -1166,25 +1166,25 @@ bool KisPaintDevice::pixel(Q_INT32 x, Q_INT32 y, KisColor * kc) return true; } -KisColor KisPaintDevice::colorAt(Q_INT32 x, Q_INT32 y) +KisColor KisPaintDevice::colorAt(TQ_INT32 x, TQ_INT32 y) { //return KisColor(m_datamanager->pixel(x - m_x, y - m_y), m_colorSpace); KisHLineIteratorPixel iter = createHLineIterator(x, y, 1, true); return KisColor(iter.rawData(), m_colorSpace); } -bool KisPaintDevice::setPixel(Q_INT32 x, Q_INT32 y, const QColor& c, Q_UINT8 opacity) +bool KisPaintDevice::setPixel(TQ_INT32 x, TQ_INT32 y, const TQColor& c, TQ_UINT8 opacity) { KisHLineIteratorPixel iter = createHLineIterator(x, y, 1, true); - colorSpace()->fromQColor(c, opacity, iter.rawData()); + colorSpace()->fromTQColor(c, opacity, iter.rawData()); return true; } -bool KisPaintDevice::setPixel(Q_INT32 x, Q_INT32 y, const KisColor& kc) +bool KisPaintDevice::setPixel(TQ_INT32 x, TQ_INT32 y, const KisColor& kc) { - Q_UINT8 * pix; + TQ_UINT8 * pix; if (kc.colorSpace() != m_colorSpace) { KisColor kc2 (kc, m_colorSpace); pix = kc2.data(); @@ -1200,39 +1200,39 @@ bool KisPaintDevice::setPixel(Q_INT32 x, Q_INT32 y, const KisColor& kc) } -Q_INT32 KisPaintDevice::numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT32 maxY) +TQ_INT32 KisPaintDevice::numContiguousColumns(TQ_INT32 x, TQ_INT32 minY, TQ_INT32 maxY) { return m_datamanager->numContiguousColumns(x - m_x, minY - m_y, maxY - m_y); } -Q_INT32 KisPaintDevice::numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 maxX) +TQ_INT32 KisPaintDevice::numContiguousRows(TQ_INT32 y, TQ_INT32 minX, TQ_INT32 maxX) { return m_datamanager->numContiguousRows(y - m_y, minX - m_x, maxX - m_x); } -Q_INT32 KisPaintDevice::rowStride(Q_INT32 x, Q_INT32 y) +TQ_INT32 KisPaintDevice::rowStride(TQ_INT32 x, TQ_INT32 y) { return m_datamanager->rowStride(x - m_x, y - m_y); } -const Q_UINT8* KisPaintDevice::pixel(Q_INT32 x, Q_INT32 y) +const TQ_UINT8* KisPaintDevice::pixel(TQ_INT32 x, TQ_INT32 y) { return m_datamanager->pixel(x - m_x, y - m_y); } -Q_UINT8* KisPaintDevice::writablePixel(Q_INT32 x, Q_INT32 y) +TQ_UINT8* KisPaintDevice::writablePixel(TQ_INT32 x, TQ_INT32 y) { return m_datamanager->writablePixel(x - m_x, y - m_y); } -void KisPaintDevice::setX(Q_INT32 x) +void KisPaintDevice::setX(TQ_INT32 x) { m_x = x; if(m_selection && m_selection != this) m_selection->setX(x); } -void KisPaintDevice::setY(Q_INT32 y) +void KisPaintDevice::setY(TQ_INT32 y) { m_y = y; if(m_selection && m_selection != this) @@ -1240,12 +1240,12 @@ void KisPaintDevice::setY(Q_INT32 y) } -void KisPaintDevice::readBytes(Q_UINT8 * data, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisPaintDevice::readBytes(TQ_UINT8 * data, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { m_datamanager->readBytes(data, x - m_x, y - m_y, w, h); } -void KisPaintDevice::writeBytes(const Q_UINT8 * data, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisPaintDevice::writeBytes(const TQ_UINT8 * data, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { m_datamanager->writeBytes( data, x - m_x, y - m_y, w, h); } @@ -1269,10 +1269,10 @@ void KisPaintDevice::runBackgroundFilters() KisTransaction * cmd = new KisTransaction("Running autofilters", this); - QRect rc = extent(); + TQRect rc = extent(); if (!m_longRunningFilters.isEmpty()) { - QValueList::iterator it; - QValueList::iterator end = m_longRunningFilters.end(); + TQValueList::iterator it; + TQValueList::iterator end = m_longRunningFilters.end(); for (it = m_longRunningFilters.begin(); it != end; ++it) { (*it)->process(this, this, 0, rc); } diff --git a/krita/core/kis_paint_device.h b/krita/core/kis_paint_device.h index 3b1dcfe7..653c013a 100644 --- a/krita/core/kis_paint_device.h +++ b/krita/core/kis_paint_device.h @@ -18,13 +18,13 @@ #ifndef KIS_PAINT_DEVICE_IMPL_H_ #define KIS_PAINT_DEVICE_IMPL_H_ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kis_types.h" #include "kdebug.h" @@ -37,11 +37,11 @@ class DCOPObject; -class QImage; -class QSize; -class QPoint; -class QWMatrix; -class QTimer; +class TQImage; +class TQSize; +class TQPoint; +class TQWMatrix; +class TQTimer; class KNamedCommand; @@ -71,11 +71,12 @@ typedef KSharedPtr KisMementoSP; * when pixels are accessed by an iterator. */ class KRITACORE_EXPORT KisPaintDevice - : public QObject + : public TQObject , public KShared { Q_OBJECT + TQ_OBJECT public: @@ -89,13 +90,13 @@ public: /** * Create a new paint device with the specified colorspace. The - * parentLayer will be notified of changes to this paint device. + * tqparentLayer will be notified of changes to this paint device. * - * @param parentLayer the layer that contains this paint device. + * @param tqparentLayer the layer that contains this paint device. * @param colorSpace the colorspace of this paint device * @param name for debugging purposes */ - KisPaintDevice(KisLayer *parentLayer, KisColorSpace * colorSpace, const char * name = 0); + KisPaintDevice(KisLayer *tqparentLayer, KisColorSpace * colorSpace, const char * name = 0); KisPaintDevice(const KisPaintDevice& rhs); virtual ~KisPaintDevice(); @@ -120,28 +121,28 @@ public: /** * Moves the device to these new coordinates (so no incremental move or so) */ - virtual void move(Q_INT32 x, Q_INT32 y); + virtual void move(TQ_INT32 x, TQ_INT32 y); /** * Convenience method for the above */ - virtual void move(const QPoint& pt); + virtual void move(const TQPoint& pt); /** * Move the paint device to the specified location and make it possible to * undo the move. */ - virtual KNamedCommand * moveCommand(Q_INT32 x, Q_INT32 y); + virtual KNamedCommand * moveCommand(TQ_INT32 x, TQ_INT32 y); /** * Returns true of x,y is within the extent of this paint device */ - bool contains(Q_INT32 x, Q_INT32 y) const; + bool tqcontains(TQ_INT32 x, TQ_INT32 y) const; /** * Convenience method for the above */ - bool contains(const QPoint& pt) const; + bool tqcontains(const TQPoint& pt) const; /** * Retrieve the bounds of the paint device. The size is not exact, @@ -149,8 +150,8 @@ public: * For instance, the tiled datamanager keeps the extent to the nearest * multiple of 64. */ - virtual void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const; - virtual QRect extent() const; + virtual void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const; + virtual TQRect extent() const; /** * XXX: This should be a temporay hack, awaiting a proper fix. @@ -168,18 +169,18 @@ public: * Get the exact bounds of this paint device. This may be very slow, * especially on larger paint devices because it does a linear scanline search. */ - virtual void exactBounds(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const; - virtual QRect exactBounds() const; - virtual QRect exactBoundsOldMethod() const; - virtual QRect exactBoundsImprovedOldMethod() const; + virtual void exactBounds(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const; + virtual TQRect exactBounds() const; + virtual TQRect exactBoundsOldMethod() const; + virtual TQRect exactBoundsImprovedOldMethod() const; /** * Cut the paint device down to the specified rect */ - void crop(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + void crop(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); /// Convience method for the above - void crop(QRect r); + void crop(TQRect r); /** * Complete erase the current paint device. Its size will become 0. @@ -189,7 +190,7 @@ public: /** * Fill the given rectangle with the given pixel. */ - void fill(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const Q_UINT8 *fillPixel); + void fill(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const TQ_UINT8 *fillPixel); /** * Read the bytes representing the rectangle described by x, y, w, h into @@ -201,7 +202,7 @@ public: * Reading from areas not previously initialized will read the default * pixel value into data but not initialize that region. */ - virtual void readBytes(Q_UINT8 * data, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + virtual void readBytes(TQ_UINT8 * data, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); /** * Copy the bytes in data into the rect specified by x, y, w, h. If the @@ -211,40 +212,40 @@ public: * If the data is written to areas of the paint device not previously initialized, * the paint device will grow. */ - virtual void writeBytes(const Q_UINT8 * data, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + virtual void writeBytes(const TQ_UINT8 * data, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); /** * Get the number of contiguous columns starting at x, valid for all values * of y between minY and maxY. */ - Q_INT32 numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT32 maxY); + TQ_INT32 numContiguousColumns(TQ_INT32 x, TQ_INT32 minY, TQ_INT32 maxY); /** * Get the number of contiguous rows starting at y, valid for all values * of x between minX and maxX. */ - Q_INT32 numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 maxX); + TQ_INT32 numContiguousRows(TQ_INT32 y, TQ_INT32 minX, TQ_INT32 maxX); /** * Get the row stride at pixel (x, y). This is the number of bytes to add to a * pointer to pixel (x, y) to access (x, y + 1). */ - Q_INT32 rowStride(Q_INT32 x, Q_INT32 y); + TQ_INT32 rowStride(TQ_INT32 x, TQ_INT32 y); /** * Get a read-only pointer to pixel (x, y). */ - KDE_DEPRECATED const Q_UINT8* pixel(Q_INT32 x, Q_INT32 y); + KDE_DEPRECATED const TQ_UINT8* pixel(TQ_INT32 x, TQ_INT32 y); /** * Get a read-write pointer to pixel (x, y). */ - KDE_DEPRECATED Q_UINT8* writablePixel(Q_INT32 x, Q_INT32 y); + KDE_DEPRECATED TQ_UINT8* writablePixel(TQ_INT32 x, TQ_INT32 y); /** * Converts the paint device to a different colorspace */ - virtual void convertTo(KisColorSpace * dstColorSpace, Q_INT32 renderingIntent = INTENT_PERCEPTUAL); + virtual void convertTo(KisColorSpace * dstColorSpace, TQ_INT32 renderingIntent = INTENT_PERCEPTUAL); /** * Changes the profile of the colorspace of this paint device to the given @@ -256,10 +257,10 @@ public: * Fill this paint device with the data from img; starting at (offsetX, offsetY) * @param srcProfileName name of the RGB profile to interpret the img as. "" is interpreted as sRGB */ - virtual void convertFromQImage(const QImage& img, const QString &srcProfileName, Q_INT32 offsetX = 0, Q_INT32 offsetY = 0); + virtual void convertFromTQImage(const TQImage& img, const TQString &srcProfileName, TQ_INT32 offsetX = 0, TQ_INT32 offsetY = 0); /** - * Create an RGBA QImage from a rectangle in the paint device. + * Create an RGBA TQImage from a rectangle in the paint device. * * @param x Left coordinate of the rectangle * @param y Top coordinate of the rectangle @@ -270,31 +271,31 @@ public: * like sRGB). * @param exposure The exposure setting used to render a preview of a high dynamic range image. */ - virtual QImage convertToQImage(KisProfile * dstProfile, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, float exposure = 0.0f); + virtual TQImage convertToTQImage(KisProfile * dstProfile, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, float exposure = 0.0f); /** - * Create an RGBA QImage from a rectangle in the paint device. The rectangle is defined by the parent image's bounds. + * Create an RGBA TQImage from a rectangle in the paint device. The rectangle is defined by the tqparent image's bounds. * * @param dstProfile RGB profile to use in conversion. May be 0, in which * case it's up to the colour strategy to choose a profile (most * like sRGB). * @param exposure The exposure setting used to render a preview of a high dynamic range image. */ - virtual QImage convertToQImage(KisProfile * dstProfile, float exposure = 0.0f); + virtual TQImage convertToTQImage(KisProfile * dstProfile, float exposure = 0.0f); /** * Creates a paint device thumbnail of the paint device, retaining the aspect ratio. * The width and height of the returned device won't exceed \p maxw and \p maxw, but they may be smaller. */ - KisPaintDeviceSP createThumbnailDevice(Q_INT32 w, Q_INT32 h); + KisPaintDeviceSP createThumbnailDevice(TQ_INT32 w, TQ_INT32 h); /** * Creates a thumbnail of the paint device, retaining the aspect ratio. - * The width and height of the returned QImage won't exceed \p maxw and \p maxw, but they may be smaller. + * The width and height of the returned TQImage won't exceed \p maxw and \p maxw, but they may be smaller. * The colors are not corrected for display! */ - virtual QImage createThumbnail(Q_INT32 maxw, Q_INT32 maxh); + virtual TQImage createThumbnail(TQ_INT32 maxw, TQ_INT32 maxh); /** @@ -305,7 +306,7 @@ public: * * @return true if the operation was succesful. */ - bool pixel(Q_INT32 x, Q_INT32 y, QColor *c, Q_UINT8 *opacity); + bool pixel(TQ_INT32 x, TQ_INT32 y, TQColor *c, TQ_UINT8 *opacity); /** @@ -317,17 +318,17 @@ public: * * @return true if the operation was succesful. */ - bool pixel(Q_INT32 x, Q_INT32 y, KisColor * kc); + bool pixel(TQ_INT32 x, TQ_INT32 y, KisColor * kc); /** * Return the KisColor of the pixel at x,y. */ - KisColor colorAt(Q_INT32 x, Q_INT32 y); + KisColor colorAt(TQ_INT32 x, TQ_INT32 y); /** * Set the specified pixel to the specified color. Note that this * bypasses KisPainter. the PaintDevice is here used as an equivalent - * to QImage, not QPixmap. This means that this is not undoable; also, + * to TQImage, not TQPixmap. This means that this is not undoable; also, * there is no compositing with an existing value at this location. * * The color values will be transformed from the display profile to @@ -339,9 +340,9 @@ public: * @return true if the operation was succesful * */ - bool setPixel(Q_INT32 x, Q_INT32 y, const QColor& c, Q_UINT8 opacity); + bool setPixel(TQ_INT32 x, TQ_INT32 y, const TQColor& c, TQ_UINT8 opacity); - bool setPixel(Q_INT32 x, Q_INT32 y, const KisColor& kc); + bool setPixel(TQ_INT32 x, TQ_INT32 y, const KisColor& kc); KisColorSpace * colorSpace() const; @@ -355,37 +356,37 @@ public: /** * The X offset of the paint device */ - Q_INT32 getX() const; + TQ_INT32 getX() const; /** * The Y offset of the paint device */ - Q_INT32 getY() const; + TQ_INT32 getY() const; /** * Return the X offset of the paint device */ - void setX(Q_INT32 x); + void setX(TQ_INT32 x); /** * Return the Y offset of the paint device */ - void setY(Q_INT32 y); + void setY(TQ_INT32 y); /** * Return the number of bytes a pixel takes. */ - virtual Q_INT32 pixelSize() const; + virtual TQ_INT32 pixelSize() const; /** * Return the number of channels a pixel takes */ - virtual Q_INT32 nChannels() const; + virtual TQ_INT32 nChannels() const; /** * Return the image that contains this paint device, or 0 if it is not - * part of an image. This is the same as calling parentLayer()->image(). + * part of an image. This is the same as calling tqparentLayer()->image(). */ KisImage *image() const; @@ -393,21 +394,21 @@ public: * Returns the KisLayer that contains this paint device, or 0 if this is not * part of a layer. */ - KisLayer *parentLayer() const; + KisLayer *tqparentLayer() const; /** * Set the KisLayer that contains this paint device, or 0 if this is not * part of a layer. */ - void setParentLayer(KisLayer *parentLayer); + void setParentLayer(KisLayer *tqparentLayer); /** - * Add the specified rect top the parent layer (if present) + * Add the specified rect top the tqparent layer (if present) */ - virtual void setDirty(const QRect & rc); + virtual void setDirty(const TQRect & rc); /** - * Set the parent layer completely dirty, if this paint device has one. + * Set the tqparent layer completely dirty, if this paint device has one. */ virtual void setDirty(); @@ -428,17 +429,17 @@ public: /** * This function return an iterator which points to the first pixel of an rectangle */ - KisRectIteratorPixel createRectIterator(Q_INT32 left, Q_INT32 top, Q_INT32 w, Q_INT32 h, bool writable); + KisRectIteratorPixel createRectIterator(TQ_INT32 left, TQ_INT32 top, TQ_INT32 w, TQ_INT32 h, bool writable); /** * This function return an iterator which points to the first pixel of a horizontal line */ - KisHLineIteratorPixel createHLineIterator(Q_INT32 x, Q_INT32 y, Q_INT32 w, bool writable); + KisHLineIteratorPixel createHLineIterator(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, bool writable); /** * This function return an iterator which points to the first pixel of a vertical line */ - KisVLineIteratorPixel createVLineIterator(Q_INT32 x, Q_INT32 y, Q_INT32 h, bool writable); + KisVLineIteratorPixel createVLineIterator(TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, bool writable); /** * This function creates a random accessor which allow to randomly access any pixels on @@ -446,7 +447,7 @@ public: * Note: random access is way slower than iterators, allways use iterators whenever * you can */ - KisRandomAccessorPixel createRandomAccessor(Q_INT32 x, Q_INT32 y, bool writable); + KisRandomAccessorPixel createRandomAccessor(TQ_INT32 x, TQ_INT32 y, bool writable); /** * This function create a random accessor which can easily access to sub pixel values. @@ -478,10 +479,10 @@ public: void clearSelection(); /** - * Apply a mask to the image data, i.e. multiply each pixel's opacity by its - * selectedness in the mask. + * Apply a tqmask to the image data, i.e. multiply each pixel's opacity by its + * selectedness in the tqmask. */ - void applySelectionMask(KisSelectionSP mask); + void applySelectionMask(KisSelectionSP tqmask); /** * Sets the selection of this paint device to the new selection, @@ -500,7 +501,7 @@ public: * * @param r the area for which the selection has changed */ - void emitSelectionChanged(const QRect& r); + void emitSelectionChanged(const TQRect& r); KisUndoAdapter *undoAdapter() const; @@ -516,7 +517,7 @@ public: bool hasExifInfo() { return m_exifInfo != 0; } signals: void positionChanged(KisPaintDeviceSP device); - void ioProgress(Q_INT8 percentage); + void ioProgress(TQ_INT8 percentage); void profileChanged(KisProfile * profile); private slots: @@ -537,12 +538,12 @@ private: bool m_extentIsValid; - Q_INT32 m_x; - Q_INT32 m_y; + TQ_INT32 m_x; + TQ_INT32 m_y; KisColorSpace * m_colorSpace; // Cached for quick access - Q_INT32 m_pixelSize; - Q_INT32 m_nChannels; + TQ_INT32 m_pixelSize; + TQ_INT32 m_nChannels; // Whether the selection is active bool m_hasSelection; @@ -556,19 +557,19 @@ private: KisExifInfo* m_exifInfo; - QValueList m_longRunningFilters; - QTimer * m_longRunningFilterTimer; + TQValueList m_longRunningFilters; + TQTimer * m_longRunningFilterTimer; bool m_lock; }; -inline Q_INT32 KisPaintDevice::pixelSize() const +inline TQ_INT32 KisPaintDevice::pixelSize() const { Q_ASSERT(m_pixelSize > 0); return m_pixelSize; } -inline Q_INT32 KisPaintDevice::nChannels() const +inline TQ_INT32 KisPaintDevice::nChannels() const { Q_ASSERT(m_nChannels > 0); return m_nChannels; @@ -582,12 +583,12 @@ inline KisColorSpace * KisPaintDevice::colorSpace() const } -inline Q_INT32 KisPaintDevice::getX() const +inline TQ_INT32 KisPaintDevice::getX() const { return m_x; } -inline Q_INT32 KisPaintDevice::getY() const +inline TQ_INT32 KisPaintDevice::getY() const { return m_y; } diff --git a/krita/core/kis_paint_device_action.h b/krita/core/kis_paint_device_action.h index 4dbbc365..1e3d41f0 100644 --- a/krita/core/kis_paint_device_action.h +++ b/krita/core/kis_paint_device_action.h @@ -19,7 +19,7 @@ #define KIS_PAINTDEV_ACTION_H_ #include "kis_paint_device.h" -class QString; +class TQString; /** * Defines an action to do with a paint device. It can be force used by the gui on creation @@ -33,11 +33,11 @@ public: * up a dialog to choose a texture. The width and height are added because these may * be needed in some cases. */ - virtual void act(KisPaintDeviceSP paintDev, Q_INT32 w = 0, Q_INT32 h = 0) const = 0; + virtual void act(KisPaintDeviceSP paintDev, TQ_INT32 w = 0, TQ_INT32 h = 0) const = 0; /// The name of the action, to be displayed in the GUI - virtual QString name() const = 0; + virtual TQString name() const = 0; /// A description of the action, to be displayed in the GUI - virtual QString description() const = 0; + virtual TQString description() const = 0; }; #endif // KIS_PAINTDEV_ACTION_H_ diff --git a/krita/core/kis_paint_device_iface.cc b/krita/core/kis_paint_device_iface.cc index ff4c7034..1aace538 100644 --- a/krita/core/kis_paint_device_iface.cc +++ b/krita/core/kis_paint_device_iface.cc @@ -27,33 +27,33 @@ #include "kis_paint_device.h" -KisPaintDeviceIface::KisPaintDeviceIface( KisPaintDevice * parent ) +KisPaintDeviceIface::KisPaintDeviceIface( KisPaintDevice * tqparent ) : DCOPObject("paintdevice") { - m_parent = parent; + m_parent = tqparent; } -Q_INT32 KisPaintDeviceIface::pixelSize() const +TQ_INT32 KisPaintDeviceIface::pixelSize() const { return m_parent->pixelSize(); } -Q_INT32 KisPaintDeviceIface::nChannels() const +TQ_INT32 KisPaintDeviceIface::nChannels() const { return m_parent->nChannels(); } -QByteArray KisPaintDeviceIface::readBytes(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +TQByteArray KisPaintDeviceIface::readBytes(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { - QByteArray b (w * h * m_parent->pixelSize()); + TQByteArray b (w * h * m_parent->pixelSize()); - m_parent->readBytes((Q_UINT8*)b.data(), x, y, w, h); + m_parent->readBytes((TQ_UINT8*)b.data(), x, y, w, h); return b; } -void KisPaintDeviceIface::writeBytes(QByteArray bytes, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisPaintDeviceIface::writeBytes(TQByteArray bytes, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { - m_parent->writeBytes((Q_UINT8*)bytes.data(), x, y, w, h); + m_parent->writeBytes((TQ_UINT8*)bytes.data(), x, y, w, h); } DCOPRef KisPaintDeviceIface::colorSpace() const diff --git a/krita/core/kis_paint_device_iface.h b/krita/core/kis_paint_device_iface.h index d712f410..164b0380 100644 --- a/krita/core/kis_paint_device_iface.h +++ b/krita/core/kis_paint_device_iface.h @@ -23,7 +23,7 @@ #include #include -#include +#include class KisPaintDevice; @@ -31,18 +31,18 @@ class KisPaintDeviceIface : virtual public DCOPObject { K_DCOP public: - KisPaintDeviceIface( KisPaintDevice * parent ); + KisPaintDeviceIface( KisPaintDevice * tqparent ); k_dcop: /** * Return the number of bytes a pixel takes. */ - Q_INT32 pixelSize() const; + TQ_INT32 pixelSize() const; /** * Return the number of channels a pixel takes */ - Q_INT32 nChannels() const; + TQ_INT32 nChannels() const; /** * Read the bytes representing the rectangle described by x, y, w, h into @@ -54,7 +54,7 @@ k_dcop: * Reading from areas not previously initialized will read the default * pixel value into data. */ - QByteArray readBytes(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + TQByteArray readBytes(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); /** * Copy the bytes in data into the rect specified by x, y, w, h. If there @@ -64,7 +64,7 @@ k_dcop: * If the data is written to areas of the paint device not previously initialized, * the paint device will grow. */ - void writeBytes(QByteArray bytes, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + void writeBytes(TQByteArray bytes, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); /** * Get the colorspace of this image diff --git a/krita/core/kis_paint_layer.cc b/krita/core/kis_paint_layer.cc index 2567c75c..63663067 100644 --- a/krita/core/kis_paint_layer.cc +++ b/krita/core/kis_paint_layer.cc @@ -18,7 +18,7 @@ */ #include -#include +#include #include "kis_debug_areas.h" #include "kis_image.h" @@ -33,39 +33,39 @@ #include "kis_datamanager.h" #include "kis_undo_adapter.h" -KisPaintLayer::KisPaintLayer(KisImage *img, const QString& name, Q_UINT8 opacity, KisPaintDeviceSP dev) +KisPaintLayer::KisPaintLayer(KisImage *img, const TQString& name, TQ_UINT8 opacity, KisPaintDeviceSP dev) : super(img, name, opacity) { Q_ASSERT(img); Q_ASSERT(dev); m_paintdev = dev; - m_mask = 0; - m_maskAsSelection = 0; + m_tqmask = 0; + m_tqmaskAsSelection = 0; m_paintdev->setParentLayer(this); m_renderMask = false; m_editMask = true; } -KisPaintLayer::KisPaintLayer(KisImage *img, const QString& name, Q_UINT8 opacity) +KisPaintLayer::KisPaintLayer(KisImage *img, const TQString& name, TQ_UINT8 opacity) : super(img, name, opacity) { Q_ASSERT(img); m_paintdev = new KisPaintDevice(this, img->colorSpace(), name.latin1()); - m_mask = 0; - m_maskAsSelection = 0; + m_tqmask = 0; + m_tqmaskAsSelection = 0; m_renderMask = false; m_editMask = true; } -KisPaintLayer::KisPaintLayer(KisImage *img, const QString& name, Q_UINT8 opacity, KisColorSpace * colorSpace) +KisPaintLayer::KisPaintLayer(KisImage *img, const TQString& name, TQ_UINT8 opacity, KisColorSpace * colorSpace) : super(img, name, opacity) { Q_ASSERT(img); Q_ASSERT(colorSpace); m_paintdev = new KisPaintDevice(this, colorSpace, name.latin1()); - m_mask = 0; - m_maskAsSelection = 0; + m_tqmask = 0; + m_tqmaskAsSelection = 0; m_renderMask = false; m_editMask = true; } @@ -76,8 +76,8 @@ KisPaintLayer::KisPaintLayer(const KisPaintLayer& rhs) : m_paintdev = new KisPaintDevice( *rhs.m_paintdev.data() ); m_paintdev->setParentLayer(this); if (rhs.hasMask()) { - m_mask = new KisPaintDevice(*rhs.m_mask.data()); - m_mask->setParentLayer(this); + m_tqmask = new KisPaintDevice(*rhs.m_tqmask.data()); + m_tqmask->setParentLayer(this); } m_renderMask = rhs.m_renderMask; m_editMask = rhs.m_editMask; @@ -93,42 +93,42 @@ KisPaintLayer::~KisPaintLayer() if (m_paintdev != 0) { m_paintdev->setParentLayer(0); } - if (m_mask != 0) { - m_mask->setParentLayer(0); + if (m_tqmask != 0) { + m_tqmask->setParentLayer(0); } } -void KisPaintLayer::paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisPaintLayer::paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { if (m_paintdev && m_paintdev->hasSelection()) { m_paintdev->selection()->paintSelection(img, x, y, w, h); - } else if (m_mask && m_editMask && m_mask->hasSelection()) { - m_mask->selection()->paintSelection(img, x, y, w, h); + } else if (m_tqmask && m_editMask && m_tqmask->hasSelection()) { + m_tqmask->selection()->paintSelection(img, x, y, w, h); } } -void KisPaintLayer::paintSelection(QImage &img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize) +void KisPaintLayer::paintSelection(TQImage &img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize) { if (m_paintdev && m_paintdev->hasSelection()) { m_paintdev->selection()->paintSelection(img, scaledImageRect, scaledImageSize, imageSize); - } else if (m_mask && m_editMask && m_mask->hasSelection()) { - m_mask->selection()->paintSelection(img, scaledImageRect, scaledImageSize, imageSize); + } else if (m_tqmask && m_editMask && m_tqmask->hasSelection()) { + m_tqmask->selection()->paintSelection(img, scaledImageRect, scaledImageSize, imageSize); } } -void KisPaintLayer::paintMaskInactiveLayers(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisPaintLayer::paintMaskInactiveLayers(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { uchar *j = img.bits(); KisColorSpace *cs = m_paintdev->colorSpace(); - for (Q_INT32 y2 = y; y2 < h + y; ++y2) { + for (TQ_INT32 y2 = y; y2 < h + y; ++y2) { KisHLineIteratorPixel it = m_paintdev->createHLineIterator(x, y2, w, false); while ( ! it.isDone()) { - Q_UINT8 s = cs->getAlpha(it.rawData()); + TQ_UINT8 s = cs->getAlpha(it.rawData()); if(s==0) { - Q_UINT8 g = (*(j + 0) + *(j + 1 ) + *(j + 2 )) / 9; + TQ_UINT8 g = (*(j + 0) + *(j + 1 ) + *(j + 2 )) / 9; *(j+0) = 128+g ; *(j+1) = 165+g; @@ -140,66 +140,66 @@ void KisPaintLayer::paintMaskInactiveLayers(QImage &img, Q_INT32 x, Q_INT32 y, Q } } -QImage KisPaintLayer::createThumbnail(Q_INT32 w, Q_INT32 h) +TQImage KisPaintLayer::createThumbnail(TQ_INT32 w, TQ_INT32 h) { if (m_paintdev) return m_paintdev->createThumbnail(w, h); else - return QImage(); + return TQImage(); } -Q_INT32 KisPaintLayer::x() const { +TQ_INT32 KisPaintLayer::x() const { if (m_paintdev) return m_paintdev->getX(); else return 0; } -void KisPaintLayer::setX(Q_INT32 x) +void KisPaintLayer::setX(TQ_INT32 x) { if (m_paintdev) m_paintdev->setX(x); } -Q_INT32 KisPaintLayer::y() const { +TQ_INT32 KisPaintLayer::y() const { if (m_paintdev) return m_paintdev->getY(); else return 0; } -void KisPaintLayer::setY(Q_INT32 y) { +void KisPaintLayer::setY(TQ_INT32 y) { if (m_paintdev) m_paintdev->setY(y); } -QRect KisPaintLayer::extent() const { +TQRect KisPaintLayer::extent() const { if (m_paintdev) return m_paintdev->extent(); else - return QRect(); + return TQRect(); } -QRect KisPaintLayer::exactBounds() const { +TQRect KisPaintLayer::exactBounds() const { if (m_paintdev) return m_paintdev->exactBounds(); else - return QRect(); + return TQRect(); } void KisPaintLayer::removeMask() { if (!hasMask()) return; - m_mask->setParentLayer(0); - m_mask = 0; - m_maskAsSelection = 0; + m_tqmask->setParentLayer(0); + m_tqmask = 0; + m_tqmaskAsSelection = 0; setDirty(); emit sigMaskInfoChanged(); } -// ### XXX Do we apply the mask outside the image boundaries too? I'd say no, but I'm not sure +// ### XXX Do we apply the tqmask outside the image boundaries too? I'd say no, but I'm not sure void KisPaintLayer::applyMask() { if (!hasMask()) return; @@ -210,7 +210,7 @@ void KisPaintLayer::applyMask() { // A bit slow; but it works KisPaintDeviceSP temp = new KisPaintDevice(m_paintdev->colorSpace()); KisPainter gc(temp); - gc.bltSelection(x, y, COMPOSITE_OVER, m_paintdev, m_maskAsSelection, OPACITY_OPAQUE, x, y, w, h); + gc.bltSelection(x, y, COMPOSITE_OVER, m_paintdev, m_tqmaskAsSelection, OPACITY_OPAQUE, x, y, w, h); gc.end(); gc.begin(m_paintdev); gc.bitBlt(x, y, COMPOSITE_COPY, temp, OPACITY_OPAQUE, x, y, w, h); @@ -221,18 +221,18 @@ void KisPaintLayer::applyMask() { KisPaintDeviceSP KisPaintLayer::createMask() { if (hasMask()) - return m_mask; + return m_tqmask; kdDebug() << k_funcinfo << endl; // Grey8 nicely fits our needs of being intuitively comparable to other apps' - // mask layer interfaces. It does have an alpha component though, which is a bit + // tqmask layer interfaces. It does have an alpha component though, which is a bit // less appropriate in this context. - m_mask = new KisPaintDevice(KisMetaRegistry::instance()->csRegistry() + m_tqmask = new KisPaintDevice(KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("GRAYA"), 0)); genericMaskCreationHelper(); - return m_mask; + return m_tqmask; } // FIXME If from is a paint device is not grey8!! @@ -241,31 +241,31 @@ void KisPaintLayer::createMaskFromPaintDevice(KisPaintDeviceSP from) { return; // Or overwrite? XXX kdDebug() << k_funcinfo << endl; - m_mask = from; // KisPaintDevice(*from); XXX + m_tqmask = from; // KisPaintDevice(*from); XXX genericMaskCreationHelper(); } void KisPaintLayer::createMaskFromSelection(KisSelectionSP from) { kdDebug() << k_funcinfo << endl; - m_mask = new KisPaintDevice(KisMetaRegistry::instance()->csRegistry() + m_tqmask = new KisPaintDevice(KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("GRAYA"), 0)); - m_mask->setParentLayer(this); + m_tqmask->setParentLayer(this); - m_maskAsSelection = new KisSelection(); // Anonymous selection is good enough + m_tqmaskAsSelection = new KisSelection(); // Anonymous selection is good enough - // Default pixel is opaque white == don't mask? - Q_UINT8 const defPixel[] = { 255, 255 }; - m_mask->dataManager()->setDefaultPixel(defPixel); + // Default pixel is opaque white == don't tqmask? + TQ_UINT8 const defPixel[] = { 255, 255 }; + m_tqmask->dataManager()->setDefaultPixel(defPixel); if (from) { - QRect r(extent()); + TQRect r(extent()); int w = r.width(); int h = r.height(); for (int y = r.y(); y < h; y++) { KisHLineIteratorPixel srcIt = from->createHLineIterator(r.x(), y, w, false); - KisHLineIteratorPixel dstIt = m_mask->createHLineIterator(r.x(), y, w, true); + KisHLineIteratorPixel dstIt = m_tqmask->createHLineIterator(r.x(), y, w, true); while(!dstIt.isDone()) { // XXX same remark as in convertMaskToSelection @@ -286,13 +286,13 @@ void KisPaintLayer::createMaskFromSelection(KisSelectionSP from) { KisPaintDeviceSP KisPaintLayer::getMask() { createMask(); kdDebug() << k_funcinfo << endl; - return m_mask; + return m_tqmask; } KisSelectionSP KisPaintLayer::getMaskAsSelection() { createMask(); kdDebug() << k_funcinfo << endl; - return m_maskAsSelection; + return m_tqmaskAsSelection; } void KisPaintLayer::setEditMask(bool b) { @@ -309,10 +309,10 @@ void KisPaintLayer::setRenderMask(bool b) { emit sigMaskInfoChanged(); } -void KisPaintLayer::convertMaskToSelection(const QRect& r) { - KisRectIteratorPixel srcIt = m_mask->createRectIterator(r.x(), r.y(), +void KisPaintLayer::convertMaskToSelection(const TQRect& r) { + KisRectIteratorPixel srcIt = m_tqmask->createRectIterator(r.x(), r.y(), r.width(), r.height(), false); - KisRectIteratorPixel dstIt = m_maskAsSelection->createRectIterator(r.x(), r.y(), + KisRectIteratorPixel dstIt = m_tqmaskAsSelection->createRectIterator(r.x(), r.y(), r.width(), r.height(), true); while(!dstIt.isDone()) { @@ -326,13 +326,13 @@ void KisPaintLayer::convertMaskToSelection(const QRect& r) { } void KisPaintLayer::genericMaskCreationHelper() { - m_mask->setParentLayer(this); + m_tqmask->setParentLayer(this); - m_maskAsSelection = new KisSelection(); // Anonymous selection is good enough + m_tqmaskAsSelection = new KisSelection(); // Anonymous selection is good enough - // Default pixel is opaque white == don't mask? - Q_UINT8 const defPixel[] = { 255, 255 }; - m_mask->dataManager()->setDefaultPixel(defPixel); + // Default pixel is opaque white == don't tqmask? + TQ_UINT8 const defPixel[] = { 255, 255 }; + m_tqmask->dataManager()->setDefaultPixel(defPixel); setDirty(); emit sigMaskInfoChanged(); @@ -344,7 +344,7 @@ void KisPaintLayer::setDirty(bool propagate) { super::setDirty(propagate); } -void KisPaintLayer::setDirty(const QRect & rect, bool propagate) { +void KisPaintLayer::setDirty(const TQRect & rect, bool propagate) { if (hasMask()) convertMaskToSelection(rect); super::setDirty(rect, propagate); @@ -355,16 +355,16 @@ namespace { class KisCreateMaskCommand : public KNamedCommand { typedef KNamedCommand super; KisPaintLayerSP m_layer; - KisPaintDeviceSP m_mask; + KisPaintDeviceSP m_tqmask; public: - KisCreateMaskCommand(const QString& name, KisPaintLayer* layer) + KisCreateMaskCommand(const TQString& name, KisPaintLayer* layer) : super(name), m_layer(layer) {} virtual void execute() { kdDebug() << k_funcinfo << endl; - if (!m_mask) - m_mask = m_layer->createMask(); + if (!m_tqmask) + m_tqmask = m_layer->createMask(); else - m_layer->createMaskFromPaintDevice(m_mask); + m_layer->createMaskFromPaintDevice(m_tqmask); } virtual void unexecute() { m_layer->removeMask(); @@ -374,35 +374,35 @@ namespace { class KisMaskFromSelectionCommand : public KNamedCommand { typedef KNamedCommand super; KisPaintLayerSP m_layer; - KisPaintDeviceSP m_maskBefore; - KisPaintDeviceSP m_maskAfter; + KisPaintDeviceSP m_tqmaskBefore; + KisPaintDeviceSP m_tqmaskAfter; KisSelectionSP m_selection; public: - KisMaskFromSelectionCommand(const QString& name, KisPaintLayer* layer) + KisMaskFromSelectionCommand(const TQString& name, KisPaintLayer* layer) : super(name), m_layer(layer) { if (m_layer->hasMask()) - m_maskBefore = m_layer->getMask(); + m_tqmaskBefore = m_layer->getMask(); else - m_maskBefore = 0; - m_maskAfter = 0; + m_tqmaskBefore = 0; + m_tqmaskAfter = 0; if (m_layer->paintDevice()->hasSelection()) m_selection = m_layer->paintDevice()->selection(); else m_selection = 0; } virtual void execute() { - if (!m_maskAfter) { + if (!m_tqmaskAfter) { m_layer->createMaskFromSelection(m_selection); - m_maskAfter = m_layer->getMask(); + m_tqmaskAfter = m_layer->getMask(); } else { m_layer->paintDevice()->deselect(); - m_layer->createMaskFromPaintDevice(m_maskAfter); + m_layer->createMaskFromPaintDevice(m_tqmaskAfter); } } virtual void unexecute() { m_layer->paintDevice()->setSelection(m_selection); - if (m_maskBefore) - m_layer->createMaskFromPaintDevice(m_maskBefore); + if (m_tqmaskBefore) + m_layer->createMaskFromPaintDevice(m_tqmaskBefore); else m_layer->removeMask(); } @@ -411,12 +411,12 @@ namespace { class KisMaskToSelectionCommand : public KNamedCommand { typedef KNamedCommand super; KisPaintLayerSP m_layer; - KisPaintDeviceSP m_mask; + KisPaintDeviceSP m_tqmask; KisSelectionSP m_selection; public: - KisMaskToSelectionCommand(const QString& name, KisPaintLayer* layer) + KisMaskToSelectionCommand(const TQString& name, KisPaintLayer* layer) : super(name), m_layer(layer) { - m_mask = m_layer->getMask(); + m_tqmask = m_layer->getMask(); if (m_layer->paintDevice()->hasSelection()) m_selection = m_layer->paintDevice()->selection(); else @@ -431,18 +431,18 @@ namespace { m_layer->paintDevice()->setSelection(m_selection); else m_layer->paintDevice()->deselect(); - m_layer->createMaskFromPaintDevice(m_mask); + m_layer->createMaskFromPaintDevice(m_tqmask); } }; class KisRemoveMaskCommand : public KNamedCommand { typedef KNamedCommand super; KisPaintLayerSP m_layer; - KisPaintDeviceSP m_mask; + KisPaintDeviceSP m_tqmask; public: - KisRemoveMaskCommand(const QString& name, KisPaintLayer* layer) + KisRemoveMaskCommand(const TQString& name, KisPaintLayer* layer) : super(name), m_layer(layer) { - m_mask = m_layer->getMask(); + m_tqmask = m_layer->getMask(); } virtual void execute() { kdDebug() << k_funcinfo << endl; @@ -451,19 +451,19 @@ namespace { virtual void unexecute() { // I hope that if the undo stack unwinds, it will end up here in the right // state again; taking a deep-copy sounds like wasteful to me - m_layer->createMaskFromPaintDevice(m_mask); + m_layer->createMaskFromPaintDevice(m_tqmask); } }; class KisApplyMaskCommand : public KNamedCommand { typedef KNamedCommand super; KisPaintLayerSP m_layer; - KisPaintDeviceSP m_mask; + KisPaintDeviceSP m_tqmask; KisPaintDeviceSP m_original; public: - KisApplyMaskCommand(const QString& name, KisPaintLayer* layer) + KisApplyMaskCommand(const TQString& name, KisPaintLayer* layer) : super(name), m_layer(layer) { - m_mask = m_layer->getMask(); + m_tqmask = m_layer->getMask(); m_original = new KisPaintDevice(*m_layer->paintDevice()); } virtual void execute() { @@ -479,7 +479,7 @@ namespace { gc.bitBlt(x, y, COMPOSITE_COPY, m_original, OPACITY_OPAQUE, x, y, w, h); gc.end(); - m_layer->createMaskFromPaintDevice(m_mask); + m_layer->createMaskFromPaintDevice(m_tqmask); } }; } @@ -488,11 +488,11 @@ KNamedCommand* KisPaintLayer::createMaskCommand() { return new KisCreateMaskCommand(i18n("Create Layer Mask"), this); } -KNamedCommand* KisPaintLayer::maskFromSelectionCommand() { +KNamedCommand* KisPaintLayer::tqmaskFromSelectionCommand() { return new KisMaskFromSelectionCommand(i18n("Mask From Selection"), this); } -KNamedCommand* KisPaintLayer::maskToSelectionCommand() { +KNamedCommand* KisPaintLayer::tqmaskToSelectionCommand() { return new KisMaskToSelectionCommand(i18n("Mask to Selection"), this); } diff --git a/krita/core/kis_paint_layer.h b/krita/core/kis_paint_layer.h index 2c4b562f..9e598e7a 100644 --- a/krita/core/kis_paint_layer.h +++ b/krita/core/kis_paint_layer.h @@ -29,11 +29,12 @@ class KisPaintLayer : public KisLayer, public KisLayerSupportsIndirectPainting { typedef KisLayer super; Q_OBJECT + TQ_OBJECT public: - KisPaintLayer(KisImage *img, const QString& name, Q_UINT8 opacity, KisPaintDeviceSP dev); - KisPaintLayer(KisImage *img, const QString& name, Q_UINT8 opacity); - KisPaintLayer(KisImage *img, const QString& name, Q_UINT8 opacity, KisColorSpace * colorSpace); + KisPaintLayer(KisImage *img, const TQString& name, TQ_UINT8 opacity, KisPaintDeviceSP dev); + KisPaintLayer(KisImage *img, const TQString& name, TQ_UINT8 opacity); + KisPaintLayer(KisImage *img, const TQString& name, TQ_UINT8 opacity, KisColorSpace * colorSpace); KisPaintLayer(const KisPaintLayer& rhs); virtual ~KisPaintLayer(); @@ -46,21 +47,21 @@ public: // Called when another layer is made active virtual void deactivate() {} - virtual Q_INT32 x() const; - virtual void setX(Q_INT32 x); + virtual TQ_INT32 x() const; + virtual void setX(TQ_INT32 x); - virtual Q_INT32 y() const; - virtual void setY(Q_INT32 y); + virtual TQ_INT32 y() const; + virtual void setY(TQ_INT32 y); - virtual QRect extent() const; - virtual QRect exactBounds() const; + virtual TQRect extent() const; + virtual TQRect exactBounds() const; - virtual void paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - virtual void paintSelection(QImage &img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize); + virtual void paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + virtual void paintSelection(TQImage &img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize); - virtual void paintMaskInactiveLayers(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + virtual void paintMaskInactiveLayers(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); - virtual QImage createThumbnail(Q_INT32 w, Q_INT32 h); + virtual TQImage createThumbnail(TQ_INT32 w, TQ_INT32 h); virtual bool accept(KisLayerVisitor &v) { @@ -72,55 +73,55 @@ public: inline KisPaintDeviceSP paintDevice() const { return m_paintdev; } - /// Returns the paintDevice that accompanies this layer (or mask, see editMask) + /// Returns the paintDevice that accompanies this layer (or tqmask, see editMask) inline KisPaintDeviceSP paintDeviceOrMask() const { if (hasMask() && editMask()) - return m_mask; + return m_tqmask; return m_paintdev; } // Mask Layer - /// Does this layer have a layer mask? - bool hasMask() const { return m_mask != 0; } + /// Does this layer have a layer tqmask? + bool hasMask() const { return m_tqmask != 0; } // XXX TODO: Make these undo-able! - /// Create a mask if it does not yet exist, and return it + /// Create a tqmask if it does not yet exist, and return it KisPaintDeviceSP createMask(); - /// Convert the from argument to the mask + /// Convert the from argument to the tqmask void createMaskFromPaintDevice(KisPaintDeviceSP from); /** * Convert the from selection to a paint device (should convert the getMaskAsSelection - * result back to the mask). Overwrites the current mask, if any. Also removes the selection + * result back to the tqmask). Overwrites the current tqmask, if any. Also removes the selection */ void createMaskFromSelection(KisSelectionSP from); - /// Remove the layer mask + /// Remove the layer tqmask void removeMask(); - /// Apply the layer mask to the paint device, this removes the mask afterwards + /// Apply the layer tqmask to the paint device, this removes the tqmask afterwards void applyMask(); - /// Returns the layer mask's device. Creates one if there is currently none + /// Returns the layer tqmask's device. Creates one if there is currently none KisPaintDeviceSP getMask(); - /// Returns the layer mask's device, converted to a selection. Creates one if there is currently none + /// Returns the layer tqmask's device, converted to a selection. Creates one if there is currently none KisSelectionSP getMaskAsSelection(); /// Undoable version of createMask KNamedCommand* createMaskCommand(); /// Undoable version of createMaskFromSelection - KNamedCommand* maskFromSelectionCommand(); - /// Undoable, removes the current mask, but converts it to the current selection - KNamedCommand* maskToSelectionCommand(); + KNamedCommand* tqmaskFromSelectionCommand(); + /// Undoable, removes the current tqmask, but converts it to the current selection + KNamedCommand* tqmaskToSelectionCommand(); /// Undoable version of removeMask KNamedCommand* removeMaskCommand(); /// Undoable version of applyMask KNamedCommand* applyMaskCommand(); - /// Returns true if the masked part of the mask will be rendered instead of being transparent + /// Returns true if the tqmasked part of the tqmask will be rendered instead of being transparent bool renderMask() const { return m_renderMask; } /// Set the renderMask property void setRenderMask(bool b); /** * When this returns true, the KisPaintDevice returned in paintDevice will actually - * be the layer mask (if there is one). This is so that tools can draw on the mask + * be the layer tqmask (if there is one). This is so that tools can draw on the tqmask * without needing to know its existance. */ bool editMask() const { return m_editMask; } @@ -130,22 +131,22 @@ public: /// Overridden to call the private convertMaskToSelection virtual void setDirty(bool propagate = true); /// Same as above - virtual void setDirty(const QRect & rect, bool propagate = true); + virtual void setDirty(const TQRect & rect, bool propagate = true); // KisLayerSupportsIndirectPainting virtual KisLayer* layer() { return this; } signals: - /// When the mask is created/destroyed or the editmask or rendermask is changed + /// When the tqmask is created/destroyed or the edittqmask or rendertqmask is changed void sigMaskInfoChanged(); private: - void convertMaskToSelection(const QRect& r); + void convertMaskToSelection(const TQRect& r); void genericMaskCreationHelper(); KisPaintDeviceSP m_paintdev; - // Layer mask related: + // Layer tqmask related: // XXX It would be nice to merge the next 2 devices... - KisPaintDeviceSP m_mask; // The mask that we can edit and display easily - KisSelectionSP m_maskAsSelection; // The mask as selection, to apply and render easily + KisPaintDeviceSP m_tqmask; // The tqmask that we can edit and display easily + KisSelectionSP m_tqmaskAsSelection; // The tqmask as selection, to apply and render easily bool m_renderMask; bool m_editMask; }; diff --git a/krita/core/kis_painter.cc b/krita/core/kis_painter.cc index 8086696f..b8353918 100644 --- a/krita/core/kis_painter.cc +++ b/krita/core/kis_painter.cc @@ -26,19 +26,19 @@ #include #include -#include "qbrush.h" -#include "qfontinfo.h" -#include "qfontmetrics.h" -#include "qpen.h" -#include "qregion.h" -#include "qwmatrix.h" -#include -#include -#include -#include -#include -#include -#include +#include "tqbrush.h" +#include "tqfontinfo.h" +#include "tqfontmetrics.h" +#include "tqpen.h" +#include "tqregion.h" +#include "tqwmatrix.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -121,7 +121,7 @@ KCommand *KisPainter::end() return endTransaction(); } -void KisPainter::beginTransaction(const QString& customName) +void KisPainter::beginTransaction(const TQString& customName) { if (m_transaction) delete m_transaction; @@ -145,24 +145,24 @@ KCommand *KisPainter::endTransaction() } -QRect KisPainter::dirtyRect() { - QRect r = m_dirtyRect; - m_dirtyRect = QRect(); +TQRect KisPainter::dirtyRect() { + TQRect r = m_dirtyRect; + m_dirtyRect = TQRect(); return r; } -void KisPainter::bitBlt(Q_INT32 dx, Q_INT32 dy, +void KisPainter::bitBlt(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp& op, KisPaintDeviceSP srcdev, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh) + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh) { if (srcdev == 0) { return; } - QRect srcRect = QRect(sx, sy, sw, sh); + TQRect srcRect = TQRect(sx, sy, sw, sh); if (srcdev->extentIsValid() && op != COMPOSITE_COPY) { srcRect &= srcdev->extent(); @@ -180,42 +180,42 @@ void KisPainter::bitBlt(Q_INT32 dx, Q_INT32 dy, sw = srcRect.width(); sh = srcRect.height(); - addDirtyRect(QRect(dx, dy, sw, sh)); + addDirtyRect(TQRect(dx, dy, sw, sh)); KisColorSpace * srcCs = srcdev->colorSpace(); - Q_INT32 dstY = dy; - Q_INT32 srcY = sy; - Q_INT32 rowsRemaining = sh; + TQ_INT32 dstY = dy; + TQ_INT32 srcY = sy; + TQ_INT32 rowsRemaining = sh; while (rowsRemaining > 0) { - Q_INT32 dstX = dx; - Q_INT32 srcX = sx; - Q_INT32 columnsRemaining = sw; - Q_INT32 numContiguousDstRows = m_device->numContiguousRows(dstY, dstX, dstX + sw - 1); - Q_INT32 numContiguousSrcRows = srcdev->numContiguousRows(srcY, srcX, srcX + sw - 1); + TQ_INT32 dstX = dx; + TQ_INT32 srcX = sx; + TQ_INT32 columnsRemaining = sw; + TQ_INT32 numContiguousDstRows = m_device->numContiguousRows(dstY, dstX, dstX + sw - 1); + TQ_INT32 numContiguousSrcRows = srcdev->numContiguousRows(srcY, srcX, srcX + sw - 1); - Q_INT32 rows = QMIN(numContiguousDstRows, numContiguousSrcRows); - rows = QMIN(rows, rowsRemaining); + TQ_INT32 rows = TQMIN(numContiguousDstRows, numContiguousSrcRows); + rows = TQMIN(rows, rowsRemaining); while (columnsRemaining > 0) { - Q_INT32 numContiguousDstColumns = m_device->numContiguousColumns(dstX, dstY, dstY + rows - 1); - Q_INT32 numContiguousSrcColumns = srcdev->numContiguousColumns(srcX, srcY, srcY + rows - 1); + TQ_INT32 numContiguousDstColumns = m_device->numContiguousColumns(dstX, dstY, dstY + rows - 1); + TQ_INT32 numContiguousSrcColumns = srcdev->numContiguousColumns(srcX, srcY, srcY + rows - 1); - Q_INT32 columns = QMIN(numContiguousDstColumns, numContiguousSrcColumns); - columns = QMIN(columns, columnsRemaining); + TQ_INT32 columns = TQMIN(numContiguousDstColumns, numContiguousSrcColumns); + columns = TQMIN(columns, columnsRemaining); - Q_INT32 srcRowStride = srcdev->rowStride(srcX, srcY); - //const Q_UINT8 *srcData = srcdev->pixel(srcX, srcY); + TQ_INT32 srcRowStride = srcdev->rowStride(srcX, srcY); + //const TQ_UINT8 *srcData = srcdev->pixel(srcX, srcY); KisHLineIteratorPixel srcIt = srcdev->createHLineIterator(srcX, srcY, columns, false); - const Q_UINT8 *srcData = srcIt.rawData(); + const TQ_UINT8 *srcData = srcIt.rawData(); - //Q_UINT8 *dstData = m_device->writablePixel(dstX, dstY); - Q_INT32 dstRowStride = m_device->rowStride(dstX, dstY); + //TQ_UINT8 *dstData = m_device->writablePixel(dstX, dstY); + TQ_INT32 dstRowStride = m_device->rowStride(dstX, dstY); KisHLineIteratorPixel dstIt = m_device->createHLineIterator(dstX, dstY, columns, true); - Q_UINT8 *dstData = dstIt.rawData(); + TQ_UINT8 *dstData = dstIt.rawData(); m_colorSpace->bitBlt(dstData, @@ -241,16 +241,16 @@ void KisPainter::bitBlt(Q_INT32 dx, Q_INT32 dy, } } -void KisPainter::bltSelection(Q_INT32 dx, Q_INT32 dy, +void KisPainter::bltSelection(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP srcdev, KisSelectionSP seldev, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh) + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh) { // Better use a probablistic method than a too slow one - if (seldev->isProbablyTotallyUnselected(QRect(dx, dy, sw, sh))) { + if (seldev->isProbablyTotallyUnselected(TQRect(dx, dy, sw, sh))) { /* kdDebug() << "Blitting outside selection rect\n"; @@ -264,13 +264,13 @@ void KisPainter::bltSelection(Q_INT32 dx, Q_INT32 dy, bltMask(dx,dy,op,srcdev,seldev.data(),opacity,sx,sy,sw,sh); } -void KisPainter::bltMask(Q_INT32 dx, Q_INT32 dy, +void KisPainter::bltMask(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP srcdev, KisPaintDeviceSP seldev, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh) + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh) { if (srcdev == 0) return; @@ -280,7 +280,7 @@ void KisPainter::bltMask(Q_INT32 dx, Q_INT32 dy, if (m_device == 0) return; - QRect srcRect = QRect(sx, sy, sw, sh); + TQRect srcRect = TQRect(sx, sy, sw, sh); if (srcdev->extentIsValid() && op != COMPOSITE_COPY) { srcRect &= srcdev->extent(); @@ -298,51 +298,51 @@ void KisPainter::bltMask(Q_INT32 dx, Q_INT32 dy, sw = srcRect.width(); sh = srcRect.height(); - addDirtyRect(QRect(dx, dy, sw, sh)); + addDirtyRect(TQRect(dx, dy, sw, sh)); KisColorSpace * srcCs = srcdev->colorSpace(); - Q_INT32 dstY = dy; - Q_INT32 srcY = sy; - Q_INT32 rowsRemaining = sh; + TQ_INT32 dstY = dy; + TQ_INT32 srcY = sy; + TQ_INT32 rowsRemaining = sh; while (rowsRemaining > 0) { - Q_INT32 dstX = dx; - Q_INT32 srcX = sx; - Q_INT32 columnsRemaining = sw; - Q_INT32 numContiguousDstRows = m_device->numContiguousRows(dstY, dstX, dstX + sw - 1); - Q_INT32 numContiguousSrcRows = srcdev->numContiguousRows(srcY, srcX, srcX + sw - 1); - Q_INT32 numContiguousSelRows = seldev->numContiguousRows(dstY, dstX, dstX + sw - 1); + TQ_INT32 dstX = dx; + TQ_INT32 srcX = sx; + TQ_INT32 columnsRemaining = sw; + TQ_INT32 numContiguousDstRows = m_device->numContiguousRows(dstY, dstX, dstX + sw - 1); + TQ_INT32 numContiguousSrcRows = srcdev->numContiguousRows(srcY, srcX, srcX + sw - 1); + TQ_INT32 numContiguousSelRows = seldev->numContiguousRows(dstY, dstX, dstX + sw - 1); - Q_INT32 rows = QMIN(numContiguousDstRows, numContiguousSrcRows); - rows = QMIN(numContiguousSelRows, rows); - rows = QMIN(rows, rowsRemaining); + TQ_INT32 rows = TQMIN(numContiguousDstRows, numContiguousSrcRows); + rows = TQMIN(numContiguousSelRows, rows); + rows = TQMIN(rows, rowsRemaining); while (columnsRemaining > 0) { - Q_INT32 numContiguousDstColumns = m_device->numContiguousColumns(dstX, dstY, dstY + rows - 1); - Q_INT32 numContiguousSrcColumns = srcdev->numContiguousColumns(srcX, srcY, srcY + rows - 1); - Q_INT32 numContiguousSelColumns = seldev->numContiguousColumns(dstX, dstY, dstY + rows - 1); + TQ_INT32 numContiguousDstColumns = m_device->numContiguousColumns(dstX, dstY, dstY + rows - 1); + TQ_INT32 numContiguousSrcColumns = srcdev->numContiguousColumns(srcX, srcY, srcY + rows - 1); + TQ_INT32 numContiguousSelColumns = seldev->numContiguousColumns(dstX, dstY, dstY + rows - 1); - Q_INT32 columns = QMIN(numContiguousDstColumns, numContiguousSrcColumns); - columns = QMIN(numContiguousSelColumns, columns); - columns = QMIN(columns, columnsRemaining); + TQ_INT32 columns = TQMIN(numContiguousDstColumns, numContiguousSrcColumns); + columns = TQMIN(numContiguousSelColumns, columns); + columns = TQMIN(columns, columnsRemaining); - //Q_UINT8 *dstData = m_device->writablePixel(dstX, dstY); - Q_INT32 dstRowStride = m_device->rowStride(dstX, dstY); + //TQ_UINT8 *dstData = m_device->writablePixel(dstX, dstY); + TQ_INT32 dstRowStride = m_device->rowStride(dstX, dstY); KisHLineIteratorPixel dstIt = m_device->createHLineIterator(dstX, dstY, columns, true); - Q_UINT8 *dstData = dstIt.rawData(); + TQ_UINT8 *dstData = dstIt.rawData(); - //const Q_UINT8 *srcData = srcdev->pixel(srcX, srcY); - Q_INT32 srcRowStride = srcdev->rowStride(srcX, srcY); + //const TQ_UINT8 *srcData = srcdev->pixel(srcX, srcY); + TQ_INT32 srcRowStride = srcdev->rowStride(srcX, srcY); KisHLineIteratorPixel srcIt = srcdev->createHLineIterator(srcX, srcY, columns, false); - const Q_UINT8 *srcData = srcIt.rawData(); + const TQ_UINT8 *srcData = srcIt.rawData(); - //const Q_UINT8 *selData = seldev->pixel(dstX, dstY); - Q_INT32 selRowStride = seldev->rowStride(dstX, dstY); + //const TQ_UINT8 *selData = seldev->pixel(dstX, dstY); + TQ_INT32 selRowStride = seldev->rowStride(dstX, dstY); KisHLineIteratorPixel selIt = seldev->createHLineIterator(dstX, dstY, columns, false); - const Q_UINT8 *selData = selIt.rawData(); + const TQ_UINT8 *selData = selIt.rawData(); m_colorSpace->bitBlt(dstData, dstRowStride, @@ -368,12 +368,12 @@ void KisPainter::bltMask(Q_INT32 dx, Q_INT32 dy, } -void KisPainter::bltSelection(Q_INT32 dx, Q_INT32 dy, +void KisPainter::bltSelection(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp& op, KisPaintDeviceSP srcdev, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh) + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh) { if (m_device == 0) return; if (!m_device->hasSelection()) { @@ -812,13 +812,13 @@ void KisPainter::fillPolygon(const vKisPoint& points, FillStyle fillStyle) } // Fill the polygon bounding rectangle with the required contents then we'll - // create a mask for the actual polygon coverage. + // create a tqmask for the actual polygon coverage. KisPaintDeviceSP polygon = new KisPaintDevice(m_device->colorSpace(), "polygon"); Q_CHECK_PTR(polygon); KisFillPainter fillPainter(polygon); - QRect boundingRectangle(x0, y0, x1 - x0 + 1, y1 - y0 + 1); + TQRect boundingRectangle(x0, y0, x1 - x0 + 1, y1 - y0 + 1); // Clip to the image bounds. if (m_device->image()) { @@ -899,7 +899,7 @@ void KisPainter::fillPolygon(const vKisPoint& points, FillStyle fillStyle) polygon->applySelectionMask(polygonMask); - QRect r = polygon->extent(); + TQRect r = polygon->extent(); // The strokes for the outline may have already added updated the dirtyrect, but it can't hurt, // and if we're painting without outlines, then there will be no dirty rect. Let's do it ourselves... diff --git a/krita/core/kis_painter.h b/krita/core/kis_painter.h index fa8de088..abfd8b17 100644 --- a/krita/core/kis_painter.h +++ b/krita/core/kis_painter.h @@ -34,15 +34,15 @@ #include -class QRect; +class TQRect; class KisTransaction; class KisBrush; class KisPattern; /** * KisPainter contains the graphics primitives necessary to draw on a - * KisPaintDevice. This is the same kind of abstraction as used in Qt - * itself, where you have QPainter and QPaintDevice. + * KisPaintDevice. This is the same kind of abstraction as used in TQt + * itself, where you have TQPainter and TQPaintDevice. * * However, KisPainter works on a tiled image and supports different * colour models, and that's a lot more complicated. @@ -79,7 +79,7 @@ public: KCommand *end(); /// Begin an undoable paint operation - void beginTransaction(const QString& customName = QString::null); + void beginTransaction(const TQString& customName = TQString()); /// Finish the undoable paint operation KCommand *endTransaction(); @@ -102,11 +102,11 @@ public: /** * Blast the specified region from src onto the current paint device. */ - void bitBlt(Q_INT32 dx, Q_INT32 dy, + void bitBlt(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp& op, KisPaintDeviceSP src, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh) + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh) { bitBlt(dx, dy, op, src, OPACITY_OPAQUE, sx, sy, sw, sh); } @@ -115,47 +115,47 @@ public: * Overloaded version of the previous, differs in that it is possible to specify * a value for opacity */ - void bitBlt(Q_INT32 dx, Q_INT32 dy, + void bitBlt(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp& op, KisPaintDeviceSP src, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh); + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh); /** - * A version of bitBlt that renders using an external mask, ignoring + * A version of bitBlt that renders using an external tqmask, ignoring * the src device's own selection, if it has one. */ - void bltMask(Q_INT32 dx, Q_INT32 dy, + void bltMask(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, KisPaintDeviceSP selMask, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh); + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh); /** - * A version of bitBlt that renders using an external selection mask, ignoring + * A version of bitBlt that renders using an external selection tqmask, ignoring * the src device's own selection, if it has one. */ - void bltSelection(Q_INT32 dx, Q_INT32 dy, + void bltSelection(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, KisSelectionSP selMask, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh); + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh); /** - * A version of bitBlt that renders using the src device's selection mask, if it has one. + * A version of bitBlt that renders using the src device's selection tqmask, if it has one. */ - void bltSelection(Q_INT32 dx, Q_INT32 dy, + void bltSelection(TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, - Q_UINT8 opacity, - Q_INT32 sx, Q_INT32 sy, - Q_INT32 sw, Q_INT32 sh); + TQ_UINT8 opacity, + TQ_INT32 sx, TQ_INT32 sy, + TQ_INT32 sw, TQ_INT32 sh); /** @@ -166,19 +166,19 @@ public: * * Call will RESET the dirtyRect! */ - QRect dirtyRect(); + TQRect dirtyRect(); /** * Add the r to the current dirty rect, and return the dirtyRect after adding r to it. */ - QRect addDirtyRect(QRect r) { m_dirtyRect |= r; return m_dirtyRect; } + TQRect addDirtyRect(TQRect r) { m_dirtyRect |= r; return m_dirtyRect; } /** * Paint a line that connects the dots in points */ - void paintPolyline(const QValueVector &points, + void paintPolyline(const TQValueVector &points, int index = 0, int numPoints = -1); /** @@ -323,9 +323,9 @@ public: StrokeStyle strokeStyle() const { return m_strokeStyle; } /// Set the opacity which is used in painting (like filling polygons) - void setOpacity(Q_UINT8 opacity) { m_opacity = opacity; } + void setOpacity(TQ_UINT8 opacity) { m_opacity = opacity; } /// Returns the opacity that is used in painting - Q_UINT8 opacity() const { return m_opacity; } + TQ_UINT8 opacity() const { return m_opacity; } /** * Sets the current composite operation. Everything painted will be composited on @@ -399,7 +399,7 @@ protected: KisPaintDeviceSP m_device; KisTransaction *m_transaction; - QRect m_dirtyRect; + TQRect m_dirtyRect; KisColor m_paintColor; KisColor m_backgroundColor; @@ -413,13 +413,13 @@ protected: bool m_duplicateHealing; int m_duplicateHealingRadius; bool m_duplicatePerspectiveCorrection; - Q_UINT8 m_opacity; + TQ_UINT8 m_opacity; KisCompositeOp m_compositeOp; KisFilterSP m_filter; KisPaintOp * m_paintOp; double m_pressure; bool m_cancelRequested; - Q_INT32 m_pixelSize; + TQ_INT32 m_pixelSize; KisColorSpace * m_colorSpace; KisProfile * m_profile; KisPaintDeviceSP m_dab; diff --git a/krita/core/kis_paintop.cc b/krita/core/kis_paintop.cc index 4030e931..e00484f1 100644 --- a/krita/core/kis_paintop.cc +++ b/krita/core/kis_paintop.cc @@ -19,12 +19,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qwidget.h" +#include "tqwidget.h" #include "kis_painter.h" #include "kis_layer.h" #include "kis_types.h" #include "kis_paintop.h" -#include "kis_alpha_mask.h" +#include "kis_alpha_tqmask.h" #include "kis_point.h" #include "kis_colorspace.h" #include "kis_global.h" @@ -42,11 +42,11 @@ KisPaintOp::~KisPaintOp() { } -KisPaintDeviceSP KisPaintOp::computeDab(KisAlphaMaskSP mask) { - return computeDab(mask, m_painter->device()->colorSpace()); +KisPaintDeviceSP KisPaintOp::computeDab(KisAlphaMaskSP tqmask) { + return computeDab(tqmask, m_painter->device()->colorSpace()); } -KisPaintDeviceSP KisPaintOp::computeDab(KisAlphaMaskSP mask, KisColorSpace *cs) +KisPaintDeviceSP KisPaintOp::computeDab(KisAlphaMaskSP tqmask, KisColorSpace *cs) { // XXX: According to the SeaShore source, the Gimp uses a // temporary layer the size of the layer that is being painted @@ -63,22 +63,22 @@ KisPaintDeviceSP KisPaintOp::computeDab(KisAlphaMaskSP mask, KisColorSpace *cs) KisColorSpace * colorSpace = m_dab->colorSpace(); - Q_INT32 pixelSize = colorSpace->pixelSize(); + TQ_INT32 pixelSize = colorSpace->pixelSize(); - Q_INT32 maskWidth = mask->width(); - Q_INT32 maskHeight = mask->height(); + TQ_INT32 tqmaskWidth = tqmask->width(); + TQ_INT32 tqmaskHeight = tqmask->height(); // Convert the kiscolor to the right colorspace. kc.convertTo(colorSpace); - KisHLineIteratorPixel hiter = m_dab->createHLineIterator(0, 0, maskWidth, true); - for (int y = 0; y < maskHeight; y++) + KisHLineIteratorPixel hiter = m_dab->createHLineIterator(0, 0, tqmaskWidth, true); + for (int y = 0; y < tqmaskHeight; y++) { int x=0; while(! hiter.isDone()) { - // XXX: Set mask - colorSpace->setAlpha(kc.data(), mask->alphaAt(x++, y), 1); + // XXX: Set tqmask + colorSpace->setAlpha(kc.data(), tqmask->alphaAt(x++, y), 1); memcpy(hiter.rawData(), kc.data(), pixelSize); ++hiter; } @@ -88,9 +88,9 @@ KisPaintDeviceSP KisPaintOp::computeDab(KisAlphaMaskSP mask, KisColorSpace *cs) return m_dab; } -void KisPaintOp::splitCoordinate(double coordinate, Q_INT32 *whole, double *fraction) +void KisPaintOp::splitCoordinate(double coordinate, TQ_INT32 *whole, double *fraction) { - Q_INT32 i = static_cast(coordinate); + TQ_INT32 i = static_cast(coordinate); if (coordinate < 0) { // We always want the fractional part to be positive. @@ -110,4 +110,4 @@ void KisPaintOp::setSource(KisPaintDeviceSP p) { } -KisPaintOpSettings* KisPaintOpFactory::settings(QWidget* /*parent*/, const KisInputDevice& /*inputDevice*/) { return 0; } +KisPaintOpSettings* KisPaintOpFactory::settings(TQWidget* /*tqparent*/, const KisInputDevice& /*inputDevice*/) { return 0; } diff --git a/krita/core/kis_paintop.h b/krita/core/kis_paintop.h index 6a6efddc..8e8587ea 100644 --- a/krita/core/kis_paintop.h +++ b/krita/core/kis_paintop.h @@ -23,7 +23,7 @@ #ifndef KIS_PAINTOP_H_ #define KIS_PAINTOP_H_ -#include +#include #include #include @@ -41,7 +41,7 @@ class KisAlphaMask; class KisPainter; class KisColorSpace; class KisInputDevice; -class QWidget; +class TQWidget; /** * This class keeps information that can be used in the painting process, for example by @@ -79,14 +79,14 @@ public: protected: - virtual KisPaintDeviceSP computeDab(KisAlphaMaskSP mask); - virtual KisPaintDeviceSP computeDab(KisAlphaMaskSP mask, KisColorSpace *cs); + virtual KisPaintDeviceSP computeDab(KisAlphaMaskSP tqmask); + virtual KisPaintDeviceSP computeDab(KisAlphaMaskSP tqmask, KisColorSpace *cs); /** * Split the coordinate into whole + fraction, where fraction is always >= 0. */ - virtual void splitCoordinate(double coordinate, Q_INT32 *whole, double *fraction); + virtual void splitCoordinate(double coordinate, TQ_INT32 *whole, double *fraction); KisPainter * m_painter; KisPaintDeviceSP m_source; // use this layer as source layer for the operation @@ -97,10 +97,10 @@ private: class KisPaintOpSettings { public: - KisPaintOpSettings(QWidget *parent) { Q_UNUSED(parent); } + KisPaintOpSettings(TQWidget *tqparent) { Q_UNUSED(tqparent); } virtual ~KisPaintOpSettings() {} - virtual QWidget *widget() const { return 0; } + virtual TQWidget *widget() const { return 0; } }; /** @@ -121,7 +121,7 @@ public: /** * The filename of the pixmap we can use to represent this paintop in the ui. */ - virtual QString pixmap() { return ""; } + virtual TQString pixmap() { return ""; } /** * Whether this paintop is internal to a certain tool or can be used @@ -135,7 +135,7 @@ public: * specified input device. Return 0 if there are no settings available for the given * device. */ - virtual KisPaintOpSettings* settings(QWidget* parent, const KisInputDevice& inputDevice); + virtual KisPaintOpSettings* settings(TQWidget* tqparent, const KisInputDevice& inputDevice); }; #endif // KIS_PAINTOP_H_ diff --git a/krita/core/kis_paintop_registry.cc b/krita/core/kis_paintop_registry.cc index 0ba7b5f3..e023e5b4 100644 --- a/krita/core/kis_paintop_registry.cc +++ b/krita/core/kis_paintop_registry.cc @@ -15,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -43,8 +43,8 @@ KisPaintOpRegistry::KisPaintOpRegistry() Q_ASSERT(KisPaintOpRegistry::m_singleton == 0); KisPaintOpRegistry::m_singleton = this; - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/Paintop"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/Paintop"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); KTrader::OfferList::ConstIterator iter; @@ -54,7 +54,7 @@ KisPaintOpRegistry::KisPaintOpRegistry() KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService ( service, this, 0, TQStringList(), &errCode); if ( plugin ) kdDebug(41006) << "found plugin " << service->property("Name").toString() << "\n"; else { @@ -98,16 +98,16 @@ KisPaintOp * KisPaintOpRegistry::paintOp(const KisID & id, const KisPaintOpSetti } } -KisPaintOp * KisPaintOpRegistry::paintOp(const QString & id, const KisPaintOpSettings * settings, KisPainter * painter) const +KisPaintOp * KisPaintOpRegistry::paintOp(const TQString & id, const KisPaintOpSettings * settings, KisPainter * painter) const { return paintOp(KisID(id, ""), settings, painter); } -KisPaintOpSettings * KisPaintOpRegistry::settings(const KisID& id, QWidget * parent, const KisInputDevice& inputDevice) const +KisPaintOpSettings * KisPaintOpRegistry::settings(const KisID& id, TQWidget * tqparent, const KisInputDevice& inputDevice) const { KisPaintOpFactory* f = get(id); if (f) - return f->settings( parent, inputDevice ); + return f->settings( tqparent, inputDevice ); return 0; } @@ -124,7 +124,7 @@ bool KisPaintOpRegistry::userVisible(const KisID & id, KisColorSpace* cs) const } -QString KisPaintOpRegistry::pixmap(const KisID & id) const +TQString KisPaintOpRegistry::pixmap(const KisID & id) const { KisPaintOpFactorySP f = get(id); diff --git a/krita/core/kis_paintop_registry.h b/krita/core/kis_paintop_registry.h index c544a601..c61105b6 100644 --- a/krita/core/kis_paintop_registry.h +++ b/krita/core/kis_paintop_registry.h @@ -19,14 +19,14 @@ #ifndef KIS_PAINTOP_REGISTRY_H_ #define KIS_PAINTOP_REGISTRY_H_ -#include +#include #include "kis_types.h" #include "kis_generic_registry.h" #include -class QWidget; -class QStringList; +class TQWidget; +class TQStringList; class KisPaintOp; class KisPaintOpSettings; @@ -34,10 +34,11 @@ class KisPainter; class KisColorSpace; class KisInputDevice; -class KRITACORE_EXPORT KisPaintOpRegistry : public QObject, public KisGenericRegistry +class KRITACORE_EXPORT KisPaintOpRegistry : public TQObject, public KisGenericRegistry { Q_OBJECT + TQ_OBJECT public: virtual ~KisPaintOpRegistry(); @@ -50,21 +51,21 @@ public: /** * Return a newly created paintopd */ - KisPaintOp * paintOp(const QString& id, const KisPaintOpSettings * settings, KisPainter * painter) const; + KisPaintOp * paintOp(const TQString& id, const KisPaintOpSettings * settings, KisPainter * painter) const; /** * Create and return an (abstracted) configuration widget * for using the specified paintop with the specified input device, - * with the specified parent as widget parent. Returns 0 if there + * with the specified tqparent as widget tqparent. Returns 0 if there * are no settings available for the given device. */ - KisPaintOpSettings * settings(const KisID& id, QWidget * parent, const KisInputDevice& inputDevice) const; + KisPaintOpSettings * settings(const KisID& id, TQWidget * tqparent, const KisInputDevice& inputDevice) const; // Whether we should show this paintop in the toolchest bool userVisible(const KisID & id, KisColorSpace* cs) const; // Get the name of the icon to show in the toolchest - QString pixmap(const KisID & id) const; + TQString pixmap(const KisID & id) const; public: diff --git a/krita/core/kis_palette.cc b/krita/core/kis_palette.cc index ad39eed5..daf8d84d 100644 --- a/krita/core/kis_palette.cc +++ b/krita/core/kis_palette.cc @@ -29,11 +29,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -54,8 +54,8 @@ namespace { } -KisPalette::KisPalette(const QImage * img, Q_INT32 nColors, const QString & name) - : super(QString("")), +KisPalette::KisPalette(const TQImage * img, TQ_INT32 nColors, const TQString & name) + : super(TQString("")), m_name(name) { Q_ASSERT(nColors > 0); @@ -66,8 +66,8 @@ KisPalette::KisPalette(const QImage * img, Q_INT32 nColors, const QString & name m_columns = 0; // Set the default value that the GIMP uses... } -KisPalette::KisPalette(const KisPaintDeviceSP device, Q_INT32 nColors, const QString & name) - : super(QString("")), +KisPalette::KisPalette(const KisPaintDeviceSP device, TQ_INT32 nColors, const TQString & name) + : super(TQString("")), m_name(name) { Q_ASSERT(nColors > 0); @@ -79,17 +79,17 @@ KisPalette::KisPalette(const KisPaintDeviceSP device, Q_INT32 nColors, const QSt } -KisPalette::KisPalette(const KisGradient * gradient, Q_INT32 nColors, const QString & name) - : super(QString("")), +KisPalette::KisPalette(const KisGradient * gradient, TQ_INT32 nColors, const TQString & name) + : super(TQString("")), m_name(name) { Q_ASSERT(nColors > 0); Q_ASSERT(gradient != 0); double dx, cur_x; - QColor c; - Q_INT32 i; - Q_UINT8 opacity; + TQColor c; + TQ_INT32 i; + TQ_UINT8 opacity; dx = 1.0 / (nColors - 1); KisPaletteEntry e; @@ -102,7 +102,7 @@ KisPalette::KisPalette(const KisGradient * gradient, Q_INT32 nColors, const QStr m_columns = 0; // Set the default value that the GIMP uses... } -KisPalette::KisPalette(const QString& filename) +KisPalette::KisPalette(const TQString& filename) : super(filename) { // Implemented in super class @@ -135,7 +135,7 @@ KisPalette::~KisPalette() bool KisPalette::load() { - QFile file(filename()); + TQFile file(filename()); file.open(IO_ReadOnly); m_data = file.readAll(); file.close(); @@ -145,19 +145,19 @@ bool KisPalette::load() bool KisPalette::save() { - QFile file(filename()); + TQFile file(filename()); if (!file.open(IO_WriteOnly | IO_Truncate)) { return false; } - QTextStream stream(&file); + TQTextStream stream(&file); // Header: Magic\nName: \nColumns: // In any case, we don't use Columns... stream << "GIMP Palette\nName: " << name() << "\nColumns: " << m_columns << "\n#\n"; for (uint i = 0; i < m_colors.size(); i++) { const KisPaletteEntry& entry = m_colors.at(i); - QColor c = entry.color; + TQColor c = entry.color; stream << c.red() << " " << c.green() << " " << c.blue() << "\t"; if (entry.name.isEmpty()) stream << "Untitled\n"; @@ -169,12 +169,12 @@ bool KisPalette::save() return true; } -QImage KisPalette::img() +TQImage KisPalette::img() { return m_img; } -Q_INT32 KisPalette::nColors() +TQ_INT32 KisPalette::nColors() { return m_colors.count(); } @@ -183,7 +183,7 @@ bool KisPalette::init() { enumPaletteType format = FORMAT_UNKNOWN; - QString s = QString::fromUtf8(m_data.data(), m_data.count()); + TQString s = TQString::fromUtf8(m_data.data(), m_data.count()); if (s.isEmpty() || s.isNull() || s.length() < 50) { kdWarning(DBG_AREA_FILE) << "Illegal Gimp palette file: " << filename() << "\n"; @@ -198,18 +198,18 @@ bool KisPalette::init() else if (s.startsWith("GIMP Palette")) { // XXX: No checks for wrong input yet! - Q_UINT32 index = 0; + TQ_UINT32 index = 0; - QStringList lines = QStringList::split("\n", s); + TQStringList lines = TQStringList::split("\n", s); if (lines.size() < 3) { return false; } - QString entry, channel, columns; - QStringList c; - Q_INT32 r, g, b; - QColor color; + TQString entry, channel, columns; + TQStringList c; + TQ_INT32 r, g, b; + TQColor color; KisPaletteEntry e; format = FORMAT_GPL; @@ -232,13 +232,13 @@ bool KisPalette::init() index = 3; } - for (Q_UINT32 i = index; i < lines.size(); i++) { + for (TQ_UINT32 i = index; i < lines.size(); i++) { if (lines[i].startsWith("#")) { m_comment += lines[i].mid(1).stripWhiteSpace() + " "; } else if (!lines[i].isEmpty()) { - QStringList a = QStringList::split(" ", lines[i].replace(QChar('\t'), " ")); + TQStringList a = TQStringList::split(" ", lines[i].tqreplace(TQChar('\t'), " ")); if (a.count() < 3) { @@ -259,10 +259,10 @@ bool KisPalette::init() break; } - color = QColor(r, g, b); + color = TQColor(r, g, b); e.color = color; - QString name = a.join(" "); + TQString name = a.join(" "); e.name = name.isEmpty() ? i18n("Untitled") : name; add(e); @@ -286,8 +286,8 @@ void KisPalette::add(const KisPaletteEntry & c) void KisPalette::remove(const KisPaletteEntry & c) { - QValueVector::iterator it = m_colors.begin(); - QValueVector::iterator end = m_colors.end(); + TQValueVector::iterator it = m_colors.begin(); + TQValueVector::iterator end = m_colors.end(); while (it != end) { if ((*it) == c) { @@ -298,7 +298,7 @@ void KisPalette::remove(const KisPaletteEntry & c) } } -KisPaletteEntry KisPalette::getColor(Q_UINT32 index) +KisPaletteEntry KisPalette::getColor(TQ_UINT32 index) { return m_colors[index]; } diff --git a/krita/core/kis_palette.h b/krita/core/kis_palette.h index 5d7d02c9..ef178819 100644 --- a/krita/core/kis_palette.h +++ b/krita/core/kis_palette.h @@ -18,9 +18,9 @@ #ifndef KIS_PALETTE_ #define KIS_PALETTE_ -#include -#include -#include +#include +#include +#include #include #include @@ -29,15 +29,15 @@ #include "kis_resource.h" #include "kis_global.h" #include "kis_gradient.h" -#include "kis_alpha_mask.h" +#include "kis_alpha_tqmask.h" -class QPoint; -class QPixmap; +class TQPoint; +class TQPixmap; class KisPaintDevice; struct KisPaletteEntry { - QColor color; - QString name; + TQColor color; + TQString name; bool operator==(const KisPaletteEntry& rhs) const { return color == rhs.color && name == rhs.name; } @@ -51,28 +51,29 @@ class KisPalette : public KisResource { typedef KisResource super; Q_OBJECT + TQ_OBJECT public: /** * Create a palette from the colours in an image */ - KisPalette(const QImage * img, Q_INT32 nColors, const QString & name); + KisPalette(const TQImage * img, TQ_INT32 nColors, const TQString & name); /** * Create a palette from the colours in a paint device */ - KisPalette(const KisPaintDeviceSP device, Q_INT32 nColors, const QString & name); + KisPalette(const KisPaintDeviceSP device, TQ_INT32 nColors, const TQString & name); /** * Create a palette from the colours in a gradient */ - KisPalette(const KisGradient * gradient, Q_INT32 nColors, const QString & name); + KisPalette(const KisGradient * gradient, TQ_INT32 nColors, const TQString & name); /** * Load a palette from a file. This can be a Gimp * palette, a RIFF palette or a Photoshop palette. */ - KisPalette(const QString& filename); + KisPalette(const TQString& filename); /// Create an empty palette KisPalette(); @@ -84,28 +85,28 @@ public: virtual bool load(); virtual bool save(); - virtual QImage img(); + virtual TQImage img(); public: void add(const KisPaletteEntry &); void remove(const KisPaletteEntry &); - KisPaletteEntry getColor(Q_UINT32 index); - Q_INT32 nColors(); + KisPaletteEntry getColor(TQ_UINT32 index); + TQ_INT32 nColors(); private: bool init(); private: - QByteArray m_data; + TQByteArray m_data; bool m_ownData; - QImage m_img; - QString m_name; - QString m_comment; - Q_INT32 m_columns; - QValueVector m_colors; + TQImage m_img; + TQString m_name; + TQString m_comment; + TQ_INT32 m_columns; + TQValueVector m_colors; }; #endif // KIS_PALETTE_ diff --git a/krita/core/kis_part_layer_iface.h b/krita/core/kis_part_layer_iface.h index b324c975..1d4f7b99 100644 --- a/krita/core/kis_part_layer_iface.h +++ b/krita/core/kis_part_layer_iface.h @@ -18,7 +18,7 @@ #ifndef KIS_PART_LAYER_IFACE_ #define KIS_PART_LAYER_IFACE_ -#include +#include #include "kis_types.h" /** @@ -27,10 +27,10 @@ class KisPartLayer : public KisLayer { typedef KisLayer super; public: - KisPartLayer(KisImage *img, const QString &name, Q_UINT8 opacity) + KisPartLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity) : super(img, name, opacity) {} - virtual KisPaintDeviceSP prepareProjection(KisPaintDeviceSP projection, const QRect& r) = 0; - virtual bool saveToXML(QDomDocument doc, QDomElement elem) = 0; + virtual KisPaintDeviceSP prepareProjection(KisPaintDeviceSP projection, const TQRect& r) = 0; + virtual bool saveToXML(TQDomDocument doc, TQDomElement elem) = 0; }; #endif // KIS_PART_IFACE_LAYER_IFACE_ diff --git a/krita/core/kis_pattern.cc b/krita/core/kis_pattern.cc index db6ae0a1..516d3d8b 100644 --- a/krita/core/kis_pattern.cc +++ b/krita/core/kis_pattern.cc @@ -27,12 +27,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,19 +43,19 @@ namespace { struct GimpPatternHeader { - Q_UINT32 header_size; /* header_size = sizeof (PatternHeader) + brush name */ - Q_UINT32 version; /* pattern file version # */ - Q_UINT32 width; /* width of pattern */ - Q_UINT32 height; /* height of pattern */ - Q_UINT32 bytes; /* depth of pattern in bytes : 1, 2, 3 or 4*/ - Q_UINT32 magic_number; /* GIMP brush magic number */ + TQ_UINT32 header_size; /* header_size = sizeof (PatternHeader) + brush name */ + TQ_UINT32 version; /* pattern file version # */ + TQ_UINT32 width; /* width of pattern */ + TQ_UINT32 height; /* height of pattern */ + TQ_UINT32 bytes; /* depth of pattern in bytes : 1, 2, 3 or 4*/ + TQ_UINT32 magic_number; /* GIMP brush magic number */ }; // Yes! This is _NOT_ what my pat.txt file says. It's really not 'GIMP', but 'GPAT' - Q_UINT32 const GimpPatternMagic = (('G' << 24) + ('P' << 16) + ('A' << 8) + ('T' << 0)); + TQ_UINT32 const GimpPatternMagic = (('G' << 24) + ('P' << 16) + ('A' << 8) + ('T' << 0)); } -KisPattern::KisPattern(const QString& file) : super(file), m_hasFile(true) +KisPattern::KisPattern(const TQString& file) : super(file), m_hasFile(true) { } @@ -64,7 +64,7 @@ KisPattern::KisPattern(KisPaintDevice* image, int x, int y, int w, int h) { // Forcefully convert to RGBA8 // XXX profile and exposure? - setImage(image->convertToQImage(0, x, y, w, h)); + setImage(image->convertToTQImage(0, x, y, w, h)); setName(image->name()); } @@ -77,11 +77,11 @@ bool KisPattern::load() if (!m_hasFile) return true; - QFile file(filename()); + TQFile file(filename()); file.open(IO_ReadOnly); - QByteArray data = file.readAll(); + TQByteArray data = file.readAll(); if (!data.isEmpty()) { - Q_INT32 startPos = m_data.size(); + TQ_INT32 startPos = m_data.size(); m_data.resize(m_data.size() + data.count()); memcpy(&m_data[startPos], data.data(), data.count()); @@ -92,10 +92,10 @@ bool KisPattern::load() bool KisPattern::save() { - QFile file(filename()); + TQFile file(filename()); file.open(IO_WriteOnly | IO_Truncate); - QTextStream stream(&file); + TQTextStream stream(&file); // Header: header_size (24+name length),version,width,height,colourdepth of brush,magic,name // depth: 1 = greyscale, 2 = greyscale + A, 3 = RGB, 4 = RGBA // magic = "GPAT", as a single uint32, the docs are wrong here! @@ -105,9 +105,9 @@ bool KisPattern::save() // Version is 1 for now... GimpPatternHeader ph; - QCString utf8Name = name().utf8(); + TQCString utf8Name = name().utf8(); char const* name = utf8Name.data(); - int nameLength = qstrlen(name); + int nameLength = tqstrlen(name); ph.header_size = htonl(sizeof(GimpPatternHeader) + nameLength + 1); // trailing 0 ph.version = htonl(1); @@ -116,7 +116,7 @@ bool KisPattern::save() ph.bytes = htonl(4); ph.magic_number = htonl(GimpPatternMagic); - QByteArray bytes; + TQByteArray bytes; bytes.setRawData(reinterpret_cast(&ph), sizeof(GimpPatternHeader)); int wrote = file.writeBlock(bytes); bytes.resetRawData(reinterpret_cast(&ph), sizeof(GimpPatternHeader)); @@ -130,14 +130,14 @@ bool KisPattern::save() int k = 0; bytes.resize(width() * height() * 4); - for (Q_INT32 y = 0; y < height(); y++) { - for (Q_INT32 x = 0; x < width(); x++) { + for (TQ_INT32 y = 0; y < height(); y++) { + for (TQ_INT32 x = 0; x < width(); x++) { // RGBA only - QRgb pixel = m_img.pixel(x,y); - bytes[k++] = static_cast(qRed(pixel)); - bytes[k++] = static_cast(qGreen(pixel)); - bytes[k++] = static_cast(qBlue(pixel)); - bytes[k++] = static_cast(qAlpha(pixel)); + TQRgb pixel = m_img.pixel(x,y); + bytes[k++] = static_cast(tqRed(pixel)); + bytes[k++] = static_cast(tqGreen(pixel)); + bytes[k++] = static_cast(tqBlue(pixel)); + bytes[k++] = static_cast(tqAlpha(pixel)); } } @@ -150,7 +150,7 @@ bool KisPattern::save() return true; } -QImage KisPattern::img() +TQImage KisPattern::img() { return m_img; } @@ -159,8 +159,8 @@ bool KisPattern::init() { // load Gimp patterns GimpPatternHeader bh; - Q_INT32 k; - QValueVector name; + TQ_INT32 k; + TQValueVector name; if (sizeof(GimpPatternHeader) > m_data.size()) { return false; @@ -195,47 +195,47 @@ bool KisPattern::init() if (bh.bytes == 1) { // Grayscale - Q_INT32 val; + TQ_INT32 val; - for (Q_UINT32 y = 0; y < bh.height; y++) { - for (Q_UINT32 x = 0; x < bh.width; x++, k++) { - if (static_cast(k) > m_data.size()) { + for (TQ_UINT32 y = 0; y < bh.height; y++) { + for (TQ_UINT32 x = 0; x < bh.width; x++, k++) { + if (static_cast(k) > m_data.size()) { kdDebug(DBG_AREA_FILE) << "failed in gray\n"; return false; } val = m_data[k]; - m_img.setPixel(x, y, qRgb(val, val, val)); + m_img.setPixel(x, y, tqRgb(val, val, val)); m_img.setAlphaBuffer(false); } } } else if (bh.bytes == 2) { // Grayscale + A - Q_INT32 val; - Q_INT32 alpha; - for (Q_UINT32 y = 0; y < bh.height; y++) { - for (Q_UINT32 x = 0; x < bh.width; x++, k++) { - if (static_cast(k + 2) > m_data.size()) { + TQ_INT32 val; + TQ_INT32 alpha; + for (TQ_UINT32 y = 0; y < bh.height; y++) { + for (TQ_UINT32 x = 0; x < bh.width; x++, k++) { + if (static_cast(k + 2) > m_data.size()) { kdDebug(DBG_AREA_FILE) << "failed in grayA\n"; return false; } val = m_data[k]; alpha = m_data[k++]; - m_img.setPixel(x, y, qRgba(val, val, val, alpha)); + m_img.setPixel(x, y, tqRgba(val, val, val, alpha)); m_img.setAlphaBuffer(true); } } } else if (bh.bytes == 3) { // RGB without alpha - for (Q_UINT32 y = 0; y < bh.height; y++) { - for (Q_UINT32 x = 0; x < bh.width; x++) { - if (static_cast(k + 3) > m_data.size()) { + for (TQ_UINT32 y = 0; y < bh.height; y++) { + for (TQ_UINT32 x = 0; x < bh.width; x++) { + if (static_cast(k + 3) > m_data.size()) { kdDebug(DBG_AREA_FILE) << "failed in RGB\n"; return false; } - m_img.setPixel(x, y, qRgb(m_data[k], + m_img.setPixel(x, y, tqRgb(m_data[k], m_data[k + 1], m_data[k + 2])); k += 3; @@ -244,14 +244,14 @@ bool KisPattern::init() } } else if (bh.bytes == 4) { // Has alpha - for (Q_UINT32 y = 0; y < bh.height; y++) { - for (Q_UINT32 x = 0; x < bh.width; x++) { - if (static_cast(k + 4) > m_data.size()) { + for (TQ_UINT32 y = 0; y < bh.height; y++) { + for (TQ_UINT32 x = 0; x < bh.width; x++) { + if (static_cast(k + 4) > m_data.size()) { kdDebug(DBG_AREA_FILE) << "failed in RGBA\n"; return false; } - m_img.setPixel(x, y, qRgba(m_data[k], + m_img.setPixel(x, y, tqRgba(m_data[k], m_data[k + 1], m_data[k + 2], m_data[k + 3])); @@ -277,7 +277,7 @@ bool KisPattern::init() KisPaintDeviceSP KisPattern::image(KisColorSpace * colorSpace) { // Check if there's already a pattern prepared for this colorspace - QMap::const_iterator it = m_colorspaces.find(colorSpace->id().id()); + TQMap::const_iterator it = m_colorspaces.tqfind(colorSpace->id().id()); if (it != m_colorspaces.end()) return (*it); @@ -286,33 +286,33 @@ KisPaintDeviceSP KisPattern::image(KisColorSpace * colorSpace) { Q_CHECK_PTR(layer); - layer->convertFromQImage(m_img,""); + layer->convertFromTQImage(m_img,""); m_colorspaces[colorSpace->id().id()] = layer; return layer; } -Q_INT32 KisPattern::width() const +TQ_INT32 KisPattern::width() const { return m_width; } -void KisPattern::setWidth(Q_INT32 w) +void KisPattern::setWidth(TQ_INT32 w) { m_width = w; } -Q_INT32 KisPattern::height() const +TQ_INT32 KisPattern::height() const { return m_height; } -void KisPattern::setHeight(Q_INT32 h) +void KisPattern::setHeight(TQ_INT32 h) { m_height = h; } -void KisPattern::setImage(const QImage& img) +void KisPattern::setImage(const TQImage& img) { m_hasFile = false; m_img = img; diff --git a/krita/core/kis_pattern.h b/krita/core/kis_pattern.h index 4b5868f3..7d18f1f3 100644 --- a/krita/core/kis_pattern.h +++ b/krita/core/kis_pattern.h @@ -27,23 +27,24 @@ #include "kis_resource.h" #include "kis_types.h" -class QPoint; -class QImage; +class TQPoint; +class TQImage; class KisColorSpace; class KisPaintDevice; class KisPattern : public KisResource { typedef KisResource super; Q_OBJECT + TQ_OBJECT public: - KisPattern(const QString& file); + KisPattern(const TQString& file); KisPattern(KisPaintDevice* image, int x, int y, int w, int h); virtual ~KisPattern(); virtual bool load(); virtual bool save(); - virtual QImage img(); + virtual TQImage img(); /** * returns a KisPaintDeviceSP made with colorSpace as the ColorSpace strategy @@ -51,28 +52,28 @@ public: **/ KisPaintDeviceSP image(KisColorSpace * colorSpace); - Q_INT32 width() const; - Q_INT32 height() const; + TQ_INT32 width() const; + TQ_INT32 height() const; - void setImage(const QImage& img); + void setImage(const TQImage& img); KisPattern* clone() const; protected: - void setWidth(Q_INT32 w); - void setHeight(Q_INT32 h); + void setWidth(TQ_INT32 w); + void setHeight(TQ_INT32 h); private: bool init(); private: - QByteArray m_data; - QImage m_img; - QMap m_colorspaces; + TQByteArray m_data; + TQImage m_img; + TQMap m_colorspaces; bool m_hasFile; - Q_INT32 m_width; - Q_INT32 m_height; + TQ_INT32 m_width; + TQ_INT32 m_height; }; #endif diff --git a/krita/core/kis_perspective_grid.cpp b/krita/core/kis_perspective_grid.cpp index d9b0e800..7f029d26 100644 --- a/krita/core/kis_perspective_grid.cpp +++ b/krita/core/kis_perspective_grid.cpp @@ -27,7 +27,7 @@ KisSubPerspectiveGrid::KisSubPerspectiveGrid(KisPerspectiveGridNodeSP topLeft, K } -bool KisSubPerspectiveGrid::contains(const KisPoint p) const +bool KisSubPerspectiveGrid::tqcontains(const KisPoint p) const { return true; KisPerspectiveMath::LineEquation d1 = KisPerspectiveMath::computeLineEquation( topLeft(), topRight() ); @@ -79,7 +79,7 @@ bool KisPerspectiveGrid::addNewSubGrid( KisSubPerspectiveGrid* ng ) void KisPerspectiveGrid::clearSubGrids( ) { - for( QValueList::const_iterator it = begin(); it != end(); ++it) + for( TQValueList::const_iterator it = begin(); it != end(); ++it) { delete *it; } @@ -88,9 +88,9 @@ void KisPerspectiveGrid::clearSubGrids( ) KisSubPerspectiveGrid* KisPerspectiveGrid::gridAt(KisPoint p) { - for( QValueList::const_iterator it = begin(); it != end(); ++it) + for( TQValueList::const_iterator it = begin(); it != end(); ++it) { - if( (*it)->contains(p) ) + if( (*it)->tqcontains(p) ) { return *it; } diff --git a/krita/core/kis_perspective_grid.h b/krita/core/kis_perspective_grid.h index 76021a6c..26a1feb2 100644 --- a/krita/core/kis_perspective_grid.h +++ b/krita/core/kis_perspective_grid.h @@ -21,7 +21,7 @@ #ifndef KIS_PERSPECTIVE_GRID_H #define KIS_PERSPECTIVE_GRID_H -#include +#include #include #include @@ -67,7 +67,7 @@ class KisSubPerspectiveGrid { /** * @return true if the point p is contain by the grid */ - bool contains(const KisPoint p) const; + bool tqcontains(const KisPoint p) const; private: inline KisPoint computeVanishingPoint(KisPerspectiveGridNodeSP p11, KisPerspectiveGridNodeSP p12, KisPerspectiveGridNodeSP p21, KisPerspectiveGridNodeSP p22) { @@ -91,8 +91,8 @@ class KisPerspectiveGrid { * @return false if the grid wasn't added, note that subgrids must be attached to an other grid, except if it's the first grid */ bool addNewSubGrid( KisSubPerspectiveGrid* ng ); - inline QValueList::const_iterator begin() const { return m_subGrids.begin(); } - inline QValueList::const_iterator end() const { return m_subGrids.end(); } + inline TQValueList::const_iterator begin() const { return m_subGrids.begin(); } + inline TQValueList::const_iterator end() const { return m_subGrids.end(); } inline bool hasSubGrids() const { return !m_subGrids.isEmpty(); } void clearSubGrids(); inline int countSubGrids() const { return m_subGrids.size(); } @@ -101,7 +101,7 @@ class KisPerspectiveGrid { */ KisSubPerspectiveGrid* gridAt(KisPoint p); private: - QValueList m_subGrids; + TQValueList m_subGrids; }; #endif diff --git a/krita/core/kis_perspective_math.cpp b/krita/core/kis_perspective_math.cpp index eadbab8b..44a43a03 100644 --- a/krita/core/kis_perspective_math.cpp +++ b/krita/core/kis_perspective_math.cpp @@ -20,7 +20,7 @@ #include "kis_perspective_math.h" -#include +#include #if 1 @@ -534,12 +534,12 @@ double* KisPerspectiveMath::computeMatrixTransfo( const KisPoint& topLeft1, cons return matrix; } -double* KisPerspectiveMath::computeMatrixTransfoToPerspective(const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight, const QRect& r) +double* KisPerspectiveMath::computeMatrixTransfoToPerspective(const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight, const TQRect& r) { return KisPerspectiveMath::computeMatrixTransfo(topLeft, topRight, bottomLeft, bottomRight, r.topLeft(), r.topRight(), r.bottomLeft(), r.bottomRight()); } -double* KisPerspectiveMath::computeMatrixTransfoFromPerspective(const QRect& r, const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight) +double* KisPerspectiveMath::computeMatrixTransfoFromPerspective(const TQRect& r, const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight) { return KisPerspectiveMath::computeMatrixTransfo(r.topLeft(), r.topRight(), r.bottomLeft(), r.bottomRight(), topLeft, topRight, bottomLeft, bottomRight); } diff --git a/krita/core/kis_perspective_math.h b/krita/core/kis_perspective_math.h index 047e571e..b7cbdb79 100644 --- a/krita/core/kis_perspective_math.h +++ b/krita/core/kis_perspective_math.h @@ -22,15 +22,15 @@ #include "kis_point.h" -class QRect; +class TQRect; class KisPerspectiveMath { private: KisPerspectiveMath() { } public: static double* computeMatrixTransfo( const KisPoint& topLeft1, const KisPoint& topRight1, const KisPoint& bottomLeft1, const KisPoint& bottomRight1 , const KisPoint& topLeft2, const KisPoint& topRight2, const KisPoint& bottomLeft2, const KisPoint& bottomRight2); - static double* computeMatrixTransfoToPerspective(const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight, const QRect& r); - static double* computeMatrixTransfoFromPerspective(const QRect& r, const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight); + static double* computeMatrixTransfoToPerspective(const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight, const TQRect& r); + static double* computeMatrixTransfoFromPerspective(const TQRect& r, const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight); struct LineEquation { // y = a*x + b double a, b; diff --git a/krita/core/kis_perspectivetransform_worker.cpp b/krita/core/kis_perspectivetransform_worker.cpp index bb98b3bf..4dccceb0 100644 --- a/krita/core/kis_perspectivetransform_worker.cpp +++ b/krita/core/kis_perspectivetransform_worker.cpp @@ -30,7 +30,7 @@ KisPerspectiveTransformWorker::KisPerspectiveTransformWorker(KisPaintDeviceSP de : KisProgressSubject(), m_dev(dev), m_cancelRequested(false), m_progress(progress) { - QRect m_r; + TQRect m_r; if(m_dev->hasSelection()) m_r = m_dev->selection()->selectedExactRect(); else diff --git a/krita/core/kis_perspectivetransform_worker.h b/krita/core/kis_perspectivetransform_worker.h index 2f53625f..0f5f7833 100644 --- a/krita/core/kis_perspectivetransform_worker.h +++ b/krita/core/kis_perspectivetransform_worker.h @@ -38,15 +38,15 @@ class KisPerspectiveTransformWorker : public KisProgressSubject private: virtual void cancel() { m_cancelRequested = true; } private: - Q_INT32 m_progressTotalSteps; - Q_INT32 m_lastProgressReport; - Q_INT32 m_progressStep; + TQ_INT32 m_progressTotalSteps; + TQ_INT32 m_lastProgressReport; + TQ_INT32 m_progressStep; double m_xcenter, m_ycenter, m_p, m_q; KisPaintDeviceSP m_dev; bool m_cancelRequested; KisProgressDisplayInterface *m_progress; double m_matrix[3][3]; - QRect m_r; + TQRect m_r; }; #endif diff --git a/krita/core/kis_point.h b/krita/core/kis_point.h index ee5dba78..3c576cb5 100644 --- a/krita/core/kis_point.h +++ b/krita/core/kis_point.h @@ -18,7 +18,7 @@ #ifndef KIS_POINT_H_ #define KIS_POINT_H_ -#include +#include #include /** @@ -30,19 +30,19 @@ class KisPoint : public KoPoint { public: KisPoint() {} KisPoint(double x, double y) : super(x, y) {} - KisPoint(const QPoint& pt) : super(pt) {} + KisPoint(const TQPoint& pt) : super(pt) {} KisPoint(const KoPoint& pt) : super(pt) {} int floorX() const { return static_cast(x()); } int floorY() const { return static_cast(y()); } - int roundX() const { return qRound(x()); } - int roundY() const { return qRound(y()); } + int roundX() const { return tqRound(x()); } + int roundY() const { return tqRound(y()); } - QPoint floorQPoint() const { return QPoint(static_cast(x()), static_cast(y())); } - QPoint roundQPoint() const { return QPoint(qRound(x()), qRound(y())); } + TQPoint floorTQPoint() const { return TQPoint(static_cast(x()), static_cast(y())); } + TQPoint roundTQPoint() const { return TQPoint(tqRound(x()), tqRound(y())); } }; -typedef QValueVector vKisPoint; +typedef TQValueVector vKisPoint; #endif // KIS_POINT_H_ diff --git a/krita/core/kis_random_accessor.cpp b/krita/core/kis_random_accessor.cpp index 3d538453..c2b2bec8 100644 --- a/krita/core/kis_random_accessor.cpp +++ b/krita/core/kis_random_accessor.cpp @@ -21,7 +21,7 @@ #include "kis_tiled_random_accessor.h" -KisRandomAccessor::KisRandomAccessor(KisTiledDataManager *ktm, Q_INT32 x, Q_INT32 y, Q_INT32 offsetx, Q_INT32 offsety, bool writable) : m_offsetx(offsetx), m_offsety(offsety) +KisRandomAccessor::KisRandomAccessor(KisTiledDataManager *ktm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable) : m_offsetx(offsetx), m_offsety(offsety) { m_accessor = new KisTiledRandomAccessor(ktm, x, y, writable); } @@ -35,22 +35,22 @@ KisRandomAccessor::~KisRandomAccessor() } -void KisRandomAccessor::moveTo(Q_INT32 x, Q_INT32 y) +void KisRandomAccessor::moveTo(TQ_INT32 x, TQ_INT32 y) { m_accessor->moveTo(x - m_offsetx, y - m_offsety); } -Q_UINT8* KisRandomAccessor::rawData() const +TQ_UINT8* KisRandomAccessor::rawData() const { return m_accessor->rawData(); } -const Q_UINT8* KisRandomAccessor::oldRawData() const +const TQ_UINT8* KisRandomAccessor::oldRawData() const { return m_accessor->oldRawData(); } -KisRandomAccessorPixel::KisRandomAccessorPixel(KisTiledDataManager *ktm, KisTiledDataManager *ktmselect, Q_INT32 x, Q_INT32 y, Q_INT32 offsetx, Q_INT32 offsety, bool writable) : +KisRandomAccessorPixel::KisRandomAccessorPixel(KisTiledDataManager *ktm, KisTiledDataManager *ktmselect, TQ_INT32 x, TQ_INT32 y, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable) : KisRandomAccessor( ktm, x, y, offsetx, offsety, writable), KisRandomAccessorPixelTrait( this, (ktmselect) ? new KisRandomAccessor(ktm, x, y, offsetx, offsety, false) : 0 ) { diff --git a/krita/core/kis_random_accessor.h b/krita/core/kis_random_accessor.h index dddd94b6..118fc4fc 100644 --- a/krita/core/kis_random_accessor.h +++ b/krita/core/kis_random_accessor.h @@ -31,17 +31,17 @@ class KisTiledDataManager; class KisRandomAccessor{ public: - KisRandomAccessor(KisTiledDataManager *ktm, Q_INT32 x, Q_INT32 y, Q_INT32 offsetx, Q_INT32 offsety, bool writable); + KisRandomAccessor(KisTiledDataManager *ktm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable); KisRandomAccessor(const KisRandomAccessor& rhs); ~KisRandomAccessor(); public: /// Move to a given x,y position, fetch tiles and data - void moveTo(Q_INT32 x, Q_INT32 y); - Q_UINT8* rawData() const; - const Q_UINT8* oldRawData() const; + void moveTo(TQ_INT32 x, TQ_INT32 y); + TQ_UINT8* rawData() const; + const TQ_UINT8* oldRawData() const; private: KisTiledRandomAccessorSP m_accessor; - Q_INT32 m_offsetx, m_offsety; + TQ_INT32 m_offsetx, m_offsety; }; class KisRandomAccessorPixelTrait { @@ -57,27 +57,27 @@ class KisRandomAccessorPixelTrait { { return (m_selectionAccessor) ? *(m_selectionAccessor->rawData()) > SELECTION_THRESHOLD : true; }; - inline Q_UINT8 operator[](int index) const + inline TQ_UINT8 operator[](int index) const { return m_underlyingAccessor->rawData()[index]; }; /** * Returns the degree of selectedness of the pixel. */ - inline Q_UINT8 selectedness() const + inline TQ_UINT8 selectedness() const { return (m_selectionAccessor) ? *(m_selectionAccessor->rawData()) : MAX_SELECTED; }; /** - * Returns the selectionmask from the current point; this is guaranteed + * Returns the selectiontqmask from the current point; this is guaranteed * to have the same number of consecutive pixels that the iterator has * at a given point. It return a 0 if there is no selection. */ - inline Q_UINT8 * selectionMask() const + inline TQ_UINT8 * selectionMask() const { return ( m_selectionAccessor ) ? m_selectionAccessor->rawData() : 0; } - inline void moveTo(Q_INT32 x, Q_INT32 y) { if(m_selectionAccessor) m_selectionAccessor->moveTo(x,y); } + inline void moveTo(TQ_INT32 x, TQ_INT32 y) { if(m_selectionAccessor) m_selectionAccessor->moveTo(x,y); } private: KisRandomAccessor* m_underlyingAccessor; @@ -86,9 +86,9 @@ class KisRandomAccessorPixelTrait { class KisRandomAccessorPixel : public KisRandomAccessor, public KisRandomAccessorPixelTrait { public: - KisRandomAccessorPixel(KisTiledDataManager *ktm, KisTiledDataManager *ktmselect, Q_INT32 x, Q_INT32 y, Q_INT32 offsetx, Q_INT32 offsety, bool writable); + KisRandomAccessorPixel(KisTiledDataManager *ktm, KisTiledDataManager *ktmselect, TQ_INT32 x, TQ_INT32 y, TQ_INT32 offsetx, TQ_INT32 offsety, bool writable); public: - inline void moveTo(Q_INT32 x, Q_INT32 y) { KisRandomAccessor::moveTo(x,y); KisRandomAccessorPixelTrait::moveTo(x,y); } + inline void moveTo(TQ_INT32 x, TQ_INT32 y) { KisRandomAccessor::moveTo(x,y); KisRandomAccessorPixelTrait::moveTo(x,y); } }; diff --git a/krita/core/kis_random_sub_accessor.cpp b/krita/core/kis_random_sub_accessor.cpp index 3b63f340..a1ce8aa4 100644 --- a/krita/core/kis_random_sub_accessor.cpp +++ b/krita/core/kis_random_sub_accessor.cpp @@ -32,51 +32,51 @@ KisRandomSubAccessorPixel::~KisRandomSubAccessorPixel() } -void KisRandomSubAccessorPixel::sampledOldRawData(Q_UINT8* dst) +void KisRandomSubAccessorPixel::sampledOldRawData(TQ_UINT8* dst) { - const Q_UINT8* pixels[4]; - Q_UINT8 weights[4]; + const TQ_UINT8* pixels[4]; + TQ_UINT8 weights[4]; int x = (int)floor(m_currentPoint.x()); int y = (int)floor(m_currentPoint.y()); double hsub = m_currentPoint.x() - x; if(hsub < 0.0 ) hsub = 1.0 + hsub; double vsub = m_currentPoint.y() - y; if(vsub < 0.0 ) vsub = 1.0 + vsub; - weights[0] = (int)qRound( ( 1.0 - hsub) * ( 1.0 - vsub) * 255 ); + weights[0] = (int)tqRound( ( 1.0 - hsub) * ( 1.0 - vsub) * 255 ); m_randomAccessor.moveTo(x, y); pixels[0] = m_randomAccessor.oldRawData(); - weights[1] = (int)qRound( ( 1.0 - vsub) * hsub * 255 ); + weights[1] = (int)tqRound( ( 1.0 - vsub) * hsub * 255 ); m_randomAccessor.moveTo(x+1, y); pixels[1] = m_randomAccessor.oldRawData(); - weights[2] = (int)qRound( vsub * ( 1.0 - hsub) * 255 ); + weights[2] = (int)tqRound( vsub * ( 1.0 - hsub) * 255 ); m_randomAccessor.moveTo(x, y+1); pixels[2] = m_randomAccessor.oldRawData(); - weights[3] = (int)qRound( hsub * vsub * 255 ); + weights[3] = (int)tqRound( hsub * vsub * 255 ); m_randomAccessor.moveTo(x+1, y+1); pixels[3] = m_randomAccessor.oldRawData(); m_device->colorSpace()->mixColors(pixels, weights, 4, dst); } -void KisRandomSubAccessorPixel::sampledRawData(Q_UINT8* dst) +void KisRandomSubAccessorPixel::sampledRawData(TQ_UINT8* dst) { - const Q_UINT8* pixels[4]; - Q_UINT8 weights[4]; + const TQ_UINT8* pixels[4]; + TQ_UINT8 weights[4]; int x = (int)floor(m_currentPoint.x()); int y = (int)floor(m_currentPoint.y()); double hsub = m_currentPoint.x() - x; if(hsub < 0.0 ) hsub = 1.0 + hsub; double vsub = m_currentPoint.y() - y; if(vsub < 0.0 ) vsub = 1.0 + vsub; - weights[0] = (int)qRound( ( 1.0 - hsub) * ( 1.0 - vsub) * 255 ); + weights[0] = (int)tqRound( ( 1.0 - hsub) * ( 1.0 - vsub) * 255 ); m_randomAccessor.moveTo(x, y); pixels[0] = m_randomAccessor.rawData(); - weights[1] = (int)qRound( ( 1.0 - vsub) * hsub * 255 ); + weights[1] = (int)tqRound( ( 1.0 - vsub) * hsub * 255 ); m_randomAccessor.moveTo(x+1, y); pixels[1] = m_randomAccessor.rawData(); - weights[2] = (int)qRound( vsub * ( 1.0 - hsub) * 255 ); + weights[2] = (int)tqRound( vsub * ( 1.0 - hsub) * 255 ); m_randomAccessor.moveTo(x, y+1); pixels[2] = m_randomAccessor.rawData(); - weights[3] = (int)qRound( hsub * vsub * 255 ); + weights[3] = (int)tqRound( hsub * vsub * 255 ); m_randomAccessor.moveTo(x+1, y+1); pixels[3] = m_randomAccessor.rawData(); m_device->colorSpace()->mixColors(pixels, weights, 4, dst); diff --git a/krita/core/kis_random_sub_accessor.h b/krita/core/kis_random_sub_accessor.h index 7beb7945..6ceb8345 100644 --- a/krita/core/kis_random_sub_accessor.h +++ b/krita/core/kis_random_sub_accessor.h @@ -31,8 +31,8 @@ class KisRandomSubAccessorPixel{ /** * Copy the sampled old value to destination */ - void sampledOldRawData(Q_UINT8* dst); - void sampledRawData(Q_UINT8* dst); + void sampledOldRawData(TQ_UINT8* dst); + void sampledRawData(TQ_UINT8* dst); inline void moveTo(double x, double y) { m_currentPoint.setX(x); m_currentPoint.setY(y); } inline void moveTo(const KisPoint& p ) { m_currentPoint = p; } private: diff --git a/krita/core/kis_rect.cc b/krita/core/kis_rect.cc index 892a5e32..175a07a9 100644 --- a/krita/core/kis_rect.cc +++ b/krita/core/kis_rect.cc @@ -21,8 +21,8 @@ #include "kis_rect.h" -QRect KisRect::qRect() const +TQRect KisRect::qRect() const { - return QRect(static_cast(floor(left())), static_cast(floor(top())), static_cast(ceil(right()) - floor(left())), static_cast(ceil(bottom()) - floor(top()))); + return TQRect(static_cast(floor(left())), static_cast(floor(top())), static_cast(ceil(right()) - floor(left())), static_cast(ceil(bottom()) - floor(top()))); } diff --git a/krita/core/kis_rect.h b/krita/core/kis_rect.h index 268b64eb..30a729c8 100644 --- a/krita/core/kis_rect.h +++ b/krita/core/kis_rect.h @@ -18,12 +18,12 @@ #ifndef KIS_RECT_H_ #define KIS_RECT_H_ -#include +#include #include #include "kis_point.h" /** - * A double-based rect class that can return a QRect that encloses the KisRect. + * A double-based rect class that can return a TQRect that encloses the KisRect. */ class KisRect : public KoRect { @@ -32,18 +32,18 @@ public: KisRect() {} KisRect(double x, double y, double w, double h) : super(x, y, w, h) {} KisRect(const KisPoint& topLeft, const KisPoint& bottomRight) : super(topLeft, bottomRight) {} - KisRect(const QRect& qr) : super(qr.x(), qr.y(), qr.width(), qr.height()) {} + KisRect(const TQRect& qr) : super(qr.x(), qr.y(), qr.width(), qr.height()) {} KisRect(const KoRect& r) : super(r) {} /** - * Return the QRect that encloses this KisRect. + * Return the TQRect that encloses this KisRect. */ - QRect qRect() const; + TQRect qRect() const; private: // Use qRect() which uses ceil() and floor() to return a rectangle - // 'enclosing' the rectangle, whereas toQRect rounds the points. - QRect toQRect() const; + // 'enclosing' the rectangle, whereas toTQRect rounds the points. + TQRect toTQRect() const; }; #endif // KIS_RECT_H_ diff --git a/krita/core/kis_resource.cc b/krita/core/kis_resource.cc index 256ffae5..a856cbb1 100644 --- a/krita/core/kis_resource.cc +++ b/krita/core/kis_resource.cc @@ -18,7 +18,7 @@ #include "kis_resource.h" #include "kis_global.h" -KisResource::KisResource(const QString& filename) +KisResource::KisResource(const TQString& filename) { m_filename = filename; m_valid = false; @@ -28,22 +28,22 @@ KisResource::~KisResource() { } -QString KisResource::filename() const +TQString KisResource::filename() const { return m_filename; } -void KisResource::setFilename(const QString& filename) +void KisResource::setFilename(const TQString& filename) { m_filename = filename; } -QString KisResource::name() const +TQString KisResource::name() const { return m_name; } -void KisResource::setName(const QString& name) +void KisResource::setName(const TQString& name) { m_name = name; } diff --git a/krita/core/kis_resource.h b/krita/core/kis_resource.h index d798d3cd..6510be2c 100644 --- a/krita/core/kis_resource.h +++ b/krita/core/kis_resource.h @@ -18,9 +18,9 @@ #ifndef KIS_RESOURCE_H_ #define KIS_RESOURCE_H_ -#include -#include -#include +#include +#include +#include /** @@ -29,9 +29,10 @@ * * This replaces the KisKrayon facility that used to be present in Krayon. */ -class KisResource : public QObject { - typedef QObject super; +class KisResource : public TQObject { + typedef TQObject super; Q_OBJECT + TQ_OBJECT public: @@ -41,7 +42,7 @@ public: * * @param filename the file name to save and load from. */ - KisResource(const QString& filename); + KisResource(const TQString& filename); virtual ~KisResource(); public: @@ -57,15 +58,15 @@ public: virtual bool save() = 0; /** - * Returns a QImage representing this resource. This image could be null. + * Returns a TQImage representing this resource. This image could be null. */ - virtual QImage img() = 0; + virtual TQImage img() = 0; public: - QString filename() const; - void setFilename(const QString& filename); - QString name() const; - void setName(const QString& name); + TQString filename() const; + void setFilename(const TQString& filename); + TQString name() const; + void setName(const TQString& name); bool valid() const; void setValid(bool valid); @@ -74,8 +75,8 @@ private: KisResource& operator=(const KisResource&); private: - QString m_name; - QString m_filename; + TQString m_name; + TQString m_filename; bool m_valid; }; diff --git a/krita/core/kis_rotate_visitor.cc b/krita/core/kis_rotate_visitor.cc index 4e703633..2a8bfd45 100644 --- a/krita/core/kis_rotate_visitor.cc +++ b/krita/core/kis_rotate_visitor.cc @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include -#include -#include -#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ void KisRotateVisitor::rotate(double angle, bool rotateAboutImageCentre, KisProg if (rotateAboutImageCentre) { centreOfRotation = KisPoint(m_dev->image()->width() / 2.0, m_dev->image()->height() / 2.0); } else { - QRect r = m_dev->exactBounds(); + TQRect r = m_dev->exactBounds(); centreOfRotation = KisPoint(r.x() + (r.width() / 2.0), r.y() + (r.height() / 2.0)); } @@ -54,7 +54,7 @@ void KisRotateVisitor::rotate(double angle, bool rotateAboutImageCentre, KisProg } KisPainter p(m_dev); - QRect r = rotated->extent(); + TQRect r = rotated->extent(); // OVER ipv COPY p.bitBlt(r.x(), r.y(), COMPOSITE_OVER, rotated, OPACITY_OPAQUE, r.x(), r.y(), r.width(), r.height()); @@ -69,7 +69,7 @@ void KisRotateVisitor::shear(double angleX, double angleY, KisProgressDisplayInt double thetaY = angleY * pi / 180; double shearY = tan(thetaY); - QRect r = m_dev->exactBounds(); + TQRect r = m_dev->exactBounds(); const int xShearSteps = r.height(); const int yShearSteps = r.width(); @@ -115,11 +115,11 @@ KisPaintDeviceSP KisRotateVisitor::rotateRight90(KisPaintDeviceSP src) dst->setX(src->getX()); dst->setY(src->getY()); - Q_INT32 pixelSize = src->pixelSize(); - QRect r = src->exactBounds(); - Q_INT32 x = 0; + TQ_INT32 pixelSize = src->pixelSize(); + TQRect r = src->exactBounds(); + TQ_INT32 x = 0; - for (Q_INT32 y = r.bottom(); y >= r.top(); --y) { + for (TQ_INT32 y = r.bottom(); y >= r.top(); --y) { KisHLineIteratorPixel hit = src->createHLineIterator(r.x(), y, r.width(), false); KisVLineIterator vit = dst->createVLineIterator(-y, r.x(), r.width(), true); @@ -141,11 +141,11 @@ KisPaintDeviceSP KisRotateVisitor::rotateLeft90(KisPaintDeviceSP src) { KisPaintDeviceSP dst = new KisPaintDevice(src->colorSpace(), "rotateleft90"); - Q_INT32 pixelSize = src->pixelSize(); - QRect r = src->exactBounds(); - Q_INT32 x = 0; + TQ_INT32 pixelSize = src->pixelSize(); + TQRect r = src->exactBounds(); + TQ_INT32 x = 0; - for (Q_INT32 y = r.top(); y <= r.bottom(); ++y) { + for (TQ_INT32 y = r.top(); y <= r.bottom(); ++y) { // Read the horizontal line from back to front, write onto the vertical column KisHLineIteratorPixel hit = src->createHLineIterator(r.x(), y, r.width(), false); KisVLineIterator vit = dst->createVLineIterator(y, -r.x() - r.width(), r.width(), true); @@ -171,10 +171,10 @@ KisPaintDeviceSP KisRotateVisitor::rotate180(KisPaintDeviceSP src) dst->setX(src->getX()); dst->setY(src->getY()); - Q_INT32 pixelSize = src->pixelSize(); - QRect r = src->exactBounds(); + TQ_INT32 pixelSize = src->pixelSize(); + TQRect r = src->exactBounds(); - for (Q_INT32 y = r.top(); y <= r.bottom(); ++y) { + for (TQ_INT32 y = r.top(); y <= r.bottom(); ++y) { KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), y, r.width(), false); KisHLineIterator dstIt = dst->createHLineIterator( -r.x() - r.width(), -y, r.width(), true); @@ -202,7 +202,7 @@ KisPaintDeviceSP KisRotateVisitor::rotate(KisPaintDeviceSP src, double angle, Ki angle = angle + 360; } - QRect r = src->exactBounds(); + TQRect r = src->exactBounds(); const int xShearSteps = r.height(); const int yShearSteps = r.width(); @@ -265,8 +265,8 @@ KisPaintDeviceSP KisRotateVisitor::rotate(KisPaintDeviceSP src, double angle, Ki centreOfRotation.x() * cosAngle - centreOfRotation.y() * sinAngle, centreOfRotation.x() * sinAngle + centreOfRotation.y() * cosAngle); - dst->setX((Q_INT32)(dst->getX() + centreOfRotation.x() - rotatedCentreOfRotation.x())); - dst->setY((Q_INT32)(dst->getY() + centreOfRotation.y() - rotatedCentreOfRotation.y())); + dst->setX((TQ_INT32)(dst->getX() + centreOfRotation.x() - rotatedCentreOfRotation.x())); + dst->setY((TQ_INT32)(dst->getY() + centreOfRotation.y() - rotatedCentreOfRotation.y())); setProgressDone(); @@ -279,23 +279,23 @@ KisPaintDeviceSP KisRotateVisitor::xShear(KisPaintDeviceSP src, double shearX) dst->setX(src->getX()); dst->setY(src->getY()); - QRect r = src->exactBounds(); + TQRect r = src->exactBounds(); double displacement; - Q_INT32 displacementInt; + TQ_INT32 displacementInt; double weight; - for (Q_INT32 y = r.top(); y <= r.bottom(); y++) { + for (TQ_INT32 y = r.top(); y <= r.bottom(); y++) { //calculate displacement displacement = -y * shearX; - displacementInt = (Q_INT32)(floor(displacement)); + displacementInt = (TQ_INT32)(floor(displacement)); weight = displacement - displacementInt; - Q_UINT8 pixelWeights[2]; + TQ_UINT8 pixelWeights[2]; - pixelWeights[0] = static_cast(weight * 255 + 0.5); + pixelWeights[0] = static_cast(weight * 255 + 0.5); pixelWeights[1] = 255 - pixelWeights[0]; KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), y, r.width() + 1, false); @@ -304,7 +304,7 @@ KisPaintDeviceSP KisRotateVisitor::xShear(KisPaintDeviceSP src, double shearX) while (!srcIt.isDone()) { - const Q_UINT8 *pixelPtrs[2]; + const TQ_UINT8 *pixelPtrs[2]; pixelPtrs[0] = leftSrcIt.rawData(); pixelPtrs[1] = srcIt.rawData(); @@ -327,23 +327,23 @@ KisPaintDeviceSP KisRotateVisitor::yShear(KisPaintDeviceSP src, double shearY) dst->setX(src->getX()); dst->setY(src->getY()); - QRect r = src->exactBounds(); + TQRect r = src->exactBounds(); double displacement; - Q_INT32 displacementInt; + TQ_INT32 displacementInt; double weight; - for (Q_INT32 x = r.left(); x <= r.right(); x++) { + for (TQ_INT32 x = r.left(); x <= r.right(); x++) { //calculate displacement displacement = x * shearY; - displacementInt = (Q_INT32)(floor(displacement)); + displacementInt = (TQ_INT32)(floor(displacement)); weight = displacement - displacementInt; - Q_UINT8 pixelWeights[2]; + TQ_UINT8 pixelWeights[2]; - pixelWeights[0] = static_cast(weight * 255 + 0.5); + pixelWeights[0] = static_cast(weight * 255 + 0.5); pixelWeights[1] = 255 - pixelWeights[0]; KisVLineIteratorPixel srcIt = src->createVLineIterator(x, r.y(), r.height() + 1, false); @@ -352,7 +352,7 @@ KisPaintDeviceSP KisRotateVisitor::yShear(KisPaintDeviceSP src, double shearY) while (!srcIt.isDone()) { - const Q_UINT8 *pixelPtrs[2]; + const TQ_UINT8 *pixelPtrs[2]; pixelPtrs[0] = leftSrcIt.rawData(); pixelPtrs[1] = srcIt.rawData(); @@ -369,7 +369,7 @@ KisPaintDeviceSP KisRotateVisitor::yShear(KisPaintDeviceSP src, double shearY) return dst; } -void KisRotateVisitor::initProgress(Q_INT32 totalSteps) +void KisRotateVisitor::initProgress(TQ_INT32 totalSteps) { if (!m_progress) return; @@ -388,7 +388,7 @@ void KisRotateVisitor::incrementProgress() if (!m_progress) return; m_progressStep++; - Q_INT32 progressPerCent = (m_progressStep * 100) / m_progressTotalSteps; + TQ_INT32 progressPerCent = (m_progressStep * 100) / m_progressTotalSteps; if (progressPerCent != m_lastProgressPerCent) { m_lastProgressPerCent = progressPerCent; diff --git a/krita/core/kis_rotate_visitor.h b/krita/core/kis_rotate_visitor.h index 19db35f4..ea23f84f 100644 --- a/krita/core/kis_rotate_visitor.h +++ b/krita/core/kis_rotate_visitor.h @@ -21,7 +21,7 @@ #include "kis_types.h" #include "kis_progress_subject.h" -class QRect; +class TQRect; class KisPaintDevice; class KisProgressDisplayInterface; @@ -46,14 +46,14 @@ private: bool m_cancelRequested; virtual void cancel() { m_cancelRequested = true; } - void initProgress(Q_INT32 totalSteps); + void initProgress(TQ_INT32 totalSteps); void incrementProgress(); void setProgressDone(); KisProgressDisplayInterface *m_progress; - Q_INT32 m_progressStep; - Q_INT32 m_progressTotalSteps; - Q_INT32 m_lastProgressPerCent; + TQ_INT32 m_progressStep; + TQ_INT32 m_progressTotalSteps; + TQ_INT32 m_lastProgressPerCent; KisPaintDeviceSP rotateRight90(KisPaintDeviceSP src); KisPaintDeviceSP rotateLeft90(KisPaintDeviceSP src); diff --git a/krita/core/kis_scale_visitor.cc b/krita/core/kis_scale_visitor.cc index 424db7c6..25ad47c4 100644 --- a/krita/core/kis_scale_visitor.cc +++ b/krita/core/kis_scale_visitor.cc @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -29,60 +29,60 @@ void KisScaleWorker::run() { double fwidth = m_filterStrategy->support(); - QRect rect = m_dev -> exactBounds(); - Q_INT32 width = rect.width(); - Q_INT32 height = rect.height(); + TQRect rect = m_dev -> exactBounds(); + TQ_INT32 width = rect.width(); + TQ_INT32 height = rect.height(); m_pixelSize=m_dev -> pixelSize(); // compute size of target image if ( m_sx == 1.0F && m_sy == 1.0F ) { return; } - Q_INT32 targetW = QABS( qRound( m_sx * width ) ); - Q_INT32 targetH = QABS( qRound( m_sy * height ) ); + TQ_INT32 targetW = TQABS( tqRound( m_sx * width ) ); + TQ_INT32 targetH = TQABS( tqRound( m_sy * height ) ); - Q_UINT8* newData = new Q_UINT8[targetW * targetH * m_pixelSize ]; + TQ_UINT8* newData = new TQ_UINT8[targetW * targetH * m_pixelSize ]; Q_CHECK_PTR(newData); double* weight = new double[ m_pixelSize ]; /* filter calculation variables */ - Q_UINT8* pel = new Q_UINT8[ m_pixelSize ]; + TQ_UINT8* pel = new TQ_UINT8[ m_pixelSize ]; Q_CHECK_PTR(pel); - Q_UINT8 *pel2 = new Q_UINT8[ m_pixelSize ]; + TQ_UINT8 *pel2 = new TQ_UINT8[ m_pixelSize ]; Q_CHECK_PTR(pel2); bool* bPelDelta = new bool[ m_pixelSize ]; ContribList *contribX; ContribList contribY; - const Q_INT32 BLACK_PIXEL=0; - const Q_INT32 WHITE_PIXEL=255; + const TQ_INT32 BLACK_PIXEL=0; + const TQ_INT32 WHITE_PIXEL=255; // create intermediate row to hold vertical dst row zoom - Q_UINT8 * tmp = new Q_UINT8[ width * m_pixelSize ]; + TQ_UINT8 * tmp = new TQ_UINT8[ width * m_pixelSize ]; Q_CHECK_PTR(tmp); //create array of pointers to intermediate rows - Q_UINT8 **tmpRows = new Q_UINT8*[ height ]; + TQ_UINT8 **tmpRows = new TQ_UINT8*[ height ]; //create array of pointers to intermediate rows that are actually used simultaneously and allocate memory for the rows - Q_UINT8 **tmpRowsMem; + TQ_UINT8 **tmpRowsMem; if(m_sy < 1.0) { - tmpRowsMem = new Q_UINT8*[ (int)(fwidth / m_sy * 2 + 1) ]; + tmpRowsMem = new TQ_UINT8*[ (int)(fwidth / m_sy * 2 + 1) ]; for(int i = 0; i < (int)(fwidth / m_sy * 2 + 1); i++) { - tmpRowsMem[i] = new Q_UINT8[ width * m_pixelSize ]; + tmpRowsMem[i] = new TQ_UINT8[ width * m_pixelSize ]; Q_CHECK_PTR(tmpRowsMem[i]); } } else { - tmpRowsMem = new Q_UINT8*[ (int)(fwidth * 2 + 1) ]; + tmpRowsMem = new TQ_UINT8*[ (int)(fwidth * 2 + 1) ]; for(int i = 0; i < (int)(fwidth * 2 + 1); i++) { - tmpRowsMem[i] = new Q_UINT8[ width * m_pixelSize ]; + tmpRowsMem[i] = new TQ_UINT8[ width * m_pixelSize ]; Q_CHECK_PTR(tmpRowsMem[i]); } } @@ -94,7 +94,7 @@ void KisScaleWorker::run() calcContrib(&contribX[x], m_sx, fwidth, width, m_filterStrategy, x); } - QTime starttime = QTime::currentTime (); + TQTime starttime = TQTime::currentTime (); for(int y = 0; y < targetH; y++) { @@ -106,7 +106,7 @@ void KisScaleWorker::run() { if (!(contribY.p[srcpos].m_pixel < 0 || contribY.p[srcpos].m_pixel >= height)) { - tmpRows[contribY.p[srcpos].m_pixel] = new Q_UINT8[ width * m_pixelSize ]; + tmpRows[contribY.p[srcpos].m_pixel] = new TQ_UINT8[ width * m_pixelSize ]; //tmpRows[ contribY.p[srcpos].m_pixel ] = tmpRowsMem[ srcpos ]; m_dev ->readBytes(tmpRows[contribY.p[srcpos].m_pixel], 0, contribY.p[srcpos].m_pixel, width, 1); } @@ -133,8 +133,8 @@ void KisScaleWorker::run() } for(int channel = 0; channel < m_pixelSize; channel++){ - weight[channel] = bPelDelta[channel] ? static_cast(qRound(weight[channel])) : pel[channel]; - tmp[ x * m_pixelSize + channel ] = static_cast(CLAMP(weight[channel], BLACK_PIXEL, WHITE_PIXEL)); + weight[channel] = bPelDelta[channel] ? static_cast(tqRound(weight[channel])) : pel[channel]; + tmp[ x * m_pixelSize + channel ] = static_cast(CLAMP(weight[channel], BLACK_PIXEL, WHITE_PIXEL)); } } /* next row in temp column */ delete[] contribY.p; @@ -156,7 +156,7 @@ void KisScaleWorker::run() } } for(int channel = 0; channel < m_pixelSize; channel++){ - weight[channel] = bPelDelta[channel] ? static_cast(qRound(weight[channel])) : pel[channel]; + weight[channel] = bPelDelta[channel] ? static_cast(tqRound(weight[channel])) : pel[channel]; int currentPos = (y*targetW+x) * m_pixelSize; // try to be at least a little efficient if (weight[channel]<0) newData[currentPos + channel] = 0; @@ -201,11 +201,11 @@ void KisScaleWorker::run() } } - QTime stoptime = QTime::currentTime (); + TQTime stoptime = TQTime::currentTime (); return; } -int KisScaleWorker::calcContrib(ContribList *contrib, double scale, double fwidth, int srcwidth, KisFilterStrategy* filterStrategy, Q_INT32 i) +int KisScaleWorker::calcContrib(ContribList *contrib, double scale, double fwidth, int srcwidth, KisFilterStrategy* filterStrategy, TQ_INT32 i) { //ContribList* contribX: receiver of contrib info //double m_sx: horizontal zooming scale @@ -219,7 +219,7 @@ int KisScaleWorker::calcContrib(ContribList *contrib, double scale, double fwidt double fscale; double center, begin, end; double weight; - Q_INT32 k, n; + TQ_INT32 k, n; if(scale < 1.0) { diff --git a/krita/core/kis_scale_visitor.h b/krita/core/kis_scale_visitor.h index e20ba2e0..afe358ad 100644 --- a/krita/core/kis_scale_visitor.h +++ b/krita/core/kis_scale_visitor.h @@ -42,13 +42,13 @@ class KisScaleWorker : public KisThread { /* Structs for the image rescaling routine */ class Contrib { public: - Q_INT32 m_pixel; + TQ_INT32 m_pixel; double m_weight; }; class ContribList { public: - Q_INT32 n; //number of contributors + TQ_INT32 n; //number of contributors Contrib *p; //pointer to list of contributions }; @@ -67,7 +67,7 @@ public: void run(); private: - Q_INT32 m_pixelSize; + TQ_INT32 m_pixelSize; KisPaintDevice * m_dev; double m_sx, m_sy; KisFilterStrategy * m_filterStrategy; @@ -81,7 +81,7 @@ private: * * Returns -1 if error, 0 otherwise. */ - int calcContrib(ContribList *contribX, double cale, double fwidth, int srcwidth, KisFilterStrategy *filterStrategy, Q_INT32 i); + int calcContrib(ContribList *contribX, double cale, double fwidth, int srcwidth, KisFilterStrategy *filterStrategy, TQ_INT32 i); ContribList * contrib; //array of contribution lists @@ -193,7 +193,7 @@ public: private: - QPtrList m_scalethreads; + TQPtrList m_scalethreads; KisImageSP m_img; double m_sx; double m_sy; diff --git a/krita/core/kis_selected_transaction.cc b/krita/core/kis_selected_transaction.cc index 78430a84..44eec697 100644 --- a/krita/core/kis_selected_transaction.cc +++ b/krita/core/kis_selected_transaction.cc @@ -20,7 +20,7 @@ #include "kis_selected_transaction.h" #include "kis_selection.h" -KisSelectedTransaction::KisSelectedTransaction(const QString& name, KisPaintDeviceSP device) : +KisSelectedTransaction::KisSelectedTransaction(const TQString& name, KisPaintDeviceSP device) : KisTransaction(name, device), m_device(device), m_hadSelection(device->hasSelection()) diff --git a/krita/core/kis_selected_transaction.h b/krita/core/kis_selected_transaction.h index 7d1182c0..c366f336 100644 --- a/krita/core/kis_selected_transaction.h +++ b/krita/core/kis_selected_transaction.h @@ -20,8 +20,8 @@ #define KIS_SELECTED_TRANSACTION_H_ #include -#include -#include +#include +#include #include "kis_transaction.h" @@ -30,7 +30,7 @@ class KRITACORE_EXPORT KisSelectedTransaction : public KisTransaction { typedef KisTransaction super; public: - KisSelectedTransaction(const QString& name, KisPaintDeviceSP device); + KisSelectedTransaction(const TQString& name, KisPaintDeviceSP device); virtual ~KisSelectedTransaction(); public: diff --git a/krita/core/kis_selection.cc b/krita/core/kis_selection.cc index 9964a355..0150ecf2 100644 --- a/krita/core/kis_selection.cc +++ b/krita/core/kis_selection.cc @@ -16,11 +16,11 @@ * foundation, inc., 675 mass ave, cambridge, ma 02139, usa. */ -#include +#include #include #include -#include +#include #include "kis_layer.h" #include "kis_debug_areas.h" @@ -35,9 +35,9 @@ #include "kis_selection.h" KisSelection::KisSelection(KisPaintDeviceSP dev) - : super(dev->parentLayer() + : super(dev->tqparentLayer() , KisMetaRegistry::instance()->csRegistry()->getAlpha8() - , (QString("selection for ") + dev->name()).latin1()) + , (TQString("selection for ") + dev->name()).latin1()) , m_parentPaintDevice(dev) , m_doCacheExactRect(false) , m_dirty(false) @@ -61,46 +61,46 @@ KisSelection::~KisSelection() { } -Q_UINT8 KisSelection::selected(Q_INT32 x, Q_INT32 y) +TQ_UINT8 KisSelection::selected(TQ_INT32 x, TQ_INT32 y) { KisHLineIteratorPixel iter = createHLineIterator(x, y, 1, false); - Q_UINT8 *pix = iter.rawData(); + TQ_UINT8 *pix = iter.rawData(); return *pix; } -void KisSelection::setSelected(Q_INT32 x, Q_INT32 y, Q_UINT8 s) +void KisSelection::setSelected(TQ_INT32 x, TQ_INT32 y, TQ_UINT8 s) { KisHLineIteratorPixel iter = createHLineIterator(x, y, 1, true); - Q_UINT8 *pix = iter.rawData(); + TQ_UINT8 *pix = iter.rawData(); *pix = s; } -QImage KisSelection::maskImage() +TQImage KisSelection::tqmaskImage() { - // If part of a KisAdjustmentLayer, there may be no parent device. - QImage img; - QRect bounds; + // If part of a KisAdjustmentLayer, there may be no tqparent device. + TQImage img; + TQRect bounds; if (m_parentPaintDevice) { bounds = m_parentPaintDevice->exactBounds(); bounds = bounds.intersect( m_parentPaintDevice->image()->bounds() ); - img = QImage(bounds.width(), bounds.height(), 32); + img = TQImage(bounds.width(), bounds.height(), 32); } else { - bounds = QRect( 0, 0, image()->width(), image()->height()); - img = QImage(bounds.width(), bounds.height(), 32); + bounds = TQRect( 0, 0, image()->width(), image()->height()); + img = TQImage(bounds.width(), bounds.height(), 32); } KisHLineIteratorPixel it = createHLineIterator(bounds.x(), bounds.y(), bounds.width(), false); for (int y2 = bounds.y(); y2 < bounds.height() - bounds.y(); ++y2) { int x2 = 0; while (!it.isDone()) { - Q_UINT8 s = MAX_SELECTED - *(it.rawData()); - Q_INT32 c = qRgb(s, s, s); + TQ_UINT8 s = MAX_SELECTED - *(it.rawData()); + TQ_INT32 c = tqRgb(s, s, s); img.setPixel(x2, y2, c); ++x2; ++it; @@ -109,32 +109,32 @@ QImage KisSelection::maskImage() } return img; } -void KisSelection::select(QRect r) +void KisSelection::select(TQRect r) { KisFillPainter painter(this); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - painter.fillRect(r, KisColor(Qt::white, cs), MAX_SELECTED); - Q_INT32 x, y, w, h; + painter.fillRect(r, KisColor(TQt::white, cs), MAX_SELECTED); + TQ_INT32 x, y, w, h; extent(x, y, w, h); } -void KisSelection::clear(QRect r) +void KisSelection::clear(TQRect r) { KisFillPainter painter(this); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - painter.fillRect(r, KisColor(Qt::white, cs), MIN_SELECTED); + painter.fillRect(r, KisColor(TQt::white, cs), MIN_SELECTED); } void KisSelection::clear() { - Q_UINT8 defPixel = MIN_SELECTED; + TQ_UINT8 defPixel = MIN_SELECTED; m_datamanager->setDefaultPixel(&defPixel); m_datamanager->clear(); } void KisSelection::invert() { - Q_INT32 x,y,w,h; + TQ_INT32 x,y,w,h; extent(x, y, w, h); KisRectIterator it = createRectIterator(x, y, w, h, true); @@ -145,28 +145,28 @@ void KisSelection::invert() *(it.rawData()) = MAX_SELECTED - *(it.rawData()); ++it; } - Q_UINT8 defPixel = MAX_SELECTED - *(m_datamanager->defaultPixel()); + TQ_UINT8 defPixel = MAX_SELECTED - *(m_datamanager->defaultPixel()); m_datamanager->setDefaultPixel(&defPixel); } -bool KisSelection::isTotallyUnselected(QRect r) +bool KisSelection::isTotallyUnselected(TQRect r) { if(*(m_datamanager->defaultPixel()) != MIN_SELECTED) return false; - QRect sr = selectedExactRect(); + TQRect sr = selectedExactRect(); return ! r.intersects(sr); } -bool KisSelection::isProbablyTotallyUnselected(QRect r) +bool KisSelection::isProbablyTotallyUnselected(TQRect r) { if(*(m_datamanager->defaultPixel()) != MIN_SELECTED) return false; - QRect sr = selectedRect(); + TQRect sr = selectedRect(); return ! r.intersects(sr); } -QRect KisSelection::selectedRect() const +TQRect KisSelection::selectedRect() const { if(*(m_datamanager->defaultPixel()) == MIN_SELECTED || !m_parentPaintDevice) return extent(); @@ -174,7 +174,7 @@ QRect KisSelection::selectedRect() const return extent().unite(m_parentPaintDevice->extent()); } -QRect KisSelection::selectedExactRect() const +TQRect KisSelection::selectedExactRect() const { if(m_doCacheExactRect) return m_cachedExactRect; @@ -201,42 +201,42 @@ void KisSelection::startCachingExactRect() m_doCacheExactRect = true; } -void KisSelection::paintUniformSelectionRegion(QImage img, const QRect& imageRect, const QRegion& uniformRegion) +void KisSelection::paintUniformSelectionRegion(TQImage img, const TQRect& imageRect, const TQRegion& uniformRegion) { Q_ASSERT(img.size() == imageRect.size()); - Q_ASSERT(imageRect.contains(uniformRegion.boundingRect())); + Q_ASSERT(imageRect.tqcontains(uniformRegion.boundingRect())); - if (img.isNull() || img.size() != imageRect.size() || !imageRect.contains(uniformRegion.boundingRect())) { + if (img.isNull() || img.size() != imageRect.size() || !imageRect.tqcontains(uniformRegion.boundingRect())) { return; } if (*m_datamanager->defaultPixel() == MIN_SELECTED) { - QRegion region = uniformRegion & QRegion(imageRect); + TQRegion region = uniformRegion & TQRegion(imageRect); if (!region.isEmpty()) { - QMemArray rects = region.rects(); + TQMemArray rects = region.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect r = rects[i]; + TQRect r = rects[i]; - for (Q_INT32 y = 0; y < r.height(); ++y) { + for (TQ_INT32 y = 0; y < r.height(); ++y) { - QRgb *imagePixel = reinterpret_cast(img.scanLine(r.y() - imageRect.y() + y)); + TQRgb *imagePixel = reinterpret_cast(img.scanLine(r.y() - imageRect.y() + y)); imagePixel += r.x() - imageRect.x(); - Q_INT32 numPixels = r.width(); + TQ_INT32 numPixels = r.width(); while (numPixels > 0) { - QRgb srcPixel = *imagePixel; - Q_UINT8 srcGrey = (qRed(srcPixel) + qGreen(srcPixel) + qBlue(srcPixel)) / 9; - Q_UINT8 srcAlpha = qAlpha(srcPixel); + TQRgb srcPixel = *imagePixel; + TQ_UINT8 srcGrey = (tqRed(srcPixel) + tqGreen(srcPixel) + tqBlue(srcPixel)) / 9; + TQ_UINT8 srcAlpha = tqAlpha(srcPixel); srcGrey = UINT8_MULT(srcGrey, srcAlpha); - Q_UINT8 dstAlpha = QMAX(srcAlpha, 192); + TQ_UINT8 dstAlpha = TQMAX(srcAlpha, 192); - QRgb dstPixel = qRgba(128 + srcGrey, 128 + srcGrey, 165 + srcGrey, dstAlpha); + TQRgb dstPixel = tqRgba(128 + srcGrey, 128 + srcGrey, 165 + srcGrey, dstAlpha); *imagePixel = dstPixel; ++imagePixel; @@ -248,111 +248,111 @@ void KisSelection::paintUniformSelectionRegion(QImage img, const QRect& imageRec } } -void KisSelection::paintSelection(QImage img, Q_INT32 imageRectX, Q_INT32 imageRectY, Q_INT32 imageRectWidth, Q_INT32 imageRectHeight) +void KisSelection::paintSelection(TQImage img, TQ_INT32 imageRectX, TQ_INT32 imageRectY, TQ_INT32 imageRectWidth, TQ_INT32 imageRectHeight) { - Q_ASSERT(img.size() == QSize(imageRectWidth, imageRectHeight)); + Q_ASSERT(img.size() == TQSize(imageRectWidth, imageRectHeight)); - if (img.isNull() || img.size() != QSize(imageRectWidth, imageRectHeight)) { + if (img.isNull() || img.size() != TQSize(imageRectWidth, imageRectHeight)) { return; } - QRect imageRect(imageRectX, imageRectY, imageRectWidth, imageRectHeight); - QRect selectionExtent = extent(); + TQRect imageRect(imageRectX, imageRectY, imageRectWidth, imageRectHeight); + TQRect selectionExtent = extent(); selectionExtent.setLeft(selectionExtent.left() - 1); selectionExtent.setTop(selectionExtent.top() - 1); selectionExtent.setWidth(selectionExtent.width() + 2); selectionExtent.setHeight(selectionExtent.height() + 2); - QRegion uniformRegion = QRegion(imageRect); - uniformRegion -= QRegion(selectionExtent); + TQRegion uniformRegion = TQRegion(imageRect); + uniformRegion -= TQRegion(selectionExtent); if (!uniformRegion.isEmpty()) { paintUniformSelectionRegion(img, imageRect, uniformRegion); } - QRect nonuniformRect = imageRect & selectionExtent; + TQRect nonuniformRect = imageRect & selectionExtent; if (!nonuniformRect.isEmpty()) { - const Q_INT32 imageRectOffsetX = nonuniformRect.x() - imageRectX; - const Q_INT32 imageRectOffsetY = nonuniformRect.y() - imageRectY; + const TQ_INT32 imageRectOffsetX = nonuniformRect.x() - imageRectX; + const TQ_INT32 imageRectOffsetY = nonuniformRect.y() - imageRectY; imageRectX = nonuniformRect.x(); imageRectY = nonuniformRect.y(); imageRectWidth = nonuniformRect.width(); imageRectHeight = nonuniformRect.height(); - const Q_INT32 NUM_SELECTION_ROWS = 3; + const TQ_INT32 NUM_SELECTION_ROWS = 3; - Q_UINT8 *selectionRow[NUM_SELECTION_ROWS]; + TQ_UINT8 *selectionRow[NUM_SELECTION_ROWS]; - Q_INT32 aboveRowIndex = 0; - Q_INT32 centreRowIndex = 1; - Q_INT32 belowRowIndex = 2; + TQ_INT32 aboveRowIndex = 0; + TQ_INT32 centreRowIndex = 1; + TQ_INT32 belowRowIndex = 2; - selectionRow[aboveRowIndex] = new Q_UINT8[imageRectWidth + 2]; - selectionRow[centreRowIndex] = new Q_UINT8[imageRectWidth + 2]; - selectionRow[belowRowIndex] = new Q_UINT8[imageRectWidth + 2]; + selectionRow[aboveRowIndex] = new TQ_UINT8[imageRectWidth + 2]; + selectionRow[centreRowIndex] = new TQ_UINT8[imageRectWidth + 2]; + selectionRow[belowRowIndex] = new TQ_UINT8[imageRectWidth + 2]; readBytes(selectionRow[centreRowIndex], imageRectX - 1, imageRectY - 1, imageRectWidth + 2, 1); readBytes(selectionRow[belowRowIndex], imageRectX - 1, imageRectY, imageRectWidth + 2, 1); - for (Q_INT32 y = 0; y < imageRectHeight; ++y) { + for (TQ_INT32 y = 0; y < imageRectHeight; ++y) { - Q_INT32 oldAboveRowIndex = aboveRowIndex; + TQ_INT32 oldAboveRowIndex = aboveRowIndex; aboveRowIndex = centreRowIndex; centreRowIndex = belowRowIndex; belowRowIndex = oldAboveRowIndex; readBytes(selectionRow[belowRowIndex], imageRectX - 1, imageRectY + y + 1, imageRectWidth + 2, 1); - const Q_UINT8 *aboveRow = selectionRow[aboveRowIndex] + 1; - const Q_UINT8 *centreRow = selectionRow[centreRowIndex] + 1; - const Q_UINT8 *belowRow = selectionRow[belowRowIndex] + 1; + const TQ_UINT8 *aboveRow = selectionRow[aboveRowIndex] + 1; + const TQ_UINT8 *centreRow = selectionRow[centreRowIndex] + 1; + const TQ_UINT8 *belowRow = selectionRow[belowRowIndex] + 1; - QRgb *imagePixel = reinterpret_cast(img.scanLine(imageRectOffsetY + y)); + TQRgb *imagePixel = reinterpret_cast(img.scanLine(imageRectOffsetY + y)); imagePixel += imageRectOffsetX; - for (Q_INT32 x = 0; x < imageRectWidth; ++x) { + for (TQ_INT32 x = 0; x < imageRectWidth; ++x) { - Q_UINT8 centre = *centreRow; + TQ_UINT8 centre = *centreRow; if (centre != MAX_SELECTED) { // this is where we come if the pixels should be blue or bluish - QRgb srcPixel = *imagePixel; - Q_UINT8 srcGrey = (qRed(srcPixel) + qGreen(srcPixel) + qBlue(srcPixel)) / 9; - Q_UINT8 srcAlpha = qAlpha(srcPixel); + TQRgb srcPixel = *imagePixel; + TQ_UINT8 srcGrey = (tqRed(srcPixel) + tqGreen(srcPixel) + tqBlue(srcPixel)) / 9; + TQ_UINT8 srcAlpha = tqAlpha(srcPixel); // Colour influence is proportional to alphaPixel. srcGrey = UINT8_MULT(srcGrey, srcAlpha); - QRgb dstPixel; + TQRgb dstPixel; if (centre == MIN_SELECTED) { //this is where we come if the pixels should be blue (or red outline) - Q_UINT8 left = *(centreRow - 1); - Q_UINT8 right = *(centreRow + 1); - Q_UINT8 above = *aboveRow; - Q_UINT8 below = *belowRow; + TQ_UINT8 left = *(centreRow - 1); + TQ_UINT8 right = *(centreRow + 1); + TQ_UINT8 above = *aboveRow; + TQ_UINT8 below = *belowRow; // Stop unselected transparent areas from appearing the same // as selected transparent areas. - Q_UINT8 dstAlpha = QMAX(srcAlpha, 192); + TQ_UINT8 dstAlpha = TQMAX(srcAlpha, 192); // now for a simple outline based on 4-connectivity if (left != MIN_SELECTED || right != MIN_SELECTED || above != MIN_SELECTED || below != MIN_SELECTED) { - dstPixel = qRgba(255, 0, 0, dstAlpha); + dstPixel = tqRgba(255, 0, 0, dstAlpha); } else { - dstPixel = qRgba(128 + srcGrey, 128 + srcGrey, 165 + srcGrey, dstAlpha); + dstPixel = tqRgba(128 + srcGrey, 128 + srcGrey, 165 + srcGrey, dstAlpha); } } else { - dstPixel = qRgba(UINT8_BLEND(qRed(srcPixel), srcGrey + 128, centre), - UINT8_BLEND(qGreen(srcPixel), srcGrey + 128, centre), - UINT8_BLEND(qBlue(srcPixel), srcGrey + 165, centre), + dstPixel = tqRgba(UINT8_BLEND(tqRed(srcPixel), srcGrey + 128, centre), + UINT8_BLEND(tqGreen(srcPixel), srcGrey + 128, centre), + UINT8_BLEND(tqBlue(srcPixel), srcGrey + 165, centre), srcAlpha); } @@ -372,7 +372,7 @@ void KisSelection::paintSelection(QImage img, Q_INT32 imageRectX, Q_INT32 imageR } } -void KisSelection::paintSelection(QImage img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize) +void KisSelection::paintSelection(TQImage img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize) { if (img.isNull() || scaledImageRect.isEmpty() || scaledImageSize.isEmpty() || imageSize.isEmpty()) { return; @@ -384,10 +384,10 @@ void KisSelection::paintSelection(QImage img, const QRect& scaledImageRect, cons return; } - Q_INT32 imageWidth = imageSize.width(); - Q_INT32 imageHeight = imageSize.height(); + TQ_INT32 imageWidth = imageSize.width(); + TQ_INT32 imageHeight = imageSize.height(); - QRect selectionExtent = extent(); + TQRect selectionExtent = extent(); selectionExtent.setLeft(selectionExtent.left() - 1); selectionExtent.setTop(selectionExtent.top() - 1); @@ -397,63 +397,63 @@ void KisSelection::paintSelection(QImage img, const QRect& scaledImageRect, cons double xScale = static_cast(scaledImageSize.width()) / imageWidth; double yScale = static_cast(scaledImageSize.height()) / imageHeight; - QRect scaledSelectionExtent; + TQRect scaledSelectionExtent; scaledSelectionExtent.setLeft(static_cast(selectionExtent.left() * xScale)); scaledSelectionExtent.setRight(static_cast(ceil((selectionExtent.right() + 1) * xScale)) - 1); scaledSelectionExtent.setTop(static_cast(selectionExtent.top() * yScale)); scaledSelectionExtent.setBottom(static_cast(ceil((selectionExtent.bottom() + 1) * yScale)) - 1); - QRegion uniformRegion = QRegion(scaledImageRect); - uniformRegion -= QRegion(scaledSelectionExtent); + TQRegion uniformRegion = TQRegion(scaledImageRect); + uniformRegion -= TQRegion(scaledSelectionExtent); if (!uniformRegion.isEmpty()) { paintUniformSelectionRegion(img, scaledImageRect, uniformRegion); } - QRect nonuniformRect = scaledImageRect & scaledSelectionExtent; + TQRect nonuniformRect = scaledImageRect & scaledSelectionExtent; if (!nonuniformRect.isEmpty()) { - const Q_INT32 scaledImageRectXOffset = nonuniformRect.x() - scaledImageRect.x(); - const Q_INT32 scaledImageRectYOffset = nonuniformRect.y() - scaledImageRect.y(); + const TQ_INT32 scaledImageRectXOffset = nonuniformRect.x() - scaledImageRect.x(); + const TQ_INT32 scaledImageRectYOffset = nonuniformRect.y() - scaledImageRect.y(); - const Q_INT32 scaledImageRectX = nonuniformRect.x(); - const Q_INT32 scaledImageRectY = nonuniformRect.y(); - const Q_INT32 scaledImageRectWidth = nonuniformRect.width(); - const Q_INT32 scaledImageRectHeight = nonuniformRect.height(); + const TQ_INT32 scaledImageRectX = nonuniformRect.x(); + const TQ_INT32 scaledImageRectY = nonuniformRect.y(); + const TQ_INT32 scaledImageRectWidth = nonuniformRect.width(); + const TQ_INT32 scaledImageRectHeight = nonuniformRect.height(); - const Q_INT32 imageRowLeft = static_cast(scaledImageRectX / xScale); - const Q_INT32 imageRowRight = static_cast((ceil((scaledImageRectX + scaledImageRectWidth - 1 + 1) / xScale)) - 1); + const TQ_INT32 imageRowLeft = static_cast(scaledImageRectX / xScale); + const TQ_INT32 imageRowRight = static_cast((ceil((scaledImageRectX + scaledImageRectWidth - 1 + 1) / xScale)) - 1); - const Q_INT32 imageRowWidth = imageRowRight - imageRowLeft + 1; - const Q_INT32 imageRowStride = imageRowWidth + 2; + const TQ_INT32 imageRowWidth = imageRowRight - imageRowLeft + 1; + const TQ_INT32 imageRowStride = imageRowWidth + 2; - const Q_INT32 NUM_SELECTION_ROWS = 3; + const TQ_INT32 NUM_SELECTION_ROWS = 3; - Q_INT32 aboveRowIndex = 0; - Q_INT32 centreRowIndex = 1; - Q_INT32 belowRowIndex = 2; + TQ_INT32 aboveRowIndex = 0; + TQ_INT32 centreRowIndex = 1; + TQ_INT32 belowRowIndex = 2; - Q_INT32 aboveRowSrcY = -3; - Q_INT32 centreRowSrcY = -3; - Q_INT32 belowRowSrcY = -3; + TQ_INT32 aboveRowSrcY = -3; + TQ_INT32 centreRowSrcY = -3; + TQ_INT32 belowRowSrcY = -3; - Q_UINT8 *selectionRows = new Q_UINT8[imageRowStride * NUM_SELECTION_ROWS]; - Q_UINT8 *selectionRow[NUM_SELECTION_ROWS]; + TQ_UINT8 *selectionRows = new TQ_UINT8[imageRowStride * NUM_SELECTION_ROWS]; + TQ_UINT8 *selectionRow[NUM_SELECTION_ROWS]; selectionRow[0] = selectionRows + 1; selectionRow[1] = selectionRow[0] + imageRowStride; selectionRow[2] = selectionRow[0] + (2 * imageRowStride); - for (Q_INT32 y = 0; y < scaledImageRectHeight; ++y) { + for (TQ_INT32 y = 0; y < scaledImageRectHeight; ++y) { - Q_INT32 scaledY = scaledImageRectY + y; - Q_INT32 srcY = (scaledY * imageHeight) / scaledImageSize.height(); + TQ_INT32 scaledY = scaledImageRectY + y; + TQ_INT32 srcY = (scaledY * imageHeight) / scaledImageSize.height(); - Q_UINT8 *aboveRow; - Q_UINT8 *centreRow; - Q_UINT8 *belowRow; + TQ_UINT8 *aboveRow; + TQ_UINT8 *centreRow; + TQ_UINT8 *belowRow; if (srcY - 1 == aboveRowSrcY) { aboveRow = selectionRow[aboveRowIndex]; @@ -461,7 +461,7 @@ void KisSelection::paintSelection(QImage img, const QRect& scaledImageRect, cons belowRow = selectionRow[belowRowIndex]; } else if (srcY - 1 == centreRowSrcY) { - Q_INT32 oldAboveRowIndex = aboveRowIndex; + TQ_INT32 oldAboveRowIndex = aboveRowIndex; aboveRowIndex = centreRowIndex; centreRowIndex = belowRowIndex; @@ -475,8 +475,8 @@ void KisSelection::paintSelection(QImage img, const QRect& scaledImageRect, cons } else if (srcY - 1 == belowRowSrcY) { - Q_INT32 oldAboveRowIndex = aboveRowIndex; - Q_INT32 oldCentreRowIndex = centreRowIndex; + TQ_INT32 oldAboveRowIndex = aboveRowIndex; + TQ_INT32 oldCentreRowIndex = centreRowIndex; aboveRowIndex = belowRowIndex; centreRowIndex = oldAboveRowIndex; @@ -510,51 +510,51 @@ void KisSelection::paintSelection(QImage img, const QRect& scaledImageRect, cons centreRowSrcY = aboveRowSrcY + 1; belowRowSrcY = centreRowSrcY + 1; - QRgb *imagePixel = reinterpret_cast(img.scanLine(scaledImageRectYOffset + y)); + TQRgb *imagePixel = reinterpret_cast(img.scanLine(scaledImageRectYOffset + y)); imagePixel += scaledImageRectXOffset; - for (Q_INT32 x = 0; x < scaledImageRectWidth; ++x) { + for (TQ_INT32 x = 0; x < scaledImageRectWidth; ++x) { - Q_INT32 scaledX = scaledImageRectX + x; - Q_INT32 srcX = (scaledX * imageWidth) / scaledImageSize.width(); + TQ_INT32 scaledX = scaledImageRectX + x; + TQ_INT32 srcX = (scaledX * imageWidth) / scaledImageSize.width(); - Q_UINT8 centre = *(centreRow + srcX - imageRowLeft); + TQ_UINT8 centre = *(centreRow + srcX - imageRowLeft); if (centre != MAX_SELECTED) { // this is where we come if the pixels should be blue or bluish - QRgb srcPixel = *imagePixel; - Q_UINT8 srcGrey = (qRed(srcPixel) + qGreen(srcPixel) + qBlue(srcPixel)) / 9; - Q_UINT8 srcAlpha = qAlpha(srcPixel); + TQRgb srcPixel = *imagePixel; + TQ_UINT8 srcGrey = (tqRed(srcPixel) + tqGreen(srcPixel) + tqBlue(srcPixel)) / 9; + TQ_UINT8 srcAlpha = tqAlpha(srcPixel); // Colour influence is proportional to alphaPixel. srcGrey = UINT8_MULT(srcGrey, srcAlpha); - QRgb dstPixel; + TQRgb dstPixel; if (centre == MIN_SELECTED) { //this is where we come if the pixels should be blue (or red outline) - Q_UINT8 left = *(centreRow + (srcX - imageRowLeft) - 1); - Q_UINT8 right = *(centreRow + (srcX - imageRowLeft) + 1); - Q_UINT8 above = *(aboveRow + (srcX - imageRowLeft)); - Q_UINT8 below = *(belowRow + (srcX - imageRowLeft)); + TQ_UINT8 left = *(centreRow + (srcX - imageRowLeft) - 1); + TQ_UINT8 right = *(centreRow + (srcX - imageRowLeft) + 1); + TQ_UINT8 above = *(aboveRow + (srcX - imageRowLeft)); + TQ_UINT8 below = *(belowRow + (srcX - imageRowLeft)); // Stop unselected transparent areas from appearing the same // as selected transparent areas. - Q_UINT8 dstAlpha = QMAX(srcAlpha, 192); + TQ_UINT8 dstAlpha = TQMAX(srcAlpha, 192); // now for a simple outline based on 4-connectivity if (left != MIN_SELECTED || right != MIN_SELECTED || above != MIN_SELECTED || below != MIN_SELECTED) { - dstPixel = qRgba(255, 0, 0, dstAlpha); + dstPixel = tqRgba(255, 0, 0, dstAlpha); } else { - dstPixel = qRgba(128 + srcGrey, 128 + srcGrey, 165 + srcGrey, dstAlpha); + dstPixel = tqRgba(128 + srcGrey, 128 + srcGrey, 165 + srcGrey, dstAlpha); } } else { - dstPixel = qRgba(UINT8_BLEND(qRed(srcPixel), srcGrey + 128, centre), - UINT8_BLEND(qGreen(srcPixel), srcGrey + 128, centre), - UINT8_BLEND(qBlue(srcPixel), srcGrey + 165, centre), + dstPixel = tqRgba(UINT8_BLEND(tqRed(srcPixel), srcGrey + 128, centre), + UINT8_BLEND(tqGreen(srcPixel), srcGrey + 128, centre), + UINT8_BLEND(tqBlue(srcPixel), srcGrey + 165, centre), srcAlpha); } @@ -569,7 +569,7 @@ void KisSelection::paintSelection(QImage img, const QRect& scaledImageRect, cons } } -void KisSelection::setDirty(const QRect& rc) +void KisSelection::setDirty(const TQRect& rc) { if (m_dirty) super::setDirty(rc); diff --git a/krita/core/kis_selection.h b/krita/core/kis_selection.h index 959be492..f41915da 100644 --- a/krita/core/kis_selection.h +++ b/krita/core/kis_selection.h @@ -18,7 +18,7 @@ #ifndef KIS_SELECTION_H_ #define KIS_SELECTION_H_ -#include +#include #include "kis_types.h" #include "kis_paint_device.h" @@ -47,13 +47,13 @@ class KRITACORE_EXPORT KisSelection : public KisPaintDevice { public: /** * Create a new KisSelection - * @param dev the parent paint device. The selection will never be bigger than the parent + * @param dev the tqparent paint device. The selection will never be bigger than the tqparent * paint device. */ KisSelection(KisPaintDeviceSP dev); /** - * Create a new KisSelection. This selection will not have a parent paint device. + * Create a new KisSelection. This selection will not have a tqparent paint device. */ KisSelection(); @@ -65,22 +65,22 @@ public: virtual ~KisSelection(); // Returns selectedness, or 0 if invalid coordinates - Q_UINT8 selected(Q_INT32 x, Q_INT32 y); + TQ_UINT8 selected(TQ_INT32 x, TQ_INT32 y); - void setSelected(Q_INT32 x, Q_INT32 y, Q_UINT8 s); + void setSelected(TQ_INT32 x, TQ_INT32 y, TQ_UINT8 s); - QImage maskImage(); + TQImage tqmaskImage(); - void select(QRect r); + void select(TQRect r); void invert(); - void clear(QRect r); + void clear(TQRect r); void clear(); /// Tests if the the rect is totally outside the selection - bool isTotallyUnselected(QRect r); + bool isTotallyUnselected(TQRect r); /** * Tests if the the rect is totally outside the selection, but uses selectedRect @@ -88,63 +88,63 @@ public: * * XXX: This comment makes no sense anymore! (BSAR) */ - bool isProbablyTotallyUnselected(QRect r); + bool isProbablyTotallyUnselected(TQRect r); /** * Rough, but fastish way of determining the area * of the tiles used by the selection. */ - QRect selectedRect() const; + TQRect selectedRect() const; /** * Slow, but exact way of determining the rectangle * that encloses the selection */ - QRect selectedExactRect() const; + TQRect selectedExactRect() const; - void paintSelection(QImage img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - void paintSelection(QImage img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize); + void paintSelection(TQImage img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + void paintSelection(TQImage img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize); void startCachingExactRect(); void stopCachingExactRect(); - // if the parent layer is interested in keeping up to date with the dirtyness + // if the tqparent layer is interested in keeping up to date with the dirtyness // of this layer, set to true void setInterestedInDirtyness(bool b) { m_dirty = b; } bool interestedInDirtyness() const { return m_dirty; } - virtual void setDirty(const QRect & rc); + virtual void setDirty(const TQRect & rc); virtual void setDirty(); - inline KisPaintDeviceSP parentPaintDevice() { return m_parentPaintDevice; } + inline KisPaintDeviceSP tqparentPaintDevice() { return m_parentPaintDevice; } private: - void paintUniformSelectionRegion(QImage img, const QRect& imageRect, const QRegion& uniformRegion); + void paintUniformSelectionRegion(TQImage img, const TQRect& imageRect, const TQRegion& uniformRegion); private: // We don't want these methods to be used on selections: - void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const + void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const { KisPaintDevice::extent(x,y,w,h); } - QRect extent() const { return KisPaintDevice::extent(); } + TQRect extent() const { return KisPaintDevice::extent(); } - void exactBounds(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const + void exactBounds(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const { return KisPaintDevice::exactBounds(x,y,w,h); } - QRect exactBounds() const + TQRect exactBounds() const { return KisPaintDevice::exactBounds(); } - QRect exactBoundsOldMethod() const + TQRect exactBoundsOldMethod() const { return KisPaintDevice::exactBoundsOldMethod(); } - QRect exactBoundsImprovedOldMethod() const + TQRect exactBoundsImprovedOldMethod() const { return KisPaintDevice::exactBoundsImprovedOldMethod(); } @@ -153,7 +153,7 @@ private: private: KisPaintDeviceSP m_parentPaintDevice; bool m_doCacheExactRect; - QRect m_cachedExactRect; + TQRect m_cachedExactRect; bool m_dirty; }; diff --git a/krita/core/kis_strategy_move.cc b/krita/core/kis_strategy_move.cc index bd99349b..7391777c 100644 --- a/krita/core/kis_strategy_move.cc +++ b/krita/core/kis_strategy_move.cc @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -57,7 +57,7 @@ void KisStrategyMove::reset(KisCanvasSubject *subject) } } -void KisStrategyMove::startDrag(const QPoint& pos) +void KisStrategyMove::startDrag(const TQPoint& pos) { // pos is the user chosen handle point @@ -82,7 +82,7 @@ void KisStrategyMove::startDrag(const QPoint& pos) } } -void KisStrategyMove::drag(const QPoint& original) +void KisStrategyMove::drag(const TQPoint& original) { // original is the position of the user chosen handle point @@ -91,8 +91,8 @@ void KisStrategyMove::drag(const QPoint& original) KisLayerSP dev; if (img && (dev = img->activeLayer())) { - QPoint pos = original; - QRect rc; + TQPoint pos = original; + TQRect rc; pos -= m_dragStart; // convert to delta rc = dev->extent(); @@ -100,7 +100,7 @@ void KisStrategyMove::drag(const QPoint& original) dev->setY(dev->y() + pos.y()); rc = rc.unite(dev->extent()); - m_layerPosition = QPoint(dev->x(), dev->y()); + m_layerPosition = TQPoint(dev->x(), dev->y()); m_dragStart = original; dev->setDirty(rc); @@ -108,7 +108,7 @@ void KisStrategyMove::drag(const QPoint& original) } } -void KisStrategyMove::endDrag(const QPoint& pos, bool undo) +void KisStrategyMove::endDrag(const TQPoint& pos, bool undo) { if (m_subject && m_dragging) { KisImageSP img = m_subject->currentImg(); @@ -134,15 +134,15 @@ void KisStrategyMove::endDrag(const QPoint& pos, bool undo) } } -void KisStrategyMove::simpleMove(const QPoint& pt1, const QPoint& pt2) +void KisStrategyMove::simpleMove(const TQPoint& pt1, const TQPoint& pt2) { startDrag(pt1); endDrag(pt2); } -void KisStrategyMove::simpleMove(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2) +void KisStrategyMove::simpleMove(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2) { - startDrag(QPoint(x1, y1)); - endDrag(QPoint(x2, y2)); + startDrag(TQPoint(x1, y1)); + endDrag(TQPoint(x2, y2)); } diff --git a/krita/core/kis_strategy_move.h b/krita/core/kis_strategy_move.h index e3787866..c3535be9 100644 --- a/krita/core/kis_strategy_move.h +++ b/krita/core/kis_strategy_move.h @@ -19,8 +19,8 @@ #ifndef KIS_STRATEGY_MOVE_H_ #define KIS_STRATEGY_MOVE_H_ -#include -#include +#include +#include #include @@ -35,11 +35,11 @@ public: public: void reset(KisCanvasSubject *subject); - void startDrag(const QPoint& pos); - void drag(const QPoint& pos); - void endDrag(const QPoint& pos, bool undo = true); - void simpleMove(const QPoint& pt1, const QPoint& pt2); - void simpleMove(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2); + void startDrag(const TQPoint& pos); + void drag(const TQPoint& pos); + void endDrag(const TQPoint& pos, bool undo = true); + void simpleMove(const TQPoint& pt1, const TQPoint& pt2); + void simpleMove(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2); private: KisStrategyMove(const KisStrategyMove&); @@ -48,10 +48,10 @@ private: private: KisCanvasController *m_controller; KisCanvasSubject *m_subject; - QRect m_deviceBounds; - QPoint m_dragStart; - QPoint m_layerStart; - QPoint m_layerPosition; + TQRect m_deviceBounds; + TQPoint m_dragStart; + TQPoint m_layerStart; + TQPoint m_layerPosition; bool m_dragging; }; diff --git a/krita/core/kis_substrate.h b/krita/core/kis_substrate.h index 96207747..274f2680 100644 --- a/krita/core/kis_substrate.h +++ b/krita/core/kis_substrate.h @@ -18,7 +18,7 @@ #ifndef KIS_SUBSTRATE_H #define KIS_SUBSTRATE_H -#include +#include #include class KisImage; @@ -30,10 +30,10 @@ struct KisSubstratePixel { float smoothness; // determines how easily the painting tool "slips" over the surface float absorbency; // determines how much wetness the substrate can absorb. XXX: How about speed of absorbing? float density; // XXX? - Q_UINT8 r; //.Red component of reflectivity - Q_UINT8 g; // Green component of reflectivity - Q_UINT8 b; // Blue component of reflectivity - Q_UINT8 alpha; // For composition with the background + TQ_UINT8 r; //.Red component of reflectivity + TQ_UINT8 g; // Green component of reflectivity + TQ_UINT8 b; // Blue component of reflectivity + TQ_UINT8 alpha; // For composition with the background }; /** @@ -56,13 +56,13 @@ public: * Copy the pixel values in the specified rect into an array of Substrate. * Make sure the array is big enough! */ - virtual void getPixels(KisSubstratePixel * substrate, const QRect & rc) const = 0; + virtual void getPixels(KisSubstratePixel * substrate, const TQRect & rc) const = 0; /** * Copy the specified rect of substrate pixels onto the substrate. Make sure * the array is big enough. */ - virtual void writePixels(const KisSubstratePixel * substrate, const QRect & rc) = 0; + virtual void writePixels(const KisSubstratePixel * substrate, const TQRect & rc) = 0; /** * Read the value at the specified position into the given substrate pixel. */ diff --git a/krita/core/kis_thread.h b/krita/core/kis_thread.h index f26ebf8b..61feda24 100644 --- a/krita/core/kis_thread.h +++ b/krita/core/kis_thread.h @@ -19,22 +19,22 @@ #ifndef KIS_THREAD_ #define KIS_THREAD_ -#include +#include #include /** - * A KisThread is a QThread that can be set in the canceled state. + * A KisThread is a TQThread that can be set in the canceled state. * Lengthy operations initiated in run() should regularly read the * canceled state and stop when it's set to true */ -class KisThread : public QThread { +class KisThread : public TQThread { public: /** * Create a new KisThread with the canceled state set to false */ - KisThread() : QThread(), m_canceled(false) {}; + KisThread() : TQThread(), m_canceled(false) {}; /** * Request the thread to cancel at the first opportunity. Note diff --git a/krita/core/kis_thread_pool.cc b/krita/core/kis_thread_pool.cc index 2f80a0ae..e617c8cb 100644 --- a/krita/core/kis_thread_pool.cc +++ b/krita/core/kis_thread_pool.cc @@ -115,18 +115,18 @@ void KisThreadPool::dequeue(KisThread * thread) m_poolMutex.lock(); - int i = m_threads.findRef(thread); + int i = m_threads.tqfindRef(thread); if (i >= 0) { t = m_threads.take(i); m_numberOfQueuedThreads--; } else { - i = m_runningThreads.findRef(thread); + i = m_runningThreads.tqfindRef(thread); if (i >= 0) { t = m_runningThreads.take(i); m_numberOfRunningThreads--; } else { - i = m_oldThreads.findRef(thread); + i = m_oldThreads.tqfindRef(thread); if (i >= 0) { t = m_oldThreads.take(i); } diff --git a/krita/core/kis_thread_pool.h b/krita/core/kis_thread_pool.h index 069cb5a5..904606bf 100644 --- a/krita/core/kis_thread_pool.h +++ b/krita/core/kis_thread_pool.h @@ -19,9 +19,9 @@ #ifndef KIS_THREAD_POOL_ #define KIS_THREAD_POOL_ -#include -#include -#include +#include +#include +#include #include "kis_thread.h" @@ -54,14 +54,14 @@ private: KisThreadPool(const KisThreadPool&); KisThreadPool operator=(const KisThreadPool&); - QMutex m_poolMutex; + TQMutex m_poolMutex; int m_numberOfRunningThreads; int m_numberOfQueuedThreads; int m_maxThreads; int m_wait; - QPtrList m_threads; - QPtrList m_runningThreads; - QPtrList m_oldThreads; + TQPtrList m_threads; + TQPtrList m_runningThreads; + TQPtrList m_oldThreads; static KisThreadPool * m_singleton; }; diff --git a/krita/core/kis_transaction.cc b/krita/core/kis_transaction.cc index 10df1a8e..b755c597 100644 --- a/krita/core/kis_transaction.cc +++ b/krita/core/kis_transaction.cc @@ -27,13 +27,13 @@ class KisTransactionPrivate { public: - QString m_name; + TQString m_name; KisPaintDeviceSP m_device; KisMementoSP m_memento; }; -KisTransaction::KisTransaction(const QString& name, KisPaintDeviceSP device) +KisTransaction::KisTransaction(const TQString& name, KisPaintDeviceSP device) { m_private = new KisTransactionPrivate; @@ -57,12 +57,12 @@ void KisTransaction::execute() m_private->m_device->rollforward(m_private->m_memento); - QRect rc; - Q_INT32 x, y, width, height; + TQRect rc; + TQ_INT32 x, y, width, height; m_private->m_memento->extent(x,y,width,height); rc.setRect(x + m_private->m_device->getX(), y + m_private->m_device->getY(), width, height); - KisLayerSP l = m_private->m_device->parentLayer(); + KisLayerSP l = m_private->m_device->tqparentLayer(); if (l) l->setDirty(rc); } @@ -71,12 +71,12 @@ void KisTransaction::unexecute() Q_ASSERT(m_private->m_memento != 0); m_private->m_device->rollback(m_private->m_memento); - QRect rc; - Q_INT32 x, y, width, height; + TQRect rc; + TQ_INT32 x, y, width, height; m_private->m_memento->extent(x,y,width,height); rc.setRect(x + m_private->m_device->getX(), y + m_private->m_device->getY(), width, height); - KisLayerSP l = m_private->m_device->parentLayer(); + KisLayerSP l = m_private->m_device->tqparentLayer(); if (l) l->setDirty(rc); } @@ -88,7 +88,7 @@ void KisTransaction::unexecuteNoUpdate() m_private->m_device->rollback(m_private->m_memento); } -QString KisTransaction::name() const +TQString KisTransaction::name() const { return m_private->m_name; } diff --git a/krita/core/kis_transaction.h b/krita/core/kis_transaction.h index 0865c59b..521b0204 100644 --- a/krita/core/kis_transaction.h +++ b/krita/core/kis_transaction.h @@ -19,25 +19,25 @@ #ifndef KIS_TILE_COMMAND_H_ #define KIS_TILE_COMMAND_H_ -#include +#include #include #include "kis_types.h" -class QRect; +class TQRect; class KisTransactionPrivate; class KisTransaction : public KCommand { public: - KisTransaction(const QString& name, KisPaintDeviceSP device); + KisTransaction(const TQString& name, KisPaintDeviceSP device); virtual ~KisTransaction(); public: virtual void execute(); virtual void unexecute(); virtual void unexecuteNoUpdate(); - virtual QString name() const; + virtual TQString name() const; private: KisTransactionPrivate * m_private; }; diff --git a/krita/core/kis_transform_visitor.h b/krita/core/kis_transform_visitor.h index 62f6b3e4..9e6f51c0 100644 --- a/krita/core/kis_transform_visitor.h +++ b/krita/core/kis_transform_visitor.h @@ -18,7 +18,7 @@ #ifndef KIS_TRANSFORM_VISITOR_H_ #define KIS_TRANSFORM_VISITOR_H_ -#include "qrect.h" +#include "tqrect.h" #include "klocale.h" @@ -41,7 +41,7 @@ public: KisTransformVisitor(KisImageSP img, double xscale, double yscale, double /*xshear*/, double /*yshear*/, double angle, - Q_INT32 tx, Q_INT32 ty, KisProgressDisplayInterface *progress, KisFilterStrategy *filter) + TQ_INT32 tx, TQ_INT32 ty, KisProgressDisplayInterface *progress, KisFilterStrategy *filter) : KisLayerVisitor() , m_sx(xscale) , m_sy(yscale) @@ -126,7 +126,7 @@ public: private: double m_sx, m_sy; - Q_INT32 m_tx, m_ty; + TQ_INT32 m_tx, m_ty; KisFilterStrategy *m_filter; double m_angle; KisProgressDisplayInterface *m_progress; diff --git a/krita/core/kis_transform_worker.cc b/krita/core/kis_transform_worker.cc index bc4dc609..fbc952ea 100644 --- a/krita/core/kis_transform_worker.cc +++ b/krita/core/kis_transform_worker.cc @@ -32,7 +32,7 @@ KisTransformWorker::KisTransformWorker(KisPaintDeviceSP dev, double xscale, double yscale, double xshear, double yshear, double rotation, - Q_INT32 xtranslate, Q_INT32 ytranslate, + TQ_INT32 xtranslate, TQ_INT32 ytranslate, KisProgressDisplayInterface *progress, KisFilterStrategy *filter, bool fixBorderAlpha) { m_dev= dev; @@ -51,8 +51,8 @@ KisTransformWorker::KisTransformWorker(KisPaintDeviceSP dev, double xscale, doub void KisTransformWorker::rotateNone(KisPaintDeviceSP src, KisPaintDeviceSP dst) { KisSelectionSP dstSelection; - Q_INT32 pixelSize = src->pixelSize(); - QRect r; + TQ_INT32 pixelSize = src->pixelSize(); + TQRect r; KisColorSpace *cs = src->colorSpace(); if(src->hasSelection()) @@ -69,7 +69,7 @@ void KisTransformWorker::rotateNone(KisPaintDeviceSP src, KisPaintDeviceSP dst) KisHLineIteratorPixel hit = src->createHLineIterator(r.x(), r.top(), r.width(), true); KisHLineIterator vit = dst->createHLineIterator(r.x(), r.top(), r.width(), true); KisHLineIterator dstSelIt = dstSelection->createHLineIterator(r.x(), r.top(), r.width(), true); - for (Q_INT32 i = 0; i < r.height(); ++i) { + for (TQ_INT32 i = 0; i < r.height(); ++i) { while (!hit.isDone()) { if (hit.isSelected()) { memcpy(vit.rawData(), hit.rawData(), pixelSize); @@ -102,8 +102,8 @@ void KisTransformWorker::rotateNone(KisPaintDeviceSP src, KisPaintDeviceSP dst) void KisTransformWorker::rotateRight90(KisPaintDeviceSP src, KisPaintDeviceSP dst) { KisSelectionSP dstSelection; - Q_INT32 pixelSize = src->pixelSize(); - QRect r; + TQ_INT32 pixelSize = src->pixelSize(); + TQRect r; KisColorSpace *cs = src->colorSpace(); if(src->hasSelection()) @@ -117,7 +117,7 @@ void KisTransformWorker::rotateRight90(KisPaintDeviceSP src, KisPaintDeviceSP ds dstSelection = new KisSelection(dst); // essentially a dummy to be deleted } - for (Q_INT32 y = r.bottom(); y >= r.top(); --y) { + for (TQ_INT32 y = r.bottom(); y >= r.top(); --y) { KisHLineIteratorPixel hit = src->createHLineIterator(r.x(), y, r.width(), true); KisVLineIterator vit = dst->createVLineIterator(-y, r.x(), r.width(), true); KisVLineIterator dstSelIt = dstSelection->createVLineIterator(-y, r.x(), r.width(), true); @@ -152,8 +152,8 @@ void KisTransformWorker::rotateLeft90(KisPaintDeviceSP src, KisPaintDeviceSP dst { kdDebug() << "rotateLeft90 called\n"; KisSelectionSP dstSelection; - Q_INT32 pixelSize = src->pixelSize(); - QRect r; + TQ_INT32 pixelSize = src->pixelSize(); + TQRect r; KisColorSpace *cs = src->colorSpace(); if(src->hasSelection()) @@ -166,9 +166,9 @@ void KisTransformWorker::rotateLeft90(KisPaintDeviceSP src, KisPaintDeviceSP dst r = src->exactBounds(); dstSelection = new KisSelection(dst); // essentially a dummy to be deleted } - Q_INT32 x = 0; + TQ_INT32 x = 0; - for (Q_INT32 y = r.top(); y <= r.bottom(); ++y) { + for (TQ_INT32 y = r.top(); y <= r.bottom(); ++y) { // Read the horizontal line from back to front, write onto the vertical column KisHLineIteratorPixel hit = src->createHLineIterator(r.x(), y, r.width(), true); KisVLineIterator vit = dst->createVLineIterator(y, -r.x() - r.width(), r.width(), true); @@ -206,8 +206,8 @@ void KisTransformWorker::rotate180(KisPaintDeviceSP src, KisPaintDeviceSP dst) { kdDebug() << "Rotating 180\n"; KisSelectionSP dstSelection; - Q_INT32 pixelSize = src->pixelSize(); - QRect r; + TQ_INT32 pixelSize = src->pixelSize(); + TQRect r; KisColorSpace *cs = src->colorSpace(); if(src->hasSelection()) @@ -221,7 +221,7 @@ void KisTransformWorker::rotate180(KisPaintDeviceSP src, KisPaintDeviceSP dst) dstSelection = new KisSelection(dst); // essentially a dummy to be deleted } - for (Q_INT32 y = r.top(); y <= r.bottom(); ++y) { + for (TQ_INT32 y = r.top(); y <= r.bottom(); ++y) { KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), y, r.width(), true); KisHLineIterator dstIt = dst->createHLineIterator(-r.x() - r.width(), -y, r.width(), true); KisHLineIterator dstSelIt = dstSelection->createHLineIterator(-r.x() - r.width(), -y, r.width(), true); @@ -253,28 +253,28 @@ void KisTransformWorker::rotate180(KisPaintDeviceSP src, KisPaintDeviceSP dst) } } -template iter createIterator(KisPaintDevice *dev, Q_INT32 start, Q_INT32 lineNum, Q_INT32 len); +template iter createIterator(KisPaintDevice *dev, TQ_INT32 start, TQ_INT32 lineNum, TQ_INT32 len); template <> KisHLineIteratorPixel createIterator -(KisPaintDevice *dev, Q_INT32 start, Q_INT32 lineNum, Q_INT32 len) +(KisPaintDevice *dev, TQ_INT32 start, TQ_INT32 lineNum, TQ_INT32 len) { return dev->createHLineIterator(start, lineNum, len, true); } template <> KisVLineIteratorPixel createIterator -(KisPaintDevice *dev, Q_INT32 start, Q_INT32 lineNum, Q_INT32 len) +(KisPaintDevice *dev, TQ_INT32 start, TQ_INT32 lineNum, TQ_INT32 len) { return dev->createVLineIterator(lineNum, start, len, true); } -template void calcDimensions (KisPaintDevice *dev, Q_INT32 &srcStart, Q_INT32 &srcLen, Q_INT32 &firstLine, Q_INT32 &numLines); +template void calcDimensions (KisPaintDevice *dev, TQ_INT32 &srcStart, TQ_INT32 &srcLen, TQ_INT32 &firstLine, TQ_INT32 &numLines); template <> void calcDimensions -(KisPaintDevice *dev, Q_INT32 &srcStart, Q_INT32 &srcLen, Q_INT32 &firstLine, Q_INT32 &numLines) +(KisPaintDevice *dev, TQ_INT32 &srcStart, TQ_INT32 &srcLen, TQ_INT32 &firstLine, TQ_INT32 &numLines) { if(dev->hasSelection()) { - QRect r = dev->selection()->selectedExactRect(); + TQRect r = dev->selection()->selectedExactRect(); r.rect(&srcStart, &firstLine, &srcLen, &numLines); } else @@ -282,11 +282,11 @@ template <> void calcDimensions } template <> void calcDimensions -(KisPaintDevice *dev, Q_INT32 &srcStart, Q_INT32 &srcLen, Q_INT32 &firstLine, Q_INT32 &numLines) +(KisPaintDevice *dev, TQ_INT32 &srcStart, TQ_INT32 &srcLen, TQ_INT32 &firstLine, TQ_INT32 &numLines) { if(dev->hasSelection()) { - QRect r = dev->selection()->selectedExactRect(); + TQRect r = dev->selection()->selectedExactRect(); r.rect(&firstLine, &srcStart, &numLines, &srcLen); } else @@ -295,22 +295,22 @@ template <> void calcDimensions struct FilterValues { - Q_UINT8 numWeights; - Q_UINT8 *weight; + TQ_UINT8 numWeights; + TQ_UINT8 *weight; ~FilterValues() {delete [] weight;} }; -template void KisTransformWorker::transformPass(KisPaintDevice *src, KisPaintDevice *dst, double floatscale, double shear, Q_INT32 dx, KisFilterStrategy *filterStrategy, bool fixBorderAlpha) +template void KisTransformWorker::transformPass(KisPaintDevice *src, KisPaintDevice *dst, double floatscale, double shear, TQ_INT32 dx, KisFilterStrategy *filterStrategy, bool fixBorderAlpha) { - Q_INT32 lineNum,srcStart,firstLine,srcLen,numLines; - Q_INT32 center, begin, end; /* filter calculation variables */ - Q_UINT8 *data; - Q_UINT8 pixelSize = src->pixelSize(); + TQ_INT32 lineNum,srcStart,firstLine,srcLen,numLines; + TQ_INT32 center, begin, end; /* filter calculation variables */ + TQ_UINT8 *data; + TQ_UINT8 pixelSize = src->pixelSize(); KisSelectionSP dstSelection; KisColorSpace * cs = src->colorSpace(); - Q_INT32 scale; - Q_INT32 scaleDenom; - Q_INT32 shearFracOffset; + TQ_INT32 scale; + TQ_INT32 scaleDenom; + TQ_INT32 shearFracOffset; if(src->hasSelection()) dstSelection = dst->selection(); @@ -325,9 +325,9 @@ template void KisTransformWorker::transformPass(KisPaintDevice *src, K if(scaleDenom == 0) return; - Q_INT32 support = filterStrategy->intSupport(); - Q_INT32 dstLen, dstStart; - Q_INT32 invfscale = 256; + TQ_INT32 support = filterStrategy->intSupport(); + TQ_INT32 dstLen, dstStart; + TQ_INT32 invfscale = 256; // handle magnification/minification if(abs(scale) < scaleDenom) @@ -351,32 +351,32 @@ template void KisTransformWorker::transformPass(KisPaintDevice *src, K dstLen = scale; // Calculate extra length (in each side) needed due to shear - Q_INT32 extraLen = (support+256)>>8 + 1; + TQ_INT32 extraLen = (support+256)>>8 + 1; - Q_UINT8 *tmpLine = new Q_UINT8[(srcLen +2*extraLen)* pixelSize]; + TQ_UINT8 *tmpLine = new TQ_UINT8[(srcLen +2*extraLen)* pixelSize]; Q_CHECK_PTR(tmpLine); - Q_UINT8 *tmpSel = new Q_UINT8[srcLen+2*extraLen]; + TQ_UINT8 *tmpSel = new TQ_UINT8[srcLen+2*extraLen]; Q_CHECK_PTR(tmpSel); //allocate space for colors - const Q_UINT8 **colors = new const Q_UINT8 *[2*support+1]; + const TQ_UINT8 **colors = new const TQ_UINT8 *[2*support+1]; // Precalculate weights FilterValues *filterWeights = new FilterValues[256]; for(int center = 0; center<256; ++center) { - Q_INT32 begin = (255 + center - support)>>8; // takes ceiling by adding 255 - Q_INT32 span = ((center + support)>>8) - begin + 1; // takes floor to get end. Subtracts begin to get span - Q_INT32 t = (((begin<<8) - center) * invfscale)>>8; - Q_INT32 dt = invfscale; - filterWeights[center].weight = new Q_UINT8[span]; + TQ_INT32 begin = (255 + center - support)>>8; // takes ceiling by adding 255 + TQ_INT32 span = ((center + support)>>8) - begin + 1; // takes floor to get end. Subtracts begin to get span + TQ_INT32 t = (((begin<<8) - center) * invfscale)>>8; + TQ_INT32 dt = invfscale; + filterWeights[center].weight = new TQ_UINT8[span]; //printf("%d (",center); - Q_UINT32 sum=0; + TQ_UINT32 sum=0; for(int num = 0; numintValueAt(t) * invfscale; + TQ_UINT32 tmpw = filterStrategy->intValueAt(t) * invfscale; tmpw >>=8; filterWeights[center].weight[num] = tmpw; @@ -426,10 +426,10 @@ template void KisTransformWorker::transformPass(KisPaintDevice *src, K // Build a temporary line T srcIt = createIterator (src, srcStart - extraLen, lineNum, srcLen+2*extraLen); - Q_INT32 i = 0; + TQ_INT32 i = 0; while(!srcIt.isDone()) { - Q_UINT8 *data; + TQ_UINT8 *data; data = srcIt.rawData(); memcpy(&tmpLine[i*pixelSize], data, pixelSize); @@ -474,7 +474,7 @@ template void KisTransformWorker::transformPass(KisPaintDevice *src, K end = (center + support)>>8; // takes floor ////printf("sup=%d begin=%d end=%d",support,begin,end); - Q_UINT8 selectedness = tmpSel[center>>8]; + TQ_UINT8 selectedness = tmpSel[center>>8]; if(selectedness) { int num=0; @@ -524,7 +524,7 @@ bool KisTransformWorker::run() m_progress->setSubject(this, true, true); m_progressTotalSteps = 0; m_progressStep = 0; - QRect r; + TQRect r; if(m_dev->hasSelection()) r = m_dev->selection()->selectedExactRect(); else @@ -540,8 +540,8 @@ bool KisTransformWorker::run() double xshear = m_xshear; double yshear = m_yshear; double rotation = m_rotation; - Q_INT32 xtranslate = m_xtranslate; - Q_INT32 ytranslate = m_ytranslate; + TQ_INT32 xtranslate = m_xtranslate; + TQ_INT32 ytranslate = m_ytranslate; if(rotation < 0.0) rotation = -fmod(-rotation, 2*M_PI) + 2*M_PI; @@ -665,8 +665,8 @@ bool KisTransformWorker::run() rotateNone(tmpdev3, m_dev); } - if (m_dev->parentLayer()) { - m_dev->parentLayer()->setDirty(); + if (m_dev->tqparentLayer()) { + m_dev->tqparentLayer()->setDirty(); } //progress info emit notifyProgressDone(); diff --git a/krita/core/kis_transform_worker.h b/krita/core/kis_transform_worker.h index c357390e..a48b8589 100644 --- a/krita/core/kis_transform_worker.h +++ b/krita/core/kis_transform_worker.h @@ -35,7 +35,7 @@ class KisTransformWorker : public KisProgressSubject { public: KisTransformWorker(KisPaintDeviceSP dev, double xscale, double yscale, double xshear, double yshear, double rotation, - Q_INT32 xtranslate, Q_INT32 ytranslate, + TQ_INT32 xtranslate, TQ_INT32 ytranslate, KisProgressDisplayInterface *progress, KisFilterStrategy *filter, bool fixBorderAlpha=false); ~KisTransformWorker(); @@ -46,7 +46,7 @@ public: private: // XXX (BSAR): Why didn't we use the shared-pointer versions of the paint device classes? - template void transformPass(KisPaintDevice *src, KisPaintDevice *dst, double xscale, double shear, Q_INT32 dx, KisFilterStrategy *filterStrategy, bool fixBorderAlpha); + template void transformPass(KisPaintDevice *src, KisPaintDevice *dst, double xscale, double shear, TQ_INT32 dx, KisFilterStrategy *filterStrategy, bool fixBorderAlpha); public: void rotateNone(KisPaintDeviceSP src, KisPaintDeviceSP dst); @@ -58,16 +58,16 @@ private: KisPaintDeviceSP m_dev; double m_xscale, m_yscale; double m_xshear, m_yshear, m_rotation; - Q_INT32 m_xtranslate, m_ytranslate; + TQ_INT32 m_xtranslate, m_ytranslate; KisProgressDisplayInterface *m_progress; KisFilterStrategy *m_filter; // Implement KisProgressSubject bool m_cancelRequested; virtual void cancel() { m_cancelRequested = true; } - Q_INT32 m_progressTotalSteps; - Q_INT32 m_progressStep; - Q_INT32 m_progressScaler; - Q_INT32 m_lastProgressReport; + TQ_INT32 m_progressTotalSteps; + TQ_INT32 m_progressStep; + TQ_INT32 m_progressScaler; + TQ_INT32 m_lastProgressReport; bool m_fixBorderAlpha; }; diff --git a/krita/core/kis_types.h b/krita/core/kis_types.h index 94e066fc..9c668551 100644 --- a/krita/core/kis_types.h +++ b/krita/core/kis_types.h @@ -18,9 +18,9 @@ #ifndef KISTYPES_H_ #define KISTYPES_H_ -#include -#include -#include +#include +#include +#include #include @@ -76,7 +76,7 @@ typedef KSharedPtr KisHistogramSP; class KisPaintOpFactory; typedef KSharedPtr KisPaintOpFactorySP; -typedef QValueVector vKisSegments; +typedef TQValueVector vKisSegments; //class KisGuide; //typedef KSharedPtr KisGuideSP; diff --git a/krita/core/kis_vec.h b/krita/core/kis_vec.h index 1706dd4e..08b9c541 100644 --- a/krita/core/kis_vec.h +++ b/krita/core/kis_vec.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include "kis_point.h" /* @@ -36,7 +36,7 @@ class KisVector2D public: KisVector2D(); KisVector2D(double x, double y); - KisVector2D(const QPoint& p); + KisVector2D(const TQPoint& p); KisVector2D(const KisPoint& p); bool isNull() const; @@ -88,7 +88,7 @@ inline KisVector2D::KisVector2D() inline KisVector2D::KisVector2D(double x, double y) { m_x=x; m_y=y; } -inline KisVector2D::KisVector2D(const QPoint& p) +inline KisVector2D::KisVector2D(const TQPoint& p) { m_x=p.x(); m_y=p.y(); } diff --git a/krita/core/tests/kis_filter_configuration_tester.cc b/krita/core/tests/kis_filter_configuration_tester.cc index 10497692..6a4a2631 100644 --- a/krita/core/tests/kis_filter_configuration_tester.cc +++ b/krita/core/tests/kis_filter_configuration_tester.cc @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -42,7 +42,7 @@ void KisFilterConfigurationTester::testCreation() KisFilterConfiguration * kfc = new KisFilterConfiguration("test", 1); if ( kfc == 0 ) failure("Could not create test filter configuration"); CHECK(kfc->version(), 1); - CHECK(kfc->name(), QString("test")); + CHECK(kfc->name(), TQString("test")); delete kfc; success("testCreation success"); @@ -52,12 +52,12 @@ void KisFilterConfigurationTester::testRoundTrip() { KisFilterConfiguration * kfc = new KisFilterConfiguration("test", 1); CHECK(kfc->version(), 1); - CHECK(kfc->name(), QString("test")); - QString s = kfc->toString(); + CHECK(kfc->name(), TQString("test")); + TQString s = kfc->toString(); delete kfc; kfc = new KisFilterConfiguration(s); CHECK(kfc->version(), 1); - CHECK(kfc->name(), QString("test")); + CHECK(kfc->name(), TQString("test")); delete kfc; success("testDeserializaton success"); } diff --git a/krita/core/tests/kis_image_tester.cpp b/krita/core/tests/kis_image_tester.cpp index ee180787..f660f394 100644 --- a/krita/core/tests/kis_image_tester.cpp +++ b/krita/core/tests/kis_image_tester.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -51,20 +51,20 @@ void KisImageTester::mergeTests() KisColor mergedPixel = image->mergedPixel(0, 0); - QColor colour; - Q_UINT8 opacity; + TQColor colour; + TQ_UINT8 opacity; - mergedPixel.toQColor(&colour, &opacity); + mergedPixel.toTQColor(&colour, &opacity); CHECK(opacity, OPACITY_TRANSPARENT); KisPaintLayer * layer = new KisPaintLayer(image, "layer 1", OPACITY_OPAQUE); image->addLayer(layer, image->rootLayer(), 0); - layer->paintDevice()->setPixel(0, 0, QColor(255, 128, 64), OPACITY_OPAQUE); + layer->paintDevice()->setPixel(0, 0, TQColor(255, 128, 64), OPACITY_OPAQUE); mergedPixel = image->mergedPixel(0, 0); - mergedPixel.toQColor(&colour, &opacity); + mergedPixel.toTQColor(&colour, &opacity); CHECK(opacity, OPACITY_OPAQUE); CHECK(colour.red(), 255); @@ -74,10 +74,10 @@ void KisImageTester::mergeTests() KisPaintLayer * layer2 = new KisPaintLayer(image, "layer 2", OPACITY_OPAQUE / 2); image->addLayer(layer2, image->rootLayer(), layer); - layer2->paintDevice()->setPixel(0, 0, QColor(255, 255, 255), OPACITY_OPAQUE); + layer2->paintDevice()->setPixel(0, 0, TQColor(255, 255, 255), OPACITY_OPAQUE); mergedPixel = image->mergedPixel(0, 0); - mergedPixel.toQColor(&colour, &opacity); + mergedPixel.toTQColor(&colour, &opacity); CHECK(opacity, OPACITY_OPAQUE); CHECK(colour.red(), 255); diff --git a/krita/core/tiles/kis_memento.cc b/krita/core/tiles/kis_memento.cc index ea6ed722..aaec3724 100644 --- a/krita/core/tiles/kis_memento.cc +++ b/krita/core/tiles/kis_memento.cc @@ -20,7 +20,7 @@ #include "kis_tile.h" #include "kis_tile_global.h" -KisMemento::KisMemento(Q_UINT32 pixelSize) : KShared() +KisMemento::KisMemento(TQ_UINT32 pixelSize) : KShared() { m_hashTable = new KisTile * [1024]; Q_CHECK_PTR(m_hashTable); @@ -34,8 +34,8 @@ KisMemento::KisMemento(Q_UINT32 pixelSize) : KShared() m_redoHashTable [i] = 0; } m_numTiles = 0; - m_defPixel = new Q_UINT8[pixelSize]; - m_redoDefPixel = new Q_UINT8[pixelSize]; + m_defPixel = new TQ_UINT8[pixelSize]; + m_redoDefPixel = new TQ_UINT8[pixelSize]; m_valid = true; } @@ -87,12 +87,12 @@ void KisMemento::deleteAll(KisTile *tile) } } -void KisMemento::extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const +void KisMemento::extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const { - Q_INT32 maxX = Q_INT32_MIN; - Q_INT32 maxY = Q_INT32_MIN; - x = Q_INT32_MAX; - y = Q_INT32_MAX; + TQ_INT32 maxX = TQ_INT32_MIN; + TQ_INT32 maxY = TQ_INT32_MIN; + x = TQ_INT32_MAX; + y = TQ_INT32_MAX; for(int i = 0; i < 1024; i++) { @@ -124,19 +124,19 @@ void KisMemento::extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const h = maxY - y +1; } -QRect KisMemento::extent() const +TQRect KisMemento::extent() const { - Q_INT32 x; - Q_INT32 y; - Q_INT32 w; - Q_INT32 h; + TQ_INT32 x; + TQ_INT32 y; + TQ_INT32 w; + TQ_INT32 h; extent(x, y, w, h); - return QRect(x, y, w, h); + return TQRect(x, y, w, h); } -bool KisMemento::containsTile(Q_INT32 col, Q_INT32 row, Q_UINT32 tileHash) const +bool KisMemento::containsTile(TQ_INT32 col, TQ_INT32 row, TQ_UINT32 tileHash) const { const KisTile *tile = m_hashTable[tileHash]; diff --git a/krita/core/tiles/kis_memento.h b/krita/core/tiles/kis_memento.h index 696f8129..5942dc44 100644 --- a/krita/core/tiles/kis_memento.h +++ b/krita/core/tiles/kis_memento.h @@ -19,8 +19,8 @@ #ifndef KIS_MEMENTO_H_ #define KIS_MEMENTO_H_ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KSharedPtr KisMementoSP; class KisMemento : public KShared { public: - KisMemento(Q_UINT32 pixelSize); + KisMemento(TQ_UINT32 pixelSize); ~KisMemento(); /* // For consolidating transactions @@ -42,10 +42,10 @@ public: virtual KisTransaction &operator+(const KisTransaction &, const KisTransaction &) = 0; */ - void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const; - QRect extent() const; + void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const; + TQRect extent() const; - bool containsTile(Q_INT32 col, Q_INT32 row, Q_UINT32 tileHash) const; + bool containsTile(TQ_INT32 col, TQ_INT32 row, TQ_UINT32 tileHash) const; // For debugging use bool valid() const { return m_valid; } @@ -55,20 +55,20 @@ private: class DeletedTile { public: - DeletedTile(Q_INT32 col, Q_INT32 row, const DeletedTile *next) + DeletedTile(TQ_INT32 col, TQ_INT32 row, const DeletedTile *next) : m_col(col), m_row(row), m_next(next) { } - Q_INT32 col() const { return m_col; } - Q_INT32 row() const { return m_row; } + TQ_INT32 col() const { return m_col; } + TQ_INT32 row() const { return m_row; } const DeletedTile *next() const { return m_next; } private: - Q_INT32 m_col; - Q_INT32 m_row; + TQ_INT32 m_col; + TQ_INT32 m_row; const DeletedTile *m_next; }; @@ -81,7 +81,7 @@ private: ~DeletedTileList(); - void addTile(Q_INT32 col, Q_INT32 row) + void addTile(TQ_INT32 col, TQ_INT32 row) { DeletedTile *d = new DeletedTile(col, row, m_firstDeletedTile); Q_CHECK_PTR(d); @@ -100,7 +100,7 @@ private: DeletedTile *m_firstDeletedTile; }; - void addTileToDeleteOnRedo(Q_INT32 col, Q_INT32 row) + void addTileToDeleteOnRedo(TQ_INT32 col, TQ_INT32 row) { m_redoDelTilesList.addTile(col, row); } @@ -115,7 +115,7 @@ private: m_redoDelTilesList.clear(); } - void addTileToDeleteOnUndo(Q_INT32 col, Q_INT32 row) + void addTileToDeleteOnUndo(TQ_INT32 col, TQ_INT32 row) { m_undoDelTilesList.addTile(col, row); } @@ -133,12 +133,12 @@ private: friend class KisTiledDataManager; KisTiledDataManager *originator; KisTile **m_hashTable; - Q_UINT32 m_numTiles; + TQ_UINT32 m_numTiles; KisTile **m_redoHashTable; DeletedTileList m_redoDelTilesList; DeletedTileList m_undoDelTilesList; - Q_UINT8 *m_defPixel; - Q_UINT8 *m_redoDefPixel; + TQ_UINT8 *m_defPixel; + TQ_UINT8 *m_redoDefPixel; void deleteAll(KisTile *tile); bool m_valid; diff --git a/krita/core/tiles/kis_tile.cc b/krita/core/tiles/kis_tile.cc index 49d20cf6..86d55128 100644 --- a/krita/core/tiles/kis_tile.cc +++ b/krita/core/tiles/kis_tile.cc @@ -23,11 +23,11 @@ #include "kis_tileddatamanager.h" #include "kis_tilemanager.h" -const Q_INT32 KisTile::WIDTH = 64; -const Q_INT32 KisTile::HEIGHT = 64; +const TQ_INT32 KisTile::WIDTH = 64; +const TQ_INT32 KisTile::HEIGHT = 64; -KisTile::KisTile(Q_INT32 pixelSize, Q_INT32 col, Q_INT32 row, const Q_UINT8 *defPixel) +KisTile::KisTile(TQ_INT32 pixelSize, TQ_INT32 col, TQ_INT32 row, const TQ_UINT8 *defPixel) { m_pixelSize = pixelSize; m_data = 0; @@ -43,7 +43,7 @@ KisTile::KisTile(Q_INT32 pixelSize, Q_INT32 col, Q_INT32 row, const Q_UINT8 *def setData(defPixel); } -KisTile::KisTile(const KisTile& rhs, Q_INT32 col, Q_INT32 row) +KisTile::KisTile(const KisTile& rhs, TQ_INT32 col, TQ_INT32 row) { if (this != &rhs) { m_pixelSize = rhs.m_pixelSize; @@ -55,7 +55,7 @@ KisTile::KisTile(const KisTile& rhs, Q_INT32 col, Q_INT32 row) // Assure we have data to copy rhs.addReader(); - memcpy(m_data, rhs.m_data, WIDTH * HEIGHT * m_pixelSize * sizeof(Q_UINT8)); + memcpy(m_data, rhs.m_data, WIDTH * HEIGHT * m_pixelSize * sizeof(TQ_UINT8)); rhs.removeReader(); m_col = col; @@ -78,7 +78,7 @@ KisTile::KisTile(const KisTile& rhs) allocate(); rhs.addReader(); - memcpy(m_data, rhs.m_data, WIDTH * HEIGHT * m_pixelSize * sizeof(Q_UINT8)); + memcpy(m_data, rhs.m_data, WIDTH * HEIGHT * m_pixelSize * sizeof(TQ_UINT8)); rhs.removeReader(); KisTileManager::instance()->registerTile(this); @@ -111,7 +111,7 @@ void KisTile::setNext(KisTile *n) m_nextTile = n; } -Q_UINT8 *KisTile::data(Q_INT32 x, Q_INT32 y ) const +TQ_UINT8 *KisTile::data(TQ_INT32 x, TQ_INT32 y ) const { addReader(); removeReader(); @@ -122,10 +122,10 @@ Q_UINT8 *KisTile::data(Q_INT32 x, Q_INT32 y ) const return m_data + m_pixelSize * ( y * WIDTH + x ); } -void KisTile::setData(const Q_UINT8 *pixel) +void KisTile::setData(const TQ_UINT8 *pixel) { addReader(); - Q_UINT8 *dst = m_data; + TQ_UINT8 *dst = m_data; for(int i=0; i -#include +#include +#include class KisTiledDataManager; class KisTiledIterator; /** - * Provides abstraction to a tile. A tile contains + * Provides abstraction to a tile. A tile tqcontains * a part of a PaintDevice, but only the individual pixels * are accesable and that only via iterators. */ class KisTile { public: - KisTile(Q_INT32 pixelSize, Q_INT32 col, Q_INT32 row, const Q_UINT8 *defPixel); - KisTile(const KisTile& rhs, Q_INT32 col, Q_INT32 row); + KisTile(TQ_INT32 pixelSize, TQ_INT32 col, TQ_INT32 row, const TQ_UINT8 *defPixel); + KisTile(const KisTile& rhs, TQ_INT32 col, TQ_INT32 row); KisTile(const KisTile& rhs); ~KisTile(); @@ -40,18 +40,18 @@ public: void release(); void allocate(); - Q_UINT8 *data(Q_INT32 xoff, Q_INT32 yoff) const; - Q_UINT8 *data() const { return m_data; } + TQ_UINT8 *data(TQ_INT32 xoff, TQ_INT32 yoff) const; + TQ_UINT8 *data() const { return m_data; } - void setData(const Q_UINT8 *pixel); + void setData(const TQ_UINT8 *pixel); - Q_INT32 refCount() const; + TQ_INT32 refCount() const; void ref(); - Q_INT32 getRow() const { return m_row; } - Q_INT32 getCol() const { return m_col; } + TQ_INT32 getRow() const { return m_row; } + TQ_INT32 getCol() const { return m_col; } - QRect extent() const { return QRect(m_col * WIDTH, m_row * HEIGHT, WIDTH, HEIGHT); } + TQRect extent() const { return TQRect(m_col * WIDTH, m_row * HEIGHT, WIDTH, HEIGHT); } void setNext(KisTile *); KisTile *getNext() const { return m_nextTile; } @@ -61,7 +61,7 @@ public: // access to a tile in a const enviroment (like copyconstructor and so)! void addReader() const; void removeReader() const; - Q_INT32 readers() { return m_nReadlock; } + TQ_INT32 readers() { return m_nReadlock; } friend class KisTiledIterator; friend class KisTiledDataManager; @@ -71,16 +71,16 @@ private: KisTile& operator=(const KisTile&); private: - Q_UINT8 *m_data; - mutable Q_INT32 m_nReadlock; - Q_INT32 m_row; - Q_INT32 m_col; - Q_INT32 m_pixelSize; + TQ_UINT8 *m_data; + mutable TQ_INT32 m_nReadlock; + TQ_INT32 m_row; + TQ_INT32 m_col; + TQ_INT32 m_pixelSize; KisTile *m_nextTile; public: - static const Q_INT32 WIDTH; - static const Q_INT32 HEIGHT; + static const TQ_INT32 WIDTH; + static const TQ_INT32 HEIGHT; }; #endif // KIS_TILE_H_ diff --git a/krita/core/tiles/kis_tiled_random_accessor.cc b/krita/core/tiles/kis_tiled_random_accessor.cc index 52ec8634..159faf18 100644 --- a/krita/core/tiles/kis_tiled_random_accessor.cc +++ b/krita/core/tiles/kis_tiled_random_accessor.cc @@ -18,9 +18,9 @@ #include "kis_tiled_random_accessor.h" -const Q_UINT32 KisTiledRandomAccessor::CACHESIZE = 4; // Define the number of tiles we keep in cache +const TQ_UINT32 KisTiledRandomAccessor::CACHESIZE = 4; // Define the number of tiles we keep in cache -KisTiledRandomAccessor::KisTiledRandomAccessor(KisTiledDataManager *ktm, Q_INT32 x, Q_INT32 y, bool writable) : m_ktm(ktm), m_tilesCache(new KisTileInfo*[4]), m_tilesCacheSize(0), m_pixelSize (m_ktm->pixelSize()), m_writable(writable) +KisTiledRandomAccessor::KisTiledRandomAccessor(KisTiledDataManager *ktm, TQ_INT32 x, TQ_INT32 y, bool writable) : m_ktm(ktm), m_tilesCache(new KisTileInfo*[4]), m_tilesCacheSize(0), m_pixelSize (m_ktm->pixelSize()), m_writable(writable) { Q_ASSERT(ktm != 0); moveTo(x, y); @@ -37,7 +37,7 @@ KisTiledRandomAccessor::~KisTiledRandomAccessor() delete m_tilesCache; } -void KisTiledRandomAccessor::moveTo(Q_INT32 x, Q_INT32 y) +void KisTiledRandomAccessor::moveTo(TQ_INT32 x, TQ_INT32 y) { // Look in the cache if the tile if the data is available for( uint i = 0; i < m_tilesCacheSize; i++) @@ -46,7 +46,7 @@ void KisTiledRandomAccessor::moveTo(Q_INT32 x, Q_INT32 y) y >= m_tilesCache[i]->area_y1 && y <= m_tilesCache[i]->area_y2 ) { KisTileInfo* kti = m_tilesCache[i]; - Q_UINT32 offset = x - kti->area_x1 + (y -kti->area_y1) * KisTile::WIDTH; + TQ_UINT32 offset = x - kti->area_x1 + (y -kti->area_y1) * KisTile::WIDTH; offset *= m_pixelSize; m_data = kti->data + offset; m_oldData = kti->oldData + offset; @@ -67,10 +67,10 @@ void KisTiledRandomAccessor::moveTo(Q_INT32 x, Q_INT32 y) } else { m_tilesCacheSize++; } - Q_UINT32 col = xToCol( x ); - Q_UINT32 row = yToRow( y ); + TQ_UINT32 col = xToCol( x ); + TQ_UINT32 row = yToRow( y ); KisTileInfo* kti = fetchTileData(col, row); - Q_UINT32 offset = x - kti->area_x1 + (y - kti->area_y1) * KisTile::WIDTH; + TQ_UINT32 offset = x - kti->area_x1 + (y - kti->area_y1) * KisTile::WIDTH; offset *= m_pixelSize; m_data = kti->data + offset; m_oldData = kti->oldData + offset; @@ -79,13 +79,13 @@ void KisTiledRandomAccessor::moveTo(Q_INT32 x, Q_INT32 y) } -Q_UINT8 * KisTiledRandomAccessor::rawData() const +TQ_UINT8 * KisTiledRandomAccessor::rawData() const { return m_data; } -const Q_UINT8 * KisTiledRandomAccessor::oldRawData() const +const TQ_UINT8 * KisTiledRandomAccessor::oldRawData() const { #ifdef DEBUG kdWarning(!m_ktm->hasCurrentMemento(), DBG_AREA_TILES) << "Accessing oldRawData() when no transaction is in progress.\n"; @@ -93,7 +93,7 @@ const Q_UINT8 * KisTiledRandomAccessor::oldRawData() const return m_oldData; } -KisTiledRandomAccessor::KisTileInfo* KisTiledRandomAccessor::fetchTileData(Q_INT32 col, Q_INT32 row) +KisTiledRandomAccessor::KisTileInfo* KisTiledRandomAccessor::fetchTileData(TQ_INT32 col, TQ_INT32 row) { KisTileInfo* kti = new KisTileInfo; kti->tile = m_ktm->getTile(col, row, m_writable); diff --git a/krita/core/tiles/kis_tiled_random_accessor.h b/krita/core/tiles/kis_tiled_random_accessor.h index 7766f75c..23768ee6 100644 --- a/krita/core/tiles/kis_tiled_random_accessor.h +++ b/krita/core/tiles/kis_tiled_random_accessor.h @@ -18,8 +18,8 @@ #ifndef KIS_TILED_RANDOM_ACCESSOR_H #define KIS_TILED_RANDOM_ACCESSOR_H -#include -#include +#include +#include #include @@ -31,35 +31,35 @@ class KisTiledRandomAccessor : public KShared { struct KisTileInfo { KisTile* tile; KisTile* oldtile; - Q_UINT8* data; - const Q_UINT8* oldData; - Q_INT32 area_x1, area_y1, area_x2, area_y2; + TQ_UINT8* data; + const TQ_UINT8* oldData; + TQ_INT32 area_x1, area_y1, area_x2, area_y2; }; public: - KisTiledRandomAccessor(KisTiledDataManager *ktm, Q_INT32 x, Q_INT32 y, bool writable); + KisTiledRandomAccessor(KisTiledDataManager *ktm, TQ_INT32 x, TQ_INT32 y, bool writable); ~KisTiledRandomAccessor(); private: - inline Q_UINT32 xToCol(Q_UINT32 x) const { if (m_ktm) return m_ktm->xToCol(x); else return 0; }; - inline Q_UINT32 yToRow(Q_UINT32 y) const { if (m_ktm) return m_ktm->yToRow(y); else return 0; }; - KisTileInfo* fetchTileData(Q_INT32 col, Q_INT32 row); + inline TQ_UINT32 xToCol(TQ_UINT32 x) const { if (m_ktm) return m_ktm->xToCol(x); else return 0; }; + inline TQ_UINT32 yToRow(TQ_UINT32 y) const { if (m_ktm) return m_ktm->yToRow(y); else return 0; }; + KisTileInfo* fetchTileData(TQ_INT32 col, TQ_INT32 row); public: /// Move to a given x,y position, fetch tiles and data - void moveTo(Q_INT32 x, Q_INT32 y); - Q_UINT8* rawData() const; - const Q_UINT8* oldRawData() const; + void moveTo(TQ_INT32 x, TQ_INT32 y); + TQ_UINT8* rawData() const; + const TQ_UINT8* oldRawData() const; private: KisTiledDataManager *m_ktm; KisTileInfo** m_tilesCache; - Q_UINT32 m_tilesCacheSize; - Q_INT32 m_pixelSize; - Q_UINT8* m_data; - const Q_UINT8* m_oldData; + TQ_UINT32 m_tilesCacheSize; + TQ_INT32 m_pixelSize; + TQ_UINT8* m_data; + const TQ_UINT8* m_oldData; bool m_writable; - static const Q_UINT32 CACHESIZE; // Define the number of tiles we keep in cache + static const TQ_UINT32 CACHESIZE; // Define the number of tiles we keep in cache }; diff --git a/krita/core/tiles/kis_tileddatamanager.cc b/krita/core/tiles/kis_tileddatamanager.cc index 4372e487..629b1b38 100644 --- a/krita/core/tiles/kis_tileddatamanager.cc +++ b/krita/core/tiles/kis_tileddatamanager.cc @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include @@ -36,11 +36,11 @@ * Even though the matrix has grown it may still not contain tiles at specific positions. They are created on demand */ -KisTiledDataManager::KisTiledDataManager(Q_UINT32 pixelSize, const Q_UINT8 *defPixel) +KisTiledDataManager::KisTiledDataManager(TQ_UINT32 pixelSize, const TQ_UINT8 *defPixel) { m_pixelSize = pixelSize; - m_defPixel = new Q_UINT8[m_pixelSize]; + m_defPixel = new TQ_UINT8[m_pixelSize]; Q_CHECK_PTR(m_defPixel); memcpy(m_defPixel, defPixel, m_pixelSize); @@ -54,10 +54,10 @@ KisTiledDataManager::KisTiledDataManager(Q_UINT32 pixelSize, const Q_UINT8 *defP m_hashTable [i] = 0; m_numTiles = 0; m_currentMemento = 0; - m_extentMinX = Q_INT32_MAX; - m_extentMinY = Q_INT32_MAX; - m_extentMaxX = Q_INT32_MIN; - m_extentMaxY = Q_INT32_MIN; + m_extentMinX = TQ_INT32_MAX; + m_extentMinY = TQ_INT32_MAX; + m_extentMaxX = TQ_INT32_MIN; + m_extentMaxY = TQ_INT32_MIN; } KisTiledDataManager::KisTiledDataManager(const KisTiledDataManager & dm) @@ -65,7 +65,7 @@ KisTiledDataManager::KisTiledDataManager(const KisTiledDataManager & dm) { m_pixelSize = dm.m_pixelSize; - m_defPixel = new Q_UINT8[m_pixelSize]; + m_defPixel = new TQ_UINT8[m_pixelSize]; Q_CHECK_PTR(m_defPixel); memcpy(m_defPixel, dm.m_defPixel, m_pixelSize); @@ -123,7 +123,7 @@ KisTiledDataManager::~KisTiledDataManager() delete [] m_defPixel; } -void KisTiledDataManager::setDefaultPixel(const Q_UINT8 *defPixel) +void KisTiledDataManager::setDefaultPixel(const TQ_UINT8 *defPixel) { if (defPixel == 0) return; @@ -170,9 +170,9 @@ bool KisTiledDataManager::read(KoStore *store) //Q_ASSERT(store != 0); char str[80]; - Q_INT32 x,y,w,h; + TQ_INT32 x,y,w,h; - QIODevice *stream = store->device(); + TQIODevice *stream = store->device(); if (stream == 0) return false; //Q_ASSERT(stream != 0); @@ -180,7 +180,7 @@ bool KisTiledDataManager::read(KoStore *store) sscanf(str,"%u",&m_numTiles); - for(Q_UINT32 i = 0; i < m_numTiles; i++) + for(TQ_UINT32 i = 0; i < m_numTiles; i++) { stream->readLine(str, 79); sscanf(str,"%d,%d,%d,%d",&x,&y,&w,&h); @@ -188,9 +188,9 @@ bool KisTiledDataManager::read(KoStore *store) // the following is only correct as long as tile size is not changed // The first time we change tilesize the dimensions just read needs to be respected // but for now we just assume that tiles are the same size as ever. - Q_INT32 row = yToRow(y); - Q_INT32 col = xToCol(x); - Q_UINT32 tileHash = calcTileHash(col, row); + TQ_INT32 row = yToRow(y); + TQ_INT32 col = xToCol(x); + TQ_UINT32 tileHash = calcTileHash(col, row); KisTile *tile = new KisTile(m_pixelSize, col, row, m_defPixel); Q_CHECK_PTR(tile); @@ -207,7 +207,7 @@ bool KisTiledDataManager::read(KoStore *store) return true; } -void KisTiledDataManager::extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const +void KisTiledDataManager::extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const { x = m_extentMinX; y = m_extentMinY; @@ -225,27 +225,27 @@ void KisTiledDataManager::extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) } } -QRect KisTiledDataManager::extent() const +TQRect KisTiledDataManager::extent() const { - Q_INT32 x; - Q_INT32 y; - Q_INT32 w; - Q_INT32 h; + TQ_INT32 x; + TQ_INT32 y; + TQ_INT32 w; + TQ_INT32 h; extent(x, y, w, h); - return QRect(x, y, w, h); + return TQRect(x, y, w, h); } -void KisTiledDataManager::setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisTiledDataManager::setExtent(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { - QRect newRect = QRect(x, y, w, h).normalize(); + TQRect newRect = TQRect(x, y, w, h).normalize(); //printRect("newRect", newRect); - QRect oldRect = QRect(m_extentMinX, m_extentMinY, m_extentMaxX - m_extentMinX + 1, m_extentMaxY - m_extentMinY + 1).normalize(); + TQRect oldRect = TQRect(m_extentMinX, m_extentMinY, m_extentMaxX - m_extentMinX + 1, m_extentMaxY - m_extentMinY + 1).normalize(); //printRect("oldRect", oldRect); // Do nothing if the desired size is bigger than we currently are: that is handled by the autoextending automatically - if (newRect.contains(oldRect)) return; + if (newRect.tqcontains(oldRect)) return; // Loop through all tiles, if a tile is wholly outside the extent, add to the memento, then delete it, // if the tile is partially outside the extent, clear the outside pixels to the default pixel. @@ -256,10 +256,10 @@ void KisTiledDataManager::setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) while(tile) { - QRect tileRect = QRect(tile->getCol() * KisTile::WIDTH, tile->getRow() * KisTile::HEIGHT, KisTile::WIDTH, KisTile::HEIGHT); + TQRect tileRect = TQRect(tile->getCol() * KisTile::WIDTH, tile->getRow() * KisTile::HEIGHT, KisTile::WIDTH, KisTile::HEIGHT); //printRect("tileRect", tileRect); - if (newRect.contains(tileRect)) { + if (newRect.tqcontains(tileRect)) { // Completely inside, do nothing previousTile = tile; tile = tile->getNext(); @@ -270,7 +270,7 @@ void KisTiledDataManager::setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) if (newRect.intersects(tileRect)) { // Create the intersection of the tile and new rect - QRect intersection = newRect.intersect(tileRect); + TQRect intersection = newRect.intersect(tileRect); //printRect("intersection", intersection); intersection.setRect(intersection.x() - tileRect.x(), intersection.y() - tileRect.y(), intersection.width(), intersection.height()); @@ -279,8 +279,8 @@ void KisTiledDataManager::setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) tile->addReader(); for (int y = 0; y < KisTile::HEIGHT; ++y) { for (int x = 0; x < KisTile::WIDTH; ++x) { - if (!intersection.contains(x,y)) { - Q_UINT8 * ptr = tile->data(x, y); + if (!intersection.tqcontains(x,y)) { + TQ_UINT8 * ptr = tile->data(x, y); memcpy(ptr, m_defPixel, m_pixelSize); } } @@ -314,10 +314,10 @@ void KisTiledDataManager::setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) void KisTiledDataManager::recalculateExtent() { - m_extentMinX = Q_INT32_MAX; - m_extentMinY = Q_INT32_MAX; - m_extentMaxX = Q_INT32_MIN; - m_extentMaxY = Q_INT32_MIN; + m_extentMinX = TQ_INT32_MAX; + m_extentMinY = TQ_INT32_MAX; + m_extentMaxX = TQ_INT32_MIN; + m_extentMaxY = TQ_INT32_MIN; // Loop through all tiles. for (int tileHash = 0; tileHash < 1024; tileHash++) @@ -332,29 +332,29 @@ void KisTiledDataManager::recalculateExtent() } } -void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, Q_UINT8 clearValue) +void KisTiledDataManager::clear(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, TQ_UINT8 clearValue) { if (w < 1 || h < 1) { return; } - Q_INT32 firstColumn = xToCol(x); - Q_INT32 lastColumn = xToCol(x + w - 1); + TQ_INT32 firstColumn = xToCol(x); + TQ_INT32 lastColumn = xToCol(x + w - 1); - Q_INT32 firstRow = yToRow(y); - Q_INT32 lastRow = yToRow(y + h - 1); + TQ_INT32 firstRow = yToRow(y); + TQ_INT32 lastRow = yToRow(y + h - 1); - QRect clearRect(x, y, w, h); + TQRect clearRect(x, y, w, h); - const Q_UINT32 rowStride = KisTile::WIDTH * m_pixelSize; + const TQ_UINT32 rowStride = KisTile::WIDTH * m_pixelSize; - for (Q_INT32 row = firstRow; row <= lastRow; ++row) { - for (Q_INT32 column = firstColumn; column <= lastColumn; ++column) { + for (TQ_INT32 row = firstRow; row <= lastRow; ++row) { + for (TQ_INT32 column = firstColumn; column <= lastColumn; ++column) { KisTile *tile = getTile(column, row, true); - QRect tileRect = tile->extent(); + TQRect tileRect = tile->extent(); - QRect clearTileRect = clearRect & tileRect; + TQRect clearTileRect = clearRect & tileRect; tile->addReader(); if (clearTileRect == tileRect) { @@ -362,8 +362,8 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, Q_UI memset(tile->data(), clearValue, KisTile::WIDTH * KisTile::HEIGHT * m_pixelSize); } else { - Q_UINT32 rowsRemaining = clearTileRect.height(); - Q_UINT8 *dst = tile->data(clearTileRect.x() - tileRect.x(), clearTileRect.y() - tileRect.y()); + TQ_UINT32 rowsRemaining = clearTileRect.height(); + TQ_UINT8 *dst = tile->data(clearTileRect.x() - tileRect.x(), clearTileRect.y() - tileRect.y()); while (rowsRemaining > 0) { memset(dst, clearValue, clearTileRect.width() * m_pixelSize); @@ -376,7 +376,7 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, Q_UI } } -void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const Q_UINT8 *clearPixel) +void KisTiledDataManager::clear(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const TQ_UINT8 *clearPixel) { Q_ASSERT(clearPixel != 0); @@ -386,7 +386,7 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, cons bool pixelBytesAreTheSame = true; - for (Q_UINT32 i = 0; i < m_pixelSize; ++i) { + for (TQ_UINT32 i = 0; i < m_pixelSize; ++i) { if (clearPixel[i] != clearPixel[0]) { pixelBytesAreTheSame = false; break; @@ -397,25 +397,25 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, cons clear(x, y, w, h, clearPixel[0]); } else { - Q_INT32 firstColumn = xToCol(x); - Q_INT32 lastColumn = xToCol(x + w - 1); + TQ_INT32 firstColumn = xToCol(x); + TQ_INT32 lastColumn = xToCol(x + w - 1); - Q_INT32 firstRow = yToRow(y); - Q_INT32 lastRow = yToRow(y + h - 1); + TQ_INT32 firstRow = yToRow(y); + TQ_INT32 lastRow = yToRow(y + h - 1); - QRect clearRect(x, y, w, h); + TQRect clearRect(x, y, w, h); - const Q_UINT32 rowStride = KisTile::WIDTH * m_pixelSize; + const TQ_UINT32 rowStride = KisTile::WIDTH * m_pixelSize; - Q_UINT8 *clearPixelData = 0; + TQ_UINT8 *clearPixelData = 0; if (w >= KisTile::WIDTH && h >= KisTile::HEIGHT) { // There might be a whole tile to be cleared so generate a cleared tile. - clearPixelData = new Q_UINT8[KisTile::WIDTH * KisTile::HEIGHT * m_pixelSize]; + clearPixelData = new TQ_UINT8[KisTile::WIDTH * KisTile::HEIGHT * m_pixelSize]; - Q_UINT8 *dst = clearPixelData; - Q_UINT32 pixelsRemaining = KisTile::WIDTH; + TQ_UINT8 *dst = clearPixelData; + TQ_UINT32 pixelsRemaining = KisTile::WIDTH; // Generate one row while (pixelsRemaining > 0) { @@ -424,7 +424,7 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, cons --pixelsRemaining; } - Q_UINT32 rowsRemaining = KisTile::HEIGHT - 1; + TQ_UINT32 rowsRemaining = KisTile::HEIGHT - 1; // Copy to the rest of the rows. while (rowsRemaining > 0) { @@ -436,12 +436,12 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, cons } else { // Generate one row - Q_UINT32 maxRunLength = QMIN(w, KisTile::WIDTH); + TQ_UINT32 maxRunLength = TQMIN(w, KisTile::WIDTH); - clearPixelData = new Q_UINT8[maxRunLength * m_pixelSize]; + clearPixelData = new TQ_UINT8[maxRunLength * m_pixelSize]; - Q_UINT8 *dst = clearPixelData; - Q_UINT32 pixelsRemaining = maxRunLength; + TQ_UINT8 *dst = clearPixelData; + TQ_UINT32 pixelsRemaining = maxRunLength; while (pixelsRemaining > 0) { memcpy(dst, clearPixel, m_pixelSize); @@ -450,13 +450,13 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, cons } } - for (Q_INT32 row = firstRow; row <= lastRow; ++row) { - for (Q_INT32 column = firstColumn; column <= lastColumn; ++column) { + for (TQ_INT32 row = firstRow; row <= lastRow; ++row) { + for (TQ_INT32 column = firstColumn; column <= lastColumn; ++column) { KisTile *tile = getTile(column, row, true); - QRect tileRect = tile->extent(); + TQRect tileRect = tile->extent(); - QRect clearTileRect = clearRect & tileRect; + TQRect clearTileRect = clearRect & tileRect; if (clearTileRect == tileRect) { @@ -466,9 +466,9 @@ void KisTiledDataManager::clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, cons tile->removeReader(); } else { - Q_UINT32 rowsRemaining = clearTileRect.height(); + TQ_UINT32 rowsRemaining = clearTileRect.height(); tile->addReader(); - Q_UINT8 *dst = tile->data(clearTileRect.x() - tileRect.x(), clearTileRect.y() - tileRect.y()); + TQ_UINT8 *dst = tile->data(clearTileRect.x() - tileRect.x(), clearTileRect.y() - tileRect.y()); while (rowsRemaining > 0) { memcpy(dst, clearPixelData, clearTileRect.width() * m_pixelSize); @@ -506,21 +506,21 @@ void KisTiledDataManager::clear() m_numTiles = 0; // Set the extent correctly - m_extentMinX = Q_INT32_MAX; - m_extentMinY = Q_INT32_MAX; - m_extentMaxX = Q_INT32_MIN; - m_extentMaxY = Q_INT32_MIN; + m_extentMinX = TQ_INT32_MAX; + m_extentMinY = TQ_INT32_MAX; + m_extentMaxX = TQ_INT32_MIN; + m_extentMaxY = TQ_INT32_MIN; } -void KisTiledDataManager::paste(KisDataManagerSP data, Q_INT32 sx, Q_INT32 sy, Q_INT32 dx, Q_INT32 dy, - Q_INT32 w, Q_INT32 h) +void KisTiledDataManager::paste(KisDataManagerSP data, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 dx, TQ_INT32 dy, + TQ_INT32 w, TQ_INT32 h) { //CBR_MISSING sx=sy=dx=dy=w=h;data=0; } -Q_UINT32 KisTiledDataManager::calcTileHash(Q_INT32 col, Q_INT32 row) +TQ_UINT32 KisTiledDataManager::calcTileHash(TQ_INT32 col, TQ_INT32 row) { return ((row << 5) + (col & 0x1F)) & 0x3FF; } @@ -692,7 +692,7 @@ void KisTiledDataManager::deleteTiles(const KisMemento::DeletedTile *d) { while (d) { - Q_UINT32 tileHash = calcTileHash(d->col(), d->row()); + TQ_UINT32 tileHash = calcTileHash(d->col(), d->row()); KisTile *curTile = m_hashTable[tileHash]; KisTile *preTile = 0; while(curTile) @@ -721,7 +721,7 @@ void KisTiledDataManager::deleteTiles(const KisMemento::DeletedTile *d) recalculateExtent(); } -void KisTiledDataManager::ensureTileMementoed(Q_INT32 col, Q_INT32 row, Q_UINT32 tileHash, const KisTile *refTile) +void KisTiledDataManager::ensureTileMementoed(TQ_INT32 col, TQ_INT32 row, TQ_UINT32 tileHash, const KisTile *refTile) { if (refTile == 0) return; //Q_ASSERT(refTile != 0); @@ -751,7 +751,7 @@ void KisTiledDataManager::ensureTileMementoed(Q_INT32 col, Q_INT32 row, Q_UINT32 m_currentMemento->m_numTiles++; } -void KisTiledDataManager::updateExtent(Q_INT32 col, Q_INT32 row) +void KisTiledDataManager::updateExtent(TQ_INT32 col, TQ_INT32 row) { if(m_extentMinX > col * KisTile::WIDTH) m_extentMinX = col * KisTile::WIDTH; @@ -763,9 +763,9 @@ void KisTiledDataManager::updateExtent(Q_INT32 col, Q_INT32 row) m_extentMaxY = (row+1) * KisTile::HEIGHT - 1; } -KisTile *KisTiledDataManager::getTile(Q_INT32 col, Q_INT32 row, bool writeAccess) +KisTile *KisTiledDataManager::getTile(TQ_INT32 col, TQ_INT32 row, bool writeAccess) { - Q_UINT32 tileHash = calcTileHash(col, row); + TQ_UINT32 tileHash = calcTileHash(col, row); // Lookup tile in hash table KisTile *tile = m_hashTable[tileHash]; @@ -806,7 +806,7 @@ KisTile *KisTiledDataManager::getTile(Q_INT32 col, Q_INT32 row, bool writeAccess return tile; } -KisTile *KisTiledDataManager::getOldTile(Q_INT32 col, Q_INT32 row, KisTile *def) +KisTile *KisTiledDataManager::getOldTile(TQ_INT32 col, TQ_INT32 row, KisTile *def) { KisTile *tile = 0; @@ -816,7 +816,7 @@ KisTile *KisTiledDataManager::getOldTile(Q_INT32 col, Q_INT32 row, KisTile *def) if (!m_currentMemento->valid()) return def; //Q_ASSERT(m_currentMemento->valid()); - Q_UINT32 tileHash = calcTileHash(col, row); + TQ_UINT32 tileHash = calcTileHash(col, row); tile = m_currentMemento->m_hashTable[tileHash]; while (tile != 0) { @@ -833,48 +833,48 @@ KisTile *KisTiledDataManager::getOldTile(Q_INT32 col, Q_INT32 row, KisTile *def) return tile; } -Q_UINT8* KisTiledDataManager::pixelPtr(Q_INT32 x, Q_INT32 y, bool writable) +TQ_UINT8* KisTiledDataManager::pixelPtr(TQ_INT32 x, TQ_INT32 y, bool writable) { // Ahem, this is a bit not as good. The point is, this function needs the tile data, // but it might be swapped out. This code swaps it in, but at function exit it might - // be swapped out again! THIS MAKES THE RETURNED POINTER QUITE VOLATILE + // be swapped out again! THIS MAKES THE RETURNED POINTER TQUITE VOLATILE return pixelPtrSafe(x, y, writable) -> data(); } -KisTileDataWrapperSP KisTiledDataManager::pixelPtrSafe(Q_INT32 x, Q_INT32 y, bool writable) { - Q_INT32 row = yToRow(y); - Q_INT32 col = xToCol(x); +KisTileDataWrapperSP KisTiledDataManager::pixelPtrSafe(TQ_INT32 x, TQ_INT32 y, bool writable) { + TQ_INT32 row = yToRow(y); + TQ_INT32 col = xToCol(x); // calc limits within the tile - Q_INT32 yInTile = y - row * KisTile::HEIGHT; - Q_INT32 xInTile = x - col * KisTile::WIDTH; - Q_INT32 offset = m_pixelSize * (yInTile * KisTile::WIDTH + xInTile); + TQ_INT32 yInTile = y - row * KisTile::HEIGHT; + TQ_INT32 xInTile = x - col * KisTile::WIDTH; + TQ_INT32 offset = m_pixelSize * (yInTile * KisTile::WIDTH + xInTile); KisTile *tile = getTile(col, row, writable); return new KisTileDataWrapper(tile, offset); } -const Q_UINT8* KisTiledDataManager::pixel(Q_INT32 x, Q_INT32 y) +const TQ_UINT8* KisTiledDataManager::pixel(TQ_INT32 x, TQ_INT32 y) { return pixelPtr(x, y, false); } -Q_UINT8* KisTiledDataManager::writablePixel(Q_INT32 x, Q_INT32 y) +TQ_UINT8* KisTiledDataManager::writablePixel(TQ_INT32 x, TQ_INT32 y) { return pixelPtr(x, y, true); } -void KisTiledDataManager::setPixel(Q_INT32 x, Q_INT32 y, const Q_UINT8 * data) +void KisTiledDataManager::setPixel(TQ_INT32 x, TQ_INT32 y, const TQ_UINT8 * data) { - Q_UINT8 *pixel = pixelPtr(x, y, true); + TQ_UINT8 *pixel = pixelPtr(x, y, true); memcpy(pixel, data, m_pixelSize); } -void KisTiledDataManager::readBytes(Q_UINT8 * data, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h) +void KisTiledDataManager::readBytes(TQ_UINT8 * data, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h) { if (data == 0) return; //Q_ASSERT(data != 0); @@ -884,33 +884,33 @@ void KisTiledDataManager::readBytes(Q_UINT8 * data, if (h < 0) h = 0; - Q_INT32 dstY = 0; - Q_INT32 srcY = y; - Q_INT32 rowsRemaining = h; + TQ_INT32 dstY = 0; + TQ_INT32 srcY = y; + TQ_INT32 rowsRemaining = h; while (rowsRemaining > 0) { - Q_INT32 dstX = 0; - Q_INT32 srcX = x; - Q_INT32 columnsRemaining = w; - Q_INT32 numContiguousSrcRows = numContiguousRows(srcY, srcX, srcX + w - 1); + TQ_INT32 dstX = 0; + TQ_INT32 srcX = x; + TQ_INT32 columnsRemaining = w; + TQ_INT32 numContiguousSrcRows = numContiguousRows(srcY, srcX, srcX + w - 1); - Q_INT32 rows = QMIN(numContiguousSrcRows, rowsRemaining); + TQ_INT32 rows = TQMIN(numContiguousSrcRows, rowsRemaining); while (columnsRemaining > 0) { - Q_INT32 numContiguousSrcColumns = numContiguousColumns(srcX, srcY, srcY + rows - 1); + TQ_INT32 numContiguousSrcColumns = numContiguousColumns(srcX, srcY, srcY + rows - 1); - Q_INT32 columns = QMIN(numContiguousSrcColumns, columnsRemaining); + TQ_INT32 columns = TQMIN(numContiguousSrcColumns, columnsRemaining); KisTileDataWrapperSP tileData = pixelPtrSafe(srcX, srcY, false); - const Q_UINT8 *srcData = tileData -> data(); - Q_INT32 srcRowStride = rowStride(srcX, srcY); + const TQ_UINT8 *srcData = tileData -> data(); + TQ_INT32 srcRowStride = rowStride(srcX, srcY); - Q_UINT8 *dstData = data + ((dstX + (dstY * w)) * m_pixelSize); - Q_INT32 dstRowStride = w * m_pixelSize; + TQ_UINT8 *dstData = data + ((dstX + (dstY * w)) * m_pixelSize); + TQ_INT32 dstRowStride = w * m_pixelSize; - for (Q_INT32 row = 0; row < rows; row++) { + for (TQ_INT32 row = 0; row < rows; row++) { memcpy(dstData, srcData, columns * m_pixelSize); dstData += dstRowStride; srcData += srcRowStride; @@ -929,9 +929,9 @@ void KisTiledDataManager::readBytes(Q_UINT8 * data, } -void KisTiledDataManager::writeBytes(const Q_UINT8 * bytes, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h) +void KisTiledDataManager::writeBytes(const TQ_UINT8 * bytes, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h) { if (bytes == 0) return; //Q_ASSERT(bytes != 0); @@ -943,34 +943,34 @@ void KisTiledDataManager::writeBytes(const Q_UINT8 * bytes, if (h < 0) h = 0; - Q_INT32 srcY = 0; - Q_INT32 dstY = y; - Q_INT32 rowsRemaining = h; + TQ_INT32 srcY = 0; + TQ_INT32 dstY = y; + TQ_INT32 rowsRemaining = h; while (rowsRemaining > 0) { - Q_INT32 srcX = 0; - Q_INT32 dstX = x; - Q_INT32 columnsRemaining = w; - Q_INT32 numContiguousdstRows = numContiguousRows(dstY, dstX, dstX + w - 1); + TQ_INT32 srcX = 0; + TQ_INT32 dstX = x; + TQ_INT32 columnsRemaining = w; + TQ_INT32 numContiguousdstRows = numContiguousRows(dstY, dstX, dstX + w - 1); - Q_INT32 rows = QMIN(numContiguousdstRows, rowsRemaining); + TQ_INT32 rows = TQMIN(numContiguousdstRows, rowsRemaining); while (columnsRemaining > 0) { - Q_INT32 numContiguousdstColumns = numContiguousColumns(dstX, dstY, dstY + rows - 1); + TQ_INT32 numContiguousdstColumns = numContiguousColumns(dstX, dstY, dstY + rows - 1); - Q_INT32 columns = QMIN(numContiguousdstColumns, columnsRemaining); + TQ_INT32 columns = TQMIN(numContiguousdstColumns, columnsRemaining); - //Q_UINT8 *dstData = writablePixel(dstX, dstY); + //TQ_UINT8 *dstData = writablePixel(dstX, dstY); KisTileDataWrapperSP tileData = pixelPtrSafe(dstX, dstY, true); - Q_UINT8 *dstData = tileData->data(); - Q_INT32 dstRowStride = rowStride(dstX, dstY); + TQ_UINT8 *dstData = tileData->data(); + TQ_INT32 dstRowStride = rowStride(dstX, dstY); - const Q_UINT8 *srcData = bytes + ((srcX + (srcY * w)) * m_pixelSize); - Q_INT32 srcRowStride = w * m_pixelSize; + const TQ_UINT8 *srcData = bytes + ((srcX + (srcY * w)) * m_pixelSize); + TQ_INT32 srcRowStride = w * m_pixelSize; - for (Q_INT32 row = 0; row < rows; row++) { + for (TQ_INT32 row = 0; row < rows; row++) { memcpy(dstData, srcData, columns * m_pixelSize); srcData += srcRowStride; dstData += dstRowStride; @@ -987,9 +987,9 @@ void KisTiledDataManager::writeBytes(const Q_UINT8 * bytes, } } -Q_INT32 KisTiledDataManager::numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT32 maxY) +TQ_INT32 KisTiledDataManager::numContiguousColumns(TQ_INT32 x, TQ_INT32 minY, TQ_INT32 maxY) { - Q_INT32 numColumns; + TQ_INT32 numColumns; Q_UNUSED(minY); Q_UNUSED(maxY); @@ -1003,9 +1003,9 @@ Q_INT32 KisTiledDataManager::numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT return numColumns; } -Q_INT32 KisTiledDataManager::numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 maxX) +TQ_INT32 KisTiledDataManager::numContiguousRows(TQ_INT32 y, TQ_INT32 minX, TQ_INT32 maxX) { - Q_INT32 numRows; + TQ_INT32 numRows; Q_UNUSED(minX); Q_UNUSED(maxX); @@ -1019,7 +1019,7 @@ Q_INT32 KisTiledDataManager::numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 return numRows; } -Q_INT32 KisTiledDataManager::rowStride(Q_INT32 x, Q_INT32 y) +TQ_INT32 KisTiledDataManager::rowStride(TQ_INT32 x, TQ_INT32 y) { Q_UNUSED(x); Q_UNUSED(y); @@ -1027,12 +1027,12 @@ Q_INT32 KisTiledDataManager::rowStride(Q_INT32 x, Q_INT32 y) return KisTile::WIDTH * m_pixelSize; } -Q_INT32 KisTiledDataManager::numTiles(void) const +TQ_INT32 KisTiledDataManager::numTiles(void) const { return m_numTiles; } -KisTileDataWrapper::KisTileDataWrapper(KisTile* tile, Q_INT32 offset) +KisTileDataWrapper::KisTileDataWrapper(KisTile* tile, TQ_INT32 offset) : m_tile(tile), m_offset(offset) { m_tile->addReader(); diff --git a/krita/core/tiles/kis_tileddatamanager.h b/krita/core/tiles/kis_tileddatamanager.h index d4976080..20d78085 100644 --- a/krita/core/tiles/kis_tileddatamanager.h +++ b/krita/core/tiles/kis_tileddatamanager.h @@ -18,8 +18,8 @@ #ifndef KIS_TILEDDATAMANAGER_H_ #define KIS_TILEDDATAMANAGER_H_ -#include -#include +#include +#include #include @@ -39,11 +39,11 @@ class KoStore; class KisTileDataWrapper : public KShared { KisTile* m_tile; - Q_INT32 m_offset; + TQ_INT32 m_offset; public: - KisTileDataWrapper(KisTile* tile, Q_INT32 offset); + KisTileDataWrapper(KisTile* tile, TQ_INT32 offset); virtual ~KisTileDataWrapper(); - Q_UINT8* data() const { return m_tile->data() + m_offset; } + TQ_UINT8* data() const { return m_tile->data() + m_offset; } }; typedef KSharedPtr KisTileDataWrapperSP; @@ -61,13 +61,13 @@ typedef KSharedPtr KisTileDataWrapperSP; * that may allow deferred loading. * * A datamanager knows nothing about the type of pixel data except - * how many Q_UINT8's a single pixel takes. + * how many TQ_UINT8's a single pixel takes. */ class KisTiledDataManager : public KShared { protected: - KisTiledDataManager(Q_UINT32 pixelSize, const Q_UINT8 *defPixel); + KisTiledDataManager(TQ_UINT32 pixelSize, const TQ_UINT8 *defPixel); ~KisTiledDataManager(); KisTiledDataManager(const KisTiledDataManager &dm); KisTiledDataManager & operator=(const KisTiledDataManager &dm); @@ -81,8 +81,8 @@ protected: protected: - void setDefaultPixel(const Q_UINT8 *defPixel); - const Q_UINT8 * defaultPixel() const { return m_defPixel;}; + void setDefaultPixel(const TQ_UINT8 *defPixel); + const TQ_UINT8 * defaultPixel() const { return m_defPixel;}; KisMementoSP getMemento(); void rollback(KisMementoSP memento); @@ -101,24 +101,24 @@ protected: protected: - Q_UINT32 pixelSize(); + TQ_UINT32 pixelSize(); - void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const; - QRect extent() const; + void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const; + TQRect extent() const; - void setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + void setExtent(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); protected: - void clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, Q_UINT8 clearValue); - void clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const Q_UINT8 *clearPixel); + void clear(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, TQ_UINT8 clearValue); + void clear(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const TQ_UINT8 *clearPixel); void clear(); protected: - void paste(KisDataManagerSP data, Q_INT32 sx, Q_INT32 sy, Q_INT32 dx, Q_INT32 dy, - Q_INT32 w, Q_INT32 h); + void paste(KisDataManagerSP data, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 dx, TQ_INT32 dy, + TQ_INT32 w, TQ_INT32 h); protected: @@ -127,87 +127,87 @@ protected: /** * Get a read-only pointer to pixel (x, y). */ - const Q_UINT8* pixel(Q_INT32 x, Q_INT32 y); + const TQ_UINT8* pixel(TQ_INT32 x, TQ_INT32 y); /** * Get a read-write pointer to pixel (x, y). */ - Q_UINT8* writablePixel(Q_INT32 x, Q_INT32 y); + TQ_UINT8* writablePixel(TQ_INT32 x, TQ_INT32 y); /** * write the specified data to x, y. There is no checking on pixelSize! */ - void setPixel(Q_INT32 x, Q_INT32 y, const Q_UINT8 * data); + void setPixel(TQ_INT32 x, TQ_INT32 y, const TQ_UINT8 * data); /** * Copy the bytes in the specified rect to a vector. The caller is responsible * for managing the vector. */ - void readBytes(Q_UINT8 * bytes, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h); + void readBytes(TQ_UINT8 * bytes, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h); /** * Copy the bytes in the vector to the specified rect. If there are bytes left * in the vector after filling the rect, they will be ignored. If there are * not enough bytes, the rest of the rect will be filled with the default value * given (by default, 0); */ - void writeBytes(const Q_UINT8 * bytes, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h); + void writeBytes(const TQ_UINT8 * bytes, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h); /// Get the number of contiguous columns starting at x, valid for all values /// of y between minY and maxY. - Q_INT32 numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT32 maxY); + TQ_INT32 numContiguousColumns(TQ_INT32 x, TQ_INT32 minY, TQ_INT32 maxY); /// Get the number of contiguous rows starting at y, valid for all values /// of x between minX and maxX. - Q_INT32 numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 maxX); + TQ_INT32 numContiguousRows(TQ_INT32 y, TQ_INT32 minX, TQ_INT32 maxX); /// Get the row stride at pixel (x, y). This is the number of bytes to add to a /// pointer to pixel (x, y) to access (x, y + 1). - Q_INT32 rowStride(Q_INT32 x, Q_INT32 y); + TQ_INT32 rowStride(TQ_INT32 x, TQ_INT32 y); // For debugging use - Q_INT32 numTiles() const; + TQ_INT32 numTiles() const; private: - Q_UINT32 m_pixelSize; - Q_UINT32 m_numTiles; + TQ_UINT32 m_pixelSize; + TQ_UINT32 m_numTiles; KisTile *m_defaultTile; KisTile **m_hashTable; KisMementoSP m_currentMemento; - Q_INT32 m_extentMinX; - Q_INT32 m_extentMinY; - Q_INT32 m_extentMaxX; - Q_INT32 m_extentMaxY; - Q_UINT8 *m_defPixel; + TQ_INT32 m_extentMinX; + TQ_INT32 m_extentMinY; + TQ_INT32 m_extentMaxX; + TQ_INT32 m_extentMaxY; + TQ_UINT8 *m_defPixel; private: - void ensureTileMementoed(Q_INT32 col, Q_INT32 row, Q_UINT32 tileHash, const KisTile *refTile); - KisTile *getOldTile(Q_INT32 col, Q_INT32 row, KisTile *def); - KisTile *getTile(Q_INT32 col, Q_INT32 row, bool writeAccess); - Q_UINT32 calcTileHash(Q_INT32 col, Q_INT32 row); - void updateExtent(Q_INT32 col, Q_INT32 row); + void ensureTileMementoed(TQ_INT32 col, TQ_INT32 row, TQ_UINT32 tileHash, const KisTile *refTile); + KisTile *getOldTile(TQ_INT32 col, TQ_INT32 row, KisTile *def); + KisTile *getTile(TQ_INT32 col, TQ_INT32 row, bool writeAccess); + TQ_UINT32 calcTileHash(TQ_INT32 col, TQ_INT32 row); + void updateExtent(TQ_INT32 col, TQ_INT32 row); void recalculateExtent(); void deleteTiles(const KisMemento::DeletedTile *deletedTileList); - Q_INT32 xToCol(Q_INT32 x) const; - Q_INT32 yToRow(Q_INT32 y) const; - void getContiguousColumnsAndRows(Q_INT32 x, Q_INT32 y, Q_INT32 *columns, Q_INT32 *rows); - Q_UINT8* pixelPtr(Q_INT32 x, Q_INT32 y, bool writable); - KisTileDataWrapperSP pixelPtrSafe(Q_INT32 x, Q_INT32 y, bool writable); + TQ_INT32 xToCol(TQ_INT32 x) const; + TQ_INT32 yToRow(TQ_INT32 y) const; + void getContiguousColumnsAndRows(TQ_INT32 x, TQ_INT32 y, TQ_INT32 *columns, TQ_INT32 *rows); + TQ_UINT8* pixelPtr(TQ_INT32 x, TQ_INT32 y, bool writable); + KisTileDataWrapperSP pixelPtrSafe(TQ_INT32 x, TQ_INT32 y, bool writable); }; -inline Q_UINT32 KisTiledDataManager::pixelSize() +inline TQ_UINT32 KisTiledDataManager::pixelSize() { return m_pixelSize; } -inline Q_INT32 KisTiledDataManager::xToCol(Q_INT32 x) const +inline TQ_INT32 KisTiledDataManager::xToCol(TQ_INT32 x) const { if (x >= 0) { return x / KisTile::WIDTH; @@ -216,7 +216,7 @@ inline Q_INT32 KisTiledDataManager::xToCol(Q_INT32 x) const } } -inline Q_INT32 KisTiledDataManager::yToRow(Q_INT32 y) const +inline TQ_INT32 KisTiledDataManager::yToRow(TQ_INT32 y) const { if (y >= 0) { return y / KisTile::HEIGHT; diff --git a/krita/core/tiles/kis_tiledhlineiterator.cc b/krita/core/tiles/kis_tiledhlineiterator.cc index 37a1195e..cf023c1e 100644 --- a/krita/core/tiles/kis_tiledhlineiterator.cc +++ b/krita/core/tiles/kis_tiledhlineiterator.cc @@ -22,7 +22,7 @@ #include "kis_tile_global.h" #include "kis_tilediterator.h" -KisTiledHLineIterator::KisTiledHLineIterator( KisTiledDataManager *ndevice, Q_INT32 x, Q_INT32 y, Q_INT32 w, bool writable) : +KisTiledHLineIterator::KisTiledHLineIterator( KisTiledDataManager *ndevice, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, bool writable) : KisTiledIterator(ndevice), m_right(x+w-1), m_left(x) { @@ -137,7 +137,7 @@ void KisTiledHLineIterator::prevTile() } } -Q_INT32 KisTiledHLineIterator::nConseqHPixels() const +TQ_INT32 KisTiledHLineIterator::nConseqHPixels() const { return m_rightInTile - m_xInTile + 1; } diff --git a/krita/core/tiles/kis_tilediterator.cc b/krita/core/tiles/kis_tilediterator.cc index 5806a82a..b60e9a50 100644 --- a/krita/core/tiles/kis_tilediterator.cc +++ b/krita/core/tiles/kis_tilediterator.cc @@ -89,13 +89,13 @@ KisTiledIterator& KisTiledIterator::operator=(const KisTiledIterator& rhs) return *this; } -Q_UINT8 * KisTiledIterator::rawData() const +TQ_UINT8 * KisTiledIterator::rawData() const { return m_data + m_offset; } -const Q_UINT8 * KisTiledIterator::oldRawData() const +const TQ_UINT8 * KisTiledIterator::oldRawData() const { #ifdef DEBUG // Warn if we're misusing oldRawData(). If there's no memento, oldRawData is the same @@ -105,7 +105,7 @@ const Q_UINT8 * KisTiledIterator::oldRawData() const return m_oldData + m_offset; } -void KisTiledIterator::fetchTileData(Q_INT32 col, Q_INT32 row) +void KisTiledIterator::fetchTileData(TQ_INT32 col, TQ_INT32 row) { if (m_tile) m_tile->removeReader(); diff --git a/krita/core/tiles/kis_tilediterator.h b/krita/core/tiles/kis_tilediterator.h index 02431f4b..958876cd 100644 --- a/krita/core/tiles/kis_tilediterator.h +++ b/krita/core/tiles/kis_tilediterator.h @@ -18,7 +18,7 @@ #ifndef KIS_TILED_ITERATOR_H_ #define KIS_TILED_ITERATOR_H_ -#include +#include #include @@ -32,22 +32,22 @@ class KRITACORE_EXPORT KisTiledIterator : public KShared { protected: KisTiledDataManager *m_ktm; - Q_INT32 m_pixelSize; // bytes per pixel - Q_INT32 m_x; // current x position - Q_INT32 m_y; // cirrent y position - Q_INT32 m_row; // row in tilemgr - Q_INT32 m_col; // col in tilemgr - Q_UINT8 *m_data; - Q_UINT8 *m_oldData; - Q_INT32 m_offset; + TQ_INT32 m_pixelSize; // bytes per pixel + TQ_INT32 m_x; // current x position + TQ_INT32 m_y; // cirrent y position + TQ_INT32 m_row; // row in tilemgr + TQ_INT32 m_col; // col in tilemgr + TQ_UINT8 *m_data; + TQ_UINT8 *m_oldData; + TQ_INT32 m_offset; KisTile *m_tile; KisTile* m_oldTile; bool m_writable; protected: - inline Q_UINT32 xToCol(Q_UINT32 x) const { if (m_ktm) return m_ktm->xToCol(x); else return 0; }; - inline Q_UINT32 yToRow(Q_UINT32 y) const { if (m_ktm) return m_ktm->yToRow(y); else return 0; }; - void fetchTileData(Q_INT32 col, Q_INT32 row); + inline TQ_UINT32 xToCol(TQ_UINT32 x) const { if (m_ktm) return m_ktm->xToCol(x); else return 0; }; + inline TQ_UINT32 yToRow(TQ_UINT32 y) const { if (m_ktm) return m_ktm->yToRow(y); else return 0; }; + void fetchTileData(TQ_INT32 col, TQ_INT32 row); public: KisTiledIterator( KisTiledDataManager *ktm); @@ -57,16 +57,16 @@ public: public: // current x position - Q_INT32 x() const { return m_x; }; + TQ_INT32 x() const { return m_x; }; // cirrent y position - Q_INT32 y() const { return m_y; }; + TQ_INT32 y() const { return m_y; }; /// Returns a pointer to the pixel data. Do NOT interpret the data - leave that to a colorstrategy - Q_UINT8 *rawData() const; + TQ_UINT8 *rawData() const; /// Returns a pointer to the pixel data as it was at the moment tof he last memento creation. - const Q_UINT8 * oldRawData() const; + const TQ_UINT8 * oldRawData() const; }; /** @@ -78,13 +78,13 @@ class KRITACORE_EXPORT KisTiledRectIterator : public KisTiledIterator public: /// do not call constructor directly use factory method in KisDataManager instead. - KisTiledRectIterator( KisTiledDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, bool writable); + KisTiledRectIterator( KisTiledDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, bool writable); KisTiledRectIterator(const KisTiledRectIterator&); KisTiledRectIterator& operator=(const KisTiledRectIterator&); ~KisTiledRectIterator(); public: - Q_INT32 nConseqPixels() const; + TQ_INT32 nConseqPixels() const; /// Advances a number of pixels until it reaches the end of the rect KisTiledRectIterator & operator+=(int n); @@ -100,20 +100,20 @@ public: protected: - Q_INT32 m_left; - Q_INT32 m_top; - Q_INT32 m_w; - Q_INT32 m_h; - Q_INT32 m_topRow; - Q_INT32 m_bottomRow; - Q_INT32 m_leftCol; - Q_INT32 m_rightCol; - Q_INT32 m_xInTile; - Q_INT32 m_yInTile; - Q_INT32 m_leftInTile; - Q_INT32 m_rightInTile; - Q_INT32 m_topInTile; - Q_INT32 m_bottomInTile; + TQ_INT32 m_left; + TQ_INT32 m_top; + TQ_INT32 m_w; + TQ_INT32 m_h; + TQ_INT32 m_topRow; + TQ_INT32 m_bottomRow; + TQ_INT32 m_leftCol; + TQ_INT32 m_rightCol; + TQ_INT32 m_xInTile; + TQ_INT32 m_yInTile; + TQ_INT32 m_leftInTile; + TQ_INT32 m_rightInTile; + TQ_INT32 m_topInTile; + TQ_INT32 m_bottomInTile; bool m_beyondEnd; private: @@ -129,7 +129,7 @@ class KRITACORE_EXPORT KisTiledHLineIterator : public KisTiledIterator public: /// do not call constructor directly use factory method in KisDataManager instead. - KisTiledHLineIterator( KisTiledDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 w, bool writable); + KisTiledHLineIterator( KisTiledDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, bool writable); KisTiledHLineIterator(const KisTiledHLineIterator&); KisTiledHLineIterator& operator=(const KisTiledHLineIterator&); ~KisTiledHLineIterator(); @@ -140,7 +140,7 @@ public: /// Returns the number of consequtive horizontal pixels that we point at /// This is useful for optimizing - Q_INT32 nConseqHPixels() const; + TQ_INT32 nConseqHPixels() const; /// Advances a number of pixels until it reaches the end of the line KisTiledHLineIterator & operator+=(int); @@ -155,14 +155,14 @@ public: void nextRow(); protected: - Q_INT32 m_right; - Q_INT32 m_left; - Q_INT32 m_leftCol; - Q_INT32 m_rightCol; - Q_INT32 m_xInTile; - Q_INT32 m_yInTile; - Q_INT32 m_leftInTile; - Q_INT32 m_rightInTile; + TQ_INT32 m_right; + TQ_INT32 m_left; + TQ_INT32 m_leftCol; + TQ_INT32 m_rightCol; + TQ_INT32 m_xInTile; + TQ_INT32 m_yInTile; + TQ_INT32 m_leftInTile; + TQ_INT32 m_rightInTile; private: void nextTile(); @@ -178,7 +178,7 @@ class KRITACORE_EXPORT KisTiledVLineIterator : public KisTiledIterator public: /// do not call constructor directly use factory method in KisDataManager instead. - KisTiledVLineIterator( KisTiledDataManager *dm, Q_INT32 x, Q_INT32 y, Q_INT32 h, bool writable); + KisTiledVLineIterator( KisTiledDataManager *dm, TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, bool writable); KisTiledVLineIterator(const KisTiledVLineIterator&); KisTiledVLineIterator& operator=(const KisTiledVLineIterator&); ~KisTiledVLineIterator(); @@ -197,14 +197,14 @@ public: void nextCol(); protected: - Q_INT32 m_top; - Q_INT32 m_bottom; - Q_INT32 m_topRow; - Q_INT32 m_bottomRow; - Q_INT32 m_xInTile; - Q_INT32 m_yInTile; - Q_INT32 m_topInTile; - Q_INT32 m_bottomInTile; + TQ_INT32 m_top; + TQ_INT32 m_bottom; + TQ_INT32 m_topRow; + TQ_INT32 m_bottomRow; + TQ_INT32 m_xInTile; + TQ_INT32 m_yInTile; + TQ_INT32 m_topInTile; + TQ_INT32 m_bottomInTile; private: void nextTile(); diff --git a/krita/core/tiles/kis_tiledrectiterator.cc b/krita/core/tiles/kis_tiledrectiterator.cc index 73146504..8f0f7ed1 100644 --- a/krita/core/tiles/kis_tiledrectiterator.cc +++ b/krita/core/tiles/kis_tiledrectiterator.cc @@ -22,8 +22,8 @@ #include "kis_tile_global.h" #include "kis_tilediterator.h" -KisTiledRectIterator::KisTiledRectIterator( KisTiledDataManager *ndevice, Q_INT32 nleft, - Q_INT32 ntop, Q_INT32 nw, Q_INT32 nh, bool writable) : +KisTiledRectIterator::KisTiledRectIterator( KisTiledDataManager *ndevice, TQ_INT32 nleft, + TQ_INT32 ntop, TQ_INT32 nw, TQ_INT32 nh, bool writable) : KisTiledIterator(ndevice), m_left(nleft), m_top(ntop), @@ -118,7 +118,7 @@ KisTiledRectIterator::~KisTiledRectIterator( ) { } -Q_INT32 KisTiledRectIterator::nConseqPixels() const +TQ_INT32 KisTiledRectIterator::nConseqPixels() const { if(m_leftInTile || (m_rightInTile != KisTile::WIDTH - 1)) return m_rightInTile - m_xInTile + 1; diff --git a/krita/core/tiles/kis_tiledvlineiterator.cc b/krita/core/tiles/kis_tiledvlineiterator.cc index 5b6270e1..bcd85d70 100644 --- a/krita/core/tiles/kis_tiledvlineiterator.cc +++ b/krita/core/tiles/kis_tiledvlineiterator.cc @@ -22,7 +22,7 @@ #include "kis_tile_global.h" #include "kis_tilediterator.h" -KisTiledVLineIterator::KisTiledVLineIterator( KisTiledDataManager *ndevice, Q_INT32 x, Q_INT32 y, Q_INT32 h, bool writable) : +KisTiledVLineIterator::KisTiledVLineIterator( KisTiledDataManager *ndevice, TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, bool writable) : KisTiledIterator(ndevice), m_bottom(y + h - 1) { diff --git a/krita/core/tiles/kis_tilemanager.cc b/krita/core/tiles/kis_tilemanager.cc index 0ac968fd..49fe7f06 100644 --- a/krita/core/tiles/kis_tilemanager.cc +++ b/krita/core/tiles/kis_tilemanager.cc @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -54,8 +54,8 @@ KisTileManager::KisTileManager() { // Hardcoded (at the moment only?): 4 pools of 1000 tiles each m_tilesPerPool = 1000; - m_pools = new Q_UINT8*[4]; - m_poolPixelSizes = new Q_INT32[4]; + m_pools = new TQ_UINT8*[4]; + m_poolPixelSizes = new TQ_INT32[4]; m_poolFreeList = new PoolFreeList[4]; for (int i = 0; i < 4; i++) { m_pools[i] = 0; @@ -74,8 +74,8 @@ KisTileManager::KisTileManager() { counter = 0; - m_poolMutex = new QMutex(true); - m_swapMutex = new QMutex(true); + m_poolMutex = new TQMutex(true); + m_swapMutex = new TQMutex(true); } KisTileManager::~KisTileManager() { @@ -157,11 +157,11 @@ void KisTileManager::deregisterTile(KisTile* tile) { m_swapMutex->lock(); - if (!m_tileMap.contains(tile)) { + if (!m_tileMap.tqcontains(tile)) { m_swapMutex->unlock(); return; } - // Q_ASSERT(m_tileMap.contains(tile)); + // Q_ASSERT(m_tileMap.tqcontains(tile)); TileInfo* info = m_tileMap[tile]; @@ -352,16 +352,16 @@ void KisTileManager::toSwap(TileInfo* info) { } //memcpy(data, tile->m_data, info->size); - QFile* file = info->file->file(); + TQFile* file = info->file->file(); if(!file) { - kdWarning() << "Opening the file as QFile failed" << endl; + kdWarning() << "Opening the file as TQFile failed" << endl; m_swapForbidden = true; m_swapMutex->unlock(); return; } int fd = file->handle(); - Q_UINT8* data = 0; + TQ_UINT8* data = 0; if (!kritaMmap(data, 0, info->size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, info->filePos)) { kdWarning() << "Initial mmap failed" << endl; @@ -411,9 +411,9 @@ void KisTileManager::doSwapping() #if 1 // enable this to enable swapping - Q_UINT32 count = QMIN(m_swappableList.size(), m_swappiness); + TQ_UINT32 count = TQMIN(m_swappableList.size(), m_swappiness); - for (Q_UINT32 i = 0; i < count && !m_swapForbidden; i++) { + for (TQ_UINT32 i = 0; i < count && !m_swapForbidden; i++) { toSwap(m_swappableList.front()); m_swappableList.front()->validNode = false; m_swappableList.pop_front(); @@ -449,20 +449,20 @@ void KisTileManager::printInfo() kdDebug(DBG_AREA_TILES) << endl; } -Q_UINT8* KisTileManager::requestTileData(Q_INT32 pixelSize) +TQ_UINT8* KisTileManager::requestTileData(TQ_INT32 pixelSize) { m_swapMutex->lock(); - Q_UINT8* data = findTileFor(pixelSize); + TQ_UINT8* data = findTileFor(pixelSize); if ( data ) { m_swapMutex->unlock(); return data; } m_swapMutex->unlock(); - return new Q_UINT8[m_tileSize * pixelSize]; + return new TQ_UINT8[m_tileSize * pixelSize]; } -void KisTileManager::dontNeedTileData(Q_UINT8* data, Q_INT32 pixelSize) +void KisTileManager::dontNeedTileData(TQ_UINT8* data, TQ_INT32 pixelSize) { m_poolMutex->lock(); if (isPoolTile(data, pixelSize)) { @@ -472,14 +472,14 @@ void KisTileManager::dontNeedTileData(Q_UINT8* data, Q_INT32 pixelSize) m_poolMutex->unlock(); } -Q_UINT8* KisTileManager::findTileFor(Q_INT32 pixelSize) +TQ_UINT8* KisTileManager::findTileFor(TQ_INT32 pixelSize) { m_poolMutex->lock(); for (int i = 0; i < 4; i++) { if (m_poolPixelSizes[i] == pixelSize) { if (!m_poolFreeList[i].isEmpty()) { - Q_UINT8* data = m_poolFreeList[i].front(); + TQ_UINT8* data = m_poolFreeList[i].front(); m_poolFreeList[i].pop_front(); m_poolMutex->unlock(); return data; @@ -488,7 +488,7 @@ Q_UINT8* KisTileManager::findTileFor(Q_INT32 pixelSize) if (m_pools[i] == 0) { // allocate new pool m_poolPixelSizes[i] = pixelSize; - m_pools[i] = new Q_UINT8[pixelSize * m_tileSize * m_tilesPerPool]; + m_pools[i] = new TQ_UINT8[pixelSize * m_tileSize * m_tilesPerPool]; // j = 1 because we return the first element, so no need to add it to the freelist for (int j = 1; j < m_tilesPerPool; j++) m_poolFreeList[i].append(&m_pools[i][j * pixelSize * m_tileSize]); @@ -501,7 +501,7 @@ Q_UINT8* KisTileManager::findTileFor(Q_INT32 pixelSize) return 0; } -bool KisTileManager::isPoolTile(Q_UINT8* data, Q_INT32 pixelSize) { +bool KisTileManager::isPoolTile(TQ_UINT8* data, TQ_INT32 pixelSize) { if (data == 0) return false; @@ -521,7 +521,7 @@ bool KisTileManager::isPoolTile(Q_UINT8* data, Q_INT32 pixelSize) { return false; } -void KisTileManager::reclaimTileToPool(Q_UINT8* data, Q_INT32 pixelSize) { +void KisTileManager::reclaimTileToPool(TQ_UINT8* data, TQ_INT32 pixelSize) { m_poolMutex->lock(); for (int i = 0; i < 4; i++) { if (m_poolPixelSizes[i] == pixelSize) @@ -543,12 +543,12 @@ void KisTileManager::configChanged() { m_swapMutex->unlock(); } -bool KisTileManager::kritaMmap(Q_UINT8*& result, void *start, size_t length, +bool KisTileManager::kritaMmap(TQ_UINT8*& result, void *start, size_t length, int prot, int flags, int fd, off_t offset) { - result = (Q_UINT8*) mmap(start, length, prot, flags, fd, offset); + result = (TQ_UINT8*) mmap(start, length, prot, flags, fd, offset); // Same here for warning and GUI - if (result == (Q_UINT8*)-1) { + if (result == (TQ_UINT8*)-1) { kdWarning(DBG_AREA_TILES) << "mmap failed: errno is " << errno << "; we're probably going to crash very soon now...\n"; // Try to ignore what happened and carry on, but unlikely that we'll get diff --git a/krita/core/tiles/kis_tilemanager.h b/krita/core/tiles/kis_tilemanager.h index a66ca634..bce60ca4 100644 --- a/krita/core/tiles/kis_tilemanager.h +++ b/krita/core/tiles/kis_tilemanager.h @@ -20,10 +20,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -54,8 +54,8 @@ public: // Tile management void maySwapTile(const KisTile* tile); public: // Pool management - Q_UINT8* requestTileData(Q_INT32 pixelSize); - void dontNeedTileData(Q_UINT8* data, Q_INT32 pixelSize); + TQ_UINT8* requestTileData(TQ_INT32 pixelSize); + void dontNeedTileData(TQ_UINT8* data, TQ_INT32 pixelSize); public: // Configuration void configChanged(); @@ -84,37 +84,37 @@ private: // being used in the swap for this tile (may be larger!) // The file points to 0 if it is not swapped, and to the relevant TempFile otherwise struct TileInfo { KisTile *tile; KTempFile* file; off_t filePos; int size; int fsize; - QValueList::iterator node; + TQValueList::iterator node; bool inMem; bool onFile; bool mmapped; bool validNode; }; typedef struct { KTempFile* file; off_t filePos; int size; } FreeInfo; - typedef QMap TileMap; - typedef QValueList TileList; - typedef QValueList FreeList; - typedef QValueVector FreeListList; - typedef QValueList PoolFreeList; - typedef QValueList FileList; + typedef TQMap TileMap; + typedef TQValueList TileList; + typedef TQValueList FreeList; + typedef TQValueVector FreeListList; + typedef TQValueList PoolFreeList; + typedef TQValueList FileList; TileMap m_tileMap; TileList m_swappableList; FreeListList m_freeLists; FileList m_files; - Q_INT32 m_maxInMem; - Q_INT32 m_currentInMem; - Q_UINT32 m_swappiness; - Q_INT32 m_tileSize; // size of a tile if it used 1 byte per pixel + TQ_INT32 m_maxInMem; + TQ_INT32 m_currentInMem; + TQ_UINT32 m_swappiness; + TQ_INT32 m_tileSize; // size of a tile if it used 1 byte per pixel unsigned long m_bytesInMem; unsigned long m_bytesTotal; - Q_UINT8 **m_pools; - Q_INT32 *m_poolPixelSizes; - Q_INT32 m_tilesPerPool; + TQ_UINT8 **m_pools; + TQ_INT32 *m_poolPixelSizes; + TQ_INT32 m_tilesPerPool; PoolFreeList *m_poolFreeList; - QMutex * m_poolMutex; - QMutex * m_swapMutex; + TQMutex * m_poolMutex; + TQMutex * m_swapMutex; // This is the constant that we will use to see if we want to add a new tempfile - // We use 1<<30 (one gigabyte) because apparently 32bit systems don't really like very + // We use 1<<30 (one gigabyte) because aptqparently 32bit systems don't really like very // large files. static const long MaxSwapFileSize = 1<<30; // For debugging purposes: 1<<20 is a megabyte @@ -126,13 +126,13 @@ private: void toSwap(TileInfo* info); void doSwapping(); void printInfo(); - Q_UINT8* findTileFor(Q_INT32 pixelSize); - bool isPoolTile(Q_UINT8* data, Q_INT32 pixelSize); - void reclaimTileToPool(Q_UINT8* data, Q_INT32 pixelSize); + TQ_UINT8* findTileFor(TQ_INT32 pixelSize); + bool isPoolTile(TQ_UINT8* data, TQ_INT32 pixelSize); + void reclaimTileToPool(TQ_UINT8* data, TQ_INT32 pixelSize); // Mmap wrapper that prints warnings on error. The result is stored in the *& result // the return value is true on succes, false on failure. Other args as in man mmap - bool kritaMmap(Q_UINT8*& result, void *start, size_t length, + bool kritaMmap(TQ_UINT8*& result, void *start, size_t length, int prot, int flags, int fd, off_t offset); }; diff --git a/krita/core/tiles/tests/kis_tiled_data_tester.cpp b/krita/core/tiles/tests/kis_tiled_data_tester.cpp index 2d7fbe05..15d3e50b 100644 --- a/krita/core/tiles/tests/kis_tiled_data_tester.cpp +++ b/krita/core/tiles/tests/kis_tiled_data_tester.cpp @@ -30,27 +30,27 @@ KUNITTEST_MODULE_REGISTER_TESTER( KisTiledDataTester ); #define TEST_PIXEL_SIZE 4 -static Q_UINT8 defaultPixel[TEST_PIXEL_SIZE] = {0, 0, 0, OPACITY_TRANSPARENT}; +static TQ_UINT8 defaultPixel[TEST_PIXEL_SIZE] = {0, 0, 0, OPACITY_TRANSPARENT}; void KisTiledDataTester::allTests() { KisDataManager *dm = new KisDataManager(TEST_PIXEL_SIZE, defaultPixel); - Q_INT32 extentX; - Q_INT32 extentY; - Q_INT32 extentWidth; - Q_INT32 extentHeight; + TQ_INT32 extentX; + TQ_INT32 extentY; + TQ_INT32 extentWidth; + TQ_INT32 extentHeight; dm->extent(extentX, extentY, extentWidth, extentHeight); CHECK(extentWidth, 0); CHECK(extentHeight, 0); - const Q_UINT8 *readOnlyPixel = dm->pixel(KisTile::WIDTH/2, KisTile::HEIGHT/2); + const TQ_UINT8 *readOnlyPixel = dm->pixel(KisTile::WIDTH/2, KisTile::HEIGHT/2); dm->extent(extentX, extentY, extentWidth, extentHeight); CHECK(extentWidth, 0); CHECK(extentHeight, 0); - Q_UINT8 *writablePixel = dm->writablePixel(KisTile::WIDTH/2, KisTile::HEIGHT/2); + TQ_UINT8 *writablePixel = dm->writablePixel(KisTile::WIDTH/2, KisTile::HEIGHT/2); dm->extent(extentX, extentY, extentWidth, extentHeight); CHECK(extentX, 0); CHECK(extentY, 0); diff --git a/krita/data/palettes/Named_Colors.gpl b/krita/data/palettes/Named_Colors.gpl index 5fbd533b..ce7af023 100644 --- a/krita/data/palettes/Named_Colors.gpl +++ b/krita/data/palettes/Named_Colors.gpl @@ -15,7 +15,7 @@ Columns: 16 255 228 196 bisque (255 228 196) 255 218 185 peach puff (255 218 185) 255 222 173 navajo white (255 222 173) -255 228 181 moccasin (255 228 181) +255 228 181 tqmoccasin (255 228 181) 255 248 220 cornsilk (255 248 220) 255 255 240 ivory (255 255 240) 255 250 205 lemon chiffon (255 250 205) diff --git a/krita/data/patterns/nops.pat b/krita/data/patterns/nops.pat index 5fbef16d..52d49fba 100644 Binary files a/krita/data/patterns/nops.pat and b/krita/data/patterns/nops.pat differ diff --git a/krita/data/profiles/cmyk.icm b/krita/data/profiles/cmyk.icm index eb24bcca..65bc4e85 100644 Binary files a/krita/data/profiles/cmyk.icm and b/krita/data/profiles/cmyk.icm differ diff --git a/krita/data/profiles/fogra27l.icm b/krita/data/profiles/fogra27l.icm index 3aad9760..1cf03c3a 100644 Binary files a/krita/data/profiles/fogra27l.icm and b/krita/data/profiles/fogra27l.icm differ diff --git a/krita/doc/DESIGN.obsolete b/krita/doc/DESIGN.obsolete index f3fd1631..6f762d1d 100644 --- a/krita/doc/DESIGN.obsolete +++ b/krita/doc/DESIGN.obsolete @@ -21,12 +21,12 @@ Design Patterns changes: * Change brushes handling to a generic Mediator pattern - (kis_resource_mediator). Resources are brush shapes, + (kis_resource_mediator). Resources are brush tqshapes, patterns (and colours, too?) Patrick intended a Flyweight here. * The composite pattern is used in paint devices, layers, channels, - etc. (What about masks?) + etc. (What about tqmasks?) * Change colourspace handling to a Strategy pattern (strategy/kis_strategy_color) @@ -67,7 +67,7 @@ Design Patterns * Addition of kis_types. Defines shared pointer pointers to core krita objects: image, paintdevice, channel, - mask, layer etc. + tqmask, layer etc. * Tile architecture. There's Mediator and a Singleton pattern here at least. This stuff seems to work, doesn't @@ -141,7 +141,7 @@ Obsolete files core/helper/kis_timer core/helper/kis_scopedlock (Replaced with QMutexlocker) core/kis_krayon (was predecessor of kis_resource) - core/kis_mask + core/kis_tqmask core/kis_util ui/kis_krayon_widget @@ -151,7 +151,7 @@ Random head-scratchings - Why the QUANTUM redefinition: the number of bits per channel, 8 for 32-bit colour, 16 for 64-bit colour. - - is_mask unimplemented? What was it meant to do, or is it an + - is_tqmask unimplemented? What was it meant to do, or is it an interface? - nameserver presents unique numbers for new layers and images. diff --git a/krita/doc/background_paper.txt b/krita/doc/background_paper.txt index c70f6dd6..f0cfec8a 100644 --- a/krita/doc/background_paper.txt +++ b/krita/doc/background_paper.txt @@ -68,7 +68,7 @@ trying to use a pencil on a watercolor layer causes a nasty flow-impeding useless error box to popup. Media and ordinary layers can be grouped and mixed at will, together with adjustment -layers. Adjustment layers can also be attached to selection masks, per layer. +layers. Adjustment layers can also be attached to selection tqmasks, per layer. The composited layers is either scaled and color corrected, or color corrected and then scaled, depending on whether the zoom > 100% or < 100%. @@ -79,6 +79,6 @@ We need perhaps to add a light source or two, in OpenGL mode... I think we do. On top of the layers are what Xara calls blobs: the temporary droppings of -tools, like rubber bands, vector paths, brush shape cursors. +tools, like rubber bands, vector paths, brush tqshape cursors. diff --git a/krita/doc/brush.txt b/krita/doc/brush.txt index bd310ee0..acab6089 100644 --- a/krita/doc/brush.txt +++ b/krita/doc/brush.txt @@ -6,31 +6,31 @@ sources: * The old Krita brush code (http://webcvs.kde.org/cgi-bin/cvsweb.cgi/koffice/krita/tools/kis_tool_brush.cc?rev=1.58&content-type=text/x-cvsweb-markup) * Peter Jodda's Perico (http://software.jodda.de/perico.html) -* The source of the Gimp (both current and 0.99.11 -- the oldest version I could find) (http://www.gimp.org) +* The source of the Gimp (both current and 0.99.11 -- the oldest version I could tqfind) (http://www.gimp.org) * David Hodson's article on Gimp brushes (http://members.ozemail.com.au/~hodsond/gimpbrush.html) * Raph Levien's article on Gimp brushes (http://www.levien.com/gimp/brush-arch.html) Krita uses the gimp's brush file formats: .gbr and .gih, for singe and pipeline brushes, respectively. These brushes contain one or more grayscale or rgba images. If the image is grayscale, the gray image is -intended to be used as an alpha mask: each gray level corresponds to +intended to be used as an alpha tqmask: each gray level corresponds to a certain alpha level, and when painting the current painting colour is composited in the image with this level as its alpha component. The -image brushes should be masked -- i.e., these are coloured images placed +image brushes should be tqmasked -- i.e., these are coloured images placed on a white background. The white background should be made transparent, and then the brush image can be composited onto our image. -This is currently only half supported: I make masks of everything, +This is currently only half supported: I make tqmasks of everything, partly because I like that better, partly because until very recently there was no way of making out the difference between gray and rgb brushes because KisBrush didn't remember that bit of data. -Making the initial mask of a brush is however by now pretty well done; the next -problem is painting with those masks. +Making the initial tqmask of a brush is however by now pretty well done; the next +problem is painting with those tqmasks. Here we have two situations, one easy, one difficult. The easy one is the single mouse click. If the user clicks or taps with his stylus, we can composite the -mask or the image at the pixel position of the mouse click. +tqmask or the image at the pixel position of the mouse click. The difficult situation is drawing a line. This line needs to be antialiased. diff --git a/krita/doc/channels_masks_selections b/krita/doc/channels_masks_selections index 837e154e..4ce65414 100644 --- a/krita/doc/channels_masks_selections +++ b/krita/doc/channels_masks_selections @@ -1,6 +1,6 @@ -We did a rethink on channels, selections and masks last summer. +We did a rethink on channels, selections and tqmasks last summer. -Traditionally, a mask is seen as an extra channel for an image, analogous +Traditionally, a tqmask is seen as an extra channel for an image, analogous to the alpha channel. We want to do away with that idea. A layer can have a number of permanent selections associated with it. diff --git a/krita/doc/colorspaces.xmi b/krita/doc/colorspaces.xmi index 107e3445..5583e61d 100644 --- a/krita/doc/colorspaces.xmi +++ b/krita/doc/colorspaces.xmi @@ -344,7 +344,7 @@ XXX: Also add a function that modifies the current alpha with the given alpha, i - @@ -352,7 +352,7 @@ as many alpha values as pixels but we do not check this." isSpecification="false - @@ -433,7 +433,7 @@ converted to the target model." isSpecification="false" isLeaf="false" visibilit - + @@ -450,7 +450,7 @@ model together." isSpecification="false" isLeaf="false" visibility="protected" x - + @@ -500,7 +500,7 @@ model together." isSpecification="false" isLeaf="false" visibility="protected" x - + @@ -513,7 +513,7 @@ model together." isSpecification="false" isLeaf="false" visibility="protected" x - + +The alpha tqmask is a special color strategy that treats all pixels as +alpha value with a colour common to the tqmask. The default color is white." isSpecification="false" isLeaf="false" visibility="public" xmi.id="255" isRoot="false" isAbstract="false" name="KisAlphaColorSpace" > @@ -727,7 +727,7 @@ Returns false if the conversion failed, true if it succeeded" isSpecification="f - + @@ -973,7 +973,7 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - + @@ -991,8 +991,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1004,8 +1004,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1017,8 +1017,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1030,8 +1030,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1043,8 +1043,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1056,8 +1056,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1069,8 +1069,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1082,8 +1082,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1095,8 +1095,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1108,8 +1108,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1121,8 +1121,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1302,7 +1302,7 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - + @@ -1509,7 +1509,7 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - + @@ -1527,8 +1527,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1540,8 +1540,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1553,8 +1553,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1566,8 +1566,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1579,8 +1579,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1592,8 +1592,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1605,8 +1605,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1618,8 +1618,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1631,8 +1631,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1644,8 +1644,8 @@ and down-scaling of channels." isSpecification="false" isLeaf="false" visibility - - + + @@ -1678,7 +1678,7 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - + @@ -1691,7 +1691,7 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - + - + @@ -1894,8 +1894,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1907,8 +1907,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1920,8 +1920,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1933,8 +1933,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1946,8 +1946,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1959,8 +1959,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1972,8 +1972,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1985,8 +1985,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -1998,8 +1998,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2011,8 +2011,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2024,8 +2024,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2037,8 +2037,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2050,8 +2050,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2063,8 +2063,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2076,8 +2076,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2278,7 +2278,7 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - + @@ -2291,8 +2291,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2304,8 +2304,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2317,8 +2317,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2330,8 +2330,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2343,8 +2343,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2356,8 +2356,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2369,8 +2369,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2382,8 +2382,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2395,8 +2395,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2408,8 +2408,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2421,8 +2421,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2434,8 +2434,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2447,8 +2447,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2460,8 +2460,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2473,8 +2473,8 @@ A plugin wrapper around the RGB F32 colour space strategy." isSpecification="fal - - + + @@ -2688,7 +2688,7 @@ the compensation factor will be used to limit the darkening. - + @@ -2701,8 +2701,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2714,8 +2714,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2727,8 +2727,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2740,8 +2740,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2753,8 +2753,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2766,8 +2766,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2779,8 +2779,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2792,8 +2792,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2805,8 +2805,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2818,8 +2818,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2831,8 +2831,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2844,8 +2844,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2857,8 +2857,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -2870,8 +2870,8 @@ the compensation factor will be used to limit the darkening. - - + + @@ -3087,7 +3087,7 @@ these wetpix structs for every paint device pixel" isSpecification="false" isLea - + @@ -3297,7 +3297,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - + @@ -3322,8 +3322,8 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - - + + @@ -3335,8 +3335,8 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - - + + @@ -3348,8 +3348,8 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - - + + @@ -3358,20 +3358,20 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -4065,7 +4065,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -4077,7 +4077,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4140,7 +4140,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4152,7 +4152,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4215,7 +4215,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4227,7 +4227,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4290,7 +4290,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4302,7 +4302,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4365,7 +4365,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4377,7 +4377,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4440,7 +4440,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4452,7 +4452,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4515,7 +4515,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4527,7 +4527,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4590,7 +4590,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4602,7 +4602,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4665,7 +4665,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4677,7 +4677,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4740,7 +4740,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4752,7 +4752,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4815,7 +4815,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4827,7 +4827,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4890,7 +4890,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4902,7 +4902,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4965,7 +4965,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -4977,7 +4977,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5040,7 +5040,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5052,7 +5052,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5062,27 +5062,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
@@ -5116,52 +5116,52 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5191,101 +5191,101 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5293,7 +5293,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5305,7 +5305,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5368,7 +5368,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5380,7 +5380,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5443,7 +5443,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5455,7 +5455,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5518,7 +5518,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5530,7 +5530,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -5540,67 +5540,67 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5634,132 +5634,132 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5779,252 +5779,252 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6040,471 +6040,471 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6512,7 +6512,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6524,7 +6524,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6586,36 +6586,36 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -6623,7 +6623,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6635,7 +6635,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6698,7 +6698,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6710,7 +6710,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6773,7 +6773,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6785,7 +6785,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6848,7 +6848,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6860,7 +6860,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6923,7 +6923,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6935,7 +6935,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -6998,7 +6998,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7010,7 +7010,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7073,7 +7073,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7085,7 +7085,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7148,7 +7148,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7160,7 +7160,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7223,7 +7223,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7235,7 +7235,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7298,7 +7298,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7310,7 +7310,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7373,7 +7373,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7385,7 +7385,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7448,7 +7448,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7460,7 +7460,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7523,7 +7523,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7535,7 +7535,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7598,7 +7598,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7610,7 +7610,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7673,7 +7673,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7685,7 +7685,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7748,7 +7748,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7760,7 +7760,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7823,7 +7823,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7835,7 +7835,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7898,7 +7898,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7910,7 +7910,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7973,7 +7973,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -7985,7 +7985,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8048,7 +8048,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8060,7 +8060,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8123,7 +8123,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8135,7 +8135,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8198,7 +8198,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8210,7 +8210,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8273,7 +8273,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8285,7 +8285,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8348,7 +8348,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8360,7 +8360,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8423,7 +8423,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8435,7 +8435,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8498,7 +8498,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8510,7 +8510,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8573,7 +8573,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8585,7 +8585,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8648,7 +8648,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8660,7 +8660,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8723,7 +8723,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8735,7 +8735,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8798,7 +8798,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8810,7 +8810,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8873,7 +8873,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8885,7 +8885,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8948,7 +8948,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -8960,7 +8960,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9023,7 +9023,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9035,7 +9035,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9098,7 +9098,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9110,7 +9110,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9173,7 +9173,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9185,7 +9185,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9248,7 +9248,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9260,7 +9260,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9323,7 +9323,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9335,7 +9335,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9398,7 +9398,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9410,7 +9410,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9473,7 +9473,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9485,7 +9485,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9548,7 +9548,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9560,7 +9560,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9570,7 +9570,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -9604,27 +9604,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
@@ -9644,7 +9644,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -9660,176 +9660,176 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9837,7 +9837,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -9849,9 +9849,9 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
@@ -9859,12 +9859,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -9898,37 +9898,37 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -9948,122 +9948,122 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10079,56 +10079,56 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10136,7 +10136,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10148,7 +10148,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10158,7 +10158,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -10192,27 +10192,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
@@ -10232,7 +10232,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -10248,71 +10248,71 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10320,7 +10320,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10332,7 +10332,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10342,17 +10342,17 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
@@ -10386,47 +10386,47 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10446,7 +10446,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -10462,146 +10462,146 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10609,7 +10609,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10621,7 +10621,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10684,7 +10684,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10696,7 +10696,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -10706,42 +10706,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -10775,82 +10775,82 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10870,174 +10870,174 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11051,196 +11051,196 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11248,7 +11248,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -11260,7 +11260,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -11270,37 +11270,37 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -11334,72 +11334,72 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11429,141 +11429,141 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11571,7 +11571,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -11583,7 +11583,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -11646,7 +11646,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -11658,7 +11658,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -11668,47 +11668,47 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11742,92 +11742,92 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11847,122 +11847,122 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11978,216 +11978,216 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12195,7 +12195,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12207,7 +12207,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12217,17 +12217,17 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
@@ -12261,32 +12261,32 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
@@ -12306,179 +12306,179 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12492,96 +12492,96 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12589,7 +12589,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12601,7 +12601,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12664,7 +12664,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12676,7 +12676,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12686,7 +12686,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -12720,12 +12720,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -12745,12 +12745,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
@@ -12766,56 +12766,56 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12823,7 +12823,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12835,7 +12835,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12898,7 +12898,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12910,7 +12910,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -12972,36 +12972,36 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -13009,7 +13009,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13021,7 +13021,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13084,7 +13084,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13096,7 +13096,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13159,7 +13159,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13171,7 +13171,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13234,7 +13234,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13246,7 +13246,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13309,7 +13309,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13321,7 +13321,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13331,27 +13331,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
@@ -13385,52 +13385,52 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -13450,204 +13450,204 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -13661,136 +13661,136 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -13798,7 +13798,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13810,7 +13810,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13873,7 +13873,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13885,7 +13885,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13948,7 +13948,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -13960,7 +13960,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -14023,7 +14023,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -14035,7 +14035,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -14045,37 +14045,37 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -14109,72 +14109,72 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14194,204 +14194,204 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14405,176 +14405,176 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14582,7 +14582,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -14594,7 +14594,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -14657,7 +14657,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -14669,7 +14669,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -14679,7 +14679,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -14713,12 +14713,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -14738,219 +14738,219 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14964,56 +14964,56 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15021,7 +15021,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15033,7 +15033,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15096,7 +15096,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15108,7 +15108,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15171,7 +15171,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15183,7 +15183,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15246,7 +15246,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15258,7 +15258,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15268,42 +15268,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -15337,82 +15337,82 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15442,161 +15442,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15604,7 +15604,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15616,7 +15616,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15626,12 +15626,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -15665,22 +15665,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -15710,41 +15710,41 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -15752,7 +15752,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15764,7 +15764,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -15774,42 +15774,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -15843,82 +15843,82 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15948,161 +15948,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16110,7 +16110,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16122,7 +16122,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16132,37 +16132,37 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -16196,72 +16196,72 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16281,147 +16281,147 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16437,176 +16437,176 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16614,7 +16614,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16626,7 +16626,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16689,7 +16689,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16701,7 +16701,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16764,7 +16764,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16776,7 +16776,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16839,7 +16839,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16851,7 +16851,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16914,7 +16914,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16926,7 +16926,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -16989,7 +16989,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17001,7 +17001,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17064,7 +17064,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17076,7 +17076,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17139,7 +17139,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17151,7 +17151,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17214,7 +17214,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17226,7 +17226,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17236,7 +17236,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -17270,12 +17270,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -17295,144 +17295,144 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17446,56 +17446,56 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17503,7 +17503,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17515,7 +17515,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17580,7 +17580,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17605,7 +17605,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17630,7 +17630,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17655,7 +17655,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17680,7 +17680,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17705,7 +17705,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17723,52 +17723,52 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17780,101 +17780,101 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17882,7 +17882,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17907,7 +17907,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17932,7 +17932,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17957,7 +17957,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -17975,382 +17975,382 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18362,261 +18362,261 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18624,7 +18624,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18649,7 +18649,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18674,7 +18674,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18699,7 +18699,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18724,7 +18724,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18749,7 +18749,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18774,7 +18774,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18799,7 +18799,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18824,7 +18824,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18849,7 +18849,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18874,7 +18874,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18899,7 +18899,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18924,7 +18924,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18949,7 +18949,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18974,7 +18974,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -18999,7 +18999,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19024,7 +19024,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19049,7 +19049,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19074,7 +19074,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19099,7 +19099,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19124,7 +19124,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19149,7 +19149,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19174,7 +19174,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19199,7 +19199,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19217,7 +19217,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19230,7 +19230,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19248,132 +19248,132 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19385,21 +19385,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -19407,7 +19407,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19425,7 +19425,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19438,7 +19438,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19456,27 +19456,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
@@ -19488,41 +19488,41 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -19530,7 +19530,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19548,252 +19548,252 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19805,161 +19805,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19967,7 +19967,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -19985,72 +19985,72 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20062,141 +20062,141 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20204,7 +20204,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -20222,212 +20222,212 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20439,181 +20439,181 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20621,7 +20621,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -20639,207 +20639,207 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20851,61 +20851,61 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20913,7 +20913,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -20938,7 +20938,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -20956,22 +20956,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
@@ -20983,21 +20983,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -21005,7 +21005,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21030,7 +21030,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21055,7 +21055,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21080,7 +21080,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21098,252 +21098,252 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -21355,101 +21355,101 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -21457,7 +21457,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21482,7 +21482,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21507,7 +21507,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21525,272 +21525,272 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -21802,141 +21802,141 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -21944,7 +21944,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21969,7 +21969,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -21987,227 +21987,227 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22219,21 +22219,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -22241,7 +22241,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -22266,7 +22266,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -22291,7 +22291,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -22316,7 +22316,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -22334,82 +22334,82 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22421,161 +22421,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22583,7 +22583,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -22601,22 +22601,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
@@ -22628,41 +22628,41 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -22670,7 +22670,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -22688,82 +22688,82 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22775,161 +22775,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22937,7 +22937,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -22955,217 +22955,217 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23177,141 +23177,141 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23319,7 +23319,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23344,7 +23344,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23369,7 +23369,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23394,7 +23394,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23419,7 +23419,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23437,152 +23437,152 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23594,21 +23594,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -23622,7 +23622,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -23647,7 +23647,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23674,7 +23674,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23853,7 +23853,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -23880,7 +23880,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24059,7 +24059,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24086,7 +24086,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24265,7 +24265,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24292,7 +24292,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24471,7 +24471,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24498,7 +24498,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24677,7 +24677,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24704,7 +24704,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -24719,27 +24719,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
@@ -24779,52 +24779,52 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -24959,101 +24959,101 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25061,7 +25061,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25088,7 +25088,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25267,7 +25267,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25294,7 +25294,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25473,7 +25473,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25500,7 +25500,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25679,7 +25679,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25706,7 +25706,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -25763,222 +25763,222 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25999,37 +25999,37 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -26063,72 +26063,72 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26142,22 +26142,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -26178,32 +26178,32 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
@@ -26237,62 +26237,62 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26306,12 +26306,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -26336,261 +26336,261 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26598,7 +26598,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -26625,7 +26625,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -26804,7 +26804,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -26831,7 +26831,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27010,7 +27010,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27037,7 +27037,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27216,7 +27216,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27243,7 +27243,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27422,7 +27422,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27449,7 +27449,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27628,7 +27628,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27655,7 +27655,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27834,7 +27834,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -27861,7 +27861,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28040,7 +28040,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28067,7 +28067,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28246,7 +28246,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28273,7 +28273,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28452,7 +28452,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28479,7 +28479,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28658,7 +28658,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28685,7 +28685,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28864,7 +28864,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -28891,7 +28891,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29070,7 +29070,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29097,7 +29097,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29276,7 +29276,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29303,7 +29303,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29482,7 +29482,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29509,7 +29509,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29688,7 +29688,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29715,7 +29715,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29894,7 +29894,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -29921,7 +29921,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30100,7 +30100,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30127,7 +30127,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30306,7 +30306,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30333,7 +30333,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30512,7 +30512,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30539,7 +30539,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30718,7 +30718,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30745,7 +30745,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30924,7 +30924,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -30951,7 +30951,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31130,7 +31130,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31157,7 +31157,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31336,7 +31336,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31363,7 +31363,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31420,7 +31420,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -31548,7 +31548,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31575,9 +31575,9 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
- +
@@ -31632,107 +31632,107 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -31789,17 +31789,17 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -31820,7 +31820,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -31854,12 +31854,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -31892,21 +31892,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -31914,7 +31914,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31941,7 +31941,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -31998,7 +31998,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -32126,7 +32126,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -32153,7 +32153,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -32168,12 +32168,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -32207,22 +32207,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -32242,7 +32242,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -32369,41 +32369,41 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -32411,7 +32411,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -32438,7 +32438,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -32495,117 +32495,117 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -32662,59 +32662,59 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -32733,42 +32733,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -32796,42 +32796,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -32843,42 +32843,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -32911,161 +32911,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33073,7 +33073,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -33100,7 +33100,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -33115,37 +33115,37 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -33185,72 +33185,72 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33385,141 +33385,141 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33527,7 +33527,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -33554,7 +33554,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -33611,117 +33611,117 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33778,7 +33778,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -33799,47 +33799,47 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33867,52 +33867,52 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33924,42 +33924,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -33992,181 +33992,181 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -34174,7 +34174,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -34201,7 +34201,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -34258,127 +34258,127 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -34435,54 +34435,54 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -34501,17 +34501,17 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
@@ -34539,22 +34539,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -34566,12 +34566,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -34604,61 +34604,61 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -34666,7 +34666,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -34693,7 +34693,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -34872,7 +34872,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -34899,7 +34899,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -34956,12 +34956,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
@@ -35033,7 +35033,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -35067,12 +35067,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -35105,21 +35105,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -35127,7 +35127,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35154,7 +35154,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35333,7 +35333,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35360,7 +35360,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35539,7 +35539,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35566,7 +35566,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35745,7 +35745,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35772,7 +35772,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -35829,122 +35829,122 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36001,84 +36001,84 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36097,27 +36097,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
@@ -36145,42 +36145,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -36192,12 +36192,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -36230,101 +36230,101 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36332,7 +36332,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -36359,7 +36359,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -36538,7 +36538,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -36565,7 +36565,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -36744,7 +36744,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -36771,7 +36771,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -36786,12 +36786,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -36825,22 +36825,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -36860,122 +36860,122 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37032,84 +37032,84 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37128,27 +37128,27 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
@@ -37176,42 +37176,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -37223,12 +37223,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -37261,141 +37261,141 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37403,7 +37403,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -37430,7 +37430,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -37609,7 +37609,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -37636,7 +37636,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -37693,142 +37693,142 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37885,79 +37885,79 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37976,7 +37976,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -38010,12 +38010,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -38048,21 +38048,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -38070,7 +38070,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38097,7 +38097,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38276,7 +38276,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38303,7 +38303,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38482,7 +38482,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38509,7 +38509,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38688,7 +38688,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38715,7 +38715,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -38730,42 +38730,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -38805,82 +38805,82 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39015,161 +39015,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39177,7 +39177,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -39204,7 +39204,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -39219,12 +39219,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -39264,22 +39264,22 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -39414,41 +39414,41 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -39456,7 +39456,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -39483,7 +39483,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -39498,42 +39498,42 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
@@ -39573,82 +39573,82 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39783,161 +39783,161 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39945,7 +39945,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -39972,7 +39972,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -40029,127 +40029,127 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -40206,9 +40206,9 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -40227,37 +40227,37 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
@@ -40291,72 +40291,72 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -40370,17 +40370,17 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
@@ -40405,141 +40405,141 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -40547,7 +40547,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -40574,7 +40574,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -40753,7 +40753,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -40780,7 +40780,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -40959,7 +40959,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -40986,7 +40986,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -41165,7 +41165,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -41192,7 +41192,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -41371,7 +41371,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -41398,7 +41398,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -41455,117 +41455,117 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -41622,12 +41622,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
@@ -41648,7 +41648,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
@@ -41682,12 +41682,12 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
@@ -41701,19 +41701,19 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
- +
- +
@@ -41736,21 +41736,21 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765" - +
- +
- +
- +
@@ -41758,7 +41758,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
@@ -41780,7 +41780,7 @@ of 1." isSpecification="false" isLeaf="false" visibility="public" xmi.id="1765"
- +
diff --git a/krita/doc/colorstrategyAPI b/krita/doc/colorstrategyAPI index bb6e1267..07c95ae9 100644 --- a/krita/doc/colorstrategyAPI +++ b/krita/doc/colorstrategyAPI @@ -3,7 +3,7 @@ This is a working document. It list the places where pixels are mangled and requ The purpose is to find out which functions an API in colorstrategy must have to support pixelmangling in a colorstretegy independent manner. -Requested function: apply an alpha mask to pixels +Requested function: apply an alpha tqmask to pixels Problem: alpha is hard-coded 8-bit in KisPixel, when it should be free void KisPaintDevice::clearSelection() @@ -33,25 +33,25 @@ void KisPaintDevice::clearSelection() } } -void KisPaintDevice::applySelectionMask(KisSelectionSP mask) +void KisPaintDevice::applySelectionMask(KisSelectionSP tqmask) { - QRect r = mask -> extent(); + QRect r = tqmask -> extent(); crop(r); for (Q_INT32 y = r.top(); y <= r.bottom(); ++y) { KisHLineIterator pixelIt = createHLineIterator(r.x(), y, r.width(), true); - KisHLineIterator maskIt = mask -> createHLineIterator(r.x(), y, r.width(), false); + KisHLineIterator tqmaskIt = tqmask -> createHLineIterator(r.x(), y, r.width(), false); while (!pixelIt.isDone()) { KisPixel pixel = toPixel(pixelIt.rawData()); - KisPixel maskValue = mask -> toPixel(maskIt.rawData()); + KisPixel tqmaskValue = tqmask -> toPixel(tqmaskIt.rawData()); - pixel.alpha() = (pixel.alpha() * maskValue.alpha()) / MAX_SELECTED; + pixel.alpha() = (pixel.alpha() * tqmaskValue.alpha()) / MAX_SELECTED; ++pixelIt; - ++maskIt; + ++tqmaskIt; } } } diff --git a/krita/doc/controller.xmi b/krita/doc/controller.xmi index 2bdf079e..6f997952 100644 --- a/krita/doc/controller.xmi +++ b/krita/doc/controller.xmi @@ -284,7 +284,7 @@ All this functionality is centered around a view with a certain document and an XXX: Should this be the basis for simple scriptability? Have every controller register every action using a KisID and a parameter description list, and offer a queryActions() and an executeAction(KisID) method?" isSpecification="false" isLeaf="false" visibility="public" xmi.id="13" isRoot="false" isAbstract="true" name="KisMetaControllerInterface" > - + @@ -933,14 +933,14 @@ below this layer, remove the specified layer." isSpecification="false" isLeaf="f
- + - + @@ -1341,7 +1341,7 @@ the value of a byte signifies whether a corresponding pixel is selected, or not. - + @@ -1356,7 +1356,7 @@ the value of a byte signifies whether a corresponding pixel is selected, or not. - + @@ -1376,7 +1376,7 @@ the value of a byte signifies whether a corresponding pixel is selected, or not. - + @@ -1797,12 +1797,12 @@ and contains data that must be associated with an image for purposes of import/e - + - + @@ -2056,7 +2056,7 @@ That last bit has not been solved yet. - + @@ -2097,7 +2097,7 @@ and the clipboard." isSpecification="false" isLeaf="false" visibility="public" x - + @@ -2209,13 +2209,13 @@ and the clipboard." isSpecification="false" isLeaf="false" visibility="public" x - + - + - + @@ -2243,7 +2243,7 @@ and the clipboard." isSpecification="false" isLeaf="false" visibility="public" x - + @@ -2677,7 +2677,7 @@ the resource has been saved." isSpecification="false" isLeaf="false" visibility= - + @@ -3219,12 +3219,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - + - + @@ -3329,39 +3329,39 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4426,7 +4426,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -4438,7 +4438,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4501,7 +4501,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4513,7 +4513,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4576,7 +4576,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4588,7 +4588,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4651,7 +4651,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4663,7 +4663,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4726,7 +4726,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4738,7 +4738,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4801,7 +4801,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4813,7 +4813,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4876,7 +4876,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4888,7 +4888,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4951,7 +4951,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -4963,7 +4963,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5026,7 +5026,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5038,7 +5038,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5090,142 +5090,142 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5242,7 +5242,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5254,7 +5254,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5306,47 +5306,47 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5363,7 +5363,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5375,7 +5375,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5438,7 +5438,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5450,7 +5450,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5513,7 +5513,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5525,7 +5525,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5588,7 +5588,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5600,7 +5600,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5663,7 +5663,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5675,7 +5675,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5738,7 +5738,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5750,7 +5750,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5813,7 +5813,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5825,7 +5825,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5888,7 +5888,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5900,7 +5900,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5963,7 +5963,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -5975,7 +5975,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6038,7 +6038,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6050,7 +6050,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6113,7 +6113,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6125,7 +6125,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6188,7 +6188,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6200,7 +6200,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6263,7 +6263,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6275,7 +6275,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6338,7 +6338,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6350,7 +6350,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6413,7 +6413,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6425,7 +6425,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6477,22 +6477,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -6508,36 +6508,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -6545,7 +6545,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6557,7 +6557,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6619,36 +6619,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -6656,7 +6656,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6668,7 +6668,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6731,7 +6731,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6743,7 +6743,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6806,7 +6806,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6818,7 +6818,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6881,7 +6881,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6893,7 +6893,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6956,7 +6956,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -6968,7 +6968,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -7031,7 +7031,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -7043,7 +7043,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -7106,7 +7106,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -7118,7 +7118,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -7128,122 +7128,122 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7277,242 +7277,242 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7532,362 +7532,362 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7903,551 +7903,551 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8455,7 +8455,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8467,7 +8467,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8530,7 +8530,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8542,7 +8542,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8605,7 +8605,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8617,7 +8617,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8680,7 +8680,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8692,7 +8692,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8755,7 +8755,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8767,7 +8767,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -8777,67 +8777,67 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8871,132 +8871,132 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9016,372 +9016,372 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9397,366 +9397,366 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9764,7 +9764,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -9776,7 +9776,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -9839,7 +9839,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -9851,7 +9851,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -9914,7 +9914,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -9926,7 +9926,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -9989,7 +9989,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10001,7 +10001,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10064,7 +10064,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10076,7 +10076,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10139,7 +10139,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10151,7 +10151,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10214,7 +10214,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10226,7 +10226,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10289,7 +10289,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10301,7 +10301,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10364,7 +10364,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10376,7 +10376,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10439,7 +10439,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10451,7 +10451,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10461,17 +10461,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -10505,34 +10505,34 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
@@ -10550,47 +10550,47 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10606,104 +10606,104 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10715,7 +10715,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10778,7 +10778,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10790,7 +10790,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10853,7 +10853,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10865,7 +10865,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10928,7 +10928,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -10940,7 +10940,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11003,7 +11003,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11015,7 +11015,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11078,7 +11078,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11090,7 +11090,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11153,7 +11153,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11165,7 +11165,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11228,7 +11228,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11240,7 +11240,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11303,7 +11303,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11315,7 +11315,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11378,7 +11378,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11390,7 +11390,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11453,7 +11453,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11465,7 +11465,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11528,7 +11528,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11540,7 +11540,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11603,7 +11603,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11615,7 +11615,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11678,7 +11678,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11690,7 +11690,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11753,7 +11753,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11765,7 +11765,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11828,7 +11828,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11840,7 +11840,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11903,7 +11903,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11915,7 +11915,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11978,7 +11978,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -11990,7 +11990,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12053,7 +12053,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12065,7 +12065,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12128,7 +12128,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12140,7 +12140,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12203,7 +12203,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12215,7 +12215,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12278,7 +12278,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12290,7 +12290,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12353,7 +12353,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12365,7 +12365,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12428,7 +12428,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12440,7 +12440,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12503,7 +12503,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12515,7 +12515,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12567,92 +12567,92 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12668,36 +12668,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -12705,7 +12705,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12717,7 +12717,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12780,7 +12780,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12792,7 +12792,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12855,7 +12855,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12867,7 +12867,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12930,7 +12930,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -12942,7 +12942,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13005,7 +13005,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13017,7 +13017,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13080,19 +13080,19 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
- +
- +
@@ -13102,27 +13102,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -13156,52 +13156,52 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -13221,27 +13221,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
@@ -13257,136 +13257,136 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -13394,7 +13394,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13406,7 +13406,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13469,7 +13469,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13481,7 +13481,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13544,7 +13544,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13556,7 +13556,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13619,7 +13619,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13631,7 +13631,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13694,7 +13694,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13706,7 +13706,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13769,7 +13769,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13781,7 +13781,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13844,7 +13844,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13856,7 +13856,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13919,7 +13919,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13931,7 +13931,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -13941,42 +13941,42 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
@@ -14010,82 +14010,82 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14105,82 +14105,82 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14196,231 +14196,231 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14428,7 +14428,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14440,7 +14440,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14503,7 +14503,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14515,7 +14515,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14578,7 +14578,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14590,7 +14590,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14653,7 +14653,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14665,7 +14665,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14728,7 +14728,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14740,7 +14740,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14803,7 +14803,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14815,7 +14815,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14878,7 +14878,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14890,7 +14890,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14953,7 +14953,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14965,7 +14965,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -14975,17 +14975,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -15019,32 +15019,32 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
@@ -15064,22 +15064,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -15095,96 +15095,96 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15192,7 +15192,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15204,7 +15204,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15267,7 +15267,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15279,7 +15279,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15342,7 +15342,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15354,7 +15354,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15417,7 +15417,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15429,7 +15429,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15492,7 +15492,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15504,7 +15504,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15567,7 +15567,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15579,7 +15579,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15642,7 +15642,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15654,7 +15654,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15717,7 +15717,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15729,7 +15729,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15792,7 +15792,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15804,7 +15804,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15867,7 +15867,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15879,7 +15879,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15942,7 +15942,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -15954,7 +15954,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16017,7 +16017,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16029,7 +16029,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16092,7 +16092,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16104,7 +16104,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16167,7 +16167,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16179,7 +16179,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16242,7 +16242,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16254,7 +16254,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16317,7 +16317,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16329,7 +16329,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16392,7 +16392,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16404,7 +16404,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16467,7 +16467,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16479,7 +16479,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16542,7 +16542,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16554,7 +16554,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16617,7 +16617,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16629,7 +16629,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16692,7 +16692,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16704,7 +16704,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16767,7 +16767,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16779,7 +16779,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16842,7 +16842,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16854,7 +16854,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16917,7 +16917,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16929,7 +16929,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -16981,137 +16981,137 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17128,7 +17128,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17140,7 +17140,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17192,27 +17192,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -17229,7 +17229,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17241,7 +17241,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17304,7 +17304,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17316,7 +17316,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17379,7 +17379,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17391,7 +17391,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17454,7 +17454,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17466,7 +17466,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17476,12 +17476,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -17515,22 +17515,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -17550,42 +17550,42 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
@@ -17601,76 +17601,76 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17678,7 +17678,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17690,7 +17690,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17752,211 +17752,211 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17964,7 +17964,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -17976,7 +17976,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18039,7 +18039,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18051,7 +18051,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18114,7 +18114,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18126,7 +18126,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18189,7 +18189,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18201,7 +18201,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18264,7 +18264,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18276,7 +18276,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18339,7 +18339,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18351,7 +18351,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18414,7 +18414,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18426,7 +18426,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18489,7 +18489,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18501,7 +18501,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18564,7 +18564,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18576,7 +18576,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18639,7 +18639,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18651,7 +18651,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18714,7 +18714,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18726,7 +18726,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18789,7 +18789,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18801,7 +18801,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -18811,122 +18811,122 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18960,242 +18960,242 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19215,132 +19215,132 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19356,516 +19356,516 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19873,7 +19873,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -19885,7 +19885,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -19948,7 +19948,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -19960,7 +19960,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20023,7 +20023,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20035,7 +20035,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20098,7 +20098,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20110,7 +20110,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20173,7 +20173,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20185,7 +20185,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20248,7 +20248,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20260,7 +20260,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20323,7 +20323,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20335,7 +20335,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20398,7 +20398,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20410,7 +20410,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20473,7 +20473,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20485,7 +20485,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20548,7 +20548,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20560,7 +20560,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20623,7 +20623,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20635,7 +20635,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20698,7 +20698,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20710,7 +20710,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20773,7 +20773,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20785,7 +20785,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20848,7 +20848,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20860,7 +20860,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20923,7 +20923,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20935,7 +20935,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -20998,7 +20998,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21010,7 +21010,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21073,7 +21073,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21085,7 +21085,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21148,7 +21148,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21160,7 +21160,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21223,7 +21223,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21235,7 +21235,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21245,7 +21245,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -21279,12 +21279,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -21304,57 +21304,57 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -21370,21 +21370,21 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -21392,7 +21392,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21404,7 +21404,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21467,7 +21467,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21479,7 +21479,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21542,7 +21542,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21554,7 +21554,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21617,7 +21617,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21629,7 +21629,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21692,7 +21692,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21704,7 +21704,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21767,7 +21767,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21779,7 +21779,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21842,7 +21842,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21854,9 +21854,9 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
- +
@@ -21875,7 +21875,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -21917,7 +21917,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21929,7 +21929,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -21992,19 +21992,19 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
- +
- +
@@ -22014,57 +22014,57 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22098,112 +22098,112 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22223,117 +22223,117 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22349,221 +22349,221 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -22571,7 +22571,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22583,7 +22583,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22646,7 +22646,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22658,7 +22658,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22721,7 +22721,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22733,7 +22733,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22796,7 +22796,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22808,7 +22808,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22871,7 +22871,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22883,7 +22883,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22946,7 +22946,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -22958,7 +22958,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23021,7 +23021,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23033,7 +23033,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23096,7 +23096,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23108,7 +23108,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23171,7 +23171,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23183,7 +23183,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23246,7 +23246,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23258,7 +23258,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23321,7 +23321,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23333,7 +23333,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23396,7 +23396,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23408,7 +23408,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23471,7 +23471,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23483,7 +23483,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23546,7 +23546,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23558,7 +23558,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23568,17 +23568,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -23612,77 +23612,77 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23702,17 +23702,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -23728,246 +23728,246 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23975,7 +23975,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23987,7 +23987,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -23997,7 +23997,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -24031,27 +24031,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -24071,12 +24071,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -24092,36 +24092,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -24129,7 +24129,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24141,7 +24141,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24193,12 +24193,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -24214,36 +24214,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -24251,7 +24251,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24263,7 +24263,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24315,12 +24315,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -24336,36 +24336,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -24373,7 +24373,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24385,7 +24385,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24395,7 +24395,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -24429,27 +24429,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -24469,12 +24469,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -24490,36 +24490,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -24527,7 +24527,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24539,7 +24539,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24591,12 +24591,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -24612,36 +24612,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -24649,7 +24649,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24661,7 +24661,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24713,17 +24713,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -24739,36 +24739,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -24776,7 +24776,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24788,7 +24788,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24798,7 +24798,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -24832,27 +24832,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -24872,12 +24872,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -24893,36 +24893,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -24930,7 +24930,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24942,7 +24942,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -24952,17 +24952,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -24996,32 +24996,32 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
@@ -25041,32 +25041,32 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
@@ -25082,96 +25082,96 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25179,7 +25179,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25191,7 +25191,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25253,71 +25253,71 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25325,7 +25325,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25337,7 +25337,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25347,12 +25347,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -25386,22 +25386,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -25431,41 +25431,41 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
@@ -25473,7 +25473,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25485,7 +25485,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25495,12 +25495,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -25534,22 +25534,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -25579,41 +25579,41 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
@@ -25621,7 +25621,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25633,7 +25633,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25696,7 +25696,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25708,7 +25708,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25771,7 +25771,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25783,7 +25783,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25846,7 +25846,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25858,7 +25858,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25921,7 +25921,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25933,7 +25933,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -25943,32 +25943,32 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
@@ -26002,62 +26002,62 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26077,112 +26077,112 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26198,191 +26198,191 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26390,7 +26390,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26402,7 +26402,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26464,176 +26464,176 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26641,7 +26641,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26653,7 +26653,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26716,7 +26716,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26728,7 +26728,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26791,7 +26791,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26803,7 +26803,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26866,7 +26866,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26878,7 +26878,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26941,7 +26941,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -26953,7 +26953,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27016,7 +27016,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27028,7 +27028,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27091,7 +27091,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27103,7 +27103,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27166,7 +27166,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27178,7 +27178,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27241,7 +27241,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27253,7 +27253,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27316,7 +27316,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27328,7 +27328,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27391,7 +27391,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27403,7 +27403,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27466,7 +27466,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27478,7 +27478,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27541,7 +27541,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27553,7 +27553,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27616,7 +27616,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27628,7 +27628,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27691,7 +27691,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27703,7 +27703,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27766,7 +27766,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27778,7 +27778,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27841,7 +27841,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27853,7 +27853,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27916,7 +27916,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27928,7 +27928,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -27991,7 +27991,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28003,7 +28003,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28066,7 +28066,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28078,7 +28078,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28141,7 +28141,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28153,7 +28153,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28216,7 +28216,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28228,7 +28228,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28291,7 +28291,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28303,7 +28303,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28366,7 +28366,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28378,7 +28378,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28441,7 +28441,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28453,7 +28453,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28516,7 +28516,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28528,7 +28528,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28591,7 +28591,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28603,7 +28603,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28666,7 +28666,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28678,7 +28678,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28741,7 +28741,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28753,7 +28753,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28816,7 +28816,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28828,7 +28828,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -28838,7 +28838,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -28872,27 +28872,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -28912,17 +28912,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -28938,71 +28938,71 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29010,7 +29010,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29022,7 +29022,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29085,7 +29085,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29097,7 +29097,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29160,7 +29160,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29172,7 +29172,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29224,17 +29224,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -29250,36 +29250,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -29287,7 +29287,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29299,7 +29299,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29351,17 +29351,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -29377,36 +29377,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -29414,7 +29414,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29426,7 +29426,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29436,12 +29436,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -29475,22 +29475,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -29510,32 +29510,32 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
@@ -29551,41 +29551,41 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
@@ -29593,7 +29593,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29605,7 +29605,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29668,7 +29668,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29680,7 +29680,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29690,27 +29690,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -29744,52 +29744,52 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29809,47 +29809,47 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29865,101 +29865,101 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29967,7 +29967,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -29979,7 +29979,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -30042,7 +30042,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -30054,7 +30054,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -30064,27 +30064,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -30118,52 +30118,52 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30183,57 +30183,57 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30249,101 +30249,101 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30351,7 +30351,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -30363,7 +30363,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -30373,27 +30373,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -30427,112 +30427,112 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30552,22 +30552,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -30583,266 +30583,266 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30850,7 +30850,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -30862,7 +30862,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -30872,7 +30872,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
@@ -30906,27 +30906,27 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
@@ -30946,17 +30946,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -30972,36 +30972,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -31009,7 +31009,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31021,7 +31021,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31073,17 +31073,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -31099,36 +31099,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -31136,7 +31136,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31148,7 +31148,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31200,17 +31200,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -31226,36 +31226,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -31263,7 +31263,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31275,7 +31275,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31327,17 +31327,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -31353,36 +31353,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -31390,7 +31390,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31402,7 +31402,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31454,17 +31454,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -31480,36 +31480,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -31517,7 +31517,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31529,7 +31529,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31581,22 +31581,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -31612,36 +31612,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -31649,7 +31649,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31661,7 +31661,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31713,17 +31713,17 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
@@ -31739,36 +31739,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -31776,7 +31776,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31788,7 +31788,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -31798,12 +31798,12 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
@@ -31837,22 +31837,22 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
@@ -31872,32 +31872,32 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
@@ -31913,76 +31913,76 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -31990,7 +31990,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32002,7 +32002,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32065,7 +32065,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32077,7 +32077,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32140,7 +32140,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32152,7 +32152,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32214,36 +32214,36 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
@@ -32251,7 +32251,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32263,7 +32263,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32326,7 +32326,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32338,7 +32338,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32401,7 +32401,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32413,7 +32413,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32476,7 +32476,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32488,7 +32488,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32551,7 +32551,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32563,7 +32563,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32626,7 +32626,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32638,7 +32638,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32701,7 +32701,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32713,7 +32713,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32776,7 +32776,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32788,7 +32788,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32851,7 +32851,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32863,7 +32863,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32926,7 +32926,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -32938,7 +32938,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33001,7 +33001,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33013,7 +33013,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33076,7 +33076,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33088,7 +33088,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33151,7 +33151,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33163,7 +33163,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33226,7 +33226,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33238,7 +33238,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33301,7 +33301,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33313,7 +33313,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33376,7 +33376,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33388,7 +33388,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33451,7 +33451,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33463,7 +33463,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33526,7 +33526,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33538,7 +33538,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33601,7 +33601,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33613,7 +33613,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33676,7 +33676,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33688,7 +33688,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33751,7 +33751,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33763,7 +33763,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33826,7 +33826,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33838,7 +33838,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33901,7 +33901,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33913,7 +33913,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33976,7 +33976,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -33988,7 +33988,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34051,7 +34051,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34063,7 +34063,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34126,7 +34126,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34138,7 +34138,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34201,7 +34201,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34213,7 +34213,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34276,7 +34276,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34288,7 +34288,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34351,7 +34351,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34363,7 +34363,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34426,7 +34426,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34438,7 +34438,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34501,7 +34501,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34513,7 +34513,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34576,7 +34576,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34588,7 +34588,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34651,7 +34651,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34663,7 +34663,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34726,7 +34726,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34738,7 +34738,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34801,7 +34801,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34813,7 +34813,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34876,7 +34876,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34888,7 +34888,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34951,7 +34951,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -34963,7 +34963,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35026,7 +35026,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35038,7 +35038,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35101,7 +35101,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35113,7 +35113,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35176,7 +35176,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35188,7 +35188,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35251,7 +35251,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35263,7 +35263,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35326,7 +35326,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35338,7 +35338,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35401,7 +35401,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35413,7 +35413,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35476,7 +35476,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35488,7 +35488,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35551,7 +35551,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35563,7 +35563,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35626,7 +35626,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35638,7 +35638,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35701,7 +35701,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35713,7 +35713,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35776,7 +35776,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35788,7 +35788,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35851,7 +35851,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35863,7 +35863,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35926,7 +35926,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -35938,7 +35938,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -36001,7 +36001,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -36013,7 +36013,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -36076,7 +36076,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -36088,7 +36088,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -36098,177 +36098,177 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36302,352 +36302,352 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36667,107 +36667,107 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36783,736 +36783,736 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37520,7 +37520,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37532,7 +37532,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37595,7 +37595,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37607,7 +37607,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37670,7 +37670,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37682,7 +37682,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37745,7 +37745,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37757,7 +37757,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37820,7 +37820,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37832,7 +37832,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37895,7 +37895,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37907,7 +37907,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37970,7 +37970,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -37982,7 +37982,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38045,7 +38045,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38057,7 +38057,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38120,7 +38120,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38132,7 +38132,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38195,7 +38195,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38207,7 +38207,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38270,7 +38270,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38282,7 +38282,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38345,7 +38345,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38357,7 +38357,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38420,7 +38420,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38432,7 +38432,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38495,7 +38495,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38507,7 +38507,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38570,7 +38570,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38582,7 +38582,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38645,7 +38645,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38657,7 +38657,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38720,7 +38720,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38732,7 +38732,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38795,7 +38795,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38807,7 +38807,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38870,7 +38870,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38882,7 +38882,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38945,7 +38945,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -38957,7 +38957,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39020,7 +39020,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39032,7 +39032,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39095,7 +39095,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39107,7 +39107,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39170,7 +39170,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39182,7 +39182,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39245,7 +39245,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39257,7 +39257,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39320,7 +39320,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39332,7 +39332,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39395,7 +39395,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39407,7 +39407,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39470,7 +39470,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39482,7 +39482,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39545,7 +39545,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39557,7 +39557,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39620,7 +39620,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39632,7 +39632,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39695,7 +39695,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
@@ -39707,7 +39707,7 @@ XXX: for post 1.4: make sure we can drag & drop widgets." isSpecification="f
- +
diff --git a/krita/doc/doc-outline b/krita/doc/doc-outline index 6f974db6..7e0bcf95 100644 --- a/krita/doc/doc-outline +++ b/krita/doc/doc-outline @@ -62,7 +62,7 @@ The current outline (working towards 1.6): - Layer box - Working with layers ([TODO] expand) - Adjustment layers ([TODO] expand) - - [TODO] Layer masks + - [TODO] Layer tqmasks - Compositing modes ([TODO] expand) - [TODO] Create, transform, combine, histograms, ... @@ -85,7 +85,7 @@ The current outline (working towards 1.6): - [TODO] properties, usage, converting, ... - Commands - - General layout + - General tqlayout - Menus - Toolbars - Palettes @@ -142,7 +142,7 @@ Outline for the 1.5 manual (final as of 2006-05-31): - Available colorspaces - Commands ([TODO] make up-to-date) - - General layout + - General tqlayout - Menus - Toolbars - Palettes diff --git a/krita/doc/histograms.xmi b/krita/doc/histograms.xmi index c7ff1428..1c179778 100644 --- a/krita/doc/histograms.xmi +++ b/krita/doc/histograms.xmi @@ -148,7 +148,7 @@
- +
- + - + @@ -1380,7 +1380,7 @@ like sRGB). - - + - + @@ -2699,7 +2699,7 @@ Doubles are in the 0-1 range, use the producer's positionToString function to di - @@ -3153,7 +3153,7 @@ of choice, and rounded to a reasonable precision to avoid 0.999999" isSpecificat - + @@ -3163,7 +3163,7 @@ of choice, and rounded to a reasonable precision to avoid 0.999999" isSpecificat - + @@ -3171,33 +3171,33 @@ of choice, and rounded to a reasonable precision to avoid 0.999999" isSpecificat - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/krita/doc/hooks b/krita/doc/hooks index 27653a2f..46e0596e 100644 --- a/krita/doc/hooks +++ b/krita/doc/hooks @@ -13,7 +13,7 @@ Thus, if a paint device is of a certain color model, certain GUI things must be activated and deactived when that paint device becomes active. A paint op may need to knwo something about the layer it is going to paint -on: it is not sufficient to generate a mask and have that composited by +on: it is not sufficient to generate a tqmask and have that composited by the color strategy because the footprint may be determined by the deposit and height field that is already present. diff --git a/krita/doc/howtofilters.txt b/krita/doc/howtofilters.txt index 6fca2fc8..a89b393f 100644 --- a/krita/doc/howtofilters.txt +++ b/krita/doc/howtofilters.txt @@ -22,7 +22,7 @@ Just copy the following in a file named (for instance) myfiltercw.ui : kisFilterConfigurationWidget1
- +
And then open Qt/Designer diff --git a/krita/doc/krita-features b/krita/doc/krita-features index 985b2698..0b198165 100644 --- a/krita/doc/krita-features +++ b/krita/doc/krita-features @@ -201,12 +201,12 @@ of a tablet. Tilt and rotation is not yet supported. * Brushes -** gimp brush shapes. Support for colored and grayscale brushes and +** gimp brush tqshapes. Support for colored and grayscale brushes and pipe brushes. Support from Gimp parasites in brushes. -** custom brush shapes -** text brush shapes +** custom brush tqshapes +** text brush tqshapes ** brushes created from layers or images. These brushes can be saved -** colored brushes can also be used as masks +** colored brushes can also be used as tqmasks * Fills diff --git a/krita/doc/krita.pdf b/krita/doc/krita.pdf index ddde5dc4..1073941b 100644 Binary files a/krita/doc/krita.pdf and b/krita/doc/krita.pdf differ diff --git a/krita/doc/krita.xmi b/krita/doc/krita.xmi index 43418ae1..038d9f48 100644 --- a/krita/doc/krita.xmi +++ b/krita/doc/krita.xmi @@ -55,8 +55,8 @@ - - + + @@ -66,7 +66,7 @@ - + @@ -170,7 +170,7 @@ This replaces the KisKrayon facility that used to be present in Krayon." visibil - + @@ -322,7 +322,7 @@ This replaces the KisKrayon facility that used to be present in Krayon." visibil - + @@ -342,7 +342,7 @@ data to rbg for screen rendering." visibility="public" xmi.id="259" name="CMYK" - + @@ -400,10 +400,10 @@ data to rbg for screen rendering." visibility="public" xmi.id="259" name="CMYK" - + - - + + - + - + - + - + - + @@ -645,12 +645,12 @@ of tile in x and y." visibility="public" xmi.id="408" type="void" name="tileCoor - + - @@ -827,12 +827,12 @@ a part of a layer. Layers form an image." visibility="public" xmi.id="481" name - - +provide an iterator over the tqmask, that would be nice, too." visibility="public" xmi.id="634" type="QUANTUM" name="alphaAt" > @@ -860,7 +860,7 @@ provide an iterator over the mask, that would be nice, too." visibility="public" - + @@ -922,16 +922,16 @@ dcop." visibility="public" xmi.id="645" name="KRayonViewIface" > - + - + - + @@ -939,10 +939,10 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + - + @@ -978,17 +978,17 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + - + - + @@ -1050,7 +1050,7 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + @@ -1059,7 +1059,7 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + @@ -1116,15 +1116,15 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - - + + - - + + - - + + @@ -1186,9 +1186,9 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + - + @@ -1208,11 +1208,11 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + - + @@ -1227,7 +1227,7 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + @@ -1247,7 +1247,7 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + @@ -1311,7 +1311,7 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + @@ -1444,14 +1444,14 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - + - + - + @@ -1705,17 +1705,17 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - - + + - + - + @@ -1731,11 +1731,11 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - - + + - + @@ -1839,10 +1839,10 @@ pixels in the brush." visibility="public" xmi.id="705" type="virtual KisAlphaMas - - - - + + + + @@ -1906,11 +1906,11 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + - + @@ -1930,23 +1930,23 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - - + + - + - + - + - + @@ -1959,7 +1959,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2047,13 +2047,13 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + - + @@ -2088,19 +2088,19 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + - + - + @@ -2118,7 +2118,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2128,11 +2128,11 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + - + @@ -2208,7 +2208,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2225,15 +2225,15 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + - + - + @@ -2242,10 +2242,10 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - - + + - + @@ -2286,7 +2286,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2401,7 +2401,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2411,7 +2411,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2434,10 +2434,10 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + - - + + @@ -2445,7 +2445,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2454,7 +2454,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2465,7 +2465,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2499,11 +2499,11 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + - + - + @@ -2548,7 +2548,7 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - + @@ -2562,22 +2562,22 @@ cannot be abstract, because otherwise this class would be abstract." visibility= - - - + + + - - + + - - - + + + - - + + - + - + @@ -2634,9 +2634,9 @@ in the constructor, you have to call loadAsync. @param filename the file name to save and load from." visibility="public" xmi.id="2085" type="virtual " name="~KisResource" /> - + - + @@ -2649,17 +2649,17 @@ in the constructor, you have to call loadAsync. - - + + - + - + @@ -2676,7 +2676,7 @@ in the constructor, you have to call loadAsync. - + @@ -2684,8 +2684,8 @@ in the constructor, you have to call loadAsync. - - + + @@ -2735,7 +2735,7 @@ in the constructor, you have to call loadAsync. - + @@ -2810,7 +2810,7 @@ in the constructor, you have to call loadAsync. - + @@ -2994,7 +2994,7 @@ in the constructor, you have to call loadAsync. - + @@ -3170,7 +3170,7 @@ in the constructor, you have to call loadAsync. - + @@ -3218,16 +3218,16 @@ in the constructor, you have to call loadAsync. - + - - - + + + @@ -3276,9 +3276,9 @@ in the constructor, you have to call loadAsync. - - - + + + @@ -3291,15 +3291,15 @@ in the constructor, you have to call loadAsync. - - + + - + @@ -3354,10 +3354,10 @@ in the constructor, you have to call loadAsync. - - - - + + + + @@ -3526,7 +3526,7 @@ in the constructor, you have to call loadAsync. - + @@ -3536,7 +3536,7 @@ in the constructor, you have to call loadAsync. - + @@ -3629,7 +3629,7 @@ in the constructor, you have to call loadAsync. - + @@ -3714,7 +3714,7 @@ in the constructor, you have to call loadAsync. - + @@ -3838,7 +3838,7 @@ in the constructor, you have to call loadAsync. - + @@ -3873,9 +3873,9 @@ in the constructor, you have to call loadAsync. - - - + + + @@ -3926,16 +3926,16 @@ in the constructor, you have to call loadAsync. - - - - + + + + - + @@ -4008,7 +4008,7 @@ in the constructor, you have to call loadAsync. - + @@ -4019,7 +4019,7 @@ in the constructor, you have to call loadAsync. - + @@ -4032,7 +4032,7 @@ in the constructor, you have to call loadAsync. - + @@ -4116,8 +4116,8 @@ in the constructor, you have to call loadAsync. - - + + @@ -4126,12 +4126,12 @@ in the constructor, you have to call loadAsync. - - - - - - + + + + + + @@ -4263,10 +4263,10 @@ in the constructor, you have to call loadAsync. - - - - + + + + @@ -4359,7 +4359,7 @@ in the constructor, you have to call loadAsync. - + @@ -4485,7 +4485,7 @@ in the constructor, you have to call loadAsync. - + @@ -4535,11 +4535,11 @@ in the constructor, you have to call loadAsync. - - - - - + + + + + @@ -4929,7 +4929,7 @@ in the constructor, you have to call loadAsync. - +
@@ -4947,12 +4947,12 @@ in the constructor, you have to call loadAsync.
- +
- +
@@ -4965,7 +4965,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -4983,117 +4983,117 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5105,101 +5105,101 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5207,7 +5207,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5225,57 +5225,57 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5287,56 +5287,56 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5344,7 +5344,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5369,7 +5369,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5394,7 +5394,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5412,97 +5412,97 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5514,81 +5514,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5596,7 +5596,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5614,32 +5614,32 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
@@ -5651,61 +5651,61 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5713,7 +5713,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5731,67 +5731,67 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5804,7 +5804,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5822,62 +5822,62 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5889,71 +5889,71 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5961,7 +5961,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -5979,87 +5979,87 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6071,61 +6071,61 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6133,7 +6133,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -6151,47 +6151,47 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6203,81 +6203,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6285,7 +6285,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -6303,37 +6303,37 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
@@ -6345,21 +6345,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -6367,7 +6367,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -6385,37 +6385,37 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
@@ -6427,21 +6427,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -6449,7 +6449,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -6467,127 +6467,127 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6599,141 +6599,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6741,7 +6741,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -6759,267 +6759,267 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7031,176 +7031,176 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7208,7 +7208,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -7226,97 +7226,97 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7328,96 +7328,96 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7425,7 +7425,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -7443,72 +7443,72 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7520,36 +7520,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -7557,7 +7557,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -7575,52 +7575,52 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -7632,36 +7632,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -7669,7 +7669,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -7687,332 +7687,332 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8024,311 +8024,311 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8336,7 +8336,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -8361,7 +8361,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -8379,72 +8379,72 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8456,81 +8456,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8538,7 +8538,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -8556,67 +8556,67 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8628,41 +8628,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -8670,7 +8670,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -8688,37 +8688,37 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
@@ -8730,21 +8730,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -8752,7 +8752,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -8770,87 +8770,87 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8859,84 +8859,84 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -8944,7 +8944,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -8962,122 +8962,122 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9089,21 +9089,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -9111,7 +9111,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -9129,47 +9129,47 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9181,21 +9181,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -9203,7 +9203,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -9221,217 +9221,217 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9443,291 +9443,291 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9735,7 +9735,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -9753,17 +9753,17 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
@@ -9776,7 +9776,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -9794,27 +9794,27 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
@@ -9826,36 +9826,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -9863,7 +9863,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -9881,57 +9881,57 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -9943,41 +9943,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -9985,7 +9985,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -10003,62 +10003,62 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10070,81 +10070,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10152,7 +10152,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -10170,102 +10170,102 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10278,7 +10278,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -10296,252 +10296,252 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10553,256 +10553,256 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10810,7 +10810,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -10828,162 +10828,162 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -10995,151 +10995,151 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11147,7 +11147,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -11165,432 +11165,432 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11602,256 +11602,256 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -11859,7 +11859,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -11877,132 +11877,132 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12015,7 +12015,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12033,72 +12033,72 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12110,21 +12110,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -12132,7 +12132,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12150,27 +12150,27 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
@@ -12183,7 +12183,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12201,77 +12201,77 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12283,81 +12283,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12365,7 +12365,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12383,92 +12383,92 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12481,7 +12481,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12499,107 +12499,107 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12612,7 +12612,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12630,27 +12630,27 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
@@ -12662,36 +12662,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -12699,7 +12699,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12717,52 +12717,52 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12774,71 +12774,71 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -12846,7 +12846,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -12864,772 +12864,772 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -13641,671 +13641,671 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14313,7 +14313,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -14331,562 +14331,562 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -14898,431 +14898,431 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15330,9 +15330,9 @@ in the constructor, you have to call loadAsync.
- + - +
@@ -15348,157 +15348,157 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15510,141 +15510,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15652,7 +15652,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -15670,47 +15670,47 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15722,41 +15722,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -15764,7 +15764,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -15782,7 +15782,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -15795,7 +15795,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -15813,62 +15813,62 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -15881,7 +15881,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -15899,32 +15899,32 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
@@ -15937,7 +15937,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -15955,47 +15955,47 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16004,11 +16004,11 @@ in the constructor, you have to call loadAsync.
- +
- +
@@ -16026,147 +16026,147 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16178,176 +16178,176 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16355,7 +16355,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -16373,357 +16373,357 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -16735,351 +16735,351 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17087,7 +17087,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -17105,142 +17105,142 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17252,141 +17252,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17394,7 +17394,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -17412,117 +17412,117 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17534,131 +17534,131 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17666,7 +17666,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -17684,132 +17684,132 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17821,121 +17821,121 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -17943,7 +17943,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -17961,47 +17961,47 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18013,41 +18013,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -18055,7 +18055,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -18073,92 +18073,92 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18170,101 +18170,101 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18272,7 +18272,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -18290,117 +18290,117 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18412,141 +18412,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18554,7 +18554,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -18572,177 +18572,177 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18754,141 +18754,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18896,7 +18896,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -18914,57 +18914,57 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -18977,7 +18977,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -18995,142 +18995,142 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19142,176 +19142,176 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19319,7 +19319,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -19344,7 +19344,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -19362,127 +19362,127 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19494,36 +19494,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -19531,7 +19531,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -19549,77 +19549,77 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19631,36 +19631,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -19668,7 +19668,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -19686,67 +19686,67 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19758,91 +19758,91 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -19850,7 +19850,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -19868,32 +19868,32 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
@@ -19906,7 +19906,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -19924,32 +19924,32 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
@@ -19962,7 +19962,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -19980,217 +19980,217 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20202,61 +20202,61 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -20264,7 +20264,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -20282,1317 +20282,1317 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -21604,1776 +21604,1776 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23387,7 +23387,7 @@ in the constructor, you have to call loadAsync. - +
@@ -23414,7 +23414,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -23471,7 +23471,7 @@ in the constructor, you have to call loadAsync. - +
@@ -23528,7 +23528,7 @@ in the constructor, you have to call loadAsync. - +
@@ -23605,7 +23605,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -23632,7 +23632,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -23689,47 +23689,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23786,22 +23786,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -23822,27 +23822,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -23876,52 +23876,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -23954,101 +23954,101 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -24056,7 +24056,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24083,7 +24083,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24098,7 +24098,7 @@ in the constructor, you have to call loadAsync. - +
@@ -24138,27 +24138,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -24172,22 +24172,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -24259,7 +24259,7 @@ in the constructor, you have to call loadAsync. - +
@@ -24293,12 +24293,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -24331,56 +24331,56 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -24388,7 +24388,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24415,7 +24415,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24594,7 +24594,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24621,7 +24621,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24800,7 +24800,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24827,7 +24827,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -24884,57 +24884,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25006,22 +25006,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -25055,42 +25055,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -25123,81 +25123,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25205,7 +25205,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -25232,7 +25232,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -25247,17 +25247,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -25297,32 +25297,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -25457,61 +25457,61 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25519,7 +25519,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -25546,7 +25546,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -25603,57 +25603,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -25710,12 +25710,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -25792,7 +25792,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -25819,7 +25819,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -25834,7 +25834,7 @@ in the constructor, you have to call loadAsync. - +
@@ -25874,27 +25874,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -25908,27 +25908,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -25985,12 +25985,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -26066,71 +26066,71 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26138,7 +26138,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -26165,7 +26165,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -26222,57 +26222,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26344,17 +26344,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -26388,32 +26388,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -26446,61 +26446,61 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26508,7 +26508,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -26535,7 +26535,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -26550,22 +26550,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -26605,42 +26605,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -26654,7 +26654,7 @@ in the constructor, you have to call loadAsync. - +
@@ -26781,81 +26781,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -26863,7 +26863,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -26890,7 +26890,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -26947,22 +26947,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -27019,7 +27019,7 @@ in the constructor, you have to call loadAsync. - +
@@ -27040,7 +27040,7 @@ in the constructor, you have to call loadAsync. - +
@@ -27074,12 +27074,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -27112,21 +27112,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -27134,7 +27134,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -27161,7 +27161,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -27218,27 +27218,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -27310,7 +27310,7 @@ in the constructor, you have to call loadAsync. - +
@@ -27344,12 +27344,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -27382,21 +27382,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -27404,7 +27404,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -27431,7 +27431,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -27488,47 +27488,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -27585,12 +27585,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -27611,37 +27611,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -27675,72 +27675,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -27773,141 +27773,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -27915,7 +27915,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -27942,7 +27942,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -27957,7 +27957,7 @@ in the constructor, you have to call loadAsync. - +
@@ -27997,27 +27997,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -28031,152 +28031,152 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -28233,22 +28233,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -28269,37 +28269,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -28333,72 +28333,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -28431,176 +28431,176 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -28608,7 +28608,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -28635,7 +28635,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -28650,7 +28650,7 @@ in the constructor, you have to call loadAsync. - +
@@ -28690,27 +28690,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -28724,32 +28724,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -28806,12 +28806,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -28832,17 +28832,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -28876,32 +28876,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -28934,96 +28934,96 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29031,7 +29031,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -29058,7 +29058,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -29073,7 +29073,7 @@ in the constructor, you have to call loadAsync. - +
@@ -29113,27 +29113,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -29147,47 +29147,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29314,36 +29314,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -29351,7 +29351,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -29378,7 +29378,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -29393,7 +29393,7 @@ in the constructor, you have to call loadAsync. - +
@@ -29433,27 +29433,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -29467,27 +29467,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -29614,36 +29614,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -29651,7 +29651,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -29678,9 +29678,9 @@ in the constructor, you have to call loadAsync.
- +
- +
@@ -29693,12 +29693,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -29738,52 +29738,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29797,147 +29797,147 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -29994,17 +29994,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -30025,62 +30025,62 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30114,122 +30114,122 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30262,311 +30262,311 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -30574,7 +30574,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -30601,7 +30601,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -30780,7 +30780,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -30807,7 +30807,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -30864,32 +30864,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -30961,22 +30961,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -31010,42 +31010,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -31078,81 +31078,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -31160,7 +31160,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -31187,7 +31187,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -31244,42 +31244,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -31336,7 +31336,7 @@ in the constructor, you have to call loadAsync. - +
@@ -31357,12 +31357,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -31396,22 +31396,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -31444,41 +31444,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -31486,7 +31486,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -31513,7 +31513,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -31621,27 +31621,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -31662,7 +31662,7 @@ in the constructor, you have to call loadAsync. - +
@@ -31696,12 +31696,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -31734,21 +31734,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -31756,7 +31756,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -31783,7 +31783,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -31840,37 +31840,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -31927,12 +31927,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -31953,22 +31953,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -32002,42 +32002,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -32067,84 +32067,84 @@ in the constructor, you have to call loadAsync.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -32152,7 +32152,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -32179,7 +32179,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -32287,112 +32287,112 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -32413,7 +32413,7 @@ in the constructor, you have to call loadAsync. - +
@@ -32447,12 +32447,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -32485,21 +32485,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -32507,7 +32507,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -32534,7 +32534,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -32642,37 +32642,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -32693,7 +32693,7 @@ in the constructor, you have to call loadAsync. - +
@@ -32727,12 +32727,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -32765,21 +32765,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -32787,7 +32787,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -32814,7 +32814,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -32829,12 +32829,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -32874,52 +32874,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -32933,52 +32933,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33035,7 +33035,7 @@ in the constructor, you have to call loadAsync. - +
@@ -33056,57 +33056,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33140,112 +33140,112 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33278,291 +33278,291 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -33570,7 +33570,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -33597,7 +33597,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -33654,17 +33654,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -33792,7 +33792,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -33819,7 +33819,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -33834,7 +33834,7 @@ in the constructor, you have to call loadAsync. - +
@@ -33874,27 +33874,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -34029,36 +34029,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -34066,7 +34066,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -34093,7 +34093,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -34150,32 +34150,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -34232,7 +34232,7 @@ in the constructor, you have to call loadAsync. - +
@@ -34253,12 +34253,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -34292,22 +34292,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -34340,41 +34340,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -34382,7 +34382,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -34409,7 +34409,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -34424,22 +34424,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -34479,42 +34479,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -34528,22 +34528,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -34670,81 +34670,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -34752,7 +34752,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -34779,7 +34779,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -34836,92 +34836,92 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -34978,12 +34978,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -35060,7 +35060,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -35087,7 +35087,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -35102,7 +35102,7 @@ in the constructor, you have to call loadAsync. - +
@@ -35142,27 +35142,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -35176,112 +35176,112 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -35338,7 +35338,7 @@ in the constructor, you have to call loadAsync. - +
@@ -35359,57 +35359,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -35443,112 +35443,112 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -35581,256 +35581,256 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -35838,7 +35838,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -35865,7 +35865,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -35880,12 +35880,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -35925,52 +35925,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -35984,72 +35984,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36121,22 +36121,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -36170,42 +36170,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -36238,151 +36238,151 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36390,7 +36390,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -36417,7 +36417,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -36432,7 +36432,7 @@ in the constructor, you have to call loadAsync. - +
@@ -36472,27 +36472,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -36506,222 +36506,222 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36778,77 +36778,77 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36869,57 +36869,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -36953,112 +36953,112 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37091,256 +37091,256 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37348,7 +37348,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -37375,7 +37375,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -37432,132 +37432,132 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37685,7 +37685,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -37712,7 +37712,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -37769,52 +37769,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -37871,12 +37871,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -37897,7 +37897,7 @@ in the constructor, you have to call loadAsync. - +
@@ -37931,12 +37931,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -37969,21 +37969,21 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -37991,7 +37991,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38018,7 +38018,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38075,17 +38075,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -38142,12 +38142,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -38224,7 +38224,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38251,7 +38251,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38308,37 +38308,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -38410,22 +38410,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -38459,42 +38459,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -38527,81 +38527,81 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -38609,7 +38609,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38636,7 +38636,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38693,92 +38693,92 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -38906,7 +38906,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38933,7 +38933,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -38990,97 +38990,97 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39137,12 +39137,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -39219,7 +39219,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -39246,7 +39246,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -39261,7 +39261,7 @@ in the constructor, you have to call loadAsync. - +
@@ -39301,27 +39301,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -39456,36 +39456,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -39493,7 +39493,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -39520,7 +39520,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -39535,12 +39535,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -39580,52 +39580,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39760,71 +39760,71 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39832,7 +39832,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -39859,7 +39859,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -39874,12 +39874,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -39919,52 +39919,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -39978,402 +39978,402 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -40430,22 +40430,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -40466,152 +40466,152 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -40645,302 +40645,302 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -40973,671 +40973,671 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -41645,7 +41645,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -41672,7 +41672,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -41687,12 +41687,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -41732,52 +41732,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -41791,312 +41791,312 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -42153,22 +42153,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -42189,92 +42189,92 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -42308,182 +42308,182 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -42516,431 +42516,431 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -42948,14 +42948,14 @@ in the constructor, you have to call loadAsync.
- +
- +
@@ -42975,7 +42975,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -43032,87 +43032,87 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -43184,37 +43184,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -43248,72 +43248,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -43346,141 +43346,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -43488,7 +43488,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -43515,7 +43515,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -43572,27 +43572,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -43664,12 +43664,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -43703,22 +43703,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -43751,41 +43751,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -43793,7 +43793,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -43820,7 +43820,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -43877,7 +43877,7 @@ in the constructor, you have to call loadAsync. - +
@@ -44005,7 +44005,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -44032,7 +44032,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -44089,62 +44089,62 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -44272,7 +44272,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -44299,7 +44299,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -44356,22 +44356,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -44428,12 +44428,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -44510,7 +44510,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -44537,7 +44537,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -44594,47 +44594,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -44758,11 +44758,11 @@ in the constructor, you have to call loadAsync.
- +
- +
@@ -44789,7 +44789,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -44804,7 +44804,7 @@ in the constructor, you have to call loadAsync. - +
@@ -44844,27 +44844,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -44878,47 +44878,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -44975,7 +44975,7 @@ in the constructor, you have to call loadAsync. - +
@@ -44996,37 +44996,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -45060,72 +45060,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -45158,176 +45158,176 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -45335,7 +45335,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -45362,7 +45362,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -45377,12 +45377,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -45422,52 +45422,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -45481,142 +45481,142 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -45673,27 +45673,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -45714,72 +45714,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -45813,142 +45813,142 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -45981,351 +45981,351 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -46333,7 +46333,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -46360,7 +46360,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -46417,72 +46417,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -46554,37 +46554,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -46618,72 +46618,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -46716,141 +46716,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -46858,7 +46858,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -46885,7 +46885,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -46900,12 +46900,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -46945,52 +46945,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -47004,37 +47004,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -47106,17 +47106,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -47150,32 +47150,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -47208,131 +47208,131 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -47340,7 +47340,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -47367,7 +47367,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -47424,57 +47424,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -47531,17 +47531,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -47562,32 +47562,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -47621,62 +47621,62 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -47709,121 +47709,121 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -47831,7 +47831,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -47858,7 +47858,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -47915,22 +47915,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -47987,7 +47987,7 @@ in the constructor, you have to call loadAsync. - +
@@ -48008,12 +48008,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -48047,22 +48047,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -48095,41 +48095,41 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -48137,7 +48137,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -48164,7 +48164,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -48221,42 +48221,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -48328,27 +48328,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -48382,52 +48382,52 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -48460,101 +48460,101 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -48562,7 +48562,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -48589,7 +48589,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -48646,47 +48646,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -48758,37 +48758,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -48822,72 +48822,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -48920,141 +48920,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -49062,7 +49062,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -49089,7 +49089,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -49146,87 +49146,87 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -49283,22 +49283,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -49319,37 +49319,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -49383,72 +49383,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -49481,141 +49481,141 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -49623,7 +49623,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -49650,7 +49650,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -49707,57 +49707,57 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -49885,7 +49885,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -49912,7 +49912,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -49927,7 +49927,7 @@ in the constructor, you have to call loadAsync. - +
@@ -49967,27 +49967,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -50001,47 +50001,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -50113,37 +50113,37 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -50177,72 +50177,72 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -50275,176 +50275,176 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -50452,7 +50452,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -50479,7 +50479,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -50658,7 +50658,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -50685,7 +50685,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -50700,7 +50700,7 @@ in the constructor, you have to call loadAsync. - +
@@ -50740,27 +50740,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -50774,92 +50774,92 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -50916,12 +50916,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -50997,36 +50997,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -51034,7 +51034,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -51061,7 +51061,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -51076,7 +51076,7 @@ in the constructor, you have to call loadAsync. - +
@@ -51116,27 +51116,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -51150,42 +51150,42 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
@@ -51242,12 +51242,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -51323,36 +51323,36 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
@@ -51360,7 +51360,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -51387,7 +51387,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -51402,7 +51402,7 @@ in the constructor, you have to call loadAsync. - +
@@ -51442,27 +51442,27 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
@@ -51476,22 +51476,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -51548,12 +51548,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -51574,7 +51574,7 @@ in the constructor, you have to call loadAsync. - +
@@ -51608,12 +51608,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -51646,91 +51646,91 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -51738,7 +51738,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -51765,7 +51765,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -51822,22 +51822,22 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
@@ -51894,12 +51894,12 @@ in the constructor, you have to call loadAsync. - +
- +
@@ -51976,7 +51976,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -52003,7 +52003,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -52060,32 +52060,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -52213,7 +52213,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -52240,7 +52240,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -52297,187 +52297,187 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -52549,17 +52549,17 @@ in the constructor, you have to call loadAsync. - +
- +
- +
@@ -52593,32 +52593,32 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
@@ -52651,61 +52651,61 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -52713,7 +52713,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -52740,7 +52740,7 @@ in the constructor, you have to call loadAsync.
- +
@@ -52755,47 +52755,47 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -52835,227 +52835,227 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -53069,67 +53069,67 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -53186,297 +53186,297 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -53497,367 +53497,367 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -53891,732 +53891,732 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -54649,1776 +54649,1776 @@ in the constructor, you have to call loadAsync. - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/krita/doc/manual/krita.kwd b/krita/doc/manual/krita.kwd index d076bfc6..9dd7bdb3 100644 Binary files a/krita/doc/manual/krita.kwd and b/krita/doc/manual/krita.kwd differ diff --git a/krita/doc/paint_device.txt b/krita/doc/paint_device.txt index b68979dc..977ec512 100644 --- a/krita/doc/paint_device.txt +++ b/krita/doc/paint_device.txt @@ -59,7 +59,7 @@ per channel; QUANTUM can be bigger. Fill the buf with the data. x1, y1, x2, y2 are the top left and bottom right corner of the section you want. stride is the width of the section in bytes, i.e. (x2 - x1 + 1) * depth. Note that stride does -not need to be pre-multiplied with sizeof(QUANTUM), apparently. +not need to be pre-multiplied with sizeof(QUANTUM), aptqparently. tilemgr -> readPixelData(x1, y1, x2, y2, buf, stride); diff --git a/krita/doc/palettedesign.txt b/krita/doc/palettedesign.txt index 549264a7..9dc2cfab 100644 --- a/krita/doc/palettedesign.txt +++ b/krita/doc/palettedesign.txt @@ -2,7 +2,7 @@ Requirements * Flexible: plugins should be able to add palettes or palette tabs * Connected: palette tabs should be able to connect to the main application - using signals and slots + using Q_SIGNALS and Q_SLOTS * Configurable: palette widgets should be drag & droppable from palette to palette, and from palette to void to create a new palette. * Persistent: the palette configuration of a view should be persisted diff --git a/krita/doc/sdk b/krita/doc/sdk index 6ca1fbe9..9847749d 100644 --- a/krita/doc/sdk +++ b/krita/doc/sdk @@ -6,5 +6,5 @@ not include anything from krita/core, but only the headers from krita/sdk. Problem: creating new paint devices, layers and images. You cannot, obviously, instantiate an interface, and we should not, equally obvious, code against implementations. The solution is a factory class that is made available to -the plugin when it is created -- i.e, the parent class of a plugin should +the plugin when it is created -- i.e, the tqparent class of a plugin should implement the various factory interfaces for paint devices, images and layers. diff --git a/krita/doc/selections b/krita/doc/selections index 4db934fc..65def462 100644 --- a/krita/doc/selections +++ b/krita/doc/selections @@ -5,7 +5,7 @@ class and the associated rectangular marque rendering code. If you find anything connected with that after I finish coding the new selections scheme, it's something I forgot. -Selections in Krita are special paint devices as big as their parent +Selections in Krita are special paint devices as big as their tqparent layer. The selection has the alpha colour strategy. The alpha channel contains the selectedness of a pixel. It is not a binary value, but a scale, hardcoded to 8 bits unsigned @@ -34,7 +34,7 @@ selected. Values in between are semi selected Other representations of selections are possible: the selection for a particular rect is rendered as a separate step in -KisImage::renderToProjection. I like the mask type rendering, but +KisImage::renderToProjection. I like the tqmask type rendering, but someone else might want to provide an optional marque-rendering. TODO: * enable kconfig option to select between renderings. @@ -74,7 +74,7 @@ Use cases: fills (gradient, pattern, color), filtering. Fills are easiest implemented by creating a filled paint device for the rect covered by the selection, and then, while composting the fill -with the target layer, pass the mask to the compositing loop, and skip +with the target layer, pass the tqmask to the compositing loop, and skip un-selected pixels. XXX: Discuss whether this is true @@ -117,7 +117,7 @@ discarded. If a transform is applied to a image, all layers are transformed. The selection is transformed, too: in the new situation, the layer that has a -selection active still has a selection, but the shape of the selection is +selection active still has a selection, but the tqshape of the selection is transformed. If a layer is moved, the selection moves with the layer (this is not diff --git a/krita/doc/the preview widget b/krita/doc/the preview widget index a403da86..cc06b9de 100644 --- a/krita/doc/the preview widget +++ b/krita/doc/the preview widget @@ -2,7 +2,7 @@ On Tuesday 21 June 2005 14:16, Casper Boemann wrote: > Hi > -> As you might have noticed I have changed the layout of the preview, to lo= +> As you might have noticed I have changed the tqlayout of the preview, to lo= ok > more like digikam. > diff --git a/krita/kritacolor/colorspaces/kis_alpha_colorspace.cc b/krita/kritacolor/colorspaces/kis_alpha_colorspace.cc index 01f8ec00..4b54556f 100644 --- a/krita/kritacolor/colorspaces/kis_alpha_colorspace.cc +++ b/krita/kritacolor/colorspaces/kis_alpha_colorspace.cc @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -35,12 +35,12 @@ #include "kis_integer_maths.h" namespace { - const Q_UINT8 PIXEL_MASK = 0; + const TQ_UINT8 PIXEL_MASK = 0; } -KisAlphaColorSpace::KisAlphaColorSpace(KisColorSpaceFactoryRegistry * parent, +KisAlphaColorSpace::KisAlphaColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : - KisU8BaseColorSpace(KisID("ALPHA", i18n("Alpha mask")), TYPE_GRAY_8, icSigGrayData, parent, p) + KisU8BaseColorSpace(KisID("ALPHA", i18n("Alpha tqmask")), TYPE_GRAY_8, icSigGrayData, tqparent, p) { m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 0, KisChannelInfo::ALPHA, KisChannelInfo::UINT8)); m_alphaPos = 0; @@ -50,42 +50,42 @@ KisAlphaColorSpace::~KisAlphaColorSpace() { } -void KisAlphaColorSpace::fromQColor(const QColor& /*c*/, Q_UINT8 *dst, KisProfile * /*profile*/) +void KisAlphaColorSpace::fromTQColor(const TQColor& /*c*/, TQ_UINT8 *dst, KisProfile * /*profile*/) { dst[PIXEL_MASK] = OPACITY_OPAQUE; } -void KisAlphaColorSpace::fromQColor(const QColor& /*c*/, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * /*profile*/) +void KisAlphaColorSpace::fromTQColor(const TQColor& /*c*/, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * /*profile*/) { dst[PIXEL_MASK] = opacity; } -void KisAlphaColorSpace::getAlpha(const Q_UINT8 *pixel, Q_UINT8 *alpha) const +void KisAlphaColorSpace::getAlpha(const TQ_UINT8 *pixel, TQ_UINT8 *alpha) const { *alpha = *pixel; } -void KisAlphaColorSpace::toQColor(const Q_UINT8 */*src*/, QColor *c, KisProfile * /*profile*/) +void KisAlphaColorSpace::toTQColor(const TQ_UINT8 */*src*/, TQColor *c, KisProfile * /*profile*/) { c->setRgb(255, 255, 255); } -void KisAlphaColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * /*profile*/) +void KisAlphaColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * /*profile*/) { c->setRgb(255, 255, 255); *opacity = src[PIXEL_MASK]; } -Q_UINT8 KisAlphaColorSpace::difference(const Q_UINT8 *src1, const Q_UINT8 *src2) +TQ_UINT8 KisAlphaColorSpace::difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2) { // Arithmetic operands smaller than int are converted to int automatically - return QABS(src2[PIXEL_MASK] - src1[PIXEL_MASK]); + return TQABS(src2[PIXEL_MASK] - src1[PIXEL_MASK]); } -void KisAlphaColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisAlphaColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { if (nColors > 0) { - Q_UINT32 total = 0; + TQ_UINT32 total = 0; while(nColors) { @@ -96,25 +96,25 @@ void KisAlphaColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weight } } -QValueVector KisAlphaColorSpace::channels() const +TQValueVector KisAlphaColorSpace::channels() const { return m_channels; } -bool KisAlphaColorSpace::convertPixelsTo(const Q_UINT8 *src, - Q_UINT8 *dst, KisAbstractColorSpace * dstColorSpace, - Q_UINT32 numPixels, - Q_INT32 /*renderingIntent*/) +bool KisAlphaColorSpace::convertPixelsTo(const TQ_UINT8 *src, + TQ_UINT8 *dst, KisAbstractColorSpace * dstColorSpace, + TQ_UINT32 numPixels, + TQ_INT32 /*renderingIntent*/) { // No lcms trickery here, we are only a opacity channel - Q_INT32 size = dstColorSpace->pixelSize(); + TQ_INT32 size = dstColorSpace->pixelSize(); - Q_UINT32 j = 0; - Q_UINT32 i = 0; + TQ_UINT32 j = 0; + TQ_UINT32 i = 0; while ( i < numPixels ) { - dstColorSpace->fromQColor(Qt::red, OPACITY_OPAQUE - *(src + i), (dst + j)); + dstColorSpace->fromTQColor(TQt::red, OPACITY_OPAQUE - *(src + i), (dst + j)); i += 1; j += size; @@ -125,33 +125,33 @@ bool KisAlphaColorSpace::convertPixelsTo(const Q_UINT8 *src, } -//XXX bitblt of ColorSpaceAlpha does not take mask into consideration as this is probably not +//XXX bitblt of ColorSpaceAlpha does not take tqmask into consideration as this is probably not // used ever -void KisAlphaColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dststride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisAlphaColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dststride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { - Q_UINT8 *d; - const Q_UINT8 *s; - Q_INT32 i; - Q_INT32 linesize; + TQ_UINT8 *d; + const TQ_UINT8 *s; + TQ_INT32 i; + TQ_INT32 linesize; if (rows <= 0 || cols <= 0) return; switch (op.op()) { case COMPOSITE_COPY: - compositeCopy(dst, dststride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity); + compositeCopy(dst, dststride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity); return; case COMPOSITE_CLEAR: - linesize = sizeof(Q_UINT8) * cols; + linesize = sizeof(TQ_UINT8) * cols; d = dst; while (rows-- > 0) { memset(d, OPACITY_TRANSPARENT, linesize); @@ -258,30 +258,30 @@ KisCompositeOpList KisAlphaColorSpace::userVisiblecompositeOps() const return list; } -QString KisAlphaColorSpace::channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const +TQString KisAlphaColorSpace::channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(pixel[channelPosition]); + return TQString().setNum(pixel[channelPosition]); } -QString KisAlphaColorSpace::normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const +TQString KisAlphaColorSpace::normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(static_cast(pixel[channelPosition]) / UINT8_MAX); + return TQString().setNum(static_cast(pixel[channelPosition]) / UINT8_MAX); } -void KisAlphaColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisAlphaColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalAlpha = 0; + TQ_INT32 totalAlpha = 0; while (nColors--) { - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { totalAlpha += (*colors)[PIXEL_MASK] * weight; @@ -291,6 +291,6 @@ void KisAlphaColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - dst[PIXEL_MASK] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX); + dst[PIXEL_MASK] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX); } } diff --git a/krita/kritacolor/colorspaces/kis_alpha_colorspace.h b/krita/kritacolor/colorspaces/kis_alpha_colorspace.h index a2113cce..dd4f3916 100644 --- a/krita/kritacolor/colorspaces/kis_alpha_colorspace.h +++ b/krita/kritacolor/colorspaces/kis_alpha_colorspace.h @@ -18,18 +18,18 @@ #ifndef KIS_COLORSPACE_ALPHA_H_ #define KIS_COLORSPACE_ALPHA_H_ -#include +#include #include "kis_global.h" #include "kis_u8_base_colorspace.h" /** - * The alpha mask is a special color strategy that treats all pixels as - * alpha value with a colour common to the mask. The default color is white. + * The alpha tqmask is a special color strategy that treats all pixels as + * alpha value with a colour common to the tqmask. The default color is white. */ class KisAlphaColorSpace : public KisU8BaseColorSpace { public: - KisAlphaColorSpace(KisColorSpaceFactoryRegistry * parent, + KisAlphaColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisAlphaColorSpace(); @@ -39,26 +39,26 @@ public: return false; }; - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void getAlpha(const Q_UINT8 *pixel, Q_UINT8 *alpha) const; + virtual void getAlpha(const TQ_UINT8 *pixel, TQ_UINT8 *alpha) const; - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; + virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const { return 1; }; - virtual Q_UINT32 nColorChannels() const { return 0; }; - virtual Q_UINT32 pixelSize() const { return 1; }; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const { return 1; }; + virtual TQ_UINT32 nColorChannels() const { return 0; }; + virtual TQ_UINT32 pixelSize() const { return 1; }; - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; protected: @@ -68,22 +68,22 @@ protected: * * Returns false if the conversion failed, true if it succeeded */ - virtual bool convertPixelsTo(const Q_UINT8 *src, - Q_UINT8 *dst, KisAbstractColorSpace * dstColorSpace, - Q_UINT32 numPixels, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL); - - - - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dststride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual bool convertPixelsTo(const TQ_UINT8 *src, + TQ_UINT8 *dst, KisAbstractColorSpace * dstColorSpace, + TQ_UINT32 numPixels, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL); + + + + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dststride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); KisCompositeOpList userVisiblecompositeOps() const; diff --git a/krita/kritacolor/colorspaces/kis_lab_colorspace.cc b/krita/kritacolor/colorspaces/kis_lab_colorspace.cc index ec370bb3..829b4f27 100644 --- a/krita/kritacolor/colorspaces/kis_lab_colorspace.cc +++ b/krita/kritacolor/colorspaces/kis_lab_colorspace.cc @@ -24,7 +24,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -33,18 +33,18 @@ #include "kis_color_conversions.h" #include "kis_integer_maths.h" -KisLabColorSpace::KisLabColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) +KisLabColorSpace::KisLabColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : KisU16BaseColorSpace(KisID("LABA", i18n("L*a*b* (16-bit integer/channel)")), COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1), - icSigLabData, parent, p) + icSigLabData, tqparent, p) { - m_channels.push_back(new KisChannelInfo(i18n("Lightness"), i18n("L"), CHANNEL_L * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(100,100,100))); - m_channels.push_back(new KisChannelInfo(i18n("a*"), i18n("a"), CHANNEL_A * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(150,150,150))); - m_channels.push_back(new KisChannelInfo(i18n("b*"), i18n("b"), CHANNEL_B * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(200,200,200))); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), CHANNEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16))); + m_channels.push_back(new KisChannelInfo(i18n("Lightness"), i18n("L"), CHANNEL_L * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(100,100,100))); + m_channels.push_back(new KisChannelInfo(i18n("a*"), i18n("a"), CHANNEL_A * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(150,150,150))); + m_channels.push_back(new KisChannelInfo(i18n("b*"), i18n("b"), CHANNEL_B * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(200,200,200))); + m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), CHANNEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16))); - m_alphaPos = CHANNEL_ALPHA * sizeof(Q_UINT16); + m_alphaPos = CHANNEL_ALPHA * sizeof(TQ_UINT16); init(); } @@ -53,21 +53,21 @@ KisLabColorSpace::~KisLabColorSpace() { } -Q_UINT8 * KisLabColorSpace::toLabA16(const Q_UINT8 * data, const Q_UINT32 nPixels) const +TQ_UINT8 * KisLabColorSpace::toLabA16(const TQ_UINT8 * data, const TQ_UINT32 nPixels) const { - Q_UINT8 * pixels = new Q_UINT8[nPixels * pixelSize()]; + TQ_UINT8 * pixels = new TQ_UINT8[nPixels * pixelSize()]; memcpy( pixels, data, nPixels * pixelSize() ); return pixels; } -Q_UINT8 * KisLabColorSpace::fromLabA16(const Q_UINT8 * labData, const Q_UINT32 nPixels) const +TQ_UINT8 * KisLabColorSpace::fromLabA16(const TQ_UINT8 * labData, const TQ_UINT32 nPixels) const { - Q_UINT8 * pixels = new Q_UINT8[nPixels * pixelSize()]; + TQ_UINT8 * pixels = new TQ_UINT8[nPixels * pixelSize()]; memcpy( pixels, labData, nPixels * pixelSize() ); return pixels; } -Q_UINT8 KisLabColorSpace::difference(const Q_UINT8 *src1, const Q_UINT8 *src2) +TQ_UINT8 KisLabColorSpace::difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2) { cmsCIELab labF1, labF2; @@ -80,18 +80,18 @@ Q_UINT8 KisLabColorSpace::difference(const Q_UINT8 *src1, const Q_UINT8 *src2) if(diff>255) return 255; else - return Q_INT8(diff); + return TQ_INT8(diff); } -void KisLabColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisLabColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalLightness = 0, totalAlpha = 0; - Q_UINT32 totala = 0, totalb = 0; + TQ_UINT32 totalLightness = 0, totalAlpha = 0; + TQ_UINT32 totala = 0, totalb = 0; while (nColors--) { const Pixel *color = reinterpret_cast( *colors ); - Q_UINT32 alphaTimesWeight = UINT8_MULT(color->alpha, *weights); + TQ_UINT32 alphaTimesWeight = UINT8_MULT(color->alpha, *weights); totalLightness += color->lightness * alphaTimesWeight; totala += color->a * alphaTimesWeight; @@ -133,9 +133,9 @@ void KisLabColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, ((Pixel *)dst)->b = totalb; } -void KisLabColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisLabColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_UINT32 psize = pixelSize(); + TQ_UINT32 psize = pixelSize(); while (nPixels--) { @@ -149,15 +149,15 @@ void KisLabColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) } } -void KisLabColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, - Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisLabColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, + TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalL = 0, totalA = 0, totalB = 0, totalAlpha = 0; + TQ_INT32 totalL = 0, totalA = 0, totalB = 0, totalAlpha = 0; while ( nColors -- ) { const Pixel * pixel = reinterpret_cast( *colors ); - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if ( weight != 0 ) { totalL += pixel->lightness * weight; totalA += pixel->a * weight; @@ -172,29 +172,29 @@ void KisLabColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, Pixel * p = reinterpret_cast< Pixel *>( dst ); if (channelFlags & KisChannelInfo::FLAG_COLOR) { - p->lightness = CLAMP( ( totalL / factor) + offset, 0, Q_UINT16_MAX); - p->a = CLAMP( ( totalA / factor) + offset, 0, Q_UINT16_MAX); - p->b = CLAMP( ( totalB / factor) + offset, 0, Q_UINT16_MAX); + p->lightness = CLAMP( ( totalL / factor) + offset, 0, TQ_UINT16_MAX); + p->a = CLAMP( ( totalA / factor) + offset, 0, TQ_UINT16_MAX); + p->b = CLAMP( ( totalB / factor) + offset, 0, TQ_UINT16_MAX); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT16_MAX); + p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT16_MAX); } } -void KisLabColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const +void KisLabColorSpace::darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const { // XXX: Is the 255 right for u16 colorspaces? - Q_UINT32 pSize = pixelSize(); + TQ_UINT32 pSize = pixelSize(); while ( nPixels-- ) { const Pixel * s = reinterpret_cast( src ); Pixel * d = reinterpret_cast( dst ); if ( compensate ) { - d->lightness = static_cast( ( s->lightness * shade ) / ( compensation * 255 ) ); + d->lightness = static_cast( ( s->lightness * shade ) / ( compensation * 255 ) ); } else { - d->lightness = static_cast( s->lightness * shade / 255 ); + d->lightness = static_cast( s->lightness * shade / 255 ); } d->a = s->a; d->b = s->b; @@ -206,27 +206,27 @@ void KisLabColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, } -QValueVector KisLabColorSpace::channels() const +TQValueVector KisLabColorSpace::channels() const { return m_channels; } -Q_UINT32 KisLabColorSpace::nChannels() const +TQ_UINT32 KisLabColorSpace::nChannels() const { return NUM_CHANNELS; } -Q_UINT32 KisLabColorSpace::nColorChannels() const +TQ_UINT32 KisLabColorSpace::nColorChannels() const { return NUM_COLOR_CHANNELS; } -Q_UINT32 KisLabColorSpace::pixelSize() const +TQ_UINT32 KisLabColorSpace::pixelSize() const { return sizeof(Pixel); } -void KisLabColorSpace::getSingleChannelPixel(Q_UINT8 *dst, const Q_UINT8 *src, Q_UINT32 channelIndex) +void KisLabColorSpace::getSingleChannelPixel(TQ_UINT8 *dst, const TQ_UINT8 *src, TQ_UINT32 channelIndex) { if (channelIndex < NUM_CHANNELS) { @@ -262,24 +262,24 @@ void KisLabColorSpace::getSingleChannelPixel(Q_UINT8 *dst, const Q_UINT8 *src, Q } } -void KisLabColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisLabColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { while (rows > 0) { const Pixel *src = reinterpret_cast(srcRowStart); Pixel *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT16 srcAlpha = src->alpha; + TQ_UINT16 srcAlpha = src->alpha; - // apply the alphamask - if (mask != 0) { - if (*mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_MULT(srcAlpha, *mask); + // apply the alphatqmask + if (tqmask != 0) { + if (*tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_MULT(srcAlpha, *tqmask); } - mask++; + tqmask++; } if (srcAlpha != U16_OPACITY_TRANSPARENT) { @@ -291,14 +291,14 @@ void KisLabColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, if (srcAlpha == U16_OPACITY_OPAQUE) { memcpy(dst, src, sizeof(Pixel)); } else { - Q_UINT16 dstAlpha = dst->alpha; + TQ_UINT16 dstAlpha = dst->alpha; - Q_UINT16 srcBlend; + TQ_UINT16 srcBlend; if (dstAlpha == U16_OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); dst->alpha = newAlpha; if (newAlpha != 0) { @@ -331,40 +331,40 @@ printf("%d %d %d\n", dst->lightness, dst->a, dst->b); rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } -void KisLabColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT16 /*opacity*/) +void KisLabColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT16 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT16 srcAlpha = s->alpha; + TQ_UINT16 srcAlpha = s->alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } d->alpha = UINT16_MULT(srcAlpha, d->alpha); } @@ -372,30 +372,30 @@ void KisLabColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisLabColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisLabColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { - Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); + TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); switch (op.op()) { case COMPOSITE_UNDEF: // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -425,16 +425,16 @@ void KisLabColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - //compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - //compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity); break; case COMPOSITE_COPY_RED: //compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -469,22 +469,22 @@ void KisLabColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - //compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - //compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -493,24 +493,24 @@ void KisLabColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - //compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - //compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - //compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - //compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: - abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest()); break; default: @@ -528,26 +528,26 @@ KisCompositeOpList KisLabColorSpace::userVisiblecompositeOps() const return list; } -QString KisLabColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisLabColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { const Pixel *pix = reinterpret_cast(U8_pixel); Q_ASSERT(channelIndex < nChannels()); switch(channelIndex) { case CHANNEL_L: - return QString().setNum(pix->lightness); + return TQString().setNum(pix->lightness); case CHANNEL_A: - return QString().setNum(pix->a); + return TQString().setNum(pix->a); case CHANNEL_B: - return QString().setNum(pix->b); + return TQString().setNum(pix->b); case CHANNEL_ALPHA: - return QString().setNum(pix->alpha); + return TQString().setNum(pix->alpha); default: - return QString("Error"); + return TQString("Error"); } } -QString KisLabColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisLabColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { const Pixel *pix = reinterpret_cast(U8_pixel); Q_ASSERT(channelIndex < nChannels()); @@ -557,15 +557,15 @@ QString KisLabColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_ switch(channelIndex) { case CHANNEL_L: - return QString().setNum(100.0 * static_cast(pix->lightness) / MAX_CHANNEL_L); + return TQString().setNum(100.0 * static_cast(pix->lightness) / MAX_CHANNEL_L); case CHANNEL_A: - return QString().setNum(100.0 * ((static_cast(pix->a) - CHANNEL_AB_ZERO_OFFSET) / MAX_CHANNEL_AB)); + return TQString().setNum(100.0 * ((static_cast(pix->a) - CHANNEL_AB_ZERO_OFFSET) / MAX_CHANNEL_AB)); case CHANNEL_B: - return QString().setNum(100.0 * ((static_cast(pix->b) - CHANNEL_AB_ZERO_OFFSET) / MAX_CHANNEL_AB)); + return TQString().setNum(100.0 * ((static_cast(pix->b) - CHANNEL_AB_ZERO_OFFSET) / MAX_CHANNEL_AB)); case CHANNEL_ALPHA: - return QString().setNum(100.0 * static_cast(pix->alpha) / UINT16_MAX); + return TQString().setNum(100.0 * static_cast(pix->alpha) / UINT16_MAX); default: - return QString("Error"); + return TQString("Error"); } } diff --git a/krita/kritacolor/colorspaces/kis_lab_colorspace.h b/krita/kritacolor/colorspaces/kis_lab_colorspace.h index 4108e699..7bfa1f83 100644 --- a/krita/kritacolor/colorspaces/kis_lab_colorspace.h +++ b/krita/kritacolor/colorspaces/kis_lab_colorspace.h @@ -19,7 +19,7 @@ #ifndef KIS_STRATEGY_COLORSPACE_LAB_H_ #define KIS_STRATEGY_COLORSPACE_LAB_H_ -#include +#include #include @@ -29,7 +29,7 @@ class KisLabColorSpace : public KisU16BaseColorSpace { public: - KisLabColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisLabColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisLabColorSpace(); public: @@ -38,13 +38,13 @@ public: * Return a COPY of the provided data. This method is provided to provide consistency, * but you really don't want to be calling it. */ - virtual Q_UINT8 * toLabA16(const Q_UINT8 * data, const Q_UINT32 nPixels) const; + virtual TQ_UINT8 * toLabA16(const TQ_UINT8 * data, const TQ_UINT32 nPixels) const; /** * Return a COPY of the provided data. This method is provided for consistency, * but you really don't want to call it. */ - virtual Q_UINT8 * fromLabA16(const Q_UINT8 * labData, const Q_UINT32 nPixels) const; + virtual TQ_UINT8 * fromLabA16(const TQ_UINT8 * labData, const TQ_UINT32 nPixels) const; @@ -56,75 +56,75 @@ public: return false; }; - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual void getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex); + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex); - virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const; + virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; - virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const; + virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const; virtual KisCompositeOpList userVisiblecompositeOps() const; protected: - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); /* - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); */ - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); private: struct Pixel { - Q_UINT16 lightness; - Q_UINT16 a; - Q_UINT16 b; - Q_UINT16 alpha; + TQ_UINT16 lightness; + TQ_UINT16 a; + TQ_UINT16 b; + TQ_UINT16 alpha; }; - static const Q_UINT16 U16_OPACITY_OPAQUE = UINT16_MAX; - static const Q_UINT16 U16_OPACITY_TRANSPARENT = UINT16_MIN; + static const TQ_UINT16 U16_OPACITY_OPAQUE = UINT16_MAX; + static const TQ_UINT16 U16_OPACITY_TRANSPARENT = UINT16_MIN; - static const Q_UINT32 NUM_CHANNELS = 4; - static const Q_UINT32 NUM_COLOR_CHANNELS = 3; + static const TQ_UINT32 NUM_CHANNELS = 4; + static const TQ_UINT32 NUM_COLOR_CHANNELS = 3; - static const Q_UINT32 CHANNEL_L = 0; - static const Q_UINT32 CHANNEL_A = 1; - static const Q_UINT32 CHANNEL_B = 2; - static const Q_UINT32 CHANNEL_ALPHA = 3; + static const TQ_UINT32 CHANNEL_L = 0; + static const TQ_UINT32 CHANNEL_A = 1; + static const TQ_UINT32 CHANNEL_B = 2; + static const TQ_UINT32 CHANNEL_ALPHA = 3; - static const Q_UINT32 MAX_CHANNEL_L = 0xff00; - static const Q_UINT32 MAX_CHANNEL_AB = 0xffff; - static const Q_UINT32 CHANNEL_AB_ZERO_OFFSET = 0x8000; + static const TQ_UINT32 MAX_CHANNEL_L = 0xff00; + static const TQ_UINT32 MAX_CHANNEL_AB = 0xffff; + static const TQ_UINT32 CHANNEL_AB_ZERO_OFFSET = 0x8000; friend class KisLabColorSpaceTester; }; @@ -141,13 +141,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)); }; + virtual TQ_UINT32 colorSpaceType() { return (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)); }; virtual icColorSpaceSignature colorSpaceSignature() { return icSigLabData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisLabColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisLabColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return "Lab built-in - (lcms internal)"; }; + virtual TQString defaultProfile() { return "Lab built-in - (lcms internal)"; }; }; #endif // KIS_STRATEGY_COLORSPACE_LAB_H_ diff --git a/krita/kritacolor/colorspaces/kis_xyz_colorspace.cc b/krita/kritacolor/colorspaces/kis_xyz_colorspace.cc index 3d14ea18..98ccead0 100644 --- a/krita/kritacolor/colorspaces/kis_xyz_colorspace.cc +++ b/krita/kritacolor/colorspaces/kis_xyz_colorspace.cc @@ -23,7 +23,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -34,21 +34,21 @@ #include "kis_integer_maths.h" #define downscale(quantum) (quantum) //((unsigned char) ((quantum)/257UL)) -#define upscale(value) (value) // ((Q_UINT8) (257UL*(value))) +#define upscale(value) (value) // ((TQ_UINT8) (257UL*(value))) // XXX: Maybe use TYPE_XYZ_DBL for an extra stimulating performance hit? People shouldn't depend // on this fallback... -KisXyzColorSpace::KisXyzColorSpace(KisColorSpaceFactoryRegistry * parent, +KisXyzColorSpace::KisXyzColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : - KisU16BaseColorSpace(KisID("XYZA", i18n("XYZ/Alpha")), (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)), icSigCmykData, parent, p) + KisU16BaseColorSpace(KisID("XYZA", i18n("XYZ/Alpha")), (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)), icSigCmykData, tqparent, p) { m_channels.push_back(new KisChannelInfo(i18n("X"), i18n("X"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8)); m_channels.push_back(new KisChannelInfo(i18n("Y"), i18n("Y"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8)); m_channels.push_back(new KisChannelInfo(i18n("Z"), i18n("Z"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8)); m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4, KisChannelInfo::ALPHA, KisChannelInfo::UINT8)); - m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16); + m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16); init(); } @@ -59,42 +59,42 @@ KisXyzColorSpace::~KisXyzColorSpace() } -QValueVector KisXyzColorSpace::channels() const +TQValueVector KisXyzColorSpace::channels() const { return m_channels; } -Q_UINT32 KisXyzColorSpace::nChannels() const +TQ_UINT32 KisXyzColorSpace::nChannels() const { return xyz::MAX_CHANNEL_XYZA; } -Q_UINT32 KisXyzColorSpace::nColorChannels() const +TQ_UINT32 KisXyzColorSpace::nColorChannels() const { return xyz::MAX_CHANNEL_XYZ; } -Q_UINT32 KisXyzColorSpace::pixelSize() const +TQ_UINT32 KisXyzColorSpace::pixelSize() const { - return xyz::MAX_CHANNEL_XYZA * sizeof(Q_UINT16); + return xyz::MAX_CHANNEL_XYZA * sizeof(TQ_UINT16); } -KisColorAdjustment * KisXyzColorSpace::createBrightnessContrastAdjustment(Q_UINT16 *transferValues) +KisColorAdjustment * KisXyzColorSpace::createBrightnessContrastAdjustment(TQ_UINT16 *transferValues) { return 0; } -void KisXyzColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *, Q_INT32 nPixels) +void KisXyzColorSpace::applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *, TQ_INT32 nPixels) { } -void KisXyzColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisXyzColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - Q_INT32 pSize = pixelSize(); + TQ_INT32 pSize = pixelSize(); while (nPixels--) { - Q_UINT16 * p = reinterpret_cast(src); + TQ_UINT16 * p = reinterpret_cast(src); p[PIXEL_X] = UINT16_MAX - p[PIXEL_X]; p[PIXEL_Y] = UINT16_MAX - p[PIXEL_Y]; p[PIXEL_Z] = UINT16_MAX - p[PIXEL_Z]; @@ -102,44 +102,44 @@ void KisXyzColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) } } -void KisXyzColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisXyzColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { } -void KisXyzColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nPixels) const +void KisXyzColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nPixels) const { } -void KisXyzColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const +void KisXyzColorSpace::darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const { } -Q_UINT8 KisXyzColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisXyzColorSpace::intensity8(const TQ_UINT8 * src) const { return 0; } -void KisXyzColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { while (rows > 0) { - const Q_UINT16 *src = reinterpret_cast(srcRowStart); - Q_UINT16 *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } if (srcAlpha != U16_OPACITY_TRANSPARENT) { @@ -149,16 +149,16 @@ void KisXyzColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, } if (srcAlpha == U16_OPACITY_OPAQUE) { - memcpy(dst, src, xyz::MAX_CHANNEL_XYZA * sizeof(Q_UINT16)); + memcpy(dst, src, xyz::MAX_CHANNEL_XYZA * sizeof(TQ_UINT16)); } else { - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; - Q_UINT16 srcBlend; + TQ_UINT16 srcBlend; if (dstAlpha == U16_OPACITY_OPAQUE) { srcBlend = srcAlpha; } else { - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); dst[PIXEL_ALPHA] = newAlpha; if (newAlpha != 0) { @@ -169,7 +169,7 @@ void KisXyzColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, } if (srcBlend == U16_OPACITY_OPAQUE) { - memcpy(dst, src, xyz::MAX_CHANNEL_XYZ * sizeof(Q_UINT16)); + memcpy(dst, src, xyz::MAX_CHANNEL_XYZ * sizeof(TQ_UINT16)); } else { dst[PIXEL_X] = UINT16_BLEND(src[PIXEL_X], dst[PIXEL_X], srcBlend); dst[PIXEL_Y] = UINT16_BLEND(src[PIXEL_Y], dst[PIXEL_Y], srcBlend); @@ -186,8 +186,8 @@ void KisXyzColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) { - maskRowStart += maskRowStride; + if(tqmaskRowStart) { + tqmaskRowStart += tqmaskRowStride; } } } @@ -195,25 +195,25 @@ void KisXyzColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, #define COMMON_COMPOSITE_OP_PROLOG() \ while (rows > 0) { \ \ - const Q_UINT16 *src = reinterpret_cast(srcRowStart); \ - Q_UINT16 *dst = reinterpret_cast(dstRowStart); \ - Q_INT32 columns = numColumns; \ - const Q_UINT8 *mask = maskRowStart; \ + const TQ_UINT16 *src = reinterpret_cast(srcRowStart); \ + TQ_UINT16 *dst = reinterpret_cast(dstRowStart); \ + TQ_INT32 columns = numColumns; \ + const TQ_UINT8 *tqmask = tqmaskRowStart; \ \ while (columns > 0) { \ \ - Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ - Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ + TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; \ + TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \ \ - srcAlpha = QMIN(srcAlpha, dstAlpha); \ + srcAlpha = TQMIN(srcAlpha, dstAlpha); \ \ - if (mask != 0) { \ - Q_UINT8 U8_mask = *mask; \ + if (tqmask != 0) { \ + TQ_UINT8 U8_tqmask = *tqmask; \ \ - if (U8_mask != OPACITY_OPAQUE) { \ - srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \ + if (U8_tqmask != OPACITY_OPAQUE) { \ + srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \ } \ - mask++; \ + tqmask++; \ } \ \ if (srcAlpha != U16_OPACITY_TRANSPARENT) { \ @@ -222,12 +222,12 @@ void KisXyzColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, srcAlpha = UINT16_MULT(srcAlpha, opacity); \ } \ \ - Q_UINT16 srcBlend; \ + TQ_UINT16 srcBlend; \ \ if (dstAlpha == U16_OPACITY_OPAQUE) { \ srcBlend = srcAlpha; \ } else { \ - Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ + TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \ dst[PIXEL_ALPHA] = newAlpha; \ \ if (newAlpha != 0) { \ @@ -248,20 +248,20 @@ void KisXyzColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, rows--; \ srcRowStart += srcRowStride; \ dstRowStart += dstRowStride; \ - if(maskRowStart) { \ - maskRowStart += maskRowStride; \ + if(tqmaskRowStart) { \ + tqmaskRowStart += tqmaskRowStride; \ } \ } -void KisXyzColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MULT(srcColor, dstColor); @@ -273,19 +273,19 @@ void KisXyzColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr COMMON_COMPOSITE_OP_EPILOG(); } -void KisXyzColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -294,19 +294,19 @@ void KisXyzColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid COMMON_COMPOSITE_OP_EPILOG(); } -void KisXyzColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MAX - UINT16_MULT(UINT16_MAX - dstColor, UINT16_MAX - srcColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -315,19 +315,19 @@ void KisXyzColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid COMMON_COMPOSITE_OP_EPILOG(); } -void KisXyzColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; srcColor = UINT16_MULT(dstColor, dstColor + 2u * UINT16_MULT(srcColor, UINT16_MAX - dstColor)); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -336,19 +336,19 @@ void KisXyzColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri COMMON_COMPOSITE_OP_EPILOG(); } -void KisXyzColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); + srcColor = TQMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -357,20 +357,20 @@ void KisXyzColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride COMMON_COMPOSITE_OP_EPILOG(); } -void KisXyzColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX); + srcColor = TQMIN(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX); srcColor = CLAMP(UINT16_MAX - srcColor, 0u, UINT16_MAX); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -379,19 +379,19 @@ void KisXyzColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, COMMON_COMPOSITE_OP_EPILOG(); } -void KisXyzColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMIN(srcColor, dstColor); + srcColor = TQMIN(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -400,19 +400,19 @@ void KisXyzColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid COMMON_COMPOSITE_OP_EPILOG(); } -void KisXyzColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity) +void KisXyzColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity) { COMMON_COMPOSITE_OP_PROLOG(); { for (int channel = 0; channel < xyz::MAX_CHANNEL_XYZ; channel++) { - Q_UINT16 srcColor = src[channel]; - Q_UINT16 dstColor = dst[channel]; + TQ_UINT16 srcColor = src[channel]; + TQ_UINT16 dstColor = dst[channel]; - srcColor = QMAX(srcColor, dstColor); + srcColor = TQMAX(srcColor, dstColor); - Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); + TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend); dst[channel] = newColor; } @@ -423,34 +423,34 @@ void KisXyzColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri -void KisXyzColorSpace::compositeErase(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowSize, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_INT32 rows, - Q_INT32 cols, - Q_UINT16 /*opacity*/) +void KisXyzColorSpace::compositeErase(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowSize, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, + TQ_INT32 cols, + TQ_UINT16 /*opacity*/) { while (rows-- > 0) { const Pixel *s = reinterpret_cast(src); Pixel *d = reinterpret_cast(dst); - const Q_UINT8 *mask = srcAlphaMask; + const TQ_UINT8 *tqmask = srcAlphaMask; - for (Q_INT32 i = cols; i > 0; i--, s++, d++) + for (TQ_INT32 i = cols; i > 0; i--, s++, d++) { - Q_UINT16 srcAlpha = s -> alpha; + TQ_UINT16 srcAlpha = s -> alpha; - // apply the alphamask - if (mask != 0) { - Q_UINT8 U8_mask = *mask; + // apply the alphatqmask + if (tqmask != 0) { + TQ_UINT8 U8_tqmask = *tqmask; - if (U8_mask != OPACITY_OPAQUE) { - srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask)); + if (U8_tqmask != OPACITY_OPAQUE) { + srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask)); } - mask++; + tqmask++; } d -> alpha = UINT16_MULT(srcAlpha, d -> alpha); } @@ -458,30 +458,30 @@ void KisXyzColorSpace::compositeErase(Q_UINT8 *dst, dst += dstRowSize; src += srcRowSize; if(srcAlphaMask) { - srcAlphaMask += maskRowStride; + srcAlphaMask += tqmaskRowStride; } } } -void KisXyzColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowStride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *mask, - Q_INT32 maskRowStride, - Q_UINT8 U8_opacity, - Q_INT32 rows, - Q_INT32 cols, +void KisXyzColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowStride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 U8_opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { - Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); + TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity); switch (op.op()) { case COMPOSITE_UNDEF: // Undefined == no composition break; case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_IN: //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -510,16 +510,16 @@ void KisXyzColorSpace::bitBlt(Q_UINT8 *dst, //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BUMPMAP: //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity); + compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity); break; case COMPOSITE_COPY_RED: //compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -554,22 +554,22 @@ void KisXyzColorSpace::bitBlt(Q_UINT8 *dst, // No composition. break; case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_HUE: - //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_SATURATION: - //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_VALUE: - //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLOR: - //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_COLORIZE: //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); @@ -578,24 +578,24 @@ void KisXyzColorSpace::bitBlt(Q_UINT8 *dst, //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); break; case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity); + compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); break; case COMPOSITE_ALPHA_DARKEN: - abstractCompositeAlphaDarken( - dst, dstRowStride, src, srcRowStride, mask, maskRowStride, + dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest()); break; default: diff --git a/krita/kritacolor/colorspaces/kis_xyz_colorspace.h b/krita/kritacolor/colorspaces/kis_xyz_colorspace.h index 86af9178..2f7c3efd 100644 --- a/krita/kritacolor/colorspaces/kis_xyz_colorspace.h +++ b/krita/kritacolor/colorspaces/kis_xyz_colorspace.h @@ -18,15 +18,15 @@ #ifndef KIS__COLORSPACE_XYZ_H_ #define KIS__COLORSPACE_XYZ_H_ -#include +#include #include "kis_global.h" #include "kis_integer_maths.h" #include "kis_u16_base_colorspace.h" namespace xyz { - const Q_INT32 MAX_CHANNEL_XYZ = 3; - const Q_INT32 MAX_CHANNEL_XYZA = 4; + const TQ_INT32 MAX_CHANNEL_XYZ = 3; + const TQ_INT32 MAX_CHANNEL_XYZA = 4; } @@ -36,14 +36,14 @@ class KisXyzColorSpace : public KisU16BaseColorSpace { public: struct Pixel { - Q_UINT16 X; - Q_UINT16 Y; - Q_UINT16 Z; - Q_UINT16 alpha; + TQ_UINT16 X; + TQ_UINT16 Y; + TQ_UINT16 Z; + TQ_UINT16 alpha; }; public: - KisXyzColorSpace(KisColorSpaceFactoryRegistry * parent, + KisXyzColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisXyzColorSpace(); @@ -56,56 +56,56 @@ public: }; public: // Pixel manipulation - virtual KisColorAdjustment *createBrightnessContrastAdjustment(Q_UINT16 *transferValues); - virtual void applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *, Q_INT32 nPixels); - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nPixels) const; - virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const; - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; + virtual KisColorAdjustment *createBrightnessContrastAdjustment(TQ_UINT16 *transferValues); + virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *, TQ_INT32 nPixels); + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nPixels) const; + virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; // Information about the colorstrategy - virtual QValueVector channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 pixelSize() const; // Composition - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dststride, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dststride, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); KisCompositeOpList userVisiblecompositeOps() const; protected: - void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); - void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity); + void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); + void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity); private: - static const Q_UINT8 PIXEL_X = 0; - static const Q_UINT8 PIXEL_Y = 1; - static const Q_UINT8 PIXEL_Z = 2; - static const Q_UINT8 PIXEL_ALPHA = 3; + static const TQ_UINT8 PIXEL_X = 0; + static const TQ_UINT8 PIXEL_Y = 1; + static const TQ_UINT8 PIXEL_Z = 2; + static const TQ_UINT8 PIXEL_ALPHA = 3; - Q_UINT8 * m_qcolordata; // A small buffer for conversion from and to qcolor. + TQ_UINT8 * m_qcolordata; // A small buffer for conversion from and to qcolor. }; diff --git a/krita/kritacolor/kis_abstract_colorspace.cc b/krita/kritacolor/kis_abstract_colorspace.cc index 0a6ad8e9..f29e965f 100644 --- a/krita/kritacolor/kis_abstract_colorspace.cc +++ b/krita/kritacolor/kis_abstract_colorspace.cc @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -63,9 +63,9 @@ class KisColorAdjustmentImpl : public KisColorAdjustment KisAbstractColorSpace::KisAbstractColorSpace(const KisID& id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, - KisColorSpaceFactoryRegistry * parent, + KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) - : m_parent( parent ) + : m_parent( tqparent ) , m_profile( p ) , m_id( id ) , m_cmType( cmType ) @@ -87,8 +87,8 @@ KisAbstractColorSpace::KisAbstractColorSpace(const KisID& id, void KisAbstractColorSpace::init() { - // Default pixel buffer for QColor conversion - m_qcolordata = new Q_UINT8[3]; + // Default pixel buffer for TQColor conversion + m_qcolordata = new TQ_UINT8[3]; Q_CHECK_PTR(m_qcolordata); if (m_profile == 0) return; @@ -119,7 +119,7 @@ KisAbstractColorSpace::~KisAbstractColorSpace() -void KisAbstractColorSpace::fromQColor(const QColor& color, Q_UINT8 *dst, KisProfile * profile) +void KisAbstractColorSpace::fromTQColor(const TQColor& color, TQ_UINT8 *dst, KisProfile * profile) { m_qcolordata[2] = color.red(); m_qcolordata[1] = color.green(); @@ -146,18 +146,18 @@ void KisAbstractColorSpace::fromQColor(const QColor& color, Q_UINT8 *dst, KisPro setAlpha(dst, OPACITY_OPAQUE, 1); } -void KisAbstractColorSpace::fromQColor(const QColor& color, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile) +void KisAbstractColorSpace::fromTQColor(const TQColor& color, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile) { - fromQColor(color, dst, profile); + fromTQColor(color, dst, profile); setAlpha(dst, opacity, 1); } -void KisAbstractColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile) +void KisAbstractColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile) { if (profile == 0) { // Default sRGB transform if (!m_defaultToRGB) return; - cmsDoTransform(m_defaultToRGB, const_cast (src), m_qcolordata, 1); + cmsDoTransform(m_defaultToRGB, const_cast (src), m_qcolordata, 1); } else { if (m_lastToRGB == 0 || (m_lastToRGB != 0 && m_lastRGBProfile != profile->profile())) { @@ -166,48 +166,48 @@ void KisAbstractColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * INTENT_PERCEPTUAL, 0); m_lastRGBProfile = profile->profile(); } - cmsDoTransform(m_lastToRGB, const_cast (src), m_qcolordata, 1); + cmsDoTransform(m_lastToRGB, const_cast (src), m_qcolordata, 1); } c->setRgb(m_qcolordata[2], m_qcolordata[1], m_qcolordata[0]); } -void KisAbstractColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile) +void KisAbstractColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile) { - toQColor(src, c, profile); + toTQColor(src, c, profile); *opacity = getAlpha(src); } -void KisAbstractColorSpace::toLabA16(const Q_UINT8 * src, Q_UINT8 * dst, const Q_UINT32 nPixels) const +void KisAbstractColorSpace::toLabA16(const TQ_UINT8 * src, TQ_UINT8 * dst, const TQ_UINT32 nPixels) const { if ( m_defaultToLab == 0 ) return; - cmsDoTransform( m_defaultToLab, const_cast( src ), dst, nPixels ); + cmsDoTransform( m_defaultToLab, const_cast( src ), dst, nPixels ); } -void KisAbstractColorSpace::fromLabA16(const Q_UINT8 * src, Q_UINT8 * dst, const Q_UINT32 nPixels) const +void KisAbstractColorSpace::fromLabA16(const TQ_UINT8 * src, TQ_UINT8 * dst, const TQ_UINT32 nPixels) const { if ( m_defaultFromLab == 0 ) return; - cmsDoTransform( m_defaultFromLab, const_cast( src ), dst, nPixels ); + cmsDoTransform( m_defaultFromLab, const_cast( src ), dst, nPixels ); } -void KisAbstractColorSpace::getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex) +void KisAbstractColorSpace::getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex) { if (channelIndex < m_channels.count()) { - fromQColor(Qt::black, OPACITY_TRANSPARENT, dstPixel); + fromTQColor(TQt::black, OPACITY_TRANSPARENT, dstPixel); const KisChannelInfo *channelInfo = m_channels[channelIndex]; memcpy(dstPixel + channelInfo->pos(), srcPixel + channelInfo->pos(), channelInfo->size()); } } -bool KisAbstractColorSpace::convertPixelsTo(const Q_UINT8 * src, - Q_UINT8 * dst, +bool KisAbstractColorSpace::convertPixelsTo(const TQ_UINT8 * src, + TQ_UINT8 * dst, KisColorSpace * dstColorSpace, - Q_UINT32 numPixels, - Q_INT32 renderingIntent) + TQ_UINT32 numPixels, + TQ_INT32 renderingIntent) { if (dstColorSpace->colorSpaceType() == colorSpaceType() && dstColorSpace->getProfile() == getProfile()) @@ -220,8 +220,8 @@ bool KisAbstractColorSpace::convertPixelsTo(const Q_UINT8 * src, cmsHTRANSFORM tf = 0; - Q_INT32 srcPixelSize = pixelSize(); - Q_INT32 dstPixelSize = dstColorSpace->pixelSize(); + TQ_INT32 srcPixelSize = pixelSize(); + TQ_INT32 dstPixelSize = dstColorSpace->pixelSize(); if (m_lastUsedTransform != 0 && m_lastUsedDstColorSpace != 0) { if (dstColorSpace->colorSpaceType() == m_lastUsedDstColorSpace->colorSpaceType() && @@ -232,7 +232,7 @@ bool KisAbstractColorSpace::convertPixelsTo(const Q_UINT8 * src, if (!tf && m_profile && dstColorSpace->getProfile()) { - if (!m_transforms.contains(dstColorSpace)) { + if (!m_transforms.tqcontains(dstColorSpace)) { tf = createTransform(dstColorSpace, m_profile, dstColorSpace->getProfile(), @@ -254,11 +254,11 @@ bool KisAbstractColorSpace::convertPixelsTo(const Q_UINT8 * src, if (tf) { - cmsDoTransform(tf, const_cast(src), dst, numPixels); + cmsDoTransform(tf, const_cast(src), dst, numPixels); // Lcms does nothing to the destination alpha channel so we must convert that manually. while (numPixels > 0) { - Q_UINT8 alpha = getAlpha(src); + TQ_UINT8 alpha = getAlpha(src); dstColorSpace->setAlpha(dst, alpha, 1); src += srcPixelSize; @@ -271,11 +271,11 @@ bool KisAbstractColorSpace::convertPixelsTo(const Q_UINT8 * src, // Last resort fallback. This will be removed when this class is renamed KisLCMSColorSpace after 1.5. while (numPixels > 0) { - QColor color; - Q_UINT8 opacity; + TQColor color; + TQ_UINT8 opacity; - toQColor(src, &color, &opacity); - dstColorSpace->fromQColor(color, opacity, dst); + toTQColor(src, &color, &opacity); + dstColorSpace->fromTQColor(color, opacity, dst); src += srcPixelSize; dst += dstPixelSize; @@ -286,7 +286,7 @@ bool KisAbstractColorSpace::convertPixelsTo(const Q_UINT8 * src, } -KisColorAdjustment *KisAbstractColorSpace::createBrightnessContrastAdjustment(Q_UINT16 *transferValues) +KisColorAdjustment *KisAbstractColorSpace::createBrightnessContrastAdjustment(TQ_UINT16 *transferValues) { if (!m_profile) return 0; @@ -393,7 +393,7 @@ KisColorAdjustment *KisAbstractColorSpace::createDesaturateAdjustment() return adj; } -KisColorAdjustment *KisAbstractColorSpace::createPerChannelAdjustment(Q_UINT16 **transferValues) +KisColorAdjustment *KisAbstractColorSpace::createPerChannelAdjustment(TQ_UINT16 **transferValues) { if (!m_profile) return 0; @@ -419,79 +419,79 @@ KisColorAdjustment *KisAbstractColorSpace::createPerChannelAdjustment(Q_UINT16 * } -void KisAbstractColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adjustment, Q_INT32 nPixels) +void KisAbstractColorSpace::applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adjustment, TQ_INT32 nPixels) { KisColorAdjustmentImpl * adj = dynamic_cast(adjustment); if (adj) - cmsDoTransform(adj->transform, const_cast(src), dst, nPixels); + cmsDoTransform(adj->transform, const_cast(src), dst, nPixels); } -void KisAbstractColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels) +void KisAbstractColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) { - QColor c; - Q_UINT8 opacity; - Q_UINT32 psize = pixelSize(); + TQColor c; + TQ_UINT8 opacity; + TQ_UINT32 psize = pixelSize(); while (nPixels--) { - toQColor(src, &c, &opacity); - c.setRgb(Q_UINT8_MAX - c.red(), Q_UINT8_MAX - c.green(), Q_UINT8_MAX - c.blue()); - fromQColor( c, opacity, src); + toTQColor(src, &c, &opacity); + c.setRgb(TQ_UINT8_MAX - c.red(), TQ_UINT8_MAX - c.green(), TQ_UINT8_MAX - c.blue()); + fromTQColor( c, opacity, src); src += psize; } } -Q_UINT8 KisAbstractColorSpace::difference(const Q_UINT8* src1, const Q_UINT8* src2) +TQ_UINT8 KisAbstractColorSpace::difference(const TQ_UINT8* src1, const TQ_UINT8* src2) { if (m_defaultToLab) { - Q_UINT8 lab1[8], lab2[8]; + TQ_UINT8 lab1[8], lab2[8]; cmsCIELab labF1, labF2; if (getAlpha(src1) == OPACITY_TRANSPARENT || getAlpha(src2) == OPACITY_TRANSPARENT) return (getAlpha(src1) == getAlpha(src2) ? 0 : 255); - cmsDoTransform( m_defaultToLab, const_cast( src1 ), lab1, 1); - cmsDoTransform( m_defaultToLab, const_cast( src2 ), lab2, 1); + cmsDoTransform( m_defaultToLab, const_cast( src1 ), lab1, 1); + cmsDoTransform( m_defaultToLab, const_cast( src2 ), lab2, 1); cmsLabEncoded2Float(&labF1, (WORD *)lab1); cmsLabEncoded2Float(&labF2, (WORD *)lab2); double diff = cmsDeltaE(&labF1, &labF2); if(diff>255) return 255; else - return Q_INT8(diff); + return TQ_INT8(diff); } else { - QColor c1; - Q_UINT8 opacity1; - toQColor(src1, &c1, &opacity1); - - QColor c2; - Q_UINT8 opacity2; - toQColor(src2, &c2, &opacity2); - - Q_UINT8 red = abs(c1.red() - c2.red()); - Q_UINT8 green = abs(c1.green() - c2.green()); - Q_UINT8 blue = abs(c1.blue() - c2.blue()); - return QMAX(red, QMAX(green, blue)); + TQColor c1; + TQ_UINT8 opacity1; + toTQColor(src1, &c1, &opacity1); + + TQColor c2; + TQ_UINT8 opacity2; + toTQColor(src2, &c2, &opacity2); + + TQ_UINT8 red = abs(c1.red() - c2.red()); + TQ_UINT8 green = abs(c1.green() - c2.green()); + TQ_UINT8 blue = abs(c1.blue() - c2.blue()); + return TQMAX(red, TQMAX(green, blue)); } } -void KisAbstractColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const +void KisAbstractColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const { - Q_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0; + TQ_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0; - QColor c; - Q_UINT8 opacity; + TQColor c; + TQ_UINT8 opacity; while (nColors--) { // Ugly hack to get around the current constness mess of the colour strategy... - const_cast(this)->toQColor(*colors, &c, &opacity); + const_cast(this)->toTQColor(*colors, &c, &opacity); - Q_UINT32 alphaTimesWeight = UINT8_MULT(opacity, *weights); + TQ_UINT32 alphaTimesWeight = UINT8_MULT(opacity, *weights); totalRed += c.red() * alphaTimesWeight; totalGreen += c.green() * alphaTimesWeight; @@ -513,38 +513,38 @@ void KisAbstractColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *wei // Divide by 255. totalRed += 0x80; - Q_UINT32 dstRed = ((totalRed >> 8) + totalRed) >> 8; + TQ_UINT32 dstRed = ((totalRed >> 8) + totalRed) >> 8; Q_ASSERT(dstRed <= 255); totalGreen += 0x80; - Q_UINT32 dstGreen = ((totalGreen >> 8) + totalGreen) >> 8; + TQ_UINT32 dstGreen = ((totalGreen >> 8) + totalGreen) >> 8; Q_ASSERT(dstGreen <= 255); totalBlue += 0x80; - Q_UINT32 dstBlue = ((totalBlue >> 8) + totalBlue) >> 8; + TQ_UINT32 dstBlue = ((totalBlue >> 8) + totalBlue) >> 8; Q_ASSERT(dstBlue <= 255); - const_cast(this)->fromQColor(QColor(dstRed, dstGreen, dstBlue), newAlpha, dst); + const_cast(this)->fromTQColor(TQColor(dstRed, dstGreen, dstBlue), newAlpha, dst); } -void KisAbstractColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, - Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const +void KisAbstractColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, + TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const { - Q_INT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; + TQ_INT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0; - QColor dstColor; - Q_UINT8 dstOpacity; + TQColor dstColor; + TQ_UINT8 dstOpacity; - const_cast(this)->toQColor(dst, &dstColor, &dstOpacity); + const_cast(this)->toTQColor(dst, &dstColor, &dstOpacity); while (nColors--) { - Q_INT32 weight = *kernelValues; + TQ_INT32 weight = *kernelValues; if (weight != 0) { - QColor c; - Q_UINT8 opacity; - const_cast(this)->toQColor( *colors, &c, &opacity ); + TQColor c; + TQ_UINT8 opacity; + const_cast(this)->toTQColor( *colors, &c, &opacity ); totalRed += c.red() * weight; totalGreen += c.green() * weight; totalBlue += c.blue() * weight; @@ -556,73 +556,73 @@ void KisAbstractColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelVal if (channelFlags & KisChannelInfo::FLAG_COLOR) { - const_cast(this)->fromQColor(QColor(CLAMP((totalRed / factor) + offset, 0, Q_UINT8_MAX), - CLAMP((totalGreen / factor) + offset, 0, Q_UINT8_MAX), - CLAMP((totalBlue / factor) + offset, 0, Q_UINT8_MAX)), + const_cast(this)->fromTQColor(TQColor(CLAMP((totalRed / factor) + offset, 0, TQ_UINT8_MAX), + CLAMP((totalGreen / factor) + offset, 0, TQ_UINT8_MAX), + CLAMP((totalBlue / factor) + offset, 0, TQ_UINT8_MAX)), dstOpacity, dst); } if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - const_cast(this)->fromQColor(dstColor, CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX), dst); + const_cast(this)->fromTQColor(dstColor, CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX), dst); } } -void KisAbstractColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const +void KisAbstractColorSpace::darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const { if (m_defaultToLab) { - Q_UINT16 * labcache = new Q_UINT16[nPixels * 4]; - cmsDoTransform( m_defaultToLab, const_cast( src ), reinterpret_cast( labcache ), nPixels ); + TQ_UINT16 * labcache = new TQ_UINT16[nPixels * 4]; + cmsDoTransform( m_defaultToLab, const_cast( src ), reinterpret_cast( labcache ), nPixels ); for ( int i = 0; i < nPixels * 4; ++i ) { if ( compensate ) { - labcache[i] = static_cast( ( labcache[i] * shade ) / ( compensation * 255 ) ); + labcache[i] = static_cast( ( labcache[i] * shade ) / ( compensation * 255 ) ); } else { - labcache[i] = static_cast( labcache[i] * shade / 255 ); + labcache[i] = static_cast( labcache[i] * shade / 255 ); } } - cmsDoTransform( m_defaultFromLab, reinterpret_cast( labcache ), dst, nPixels ); + cmsDoTransform( m_defaultFromLab, reinterpret_cast( labcache ), dst, nPixels ); // Copy alpha for ( int i = 0; i < nPixels; ++i ) { - Q_UINT8 alpha = getAlpha( src ); + TQ_UINT8 alpha = getAlpha( src ); setAlpha( dst, alpha, 1 ); } delete [] labcache; } else { - QColor c; - Q_INT32 psize = pixelSize(); + TQColor c; + TQ_INT32 psize = pixelSize(); for (int i = 0; i < nPixels; ++i) { - const_cast(this)->toQColor(src + (i * psize), &c); - Q_INT32 r, g, b; + const_cast(this)->toTQColor(src + (i * psize), &c); + TQ_INT32 r, g, b; if (compensate) { - r = static_cast( QMIN(255, (c.red() * shade) / (compensation * 255))); - g = static_cast( QMIN(255, (c.green() * shade) / (compensation * 255))); - b = static_cast( QMIN(255, (c.blue() * shade) / (compensation * 255))); + r = static_cast( TQMIN(255, (c.red() * shade) / (compensation * 255))); + g = static_cast( TQMIN(255, (c.green() * shade) / (compensation * 255))); + b = static_cast( TQMIN(255, (c.blue() * shade) / (compensation * 255))); } else { - r = static_cast( QMIN(255, (c.red() * shade / 255))); - g = static_cast( QMIN(255, (c.green() * shade / 255))); - b = static_cast( QMIN(255, (c.blue() * shade / 255))); + r = static_cast( TQMIN(255, (c.red() * shade / 255))); + g = static_cast( TQMIN(255, (c.green() * shade / 255))); + b = static_cast( TQMIN(255, (c.blue() * shade / 255))); } c.setRgb(r, g, b); - const_cast(this)->fromQColor( c, dst + (i * psize)); + const_cast(this)->fromTQColor( c, dst + (i * psize)); } } } -Q_UINT8 KisAbstractColorSpace::intensity8(const Q_UINT8 * src) const +TQ_UINT8 KisAbstractColorSpace::intensity8(const TQ_UINT8 * src) const { - QColor c; - Q_UINT8 opacity; - const_cast(this)->toQColor(src, &c, &opacity); - return static_cast((c.red() * 0.30 + c.green() * 0.59 + c.blue() * 0.11) + 0.5); + TQColor c; + TQ_UINT8 opacity; + const_cast(this)->toTQColor(src, &c, &opacity); + return static_cast((c.red() * 0.30 + c.green() * 0.59 + c.blue() * 0.11) + 0.5); } @@ -632,32 +632,32 @@ KisID KisAbstractColorSpace::mathToolboxID() const return KisID("Basic"); } -void KisAbstractColorSpace::bitBlt(Q_UINT8 *dst, - Q_INT32 dststride, +void KisAbstractColorSpace::bitBlt(TQ_UINT8 *dst, + TQ_INT32 dststride, KisColorSpace * srcSpace, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { if (rows <= 0 || cols <= 0) return; if (this != srcSpace) { - Q_UINT32 len = pixelSize() * rows * cols; + TQ_UINT32 len = pixelSize() * rows * cols; // If our conversion cache is too small, extend it. - if (!m_conversionCache.resize( len, QGArray::SpeedOptim )) { + if (!m_conversionCache.resize( len, TQGArray::SpeedOptim )) { kdWarning() << "Could not allocate enough memory for the conversion!\n"; // XXX: We should do a slow, pixel by pixel bitblt here... abort(); } - for (Q_INT32 row = 0; row < rows; row++) { + for (TQ_INT32 row = 0; row < rows; row++) { srcSpace->convertPixelsTo(src + row * srcRowStride, m_conversionCache.data() + row * cols * pixelSize(), this, cols); @@ -671,7 +671,7 @@ void KisAbstractColorSpace::bitBlt(Q_UINT8 *dst, m_conversionCache.data(), srcRowStride, srcAlphaMask, - maskRowStride, + tqmaskRowStride, opacity, rows, cols, @@ -684,7 +684,7 @@ void KisAbstractColorSpace::bitBlt(Q_UINT8 *dst, src, srcRowStride, srcAlphaMask, - maskRowStride, + tqmaskRowStride, opacity, rows, cols, @@ -692,12 +692,12 @@ void KisAbstractColorSpace::bitBlt(Q_UINT8 *dst, } } -QImage KisAbstractColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, +TQImage KisAbstractColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile *dstProfile, - Q_INT32 renderingIntent, float /*exposure*/) + TQ_INT32 renderingIntent, float /*exposure*/) { - QImage img = QImage(width, height, 32, 0, QImage::LittleEndian); + TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian); img.setAlphaBuffer( true ); KisColorSpace * dstCS; @@ -708,7 +708,7 @@ QImage KisAbstractColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width dstCS = m_parent->getRGB8(); if (data) - convertPixelsTo(const_cast(data), img.bits(), dstCS, width * height, renderingIntent); + convertPixelsTo(const_cast(data), img.bits(), dstCS, width * height, renderingIntent); return img; } @@ -717,7 +717,7 @@ QImage KisAbstractColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width cmsHTRANSFORM KisAbstractColorSpace::createTransform(KisColorSpace * dstColorSpace, KisProfile * srcProfile, KisProfile * dstProfile, - Q_INT32 renderingIntent) + TQ_INT32 renderingIntent) { KConfig * cfg = KGlobal::config(); bool bpCompensation = cfg->readBoolEntry("useBlackPointCompensation", false); @@ -741,11 +741,11 @@ cmsHTRANSFORM KisAbstractColorSpace::createTransform(KisColorSpace * dstColorSpa return 0; } -void KisAbstractColorSpace::compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 * /*maskRowStart*/, Q_INT32 /*maskRowStride*/, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity) +void KisAbstractColorSpace::compositeCopy(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 * /*tqmaskRowStart*/, TQ_INT32 /*tqmaskRowStride*/, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) { - Q_UINT8 *dst = dstRowStart; - const Q_UINT8 *src = srcRowStart; - Q_INT32 bytesPerPixel = pixelSize(); + TQ_UINT8 *dst = dstRowStart; + const TQ_UINT8 *src = srcRowStart; + TQ_INT32 bytesPerPixel = pixelSize(); while (rows > 0) { memcpy(dst, src, numColumns * bytesPerPixel); diff --git a/krita/kritacolor/kis_abstract_colorspace.h b/krita/kritacolor/kis_abstract_colorspace.h index b201986a..72d581a1 100644 --- a/krita/kritacolor/kis_abstract_colorspace.h +++ b/krita/kritacolor/kis_abstract_colorspace.h @@ -21,10 +21,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "kis_global.h" #include "kis_channelinfo.h" @@ -35,7 +35,7 @@ #include "koffice_export.h" -class QPainter; +class TQPainter; class KisPixelRO; class KisColorSpaceFactoryRegistry; @@ -53,13 +53,13 @@ public: * @param id The unique human and machine readable identifiation of this colorspace * @param cmType the lcms type indentification for this colorspace, may be 0 * @param colorSpaceSignature the icc identification for this colorspace, may be 0 - * @param parent the registry that owns this instance + * @param tqparent the registry that owns this instance * @param profile the profile this colorspace uses for transforms */ KisAbstractColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, - KisColorSpaceFactoryRegistry * parent, + KisColorSpaceFactoryRegistry * tqparent, KisProfile *profile); void init(); @@ -79,32 +79,32 @@ public: //========== Channels =====================================================// // Return a vector describing all the channels this color model has. - virtual QValueVector channels() const = 0; + virtual TQValueVector channels() const = 0; - virtual Q_UINT32 nChannels() const = 0; + virtual TQ_UINT32 nChannels() const = 0; - virtual Q_UINT32 nColorChannels() const = 0; + virtual TQ_UINT32 nColorChannels() const = 0; - virtual Q_UINT32 nSubstanceChannels() const { return 0; }; + virtual TQ_UINT32 nSubstanceChannels() const { return 0; }; - virtual Q_UINT32 pixelSize() const = 0; + virtual TQ_UINT32 pixelSize() const = 0; - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const = 0; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const = 0; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const = 0; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const = 0; - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos) = 0; + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos) = 0; - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos) = 0; + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos) = 0; - virtual void getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex); + virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex); //========== Identification ===============================================// virtual KisID id() const { return m_id; } - void setColorSpaceType(Q_UINT32 type) { m_cmType = type; } - Q_UINT32 colorSpaceType() { return m_cmType; } + void setColorSpaceType(TQ_UINT32 type) { m_cmType = type; } + TQ_UINT32 colorSpaceType() { return m_cmType; } virtual icColorSpaceSignature colorSpaceSignature() { return m_colorSpaceSignature; } @@ -126,65 +126,65 @@ public: //================= Conversion functions ==================================// - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual void toLabA16(const Q_UINT8 * src, Q_UINT8 * dst, const Q_UINT32 nPixels) const; - virtual void fromLabA16(const Q_UINT8 * src, Q_UINT8 * dst, const Q_UINT32 nPixels) const; + virtual void toLabA16(const TQ_UINT8 * src, TQ_UINT8 * dst, const TQ_UINT32 nPixels) const; + virtual void fromLabA16(const TQ_UINT8 * src, TQ_UINT8 * dst, const TQ_UINT32 nPixels) const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL, float exposure = 0.0f); - virtual bool convertPixelsTo(const Q_UINT8 * src, - Q_UINT8 * dst, KisColorSpace * dstColorSpace, - Q_UINT32 numPixels, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL); + virtual bool convertPixelsTo(const TQ_UINT8 * src, + TQ_UINT8 * dst, KisColorSpace * dstColorSpace, + TQ_UINT32 numPixels, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL); //============================== Manipulation fucntions ==========================// // // The manipulation functions have default implementations that _convert_ the pixel -// to a QColor and back. Reimplement these methods in your color strategy! +// to a TQColor and back. Reimplement these methods in your color strategy! // - virtual KisColorAdjustment *createBrightnessContrastAdjustment(Q_UINT16 *transferValues); + virtual KisColorAdjustment *createBrightnessContrastAdjustment(TQ_UINT16 *transferValues); virtual KisColorAdjustment *createDesaturateAdjustment(); - virtual KisColorAdjustment *createPerChannelAdjustment(Q_UINT16 **transferValues); + virtual KisColorAdjustment *createPerChannelAdjustment(TQ_UINT16 **transferValues); - virtual void applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *, Q_INT32 nPixels); + virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *, TQ_INT32 nPixels); - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels); + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); - virtual Q_UINT8 difference(const Q_UINT8* src1, const Q_UINT8* src2); + virtual TQ_UINT8 difference(const TQ_UINT8* src1, const TQ_UINT8* src2); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nPixels) const; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nPixels) const; - virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const; + virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const; - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const; virtual KisID mathToolboxID() const; - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dststride, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dststride, KisColorSpace * srcSpace, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); //========================== END of Public API ========================================// @@ -196,53 +196,53 @@ protected: * Compose two byte arrays containing pixels in the same color * model together. */ - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) = 0; virtual cmsHTRANSFORM createTransform(KisColorSpace * dstColorSpace, KisProfile * srcProfile, KisProfile * dstProfile, - Q_INT32 renderingIntent); + TQ_INT32 renderingIntent); - virtual void compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity); + virtual void compositeCopy(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity); // So I don't need to re-implement it everywhere. template - void abstractCompositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, - const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, - const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, - Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity, + void abstractCompositeAlphaDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, + const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, + const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, + TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity, NativeMult nativeMult, Uint8ToNative uint8ToNative, NativeOpacityTest nativeOpacityTest) { while (rows > 0) { const ColorType *src = reinterpret_cast(srcRowStart); ColorType *dst = reinterpret_cast(dstRowStart); - const Q_UINT8 *mask = maskRowStart; - Q_INT32 columns = numColumns; + const TQ_UINT8 *tqmask = tqmaskRowStart; + TQ_INT32 columns = numColumns; while (columns > 0) { ColorType srcAlpha = src[AlphaPos]; ColorType dstAlpha = dst[AlphaPos]; - // apply the alphamask - if(mask != 0) + // apply the alphatqmask + if(tqmask != 0) { - if(*mask != OPACITY_OPAQUE) - srcAlpha = nativeMult(srcAlpha, uint8ToNative(*mask)); - mask++; + if(*tqmask != OPACITY_OPAQUE) + srcAlpha = nativeMult(srcAlpha, uint8ToNative(*tqmask)); + tqmask++; } if (opacity != OPACITY_OPAQUE) { @@ -263,19 +263,19 @@ protected: rows--; srcRowStart += srcRowStride; dstRowStart += dstRowStride; - if(maskRowStart) - maskRowStart += maskRowStride; + if(tqmaskRowStart) + tqmaskRowStart += tqmaskRowStride; } } protected: - QStringList m_profileFilenames; - Q_UINT8 * m_qcolordata; // A small buffer for conversion from and to qcolor. - Q_INT32 m_alphaPos; // The position in _bytes_ of the alpha channel - Q_INT32 m_alphaSize; // The width in _bytes_ of the alpha channel + TQStringList m_profileFilenames; + TQ_UINT8 * m_qcolordata; // A small buffer for conversion from and to qcolor. + TQ_INT32 m_alphaPos; // The position in _bytes_ of the alpha channel + TQ_INT32 m_alphaSize; // The width in _bytes_ of the alpha channel - QValueVector m_channels; + TQValueVector m_channels; KisColorSpaceFactoryRegistry * m_parent; @@ -300,13 +300,13 @@ private: icColorSpaceSignature m_colorSpaceSignature; // The colorspace signature as defined in icm/icc files // cmsHTRANSFORM is a void *, so this should work. - typedef QMap TransformMap; + typedef TQMap TransformMap; TransformMap m_transforms; // Cache for existing transforms KisAbstractColorSpace(const KisAbstractColorSpace&); KisAbstractColorSpace& operator=(const KisAbstractColorSpace&); - QMemArray m_conversionCache; // XXX: This will be a bad problem when we have threading. + TQMemArray m_conversionCache; // XXX: This will be a bad problem when we have threading. }; #endif // KIS_STRATEGY_COLORSPACE_H_ diff --git a/krita/kritacolor/kis_basic_histogram_producers.cc b/krita/kritacolor/kis_basic_histogram_producers.cc index 2b9994d3..b769a3d3 100644 --- a/krita/kritacolor/kis_basic_histogram_producers.cc +++ b/krita/kritacolor/kis_basic_histogram_producers.cc @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include "config.h" @@ -66,7 +66,7 @@ void KisBasicHistogramProducer::makeExternalToInternal() { // This function assumes that the pixel is has no 'gaps'. That is to say: if we start // at byte 0, we can get to the end of the pixel by adding consecutive size()s of // the channels - QValueVector c = channels(); + TQValueVector c = channels(); uint count = c.count(); int currentPos = 0; @@ -88,17 +88,17 @@ KisBasicU8HistogramProducer::KisBasicU8HistogramProducer(const KisID& id, KisCol { } -QString KisBasicU8HistogramProducer::positionToString(double pos) const { - return QString("%1").arg(static_cast(pos * UINT8_MAX)); +TQString KisBasicU8HistogramProducer::positionToString(double pos) const { + return TQString("%1").tqarg(static_cast(pos * UINT8_MAX)); } -void KisBasicU8HistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs) +void KisBasicU8HistogramProducer::addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *cs) { if (!pixels) return; if (!cs) return; if (nPixels == 0) return; - Q_INT32 pSize = cs->pixelSize(); + TQ_INT32 pSize = cs->pixelSize(); if ( selectionMask ) { while (nPixels > 0) { @@ -140,9 +140,9 @@ KisBasicU16HistogramProducer::KisBasicU16HistogramProducer(const KisID& id, KisC { } -QString KisBasicU16HistogramProducer::positionToString(double pos) const +TQString KisBasicU16HistogramProducer::positionToString(double pos) const { - return QString("%1").arg(static_cast(pos * UINT8_MAX)); + return TQString("%1").tqarg(static_cast(pos * UINT8_MAX)); } double KisBasicU16HistogramProducer::maximalZoom() const @@ -150,28 +150,28 @@ double KisBasicU16HistogramProducer::maximalZoom() const return 1.0 / 255.0; } -void KisBasicU16HistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs) +void KisBasicU16HistogramProducer::addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *cs) { // The view - Q_UINT16 from = static_cast(m_from * UINT16_MAX); - Q_UINT16 width = static_cast(m_width * UINT16_MAX + 0.5); // We include the end - Q_UINT16 to = from + width; + TQ_UINT16 from = static_cast(m_from * UINT16_MAX); + TQ_UINT16 width = static_cast(m_width * UINT16_MAX + 0.5); // We include the end + TQ_UINT16 to = from + width; double factor = 255.0 / width; - Q_INT32 pSize = cs->pixelSize(); + TQ_INT32 pSize = cs->pixelSize(); if ( selectionMask ) { - Q_UINT16* pixel = reinterpret_cast(pixels); + TQ_UINT16* pixel = reinterpret_cast(pixels); while (nPixels > 0) { if ( ! ((m_skipUnselected && *selectionMask == 0) || (m_skipTransparent && cs->getAlpha(pixels) == OPACITY_TRANSPARENT)) ) { for (int i = 0; i < m_channels; i++) { - Q_UINT16 value = pixel[i]; + TQ_UINT16 value = pixel[i]; if (value > to) m_outRight.at(i)++; else if (value < from) m_outLeft.at(i)++; else - m_bins.at(i).at(static_cast((value - from) * factor))++; + m_bins.at(i).at(static_cast((value - from) * factor))++; } m_count++; } @@ -182,17 +182,17 @@ void KisBasicU16HistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * se } else { while (nPixels > 0) { - Q_UINT16* pixel = reinterpret_cast(pixels); + TQ_UINT16* pixel = reinterpret_cast(pixels); if ( ! (m_skipTransparent && cs->getAlpha(pixels) == OPACITY_TRANSPARENT)) { for (int i = 0; i < m_channels; i++) { - Q_UINT16 value = pixel[i]; + TQ_UINT16 value = pixel[i]; if (value > to) m_outRight.at(i)++; else if (value < from) m_outLeft.at(i)++; else - m_bins.at(i).at(static_cast((value - from) * factor))++; + m_bins.at(i).at(static_cast((value - from) * factor))++; } m_count++; } @@ -209,8 +209,8 @@ KisBasicF32HistogramProducer::KisBasicF32HistogramProducer(const KisID& id, KisC { } -QString KisBasicF32HistogramProducer::positionToString(double pos) const { - return QString("%1").arg(static_cast(pos)); // XXX I doubt this is correct! +TQString KisBasicF32HistogramProducer::positionToString(double pos) const { + return TQString("%1").tqarg(static_cast(pos)); // XXX I doubt this is correct! } double KisBasicF32HistogramProducer::maximalZoom() const { @@ -218,14 +218,14 @@ double KisBasicF32HistogramProducer::maximalZoom() const { return 1.0 / 255.0; } -void KisBasicF32HistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs) { +void KisBasicF32HistogramProducer::addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *cs) { // The view float from = static_cast(m_from); float width = static_cast(m_width); float to = from + width; float factor = 255.0 / width; - Q_INT32 pSize = cs->pixelSize(); + TQ_INT32 pSize = cs->pixelSize(); if ( selectionMask ) { while (nPixels > 0) { @@ -239,7 +239,7 @@ void KisBasicF32HistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * se else if (value < from) m_outLeft.at(i)++; else - m_bins.at(i).at(static_cast((value - from) * factor))++; + m_bins.at(i).at(static_cast((value - from) * factor))++; } m_count++; } @@ -262,7 +262,7 @@ void KisBasicF32HistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * se else if (value < from) m_outLeft.at(i)++; else - m_bins.at(i).at(static_cast((value - from) * factor))++; + m_bins.at(i).at(static_cast((value - from) * factor))++; } m_count++; } @@ -281,8 +281,8 @@ KisBasicF16HalfHistogramProducer::KisBasicF16HalfHistogramProducer(const KisID& : KisBasicHistogramProducer(id, cs->nChannels(), 256, cs) { } -QString KisBasicF16HalfHistogramProducer::positionToString(double pos) const { - return QString("%1").arg(static_cast(pos)); // XXX I doubt this is correct! +TQString KisBasicF16HalfHistogramProducer::positionToString(double pos) const { + return TQString("%1").tqarg(static_cast(pos)); // XXX I doubt this is correct! } double KisBasicF16HalfHistogramProducer::maximalZoom() const { @@ -290,14 +290,14 @@ double KisBasicF16HalfHistogramProducer::maximalZoom() const { return 1.0 / 255.0; } -void KisBasicF16HalfHistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs) { +void KisBasicF16HalfHistogramProducer::addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *cs) { // The view float from = static_cast(m_from); float width = static_cast(m_width); float to = from + width; float factor = 255.0 / width; - Q_INT32 pSize = cs->pixelSize(); + TQ_INT32 pSize = cs->pixelSize(); if ( selectionMask ) { while (nPixels > 0) { half* pixel = reinterpret_cast(pixels); @@ -309,7 +309,7 @@ void KisBasicF16HalfHistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 else if (value < from) m_outLeft.at(i)++; else - m_bins.at(i).at(static_cast((value - from) * factor))++; + m_bins.at(i).at(static_cast((value - from) * factor))++; } m_count++; } @@ -329,7 +329,7 @@ void KisBasicF16HalfHistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 else if (value < from) m_outLeft.at(i)++; else - m_bins.at(i).at(static_cast((value - from) * factor))++; + m_bins.at(i).at(static_cast((value - from) * factor))++; } m_count++; } @@ -346,17 +346,17 @@ KisGenericRGBHistogramProducer::KisGenericRGBHistogramProducer() 3, 256, 0) { /* we set 0 as colorspece, because we are not based on a specific colorspace. This is no problem for the superclass since we override channels() */ - m_channelsList.append(new KisChannelInfo(i18n("R"), i18n("R"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(255,0,0))); - m_channelsList.append(new KisChannelInfo(i18n("G"), i18n("G"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(0,255,0))); - m_channelsList.append(new KisChannelInfo(i18n("B"), i18n("B"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(0,0,255))); + m_channelsList.append(new KisChannelInfo(i18n("R"), i18n("R"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(255,0,0))); + m_channelsList.append(new KisChannelInfo(i18n("G"), i18n("G"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(0,255,0))); + m_channelsList.append(new KisChannelInfo(i18n("B"), i18n("B"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(0,0,255))); } -QValueVector KisGenericRGBHistogramProducer::channels() { +TQValueVector KisGenericRGBHistogramProducer::channels() { return m_channelsList; } -QString KisGenericRGBHistogramProducer::positionToString(double pos) const { - return QString("%1").arg(static_cast(pos * UINT8_MAX)); +TQString KisGenericRGBHistogramProducer::positionToString(double pos) const { + return TQString("%1").tqarg(static_cast(pos * UINT8_MAX)); } double KisGenericRGBHistogramProducer::maximalZoom() const { @@ -364,19 +364,19 @@ double KisGenericRGBHistogramProducer::maximalZoom() const { } -void KisGenericRGBHistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs) +void KisGenericRGBHistogramProducer::addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *cs) { for (int i = 0; i < m_channels; i++) { m_outRight.at(i) = 0; m_outLeft.at(i) = 0; } - QColor c; - Q_INT32 pSize = cs->pixelSize(); + TQColor c; + TQ_INT32 pSize = cs->pixelSize(); if (selectionMask) { while (nPixels > 0) { if ( !((m_skipUnselected && *selectionMask == 0) || (m_skipTransparent && cs->getAlpha(pixels) == OPACITY_TRANSPARENT)) ) { - cs->toQColor(pixels, &c); + cs->toTQColor(pixels, &c); m_bins.at(0).at(c.red())++; m_bins.at(1).at(c.green())++; m_bins.at(2).at(c.blue())++; @@ -393,7 +393,7 @@ void KisGenericRGBHistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * while (nPixels > 0) { if ( !(m_skipTransparent && cs->getAlpha(pixels) == OPACITY_TRANSPARENT)) { - cs->toQColor(pixels, &c); + cs->toTQColor(pixels, &c); m_bins.at(0).at(c.red())++; m_bins.at(1).at(c.green())++; m_bins.at(2).at(c.blue())++; @@ -428,12 +428,12 @@ KisGenericLabHistogramProducer::~KisGenericLabHistogramProducer() delete m_channelsList[2]; } -QValueVector KisGenericLabHistogramProducer::channels() { +TQValueVector KisGenericLabHistogramProducer::channels() { return m_channelsList; } -QString KisGenericLabHistogramProducer::positionToString(double pos) const { - return QString("%1").arg(static_cast(pos * UINT16_MAX)); +TQString KisGenericLabHistogramProducer::positionToString(double pos) const { + return TQString("%1").tqarg(static_cast(pos * UINT16_MAX)); } double KisGenericLabHistogramProducer::maximalZoom() const { @@ -441,21 +441,21 @@ double KisGenericLabHistogramProducer::maximalZoom() const { } -void KisGenericLabHistogramProducer::addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs) +void KisGenericLabHistogramProducer::addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *cs) { for (int i = 0; i < m_channels; i++) { m_outRight.at(i) = 0; m_outLeft.at(i) = 0; } - Q_UINT8 dst[8]; - Q_INT32 pSize = cs->pixelSize(); + TQ_UINT8 dst[8]; + TQ_INT32 pSize = cs->pixelSize(); if (selectionMask) { while (nPixels > 0) { if ( !((m_skipUnselected && *selectionMask == 0) || (m_skipTransparent && cs->getAlpha(pixels) == OPACITY_TRANSPARENT)) ) { /* - cs->toQColor(pixels, &c); + cs->toTQColor(pixels, &c); m_bins.at(0).at(c.red())++; */ m_count++; diff --git a/krita/kritacolor/kis_basic_histogram_producers.h b/krita/kritacolor/kis_basic_histogram_producers.h index 498c7be4..8b913ece 100644 --- a/krita/kritacolor/kis_basic_histogram_producers.h +++ b/krita/kritacolor/kis_basic_histogram_producers.h @@ -19,7 +19,7 @@ #ifndef _KIS_BASIC_HISTOGRAM_PRODUCERS_ #define _KIS_BASIC_HISTOGRAM_PRODUCERS_ -#include +#include #include #include "config.h" @@ -40,27 +40,27 @@ public: virtual void setView(double from, double size) { m_from = from; m_width = size; } virtual const KisID& id() const { return m_id; } - virtual QValueVector channels() { return m_colorSpace->channels(); } - virtual Q_INT32 numberOfBins() { return m_nrOfBins; } + virtual TQValueVector channels() { return m_colorSpace->channels(); } + virtual TQ_INT32 numberOfBins() { return m_nrOfBins; } virtual double viewFrom() const { return m_from; } virtual double viewWidth() const { return m_width; } - virtual Q_INT32 count() { return m_count; } + virtual TQ_INT32 count() { return m_count; } - virtual Q_INT32 getBinAt(int channel, int position) + virtual TQ_INT32 getBinAt(int channel, int position) { return m_bins.at(externalToInternal(channel)).at(position); } - virtual Q_INT32 outOfViewLeft(int channel) + virtual TQ_INT32 outOfViewLeft(int channel) { return m_outLeft.at(externalToInternal(channel)); } - virtual Q_INT32 outOfViewRight(int channel) + virtual TQ_INT32 outOfViewRight(int channel) { return m_outRight.at(externalToInternal(channel)); } protected: /** * The order in which channels() returns is not the same as the internal representation, * that of the pixel internally. This method converts external usage to internal usage. - * This method uses some basic assumtpions about the layout of the pixel, so _extremely_ + * This method uses some basic assumtpions about the tqlayout of the pixel, so _extremely_ * exotic spaces might want to override this (see makeExternalToInternal source for * those assumptions) **/ @@ -71,38 +71,38 @@ protected: } // not virtual since that is useless: we call it from constructor void makeExternalToInternal(); - typedef QValueVector vBins; - QValueVector m_bins; + typedef TQValueVector vBins; + TQValueVector m_bins; vBins m_outLeft, m_outRight; double m_from, m_width; - Q_INT32 m_count; + TQ_INT32 m_count; int m_channels, m_nrOfBins; KisColorSpace *m_colorSpace; KisID m_id; - QValueVector m_external; + TQValueVector m_external; }; class KisBasicU8HistogramProducer : public KisBasicHistogramProducer { public: KisBasicU8HistogramProducer(const KisID& id, KisColorSpace *colorSpace); - virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace); - virtual QString positionToString(double pos) const; + virtual void addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *colorSpace); + virtual TQString positionToString(double pos) const; virtual double maximalZoom() const { return 1.0; } }; class KisBasicU16HistogramProducer : public KisBasicHistogramProducer { public: KisBasicU16HistogramProducer(const KisID& id, KisColorSpace *colorSpace); - virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace); - virtual QString positionToString(double pos) const; + virtual void addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *colorSpace); + virtual TQString positionToString(double pos) const; virtual double maximalZoom() const; }; class KisBasicF32HistogramProducer : public KisBasicHistogramProducer { public: KisBasicF32HistogramProducer(const KisID& id, KisColorSpace *colorSpace); - virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace); - virtual QString positionToString(double pos) const; + virtual void addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *colorSpace); + virtual TQString positionToString(double pos) const; virtual double maximalZoom() const; }; @@ -110,8 +110,8 @@ public: class KisBasicF16HalfHistogramProducer : public KisBasicHistogramProducer { public: KisBasicF16HalfHistogramProducer(const KisID& id, KisColorSpace *colorSpace); - virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace); - virtual QString positionToString(double pos) const; + virtual void addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *colorSpace); + virtual TQString positionToString(double pos) const; virtual double maximalZoom() const; }; #endif @@ -136,19 +136,19 @@ protected: /** * This is a Producer (with associated factory) that converts the pixels of the colorspace - * to RGB8 with toQColor, and then does its counting on RGB. This is NOT registered with the + * to RGB8 with toTQColor, and then does its counting on RGB. This is NOT registered with the * Registry, because it isCompatibleWith all colorspaces, and should only be used in extreme * cases (like no other producer being available **/ class KisGenericRGBHistogramProducer : public KisBasicHistogramProducer { public: KisGenericRGBHistogramProducer(); - virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace); - virtual QString positionToString(double pos) const; + virtual void addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *colorSpace); + virtual TQString positionToString(double pos) const; virtual double maximalZoom() const; - virtual QValueVector channels(); + virtual TQValueVector channels(); protected: - QValueVector m_channelsList; + TQValueVector m_channelsList; }; /** KisGenericRGBHistogramProducer his special Factory that isCompatibleWith everything. */ @@ -172,12 +172,12 @@ class KisGenericLabHistogramProducer : public KisBasicHistogramProducer { public: KisGenericLabHistogramProducer(); virtual ~KisGenericLabHistogramProducer(); - virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace); - virtual QString positionToString(double pos) const; + virtual void addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace *colorSpace); + virtual TQString positionToString(double pos) const; virtual double maximalZoom() const; - virtual QValueVector channels(); + virtual TQValueVector channels(); protected: - QValueVector m_channelsList; + TQValueVector m_channelsList; private: static KisLabColorSpace* m_labCs; }; diff --git a/krita/kritacolor/kis_channelinfo.h b/krita/kritacolor/kis_channelinfo.h index f37d8900..f8ec8301 100644 --- a/krita/kritacolor/kis_channelinfo.h +++ b/krita/kritacolor/kis_channelinfo.h @@ -18,8 +18,8 @@ #ifndef KIS_CHANNELINFO_H_ #define KIS_CHANNELINFO_H_ -#include -#include "qstring.h" +#include +#include "tqstring.h" #include "ksharedptr.h" /** @@ -64,27 +64,27 @@ public: * @param size the size in bytes of this channel * @param color a color to visually represent this channel by in the gui */ - KisChannelInfo( const QString & name, const QString & abbrev, Q_INT32 npos, enumChannelType channelType, enumChannelValueType channelValueType, Q_INT32 size = 1, QColor color = QColor(0,0,0)) + KisChannelInfo( const TQString & name, const TQString & abbrev, TQ_INT32 npos, enumChannelType channelType, enumChannelValueType channelValueType, TQ_INT32 size = 1, TQColor color = TQColor(0,0,0)) : m_name (name), m_abbrev(abbrev), m_pos (npos), m_channelType(channelType), m_channelValueType(channelValueType), m_size(size), m_color(color) { }; public: /** * User-friendly name for this channel for presentation purposes in the gui */ - inline QString name() const { return m_name; }; + inline TQString name() const { return m_name; }; /** * Return the single-letter abbreviation for this channel */ - inline QString abbrev() const { return m_abbrev; }; + inline TQString abbrev() const { return m_abbrev; }; /** * returns the position of the first byte of the channel in the pixel */ - inline Q_INT32 pos() const { return m_pos; }; + inline TQ_INT32 pos() const { return m_pos; }; /** * returns the number of bytes this channel takes */ - inline Q_INT32 size() const { return m_size; }; + inline TQ_INT32 size() const { return m_size; }; /** * returns the type of the channel @@ -98,17 +98,17 @@ public: * This is a color that can be used to represent this channel in histograms and so. * By default this is black, so keep in mind that many channels might look the same */ - inline QColor color() const { return m_color; } + inline TQColor color() const { return m_color; } private: - QString m_name; - QString m_abbrev; - Q_INT32 m_pos; + TQString m_name; + TQString m_abbrev; + TQ_INT32 m_pos; enumChannelType m_channelType; enumChannelValueType m_channelValueType; - Q_INT32 m_size; - QColor m_color; + TQ_INT32 m_size; + TQColor m_color; }; diff --git a/krita/kritacolor/kis_color.cc b/krita/kritacolor/kis_color.cc index eb845c27..7d6acb89 100644 --- a/krita/kritacolor/kis_color.cc +++ b/krita/kritacolor/kis_color.cc @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include "kdebug.h" #include "kis_debug_areas.h" @@ -35,35 +35,35 @@ KisColor::~KisColor() delete [] m_data; } -KisColor::KisColor(const QColor & color, KisColorSpace * colorSpace) +KisColor::KisColor(const TQColor & color, KisColorSpace * colorSpace) : m_colorSpace(colorSpace) { Q_ASSERT(color.isValid()); Q_ASSERT(colorSpace); - m_data = new Q_UINT8[colorSpace->pixelSize()]; + m_data = new TQ_UINT8[colorSpace->pixelSize()]; memset(m_data, 0, m_colorSpace->pixelSize()); - m_colorSpace->fromQColor(color, OPACITY_OPAQUE, m_data); + m_colorSpace->fromTQColor(color, OPACITY_OPAQUE, m_data); } -KisColor::KisColor(const QColor & color, Q_UINT8 alpha, KisColorSpace * colorSpace) +KisColor::KisColor(const TQColor & color, TQ_UINT8 alpha, KisColorSpace * colorSpace) : m_colorSpace(colorSpace) { Q_ASSERT(color.isValid()); Q_ASSERT(colorSpace); - m_data = new Q_UINT8[colorSpace->pixelSize()]; + m_data = new TQ_UINT8[colorSpace->pixelSize()]; memset(m_data, 0, m_colorSpace->pixelSize()); - m_colorSpace->fromQColor(color, alpha, m_data); + m_colorSpace->fromTQColor(color, alpha, m_data); } -KisColor::KisColor(const Q_UINT8 * data, KisColorSpace * colorSpace) +KisColor::KisColor(const TQ_UINT8 * data, KisColorSpace * colorSpace) : m_colorSpace(colorSpace) { - m_data = new Q_UINT8[colorSpace->pixelSize()]; + m_data = new TQ_UINT8[colorSpace->pixelSize()]; memset(m_data, 0, m_colorSpace->pixelSize()); memmove(m_data, data, colorSpace->pixelSize()); } @@ -72,7 +72,7 @@ KisColor::KisColor(const Q_UINT8 * data, KisColorSpace * colorSpace) KisColor::KisColor(const KisColor &src, KisColorSpace * colorSpace) : m_colorSpace(colorSpace) { - m_data = new Q_UINT8[colorSpace->pixelSize()]; + m_data = new TQ_UINT8[colorSpace->pixelSize()]; memset(m_data, 0, m_colorSpace->pixelSize()); src.colorSpace()->convertPixelsTo(src.data(), m_data, colorSpace, 1); @@ -83,7 +83,7 @@ KisColor::KisColor(const KisColor & rhs) if (this == &rhs) return; m_colorSpace = rhs.colorSpace(); - m_data = new Q_UINT8[m_colorSpace->pixelSize()]; + m_data = new TQ_UINT8[m_colorSpace->pixelSize()]; memset(m_data, 0, m_colorSpace->pixelSize()); memcpy(m_data, rhs.data(), m_colorSpace->pixelSize()); } @@ -95,7 +95,7 @@ KisColor & KisColor::operator=(const KisColor & rhs) m_colorSpace = rhs.colorSpace(); if (rhs.m_colorSpace && rhs.m_data) { - m_data = new Q_UINT8[m_colorSpace->pixelSize()]; + m_data = new TQ_UINT8[m_colorSpace->pixelSize()]; memcpy(m_data, rhs.m_data, m_colorSpace->pixelSize()); } return * this; @@ -109,7 +109,7 @@ void KisColor::convertTo(KisColorSpace * cs) if (m_colorSpace == cs) return; - Q_UINT8 * m_data2 = new Q_UINT8[cs->pixelSize()]; + TQ_UINT8 * m_data2 = new TQ_UINT8[cs->pixelSize()]; memset(m_data2, 0, cs->pixelSize()); m_colorSpace->convertPixelsTo(m_data, m_data2, cs, 1); @@ -120,38 +120,38 @@ void KisColor::convertTo(KisColorSpace * cs) } -void KisColor::setColor(Q_UINT8 * data, KisColorSpace * colorSpace) +void KisColor::setColor(TQ_UINT8 * data, KisColorSpace * colorSpace) { delete [] m_data; - m_data = new Q_UINT8[colorSpace->pixelSize()]; + m_data = new TQ_UINT8[colorSpace->pixelSize()]; memcpy(m_data, data, colorSpace->pixelSize()); m_colorSpace = colorSpace; } -// To save the user the trouble of doing color->colorSpace()->toQColor(color->data(), &c, &a, profile -void KisColor::toQColor(QColor *c) const +// To save the user the trouble of doing color->colorSpace()->toTQColor(color->data(), &c, &a, profile +void KisColor::toTQColor(TQColor *c) const { if (m_colorSpace && m_data) { // XXX (bsar): There must be a better way, but I'm getting hopelessly confused about constness by now KisColorSpace * cs(const_cast(m_colorSpace)); - cs->toQColor(m_data, c); + cs->toTQColor(m_data, c); } } -void KisColor::toQColor(QColor *c, Q_UINT8 *opacity) const +void KisColor::toTQColor(TQColor *c, TQ_UINT8 *opacity) const { if (m_colorSpace && m_data) { // XXX (bsar): There must be a better way, but I'm getting hopelessly confused about constness by now KisColorSpace * cs(const_cast(m_colorSpace)); - cs->toQColor(m_data, c, opacity); + cs->toTQColor(m_data, c, opacity); } } -QColor KisColor::toQColor() const +TQColor KisColor::toTQColor() const { - QColor c; - toQColor(&c); + TQColor c; + toTQColor(&c); return c; } @@ -159,26 +159,26 @@ void KisColor::dump() const { //kdDebug(DBG_AREA_CMS) << "KisColor (" << this << "), " << m_colorSpace->id().name() << "\n"; - QValueVector channels = m_colorSpace->channels(); + TQValueVector channels = m_colorSpace->channels(); - QValueVector::const_iterator begin = channels.begin(); - QValueVector::const_iterator end = channels.end(); + TQValueVector::const_iterator begin = channels.begin(); + TQValueVector::const_iterator end = channels.end(); - for (QValueVector::const_iterator it = begin; it != end; ++it) + for (TQValueVector::const_iterator it = begin; it != end; ++it) { KisChannelInfo * ch = (*it); // XXX: setNum always takes a byte. - if (ch->size() == sizeof(Q_UINT8)) { + if (ch->size() == sizeof(TQ_UINT8)) { // Byte - //kdDebug(DBG_AREA_CMS) << "Channel (byte): " << ch->name() << ": " << QString().setNum(m_data[ch->pos()]) << "\n"; + //kdDebug(DBG_AREA_CMS) << "Channel (byte): " << ch->name() << ": " << TQString().setNum(m_data[ch->pos()]) << "\n"; } - else if (ch->size() == sizeof(Q_UINT16)) { + else if (ch->size() == sizeof(TQ_UINT16)) { // Short (may also by an nvidia half) - //kdDebug(DBG_AREA_CMS) << "Channel (short): " << ch->name() << ": " << QString().setNum(*((const Q_UINT16 *)(m_data+ch->pos()))) << "\n"; + //kdDebug(DBG_AREA_CMS) << "Channel (short): " << ch->name() << ": " << TQString().setNum(*((const TQ_UINT16 *)(m_data+ch->pos()))) << "\n"; } - else if (ch->size() == sizeof(Q_UINT32)) { + else if (ch->size() == sizeof(TQ_UINT32)) { // Integer (may also be float... Find out how to distinguish these!) - //kdDebug(DBG_AREA_CMS) << "Channel (int): " << ch->name() << ": " << QString().setNum(*((const Q_UINT32 *)(m_data+ch->pos()))) << "\n"; + //kdDebug(DBG_AREA_CMS) << "Channel (int): " << ch->name() << ": " << TQString().setNum(*((const TQ_UINT32 *)(m_data+ch->pos()))) << "\n"; } } diff --git a/krita/kritacolor/kis_color.h b/krita/kritacolor/kis_color.h index 647bddb3..b7646586 100644 --- a/krita/kritacolor/kis_color.h +++ b/krita/kritacolor/kis_color.h @@ -18,7 +18,7 @@ #ifndef _KIS_COLOR_H_ #define _KIS_COLOR_H_ -#include +#include #include "ksharedptr.h" #include "kis_global.h" @@ -38,16 +38,16 @@ public: virtual ~KisColor(); - /// Create a KisColor from a QColor. The QColor is immediately converted to native. The QColor + /// Create a KisColor from a TQColor. The TQColor is immediately converted to native. The TQColor /// is assumed to have the current monitor profile. - KisColor(const QColor & color, KisColorSpace * colorSpace); + KisColor(const TQColor & color, KisColorSpace * colorSpace); - /// Create a KisColor from a QColor. The QColor is immediately converted to native. The QColor + /// Create a KisColor from a TQColor. The TQColor is immediately converted to native. The TQColor /// is assumed to have the current monitor profile. - KisColor(const QColor & color, Q_UINT8 alpha, KisColorSpace * colorSpace); + KisColor(const TQColor & color, TQ_UINT8 alpha, KisColorSpace * colorSpace); /// Create a KisColor using a native color strategy. The data is copied. - KisColor(const Q_UINT8 * data, KisColorSpace * colorSpace); + KisColor(const TQ_UINT8 * data, KisColorSpace * colorSpace); /// Create a KisColor by converting src into another colorspace KisColor(const KisColor &src, KisColorSpace * colorSpace); @@ -59,7 +59,7 @@ public: KisColor &operator=(const KisColor &); /// For easy memcpy'ing etc. - Q_UINT8 * data() const { return m_data; } + TQ_UINT8 * data() const { return m_data; } KisColorSpace * colorSpace() const { return m_colorSpace; } @@ -70,19 +70,19 @@ public: void convertTo(KisColorSpace * cs); /// Replace the existing color data, and colorspace with the specified data. - void setColor(Q_UINT8 * data, KisColorSpace * colorSpace = 0); + void setColor(TQ_UINT8 * data, KisColorSpace * colorSpace = 0); - /// To save the user the trouble of doing color->colorSpace()->toQColor(color->data(), &c, &a - void toQColor(QColor *c) const; - void toQColor(QColor *c, Q_UINT8 *opacity) const; + /// To save the user the trouble of doing color->colorSpace()->toTQColor(color->data(), &c, &a + void toTQColor(TQColor *c) const; + void toTQColor(TQColor *c, TQ_UINT8 *opacity) const; - QColor toQColor() const; + TQColor toTQColor() const; void dump() const; private: - Q_UINT8 * m_data; + TQ_UINT8 * m_data; KisColorSpace * m_colorSpace; }; diff --git a/krita/kritacolor/kis_color_conversions.cc b/krita/kritacolor/kis_color_conversions.cc index 2ba54ad5..e517c9f7 100644 --- a/krita/kritacolor/kis_color_conversions.cc +++ b/krita/kritacolor/kis_color_conversions.cc @@ -18,7 +18,7 @@ #include -#include +#include #include "kis_color_conversions.h" @@ -150,8 +150,8 @@ void hsv_to_rgb(int H, int S, int V, int *R, int *G, int *B) void RGBToHSV(float r, float g, float b, float *h, float *s, float *v) { - float max = QMAX(r, QMAX(g, b)); - float min = QMIN(r, QMIN(g, b)); + float max = TQMAX(r, TQMAX(g, b)); + float min = TQMIN(r, TQMIN(g, b)); *v = max; @@ -239,7 +239,7 @@ void HSVToRGB(float h, float s, float v, float *r, float *g, float *b) } } -void rgb_to_hls(Q_UINT8 red, Q_UINT8 green, Q_UINT8 blue, float * hue, float * lightness, float * saturation) +void rgb_to_hls(TQ_UINT8 red, TQ_UINT8 green, TQ_UINT8 blue, float * hue, float * lightness, float * saturation) { float r = red / 255.0; float g = green / 255.0; @@ -250,11 +250,11 @@ void rgb_to_hls(Q_UINT8 red, Q_UINT8 green, Q_UINT8 blue, float * hue, float * l float max, min, delta; - max = QMAX(r, g); - max = QMAX(max, b); + max = TQMAX(r, g); + max = TQMAX(max, b); - min = QMIN(r, g); - min = QMIN(min, b); + min = TQMIN(r, g); + min = TQMIN(min, b); delta = max - min; @@ -310,7 +310,7 @@ float hue_value(float n1, float n2, float hue) } -void hls_to_rgb(float h, float l, float s, Q_UINT8 * r, Q_UINT8 * g, Q_UINT8 * b) +void hls_to_rgb(float h, float l, float s, TQ_UINT8 * r, TQ_UINT8 * g, TQ_UINT8 * b) { float m1, m2; @@ -321,13 +321,13 @@ void hls_to_rgb(float h, float l, float s, Q_UINT8 * r, Q_UINT8 * g, Q_UINT8 * b m1 = 2 * l - m2; - *r = (Q_UINT8)(hue_value(m1, m2, h + 120) * 255 + 0.5); - *g = (Q_UINT8)(hue_value(m1, m2, h) * 255 + 0.5); - *b = (Q_UINT8)(hue_value(m1, m2, h - 120) * 255 + 0.5); + *r = (TQ_UINT8)(hue_value(m1, m2, h + 120) * 255 + 0.5); + *g = (TQ_UINT8)(hue_value(m1, m2, h) * 255 + 0.5); + *b = (TQ_UINT8)(hue_value(m1, m2, h - 120) * 255 + 0.5); } -void rgb_to_hls(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b, int * h, int * l, int * s) +void rgb_to_hls(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b, int * h, int * l, int * s) { float hue, saturation, lightness; @@ -337,7 +337,7 @@ void rgb_to_hls(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b, int * h, int * l, int * s) *s = (int)(saturation * 255 + 0.5); } -void hls_to_rgb(int h, int l, int s, Q_UINT8 * r, Q_UINT8 * g, Q_UINT8 * b) +void hls_to_rgb(int h, int l, int s, TQ_UINT8 * r, TQ_UINT8 * g, TQ_UINT8 * b) { float hue = h; float lightness = l / 255.0; @@ -359,10 +359,10 @@ void RGBToHSL(float r, float g, float b, float *h, float *s, float *l) float vm; float r2, g2, b2; - v = QMAX(r,g); - v = QMAX(v,b); - m = QMIN(r,g); - m = QMIN(m,b); + v = TQMAX(r,g); + v = TQMAX(v,b); + m = TQMIN(r,g); + m = TQMIN(m,b); if ((*l = (m + v) / 2.0) <= 0.0) { *h = UNDEFINED_HUE; diff --git a/krita/kritacolor/kis_color_conversions.h b/krita/kritacolor/kis_color_conversions.h index 011a50ea..53a476e0 100644 --- a/krita/kritacolor/kis_color_conversions.h +++ b/krita/kritacolor/kis_color_conversions.h @@ -19,7 +19,7 @@ #ifndef _KIS_CONVERSIONS_H_ #define _KIS_CONVERSIONS_H_ -#include +#include /** * A number of often-used conversions between color models @@ -36,14 +36,14 @@ void RGBToHSL(float r, float g, float b, float *h, float *s, float *l); void HSLToRGB(float h, float sl, float l, float *r, float *g, float *b); - void rgb_to_hls(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b, float * h, float * l, float * s); + void rgb_to_hls(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b, float * h, float * l, float * s); float hue_value(float n1, float n2, float hue); - void hls_to_rgb(float h, float l, float s, Q_UINT8 * r, Q_UINT8 * g, Q_UINT8 * b); + void hls_to_rgb(float h, float l, float s, TQ_UINT8 * r, TQ_UINT8 * g, TQ_UINT8 * b); - void rgb_to_hls(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b, int * h, int * l, int * s); - void hls_to_rgb(int h, int l, int s, Q_UINT8 * r, Q_UINT8 * g, Q_UINT8 * b); + void rgb_to_hls(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b, int * h, int * l, int * s); + void hls_to_rgb(int h, int l, int s, TQ_UINT8 * r, TQ_UINT8 * g, TQ_UINT8 * b); #endif // _KIS_CONVERSIONS_H_ diff --git a/krita/kritacolor/kis_colorspace.h b/krita/kritacolor/kis_colorspace.h index 0a94a74b..3506ef6e 100644 --- a/krita/kritacolor/kis_colorspace.h +++ b/krita/kritacolor/kis_colorspace.h @@ -21,8 +21,8 @@ #include #include LCMS_HEADER -#include -#include +#include +#include #include "kis_composite_op.h" #include "kis_channelinfo.h" @@ -75,61 +75,61 @@ public: //========== Channels =====================================================// /// Return a vector describing all the channels this color model has. - virtual QValueVector channels() const = 0; + virtual TQValueVector channels() const = 0; /** * The total number of channels for a single pixel in this color model */ - virtual Q_UINT32 nChannels() const = 0; + virtual TQ_UINT32 nChannels() const = 0; /** * The total number of color channels (excludes alpha and substance) for a single * pixel in this color model. */ - virtual Q_UINT32 nColorChannels() const = 0; + virtual TQ_UINT32 nColorChannels() const = 0; /** * The total number of substance channels for a single pixel * in this color model */ - virtual Q_UINT32 nSubstanceChannels() const { return 0; }; + virtual TQ_UINT32 nSubstanceChannels() const { return 0; }; /** * The size in bytes of a single pixel in this color model */ - virtual Q_UINT32 pixelSize() const = 0; + virtual TQ_UINT32 pixelSize() const = 0; /** * Return a string with the channel's value suitable for display in the gui. */ - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const = 0; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const = 0; /** * Return a string with the channel's value with integer * channels normalised to the floating point range 0 to 1, if appropriate. */ - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const = 0; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const = 0; /** * Convert the value of the channel at the specified position into * an 8-bit value. The position is not the number of bytes, but * the position of the channel as defined in the channel info list. */ - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos) = 0; + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos) = 0; /** * Convert the value of the channel at the specified position into * a 16-bit value. This may be upscaling or downscaling, depending * on the defined value of the channel */ - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos) = 0; + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos) = 0; /** * Set dstPixel to the pixel containing only the given channel of srcPixel. The remaining channels * should be set to whatever makes sense for 'empty' channels of this colour space, * with the intent being that the pixel should look like it only has the given channel. */ - virtual void getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex) = 0; + virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex) = 0; //========== Identification ===============================================// @@ -142,7 +142,7 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() = 0; + virtual TQ_UINT32 colorSpaceType() = 0; virtual icColorSpaceSignature colorSpaceSignature() = 0; @@ -185,54 +185,54 @@ public: /** - * The fromQColor methods take a given color defined as an RGB QColor + * The fromTQColor methods take a given color defined as an RGB TQColor * and fills a byte array with the corresponding color in the * the colorspace managed by this strategy. * - * @param c the QColor that will be used to fill dst + * @param c the TQColor that will be used to fill dst * @param dst a pointer to a pixel - * @param profile the optional profile that describes the color values of QColor + * @param profile the optional profile that describes the color values of TQColor */ - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0) = 0; + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0) = 0; /** - * The fromQColor methods take a given color defined as an RGB QColor + * The fromTQColor methods take a given color defined as an RGB TQColor * and fills a byte array with the corresponding color in the * the colorspace managed by this strategy. * - * @param c the QColor that will be used to fill dst + * @param c the TQColor that will be used to fill dst * @param opacity the opacity of the color * @param dst a pointer to a pixel - * @param profile the optional profile that describes the color values of QColor + * @param profile the optional profile that describes the color values of TQColor */ - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0) = 0; + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0) = 0; /** - * The toQColor methods take a byte array that is at least pixelSize() long - * and converts the contents to a QColor, using the given profile as a source + * The toTQColor methods take a byte array that is at least pixelSize() long + * and converts the contents to a TQColor, using the given profile as a source * profile and the optional profile as a destination profile. * * @param src a pointer to the source pixel - * @param c the QColor that will be filled with the color at src + * @param c the TQColor that will be filled with the color at src * @param profile the optional profile that describes the color in c, for instance the monitor profile */ - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0) = 0; + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0) = 0; /** - * The toQColor methods take a byte array that is at least pixelSize() long - * and converts the contents to a QColor, using the given profile as a source + * The toTQColor methods take a byte array that is at least pixelSize() long + * and converts the contents to a TQColor, using the given profile as a source * profile and the option profile as a destination profile. * * @param src a pointer to the source pixel - * @param c the QColor that will be filled with the color at src + * @param c the TQColor that will be filled with the color at src * @param opacity a pointer to a byte that will be filled with the opacity a src * @param profile the optional profile that describes the color in c, for instance the monitor profile */ - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0) = 0; + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0) = 0; /** - * Convert the pixels in data to (8-bit BGRA) QImage using the specified profiles. + * Convert the pixels in data to (8-bit BGRA) TQImage using the specified profiles. * The pixels are supposed to be encoded in this color model. The default implementation * will convert the pixels using either the profiles or the default profiles for the * current colorstrategy and the RGBA colorstrategy. If that is not what you want, @@ -245,8 +245,8 @@ public: * @param renderingIntent the rendering intent * @param exposure The exposure setting for rendering a preview of a high dynamic range image. */ - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, - KisProfile * dstProfile, Q_INT32 renderingIntent = INTENT_PERCEPTUAL, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, + KisProfile * dstProfile, TQ_INT32 renderingIntent = INTENT_PERCEPTUAL, float exposure = 0.0f) = 0; @@ -257,7 +257,7 @@ public: * @param dst the destination data * @param nPixels the number of source pixels */ - virtual void toLabA16(const Q_UINT8 * src, Q_UINT8 * dst, const Q_UINT32 nPixels) const = 0; + virtual void toLabA16(const TQ_UINT8 * src, TQ_UINT8 * dst, const TQ_UINT32 nPixels) const = 0; /** * Convert the specified data from Lab. to this colorspace. All colorspaces are @@ -267,7 +267,7 @@ public: * @param dst the destination data * @param nPixels the number of pixels in the array */ - virtual void fromLabA16(const Q_UINT8 * src, Q_UINT8 * dst, const Q_UINT32 nPixels) const = 0; + virtual void fromLabA16(const TQ_UINT8 * src, TQ_UINT8 * dst, const TQ_UINT32 nPixels) const = 0; /** * Convert a byte array of srcLen pixels *src to the specified color space @@ -275,23 +275,23 @@ public: * * Returns false if the conversion failed, true if it succeeded */ - virtual bool convertPixelsTo(const Q_UINT8 * src, - Q_UINT8 * dst, KisColorSpace * dstColorSpace, - Q_UINT32 numPixels, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL) = 0; + virtual bool convertPixelsTo(const TQ_UINT8 * src, + TQ_UINT8 * dst, KisColorSpace * dstColorSpace, + TQ_UINT32 numPixels, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL) = 0; //============================== Manipulation functions ==========================// // // The manipulation functions have default implementations that _convert_ the pixel -// to a QColor and back. Reimplement these methods in your color strategy! +// to a TQColor and back. Reimplement these methods in your color strategy! // /** * Get the alpha value of the given pixel, downscaled to an 8-bit value. */ - virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const = 0; + virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const = 0; /** * Set the alpha channel of the given run of pixels to the given value. @@ -301,7 +301,7 @@ public: * nPixels -- the number of pixels * */ - virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const = 0; + virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const = 0; /** * Multiply the alpha channel of the given run of pixels by the given value. @@ -311,27 +311,27 @@ public: * nPixels -- the number of pixels * */ - virtual void multiplyAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) = 0; + virtual void multiplyAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) = 0; /** - * Applies the specified 8-bit alpha mask to the pixels. We assume that there are just + * Applies the specified 8-bit alpha tqmask to the pixels. We assume that there are just * as many alpha values as pixels but we do not check this; the alpha values * are assumed to be 8-bits. */ - virtual void applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels) = 0; + virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) = 0; /** - * Applies the inverted 8-bit alpha mask to the pixels. We assume that there are just + * Applies the inverted 8-bit alpha tqmask to the pixels. We assume that there are just * as many alpha values as pixels but we do not check this; the alpha values * are assumed to be 8-bits. */ - virtual void applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels) = 0; + virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) = 0; /** * Create an adjustment object for adjusting the brightness and contrast * transferValues is a 256 bins array with values from 0 to 0xFFFF */ - virtual KisColorAdjustment *createBrightnessContrastAdjustment(Q_UINT16 *transferValues) = 0; + virtual KisColorAdjustment *createBrightnessContrastAdjustment(TQ_UINT16 *transferValues) = 0; /** * Create an adjustment object for desaturating @@ -342,35 +342,35 @@ public: * Create an adjustment object for adjusting individual channels * transferValues is an array of nColorChannels number of 256 bins array with values from 0 to 0xFFFF */ - virtual KisColorAdjustment *createPerChannelAdjustment(Q_UINT16 **transferValues) = 0; + virtual KisColorAdjustment *createPerChannelAdjustment(TQ_UINT16 **transferValues) = 0; /** * Apply the adjustment created with onr of the other functions */ - virtual void applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *, Q_INT32 nPixels) = 0; + virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *, TQ_INT32 nPixels) = 0; /** * Invert color channels of the given pixels */ - virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels) = 0; + virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) = 0; // XXX: What with alpha channels? YYY: Add an overloaded function that takes alpha into account? /** * Get the difference between 2 colors, normalized in the range (0,255) */ - virtual Q_UINT8 difference(const Q_UINT8* src1, const Q_UINT8* src2) = 0; + virtual TQ_UINT8 difference(const TQ_UINT8* src1, const TQ_UINT8* src2) = 0; /** * Mix the colors given their weights and return in dst * The sum of weights is assumed 255 */ - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const = 0; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const = 0; /** * Convolve the given array of pointers to pixels and return the result * in dst. The kernel values are clamped between -128 and 128 */ - virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nPixels) const = 0; + virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nPixels) const = 0; /** * Darken all color channels with the given amount. If compensate is true, @@ -378,12 +378,12 @@ public: * * (See the bumpmap filter) */ - virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const = 0; + virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const = 0; /** * Calculate the intensity of the given pixel, scaled down to the range 0-255. XXX: Maybe this should be more flexible */ - virtual Q_UINT8 intensity8(const Q_UINT8 * src) const = 0; + virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const = 0; /** * Create a mathematical toolbox compatible with this colorspace @@ -395,16 +395,16 @@ public: * are not the same colour model, the source pixels will be * converted to the target model. */ - virtual void bitBlt(Q_UINT8 *dst, - Q_INT32 dststride, + virtual void bitBlt(TQ_UINT8 *dst, + TQ_INT32 dststride, KisColorSpace * srcSpace, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) = 0; /** @@ -412,8 +412,8 @@ public: * created paint device. XXX: Currently this uses times and not * threads. */ - virtual QValueList createBackgroundFilters() - { return QValueList(); }; + virtual TQValueList createBackgroundFilters() + { return TQValueList(); }; private: @@ -432,18 +432,18 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() = 0; + virtual TQ_UINT32 colorSpaceType() = 0; virtual icColorSpaceSignature colorSpaceSignature() = 0; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *) = 0; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *) = 0; /** * Returns the default icc profile for use with this colorspace. This may be "" * & @return the default icc profile name */ - virtual QString defaultProfile() = 0; + virtual TQString defaultProfile() = 0; }; diff --git a/krita/kritacolor/kis_colorspace_factory_registry.cc b/krita/kritacolor/kis_colorspace_factory_registry.cc index 8aab0d9a..bbe500bc 100644 --- a/krita/kritacolor/kis_colorspace_factory_registry.cc +++ b/krita/kritacolor/kis_colorspace_factory_registry.cc @@ -32,7 +32,7 @@ #include "kis_lab_colorspace.h" -KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(QStringList profileFilenames) +KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(TQStringList profileFilenames) { // Create the built-in colorspaces @@ -41,7 +41,7 @@ KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(QStringList profileFi // Load the profiles if (!profileFilenames.empty()) { KisProfile * profile = 0; - for ( QStringList::Iterator it = profileFilenames.begin(); it != profileFilenames.end(); ++it ) { + for ( TQStringList::Iterator it = profileFilenames.begin(); it != profileFilenames.end(); ++it ) { profile = new KisProfile(*it); Q_CHECK_PTR(profile); @@ -62,8 +62,8 @@ KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(QStringList profileFi */ // Load all colorspace modules - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/ColorSpace"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/ColorSpace"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); if (offers.empty()) { @@ -77,7 +77,7 @@ KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(QStringList profileFi KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService ( service, this, 0, TQStringList(), &errCode); if ( plugin ) kdDebug(DBG_AREA_PLUGINS) << "found colorspace " << service->property("Name").toString() << "\n"; else { @@ -98,26 +98,26 @@ KisColorSpaceFactoryRegistry::~KisColorSpaceFactoryRegistry() { } -KisProfile * KisColorSpaceFactoryRegistry::getProfileByName(const QString & name) +KisProfile * KisColorSpaceFactoryRegistry::getProfileByName(const TQString & name) { - if (m_profileMap.find(name) == m_profileMap.end()) { + if (m_profileMap.tqfind(name) == m_profileMap.end()) { return 0; } return m_profileMap[name]; } -QValueVector KisColorSpaceFactoryRegistry::profilesFor(KisID id) +TQValueVector KisColorSpaceFactoryRegistry::profilesFor(KisID id) { return profilesFor(get(id)); } -QValueVector KisColorSpaceFactoryRegistry::profilesFor(KisColorSpaceFactory * csf) +TQValueVector KisColorSpaceFactoryRegistry::profilesFor(KisColorSpaceFactory * csf) { - QValueVector profiles; + TQValueVector profiles; - QMap::Iterator it; + TQMap::Iterator it; for (it = m_profileMap.begin(); it != m_profileMap.end(); ++it) { KisProfile * profile = it.data(); if (profile->colorSpaceSignature() == csf->colorSpaceSignature()) { @@ -139,14 +139,14 @@ void KisColorSpaceFactoryRegistry::addPaintDeviceAction(KisColorSpace* cs, m_paintDevActionMap[cs->id()].append(action); } -QValueVector +TQValueVector KisColorSpaceFactoryRegistry::paintDeviceActionsFor(KisColorSpace* cs) { return m_paintDevActionMap[cs->id()]; } -KisColorSpace * KisColorSpaceFactoryRegistry::getColorSpace(const KisID & csID, const QString & pName) +KisColorSpace * KisColorSpaceFactoryRegistry::getColorSpace(const KisID & csID, const TQString & pName) { - QString profileName = pName; + TQString profileName = pName; if(profileName.isEmpty()) { @@ -158,9 +158,9 @@ KisColorSpace * KisColorSpaceFactoryRegistry::getColorSpace(const KisID & csID, profileName = csf->defaultProfile(); } - QString name = csID.id() + "" + profileName; + TQString name = csID.id() + "" + profileName; - if (m_csMap.find(name) == m_csMap.end()) { + if (m_csMap.tqfind(name) == m_csMap.end()) { KisColorSpaceFactory *csf = get(csID); if(!csf) return 0; @@ -175,7 +175,7 @@ KisColorSpace * KisColorSpaceFactoryRegistry::getColorSpace(const KisID & csID, m_csMap[name] = cs; } - if(m_csMap.contains(name)) + if(m_csMap.tqcontains(name)) return m_csMap[name]; else return 0; @@ -199,7 +199,7 @@ KisColorSpace * KisColorSpaceFactoryRegistry::getColorSpace(const KisID & csID, if(!cs ) return 0; - QString name = csID.id() + "" + profile->productName(); + TQString name = csID.id() + "" + profile->productName(); m_csMap[name] = cs; } diff --git a/krita/kritacolor/kis_colorspace_factory_registry.h b/krita/kritacolor/kis_colorspace_factory_registry.h index 2922a0e8..104c99aa 100644 --- a/krita/kritacolor/kis_colorspace_factory_registry.h +++ b/krita/kritacolor/kis_colorspace_factory_registry.h @@ -19,23 +19,24 @@ #ifndef KIS_COLORSPACE_FACTORY_REGISTRY_H_ #define KIS_COLORSPACE_FACTORY_REGISTRY_H_ -#include "qobject.h" +#include "tqobject.h" #include "kis_generic_registry.h" #include "kis_colorspace.h" -class QStringList; +class TQStringList; class KisPaintDeviceAction; /** - * This class contains: + * This class tqcontains: * - a registry of colorspace instantiated with specific profiles. * - a registry of singleton colorspace factories. * - a registry of icc profiles */ -class KisColorSpaceFactoryRegistry : public QObject, public KisGenericRegistry { +class KisColorSpaceFactoryRegistry : public TQObject, public KisGenericRegistry { Q_OBJECT + TQ_OBJECT public: @@ -47,7 +48,7 @@ public: * * @param profileFileNames a list of all filenames of all profiles that need to be loaded initially */ - KisColorSpaceFactoryRegistry(QStringList profileFileNames); + KisColorSpaceFactoryRegistry(TQStringList profileFileNames); virtual ~KisColorSpaceFactoryRegistry(); @@ -60,19 +61,19 @@ public: * Return the profile associated with the given product name, * or 0. */ - KisProfile * getProfileByName(const QString & name); + KisProfile * getProfileByName(const TQString & name); /** * Return the vector of profiles for this colorspacefactory */ - QValueVector profilesFor(KisColorSpaceFactory * cs); + TQValueVector profilesFor(KisColorSpaceFactory * cs); - QValueVector profilesFor(KisID id); + TQValueVector profilesFor(KisID id); /** * Return the colorspace + profile as named, or NULL if impossible combination. */ - KisColorSpace * getColorSpace(const KisID & csID, const QString & profileName); + KisColorSpace * getColorSpace(const KisID & csID, const TQString & profileName); /** * Return the colorspace + profile -- where the profile is matched on the name of the specified profile @@ -100,7 +101,7 @@ public: /** * Get a list of KisConstructPaintDeviceAction for a colorspace */ - QValueVector paintDeviceActionsFor(KisColorSpace* cs); + TQValueVector paintDeviceActionsFor(KisColorSpace* cs); private: KisColorSpaceFactoryRegistry(); @@ -109,10 +110,10 @@ private: private: - QMap m_profileMap; - QMap m_csMap; - typedef QValueVector PaintActionVector; - QMap m_paintDevActionMap; + TQMap m_profileMap; + TQMap m_csMap; + typedef TQValueVector PaintActionVector; + TQMap m_paintDevActionMap; KisColorSpace *m_alphaCs; }; diff --git a/krita/kritacolor/kis_colorspace_iface.cc b/krita/kritacolor/kis_colorspace_iface.cc index 5c7816c9..6e6b3cb8 100644 --- a/krita/kritacolor/kis_colorspace_iface.cc +++ b/krita/kritacolor/kis_colorspace_iface.cc @@ -24,15 +24,15 @@ #include -KisColorSpaceIface::KisColorSpaceIface( KisColorSpace * parent ) - : DCOPObject(parent->id().id().latin1()) +KisColorSpaceIface::KisColorSpaceIface( KisColorSpace * tqparent ) + : DCOPObject(tqparent->id().id().latin1()) { - m_parent = parent; + m_parent = tqparent; } -QByteArray KisColorSpaceIface::invertColor(QByteArray src, Q_INT32 nPixels) +TQByteArray KisColorSpaceIface::invertColor(TQByteArray src, TQ_INT32 nPixels) { - m_parent->invertColor((Q_UINT8*)src.data(), nPixels); + m_parent->invertColor((TQ_UINT8*)src.data(), nPixels); return src; } diff --git a/krita/kritacolor/kis_colorspace_iface.h b/krita/kritacolor/kis_colorspace_iface.h index 2243dc0f..ce52e846 100644 --- a/krita/kritacolor/kis_colorspace_iface.h +++ b/krita/kritacolor/kis_colorspace_iface.h @@ -22,7 +22,7 @@ #include #include -#include +#include class KisColorSpace; @@ -30,10 +30,10 @@ class KisColorSpaceIface : public DCOPObject { K_DCOP public: - KisColorSpaceIface( KisColorSpace * parent ); + KisColorSpaceIface( KisColorSpace * tqparent ); k_dcop: - QByteArray invertColor(QByteArray src, Q_INT32 nPixels); + TQByteArray invertColor(TQByteArray src, TQ_INT32 nPixels); private: diff --git a/krita/kritacolor/kis_composite_op.cc b/krita/kritacolor/kis_composite_op.cc index 3bdd0e4f..ddce271b 100644 --- a/krita/kritacolor/kis_composite_op.cc +++ b/krita/kritacolor/kis_composite_op.cc @@ -28,7 +28,7 @@ KisCompositeOp::KisCompositeOp() m_valid = false; } -KisCompositeOp::KisCompositeOp(const QString& id) +KisCompositeOp::KisCompositeOp(const TQString& id) { if (s_idOpMap.empty()) { fillMap(); diff --git a/krita/kritacolor/kis_composite_op.h b/krita/kritacolor/kis_composite_op.h index f6972f93..bd4f10a2 100644 --- a/krita/kritacolor/kis_composite_op.h +++ b/krita/kritacolor/kis_composite_op.h @@ -19,7 +19,7 @@ #define KIS_COMPOSITE_OP_H_ #include -#include +#include //#include "kis_global.h" #include "kis_id.h" @@ -75,7 +75,7 @@ enum CompositeOp { class KisCompositeOp { public: KisCompositeOp(); - KisCompositeOp(const QString& id); + KisCompositeOp(const TQString& id); KisCompositeOp(CompositeOp compositeOp); KisID id() const { return m_id; } @@ -98,6 +98,6 @@ private: static KisIDCompositeOpMap s_idOpMap; }; -typedef QValueList KisCompositeOpList; +typedef TQValueList KisCompositeOpList; #endif // KIS_COMPOSITE_OP_H diff --git a/krita/kritacolor/kis_f16half_base_colorspace.cc b/krita/kritacolor/kis_f16half_base_colorspace.cc index be316408..d4886c5f 100644 --- a/krita/kritacolor/kis_f16half_base_colorspace.cc +++ b/krita/kritacolor/kis_f16half_base_colorspace.cc @@ -20,7 +20,7 @@ #include "kis_global.h" #include "kis_f16half_base_colorspace.h" -Q_UINT8 KisF16HalfBaseColorSpace::getAlpha(const Q_UINT8 * U8_pixel) const +TQ_UINT8 KisF16HalfBaseColorSpace::getAlpha(const TQ_UINT8 * U8_pixel) const { if (m_alphaPos < 0) return OPACITY_OPAQUE; @@ -30,10 +30,10 @@ Q_UINT8 KisF16HalfBaseColorSpace::getAlpha(const Q_UINT8 * U8_pixel) const return HALF_TO_UINT8(*pixel); } -void KisF16HalfBaseColorSpace::setAlpha(Q_UINT8 *U8_pixel, Q_UINT8 alpha, Q_INT32 nPixels) const +void KisF16HalfBaseColorSpace::setAlpha(TQ_UINT8 *U8_pixel, TQ_UINT8 alpha, TQ_INT32 nPixels) const { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels > 0) { @@ -45,10 +45,10 @@ void KisF16HalfBaseColorSpace::setAlpha(Q_UINT8 *U8_pixel, Q_UINT8 alpha, Q_INT3 } } -void KisF16HalfBaseColorSpace::multiplyAlpha(Q_UINT8 *U8_pixel, Q_UINT8 U8_alpha, Q_INT32 nPixels) +void KisF16HalfBaseColorSpace::multiplyAlpha(TQ_UINT8 *U8_pixel, TQ_UINT8 U8_alpha, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); half alpha = UINT8_TO_HALF(U8_alpha); while (nPixels > 0) { @@ -61,11 +61,11 @@ void KisF16HalfBaseColorSpace::multiplyAlpha(Q_UINT8 *U8_pixel, Q_UINT8 U8_alpha } } -void KisF16HalfBaseColorSpace::applyAlphaU8Mask(Q_UINT8 * U8_pixel, Q_UINT8 * alpha8, Q_INT32 nPixels) +void KisF16HalfBaseColorSpace::applyAlphaU8Mask(TQ_UINT8 * U8_pixel, TQ_UINT8 * alpha8, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels--) { @@ -77,11 +77,11 @@ void KisF16HalfBaseColorSpace::applyAlphaU8Mask(Q_UINT8 * U8_pixel, Q_UINT8 * al } } -void KisF16HalfBaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * U8_pixels, Q_UINT8 * alpha8, Q_INT32 nPixels) +void KisF16HalfBaseColorSpace::applyInverseAlphaU8Mask(TQ_UINT8 * U8_pixels, TQ_UINT8 * alpha8, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels--) { @@ -93,31 +93,31 @@ void KisF16HalfBaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * U8_pixels, Q_UI } } -QString KisF16HalfBaseColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisF16HalfBaseColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); const half *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = channels()[channelIndex] -> pos() / sizeof(half); + TQ_UINT32 channelPosition = channels()[channelIndex] -> pos() / sizeof(half); - return QString().setNum(pixel[channelPosition]); + return TQString().setNum(pixel[channelPosition]); } -QString KisF16HalfBaseColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisF16HalfBaseColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); const half *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = channels()[channelIndex] -> pos() / sizeof(half); + TQ_UINT32 channelPosition = channels()[channelIndex] -> pos() / sizeof(half); - return QString().setNum(100.0 * pixel[channelPosition]); + return TQString().setNum(100.0 * pixel[channelPosition]); } -Q_UINT8 KisF16HalfBaseColorSpace::scaleToU8(const Q_UINT8 * U8_pixel, Q_INT32 channelPos) +TQ_UINT8 KisF16HalfBaseColorSpace::scaleToU8(const TQ_UINT8 * U8_pixel, TQ_INT32 channelPos) { const half *pixelChannel = reinterpret_cast(U8_pixel + channelPos); return HALF_TO_UINT8(*pixelChannel); } -Q_UINT16 KisF16HalfBaseColorSpace::scaleToU16(const Q_UINT8 * U8_pixel, Q_INT32 channelPos) +TQ_UINT16 KisF16HalfBaseColorSpace::scaleToU16(const TQ_UINT8 * U8_pixel, TQ_INT32 channelPos) { const half *pixelChannel = reinterpret_cast(U8_pixel + channelPos); return HALF_TO_UINT16(*pixelChannel); diff --git a/krita/kritacolor/kis_f16half_base_colorspace.h b/krita/kritacolor/kis_f16half_base_colorspace.h index 1beb37c1..ff1dbf8c 100644 --- a/krita/kritacolor/kis_f16half_base_colorspace.h +++ b/krita/kritacolor/kis_f16half_base_colorspace.h @@ -18,7 +18,7 @@ #ifndef KIS_F16HALF_BASE_COLORSPACE_H_ #define KIS_F16HALF_BASE_COLORSPACE_H_ -#include +#include #include @@ -63,25 +63,25 @@ class KisF16HalfBaseColorSpace : public KisAbstractColorSpace { public: KisF16HalfBaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, - KisColorSpaceFactoryRegistry * parent, + KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) - : KisAbstractColorSpace(id, cmType, colorSpaceSignature, parent, p) + : KisAbstractColorSpace(id, cmType, colorSpaceSignature, tqparent, p) { m_alphaSize = sizeof(half); }; - virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const; - virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; - virtual void multiplyAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels); + virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const; + virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; + virtual void multiplyAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels); - virtual void applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); - virtual void applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); + virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); + virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos); - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos); + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); virtual bool hasHighDynamicRange() const { return true; } @@ -93,7 +93,7 @@ protected: } }; struct Uint8ToF16Half { - inline half operator()(const Q_UINT8 src) const { + inline half operator()(const TQ_UINT8 src) const { return UINT8_TO_HALF(src); } }; diff --git a/krita/kritacolor/kis_f32_base_colorspace.cc b/krita/kritacolor/kis_f32_base_colorspace.cc index 2b6cc56d..27a6a312 100644 --- a/krita/kritacolor/kis_f32_base_colorspace.cc +++ b/krita/kritacolor/kis_f32_base_colorspace.cc @@ -20,7 +20,7 @@ #include "kis_global.h" #include "kis_f32_base_colorspace.h" -Q_UINT8 KisF32BaseColorSpace::getAlpha(const Q_UINT8 * U8_pixel) const +TQ_UINT8 KisF32BaseColorSpace::getAlpha(const TQ_UINT8 * U8_pixel) const { if (m_alphaPos < 0) return OPACITY_OPAQUE; @@ -30,10 +30,10 @@ Q_UINT8 KisF32BaseColorSpace::getAlpha(const Q_UINT8 * U8_pixel) const return FLOAT_TO_UINT8(*pixel); } -void KisF32BaseColorSpace::setAlpha(Q_UINT8 *U8_pixel, Q_UINT8 alpha, Q_INT32 nPixels) const +void KisF32BaseColorSpace::setAlpha(TQ_UINT8 *U8_pixel, TQ_UINT8 alpha, TQ_INT32 nPixels) const { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels > 0) { @@ -45,10 +45,10 @@ void KisF32BaseColorSpace::setAlpha(Q_UINT8 *U8_pixel, Q_UINT8 alpha, Q_INT32 nP } } -void KisF32BaseColorSpace::multiplyAlpha(Q_UINT8 *U8_pixel, Q_UINT8 U8_alpha, Q_INT32 nPixels) +void KisF32BaseColorSpace::multiplyAlpha(TQ_UINT8 *U8_pixel, TQ_UINT8 U8_alpha, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); float alpha = UINT8_TO_FLOAT(U8_alpha); while (nPixels > 0) { @@ -61,11 +61,11 @@ void KisF32BaseColorSpace::multiplyAlpha(Q_UINT8 *U8_pixel, Q_UINT8 U8_alpha, Q_ } } -void KisF32BaseColorSpace::applyAlphaU8Mask(Q_UINT8 * U8_pixel, Q_UINT8 * alpha8, Q_INT32 nPixels) +void KisF32BaseColorSpace::applyAlphaU8Mask(TQ_UINT8 * U8_pixel, TQ_UINT8 * alpha8, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels--) { @@ -77,11 +77,11 @@ void KisF32BaseColorSpace::applyAlphaU8Mask(Q_UINT8 * U8_pixel, Q_UINT8 * alpha8 } } -void KisF32BaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * U8_pixels, Q_UINT8 * alpha8, Q_INT32 nPixels) +void KisF32BaseColorSpace::applyInverseAlphaU8Mask(TQ_UINT8 * U8_pixels, TQ_UINT8 * alpha8, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels--) { @@ -93,31 +93,31 @@ void KisF32BaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * U8_pixels, Q_UINT8 } } -QString KisF32BaseColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisF32BaseColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); const float *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = channels()[channelIndex]->pos() / sizeof(float); + TQ_UINT32 channelPosition = channels()[channelIndex]->pos() / sizeof(float); - return QString().setNum(pixel[channelPosition]); + return TQString().setNum(pixel[channelPosition]); } -QString KisF32BaseColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisF32BaseColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); const float *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = channels()[channelIndex]->pos() / sizeof(float); + TQ_UINT32 channelPosition = channels()[channelIndex]->pos() / sizeof(float); - return QString().setNum(100.0 * pixel[channelPosition]); + return TQString().setNum(100.0 * pixel[channelPosition]); } -Q_UINT8 KisF32BaseColorSpace::scaleToU8(const Q_UINT8 * U8_pixel, Q_INT32 channelPos) +TQ_UINT8 KisF32BaseColorSpace::scaleToU8(const TQ_UINT8 * U8_pixel, TQ_INT32 channelPos) { const float *pixelChannel = reinterpret_cast(U8_pixel + channelPos); return FLOAT_TO_UINT8(*pixelChannel); } -Q_UINT16 KisF32BaseColorSpace::scaleToU16(const Q_UINT8 * U8_pixel, Q_INT32 channelPos) +TQ_UINT16 KisF32BaseColorSpace::scaleToU16(const TQ_UINT8 * U8_pixel, TQ_INT32 channelPos) { const float *pixelChannel = reinterpret_cast(U8_pixel + channelPos); return FLOAT_TO_UINT16(*pixelChannel); diff --git a/krita/kritacolor/kis_f32_base_colorspace.h b/krita/kritacolor/kis_f32_base_colorspace.h index f3a9ac28..60ecb9aa 100644 --- a/krita/kritacolor/kis_f32_base_colorspace.h +++ b/krita/kritacolor/kis_f32_base_colorspace.h @@ -18,7 +18,7 @@ #ifndef KIS_F32_BASE_COLORSPACE_H_ #define KIS_F32_BASE_COLORSPACE_H_ -#include +#include #include "kis_global.h" #include "kis_abstract_colorspace.h" @@ -58,24 +58,24 @@ class KisF32BaseColorSpace : public KisAbstractColorSpace { public: - KisF32BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, KisColorSpaceFactoryRegistry * parent, KisProfile *p) - : KisAbstractColorSpace(id, cmType, colorSpaceSignature, parent, p) + KisF32BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) + : KisAbstractColorSpace(id, cmType, colorSpaceSignature, tqparent, p) { m_alphaSize = sizeof(float); }; - virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const; - virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; - virtual void multiplyAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels); + virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const; + virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; + virtual void multiplyAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels); - virtual void applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); - virtual void applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); + virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); + virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos); - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos); + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); virtual bool hasHighDynamicRange() const { return true; } }; diff --git a/krita/kritacolor/kis_histogram_producer.cc b/krita/kritacolor/kis_histogram_producer.cc index ae61e7cf..bbea95ba 100644 --- a/krita/kritacolor/kis_histogram_producer.cc +++ b/krita/kritacolor/kis_histogram_producer.cc @@ -41,7 +41,7 @@ KisIDList KisHistogramProducerFactoryRegistry::listKeysCompatibleWith( KisColorSpace* colorSpace) const { KisIDList list; - QValueList preferredList; + TQValueList preferredList; storageMap::const_iterator it = m_storage.begin(); storageMap::const_iterator endit = m_storage.end(); // O(n^2), can't this be done better? (But preferrably not by looking up the preferredness @@ -49,8 +49,8 @@ KisIDList KisHistogramProducerFactoryRegistry::listKeysCompatibleWith( while( it != endit ) { if (it->second->isCompatibleWith(colorSpace)) { float preferred = it->second->preferrednessLevelWith(colorSpace); - QValueList::iterator pit = preferredList.begin(); - QValueList::iterator pend = preferredList.end(); + TQValueList::iterator pit = preferredList.begin(); + TQValueList::iterator pend = preferredList.end(); KisIDList::iterator lit = list.begin(); while (pit != pend && preferred <= *pit) { diff --git a/krita/kritacolor/kis_histogram_producer.h b/krita/kritacolor/kis_histogram_producer.h index 171ab1b0..2d25b354 100644 --- a/krita/kritacolor/kis_histogram_producer.h +++ b/krita/kritacolor/kis_histogram_producer.h @@ -19,7 +19,7 @@ #ifndef _KIS_HISTOGRAM_PRODUCER_ #define _KIS_HISTOGRAM_PRODUCER_ -#include +#include #include #include @@ -27,7 +27,7 @@ #include "kis_generic_registry.h" class KisRectIteratorPixel; -class QString; +class TQString; class KisChannelInfo; /** @@ -67,7 +67,7 @@ public: * @param nPixels The number of pixels * @param colorSpace the colorspace that can decode the pixel data. */ - virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace* colorSpace) = 0; + virtual void addRegionToBin(TQ_UINT8 * pixels, TQ_UINT8 * selectionMask, TQ_UINT32 nPixels, KisColorSpace* colorSpace) = 0; // Methods to set what exactly is being added to the bins virtual void setView(double from, double width) = 0; @@ -76,18 +76,18 @@ public: // Methods with general information about this specific producer virtual const KisID& id() const = 0; - virtual QValueVector channels() = 0; - virtual Q_INT32 numberOfBins() = 0; - virtual QString positionToString(double pos) const = 0; + virtual TQValueVector channels() = 0; + virtual TQ_INT32 numberOfBins() = 0; + virtual TQString positionToString(double pos) const = 0; virtual double viewFrom() const = 0; virtual double viewWidth() const = 0; virtual double maximalZoom() const = 0; // Methods to get information on the data we have seen - virtual Q_INT32 count() = 0; - virtual Q_INT32 getBinAt(Q_INT32 channel, Q_INT32 position) = 0; - virtual Q_INT32 outOfViewLeft(Q_INT32 channel) = 0; - virtual Q_INT32 outOfViewRight(Q_INT32 channel) = 0; + virtual TQ_INT32 count() = 0; + virtual TQ_INT32 getBinAt(TQ_INT32 channel, TQ_INT32 position) = 0; + virtual TQ_INT32 outOfViewLeft(TQ_INT32 channel) = 0; + virtual TQ_INT32 outOfViewRight(TQ_INT32 channel) = 0; protected: bool m_skipTransparent; bool m_skipUnselected; diff --git a/krita/kritacolor/kis_profile.cc b/krita/kritacolor/kis_profile.cc index 83880398..b59eeadb 100644 --- a/krita/kritacolor/kis_profile.cc +++ b/krita/kritacolor/kis_profile.cc @@ -24,9 +24,9 @@ #include #include LCMS_HEADER -#include -#include -#include +#include +#include +#include #include @@ -39,9 +39,9 @@ #include #include -KisProfile::KisProfile(QByteArray rawData) +KisProfile::KisProfile(TQByteArray rawData) : m_rawData(rawData), - m_filename( QString() ), + m_filename( TQString() ), m_valid( false ), m_suitableForOutput(false) { @@ -49,7 +49,7 @@ KisProfile::KisProfile(QByteArray rawData) init(); } -KisProfile::KisProfile(const QString& file) +KisProfile::KisProfile(const TQString& file) : m_filename(file), m_valid( false ), m_suitableForOutput( false ) @@ -58,7 +58,7 @@ KisProfile::KisProfile(const QString& file) KisProfile::KisProfile(const cmsHPROFILE profile) : m_profile(profile), - m_filename( QString() ), + m_filename( TQString() ), m_valid( true ) { size_t bytesNeeded=0; @@ -86,7 +86,7 @@ KisProfile::~KisProfile() bool KisProfile::load() { - QFile file(m_filename); + TQFile file(m_filename); file.open(IO_ReadOnly); m_rawData = file.readAll(); m_profile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD)m_rawData.size()); @@ -140,7 +140,7 @@ cmsHPROFILE KisProfile::profile() { #if 0 if (m_profile = 0) { - QFile file(m_filename); + TQFile file(m_filename); file.open(IO_ReadOnly); m_rawData = file.readAll(); m_profile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD)m_rawData.size()); @@ -168,13 +168,13 @@ KisAnnotationSP KisProfile::annotation() const KisProfile * KisProfile::getScreenProfile (int screen) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 Atom type; int format; unsigned long nitems; unsigned long bytes_after; - Q_UINT8 * str; + TQ_UINT8 * str; static Atom icc_atom = XInternAtom( qt_xdisplay(), "_ICC_PROFILE", False ); @@ -192,8 +192,8 @@ KisProfile * KisProfile::getScreenProfile (int screen) (unsigned char **) &str) ) { - QByteArray bytes (nitems); - bytes.assign((char*)str, (Q_UINT32)nitems); + TQByteArray bytes (nitems); + bytes.assign((char*)str, (TQ_UINT32)nitems); return new KisProfile(bytes); } else { diff --git a/krita/kritacolor/kis_profile.h b/krita/kritacolor/kis_profile.h index 075b8060..5f732188 100644 --- a/krita/kritacolor/kis_profile.h +++ b/krita/kritacolor/kis_profile.h @@ -26,8 +26,8 @@ #include LCMS_HEADER -#include -#include +#include +#include #include @@ -39,8 +39,8 @@ class KisProfile { public: - KisProfile(QByteArray rawData); - KisProfile(const QString& file); + KisProfile(TQByteArray rawData); + KisProfile(const TQString& file); KisProfile(const cmsHPROFILE profile); virtual ~KisProfile(); @@ -50,10 +50,10 @@ public: inline icColorSpaceSignature colorSpaceSignature() const { return m_colorSpaceSignature; } inline icProfileClassSignature deviceClass() const { return m_deviceClass; } - inline QString productName() const { return m_productName; } - inline QString productDescription() const { return m_productDescription; } - inline QString productInfo() const { return m_productInfo; } - inline QString manufacturer() const { return m_manufacturer; } + inline TQString productName() const { return m_productName; } + inline TQString productDescription() const { return m_productDescription; } + inline TQString productInfo() const { return m_productInfo; } + inline TQString manufacturer() const { return m_manufacturer; } cmsHPROFILE profile(); KisAnnotationSP annotation() const; @@ -64,7 +64,7 @@ public: inline bool isSuitableForOutput() { return m_suitableForOutput; }; - inline QString filename() const { return m_filename; } + inline TQString filename() const { return m_filename; } public: @@ -76,14 +76,14 @@ private: cmsHPROFILE m_profile; icColorSpaceSignature m_colorSpaceSignature; icProfileClassSignature m_deviceClass; - QString m_productName; - QString m_productDescription; - QString m_productInfo; - QString m_manufacturer; + TQString m_productName; + TQString m_productDescription; + TQString m_productInfo; + TQString m_manufacturer; - QByteArray m_rawData; + TQByteArray m_rawData; - QString m_filename; + TQString m_filename; bool m_valid; bool m_suitableForOutput; diff --git a/krita/kritacolor/kis_u16_base_colorspace.cc b/krita/kritacolor/kis_u16_base_colorspace.cc index 45d72d0c..a735e35c 100644 --- a/krita/kritacolor/kis_u16_base_colorspace.cc +++ b/krita/kritacolor/kis_u16_base_colorspace.cc @@ -23,26 +23,26 @@ #include "kis_u16_base_colorspace.h" -Q_UINT8 KisU16BaseColorSpace::getAlpha(const Q_UINT8 * U8_pixel) const +TQ_UINT8 KisU16BaseColorSpace::getAlpha(const TQ_UINT8 * U8_pixel) const { if (m_alphaPos < 0) return OPACITY_OPAQUE; U8_pixel+= m_alphaPos; - const Q_UINT16 *pixel = reinterpret_cast(U8_pixel); + const TQ_UINT16 *pixel = reinterpret_cast(U8_pixel); return UINT16_TO_UINT8(*pixel); } -void KisU16BaseColorSpace::setAlpha(Q_UINT8 *U8_pixel, Q_UINT8 alpha, Q_INT32 nPixels) const +void KisU16BaseColorSpace::setAlpha(TQ_UINT8 *U8_pixel, TQ_UINT8 alpha, TQ_INT32 nPixels) const { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels > 0) { - Q_UINT16 *pixel = reinterpret_cast(U8_pixel + m_alphaPos); + TQ_UINT16 *pixel = reinterpret_cast(U8_pixel + m_alphaPos); pixel[0] = UINT8_TO_UINT16(alpha); --nPixels; @@ -50,16 +50,16 @@ void KisU16BaseColorSpace::setAlpha(Q_UINT8 *U8_pixel, Q_UINT8 alpha, Q_INT32 nP } } -void KisU16BaseColorSpace::multiplyAlpha(Q_UINT8 *U8_pixel, Q_UINT8 U8_alpha, Q_INT32 nPixels) +void KisU16BaseColorSpace::multiplyAlpha(TQ_UINT8 *U8_pixel, TQ_UINT8 U8_alpha, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); - Q_UINT16 alpha = UINT8_TO_UINT16(U8_alpha); + TQ_INT32 psize = pixelSize(); + TQ_UINT16 alpha = UINT8_TO_UINT16(U8_alpha); while (nPixels > 0) { - Q_UINT16 *pixelAlpha = reinterpret_cast(U8_pixel + m_alphaPos); + TQ_UINT16 *pixelAlpha = reinterpret_cast(U8_pixel + m_alphaPos); *pixelAlpha = UINT16_MULT(*pixelAlpha, alpha); --nPixels; @@ -67,18 +67,18 @@ void KisU16BaseColorSpace::multiplyAlpha(Q_UINT8 *U8_pixel, Q_UINT8 U8_alpha, Q_ } } -void KisU16BaseColorSpace::applyAlphaU8Mask(Q_UINT8 * U8_pixel, Q_UINT8 * alpha8, Q_INT32 nPixels) +void KisU16BaseColorSpace::applyAlphaU8Mask(TQ_UINT8 * U8_pixel, TQ_UINT8 * alpha8, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels--) { // Go to the alpha position (which is given in bytes from the start of the pixel, // and cast to short. - Q_UINT16 *pixelAlpha = reinterpret_cast(U8_pixel + m_alphaPos); + TQ_UINT16 *pixelAlpha = reinterpret_cast(U8_pixel + m_alphaPos); *pixelAlpha = UINT8_MULT(*pixelAlpha, *alpha8); ++alpha8; @@ -87,20 +87,20 @@ void KisU16BaseColorSpace::applyAlphaU8Mask(Q_UINT8 * U8_pixel, Q_UINT8 * alpha8 } } -void KisU16BaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * U8_pixels, Q_UINT8 * alpha8, Q_INT32 nPixels) +void KisU16BaseColorSpace::applyInverseAlphaU8Mask(TQ_UINT8 * U8_pixels, TQ_UINT8 * alpha8, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while(nPixels--) { - Q_UINT16 s_alpha8; - Q_UINT32 p_alpha, s_alpha16; + TQ_UINT16 s_alpha8; + TQ_UINT32 p_alpha, s_alpha16; - Q_UINT16 *alpha = reinterpret_cast(U8_pixels + m_alphaPos); + TQ_UINT16 *alpha = reinterpret_cast(U8_pixels + m_alphaPos); p_alpha = *(alpha); s_alpha8 = MAX_SELECTED - *alpha8; @@ -116,33 +116,33 @@ void KisU16BaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * U8_pixels, Q_UINT8 } } -QString KisU16BaseColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisU16BaseColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); - const Q_UINT16 *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = channels()[channelIndex]->pos() / sizeof(Q_UINT16); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); + const TQ_UINT16 *pixel = reinterpret_cast(U8_pixel); + TQ_UINT32 channelPosition = channels()[channelIndex]->pos() / sizeof(TQ_UINT16); - return QString().setNum(pixel[channelPosition]); + return TQString().setNum(pixel[channelPosition]); } -QString KisU16BaseColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisU16BaseColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); - const Q_UINT16 *pixel = reinterpret_cast(U8_pixel); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos() / sizeof(Q_UINT16); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); + const TQ_UINT16 *pixel = reinterpret_cast(U8_pixel); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos() / sizeof(TQ_UINT16); - return QString().setNum(100.0 * static_cast(pixel[channelPosition]) / UINT16_MAX); + return TQString().setNum(100.0 * static_cast(pixel[channelPosition]) / UINT16_MAX); } -Q_UINT8 KisU16BaseColorSpace::scaleToU8(const Q_UINT8 * U8_pixel, Q_INT32 channelPos) +TQ_UINT8 KisU16BaseColorSpace::scaleToU8(const TQ_UINT8 * U8_pixel, TQ_INT32 channelPos) { - const Q_UINT16 *pixel = reinterpret_cast(U8_pixel); + const TQ_UINT16 *pixel = reinterpret_cast(U8_pixel); return UINT16_TO_UINT8(pixel[channelPos]); } -Q_UINT16 KisU16BaseColorSpace::scaleToU16(const Q_UINT8 * U8_pixel, Q_INT32 channelPos) +TQ_UINT16 KisU16BaseColorSpace::scaleToU16(const TQ_UINT8 * U8_pixel, TQ_INT32 channelPos) { - const Q_UINT16 *pixel = reinterpret_cast(U8_pixel); + const TQ_UINT16 *pixel = reinterpret_cast(U8_pixel); return pixel[channelPos]; } diff --git a/krita/kritacolor/kis_u16_base_colorspace.h b/krita/kritacolor/kis_u16_base_colorspace.h index aedd5a2e..756ab9b5 100644 --- a/krita/kritacolor/kis_u16_base_colorspace.h +++ b/krita/kritacolor/kis_u16_base_colorspace.h @@ -31,48 +31,48 @@ class KisU16BaseColorSpace : public KisAbstractColorSpace { public: - static const Q_UINT16 U16_OPACITY_OPAQUE = UINT16_MAX; - static const Q_UINT16 U16_OPACITY_TRANSPARENT = UINT16_MIN; + static const TQ_UINT16 U16_OPACITY_OPAQUE = UINT16_MAX; + static const TQ_UINT16 U16_OPACITY_TRANSPARENT = UINT16_MIN; public: KisU16BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, - KisColorSpaceFactoryRegistry * parent, + KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : KisAbstractColorSpace(id, cmType, colorSpaceSignature, - parent, + tqparent, p) { - m_alphaSize = sizeof(Q_UINT16); + m_alphaSize = sizeof(TQ_UINT16); }; - virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const; - virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; - virtual void multiplyAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels); + virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const; + virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; + virtual void multiplyAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels); - virtual void applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); - virtual void applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); + virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); + virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos); - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos); + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); protected: // For Alpha Composite struct U16Mult { - inline Q_UINT16 operator()(const Q_UINT16& a, const Q_UINT16& b) const { + inline TQ_UINT16 operator()(const TQ_UINT16& a, const TQ_UINT16& b) const { return UINT16_MULT(a, b); } }; struct Uint8ToU16 { - inline Q_UINT16 operator()(const Q_UINT8 src) const { + inline TQ_UINT16 operator()(const TQ_UINT8 src) const { return UINT8_TO_UINT16(src); } }; struct U16OpacityTest { - inline bool operator()(const Q_UINT16& opacity) const { + inline bool operator()(const TQ_UINT16& opacity) const { return opacity != U16_OPACITY_TRANSPARENT; } }; diff --git a/krita/kritacolor/kis_u8_base_colorspace.cc b/krita/kritacolor/kis_u8_base_colorspace.cc index ec0003fc..338d95d6 100644 --- a/krita/kritacolor/kis_u8_base_colorspace.cc +++ b/krita/kritacolor/kis_u8_base_colorspace.cc @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include @@ -24,17 +24,17 @@ #include "kis_u8_base_colorspace.h" #include "kis_integer_maths.h" -Q_UINT8 KisU8BaseColorSpace::getAlpha(const Q_UINT8 * pixel) const +TQ_UINT8 KisU8BaseColorSpace::getAlpha(const TQ_UINT8 * pixel) const { return pixel[m_alphaPos]; } -void KisU8BaseColorSpace::setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const +void KisU8BaseColorSpace::setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); pixels += m_alphaPos; while (nPixels > 0) { @@ -45,10 +45,10 @@ void KisU8BaseColorSpace::setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPix } -void KisU8BaseColorSpace::multiplyAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) +void KisU8BaseColorSpace::multiplyAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) { if (m_alphaPos < 0) return; - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels > 0) { pixels[m_alphaPos] = UINT8_MULT(pixels[m_alphaPos], alpha); @@ -57,9 +57,9 @@ void KisU8BaseColorSpace::multiplyAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 } } -void KisU8BaseColorSpace::applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels) +void KisU8BaseColorSpace::applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) { - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while (nPixels--) { @@ -71,13 +71,13 @@ void KisU8BaseColorSpace::applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_ } } -void KisU8BaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels) +void KisU8BaseColorSpace::applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) { - Q_INT32 psize = pixelSize(); + TQ_INT32 psize = pixelSize(); while(nPixels--) { - Q_UINT16 p_alpha, s_alpha; + TQ_UINT16 p_alpha, s_alpha; p_alpha = getAlpha(pixels); s_alpha = MAX_SELECTED - *alpha; @@ -89,29 +89,29 @@ void KisU8BaseColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * al } } -QString KisU8BaseColorSpace::channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const +TQString KisU8BaseColorSpace::channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(pixel[channelPosition]); + return TQString().setNum(pixel[channelPosition]); } -QString KisU8BaseColorSpace::normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const +TQString KisU8BaseColorSpace::normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const { - Q_ASSERT(channelIndex < (Q_UINT32)nChannels()); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + Q_ASSERT(channelIndex < (TQ_UINT32)nChannels()); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(100.0 * static_cast(pixel[channelPosition]) / UINT8_MAX); + return TQString().setNum(100.0 * static_cast(pixel[channelPosition]) / UINT8_MAX); } -Q_UINT8 KisU8BaseColorSpace::scaleToU8(const Q_UINT8 * pixel, Q_INT32 channelPos) +TQ_UINT8 KisU8BaseColorSpace::scaleToU8(const TQ_UINT8 * pixel, TQ_INT32 channelPos) { return pixel[channelPos]; } -Q_UINT16 KisU8BaseColorSpace::scaleToU16(const Q_UINT8 * pixel, Q_INT32 channelPos) +TQ_UINT16 KisU8BaseColorSpace::scaleToU16(const TQ_UINT8 * pixel, TQ_INT32 channelPos) { return UINT8_TO_UINT16(pixel[channelPos]); } diff --git a/krita/kritacolor/kis_u8_base_colorspace.h b/krita/kritacolor/kis_u8_base_colorspace.h index fc830e99..098a1f59 100644 --- a/krita/kritacolor/kis_u8_base_colorspace.h +++ b/krita/kritacolor/kis_u8_base_colorspace.h @@ -18,9 +18,9 @@ #ifndef KIS_U8_BASE_COLORSPACE_H_ #define KIS_U8_BASE_COLORSPACE_H_ -#include +#include -#include +#include #include "kis_global.h" #include "kis_abstract_colorspace.h" @@ -34,40 +34,40 @@ class KisU8BaseColorSpace : public KisAbstractColorSpace { public: KisU8BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, - KisColorSpaceFactoryRegistry * parent, + KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) - : KisAbstractColorSpace(id, cmType, colorSpaceSignature, parent, p) + : KisAbstractColorSpace(id, cmType, colorSpaceSignature, tqparent, p) { - m_alphaSize = sizeof(Q_UINT8); + m_alphaSize = sizeof(TQ_UINT8); }; - virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const; - virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; - virtual void multiplyAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels); + virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const; + virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; + virtual void multiplyAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels); - virtual void applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); - virtual void applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); + virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); + virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos); - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos); + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); protected: // For Alpha Composite struct U8Mult { - inline Q_UINT8 operator()(const Q_UINT8& a, const Q_UINT8& b) const { + inline TQ_UINT8 operator()(const TQ_UINT8& a, const TQ_UINT8& b) const { return UINT8_MULT(a, b); } }; struct Uint8ToU8 { - inline Q_UINT8 operator()(const Q_UINT8 src) const { + inline TQ_UINT8 operator()(const TQ_UINT8 src) const { return src; } }; struct U8OpacityTest { - inline bool operator()(const Q_UINT8& opacity) const { + inline bool operator()(const TQ_UINT8& opacity) const { return opacity != OPACITY_TRANSPARENT; } }; diff --git a/krita/kritacolor/tests/kis_color_conversions_tester.h b/krita/kritacolor/tests/kis_color_conversions_tester.h index f21eca59..1223abbb 100644 --- a/krita/kritacolor/tests/kis_color_conversions_tester.h +++ b/krita/kritacolor/tests/kis_color_conversions_tester.h @@ -24,11 +24,11 @@ #define CHECK_TOLERANCE( x, y, tolerance ) \ if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \ { \ - success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \ + success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #x); \ } \ else \ { \ - failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \ + failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + TQString::number(x)); \ } \ diff --git a/krita/plugins/filters/blur/blur.cc b/krita/plugins/filters/blur/blur.cc index 14d815b4..9df83c13 100644 --- a/krita/plugins/filters/blur/blur.cc +++ b/krita/plugins/filters/blur/blur.cc @@ -27,8 +27,8 @@ typedef KGenericFactory BlurFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritablurfilter, BlurFilterPluginFactory( "krita" ) ) -BlurFilterPlugin::BlurFilterPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +BlurFilterPlugin::BlurFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(BlurFilterPluginFactory::instance()); @@ -36,11 +36,11 @@ BlurFilterPlugin::BlurFilterPlugin(QObject *parent, const char *name, const QStr kdDebug(41006) << "Extensions Convolution Filters plugin. Class: " << className() << ", Parent: " - << parent -> className() + << tqparent -> className() << "\n"; - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisBlurFilter()); } } diff --git a/krita/plugins/filters/blur/blur.h b/krita/plugins/filters/blur/blur.h index a0c51579..0f90902e 100644 --- a/krita/plugins/filters/blur/blur.h +++ b/krita/plugins/filters/blur/blur.h @@ -30,7 +30,7 @@ class BlurFilterPlugin : public KParts::Plugin { public: - BlurFilterPlugin(QObject *parent, const char *name, const QStringList &); + BlurFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~BlurFilterPlugin(); }; diff --git a/krita/plugins/filters/blur/kis_blur_filter.cc b/krita/plugins/filters/blur/kis_blur_filter.cc index 5970cb6e..3a5fb7de 100644 --- a/krita/plugins/filters/blur/kis_blur_filter.cc +++ b/krita/plugins/filters/blur/kis_blur_filter.cc @@ -33,16 +33,16 @@ #include "kis_wdg_blur.h" #include "wdgblur.h" -KisKernelSP kernelFromQImage(const QImage& img) +KisKernelSP kernelFromTQImage(const TQImage& img) { KisKernelSP k = new KisKernel; k->width = img.width(); k->height = img.height(); k->offset = 0; uint count = k->width * k->height; - k->data = new Q_INT32[count]; - Q_INT32* itData = k->data; - Q_UINT8* itImg = img.bits(); + k->data = new TQ_INT32[count]; + TQ_INT32* itData = k->data; + TQ_UINT8* itImg = img.bits(); k->factor = 0; for(uint i = 0; i < count; ++i , ++itData, itImg+=4) { @@ -56,12 +56,12 @@ KisBlurFilter::KisBlurFilter() : KisFilter(id(), "blur", i18n("&Blur...")) { } -KisFilterConfigWidget * KisBlurFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP ) +KisFilterConfigWidget * KisBlurFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP ) { - return new KisWdgBlur(this, parent, "configuration of color to alpha"); + return new KisWdgBlur(this, tqparent, "configuration of color to alpha"); } -KisFilterConfiguration* KisBlurFilter::configuration(QWidget* w) +KisFilterConfiguration* KisBlurFilter::configuration(TQWidget* w) { KisWdgBlur * wCTA = dynamic_cast(w); if(!wCTA) return 0; @@ -72,12 +72,12 @@ KisFilterConfiguration* KisBlurFilter::configuration(QWidget* w) config->setProperty("halfHeight", wCTA->widget()->intHalfWidth->value() ); config->setProperty("rotate", wCTA->widget()->intAngle->value() ); config->setProperty("strength", wCTA->widget()->intStrength->value() ); - config->setProperty("shape", wCTA->widget()->cbShape->currentItem()); + config->setProperty("tqshape", wCTA->widget()->cbShape->currentItem()); } return config; } -void KisBlurFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisBlurFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); @@ -86,8 +86,8 @@ void KisBlurFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte if(!config) config = new KisFilterConfiguration(id().id(), 1); - QVariant value; - int shape = (config->getProperty("shape", value)) ? value.toInt() : 0; + TQVariant value; + int tqshape = (config->getProperty("tqshape", value)) ? value.toInt() : 0; uint halfWidth = (config->getProperty("halfWidth", value)) ? value.toUInt() : 5; uint width = 2 * halfWidth + 1; uint halfHeight = (config->getProperty("halfHeight", value)) ? value.toUInt() : 5; @@ -100,7 +100,7 @@ void KisBlurFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte KisAutobrushShape* kas; kdDebug() << width << " " << height << " " << hFade << " " << vFade << endl; - switch(shape) + switch(tqshape) { case 1: kas = new KisAutobrushRectShape(width, height , hFade, vFade); @@ -110,19 +110,19 @@ void KisBlurFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte kas = new KisAutobrushCircleShape(width, height, hFade, vFade); break; } - QImage mask; - kas->createBrush(&mask); + TQImage tqmask; + kas->createBrush(&tqmask); - mask.convertDepth(1); + tqmask.convertDepth(1); if( rotate != 0) { - QWMatrix m; + TQWMatrix m; m.rotate( rotate ); - mask = mask.xForm( m ); - if( (mask.height() & 1) || mask.width() & 1) + tqmask = tqmask.xForm( m ); + if( (tqmask.height() & 1) || tqmask.width() & 1) { - mask.smoothScale( mask.width() + !(mask.width() & 1), mask.height() + !(mask.height() & 1) ); + tqmask.smoothScale( tqmask.width() + !(tqmask.width() & 1), tqmask.height() + !(tqmask.height() & 1) ); } } @@ -130,7 +130,7 @@ void KisBlurFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte if (m_progressDisplay) m_progressDisplay->setSubject( &painter, true, true ); - KisKernelSP kernel = kernelFromQImage(mask); // TODO: for 1.6 reuse the krita's core function for creating kernel : KisKernel::fromQImage + KisKernelSP kernel = kernelFromTQImage(tqmask); // TODO: for 1.6 reuse the krita's core function for creating kernel : KisKernel::fromTQImage painter.applyMatrix(kernel, rect.x(), rect.y(), rect.width(), rect.height(), BORDER_REPEAT, KisChannelInfo::FLAG_COLOR_AND_ALPHA); diff --git a/krita/plugins/filters/blur/kis_blur_filter.h b/krita/plugins/filters/blur/kis_blur_filter.h index 781c090e..87bf0c20 100644 --- a/krita/plugins/filters/blur/kis_blur_filter.h +++ b/krita/plugins/filters/blur/kis_blur_filter.h @@ -33,7 +33,7 @@ class KisBlurFilter : public KisFilter public: KisBlurFilter(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); static inline KisID id() { return KisID("blur", i18n("Blur")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -42,8 +42,8 @@ class KisBlurFilter : public KisFilter virtual bool supportsThreading() { return false; } virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/blur/kis_wdg_blur.cc b/krita/plugins/filters/blur/kis_wdg_blur.cc index dd53e09a..550989b5 100644 --- a/krita/plugins/filters/blur/kis_wdg_blur.cc +++ b/krita/plugins/filters/blur/kis_wdg_blur.cc @@ -20,8 +20,8 @@ #include "kis_wdg_blur.h" -#include -#include +#include +#include #include #include @@ -32,30 +32,30 @@ #include "wdgblur.h" -KisWdgBlur::KisWdgBlur( KisFilter* nfilter, QWidget * parent, const char * name) : KisFilterConfigWidget ( parent, name ) +KisWdgBlur::KisWdgBlur( KisFilter* nfilter, TQWidget * tqparent, const char * name) : KisFilterConfigWidget ( tqparent, name ) { Q_UNUSED( nfilter ); - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgBlur(this); widgetLayout -> addWidget(m_widget,0,0); linkSpacingToggled(true); - connect( widget()->bnLinkSize, SIGNAL(toggled(bool)), this, SLOT(linkSpacingToggled( bool ))); - connect( widget()->intHalfWidth, SIGNAL(valueChanged(int)),this,SLOT(spinBoxHalfWidthChanged(int))); - connect( widget()->intHalfHeight, SIGNAL(valueChanged(int)),this,SLOT(spinBoxHalfHeightChanged(int))); + connect( widget()->bnLinkSize, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(linkSpacingToggled( bool ))); + connect( widget()->intHalfWidth, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHalfWidthChanged(int))); + connect( widget()->intHalfHeight, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHalfHeightChanged(int))); - connect( widget()->intStrength, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intAngle, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->cbShape, SIGNAL( activated(int)), SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intStrength, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intAngle, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->cbShape, TQT_SIGNAL( activated(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); } void KisWdgBlur::setConfiguration(KisFilterConfiguration* config) { - QVariant value; - if (config->getProperty("shape", value)) + TQVariant value; + if (config->getProperty("tqshape", value)) { widget()->cbShape->setCurrentItem( value.toUInt() ); } diff --git a/krita/plugins/filters/blur/kis_wdg_blur.h b/krita/plugins/filters/blur/kis_wdg_blur.h index a1946f80..49df8a31 100644 --- a/krita/plugins/filters/blur/kis_wdg_blur.h +++ b/krita/plugins/filters/blur/kis_wdg_blur.h @@ -33,8 +33,9 @@ class WdgBlur; class KisWdgBlur : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgBlur( KisFilter* nfilter, QWidget * parent, const char * name); + KisWdgBlur( KisFilter* nfilter, TQWidget * tqparent, const char * name); inline WdgBlur* widget() { return m_widget; }; virtual void setConfiguration(KisFilterConfiguration*); private slots: diff --git a/krita/plugins/filters/blur/wdgblur.ui b/krita/plugins/filters/blur/wdgblur.ui index ded12e44..06119596 100644 --- a/krita/plugins/filters/blur/wdgblur.ui +++ b/krita/plugins/filters/blur/wdgblur.ui @@ -1,6 +1,6 @@ WdgBlur - + WdgBlur @@ -32,7 +32,7 @@ Expanding - + 40 20 @@ -49,22 +49,22 @@ Expanding - + 20 16 - + - layout17 + tqlayout17 unnamed - + bnLinkSize @@ -76,13 +76,13 @@ 0 - + 16 0 - + 16 32767 @@ -113,7 +113,7 @@ cbShape - + textLabel5 @@ -124,7 +124,7 @@ - + textLabel3 @@ -160,7 +160,7 @@ 1000 - + textLabel1 @@ -168,7 +168,7 @@ Half-width: - + textLabel4 @@ -187,7 +187,7 @@ 100 - + textLabel2 @@ -212,7 +212,7 @@ - + kcombobox.h knuminput.h diff --git a/krita/plugins/filters/bumpmap/bumpmap.cc b/krita/plugins/filters/bumpmap/bumpmap.cc index 833fc655..9e83bb6f 100644 --- a/krita/plugins/filters/bumpmap/bumpmap.cc +++ b/krita/plugins/filters/bumpmap/bumpmap.cc @@ -30,15 +30,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -72,14 +72,14 @@ typedef KGenericFactory KritaBumpmapFactory; K_EXPORT_COMPONENT_FACTORY( kritabumpmap, KritaBumpmapFactory( "krita" ) ) -KritaBumpmap::KritaBumpmap(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaBumpmap::KritaBumpmap(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaBumpmapFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterBumpmap()); } } @@ -93,7 +93,7 @@ KisFilterBumpmap::KisFilterBumpmap() : KisFilter(id(), "map", i18n("&Bumpmap..." } namespace { - void convertRow(KisPaintDevice * orig, Q_UINT8 * row, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_UINT8 * lut, Q_INT32 waterlevel) + void convertRow(KisPaintDevice * orig, TQ_UINT8 * row, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_UINT8 * lut, TQ_INT32 waterlevel) { KisColorSpace * csOrig = orig->colorSpace(); @@ -109,7 +109,7 @@ namespace { } -void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* cfg, const QRect& rect) +void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* cfg, const TQRect& rect) { if (!src) return; if (!dst) return; @@ -120,17 +120,17 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi KisBumpmapConfiguration * config = (KisBumpmapConfiguration*)cfg; - Q_INT32 xofs, yofs; /// The x,y offset values - Q_INT32 lx, ly; /* X and Y components of light vector */ - Q_INT32 nz2, nzlz; /* nz^2, nz*lz */ - Q_INT32 background; /* Shade for vertical normals */ + TQ_INT32 xofs, yofs; /// The x,y offset values + TQ_INT32 lx, ly; /* X and Y components of light vector */ + TQ_INT32 nz2, nzlz; /* nz^2, nz*lz */ + TQ_INT32 background; /* Shade for vertical normals */ double compensation; /* Background compensation */ - Q_UINT8 lut[256]; /* Look-up table for modes */ + TQ_UINT8 lut[256]; /* Look-up table for modes */ double azimuth; double elevation; - Q_INT32 lz, nz; - Q_INT32 i; + TQ_INT32 lz, nz; + TQ_INT32 i; double n; // ------------------ Prepare parameters @@ -144,13 +144,13 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi elevation = M_PI * config->elevation / 180.0; /* Calculate the light vector */ - lx = (Q_INT32)(cos(azimuth) * cos(elevation) * 255.0); - ly = (Q_INT32)(sin(azimuth) * cos(elevation) * 255.0); + lx = (TQ_INT32)(cos(azimuth) * cos(elevation) * 255.0); + ly = (TQ_INT32)(sin(azimuth) * cos(elevation) * 255.0); - lz = (Q_INT32)(sin(elevation) * 255.0); + lz = (TQ_INT32)(sin(elevation) * 255.0); /* Calculate constant Z component of surface normal */ - nz = (Q_INT32)((6 * 255) / config->depth); + nz = (TQ_INT32)((6 * 255) / config->depth); nz2 = nz * nz; nzlz = nz * lz; @@ -188,7 +188,7 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi // Crate a grayscale layer from the bumpmap layer. - QRect bmRect; + TQRect bmRect; KisPaintDevice * bumpmap; if (!config->bumpmap.isNull() && src->image()) { @@ -235,16 +235,16 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi // ---------------------- Load initial three bumpmap scanlines KisColorSpace * srcCs = src->colorSpace(); - QValueVector channels = srcCs->channels(); + TQValueVector channels = srcCs->channels(); // One byte per pixel, converted from the bumpmap layer. - Q_UINT8 * bm_row1 = new Q_UINT8[bmRect.width()]; - Q_UINT8 * bm_row2 = new Q_UINT8[bmRect.width()]; - Q_UINT8 * bm_row3 = new Q_UINT8[bmRect.width()]; - Q_UINT8 * tmp_row; + TQ_UINT8 * bm_row1 = new TQ_UINT8[bmRect.width()]; + TQ_UINT8 * bm_row2 = new TQ_UINT8[bmRect.width()]; + TQ_UINT8 * bm_row3 = new TQ_UINT8[bmRect.width()]; + TQ_UINT8 * tmp_row; // ------------------- Map the bumps - Q_INT32 yofs1, yofs2, yofs3; + TQ_INT32 yofs1, yofs2, yofs3; // ------------------- Initialize offsets if (config->tiled) { @@ -262,7 +262,7 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi convertRow(bumpmap, bm_row3, bmRect.x(), yofs3+bmRect.top(), bmRect.width(), lut, config->waterlevel); for (int y = rect.top(); y<=rect.bottom(); y++) { - const Q_INT32 yBump = y+yofs; + const TQ_INT32 yBump = y+yofs; if(config->tiled || (bmRect.top()<=yBump && yBump<=bmRect.bottom()) ) { // Get the iterators KisHLineIteratorPixel dstIt = dst->createHLineIterator(rect.x(), y, rect.width(), true); @@ -272,12 +272,12 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi while (!srcIt.isDone() && !cancelRequested()) { if (srcIt.isSelected()) { - const Q_INT32 xBump = srcIt.x()+xofs; - Q_INT32 nx, ny; + const TQ_INT32 xBump = srcIt.x()+xofs; + TQ_INT32 nx, ny; // Calculate surface normal from bumpmap if (config->tiled || bmRect.left() <= xBump && xBump <= bmRect.right()) { - Q_INT32 xofs1, xofs2, xofs3; + TQ_INT32 xofs1, xofs2, xofs3; if (config->tiled) { xofs2 = MOD (xBump-bmRect.left(), bmRect.width()); xofs1 = MOD (xofs2 - 1, bmRect.width()); @@ -298,17 +298,17 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi } // Shade - Q_INT32 shade; + TQ_INT32 shade; if ((nx == 0) && (ny == 0)) { shade = background; } else { - Q_INT32 ndotl = (nx * lx) + (ny * ly) + nzlz; + TQ_INT32 ndotl = (nx * lx) + (ny * ly) + nzlz; if (ndotl < 0) { - shade = (Q_INT32)(compensation * config->ambient); + shade = (TQ_INT32)(compensation * config->ambient); } else { - shade = (Q_INT32)(ndotl / sqrt(nx * nx + ny * ny + nz2)); - shade = (Q_INT32)(shade + QMAX(0, (255 * compensation - shade)) * config->ambient / 255); + shade = (TQ_INT32)(ndotl / sqrt(nx * nx + ny * ny + nz2)); + shade = (TQ_INT32)(shade + TQMAX(0, (255 * compensation - shade)) * config->ambient / 255); } } @@ -347,15 +347,15 @@ void KisFilterBumpmap::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi } -KisFilterConfigWidget * KisFilterBumpmap::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev) +KisFilterConfigWidget * KisFilterBumpmap::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev) { - KisBumpmapConfigWidget * w = new KisBumpmapConfigWidget(this, dev, parent); + KisBumpmapConfigWidget * w = new KisBumpmapConfigWidget(this, dev, tqparent); return w; } -KisFilterConfiguration * KisFilterBumpmap::configuration(QWidget * w) +KisFilterConfiguration * KisFilterBumpmap::configuration(TQWidget * w) { KisBumpmapConfigWidget * widget = dynamic_cast(w); @@ -376,7 +376,7 @@ KisFilterConfiguration * KisFilterBumpmap::configuration() KisBumpmapConfiguration::KisBumpmapConfiguration() : KisFilterConfiguration( "bumpmap", 1 ) { - bumpmap = QString::null; + bumpmap = TQString(); azimuth = 135.0; elevation = 45.0; depth = 3; @@ -389,11 +389,11 @@ KisBumpmapConfiguration::KisBumpmapConfiguration() tiled = true; type = krita::LINEAR; } -void KisBumpmapConfiguration::fromXML(const QString & s) +void KisBumpmapConfiguration::fromXML(const TQString & s) { KisFilterConfiguration::fromXML( s ); - bumpmap = QString::null; + bumpmap = TQString(); azimuth = 135.0; elevation = 45.0; depth = 3; @@ -406,7 +406,7 @@ void KisBumpmapConfiguration::fromXML(const QString & s) tiled = true; type = krita::LINEAR; - QVariant v; + TQVariant v; v = getProperty("bumpmap"); if (v.isValid()) { bumpmap = v.asString(); } @@ -436,31 +436,31 @@ void KisBumpmapConfiguration::fromXML(const QString & s) } -QString KisBumpmapConfiguration::toString() +TQString KisBumpmapConfiguration::toString() { m_properties.clear(); - //setProperty("bumpmap", QVariant(bumpmap)); - setProperty("azimuth", QVariant(azimuth)); - setProperty("elevation", QVariant(elevation)); - setProperty("depth", QVariant(depth)); - setProperty("xofs", QVariant(xofs)); - setProperty("yofs", QVariant(yofs)); - setProperty("waterlevel", QVariant(waterlevel)); - setProperty("ambient", QVariant(ambient)); - setProperty("compensate", QVariant(compensate)); - setProperty("invert", QVariant(invert)); - setProperty("tiled", QVariant(tiled)); - setProperty("type", QVariant(type)); + //setProperty("bumpmap", TQVariant(bumpmap)); + setProperty("azimuth", TQVariant(azimuth)); + setProperty("elevation", TQVariant(elevation)); + setProperty("depth", TQVariant(depth)); + setProperty("xofs", TQVariant(xofs)); + setProperty("yofs", TQVariant(yofs)); + setProperty("waterlevel", TQVariant(waterlevel)); + setProperty("ambient", TQVariant(ambient)); + setProperty("compensate", TQVariant(compensate)); + setProperty("invert", TQVariant(invert)); + setProperty("tiled", TQVariant(tiled)); + setProperty("type", TQVariant(type)); return KisFilterConfiguration::toString(); } -KisBumpmapConfigWidget::KisBumpmapConfigWidget(KisFilter *, KisPaintDeviceSP dev, QWidget * parent, const char * name, WFlags f) - : KisFilterConfigWidget(parent, name, f) +KisBumpmapConfigWidget::KisBumpmapConfigWidget(KisFilter *, KisPaintDeviceSP dev, TQWidget * tqparent, const char * name, WFlags f) + : KisFilterConfigWidget(tqparent, name, f) { m_page = new WdgBumpmap(this); - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); Q_CHECK_PTR(l); l->add(m_page); @@ -475,19 +475,19 @@ KisBumpmapConfigWidget::KisBumpmapConfigWidget(KisFilter *, KisPaintDeviceSP dev } // Connect all of the widgets to update signal - connect( m_page->radioLinear, SIGNAL( toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->radioSpherical, SIGNAL( toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->radioSinusoidal, SIGNAL( toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->chkCompensate, SIGNAL( toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->chkInvert, SIGNAL( toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->chkTiled, SIGNAL( toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->dblAzimuth, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->dblElevation, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->dblDepth, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->intXOffset, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->intYOffset, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->intWaterLevel, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->intAmbient, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->radioLinear, TQT_SIGNAL( toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->radioSpherical, TQT_SIGNAL( toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->radioSinusoidal, TQT_SIGNAL( toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->chkCompensate, TQT_SIGNAL( toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->chkInvert, TQT_SIGNAL( toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->chkTiled, TQT_SIGNAL( toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->dblAzimuth, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->dblElevation, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->dblDepth, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->intXOffset, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->intYOffset, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->intWaterLevel, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->intAmbient, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); } KisBumpmapConfiguration * KisBumpmapConfigWidget::config() diff --git a/krita/plugins/filters/bumpmap/bumpmap.h b/krita/plugins/filters/bumpmap/bumpmap.h index 1813b922..2b221632 100644 --- a/krita/plugins/filters/bumpmap/bumpmap.h +++ b/krita/plugins/filters/bumpmap/bumpmap.h @@ -22,7 +22,7 @@ #ifndef BUMPMAP_H #define BUMPMAP_H -#include +#include #include @@ -49,7 +49,7 @@ using namespace krita; class KritaBumpmap : public KParts::Plugin { public: - KritaBumpmap(QObject *parent, const char *name, const QStringList &); + KritaBumpmap(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaBumpmap(); }; @@ -67,7 +67,7 @@ class KisFilterBumpmap : public KisFilter public: KisFilterBumpmap(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); virtual ColorSpaceIndependence colorSpaceIndependence() { return TO_LAB16; }; static inline KisID id() { return KisID("bumpmap", i18n("Bumpmap")); }; virtual bool supportsPainting() { return true; } @@ -76,8 +76,8 @@ public: virtual bool supportsAdjustmentLayers() { return false; } virtual bool supportsThreading() { return false; } - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration * configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration * configuration(TQWidget*); virtual KisFilterConfiguration * configuration(); }; @@ -89,19 +89,19 @@ class KisBumpmapConfiguration : public KisFilterConfiguration { public: KisBumpmapConfiguration(); - virtual void fromXML( const QString& ); - virtual QString toString(); + virtual void fromXML( const TQString& ); + virtual TQString toString(); public: - QString bumpmap; + TQString bumpmap; double azimuth; double elevation; double depth; - Q_INT32 xofs; - Q_INT32 yofs; - Q_INT32 waterlevel; - Q_INT32 ambient; + TQ_INT32 xofs; + TQ_INT32 yofs; + TQ_INT32 waterlevel; + TQ_INT32 ambient; bool compensate; bool invert; bool tiled; @@ -113,9 +113,10 @@ public: class KisBumpmapConfigWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisBumpmapConfigWidget(KisFilter * filter, KisPaintDeviceSP dev, QWidget * parent, const char * name = 0, WFlags f = 0 ); + KisBumpmapConfigWidget(KisFilter * filter, KisPaintDeviceSP dev, TQWidget * tqparent, const char * name = 0, WFlags f = 0 ); virtual ~KisBumpmapConfigWidget() {}; KisBumpmapConfiguration * config(); diff --git a/krita/plugins/filters/bumpmap/wdgbumpmap.ui b/krita/plugins/filters/bumpmap/wdgbumpmap.ui index 000b15f6..a783dd85 100644 --- a/krita/plugins/filters/bumpmap/wdgbumpmap.ui +++ b/krita/plugins/filters/bumpmap/wdgbumpmap.ui @@ -1,6 +1,6 @@ WdgBumpmap - + WdgBumpmap @@ -16,7 +16,7 @@ unnamed - + frame3 @@ -30,7 +30,7 @@ unnamed - + textLabel2 @@ -52,7 +52,7 @@ layer, the current layer will be used. RichText - + WordBreak|AlignVCenter @@ -66,7 +66,7 @@ layer, the current layer will be used. Expanding - + 20 40 @@ -75,14 +75,14 @@ layer, the current layer will be used. - + grpSettings Settings - + AlignAuto @@ -103,7 +103,7 @@ layer, the current layer will be used. 45 - + textLabel4 @@ -114,7 +114,7 @@ layer, the current layer will be used. dblElevation - + textLabel5 @@ -139,7 +139,7 @@ layer, the current layer will be used. 3 - + textLabel3 @@ -174,7 +174,7 @@ layer, the current layer will be used. 255 - + textLabel8 @@ -185,7 +185,7 @@ layer, the current layer will be used. intWaterLevel - + textLabel9 @@ -204,7 +204,7 @@ layer, the current layer will be used. -99 - + textLabel7 @@ -215,7 +215,7 @@ layer, the current layer will be used. intYOffset - + textLabel6 @@ -239,7 +239,7 @@ layer, the current layer will be used. - + grpType @@ -250,7 +250,7 @@ layer, the current layer will be used. unnamed - + radioLinear @@ -261,7 +261,7 @@ layer, the current layer will be used. true - + radioSpherical @@ -269,7 +269,7 @@ layer, the current layer will be used. &Spherical - + radioSinusoidal @@ -279,7 +279,7 @@ layer, the current layer will be used. - + grpOptions @@ -290,7 +290,7 @@ layer, the current layer will be used. unnamed - + chkCompensate @@ -301,7 +301,7 @@ layer, the current layer will be used. true - + chkTiled @@ -309,7 +309,7 @@ layer, the current layer will be used. &Tile bumpmap - + chkInvert @@ -319,7 +319,7 @@ layer, the current layer will be used. - + lblLayer @@ -360,7 +360,7 @@ layer, the current layer will be used. intWaterLevel intAmbient - + knuminput.h knuminput.h diff --git a/krita/plugins/filters/cimg/CImg.h b/krita/plugins/filters/cimg/CImg.h index 23c7e221..8a13b54d 100644 --- a/krita/plugins/filters/cimg/CImg.h +++ b/krita/plugins/filters/cimg/CImg.h @@ -659,7 +659,7 @@ namespace cimg_library { - \b CImgDisplayException : Thrown when an error occured when trying to display an image in a window. This exception is thrown when image display request cannot be satisfied. - The parent class CImgException may be thrown itself when errors that cannot be classified in one of + The tqparent class CImgException may be thrown itself when errors that cannot be classified in one of the above type occur. It is recommended not to throw CImgExceptions yourself, since there are normally reserved to %CImg Library functions. \b CImgInstanceException, \b CImgArgumentException, \b CImgIOException and \b CImgDisplayException are simple @@ -3749,8 +3749,8 @@ namespace cimg_library { then this image is displayed in the current display window. \param list : The list of images to display. \param axe : The axe used to append the image for visualization. Can be 'x' (default),'y','z' or 'v'. - \param align : Defines the relative alignment of images when displaying images of different sizes. - Can be '\p c' (centered, which is the default), '\p p' (top alignment) and '\p n' (bottom aligment). + \param align : Defines the relative tqalignment of images when displaying images of different sizes. + Can be '\p c' (centered, which is the default), '\p p' (top tqalignment) and '\p n' (bottom aligment). \see CImg::get_append() **/ @@ -4241,7 +4241,7 @@ namespace cimg_library { vtemplate.visualid = XVisualIDFromVisual(visual); int nb_visuals; XVisualInfo *vinfo = XGetVisualInfo(cimg::X11attr().display,VisualIDMask,&vtemplate,&nb_visuals); - if (vinfo && vinfo->red_maskblue_mask) cimg::X11attr().blue_first = true; + if (vinfo && vinfo->red_tqmaskblue_tqmask) cimg::X11attr().blue_first = true; cimg::X11attr().byte_order = ImageByteOrder(cimg::X11attr().display); cimg::X11attr().event_thread = new pthread_t; pthread_create(cimg::X11attr().event_thread,NULL,thread_lowlevel,NULL); @@ -4425,11 +4425,11 @@ namespace cimg_library { pthread_mutex_lock(cimg::X11attr().mutex); for (unsigned int i=0; ievents)&3; - const unsigned int emask = + const unsigned int etqmask = ((xevent_type>=1)?ExposureMask|StructureNotifyMask:0)| ((xevent_type>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)| ((xevent_type>=3)?ButtonReleaseMask|KeyReleaseMask:0); - XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,emask); + XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,etqmask); } bool event_flag = XCheckTypedEvent(cimg::X11attr().display, ClientMessage, &event); if (!event_flag) event_flag = XCheckMaskEvent(cimg::X11attr().display, @@ -4599,10 +4599,10 @@ namespace cimg_library { do { pthread_mutex_lock(cimg::X11attr().mutex); const unsigned int - emask = ExposureMask|StructureNotifyMask| + etqmask = ExposureMask|StructureNotifyMask| ((events>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)| ((events>=3)?ButtonReleaseMask|KeyReleaseMask:0); - XSelectInput(cimg::X11attr().display,window,emask); + XSelectInput(cimg::X11attr().display,window,etqmask); XPeekEvent(cimg::X11attr().display,&event); cimg::X11attr().thread_finished = false; pthread_mutex_unlock(cimg::X11attr().mutex); @@ -5144,7 +5144,7 @@ namespace cimg_library { \par Image structure - The \ref CImg<\c T> structure contains \a five fields : + The \ref CImg<\c T> structure tqcontains \a five fields : - \ref width defines the number of \a columns of the image (size along the X-axis). - \ref height defines the number of \a rows of the image (size along the Y-axis). - \ref depth defines the number of \a slices of the image (size along the Z-axis). @@ -7772,7 +7772,7 @@ namespace cimg_library { //! Return a resized image. /** - \param src = Image giving the geometry of the resize. + \param src = Image giving the tqgeometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). @@ -7788,7 +7788,7 @@ namespace cimg_library { //! Return a resized image. /** - \param disp = Display giving the geometry of the resize. + \param disp = Display giving the tqgeometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). @@ -7830,7 +7830,7 @@ namespace cimg_library { //! Resize the image. /** - \param src = Image giving the geometry of the resize. + \param src = Image giving the tqgeometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). @@ -7846,7 +7846,7 @@ namespace cimg_library { //! Resize the image /** - \param disp = Display giving the geometry of the resize. + \param disp = Display giving the tqgeometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). @@ -7867,13 +7867,13 @@ namespace cimg_library { CImg get_resize_halfXY() const { typedef typename cimg::largest::type ftype; if (is_empty()) return CImg(); - CImg mask = CImg::matrix(0.07842776544f, 0.1231940459f, 0.07842776544f, + CImg tqmask = CImg::matrix(0.07842776544f, 0.1231940459f, 0.07842776544f, 0.1231940459f, 0.1935127547f, 0.1231940459f, 0.07842776544f, 0.1231940459f, 0.07842776544f); CImg_3x3x1(I,ftype); CImg dest(width/2,height/2,depth,dim); cimg_mapZV(*this,z,k) cimg_map3x3x1(*this,x,y,z,k,I) - if (x%2 && y%2) dest(x/2,y/2,z,k) = (T)cimg_conv3x3x1(I,mask); + if (x%2 && y%2) dest(x/2,y/2,z,k) = (T)cimg_conv3x3x1(I,tqmask); return dest; } @@ -8799,8 +8799,8 @@ namespace cimg_library { - -1 = Backward finite differences - 0 = Centered finite differences - 1 = Forward finite differences - - 2 = Using Sobel masks - - 3 = Using rotation invariant masks + - 2 = Using Sobel tqmasks + - 3 = Using rotation invariant tqmasks - 4 = Using Deriche recusrsive filter. **/ CImgl::type> get_gradientXY(const int scheme=0) const { @@ -8816,7 +8816,7 @@ namespace cimg_library { CImg_2x2x1(I,restype); cimg_mapZV(*this,z,k) cimg_map2x2x1(*this,x,y,z,k,I) { res[0](x,y,0,k) = Inc-Icc; res[1](x,y,z,k) = Icn-Icc; } } break; - case 2: { // using Sobel mask + case 2: { // using Sobel tqmask CImg_3x3x1(I,restype); const float a = 1, b = 2; cimg_mapZV(*this,z,k) cimg_map3x3x1(*this,x,y,z,k,I) { @@ -8824,7 +8824,7 @@ namespace cimg_library { res[1](x,y,z,k) = -a*Ipp-b*Icp-a*Inp+a*Ipn+b*Icn+a*Inn; } } break; - case 3: { // using rotation invariant mask + case 3: { // using rotation invariant tqmask CImg_3x3x1(I,restype); const float a = (float)(0.25*(2-std::sqrt(2.0))), b = (float)(0.5f*(std::sqrt(2.0)-1)); cimg_mapZV(*this,z,k) cimg_map3x3x1(*this,x,y,z,k,I) { @@ -9822,45 +9822,45 @@ namespace cimg_library { } #endif - //! Draw a masked sprite image in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0). + //! Draw a tqmasked sprite image in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0). /** \param sprite = sprite image. - \param mask = mask image. + \param tqmask = tqmask image. \param x0 = X-coordinate of the sprite position in the instance image. \param y0 = Y-coordinate of the sprite position in the instance image. \param z0 = Z-coordinate of the sprite position in the instance image. \param v0 = V-coordinate of the sprite position in the instance image. - \param mask_valmax = Maximum pixel value of the mask image \c mask. + \param tqmask_valmax = Maximum pixel value of the tqmask image \c tqmask. \param opacity = opacity of the drawing. - \note Pixel values of \c mask set the opacity of the corresponding pixels in \c sprite. + \note Pixel values of \c tqmask set the opacity of the corresponding pixels in \c sprite. \note Clipping is supported. - \note Dimensions along x,y and z of \c sprite and \c mask must be the same. + \note Dimensions along x,y and z of \c sprite and \c tqmask must be the same. **/ - template CImg& draw_image(const CImg& sprite,const CImg& mask, + template CImg& draw_image(const CImg& sprite,const CImg& tqmask, const int x0=0,const int y0=0,const int z0=0,const int v0=0, - const tm mask_valmax=1,const float opacity=1) { + const tm tqmask_valmax=1,const float opacity=1) { if (!is_empty()) { if (sprite.is_empty()) throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.", pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data); - if (mask.is_empty()) - throw CImgArgumentException("CImg<%s>::draw_image() : Specified mask image (%u,%u,%u,%u,%p) is empty.", - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); - if ((void*)this==(void*)&sprite) return draw_image(CImg(sprite),mask,x0,y0,z0,v0); - if(mask.width!=sprite.width || mask.height!=sprite.height || mask.depth!=sprite.depth) + if (tqmask.is_empty()) + throw CImgArgumentException("CImg<%s>::draw_image() : Specified tqmask image (%u,%u,%u,%u,%p) is empty.", + pixel_type(),tqmask.width,tqmask.height,tqmask.depth,tqmask.dim,tqmask.data); + if ((void*)this==(void*)&sprite) return draw_image(CImg(sprite),tqmask,x0,y0,z0,v0); + if(tqmask.width!=sprite.width || tqmask.height!=sprite.height || tqmask.depth!=sprite.depth) throw CImgArgumentException("CImg<%s>::draw_image() : Mask dimension is (%u,%u,%u,%u), while sprite is (%u,%u,%u,%u)", - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,sprite.width,sprite.height,sprite.depth,sprite.dim); + pixel_type(),tqmask.width,tqmask.height,tqmask.depth,tqmask.dim,sprite.width,sprite.height,sprite.depth,sprite.dim); const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0); const int lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0), lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0), lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0), lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0); - const int coff = -(bx?x0:0)-(by?y0*mask.dimx():0)-(bz?z0*mask.dimx()*mask.dimy():0)- - (bv?v0*mask.dimx()*mask.dimy()*mask.dimz():0), - ssize = mask.dimx()*mask.dimy()*mask.dimz(); + const int coff = -(bx?x0:0)-(by?y0*tqmask.dimx():0)-(bz?z0*tqmask.dimx()*tqmask.dimy():0)- + (bv?v0*tqmask.dimx()*tqmask.dimy()*tqmask.dimz():0), + ssize = tqmask.dimx()*tqmask.dimy()*tqmask.dimz(); const ti *ptrs = sprite.ptr() + coff; - const tm *ptrm = mask.ptr() + coff; + const tm *ptrm = tqmask.ptr() + coff; const unsigned int offX = width-lX, soffX = sprite.width-lX, offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY), @@ -9868,13 +9868,13 @@ namespace cimg_library { T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0); if (lX>0 && lY>0 && lZ>0 && lV>0) for (int v=0; v=512) draw_image(letter,mask,x,y,0,0,(T)1,opacity); else draw_image(letter,x,y,0,0,opacity); + if (!tqmask(p)) cimg_mapV(*this,k) letter(p,0,0,k)=bgcolor[k]; + if (!bgcolor && font.size>=512) draw_image(letter,tqmask,x,y,0,0,(T)1,opacity); else draw_image(letter,x,y,0,0,opacity); x+=letter.width; } break; @@ -11163,11 +11163,11 @@ namespace cimg_library { \param y = Y-coordinate of the starting point of the region to fill. \param z = Z-coordinate of the starting point of the region to fill. \param color = an array of dimv() values of type \c T, defining the drawing color. - \param region = image that will contain the mask of the filled region mask, as an output. + \param region = image that will contain the tqmask of the filled region tqmask, as an output. \param sigma = tolerance concerning neighborhood values. \param opacity = opacity of the drawing. - \return \p region is initialized with the binary mask of the filled region. + \return \p region is initialized with the binary tqmask of the filled region. **/ template CImg& draw_fill(const int x,const int y,const int z, const T *const color, CImg& region,const float sigma=0, @@ -11963,107 +11963,107 @@ namespace cimg_library { //@{ //---------------------------- - //! Return the correlation of the image by a mask. + //! Return the correlation of the image by a tqmask. /** - The result \p res of the correlation of an image \p img by a mask \p mask is defined to be : + The result \p res of the correlation of an image \p img by a tqmask \p tqmask is defined to be : - res(x,y,z) = sum_{i,j,k} img(x+i,y+j,z+k)*mask(i,j,k) + res(x,y,z) = sum_{i,j,k} img(x+i,y+j,z+k)*tqmask(i,j,k) - \param mask = the correlation kernel. + \param tqmask = the correlation kernel. \param cond = the border condition type (0=zero, 1=dirichlet) \param weighted_correl = enable local normalization. **/ template CImg::type> - get_correlate(const CImg& mask,const unsigned int cond=1,const bool weighted_correl=false) const { + get_correlate(const CImg& tqmask,const unsigned int cond=1,const bool weighted_correl=false) const { typedef typename cimg::largest::type restype; typedef typename cimg::largest::type fftype; typedef typename cimg::largest::type ftype; if (is_empty()) return CImg(); - if (mask.is_empty() || mask.dim!=1) - throw CImgArgumentException("CImg<%s>::get_correlate() : Specified mask (%u,%u,%u,%u,%p) is not scalar.", - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); + if (tqmask.is_empty() || tqmask.dim!=1) + throw CImgArgumentException("CImg<%s>::get_correlate() : Specified tqmask (%u,%u,%u,%u,%p) is not scalar.", + pixel_type(),tqmask.width,tqmask.height,tqmask.depth,tqmask.dim,tqmask.data); CImg dest(*this,false); - if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) { - // A special optimization is done for 2x2,3x3,4x4,5x5,2x2x2 and 3x3x3 mask (with cond=1) - switch (mask.depth) { + if (cond && tqmask.width==tqmask.height && ((tqmask.depth==1 && tqmask.width<=5) || (tqmask.depth==tqmask.width && tqmask.width<=3))) { + // A special optimization is done for 2x2,3x3,4x4,5x5,2x2x2 and 3x3x3 tqmask (with cond=1) + switch (tqmask.depth) { case 3: { CImg_3x3x3(I,T); - if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3x3(I,mask); + if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3x3(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map3x3x3(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3x3(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3x3(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3x3(I,tqmask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2x2(I,T); - if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2x2(I,mask); + if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2x2(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map2x2x2(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2x2(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2x2(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2x2(I,tqmask)/std::sqrt(norm)):0; } } break; default: case 1: - switch (mask.width) { + switch (tqmask.width) { case 5: { CImg_5x5x1(I,T); - if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map5x5x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr5x5x1(I,mask); + if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map5x5x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr5x5x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map5x5x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum5x5x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr5x5x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr5x5x1(I,tqmask)/std::sqrt(norm)):0; } } break; case 4: { CImg_4x4x1(I,T); - if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map4x4x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr4x4x1(I,mask); + if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map4x4x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr4x4x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map4x4x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum4x4x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr4x4x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr4x4x1(I,tqmask)/std::sqrt(norm)):0; } } break; case 3: { CImg_3x3x1(I,T); - if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map3x3x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3x1(I,mask); + if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map3x3x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map3x3x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3x1(I,tqmask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2x1(I,T); - if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map2x2x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2x1(I,mask); + if (!weighted_correl) cimg_mapZV(*this,z,v) cimg_map2x2x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map2x2x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2x1(I,tqmask)/std::sqrt(norm)):0; } } break; - case 1: dest = mask(0)*(*this); break; + case 1: dest = tqmask(0)*(*this); break; } } } else { - // Generic version for other masks - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); + // Generic version for other tqmasks + const int cxm=tqmask.width/2, cym=tqmask.height/2, czm=tqmask.depth/2, fxm=cxm-1+(tqmask.width%2), fym=cym-1+(tqmask.height%2), fzm=czm-1+(tqmask.depth%2); cimg_mapV(*this,v) if (!weighted_correl) { // Classical correlation for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - val+= pix3d(x+xm,y+ym,z+zm,v)*mask(cxm+xm,cym+ym,czm+zm,0); + val+= pix3d(x+xm,y+ym,z+zm,v)*tqmask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } else cimg_mapYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - val+= pix3d(x+xm,y+ym,z+zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0); + val+= pix3d(x+xm,y+ym,z+zm,v,0)*tqmask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } } else { // Weighted correlation @@ -12071,7 +12071,7 @@ namespace cimg_library { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = (*this)(x+xm,y+ym,z+zm,v); - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); + val+= cval*tqmask(cxm+xm,cym+ym,czm+zm,0); norm+= cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0; @@ -12081,7 +12081,7 @@ namespace cimg_library { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x+xm,y+ym,z+zm,v); - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); + val+= cval*tqmask(cxm+xm,cym+ym,czm+zm,0); norm+=cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0; @@ -12091,7 +12091,7 @@ namespace cimg_library { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x+xm,y+ym,z+zm,v,0); - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); + val+= cval*tqmask(cxm+xm,cym+ym,czm+zm,0); norm+= cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0; @@ -12102,115 +12102,115 @@ namespace cimg_library { } - //! Correlate the image by a mask + //! Correlate the image by a tqmask /** This is the in-place version of get_correlate. \see get_correlate **/ - template CImg& correlate(const CImg& mask,const unsigned int cond=1,const bool weighted_correl=false) { - return get_correlate(mask,cond,weighted_correl).swap(*this); + template CImg& correlate(const CImg& tqmask,const unsigned int cond=1,const bool weighted_correl=false) { + return get_correlate(tqmask,cond,weighted_correl).swap(*this); } - //! Return the convolution of the image by a mask + //! Return the convolution of the image by a tqmask /** - The result \p res of the convolution of an image \p img by a mask \p mask is defined to be : + The result \p res of the convolution of an image \p img by a tqmask \p tqmask is defined to be : - res(x,y,z) = sum_{i,j,k} img(x-i,y-j,z-k)*mask(i,j,k) + res(x,y,z) = sum_{i,j,k} img(x-i,y-j,z-k)*tqmask(i,j,k) - \param mask = the correlation kernel. + \param tqmask = the correlation kernel. \param cond = the border condition type (0=zero, 1=dirichlet) \param weighted_convol = enable local normalization. **/ template CImg::type> - get_convolve(const CImg& mask,const unsigned int cond=1,const bool weighted_convol=false) const { + get_convolve(const CImg& tqmask,const unsigned int cond=1,const bool weighted_convol=false) const { typedef typename cimg::largest::type restype; typedef typename cimg::largest::type fftype; typedef typename cimg::largest::type ftype; if (is_empty()) return CImg(); - if (mask.is_empty() || mask.dim!=1) - throw CImgArgumentException("CImg<%s>::get_convolve() : Specified mask (%u,%u,%u,%u,%p) is not scalar.", - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); + if (tqmask.is_empty() || tqmask.dim!=1) + throw CImgArgumentException("CImg<%s>::get_convolve() : Specified tqmask (%u,%u,%u,%u,%p) is not scalar.", + pixel_type(),tqmask.width,tqmask.height,tqmask.depth,tqmask.dim,tqmask.data); CImg dest(*this,false); - if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) { // optimized version - switch (mask.depth) { + if (cond && tqmask.width==tqmask.height && ((tqmask.depth==1 && tqmask.width<=5) || (tqmask.depth==tqmask.width && tqmask.width<=3))) { // optimized version + switch (tqmask.depth) { case 3: { CImg_3x3x3(I,T); - if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv3x3x3(I,mask); + if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv3x3x3(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map3x3x3(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3x3(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3x3(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3x3(I,tqmask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2x2(I,T); - if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv2x2x2(I,mask); + if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv2x2x2(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map2x2x2(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2x2(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2x2(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2x2(I,tqmask)/std::sqrt(norm)):0; } } break; default: case 1: - switch (mask.width) { + switch (tqmask.width) { case 5: { CImg_5x5x1(I,T); - if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map5x5x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv5x5x1(I,mask); + if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map5x5x1(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv5x5x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map5x5x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum5x5x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv5x5x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv5x5x1(I,tqmask)/std::sqrt(norm)):0; } } break; case 4: { CImg_4x4x1(I,T); - if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map4x4x1(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv4x4x1(I,mask); + if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map4x4x1(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv4x4x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map4x4x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum4x4x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv4x4x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv4x4x1(I,tqmask)/std::sqrt(norm)):0; } } break; case 3: { CImg_3x3x1(I,T); - if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map3x3x1(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv3x3x1(I,mask); + if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map3x3x1(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv3x3x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map3x3x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3x1(I,tqmask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2x1(I,T); - if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map2x2x1(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv2x2x1(I,mask); + if (!weighted_convol) cimg_mapZV(*this,z,v) cimg_map2x2x1(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv2x2x1(I,tqmask); else cimg_mapZV(*this,z,v) cimg_map2x2x1(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2x1(I); - dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2x1(I,mask)/std::sqrt(norm)):0; + dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2x1(I,tqmask)/std::sqrt(norm)):0; } } break; - case 1: dest = mask(0)*(*this); break; + case 1: dest = tqmask(0)*(*this); break; } } } else { // generic version - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); + const int cxm=tqmask.width/2, cym=tqmask.height/2, czm=tqmask.depth/2, fxm=cxm-1+(tqmask.width%2), fym=cym-1+(tqmask.height%2), fzm=czm-1+(tqmask.depth%2); cimg_mapV(*this,v) if (!weighted_convol) { // Classical convolution for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - val+= pix3d(x-xm,y-ym,z-zm,v)*mask(cxm+xm,cym+ym,czm+zm,0); + val+= pix3d(x-xm,y-ym,z-zm,v)*tqmask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } else cimg_mapYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - val+= pix3d(x-xm,y-ym,z-zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0); + val+= pix3d(x-xm,y-ym,z-zm,v,0)*tqmask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } } else { // Weighted convolution @@ -12218,7 +12218,7 @@ namespace cimg_library { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = (*this)(x-xm,y-ym,z-zm,v); - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); + val+= cval*tqmask(cxm+xm,cym+ym,czm+zm,0); norm+= cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0; @@ -12228,7 +12228,7 @@ namespace cimg_library { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x-xm,y-ym,z-zm,v); - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); + val+= cval*tqmask(cxm+xm,cym+ym,czm+zm,0); norm+=cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0; @@ -12238,7 +12238,7 @@ namespace cimg_library { double val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x-xm,y-ym,z-zm,v,0); - val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); + val+= cval*tqmask(cxm+xm,cym+ym,czm+zm,0); norm+= cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0; @@ -12248,46 +12248,46 @@ namespace cimg_library { return dest; } - //! Convolve the image by a mask + //! Convolve the image by a tqmask /** This is the in-place version of get_convolve(). \see get_convolve() **/ - template CImg& convolve(const CImg& mask,const unsigned int cond=1,const bool weighted_convol=false) { - return get_convolve(mask,cond,weighted_convol).swap(*this); + template CImg& convolve(const CImg& tqmask,const unsigned int cond=1,const bool weighted_convol=false) { + return get_convolve(tqmask,cond,weighted_convol).swap(*this); } //! Return the erosion of the image by a structuring element. template CImg::type> - get_erode(const CImg& mask, const unsigned int cond=1, const bool weighted_erosion=false) const { + get_erode(const CImg& tqmask, const unsigned int cond=1, const bool weighted_erosion=false) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); - if (mask.is_empty() || mask.dim!=1) - throw CImgArgumentException("CImg<%s>::get_erosion() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.", - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); + if (tqmask.is_empty() || tqmask.dim!=1) + throw CImgArgumentException("CImg<%s>::get_erosion() : Specified tqmask (%u,%u,%u,%u,%p) is not a scalar image.", + pixel_type(),tqmask.width,tqmask.height,tqmask.depth,tqmask.dim,tqmask.data); CImg dest(*this,false); - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, - fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); + const int cxm=tqmask.width/2, cym=tqmask.height/2, czm=tqmask.depth/2, + fxm=cxm-1+(tqmask.width%2), fym=cym-1+(tqmask.height%2), fzm=czm-1+(tqmask.depth%2); cimg_mapV(*this,v) if (!weighted_erosion) { // Classical erosion for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, min_val = cimg::get_type_max(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v),min_val); + if (tqmask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v),min_val); dest(x,y,z,v)=min_val; } else cimg_mapYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, min_val = cimg::get_type_max(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v,0),min_val); + if (tqmask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v,0),min_val); dest(x,y,z,v)=min_val; } } else { // Weighted erosion @@ -12295,21 +12295,21 @@ namespace cimg_library { for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, min_val = cimg::get_type_max(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v)+mval),min_val); + if ((mval=tqmask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v)+mval),min_val); dest(x,y,z,v)=min_val; } else cimg_mapYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, min_val = cimg::get_type_max(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v,0)+mval),min_val); + if ((mval=tqmask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v,0)+mval),min_val); dest(x,y,z,v)=min_val; } } @@ -12321,14 +12321,14 @@ namespace cimg_library { This is the in-place version of get_erode(). \see get_erode() **/ - template CImg& erode(const CImg& mask,const unsigned int cond=1,const bool weighted_erosion=false) { - return get_erode(mask,cond,weighted_erosion).swap(*this); + template CImg& erode(const CImg& tqmask,const unsigned int cond=1,const bool weighted_erosion=false) { + return get_erode(tqmask,cond,weighted_erosion).swap(*this); } //! Erode the image by a square structuring element of size n CImg get_erode(const unsigned int n=1, const unsigned int cond=1) const { - static const CImg mask(3,3,1,1,1); - return get_erode(mask,cond,false); + static const CImg tqmask(3,3,1,1,1); + return get_erode(tqmask,cond,false); } //! Erode the image by a square structuring element of size n @@ -12338,35 +12338,35 @@ namespace cimg_library { //! Return the dilatation of the image by a structuring element. template CImg::type> - get_dilate(const CImg& mask, const unsigned int cond=1, const bool weighted_dilatation=false) const { + get_dilate(const CImg& tqmask, const unsigned int cond=1, const bool weighted_dilatation=false) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); - if (mask.is_empty() || mask.dim!=1) - throw CImgArgumentException("CImg<%s>::get_dilate() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.", - pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); + if (tqmask.is_empty() || tqmask.dim!=1) + throw CImgArgumentException("CImg<%s>::get_dilate() : Specified tqmask (%u,%u,%u,%u,%p) is not a scalar image.", + pixel_type(),tqmask.width,tqmask.height,tqmask.depth,tqmask.dim,tqmask.data); CImg dest(*this,false); - const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, - fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); + const int cxm=tqmask.width/2, cym=tqmask.height/2, czm=tqmask.depth/2, + fxm=cxm-1+(tqmask.width%2), fym=cym-1+(tqmask.height%2), fzm=czm-1+(tqmask.depth%2); cimg_mapV(*this,v) if (!weighted_dilatation) { // Classical dilatation for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, max_val = cimg::get_type_min(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v),max_val); + if (tqmask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v),max_val); dest(x,y,z,v)=max_val; } else cimg_mapYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, max_val = cimg::get_type_min(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v,0),max_val); + if (tqmask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v,0),max_val); dest(x,y,z,v)=max_val; } } else { // Weighted dilatation @@ -12374,21 +12374,21 @@ namespace cimg_library { for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, max_val = cimg::get_type_min(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v)-mval),max_val); + if ((mval=tqmask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v)-mval),max_val); dest(x,y,z,v)=max_val; } else cimg_mapYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype foo, max_val = cimg::get_type_min(foo); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) - if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v,0)-mval),max_val); + if ((mval=tqmask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v,0)-mval),max_val); dest(x,y,z,v)=max_val; } } @@ -12400,14 +12400,14 @@ namespace cimg_library { This is the in-place version of get_dilate(). \see get_dilate() **/ - template CImg& dilate(const CImg& mask,const unsigned int cond=1,const bool weighted_dilatation=false) { - return get_dilate(mask,cond,weighted_dilatation).swap(*this); + template CImg& dilate(const CImg& tqmask,const unsigned int cond=1,const bool weighted_dilatation=false) { + return get_dilate(tqmask,cond,weighted_dilatation).swap(*this); } //! Dilate the image by a square structuring element of size n CImg get_dilate(const unsigned int n=1, const unsigned int cond=1) const { - static const CImg mask(3,3,1,1,1); - return get_dilate(mask,cond,false); + static const CImg tqmask(3,3,1,1,1); + return get_dilate(tqmask,cond,false); } //! Dilate the image by a square structuring element of size n @@ -12881,7 +12881,7 @@ namespace cimg_library { \param sharpness = define the contour preservation. \param anisotropy = define the smoothing anisotropy. \param alpha = image pre-blurring (gaussian). - \param sigma = regularity of the tensor-valued geometry. + \param sigma = regularity of the tensor-valued tqgeometry. \param dl = spatial discretization. \param da = angular discretization. \param gauss_prec = precision of the gaussian function. @@ -14723,27 +14723,27 @@ namespace cimg_library { switch (bpp) { case 1: { // Monochrome for (int y=res.height-1; y>=0; y--) { - unsigned char mask = 0x80, val = 0; + unsigned char tqmask = 0x80, val = 0; cimg_mapX(res,x) { - if (mask==0x80) val = *(ptrs++); - const unsigned char *col = (unsigned char*)(palette+(val&mask?1:0)); + if (tqmask==0x80) val = *(ptrs++); + const unsigned char *col = (unsigned char*)(palette+(val&tqmask?1:0)); res(x,y,2) = (T)*(col++); res(x,y,1) = (T)*(col++); res(x,y,0) = (T)*(col++); - mask = cimg::ror(mask); + tqmask = cimg::ror(tqmask); } ptrs+=align; } } break; case 4: { // 16 colors for (int y=res.height-1; y>=0; y--) { - unsigned char mask = 0xF0, val = 0; + unsigned char tqmask = 0xF0, val = 0; cimg_mapX(res,x) { - if (mask==0xF0) val = *(ptrs++); - const unsigned char color = (mask<16)?(val&mask):((val&mask)>>4); + if (tqmask==0xF0) val = *(ptrs++); + const unsigned char color = (tqmask<16)?(val&tqmask):((val&tqmask)>>4); unsigned char *col = (unsigned char*)(palette+color); res(x,y,2) = (T)*(col++); res(x,y,1) = (T)*(col++); res(x,y,0) = (T)*(col++); - mask = cimg::ror(mask,4); + tqmask = cimg::ror(tqmask,4); } ptrs+=align; } } break; case 8: { // 256 colors @@ -17550,7 +17550,7 @@ namespace cimg_library { //! Return a single image which is the concatenation of all images of the current CImgl instance. /** \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). + \param align : specify the tqalignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \return A CImg image corresponding to the concatenation is returned. **/ CImg get_append(const char axe='x',const char align='c') const { @@ -17670,9 +17670,9 @@ namespace cimg_library { for (unsigned int y=0; y>=1; if (!m) { m=0x80000000; val = *(ptr++); } - CImg& img = res[x/w], &mask = res[x/w+256]; + CImg& img = res[x/w], &tqmask = res[x/w+256]; unsigned int xm = x%w; - img(xm,y,0) = img(xm,y,1) = img(xm,y,2) = mask(xm,y,0) = (T)((val&m)?1:0); + img(xm,y,0) = img(xm,y,1) = img(xm,y,2) = tqmask(xm,y,0) = (T)((val&m)?1:0); } if (variable_size) res.crop_font(); if (paddingx || paddingy) cimgl_map(res,l) res[l].resize(res[l].dimx()+paddingx, res[l].dimy()+paddingy,1,-100,0); @@ -17740,7 +17740,7 @@ namespace cimg_library { The function returns immediately. \param disp : reference to an existing CImgDisplay instance, where the current image list will be displayed. \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). + \param align : specify the tqalignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \return A reference to the current CImgl instance is returned. **/ const CImgl& display(CImgDisplay& disp,const char axe='x',const char align='c') const { @@ -17755,7 +17755,7 @@ namespace cimg_library { The function returns when a key is pressed or the display window is closed by the user. \param title : specify the title of the opening display window. \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). + \param align : specify the tqalignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \param min_size : specify the minimum size of the opening display window. Images having dimensions below this size will be upscaled. \param max_size : specify the maximum size of the opening display window. Images having dimensions above this @@ -17774,7 +17774,7 @@ namespace cimg_library { Images of the list are concatenated in a single temporarly image for visualization purposes. The function returns when a key is pressed or the display window is closed by the user. \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. - \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). + \param align : specify the tqalignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \param min_size : specify the minimum size of the opening display window. Images having dimensions below this size will be upscaled. \param max_size : specify the maximum size of the opening display window. Images having dimensions above this diff --git a/krita/plugins/filters/cimg/kis_cimg_filter.cc b/krita/plugins/filters/cimg/kis_cimg_filter.cc index 53f7e3c1..3d92ab4e 100644 --- a/krita/plugins/filters/cimg/kis_cimg_filter.cc +++ b/krita/plugins/filters/cimg/kis_cimg_filter.cc @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -72,7 +72,7 @@ KisCImgFilterConfiguration::KisCImgFilterConfiguration() linear = true; } -void KisCImgFilterConfiguration::fromXML(const QString & s) +void KisCImgFilterConfiguration::fromXML(const TQString & s) { KisFilterConfiguration::fromXML( s ); @@ -89,7 +89,7 @@ void KisCImgFilterConfiguration::fromXML(const QString & s) } -QString KisCImgFilterConfiguration::toString() +TQString KisCImgFilterConfiguration::toString() { m_properties.clear(); @@ -159,12 +159,12 @@ KisCImgFilter::KisCImgFilter() } -void KisCImgFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisCImgFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { Q_UNUSED(dst); - Q_INT32 width = rect.width(); - Q_INT32 height = rect.height(); + TQ_INT32 width = rect.width(); + TQ_INT32 height = rect.height(); // Copy the src data into a CImg type image with three channels and no alpha. // XXX: This means that a CImg is always rgba; find the quickest way to get 8-bit rgb from any colorspace & find a way @@ -181,10 +181,10 @@ void KisCImgFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte srcRGB16->convertTo(rgb16CS); KisRectIteratorPixel it = srcRGB16->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), false); while (!it.isDone()) { - Q_UINT16* data = reinterpret_cast(it.rawData()); + TQ_UINT16* data = reinterpret_cast(it.rawData()); - Q_INT32 x = it.x() - rect.x(); - Q_INT32 y = it.y() - rect.y(); + TQ_INT32 x = it.x() - rect.x(); + TQ_INT32 y = it.y() - rect.y(); img(x, y, 0) = data[0]; img(x, y, 1) = data[1]; @@ -197,11 +197,11 @@ void KisCImgFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte KisRectIteratorPixel it = src->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), false); while (!it.isDone()) { - QColor color; - cs->toQColor(it.rawData(), &color); + TQColor color; + cs->toTQColor(it.rawData(), &color); - Q_INT32 x = it.x() - rect.x(); - Q_INT32 y = it.y() - rect.y(); + TQ_INT32 x = it.x() - rect.x(); + TQ_INT32 y = it.y() - rect.y(); img(x, y, 0) = color.red(); img(x, y, 1) = color.green(); @@ -234,10 +234,10 @@ void KisCImgFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte { KisRectIteratorPixel it = srcRGB16->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true); while (!it.isDone()) { - Q_INT32 x = it.x() - rect.x(); - Q_INT32 y = it.y() - rect.y(); + TQ_INT32 x = it.x() - rect.x(); + TQ_INT32 y = it.y() - rect.y(); - Q_UINT16* data = reinterpret_cast(it.rawData()); + TQ_UINT16* data = reinterpret_cast(it.rawData()); data[0] = img(x, y, 0) ; data[1] = img(x, y, 1) ; @@ -256,12 +256,12 @@ void KisCImgFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilte if (it.isSelected()) { - Q_INT32 x = it.x() - rect.x(); - Q_INT32 y = it.y() - rect.y(); + TQ_INT32 x = it.x() - rect.x(); + TQ_INT32 y = it.y() - rect.y(); - QColor color((int)img(x, y, 0), (int)img(x, y, 1), (int)img(x, y, 2)); + TQColor color((int)img(x, y, 0), (int)img(x, y, 1), (int)img(x, y, 2)); - cs->fromQColor(color, it.rawData()); + cs->fromTQColor(color, it.rawData()); } ++it; @@ -291,7 +291,7 @@ void get_geom(const char *geom, int &geom_w, int &geom_h) void KisCImgFilter::cleanup() { img0 = flow = G = dest = sum= W = CImg<>(); - mask = CImg (); + tqmask = CImg (); } //---------------------------------------------------------------------------- @@ -351,45 +351,45 @@ bool KisCImgFilter::prepare_restore() bool KisCImgFilter::prepare_inpaint() { - const char *file_m = NULL; //cimg_option("-m",(const char*)NULL,"Input inpainting mask"); + const char *file_m = NULL; //cimg_option("-m",(const char*)NULL,"Input inpainting tqmask"); if (!file_m) { // XXX: Do KDE messagebox - // g_message ("You need to specify an inpainting mask (option '-m') !"); + // g_message ("You need to specify an inpainting tqmask (option '-m') !"); return false; } - const unsigned int dilate = 0; //cimg_option("-dilate",0,"Inpainting mask dilatation"); + const unsigned int dilate = 0; //cimg_option("-dilate",0,"Inpainting tqmask dilatation"); const unsigned int ip_init = 3; //cimg_option("-init",3,"Inpainting init (0=black, 1=white, 2=noise, 3=unchanged, 4=interpol)"); if (cimg::strncasecmp("block",file_m,5)) - mask = CImg(file_m); + tqmask = CImg(file_m); else { int l=16; std::sscanf(file_m,"block%d",&l); - mask = CImg(img.width/l,img.height/l); - cimg_mapXY(mask,x,y) mask(x,y)=(x+y)%2; + tqmask = CImg(img.width/l,img.height/l); + cimg_mapXY(tqmask,x,y) tqmask(x,y)=(x+y)%2; } - mask.resize(img.width,img.height,1,1); - if (dilate) mask.dilate(dilate); + tqmask.resize(img.width,img.height,1,1); + if (dilate) tqmask.dilate(dilate); switch (ip_init) { - case 0 : { cimg_mapXYV(img,x,y,k) if (mask(x,y)) img(x,y,k) = 0; } break; - case 1 : { cimg_mapXYV(img,x,y,k) if (mask(x,y)) img(x,y,k) = 255; } break; - case 2 : { cimg_mapXYV(img,x,y,k) if (mask(x,y)) img(x,y,k) = (float)(255*cimg::rand()); } break; + case 0 : { cimg_mapXYV(img,x,y,k) if (tqmask(x,y)) img(x,y,k) = 0; } break; + case 1 : { cimg_mapXYV(img,x,y,k) if (tqmask(x,y)) img(x,y,k) = 255; } break; + case 2 : { cimg_mapXYV(img,x,y,k) if (tqmask(x,y)) img(x,y,k) = (float)(255*cimg::rand()); } break; case 3 : break; case 4 : { - CImg tmask(mask),ntmask(tmask); + CImg ttqmask(tqmask),nttqmask(ttqmask); CImg_3x3(M,uchar); CImg_3x3(I,float); - while (CImgStats(ntmask,false).max>0) { - cimg_map3x3(tmask,x,y,0,0,M) if (Mcc && (!Mpc || !Mnc || !Mcp || !Mcn)) { + while (CImgStats(nttqmask,false).max>0) { + cimg_map3x3(ttqmask,x,y,0,0,M) if (Mcc && (!Mpc || !Mnc || !Mcp || !Mcn)) { const float ccp = Mcp?0.0f:1.0f, cpc = Mpc?0.0f:1.0f, cnc = Mnc?0.0f:1.0f, ccn = Mcn?0.0f:1.0f, csum = ccp + cpc + cnc + ccn; cimg_mapV(img,k) { cimg_get3x3(img,x,y,0,k,I); img(x,y,k) = (ccp*Icp + cpc*Ipc + cnc*Inc + ccn*Icn)/csum; } - ntmask(x,y) = 0; + nttqmask(x,y) = 0; } - tmask = ntmask; + ttqmask = nttqmask; } } break; default: break; @@ -398,7 +398,7 @@ bool KisCImgFilter::prepare_inpaint() G = CImg<>(img.width,img.height,1,3,0); CImg_3x3(g,uchar); CImg_3x3(I,float); - cimg_map3x3(mask,x,y,0,0,g) if (!gcc && !(gnc-gcc) && !(gcc-gpc) && !(gcn-gcc) && !(gcc-gcp)) cimg_mapV(img,k) { + cimg_map3x3(tqmask,x,y,0,0,g) if (!gcc && !(gnc-gcc) && !(gcc-gpc) && !(gcn-gcc) && !(gcc-gcp)) cimg_mapV(img,k) { cimg_get3x3(img,x,y,0,k,I); const float ix = 0.5f*(Inc-Ipc), iy = 0.5f*(Icn-Icp); G(x,y,0)+= ix*ix; G(x,y,1)+= ix*iy; G(x,y,2)+= iy*iy; @@ -429,12 +429,12 @@ bool KisCImgFilter::prepare_inpaint() bool KisCImgFilter::prepare_resize() { - const char *geom = NULL; //cimg_option("-g",(const char*)NULL,"Output image geometry"); + const char *geom = NULL; //cimg_option("-g",(const char*)NULL,"Output image tqgeometry"); const bool anchor = true; //cimg_option("-anchor",true,"Anchor original pixels"); if (!geom) throw CImgArgumentException("You need to specify an output geomety (option -g)"); int w,h; get_geom(geom,w,h); - mask = CImg(img.width,img.height,1,1,255); - if (!anchor) mask.resize(w,h,1,1,1); else mask = ~mask.resize(w,h,1,1,4); + tqmask = CImg(img.width,img.height,1,1,255); + if (!anchor) tqmask.resize(w,h,1,1,1); else tqmask = ~tqmask.resize(w,h,1,1,4); img0 = img.get_resize(w,h,1,-100,1); img.resize(w,h,1,-100,3); G = CImg<>(img.width,img.height,1,3); @@ -445,7 +445,7 @@ bool KisCImgFilter::prepare_resize() bool KisCImgFilter::prepare_visuflow() { - const char *geom = "100%x100%"; //cimg_option("-g","100%x100%","Output geometry"); + const char *geom = "100%x100%"; //cimg_option("-g","100%x100%","Output tqgeometry"); //const char *file_i = (const char *)NULL; //cimg_option("-i",(const char*)NULL,"Input init image"); const bool normalize = false; //cimg_option("-norm",false,"Normalize input flow"); @@ -618,7 +618,7 @@ void KisCImgFilter::compute_LIC(int &progressSteps) return; } - if (!mask.data || mask(x,y)) compute_LIC_back_forward(x,y); + if (!tqmask.data || tqmask(x,y)) compute_LIC_back_forward(x,y); } } @@ -680,12 +680,12 @@ bool KisCImgFilter::process() return true; } -KisFilterConfigWidget * KisCImgFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisCImgFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { - return new KisCImgconfigWidget(this, parent); + return new KisCImgconfigWidget(this, tqparent); } -KisFilterConfiguration* KisCImgFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisCImgFilter::configuration(TQWidget* nwidget) { KisCImgconfigWidget * widget = (KisCImgconfigWidget *) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/cimg/kis_cimg_filter.h b/krita/plugins/filters/cimg/kis_cimg_filter.h index da336471..3b745476 100644 --- a/krita/plugins/filters/cimg/kis_cimg_filter.h +++ b/krita/plugins/filters/cimg/kis_cimg_filter.h @@ -31,12 +31,12 @@ class KisCImgFilterConfiguration : public KisFilterConfiguration public: KisCImgFilterConfiguration(); - virtual QString toString(); - virtual void fromXML(const QString & s); + virtual TQString toString(); + virtual void fromXML(const TQString & s); public: - Q_INT32 nb_iter; // Number of smoothing iterations + TQ_INT32 nb_iter; // Number of smoothing iterations double dt; // Time step double dlength; // Integration step double dtheta; // Angular step (in degrees) @@ -54,14 +54,14 @@ class KisCImgFilter : public KisFilter public: KisCImgFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("cimg", i18n("Image Restoration (cimg-based)")); }; virtual bool supportsPainting() { return false; } virtual bool supportsPreview() { return false; } virtual ColorSpaceIndependence colorSpaceIndependence(); public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration * configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration * configuration(TQWidget*); virtual KisFilterConfiguration * configuration() { return new KisCImgFilterConfiguration();}; private: @@ -115,7 +115,7 @@ private: cimg_library::CImg<> dest, sum, W; cimg_library::CImg<> img, img0, flow,G; cimg_library::CImgl<> eigen; - cimg_library::CImg mask; + cimg_library::CImg tqmask; diff --git a/krita/plugins/filters/cimg/kis_cimg_plugin.cc b/krita/plugins/filters/cimg/kis_cimg_plugin.cc index 569a247e..faab6668 100644 --- a/krita/plugins/filters/cimg/kis_cimg_plugin.cc +++ b/krita/plugins/filters/cimg/kis_cimg_plugin.cc @@ -28,12 +28,12 @@ typedef KGenericFactory KisCImgPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritacimg, KisCImgPluginFactory( "krita" ) ) -KisCImgPlugin::KisCImgPlugin(QObject *parent, const char *name, const QStringList &) : KParts::Plugin(parent, name) +KisCImgPlugin::KisCImgPlugin(TQObject *tqparent, const char *name, const TQStringList &) : KParts::Plugin(tqparent, name) { setInstance(KisCImgPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisCImgFilter()); } } diff --git a/krita/plugins/filters/cimg/kis_cimg_plugin.h b/krita/plugins/filters/cimg/kis_cimg_plugin.h index 385ba34f..5674012b 100644 --- a/krita/plugins/filters/cimg/kis_cimg_plugin.h +++ b/krita/plugins/filters/cimg/kis_cimg_plugin.h @@ -25,7 +25,7 @@ class KisCImgPlugin : public KParts::Plugin { public: - KisCImgPlugin(QObject *parent, const char *name, const QStringList &); + KisCImgPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisCImgPlugin(); }; diff --git a/krita/plugins/filters/cimg/kis_cimgconfig_widget.cc b/krita/plugins/filters/cimg/kis_cimgconfig_widget.cc index 7b98c4cd..8b67b6f9 100644 --- a/krita/plugins/filters/cimg/kis_cimgconfig_widget.cc +++ b/krita/plugins/filters/cimg/kis_cimgconfig_widget.cc @@ -19,9 +19,9 @@ * * Ported from the CImg Gimp plugin by Victor Stinner and David Tschumperlé. */ -#include "qlayout.h" -#include "qcheckbox.h" -#include "qpushbutton.h" +#include "tqlayout.h" +#include "tqcheckbox.h" +#include "tqpushbutton.h" #include "knuminput.h" @@ -29,29 +29,29 @@ #include "kis_cimgconfig_widget.h" #include "kis_cimg_filter.h" -KisCImgconfigWidget::KisCImgconfigWidget(KisFilter* nfilter, QWidget * parent, const char * name, WFlags f) - : KisFilterConfigWidget(parent, name, f) +KisCImgconfigWidget::KisCImgconfigWidget(KisFilter* nfilter, TQWidget * tqparent, const char * name, WFlags f) + : KisFilterConfigWidget(tqparent, name, f) { m_page = new WdgCImg(this); Q_CHECK_PTR(m_page); - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); Q_CHECK_PTR(l); l->add(m_page); nfilter->setAutoUpdate(false); -// connect( m_page->bnRefresh, SIGNAL(clicked()), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numDetail, SIGNAL(valueChanged (double)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numGradient, SIGNAL(valueChanged (double)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numTimeStep, SIGNAL(valueChanged (double)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numBlur, SIGNAL(valueChanged (double)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numBlurIterations, SIGNAL(valueChanged (int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numAngularStep, SIGNAL(valueChanged (double)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numIntegralStep, SIGNAL(valueChanged (double)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->numGaussian, SIGNAL(valueChanged (double)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->chkLinearInterpolation, SIGNAL(toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->chkNormalize, SIGNAL(toggled(bool)), SIGNAL(sigPleaseUpdatePreview())); +// connect( m_page->bnRefresh, TQT_SIGNAL(clicked()), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numDetail, TQT_SIGNAL(valueChanged (double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numGradient, TQT_SIGNAL(valueChanged (double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numTimeStep, TQT_SIGNAL(valueChanged (double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numBlur, TQT_SIGNAL(valueChanged (double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numBlurIterations, TQT_SIGNAL(valueChanged (int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numAngularStep, TQT_SIGNAL(valueChanged (double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numIntegralStep, TQT_SIGNAL(valueChanged (double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->numGaussian, TQT_SIGNAL(valueChanged (double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->chkLinearInterpolation, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->chkNormalize, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(sigPleaseUpdatePreview())); } diff --git a/krita/plugins/filters/cimg/kis_cimgconfig_widget.h b/krita/plugins/filters/cimg/kis_cimgconfig_widget.h index 803d4907..b9c5cbe9 100644 --- a/krita/plugins/filters/cimg/kis_cimgconfig_widget.h +++ b/krita/plugins/filters/cimg/kis_cimgconfig_widget.h @@ -30,10 +30,11 @@ class KisCImgconfigWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisCImgconfigWidget(KisFilter* nfilter, QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + KisCImgconfigWidget(KisFilter* nfilter, TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 ); virtual ~KisCImgconfigWidget() {}; public: diff --git a/krita/plugins/filters/cimg/wdg_cimg.ui b/krita/plugins/filters/cimg/wdg_cimg.ui index b4767045..80476616 100644 --- a/krita/plugins/filters/cimg/wdg_cimg.ui +++ b/krita/plugins/filters/cimg/wdg_cimg.ui @@ -1,6 +1,6 @@ WdgCImg - + WdgCImg @@ -19,7 +19,7 @@ unnamed - + textLabel1_2 @@ -42,14 +42,14 @@ Expanding - + 51 20 - + grpPrecision @@ -60,7 +60,7 @@ unnamed - + textLabel6 @@ -110,7 +110,7 @@ 10 - + chkNormalize @@ -121,7 +121,7 @@ false - + chkLinearInterpolation @@ -132,7 +132,7 @@ true - + textLabel7 @@ -140,7 +140,7 @@ Integral step: - + textLabel8 @@ -150,7 +150,7 @@ - + grpSmooth @@ -205,7 +205,7 @@ 10 - + textLabel5 @@ -213,7 +213,7 @@ Blurring iterations: - + textLabel4 @@ -221,7 +221,7 @@ Blur: - + textLabel3 @@ -229,7 +229,7 @@ Time step: - + textLabel2 @@ -237,7 +237,7 @@ Gradient factor: - + textLabel1 @@ -276,7 +276,7 @@ chkLinearInterpolation chkNormalize - + knuminput.h knuminput.h diff --git a/krita/plugins/filters/colorify/Colorify.cpp b/krita/plugins/filters/colorify/Colorify.cpp index d23c6594..46e8203f 100644 --- a/krita/plugins/filters/colorify/Colorify.cpp +++ b/krita/plugins/filters/colorify/Colorify.cpp @@ -31,8 +31,8 @@ typedef KGenericFactory KritaColorifyFactory; K_EXPORT_COMPONENT_FACTORY( kritacolorify, KritaColorifyFactory( "krita" ) ) -KritaColorify::KritaColorify(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaColorify::KritaColorify(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaColorifyFactory::instance()); @@ -40,11 +40,11 @@ KritaColorify::KritaColorify(QObject *parent, const char *name, const QStringLis kdDebug(41006) << "Colorify Filter plugin. Class: " << className() << ", Parent: " - << parent -> className() + << tqparent -> className() << "\n"; - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisColorify()); } } @@ -59,12 +59,12 @@ KisColorify::KisColorify() : KisFilter(id(), "colors", i18n("&Colorify...")) { } -KisFilterConfigWidget * KisColorify::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP ) +KisFilterConfigWidget * KisColorify::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP ) { - return new KisWdgColorify(this, parent, "configuration of colorify"); + return new KisWdgColorify(this, tqparent, "configuration of colorify"); } -KisFilterConfiguration* KisColorify::configuration(QWidget* w) +KisFilterConfiguration* KisColorify::configuration(TQWidget* w) { KisWdgColorify * wCTA = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration("colorify", 1); @@ -75,41 +75,41 @@ KisFilterConfiguration* KisColorify::configuration(QWidget* w) return config; } -void KisColorify::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisColorify::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); if(config == 0) config = new KisFilterConfiguration("colorify", 1); - QVariant value; - QColor cTA = (config->getProperty("color", value)) ? value.toColor() : QColor(200,175,125); + TQVariant value; + TQColor cTA = (config->getProperty("color", value)) ? value.toColor() : TQColor(200,175,125); KisRectIteratorPixel dstIt = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); KisRectIteratorPixel srcIt = src->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), false); KisColorSpace * cs = src->colorSpace(); - Q_UINT8* colorpixel = new Q_UINT8[ cs->pixelSize() ]; + TQ_UINT8* colorpixel = new TQ_UINT8[ cs->pixelSize() ]; - cs->fromQColor(cTA, colorpixel); + cs->fromTQColor(cTA, colorpixel); - Q_UINT16 labcTA[4]; - Q_UINT16 lab[4]; + TQ_UINT16 labcTA[4]; + TQ_UINT16 lab[4]; - cs->toLabA16(colorpixel, (Q_UINT8*)labcTA, 1); + cs->toLabA16(colorpixel, (TQ_UINT8*)labcTA, 1); int pixelsProcessed = 0; setProgressTotalSteps(rect.width() * rect.height()); - //Q_INT32 pixelsize = cs->pixelSize(); + //TQ_INT32 pixelsize = cs->pixelSize(); while( ! srcIt.isDone() ) { if(srcIt.isSelected()) { - cs->toLabA16(srcIt.oldRawData(), (Q_UINT8*)lab, 1); + cs->toLabA16(srcIt.oldRawData(), (TQ_UINT8*)lab, 1); labcTA[0] = lab[0]; - cs->fromLabA16((Q_UINT8*)labcTA, dstIt.rawData(), 1); + cs->fromLabA16((TQ_UINT8*)labcTA, dstIt.rawData(), 1); } setProgress(++pixelsProcessed); ++srcIt; diff --git a/krita/plugins/filters/colorify/Colorify.h b/krita/plugins/filters/colorify/Colorify.h index 8ba0e18b..247daa2e 100644 --- a/krita/plugins/filters/colorify/Colorify.h +++ b/krita/plugins/filters/colorify/Colorify.h @@ -32,7 +32,7 @@ class KritaColorify : public KParts::Plugin { public: - KritaColorify(QObject *parent, const char *name, const QStringList &); + KritaColorify(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaColorify(); }; @@ -41,7 +41,7 @@ class KisColorify : public KisFilter { public: KisColorify(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); static inline KisID id() { return KisID("colorify", i18n("Colorify...")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -49,8 +49,8 @@ class KisColorify : public KisFilter { virtual bool supportsAdjustmentLayers() { return false; } virtual ColorSpaceIndependence colorSpaceIndendendence() { return TO_LAB16; }; public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/colorify/KisWdgColorify.cpp b/krita/plugins/filters/colorify/KisWdgColorify.cpp index 4ee48444..d2b87e48 100644 --- a/krita/plugins/filters/colorify/KisWdgColorify.cpp +++ b/krita/plugins/filters/colorify/KisWdgColorify.cpp @@ -20,9 +20,9 @@ #include "KisWdgColorify.h" -#include -#include -#include +#include +#include +#include #include @@ -30,17 +30,17 @@ #include "WdgColorifyBase.h" -KisWdgColorify::KisWdgColorify( KisFilter* nfilter, QWidget * parent, const char * name) : KisFilterConfigWidget ( parent, name ) +KisWdgColorify::KisWdgColorify( KisFilter* nfilter, TQWidget * tqparent, const char * name) : KisFilterConfigWidget ( tqparent, name ) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgColorifyBase(this); widgetLayout -> addWidget(m_widget,0,0); - connect( m_widget->colorTarget, SIGNAL( changed(const QColor&)), SIGNAL(sigPleaseUpdatePreview())); + connect( m_widget->colorTarget, TQT_SIGNAL( changed(const TQColor&)), TQT_SIGNAL(sigPleaseUpdatePreview())); } void KisWdgColorify::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; if(config->getProperty("color", value)) { m_widget->colorTarget->setColor( value.toColor() ); diff --git a/krita/plugins/filters/colorify/KisWdgColorify.h b/krita/plugins/filters/colorify/KisWdgColorify.h index b4101f06..22187aaf 100644 --- a/krita/plugins/filters/colorify/KisWdgColorify.h +++ b/krita/plugins/filters/colorify/KisWdgColorify.h @@ -33,8 +33,9 @@ class WdgColorifyBase; class KisWdgColorify : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgColorify( KisFilter* nfilter, QWidget * parent, const char * name); + KisWdgColorify( KisFilter* nfilter, TQWidget * tqparent, const char * name); inline WdgColorifyBase* widget() { return m_widget; }; virtual void setConfiguration(KisFilterConfiguration*); private: diff --git a/krita/plugins/filters/colorify/WdgColorifyBase.ui b/krita/plugins/filters/colorify/WdgColorifyBase.ui index e8387c64..a5fcebf9 100644 --- a/krita/plugins/filters/colorify/WdgColorifyBase.ui +++ b/krita/plugins/filters/colorify/WdgColorifyBase.ui @@ -1,6 +1,6 @@ WdgColorifyBase - + WdgColorifyBase @@ -29,22 +29,22 @@ Expanding - + 61 20 - + - layout1 + tqlayout1 unnamed - + textLabel1 @@ -79,7 +79,7 @@ Expanding - + 20 50 @@ -90,7 +90,7 @@ - + kcolorbutton.h diff --git a/krita/plugins/filters/colors/colors.cc b/krita/plugins/filters/colors/colors.cc index b0a8bcc7..ab691400 100644 --- a/krita/plugins/filters/colors/colors.cc +++ b/krita/plugins/filters/colors/colors.cc @@ -28,8 +28,8 @@ typedef KGenericFactory KritaExtensionsColorsFactory; K_EXPORT_COMPONENT_FACTORY( kritaextensioncolorsfilters, KritaExtensionsColorsFactory( "krita" ) ) -KritaExtensionsColors::KritaExtensionsColors(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaExtensionsColors::KritaExtensionsColors(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaExtensionsColorsFactory::instance()); @@ -37,11 +37,11 @@ KritaExtensionsColors::KritaExtensionsColors(QObject *parent, const char *name, kdDebug(41006) << "Extensions Colors Filter plugin. Class: " << className() << ", Parent: " - << parent -> className() + << tqparent -> className() << "\n"; - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterMax()); manager->add(new KisFilterMin()); manager->add(new KisFilterColorToAlpha()); diff --git a/krita/plugins/filters/colors/colors.h b/krita/plugins/filters/colors/colors.h index 169ae83d..034fa2af 100644 --- a/krita/plugins/filters/colors/colors.h +++ b/krita/plugins/filters/colors/colors.h @@ -30,7 +30,7 @@ class KritaExtensionsColors : public KParts::Plugin { public: - KritaExtensionsColors(QObject *parent, const char *name, const QStringList &); + KritaExtensionsColors(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaExtensionsColors(); }; diff --git a/krita/plugins/filters/colors/kis_color_to_alpha.cc b/krita/plugins/filters/colors/kis_color_to_alpha.cc index f4547a28..0ddf07c6 100644 --- a/krita/plugins/filters/colors/kis_color_to_alpha.cc +++ b/krita/plugins/filters/colors/kis_color_to_alpha.cc @@ -20,8 +20,8 @@ #include "kis_color_to_alpha.h" -#include -#include +#include +#include #include @@ -34,12 +34,12 @@ KisFilterColorToAlpha::KisFilterColorToAlpha() : KisFilter(id(), "colors", i18n( { } -KisFilterConfigWidget * KisFilterColorToAlpha::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP ) +KisFilterConfigWidget * KisFilterColorToAlpha::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP ) { - return new KisWdgColorToAlpha(this, parent, "configuration of color to alpha"); + return new KisWdgColorToAlpha(this, tqparent, "configuration of color to alpha"); } -KisFilterConfiguration* KisFilterColorToAlpha::configuration(QWidget* w) +KisFilterConfiguration* KisFilterColorToAlpha::configuration(TQWidget* w) { KisWdgColorToAlpha * wCTA = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration("colortoalpha", 1); @@ -51,15 +51,15 @@ KisFilterConfiguration* KisFilterColorToAlpha::configuration(QWidget* w) return config; } -void KisFilterColorToAlpha::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisFilterColorToAlpha::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); if(config == 0) config = new KisFilterConfiguration("colortoalpha", 1); - QVariant value; - QColor cTA = (config->getProperty("targetcolor", value)) ? value.toColor() : QColor(255,255,255); + TQVariant value; + TQColor cTA = (config->getProperty("targetcolor", value)) ? value.toColor() : TQColor(255,255,255); int threshold = (config->getProperty("threshold", value)) ? value.toInt() : 0; KisRectIteratorPixel dstIt = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); @@ -69,16 +69,16 @@ void KisFilterColorToAlpha::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, setProgressTotalSteps(rect.width() * rect.height()); KisColorSpace * cs = src->colorSpace(); - Q_INT32 pixelsize = cs->pixelSize(); + TQ_INT32 pixelsize = cs->pixelSize(); - Q_UINT8* color = new Q_UINT8[pixelsize]; - cs->fromQColor(cTA, color); + TQ_UINT8* color = new TQ_UINT8[pixelsize]; + cs->fromTQColor(cTA, color); while( ! srcIt.isDone() ) { if(srcIt.isSelected()) { - Q_UINT8 d = cs->difference(color, srcIt.oldRawData()); + TQ_UINT8 d = cs->difference(color, srcIt.oldRawData()); if( d >= threshold ) { cs->setAlpha(dstIt.rawData(), 255, 1); diff --git a/krita/plugins/filters/colors/kis_color_to_alpha.h b/krita/plugins/filters/colors/kis_color_to_alpha.h index 1f9c8a08..cd3ca0fe 100644 --- a/krita/plugins/filters/colors/kis_color_to_alpha.h +++ b/krita/plugins/filters/colors/kis_color_to_alpha.h @@ -31,7 +31,7 @@ class KisFilterColorToAlpha : public KisFilter { public: KisFilterColorToAlpha(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); static inline KisID id() { return KisID("colortoalpha", i18n("Color to Alpha")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -39,8 +39,8 @@ class KisFilterColorToAlpha : public KisFilter { virtual bool supportsAdjustmentLayers() { return false; } virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; diff --git a/krita/plugins/filters/colors/kis_minmax_filters.cc b/krita/plugins/filters/colors/kis_minmax_filters.cc index 3e6fa197..40776b11 100644 --- a/krita/plugins/filters/colors/kis_minmax_filters.cc +++ b/krita/plugins/filters/colors/kis_minmax_filters.cc @@ -22,10 +22,10 @@ #include -typedef void (*funcMaxMin)(const Q_UINT8* , Q_UINT8* , uint ); +typedef void (*funcMaxMin)(const TQ_UINT8* , TQ_UINT8* , uint ); template -void maximize(const Q_UINT8* s, Q_UINT8* d, uint nbpixels) +void maximize(const TQ_UINT8* s, TQ_UINT8* d, uint nbpixels) { const _TYPE* sT = (_TYPE*)(s); _TYPE* dT = (_TYPE*)(d); @@ -47,7 +47,7 @@ void maximize(const Q_UINT8* s, Q_UINT8* d, uint nbpixels) } template - void minimize(const Q_UINT8* s, Q_UINT8* d, uint nbpixels) + void minimize(const TQ_UINT8* s, TQ_UINT8* d, uint nbpixels) { const _TYPE* sT = (_TYPE*)(s); _TYPE* dT = (_TYPE*)(d); @@ -72,7 +72,7 @@ KisFilterMax::KisFilterMax() : KisFilter(id(), "colors", i18n("M&aximize Channel { } -void KisFilterMax::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect) +void KisFilterMax::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); @@ -84,16 +84,16 @@ void KisFilterMax::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilter setProgressTotalSteps(rect.width() * rect.height()); KisColorSpace * cs = src->colorSpace(); - Q_INT32 nC = cs->nColorChannels(); + TQ_INT32 nC = cs->nColorChannels(); funcMaxMin F; KisChannelInfo::enumChannelValueType cT = cs->channels()[0]->channelValueType(); if( cT == KisChannelInfo::UINT8 || cT == KisChannelInfo::INT8 ) { - F = & maximize; + F = & maximize; } else if( cT == KisChannelInfo::UINT16 || cT == KisChannelInfo::INT16 ) { - F = & maximize; + F = & maximize; } else if( cT == KisChannelInfo::FLOAT32 ) { F = & maximize; @@ -118,7 +118,7 @@ KisFilterMin::KisFilterMin() : KisFilter(id(), "colors", i18n("M&inimize Channel { } -void KisFilterMin::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect) +void KisFilterMin::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); @@ -130,16 +130,16 @@ void KisFilterMin::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilter setProgressTotalSteps(rect.width() * rect.height()); KisColorSpace * cs = src->colorSpace(); - Q_INT32 nC = cs->nColorChannels(); + TQ_INT32 nC = cs->nColorChannels(); funcMaxMin F; KisChannelInfo::enumChannelValueType cT = cs->channels()[0]->channelValueType(); if( cT == KisChannelInfo::UINT8 || cT == KisChannelInfo::INT8 ) { - F = & minimize; + F = & minimize; } else if( cT == KisChannelInfo::UINT16 || cT == KisChannelInfo::INT16 ) { - F = & minimize; + F = & minimize; } else if( cT == KisChannelInfo::FLOAT32 ) { F = & minimize; diff --git a/krita/plugins/filters/colors/kis_minmax_filters.h b/krita/plugins/filters/colors/kis_minmax_filters.h index 1d8300fc..44618167 100644 --- a/krita/plugins/filters/colors/kis_minmax_filters.h +++ b/krita/plugins/filters/colors/kis_minmax_filters.h @@ -32,7 +32,7 @@ class KisFilterMax : public KisFilter public: KisFilterMax(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); static inline KisID id() { return KisID("maximize", i18n("Maximize Channel")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -45,7 +45,7 @@ class KisFilterMin : public KisFilter public: KisFilterMin(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); static inline KisID id() { return KisID("minimize", i18n("Minimize Channel")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } diff --git a/krita/plugins/filters/colors/kis_wdg_color_to_alpha.cc b/krita/plugins/filters/colors/kis_wdg_color_to_alpha.cc index fd37487e..9829c703 100644 --- a/krita/plugins/filters/colors/kis_wdg_color_to_alpha.cc +++ b/krita/plugins/filters/colors/kis_wdg_color_to_alpha.cc @@ -20,9 +20,9 @@ #include "kis_wdg_color_to_alpha.h" -#include -#include -#include +#include +#include +#include #include @@ -30,18 +30,18 @@ #include "wdgcolortoalphabase.h" -KisWdgColorToAlpha::KisWdgColorToAlpha( KisFilter* nfilter, QWidget * parent, const char * name) : KisFilterConfigWidget ( parent, name ) +KisWdgColorToAlpha::KisWdgColorToAlpha( KisFilter* nfilter, TQWidget * tqparent, const char * name) : KisFilterConfigWidget ( tqparent, name ) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgColorToAlphaBase(this); widgetLayout -> addWidget(m_widget,0,0); - connect( m_widget->colorTarget, SIGNAL( changed(const QColor&)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_widget->intThreshold, SIGNAL( valueChanged ( int value) ), SIGNAL(sigPleaseUpdatePreview())); + connect( m_widget->colorTarget, TQT_SIGNAL( changed(const TQColor&)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_widget->intThreshold, TQT_SIGNAL( valueChanged ( int value) ), TQT_SIGNAL(sigPleaseUpdatePreview())); } void KisWdgColorToAlpha::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; if(config->getProperty("targetcolor", value)) { m_widget->colorTarget->setColor( value.toColor() ); diff --git a/krita/plugins/filters/colors/kis_wdg_color_to_alpha.h b/krita/plugins/filters/colors/kis_wdg_color_to_alpha.h index e3350e74..058237b2 100644 --- a/krita/plugins/filters/colors/kis_wdg_color_to_alpha.h +++ b/krita/plugins/filters/colors/kis_wdg_color_to_alpha.h @@ -33,8 +33,9 @@ class WdgColorToAlphaBase; class KisWdgColorToAlpha : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgColorToAlpha( KisFilter* nfilter, QWidget * parent, const char * name); + KisWdgColorToAlpha( KisFilter* nfilter, TQWidget * tqparent, const char * name); inline WdgColorToAlphaBase* widget() { return m_widget; }; virtual void setConfiguration(KisFilterConfiguration*); private: diff --git a/krita/plugins/filters/colors/wdgcolortoalphabase.ui b/krita/plugins/filters/colors/wdgcolortoalphabase.ui index b6cd3145..f824a9ab 100644 --- a/krita/plugins/filters/colors/wdgcolortoalphabase.ui +++ b/krita/plugins/filters/colors/wdgcolortoalphabase.ui @@ -1,6 +1,6 @@ WdgColorToAlphaBase - + WdgColorToAlphaBase @@ -29,22 +29,22 @@ Expanding - + 61 20 - + - layout1 + tqlayout1 unnamed - + textLabel1 @@ -69,7 +69,7 @@ - + intThreshold @@ -77,7 +77,7 @@ 255 - + textLabel1_2 @@ -95,7 +95,7 @@ Expanding - + 20 50 @@ -106,7 +106,7 @@ - + kcolorbutton.h diff --git a/krita/plugins/filters/colorsfilters/colorsfilters.cc b/krita/plugins/filters/colorsfilters/colorsfilters.cc index e73cf284..7bf36228 100644 --- a/krita/plugins/filters/colorsfilters/colorsfilters.cc +++ b/krita/plugins/filters/colorsfilters/colorsfilters.cc @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -54,13 +54,13 @@ typedef KGenericFactory ColorsFiltersFactory; K_EXPORT_COMPONENT_FACTORY( kritacolorsfilters, ColorsFiltersFactory( "krita" ) ) -ColorsFilters::ColorsFilters(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ColorsFilters::ColorsFilters(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ColorsFiltersFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisBrightnessContrastFilter()); manager->add(new KisAutoContrast()); manager->add(new KisPerChannelFilter()); @@ -85,7 +85,7 @@ bool KisAutoContrast::workWith(KisColorSpace* cs) return (cs->getProfile() != 0); } -void KisAutoContrast::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* , const QRect& rect) +void KisAutoContrast::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* , const TQRect& rect) { // initialize KisHistogramProducerSP producer = new KisGenericLabHistogramProducer(); @@ -137,7 +137,7 @@ void KisAutoContrast::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFil cfg->transfer[i] = 0x0; for(int i=minvalue; i 0xFFFF) @@ -168,12 +168,12 @@ void KisAutoContrast::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFil KisRectIteratorPixel iter = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); setProgressTotalSteps(rect.width() * rect.height()); - Q_INT32 pixelsProcessed = 0; + TQ_INT32 pixelsProcessed = 0; while( ! iter.isDone() && !cancelRequested()) { - Q_UINT32 npix=0, maxpix = iter.nConseqPixels(); - Q_UINT8 selectedness = iter.selectedness(); + TQ_UINT32 npix=0, maxpix = iter.nConseqPixels(); + TQ_UINT8 selectedness = iter.selectedness(); // The idea here is to handle stretches of completely selected and completely unselected pixels. // Partially selected pixels are handled one pixel at a time. switch(selectedness) @@ -190,7 +190,7 @@ void KisAutoContrast::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFil case MAX_SELECTED: { - Q_UINT8 *firstPixel = iter.rawData(); + TQ_UINT8 *firstPixel = iter.rawData(); while(iter.selectedness()==MAX_SELECTED && maxpix) { --maxpix; @@ -208,8 +208,8 @@ void KisAutoContrast::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFil default: // adjust, but since it's partially selected we also only partially adjust src->colorSpace()->applyAdjustment(iter.oldRawData(), iter.rawData(), adj, 1); - const Q_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; - Q_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; + const TQ_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; + TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; src->colorSpace()->mixColors(pixels, weights, 2, iter.rawData()); ++iter; pixelsProcessed++; @@ -246,7 +246,7 @@ bool KisDesaturateFilter::workWith(KisColorSpace* cs) return (cs->getProfile() != 0); } -void KisDesaturateFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect) +void KisDesaturateFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect) { if (dst != src) { KisPainter gc(dst); @@ -262,12 +262,12 @@ void KisDesaturateFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki KisRectIteratorPixel iter = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); setProgressTotalSteps(rect.width() * rect.height()); - Q_INT32 pixelsProcessed = 0; + TQ_INT32 pixelsProcessed = 0; while( ! iter.isDone() && !cancelRequested()) { - Q_UINT32 npix=0, maxpix = iter.nConseqPixels(); - Q_UINT8 selectedness = iter.selectedness(); + TQ_UINT32 npix=0, maxpix = iter.nConseqPixels(); + TQ_UINT8 selectedness = iter.selectedness(); // The idea here is to handle stretches of completely selected and completely unselected pixels. // Partially selected pixels are handled one pixel at a time. switch(selectedness) @@ -284,7 +284,7 @@ void KisDesaturateFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki case MAX_SELECTED: { - Q_UINT8 *firstPixel = iter.rawData(); + TQ_UINT8 *firstPixel = iter.rawData(); while(iter.selectedness()==MAX_SELECTED && maxpix) { --maxpix; @@ -302,8 +302,8 @@ void KisDesaturateFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki default: // adjust, but since it's partially selected we also only partially adjust src->colorSpace()->applyAdjustment(iter.oldRawData(), iter.rawData(), m_adj, 1); - const Q_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; - Q_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; + const TQ_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; + TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; src->colorSpace()->mixColors(pixels, weights, 2, iter.rawData()); ++iter; pixelsProcessed++; diff --git a/krita/plugins/filters/colorsfilters/colorsfilters.h b/krita/plugins/filters/colorsfilters/colorsfilters.h index 79c467fd..27e265d2 100644 --- a/krita/plugins/filters/colorsfilters/colorsfilters.h +++ b/krita/plugins/filters/colorsfilters/colorsfilters.h @@ -29,7 +29,7 @@ class KisColorAdjustment; class ColorsFilters : public KParts::Plugin { public: - ColorsFilters(QObject *parent, const char *name, const QStringList &); + ColorsFilters(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ColorsFilters(); }; @@ -37,7 +37,7 @@ class KisAutoContrast : public KisFilter { public: KisAutoContrast(); public: - virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("autocontrast", i18n("Auto Contrast")); }; virtual bool supportsPreview() { return true; } virtual bool supportsPainting() { return false; } @@ -55,7 +55,7 @@ class KisDesaturateFilter : public KisFilter { KisDesaturateFilter(); ~KisDesaturateFilter(); public: - virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("desaturate", i18n("Desaturate")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } diff --git a/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cc b/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cc index 4169f008..dfc5bd59 100644 --- a/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cc +++ b/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cc @@ -23,14 +23,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "kis_filter_config_widget.h" #include "kis_brightness_contrast_filter.h" @@ -47,7 +47,7 @@ KisBrightnessContrastFilterConfiguration::KisBrightnessContrastFilterConfiguration() : KisFilterConfiguration( "brightnesscontrast", 1 ) { - for (Q_UINT32 i = 0; i < 256; ++i) { + for (TQ_UINT32 i = 0; i < 256; ++i) { transfer[i] = i * 257; } curve.setAutoDelete(true); @@ -59,36 +59,36 @@ KisBrightnessContrastFilterConfiguration::~KisBrightnessContrastFilterConfigurat delete m_adjustment; } -void KisBrightnessContrastFilterConfiguration::fromXML( const QString& s ) +void KisBrightnessContrastFilterConfiguration::fromXML( const TQString& s ) { - QDomDocument doc; + TQDomDocument doc; doc.setContent( s ); - QDomElement e = doc.documentElement(); - QDomNode n = e.firstChild(); + TQDomElement e = doc.documentElement(); + TQDomNode n = e.firstChild(); while (!n.isNull()) { e = n.toElement(); if (!e.isNull()) { if (e.tagName() == "transfer") { - QStringList data = QStringList::split( ",", e.text() ); - QStringList::Iterator start = data.begin(); - QStringList::Iterator end = data.end(); + TQStringList data = TQStringList::split( ",", e.text() ); + TQStringList::Iterator start = data.begin(); + TQStringList::Iterator end = data.end(); int i = 0; - for ( QStringList::Iterator it = start; it != end && i < 256; ++it ) { - QString s = *it; + for ( TQStringList::Iterator it = start; it != end && i < 256; ++it ) { + TQString s = *it; transfer[i] = s.toUShort(); i++; } } else if (e.tagName() == "curve") { - QStringList data = QStringList::split( ";", e.text() ); - QStringList::Iterator pairStart = data.begin(); - QStringList::Iterator pairEnd = data.end(); - curve.clear(); // XXX QPtrList, sure I won't leak stuff here? - for (QStringList::Iterator it = pairStart; it != pairEnd; ++it) { - QString pair = * it; - if (pair.find(",") > -1) { - QPair *p = new QPair; + TQStringList data = TQStringList::split( ";", e.text() ); + TQStringList::Iterator pairStart = data.begin(); + TQStringList::Iterator pairEnd = data.end(); + curve.clear(); // XXX TQPtrList, sure I won't leak stuff here? + for (TQStringList::Iterator it = pairStart; it != pairEnd; ++it) { + TQString pair = * it; + if (pair.tqfind(",") > -1) { + TQPair *p = new TQPair; p->first = pair.section(",", 0, 0).toDouble(); p->second = pair.section(",", 1, 1).toDouble(); curve.append(p); @@ -98,37 +98,37 @@ void KisBrightnessContrastFilterConfiguration::fromXML( const QString& s ) } n = n.nextSibling(); } - // If the adjustment was cached, it now has changed - invalidate it + // If the adjustment was cached, it now has changed - tqinvalidate it delete m_adjustment; m_adjustment = 0; } -QString KisBrightnessContrastFilterConfiguration::toString() +TQString KisBrightnessContrastFilterConfiguration::toString() { - QDomDocument doc = QDomDocument("filterconfig"); - QDomElement root = doc.createElement( "filterconfig" ); + TQDomDocument doc = TQDomDocument("filterconfig"); + TQDomElement root = doc.createElement( "filterconfig" ); root.setAttribute( "name", name() ); root.setAttribute( "version", version() ); doc.appendChild( root ); - QDomElement e = doc.createElement( "transfer" ); - QString sTransfer; + TQDomElement e = doc.createElement( "transfer" ); + TQString sTransfer; for ( uint i = 0; i < 255 ; ++i ) { - sTransfer += QString::number( transfer[i] ); + sTransfer += TQString::number( transfer[i] ); sTransfer += ","; } - QDomText text = doc.createCDATASection(sTransfer); + TQDomText text = doc.createCDATASection(sTransfer); e.appendChild(text); root.appendChild(e); e = doc.createElement("curve"); - QString sCurve; - QPair * pair; + TQString sCurve; + TQPair * pair; for ( pair = curve.first(); pair; pair = curve.next() ) { - sCurve += QString::number(pair->first); + sCurve += TQString::number(pair->first); sCurve += ","; - sCurve += QString::number(pair->second); + sCurve += TQString::number(pair->second); sCurve += ";"; } text = doc.createCDATASection(sCurve); @@ -144,12 +144,12 @@ KisBrightnessContrastFilter::KisBrightnessContrastFilter() } -KisFilterConfigWidget * KisBrightnessContrastFilter::createConfigurationWidget(QWidget *parent, KisPaintDeviceSP dev) +KisFilterConfigWidget * KisBrightnessContrastFilter::createConfigurationWidget(TQWidget *tqparent, KisPaintDeviceSP dev) { - return new KisBrightnessContrastConfigWidget(parent, dev); + return new KisBrightnessContrastConfigWidget(tqparent, dev); } -KisFilterConfiguration* KisBrightnessContrastFilter::configuration(QWidget *nwidget) +KisFilterConfiguration* KisBrightnessContrastFilter::configuration(TQWidget *nwidget) { KisBrightnessContrastConfigWidget* widget = (KisBrightnessContrastConfigWidget*)nwidget; @@ -175,7 +175,7 @@ bool KisBrightnessContrastFilter::workWith(KisColorSpace* cs) } -void KisBrightnessContrastFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisBrightnessContrastFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { if (!config) { @@ -199,12 +199,12 @@ void KisBrightnessContrastFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP KisRectIteratorPixel iter = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); setProgressTotalSteps(rect.width() * rect.height()); - Q_INT32 pixelsProcessed = 0; + TQ_INT32 pixelsProcessed = 0; while( ! iter.isDone() && !cancelRequested()) { - Q_UINT32 npix=0, maxpix = iter.nConseqPixels(); - Q_UINT8 selectedness = iter.selectedness(); + TQ_UINT32 npix=0, maxpix = iter.nConseqPixels(); + TQ_UINT8 selectedness = iter.selectedness(); // The idea here is to handle stretches of completely selected and completely unselected pixels. // Partially selected pixels are handled one pixel at a time. switch(selectedness) @@ -221,7 +221,7 @@ void KisBrightnessContrastFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP case MAX_SELECTED: { - Q_UINT8 *firstPixel = iter.rawData(); + TQ_UINT8 *firstPixel = iter.rawData(); while(iter.selectedness()==MAX_SELECTED && maxpix) { --maxpix; @@ -239,8 +239,8 @@ void KisBrightnessContrastFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP default: // adjust, but since it's partially selected we also only partially adjust src->colorSpace()->applyAdjustment(iter.oldRawData(), iter.rawData(), configBC->m_adjustment, 1); - const Q_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; - Q_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; + const TQ_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; + TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; src->colorSpace()->mixColors(pixels, weights, 2, iter.rawData()); ++iter; pixelsProcessed++; @@ -252,13 +252,13 @@ void KisBrightnessContrastFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP setProgressDone(); } -KisBrightnessContrastConfigWidget::KisBrightnessContrastConfigWidget(QWidget * parent, KisPaintDeviceSP dev, const char * name, WFlags f) - : KisFilterConfigWidget(parent, name, f) +KisBrightnessContrastConfigWidget::KisBrightnessContrastConfigWidget(TQWidget * tqparent, KisPaintDeviceSP dev, const char * name, WFlags f) + : KisFilterConfigWidget(tqparent, name, f) { int i; int height; m_page = new WdgBrightnessContrast(this); - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); Q_CHECK_PTR(l); //Hide these buttons and labels as they are not implemented in 1.5 @@ -269,41 +269,41 @@ KisBrightnessContrastConfigWidget::KisBrightnessContrastConfigWidget(QWidget * p m_page->textLabelBrightness->hide(); m_page->textLabelContrast->hide(); - l->addWidget(m_page, 0, Qt::AlignTop); + l->addWidget(m_page, 0, TQt::AlignTop); height = 256; - connect( m_page->kCurve, SIGNAL(modified()), SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->kCurve, TQT_SIGNAL(modified()), TQT_SIGNAL(sigPleaseUpdatePreview())); // Create the horizontal gradient label - QPixmap hgradientpix(256, 1); - QPainter hgp(&hgradientpix); - hgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine)); + TQPixmap hgradientpix(256, 1); + TQPainter hgp(&hgradientpix); + hgp.setPen(TQPen::TQPen(TQColor(0,0,0),1, TQt::SolidLine)); for( i=0; i<256; ++i ) { - hgp.setPen(QColor(i,i,i)); + hgp.setPen(TQColor(i,i,i)); hgp.drawPoint(i, 0); } m_page->hgradient->setPixmap(hgradientpix); // Create the vertical gradient label - QPixmap vgradientpix(1, 256); - QPainter vgp(&vgradientpix); - vgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine)); + TQPixmap vgradientpix(1, 256); + TQPainter vgp(&vgradientpix); + vgp.setPen(TQPen::TQPen(TQColor(0,0,0),1, TQt::SolidLine)); for( i=0; i<256; ++i ) { - vgp.setPen(QColor(i,i,i)); + vgp.setPen(TQColor(i,i,i)); vgp.drawPoint(0, 255-i); } m_page->vgradient->setPixmap(vgradientpix); KisHistogramProducerSP producer = new KisGenericLabHistogramProducer(); KisHistogram histogram(dev, producer, LINEAR); - QPixmap pix(256, height); + TQPixmap pix(256, height); pix.fill(); - QPainter p(&pix); - p.setPen(QPen::QPen(Qt::gray,1, Qt::SolidLine)); + TQPainter p(&pix); + p.setPen(TQPen::TQPen(TQt::gray,1, TQt::SolidLine)); double highest = (double)histogram.calculations().getHighest(); - Q_INT32 bins = histogram.producer()->numberOfBins(); + TQ_INT32 bins = histogram.producer()->numberOfBins(); if (histogram.getHistogramType() == LINEAR) { double factor = (double)height / highest; @@ -327,7 +327,7 @@ KisBrightnessContrastFilterConfiguration * KisBrightnessContrastConfigWidget::co for(int i=0; i <256; i++) { - Q_INT32 val; + TQ_INT32 val; val = int(0xFFFF * m_page->kCurve->getCurveValue( i / 255.0)); if(val >0xFFFF) val=0xFFFF; diff --git a/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h b/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h index eb2b2080..f99cb2ba 100644 --- a/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h +++ b/krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h @@ -25,7 +25,7 @@ #include "kis_filter_config_widget.h" class WdgBrightnessContrast; -class QWidget; +class TQWidget; class KisColorAdjustment; class KisBrightnessContrastFilterConfiguration : public KisFilterConfiguration { @@ -34,12 +34,12 @@ public: KisBrightnessContrastFilterConfiguration(); virtual ~KisBrightnessContrastFilterConfiguration(); - virtual void fromXML( const QString& ); - virtual QString toString(); + virtual void fromXML( const TQString& ); + virtual TQString toString(); public: - Q_UINT16 transfer[256]; - QPtrList > curve; + TQ_UINT16 transfer[256]; + TQPtrList > curve; KisColorAdjustment * m_adjustment; }; @@ -55,10 +55,10 @@ public: public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration * configuration(QWidget *); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration * configuration(TQWidget *); virtual KisFilterConfiguration * configuration() { return new KisBrightnessContrastFilterConfiguration(); }; - virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("brightnesscontrast", i18n("Brightness / Contrast")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -73,7 +73,7 @@ public: class KisBrightnessContrastConfigWidget : public KisFilterConfigWidget { public: - KisBrightnessContrastConfigWidget(QWidget * parent, KisPaintDeviceSP dev, const char * name = 0, WFlags f = 0 ); + KisBrightnessContrastConfigWidget(TQWidget * tqparent, KisPaintDeviceSP dev, const char * name = 0, WFlags f = 0 ); virtual ~KisBrightnessContrastConfigWidget() {}; KisBrightnessContrastFilterConfiguration * config(); diff --git a/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc b/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc index 75b19a21..5b8d2b62 100644 --- a/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc +++ b/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kis_filter_configuration.h" #include "kis_filter_config_widget.h" @@ -39,11 +39,11 @@ KisPerChannelFilterConfiguration::KisPerChannelFilterConfiguration(int n) : KisFilterConfiguration( "perchannel", 1 ) { - curves = new QSortedList >[n]; + curves = new TQSortedList >[n]; for(int i=0;i >[nTransfers]; + curves = new TQSortedList >[nTransfers]; while (!curvesNode.isNull()) { - QDomElement curvesElement = curvesNode.toElement(); + TQDomElement curvesElement = curvesNode.toElement(); if (!curvesElement.isNull() && !curvesElement.text().isEmpty()) { - QStringList data = QStringList::split( ";", + TQStringList data = TQStringList::split( ";", curvesElement.text() ); - QStringList::Iterator pairStart = data.begin(); - QStringList::Iterator pairEnd = data.end(); - for (QStringList::Iterator it = pairStart; it != pairEnd; ++it) { - QString pair = * it; - if (pair.find(",") > -1) { - QPair *p = new QPair; + TQStringList::Iterator pairStart = data.begin(); + TQStringList::Iterator pairEnd = data.end(); + for (TQStringList::Iterator it = pairStart; it != pairEnd; ++it) { + TQString pair = * it; + if (pair.tqfind(",") > -1) { + TQPair *p = new TQPair; p->first = pair.section(",", 0, 0).toDouble(); p->second = pair.section(",", 1, 1).toDouble(); curves[count].append(p); @@ -104,10 +104,10 @@ curvesElement.text() ); for(int ch = 0; ch < nTransfers; ++ch) { - transfers[ch] = new Q_UINT16[256]; + transfers[ch] = new TQ_UINT16[256]; for(int i = 0; i < 256; ++i) { - Q_INT32 val; + TQ_INT32 val; val = int(0xFFFF * KCurve::getCurveValue(curves[ch], i / 255.0)); if(val > 0xFFFF) @@ -121,28 +121,28 @@ curvesElement.text() ); dirty = true; } -QString KisPerChannelFilterConfiguration::toString() +TQString KisPerChannelFilterConfiguration::toString() { - QDomDocument doc = QDomDocument("filterconfig"); - QDomElement root = doc.createElement( "filterconfig" ); + TQDomDocument doc = TQDomDocument("filterconfig"); + TQDomElement root = doc.createElement( "filterconfig" ); root.setAttribute( "name", name() ); root.setAttribute( "version", version() ); - QDomElement c = doc.createElement("curves"); + TQDomElement c = doc.createElement("curves"); c.setAttribute("number", nTransfers); c.setAttribute("name", "curves"); for (int i = 0; i < nTransfers; ++i) { - QDomElement t = doc.createElement("curve"); - QPtrList > curve = curves[i]; - QString sCurve; - QPair * pair; + TQDomElement t = doc.createElement("curve"); + TQPtrList > curve = curves[i]; + TQString sCurve; + TQPair * pair; for ( pair = curve.first(); pair; pair = curve.next() ) { - sCurve += QString::number(pair->first); + sCurve += TQString::number(pair->first); sCurve += ","; - sCurve += QString::number(pair->second); + sCurve += TQString::number(pair->second); sCurve += ";"; } - QDomText text = doc.createCDATASection(sCurve); + TQDomText text = doc.createCDATASection(sCurve); t.appendChild(text); c.appendChild(t); } @@ -154,12 +154,12 @@ QString KisPerChannelFilterConfiguration::toString() } -KisFilterConfigWidget * KisPerChannelFilter::createConfigurationWidget(QWidget *parent, KisPaintDeviceSP dev) +KisFilterConfigWidget * KisPerChannelFilter::createConfigurationWidget(TQWidget *tqparent, KisPaintDeviceSP dev) { - return new KisPerChannelConfigWidget(parent, dev); + return new KisPerChannelConfigWidget(tqparent, dev); } -KisFilterConfiguration* KisPerChannelFilter::configuration(QWidget *nwidget) +KisFilterConfiguration* KisPerChannelFilter::configuration(TQWidget *nwidget) { KisPerChannelConfigWidget* widget = (KisPerChannelConfigWidget*)nwidget; @@ -179,7 +179,7 @@ std::list KisPerChannelFilter::listOfExamplesConfigurat } -void KisPerChannelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisPerChannelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { if (!config) { kdWarning() << "No configuration object for per-channel filter\n"; @@ -213,12 +213,12 @@ void KisPerChannelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki KisRectIteratorPixel iter = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); setProgressTotalSteps(rect.width() * rect.height()); - Q_INT32 pixelsProcessed = 0; + TQ_INT32 pixelsProcessed = 0; while( ! iter.isDone() && !cancelRequested()) { - Q_UINT32 npix=0, maxpix = iter.nConseqPixels(); - Q_UINT8 selectedness = iter.selectedness(); + TQ_UINT32 npix=0, maxpix = iter.nConseqPixels(); + TQ_UINT8 selectedness = iter.selectedness(); // The idea here is to handle stretches of completely selected and completely unselected pixels. // Partially selected pixels are handled one pixel at a time. switch(selectedness) @@ -235,7 +235,7 @@ void KisPerChannelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki case MAX_SELECTED: { - Q_UINT8 *firstPixel = iter.rawData(); + TQ_UINT8 *firstPixel = iter.rawData(); while(iter.selectedness()==MAX_SELECTED && maxpix) { --maxpix; @@ -253,8 +253,8 @@ void KisPerChannelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki default: // adjust, but since it's partially selected we also only partially adjust src->colorSpace()->applyAdjustment(iter.oldRawData(), iter.rawData(), adj, 1); - const Q_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; - Q_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; + const TQ_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; + TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; src->colorSpace()->mixColors(pixels, weights, 2, iter.rawData()); ++iter; pixelsProcessed++; @@ -270,15 +270,15 @@ void KisPerChannelConfigWidget::setActiveChannel(int ch) { int i; int height = 256; - QPixmap pix(256, height); + TQPixmap pix(256, height); pix.fill(); - QPainter p(&pix); - p.setPen(QPen::QPen(Qt::gray,1, Qt::SolidLine)); + TQPainter p(&pix); + p.setPen(TQPen::TQPen(TQt::gray,1, TQt::SolidLine)); m_histogram->setChannel(ch); double highest = (double)m_histogram->calculations().getHighest(); - Q_INT32 bins = m_histogram->producer()->numberOfBins(); + TQ_INT32 bins = m_histogram->producer()->numberOfBins(); if (m_histogram->getHistogramType() == LINEAR) { double factor = (double)height / highest; @@ -300,52 +300,52 @@ void KisPerChannelConfigWidget::setActiveChannel(int ch) m_page->kCurve->setPixmap(pix); } -KisPerChannelConfigWidget::KisPerChannelConfigWidget(QWidget * parent, KisPaintDeviceSP dev, const char * name, WFlags f) - : KisFilterConfigWidget(parent, name, f) +KisPerChannelConfigWidget::KisPerChannelConfigWidget(TQWidget * tqparent, KisPaintDeviceSP dev, const char * name, WFlags f) + : KisFilterConfigWidget(tqparent, name, f) { int i; int height; m_page = new WdgPerChannel(this); - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); Q_CHECK_PTR(l); m_dev = dev; - m_curves = new QSortedList >[m_dev->colorSpace()->nColorChannels()]; + m_curves = new TQSortedList >[m_dev->colorSpace()->nColorChannels()]; m_activeCh = 0; for(unsigned int ch=0; ch colorSpace()->nColorChannels(); ch++) { - m_curves[ch].append(new QPair(0, 0)); - m_curves[ch].append(new QPair(1, 1)); + m_curves[ch].append(new TQPair(0, 0)); + m_curves[ch].append(new TQPair(1, 1)); } l->add(m_page); height = 256; - connect( m_page->kCurve, SIGNAL(modified()), SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->kCurve, TQT_SIGNAL(modified()), TQT_SIGNAL(sigPleaseUpdatePreview())); // Fill in the channel chooser - QValueVector channels = dev->colorSpace()->channels(); + TQValueVector channels = dev->colorSpace()->channels(); for(unsigned int val=0; val < dev->colorSpace()->nColorChannels(); val++) m_page->cmbChannel->insertItem(channels.at(val)->name()); - connect( m_page->cmbChannel, SIGNAL(activated(int)), this, SLOT(setActiveChannel(int))); + connect( m_page->cmbChannel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setActiveChannel(int))); // Create the horizontal gradient label - QPixmap hgradientpix(256, 1); - QPainter hgp(&hgradientpix); - hgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine)); + TQPixmap hgradientpix(256, 1); + TQPainter hgp(&hgradientpix); + hgp.setPen(TQPen::TQPen(TQColor(0,0,0),1, TQt::SolidLine)); for( i=0; i<256; ++i ) { - hgp.setPen(QColor(i,i,i)); + hgp.setPen(TQColor(i,i,i)); hgp.drawPoint(i, 0); } m_page->hgradient->setPixmap(hgradientpix); // Create the vertical gradient label - QPixmap vgradientpix(1, 256); - QPainter vgp(&vgradientpix); - vgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine)); + TQPixmap vgradientpix(1, 256); + TQPainter vgp(&vgradientpix); + vgp.setPen(TQPen::TQPen(TQColor(0,0,0),1, TQt::SolidLine)); for( i=0; i<256; ++i ) { - vgp.setPen(QColor(i,i,i)); + vgp.setPen(TQColor(i,i,i)); vgp.drawPoint(0, 255-i); } m_page->vgradient->setPixmap(vgradientpix); @@ -371,18 +371,18 @@ KisPerChannelFilterConfiguration * KisPerChannelConfigWidget::config() { cfg->curves[ch].setAutoDelete(true); cfg->curves[ch].clear(); - QPair *p, *inpoint; + TQPair *p, *inpoint; inpoint = m_curves[ch].first(); while(inpoint) { - p = new QPair(inpoint->first, inpoint->second); + p = new TQPair(inpoint->first, inpoint->second); cfg->curves[ch].append(p); inpoint = m_curves[ch].next(); } for(int i=0; i <256; i++) { - Q_INT32 val; + TQ_INT32 val; val = int(0xFFFF * m_page->kCurve->getCurveValue(m_curves[ch], i / 255.0)); if ( val > 0xFFFF ) val = 0xFFFF; @@ -405,11 +405,11 @@ void KisPerChannelConfigWidget::setConfiguration(KisFilterConfiguration * config { m_curves[ch].setAutoDelete(true); m_curves[ch].clear(); - QPair *p, *inpoint; + TQPair *p, *inpoint; inpoint = cfg->curves[ch].first(); while(inpoint) { - p = new QPair(inpoint->first, inpoint->second); + p = new TQPair(inpoint->first, inpoint->second); m_curves[ch].append(p); inpoint = cfg->curves[ch].next(); } diff --git a/krita/plugins/filters/colorsfilters/kis_perchannel_filter.h b/krita/plugins/filters/colorsfilters/kis_perchannel_filter.h index a34e9aac..2c526acc 100644 --- a/krita/plugins/filters/colorsfilters/kis_perchannel_filter.h +++ b/krita/plugins/filters/colorsfilters/kis_perchannel_filter.h @@ -21,8 +21,8 @@ #ifndef _KIS_PERCHANNEL_FILTER_H_ #define _KIS_PERCHANNEL_FILTER_H_ -#include -#include +#include +#include #include "kis_filter.h" #include "kis_filter_configuration.h" #include "kis_filter_config_widget.h" @@ -36,13 +36,13 @@ public: KisPerChannelFilterConfiguration(int n); ~KisPerChannelFilterConfiguration(); - virtual void fromXML( const QString& ); - virtual QString toString(); + virtual void fromXML( const TQString& ); + virtual TQString toString(); public: - QPtrList > *curves; - Q_UINT16 *transfers[256]; - Q_UINT16 nTransfers; + TQPtrList > *curves; + TQ_UINT16 *transfers[256]; + TQ_UINT16 nTransfers; // Caching of adjustment bool dirty; KisColorSpace* oldCs; @@ -59,10 +59,10 @@ class KisPerChannelFilter public: KisPerChannelFilter() : KisFilter( id(), "adjust", i18n("&Color Adjustment...")) {}; public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); virtual KisFilterConfiguration* configuration() { return new KisPerChannelFilterConfiguration(0); }; - virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("perchannel", i18n("Color Adjustment")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -77,9 +77,10 @@ class KisPerChannelConfigWidget : public KisFilterConfigWidget { typedef KisFilterConfigWidget super; Q_OBJECT + TQ_OBJECT public: - KisPerChannelConfigWidget(QWidget * parent, KisPaintDeviceSP dev, const char * name = 0, WFlags f = 0 ); + KisPerChannelConfigWidget(TQWidget * tqparent, KisPaintDeviceSP dev, const char * name = 0, WFlags f = 0 ); virtual ~KisPerChannelConfigWidget() {}; KisPerChannelFilterConfiguration * config(); @@ -92,7 +93,7 @@ private: WdgPerChannel * m_page; KisPaintDeviceSP m_dev; KisHistogram *m_histogram; - QPtrList > *m_curves; + TQPtrList > *m_curves; int m_activeCh; }; diff --git a/krita/plugins/filters/colorsfilters/wdg_brightness_contrast.ui b/krita/plugins/filters/colorsfilters/wdg_brightness_contrast.ui index bf09239e..9474462b 100644 --- a/krita/plugins/filters/colorsfilters/wdg_brightness_contrast.ui +++ b/krita/plugins/filters/colorsfilters/wdg_brightness_contrast.ui @@ -1,6 +1,6 @@ WdgBrightnessContrast - + WdgBrightnessContrast @@ -30,15 +30,15 @@ 0 - + - layout4 + tqlayout4 unnamed - + hgradient @@ -50,13 +50,13 @@ 0 - + 250 20 - + 250 20 @@ -72,7 +72,7 @@ true - + frame3 @@ -84,13 +84,13 @@ 0 - + 254 254 - + 254 254 @@ -116,13 +116,13 @@ kCurve - + 250 250 - + 250 250 @@ -131,7 +131,7 @@ - + vgradient @@ -143,13 +143,13 @@ 0 - + 20 250 - + 20 250 @@ -167,15 +167,15 @@ - + - layout7 + tqlayout7 unnamed - + pb_more_contrast @@ -186,18 +186,18 @@ - + textLabelContrast Contrast - + AlignCenter - + pb_less_contrast @@ -208,7 +208,7 @@ - + pb_less_brightness @@ -219,18 +219,18 @@ - + textLabelBrightness Brightness - + AlignCenter - + pb_more_brightness @@ -253,7 +253,7 @@ Expanding - + 131 20 @@ -285,7 +285,7 @@ 789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f - + kcurve.h diff --git a/krita/plugins/filters/colorsfilters/wdg_perchannel.ui b/krita/plugins/filters/colorsfilters/wdg_perchannel.ui index 464e97fd..243d628f 100644 --- a/krita/plugins/filters/colorsfilters/wdg_perchannel.ui +++ b/krita/plugins/filters/colorsfilters/wdg_perchannel.ui @@ -1,6 +1,6 @@ WdgPerChannel - + WdgPerChannel @@ -22,15 +22,15 @@ 0 - + - layout4 + tqlayout4 unnamed - + textLabel1 @@ -38,22 +38,22 @@ Channel: - + cmbChannel - + - layout8 + tqlayout8 unnamed - + hgradient @@ -65,13 +65,13 @@ 0 - + 0 20 - + 32767 20 @@ -87,7 +87,7 @@ true - + frame3 @@ -122,7 +122,7 @@ - + vgradient @@ -134,13 +134,13 @@ 0 - + 20 0 - + 20 32767 @@ -183,7 +183,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082 - + kcurve.h diff --git a/krita/plugins/filters/convolutionfilters/convolutionfilters.cc b/krita/plugins/filters/convolutionfilters/convolutionfilters.cc index 1eaf788d..f0eb7fef 100644 --- a/krita/plugins/filters/convolutionfilters/convolutionfilters.cc +++ b/krita/plugins/filters/convolutionfilters/convolutionfilters.cc @@ -29,10 +29,10 @@ #include "kis_custom_convolution_filter.h" -KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, - Q_INT32 i3, Q_INT32 i4, Q_INT32 i5, - Q_INT32 i6, Q_INT32 i7, Q_INT32 i8, - Q_INT32 factor, Q_INT32 offset ) +KisKernelSP createKernel( TQ_INT32 i0, TQ_INT32 i1, TQ_INT32 i2, + TQ_INT32 i3, TQ_INT32 i4, TQ_INT32 i5, + TQ_INT32 i6, TQ_INT32 i7, TQ_INT32 i8, + TQ_INT32 factor, TQ_INT32 offset ) { KisKernelSP kernel = new KisKernel(); kernel->width = 3; @@ -41,7 +41,7 @@ KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, kernel->factor = factor; kernel->offset = offset; - kernel->data = new Q_INT32[9]; + kernel->data = new TQ_INT32[9]; kernel->data[0] = i0; kernel->data[1] = i1; kernel->data[2] = i2; @@ -60,13 +60,13 @@ KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, typedef KGenericFactory KritaConvolutionFiltersFactory; K_EXPORT_COMPONENT_FACTORY( kritaconvolutionfilters, KritaConvolutionFiltersFactory( "krita" ) ) -KritaConvolutionFilters::KritaConvolutionFilters(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaConvolutionFilters::KritaConvolutionFilters(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaConvolutionFiltersFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisGaussianBlurFilter()); manager->add(new KisSharpenFilter()); manager->add(new KisMeanRemovalFilter()); @@ -121,20 +121,20 @@ KisEmbossInAllDirectionsFilter::KisEmbossInAllDirectionsFilter() } KisEmbossHorizontalVerticalFilter::KisEmbossHorizontalVerticalFilter() - : KisConvolutionConstFilter(id(), "emboss", i18n("Emboss Horizontal && Vertical")) + : KisConvolutionConstFilter(id(), "emboss", i18n("EmbossQt::Horizontal &&Qt::Vertical")) { m_matrix = createKernel( 0, -1, 0 , -1, 4, -1 , 0, -1, 0, 1, 127); m_channelFlags = KisChannelInfo::FLAG_COLOR; } KisEmbossVerticalFilter::KisEmbossVerticalFilter() - : KisConvolutionConstFilter(id(), "emboss", i18n("Emboss Vertical Only")) + : KisConvolutionConstFilter(id(), "emboss", i18n("EmbossQt::Vertical Only")) { m_matrix = createKernel( 0, -1, 0 , 0, 2, 0 , 0, -1, 0, 1, 127); } KisEmbossHorizontalFilter::KisEmbossHorizontalFilter() : - KisConvolutionConstFilter(id(), "emboss", i18n("Emboss Horizontal Only")) + KisConvolutionConstFilter(id(), "emboss", i18n("EmbossQt::Horizontal Only")) { m_matrix = createKernel( 0, 0, 0 , -1, 4, -1 , 0, 0, 0, 1, 127); diff --git a/krita/plugins/filters/convolutionfilters/convolutionfilters.h b/krita/plugins/filters/convolutionfilters/convolutionfilters.h index 15a23c2b..39b2372a 100644 --- a/krita/plugins/filters/convolutionfilters/convolutionfilters.h +++ b/krita/plugins/filters/convolutionfilters/convolutionfilters.h @@ -73,7 +73,7 @@ class KisEmbossHorizontalVerticalFilter : public KisConvolutionConstFilter { public: KisEmbossHorizontalVerticalFilter(); public: - static inline KisID id() { return KisID("", i18n("Emboss Horizontal & Vertical")); }; + static inline KisID id() { return KisID("", i18n("EmbossQt::Horizontal &Qt::Vertical")); }; virtual bool supportsPainting() { return false; } }; @@ -82,7 +82,7 @@ class KisEmbossVerticalFilter : public KisConvolutionConstFilter { public: KisEmbossVerticalFilter(); public: - static inline KisID id() { return KisID("emboss vertical only", i18n("Emboss Vertical Only")); }; + static inline KisID id() { return KisID("emboss vertical only", i18n("EmbossQt::Vertical Only")); }; virtual bool supportsPainting() { return false; } }; @@ -91,7 +91,7 @@ class KisEmbossHorizontalFilter : public KisConvolutionConstFilter { public: KisEmbossHorizontalFilter(); public: - static inline KisID id() { return KisID("emboss horizontal only", i18n("Emboss Horizontal Only")); }; + static inline KisID id() { return KisID("emboss horizontal only", i18n("EmbossQt::Horizontal Only")); }; virtual bool supportsPainting() { return false; } }; @@ -145,7 +145,7 @@ public: class KritaConvolutionFilters : public KParts::Plugin { public: - KritaConvolutionFilters(QObject *parent, const char *name, const QStringList &); + KritaConvolutionFilters(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaConvolutionFilters(); }; diff --git a/krita/plugins/filters/convolutionfilters/kis_convolution_filter.cc b/krita/plugins/filters/convolutionfilters/kis_convolution_filter.cc index dc86b8d2..39a395b4 100644 --- a/krita/plugins/filters/convolutionfilters/kis_convolution_filter.cc +++ b/krita/plugins/filters/convolutionfilters/kis_convolution_filter.cc @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qdom.h" +#include "tqdom.h" #include "klocale.h" #include "kdebug.h" @@ -27,60 +27,60 @@ #include "kis_progress_display_interface.h" #include "kis_progress_subject.h" -void KisConvolutionConfiguration::fromXML(const QString & s) +void KisConvolutionConfiguration::fromXML(const TQString & s) { m_matrix = new KisKernel(); - QDomDocument doc; + TQDomDocument doc; doc.setContent( s ); - QDomElement e = doc.documentElement(); - QDomNode n = e.firstChild(); + TQDomElement e = doc.documentElement(); + TQDomNode n = e.firstChild(); m_name = e.attribute("name"); m_version = e.attribute("version").toInt(); - QDomElement matrix = n.toElement(); - m_matrix->width = QString( matrix.attribute( "width" ) ).toInt(); - m_matrix->height = QString( matrix.attribute( "height" ) ).toInt(); - m_matrix->offset = QString( matrix.attribute( "offset" ) ).toInt(); - m_matrix->factor = QString( matrix.attribute( "factor" ) ).toInt(); + TQDomElement matrix = n.toElement(); + m_matrix->width = TQString( matrix.attribute( "width" ) ).toInt(); + m_matrix->height = TQString( matrix.attribute( "height" ) ).toInt(); + m_matrix->offset = TQString( matrix.attribute( "offset" ) ).toInt(); + m_matrix->factor = TQString( matrix.attribute( "factor" ) ).toInt(); - m_matrix->data = new Q_INT32[m_matrix->width * m_matrix->height]; + m_matrix->data = new TQ_INT32[m_matrix->width * m_matrix->height]; - QStringList data = QStringList::split( ",", e.text() ); - QStringList::Iterator start = data.begin(); - QStringList::Iterator end = data.end(); + TQStringList data = TQStringList::split( ",", e.text() ); + TQStringList::Iterator start = data.begin(); + TQStringList::Iterator end = data.end(); int i = 0; - for ( QStringList::Iterator it = start; it != end; ++it ) { - QString s = *it; + for ( TQStringList::Iterator it = start; it != end; ++it ) { + TQString s = *it; m_matrix->data[i] = s.toInt(); i++; } } -QString KisConvolutionConfiguration::toString() +TQString KisConvolutionConfiguration::toString() { - QDomDocument doc = QDomDocument("filterconfig"); - QDomElement root = doc.createElement( "filterconfig" ); + TQDomDocument doc = TQDomDocument("filterconfig"); + TQDomElement root = doc.createElement( "filterconfig" ); root.setAttribute( "name", name() ); root.setAttribute( "version", version() ); doc.appendChild( root ); - QDomElement e = doc.createElement( "kernel" ); + TQDomElement e = doc.createElement( "kernel" ); e.setAttribute( "width", m_matrix->width ); e.setAttribute( "height", m_matrix->height ); e.setAttribute( "offset", m_matrix->offset ); e.setAttribute( "factor", m_matrix->factor ); - QString data; + TQString data; for ( uint i = 0; i < m_matrix->width * m_matrix->height; ++i ) { - data += QString::number( m_matrix->data[i] ); + data += TQString::number( m_matrix->data[i] ); data += ","; } - QDomText text = doc.createCDATASection(data); + TQDomText text = doc.createCDATASection(data); e.appendChild(text); root.appendChild(e); @@ -91,7 +91,7 @@ QString KisConvolutionConfiguration::toString() void KisConvolutionFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, - const QRect& rect) + const TQRect& rect) { if (!configuration) { setProgressDone(); @@ -127,10 +127,10 @@ int KisConvolutionFilter::overlapMarginNeeded(KisFilterConfiguration* c) const { if (!config) return 0; KisKernelSP kernel = config->matrix(); - return QMAX(kernel->width / 2, kernel->height / 2); + return TQMAX(kernel->width / 2, kernel->height / 2); } -KisFilterConfiguration* KisConvolutionConstFilter::configuration(QWidget*) +KisFilterConfiguration* KisConvolutionConstFilter::configuration(TQWidget*) { return new KisConvolutionConfiguration( id().id(), m_matrix, m_channelFlags); } diff --git a/krita/plugins/filters/convolutionfilters/kis_convolution_filter.h b/krita/plugins/filters/convolutionfilters/kis_convolution_filter.h index f33ddc27..5a2d5a72 100644 --- a/krita/plugins/filters/convolutionfilters/kis_convolution_filter.h +++ b/krita/plugins/filters/convolutionfilters/kis_convolution_filter.h @@ -27,15 +27,15 @@ class KisConvolutionConfiguration : public KisFilterConfiguration { public: - KisConvolutionConfiguration(const QString & name, KisKernel * matrix, + KisConvolutionConfiguration(const TQString & name, KisKernel * matrix, KisChannelInfo::enumChannelFlags channelFlags = KisChannelInfo::FLAG_COLOR_AND_ALPHA) : KisFilterConfiguration( name, 1 ) , m_matrix(matrix) , m_channelFlags(channelFlags) {}; - void fromXML(const QString & s); - QString toString(); + void fromXML(const TQString & s); + TQString toString(); public: @@ -53,16 +53,17 @@ private: class KisConvolutionFilter : public KisFilter { Q_OBJECT + TQ_OBJECT public: - KisConvolutionFilter(const KisID& id, const QString & category, const QString & entry) + KisConvolutionFilter(const KisID& id, const TQString & category, const TQString & entry) : KisFilter( id, category, entry ) {}; public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); virtual bool supportsIncrementalPainting() { return false; } virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; virtual int overlapMarginNeeded(KisFilterConfiguration* c) const; @@ -76,7 +77,7 @@ class KisConvolutionConstFilter : public KisConvolutionFilter { public: - KisConvolutionConstFilter(const KisID& id, const QString & category, const QString & entry) + KisConvolutionConstFilter(const KisID& id, const TQString & category, const TQString & entry) : KisConvolutionFilter(id, category, entry) { m_channelFlags = KisChannelInfo::FLAG_COLOR_AND_ALPHA; @@ -86,7 +87,7 @@ public: public: - virtual KisFilterConfiguration * configuration(QWidget*); + virtual KisFilterConfiguration * configuration(TQWidget*); virtual KisFilterConfiguration * configuration() { return configuration(0); }; protected: diff --git a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.cc b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.cc index 06998e3c..8d48d25d 100644 --- a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.cc +++ b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.cc @@ -22,7 +22,7 @@ #include "kis_custom_convolution_filter.h" -#include +#include #include "kis_convolution_painter.h" #include "kis_custom_convolution_filter_configuration_widget.h" @@ -30,14 +30,14 @@ #include "kis_matrix_widget.h" -KisFilterConfigWidget * KisCustomConvolutionFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP) +KisFilterConfigWidget * KisCustomConvolutionFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP) { - KisCustomConvolutionFilterConfigurationWidget* ccfcw = new KisCustomConvolutionFilterConfigurationWidget(this,parent, "custom convolution config widget"); + KisCustomConvolutionFilterConfigurationWidget* ccfcw = new KisCustomConvolutionFilterConfigurationWidget(this,tqparent, "custom convolution config widget"); Q_CHECK_PTR(ccfcw); return ccfcw; } -KisFilterConfiguration * KisCustomConvolutionFilter::configuration(QWidget* nwidget) +KisFilterConfiguration * KisCustomConvolutionFilter::configuration(TQWidget* nwidget) { KisCustomConvolutionFilterConfigurationWidget* widget = (KisCustomConvolutionFilterConfigurationWidget*) nwidget; @@ -51,7 +51,7 @@ KisFilterConfiguration * KisCustomConvolutionFilter::configuration(QWidget* nwid kernel->factor = 1; kernel->offset = 127; - kernel->data = new Q_INT32[9]; + kernel->data = new TQ_INT32[9]; kernel->data[0] = 0; kernel->data[1] = 0; kernel->data[2] = 0; @@ -71,7 +71,7 @@ KisFilterConfiguration * KisCustomConvolutionFilter::configuration(QWidget* nwid kernel->width = 3; kernel->height = 3; - kernel->data = new Q_INT32[9]; + kernel->data = new TQ_INT32[9]; KisCustomConvolutionFilterConfigurationBaseWidget* mw = widget->matrixWidget(); diff --git a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.h b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.h index 39845cd5..479de21f 100644 --- a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.h +++ b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter.h @@ -26,7 +26,7 @@ #include "kis_id.h" #include "kis_types.h" -class QWidget; +class TQWidget; class KisCustomConvolutionFilter : public KisConvolutionFilter { @@ -39,8 +39,8 @@ public: virtual bool supportsIncrementalPainting() { return true; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration * configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration * configuration(TQWidget*); virtual KisFilterConfiguration * configuration() { return configuration(0); }; protected: virtual KisKernelSP matrix() { return m_matrix; }; diff --git a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_base_widget.ui b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_base_widget.ui index 5c94934e..495fd3bc 100644 --- a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_base_widget.ui +++ b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_base_widget.ui @@ -1,6 +1,6 @@ KisCustomConvolutionFilterConfigurationBaseWidget - + KisCustomConvolutionFilterConfigurationBaseWidget @@ -19,9 +19,9 @@ unnamed - + - layout5 + tqlayout5 @@ -32,15 +32,15 @@ matrixWidget - + - layout4 + tqlayout4 unnamed - + textLabelFactor @@ -48,7 +48,7 @@ Factor: - + spinBoxFactor @@ -69,7 +69,7 @@ Expanding - + 21 20 @@ -78,15 +78,15 @@ - + - layout3 + tqlayout3 unnamed - + textLabelOffset @@ -94,7 +94,7 @@ Offset: - + spinBoxOffset @@ -115,7 +115,7 @@ Expanding - + 24 20 @@ -134,7 +134,7 @@ Expanding - + 20 40 @@ -153,7 +153,7 @@ Expanding - + 20 20 @@ -185,5 +185,5 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042c49444154789cb5954f6c14551cc73fefcd7476b65bdaae4bb78bb5502a14d404e4801c88182d1c4c2c693da847400f9c24c68b878684238660e2b1e01f12c19493012ef2478c814412d354a46017a8a564bb6da5bbedccee767776e63d0ffb073751d483bfe49799974c3eeffb7ebf37df9fd05a530b2184040cc0042420aaf9a4d0d554800f045a6b256ae0e1e1e1d6bebebe838ee31c48a7d39b5cd7fd075e251cc7617272f2ded8d8d819cff33e0316819259537aead4a9839d5dd6d1784f91f55b0a94830242088404d304292bef68a89f520802a598fecddaa04f1a876f5c250c7c0a64cdeac686e33807e23d45e6b297c8b877f1831542614550b6599835c83c2a81b6786a75134faf2f1169f12997350881d9021d0903e06de0745d3160a6d3e94dbd5b0a64dcbb94b5831d0e3375ab892b1772dcf9790528543f8dd0d367b36768153b5e31503a0f1aecb004580b44ffac58baae8b1714f0833c7638cc8dab303a320f4822ab4c7a37c69196203de3319d5ce1c4d13c733331dedc67a129a154fd128401ab0616d55a130ac3d42d93d1913940d13fd0c9ee0183685c60da01c5421bd72f7a8c8efccef9afd374267ad93d642365be0636a0d28ec7600941d9e6f23917f0e97f23ce5bef35d19ec863da0ed9059b2be70bec196c66dfa10ec0e49b338f7017258651bf95021035c595429bb0903248fe52a2b5b595dd7b4d945cc2340cdca536be389ee3f67886c5798f773fe8e0dac508c989659277a2180da4ca4ff07821058b8b251445d63d6b13ed1098a6417e39cac85197dbe31962ab9bd9f1f22a226d45366f6d0620fdb08c900d281af6110284b20085b414861d905d88f2e52739ee8cbb8022143259d3dd84691730aa2d52da441a8de0c6958068870022a41e9629ad3473fd3b8fdbe319dadb9b4924da994d2d716c7896fbe35152f78b48245d6b2da4507faf582be8eaf159b721cc837b05ae7debb1f79d08cb8b515edad942a22bc4b1c33eb3d34b1c797f06af90a72d16e2f96d9a74aa11dca8586b222d01af0fb60070f6c402d72f15d97f28c6f6d7027a5f5ce6c3233dc4e2ede496b278be4fff608cee8d3e1add806aeca51094cbb06397c1ecc328e746537c7e3ccdb5cb1136bf60635882d4d41c6ec6836ab37efa214f72208ed9f4d7cdd38ee310280542e38b1c43fb6de26b3672e1ec3cc99bcb246f66a938a3241ab3e91f7c861fbf77710b1e5e49915bae974203ba0e9e9c9cbc373d6d6d305a040a89c2a77f50b27d5782bbbf7acccf28349235dd16cf6dd374f7295e1de8a45c02d37499182b01cc0201a085d61a2144d8b2ac8fb6ed340e77240c4261890e04c250185262546d534a032154b59e0ad394e41c98182bf268ce6721ed9f064e0253356f6da2e24c1f030f783c15fe6da680af8021602bd051532ca9b8521488559f61aa86c29343578fbf0264a94c906c7d3409214c20043457a116ff6de6795578012889ff6b98fe016ea0ce1c203e47720000000049454e44ae426082 - + diff --git a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.cc b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.cc index 51ad5e62..b1905d30 100644 --- a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.cc +++ b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.cc @@ -18,8 +18,8 @@ #include "kis_custom_convolution_filter_configuration_widget.h" -#include -#include +#include +#include #include @@ -34,30 +34,30 @@ #include "kis_custom_convolution_filter_configuration_base_widget.h" #include "kis_matrix_widget.h" -KisCustomConvolutionFilterConfigurationWidget::KisCustomConvolutionFilterConfigurationWidget( KisFilter* /*nfilter*/, QWidget * parent, const char * name) - : KisFilterConfigWidget ( parent, name ) +KisCustomConvolutionFilterConfigurationWidget::KisCustomConvolutionFilterConfigurationWidget( KisFilter* /*nfilter*/, TQWidget * tqparent, const char * name) + : KisFilterConfigWidget ( tqparent, name ) { - QGridLayout *widgetLayout = new QGridLayout(this, 2, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 2, 1); Q_CHECK_PTR(widgetLayout); -// QPushButton *bnRefresh = new QPushButton(i18n("Refresh Preview"), this, "bnrefresh"); +// TQPushButton *bnRefresh = new TQPushButton(i18n("Refresh Preview"), this, "bnrefresh"); // Q_CHECK_PTR(bnRefresh); -// QSpacerItem *spacer = new QSpacerItem(100, 30, QSizePolicy::Expanding, QSizePolicy::Minimum); +// TQSpacerItem *spacer = new TQSpacerItem(100, 30, TQSizePolicy::Expanding, TQSizePolicy::Minimum); // Q_CHECK_PTR(spacer); // widgetLayout->addWidget(bnRefresh, 0, 0); // widgetLayout->addItem(spacer, 0, 1); - m_ccfcws = new KisCustomConvolutionFilterConfigurationBaseWidget((QWidget*)this); + m_ccfcws = new KisCustomConvolutionFilterConfigurationBaseWidget((TQWidget*)this); Q_CHECK_PTR(m_ccfcws); widgetLayout->addMultiCellWidget(m_ccfcws, 1, 1, 0, 1); -// connect( bnRefresh, SIGNAL(clicked()), nfilter, SLOT(refreshPreview())); - connect( m_ccfcws->matrixWidget, SIGNAL(valueChanged()), SIGNAL(sigPleaseUpdatePreview())); - connect( m_ccfcws->spinBoxFactor, SIGNAL(valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_ccfcws->spinBoxOffset, SIGNAL(valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); +// connect( bnRefresh, TQT_SIGNAL(clicked()), nfilter, TQT_SLOT(refreshPreview())); + connect( m_ccfcws->matrixWidget, TQT_SIGNAL(valueChanged()), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_ccfcws->spinBoxFactor, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_ccfcws->spinBoxOffset, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); } void KisCustomConvolutionFilterConfigurationWidget::setConfiguration(KisFilterConfiguration * cfg) diff --git a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.h b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.h index 40389554..b5819e39 100644 --- a/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.h +++ b/krita/plugins/filters/convolutionfilters/kis_custom_convolution_filter_configuration_widget.h @@ -21,7 +21,7 @@ #include "kis_filter_config_widget.h" -class QWidget; +class TQWidget; class KisCustomConvolutionFilterConfigurationBaseWidget; class KisMatrixWidget; class KisFilter; @@ -30,10 +30,11 @@ class KisCustomConvolutionFilterConfigurationWidget : public KisFilterConfigWidg { Q_OBJECT + TQ_OBJECT public: - KisCustomConvolutionFilterConfigurationWidget( KisFilter* nfilter, QWidget * parent, const char * name); + KisCustomConvolutionFilterConfigurationWidget( KisFilter* nfilter, TQWidget * tqparent, const char * name); inline KisCustomConvolutionFilterConfigurationBaseWidget* matrixWidget() { return m_ccfcws; }; void setConfiguration(KisFilterConfiguration * config); diff --git a/krita/plugins/filters/cubismfilter/kis_cubism_filter.cc b/krita/plugins/filters/cubismfilter/kis_cubism_filter.cc index aa374419..904168d3 100644 --- a/krita/plugins/filters/cubismfilter/kis_cubism_filter.cc +++ b/krita/plugins/filters/cubismfilter/kis_cubism_filter.cc @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -72,18 +72,18 @@ bool KisCubismFilter::workWith(KisColorSpace* /*cs*/) void KisCubismFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, - KisFilterConfiguration* configuration, const QRect& rect) + KisFilterConfiguration* configuration, const TQRect& rect) { Q_ASSERT(src); Q_ASSERT(dst); Q_ASSERT(configuration); //read the filter configuration values from the KisFilterConfiguration object - Q_UINT32 tileSize = ((KisCubismFilterConfiguration*)configuration)->tileSize(); - Q_UINT32 tileSaturation = ((KisCubismFilterConfiguration*)configuration)->tileSaturation(); + TQ_UINT32 tileSize = ((KisCubismFilterConfiguration*)configuration)->tileSize(); + TQ_UINT32 tileSaturation = ((KisCubismFilterConfiguration*)configuration)->tileSaturation(); KisColorSpace * cs = src->colorSpace(); - QString id = cs->id().id(); + TQString id = cs->id().id(); if (id == "RGBA" || id == "GRAY" || id == "CMYK") { cubism(src, dst, rect, tileSize, tileSaturation); @@ -97,7 +97,7 @@ void KisCubismFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, gc.end(); kdDebug() << src->colorSpace()->id().id() << endl; - cubism(dev, dev, QRect(0, 0, rect.width(), rect.height()), tileSize, tileSaturation); + cubism(dev, dev, TQRect(0, 0, rect.width(), rect.height()), tileSize, tileSaturation); gc.begin(dst); gc.bitBlt(rect.x(), rect.y(), COMPOSITE_COPY, dev, 0, 0, rect.width(), rect.height()); @@ -108,15 +108,15 @@ void KisCubismFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, } } -void KisCubismFilter::randomizeIndices (Q_INT32 count, Q_INT32* indices) +void KisCubismFilter::randomizeIndices (TQ_INT32 count, TQ_INT32* indices) { - Q_INT32 index1, index2; - Q_INT32 tmp; + TQ_INT32 index1, index2; + TQ_INT32 tmp; //initialize random number generator with time srand(static_cast(time(0))); - for (Q_INT32 i = 0; i < count * RANDOMNESS; i++) + for (TQ_INT32 i = 0; i < count * RANDOMNESS; i++) { index1 = randomIntNumber(0, count); index2 = randomIntNumber(0, count); @@ -126,11 +126,11 @@ void KisCubismFilter::randomizeIndices (Q_INT32 count, Q_INT32* indices) } } -Q_INT32 KisCubismFilter::randomIntNumber(Q_INT32 lowestNumber, Q_INT32 highestNumber) +TQ_INT32 KisCubismFilter::randomIntNumber(TQ_INT32 lowestNumber, TQ_INT32 highestNumber) { if(lowestNumber > highestNumber) { - Q_INT32 temp = lowestNumber; + TQ_INT32 temp = lowestNumber; lowestNumber = highestNumber; highestNumber = temp; } @@ -167,20 +167,20 @@ double KisCubismFilter::calcAlphaBlend (double* vec, double oneOverDist, double } } -void KisCubismFilter::convertSegment (Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2, Q_INT32 offset, Q_INT32* min, Q_INT32* max, Q_INT32 xmin, Q_INT32 xmax) +void KisCubismFilter::convertSegment (TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2, TQ_INT32 offset, TQ_INT32* min, TQ_INT32* max, TQ_INT32 xmin, TQ_INT32 xmax) { if (y1 > y2) { - Q_INT32 tmp = y2; y2 = y1; y1 = tmp; + TQ_INT32 tmp = y2; y2 = y1; y1 = tmp; tmp = x2; x2 = x1; x1 = tmp; } - Q_INT32 ydiff = (y2 - y1); + TQ_INT32 ydiff = (y2 - y1); if (ydiff) { double xinc = static_cast(x2 - x1) / static_cast(ydiff); double xstart = x1 + 0.5 * xinc; - for (Q_INT32 y = y1 ; y < y2; y++) + for (TQ_INT32 y = y1 ; y < y2; y++) { if(xstart >= xmin && xstart <= xmax) { @@ -200,25 +200,25 @@ void KisCubismFilter::convertSegment (Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT3 #define USE_READABLE_BUT_SLOW_CODE -void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, KisPolygon* poly, const Q_UINT8* col, Q_UINT8* /*s*/, QRect rect) +void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, KisPolygon* poly, const TQ_UINT8* col, TQ_UINT8* /*s*/, TQRect rect) { - Q_INT32 val; - Q_INT32 alpha; - Q_UINT8 buf[4]; - Q_INT32 x, y; + TQ_INT32 val; + TQ_INT32 alpha; + TQ_UINT8 buf[4]; + TQ_INT32 x, y; double xx, yy; double vec[2]; - Q_INT32 x1 = rect.left(), y1 = rect.top(), x2 = rect.right(), y2 = rect.bottom(); -// Q_INT32 selWidth, selHeight; - Q_INT32 *vals, *valsIter, *valsEnd; - Q_INT32 b; - Q_INT32 xs, ys, xe, ye; + TQ_INT32 x1 = rect.left(), y1 = rect.top(), x2 = rect.right(), y2 = rect.bottom(); +// TQ_INT32 selWidth, selHeight; + TQ_INT32 *vals, *valsIter, *valsEnd; + TQ_INT32 b; + TQ_INT32 xs, ys, xe, ye; - Q_INT32 sx = (Q_INT32) (*poly)[0].x(); - Q_INT32 sy = (Q_INT32) (*poly)[0].y(); - Q_INT32 ex = (Q_INT32) (*poly)[1].x(); - Q_INT32 ey = (Q_INT32) (*poly)[1].y(); + TQ_INT32 sx = (TQ_INT32) (*poly)[0].x(); + TQ_INT32 sy = (TQ_INT32) (*poly)[0].y(); + TQ_INT32 ex = (TQ_INT32) (*poly)[1].x(); + TQ_INT32 ey = (TQ_INT32) (*poly)[1].y(); double dist = sqrt (SQR (ex - sx) + SQR (ey - sy)); double oneOverDist = 0.0; @@ -229,23 +229,23 @@ void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, vec[1] = (ey - sy) * oneOverDist; } - Q_INT32 pixelSize = src->pixelSize(); + TQ_INT32 pixelSize = src->pixelSize(); //get the extents of the polygon double dMinX, dMinY, dMaxX, dMaxY; poly->extents (dMinX, dMinY, dMaxX, dMaxY); - Q_INT32 minX = static_cast(dMinX); - Q_INT32 minY = static_cast(dMinY); - Q_INT32 maxX = static_cast(dMaxX); - Q_INT32 maxY = static_cast(dMaxY); - Q_INT32 sizeX = (maxX - minX) * SUPERSAMPLE; - Q_INT32 sizeY = (maxY - minY) * SUPERSAMPLE; - - Q_INT32 *minScanlines = new Q_INT32[sizeY]; - Q_INT32 *minScanlinesIter = minScanlines; - Q_INT32 *maxScanlines = new Q_INT32[sizeY]; - Q_INT32 *maxScanlinesIter = maxScanlines; - - for (Q_INT32 i = 0; i < sizeY; i++) + TQ_INT32 minX = static_cast(dMinX); + TQ_INT32 minY = static_cast(dMinY); + TQ_INT32 maxX = static_cast(dMaxX); + TQ_INT32 maxY = static_cast(dMaxY); + TQ_INT32 sizeX = (maxX - minX) * SUPERSAMPLE; + TQ_INT32 sizeY = (maxY - minY) * SUPERSAMPLE; + + TQ_INT32 *minScanlines = new TQ_INT32[sizeY]; + TQ_INT32 *minScanlinesIter = minScanlines; + TQ_INT32 *maxScanlines = new TQ_INT32[sizeY]; + TQ_INT32 *maxScanlinesIter = maxScanlines; + + for (TQ_INT32 i = 0; i < sizeY; i++) { minScanlines[i] = maxX * SUPERSAMPLE; maxScanlines[i] = minX * SUPERSAMPLE; @@ -253,12 +253,12 @@ void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, if ( poly->numberOfPoints() ) { - Q_INT32 polyNpts = poly->numberOfPoints(); + TQ_INT32 polyNpts = poly->numberOfPoints(); - xs = static_cast((*poly)[polyNpts-1].x()); - ys = static_cast((*poly)[polyNpts-1].y()); - xe = static_cast((*poly)[0].x()); - ye = static_cast((*poly)[0].y()); + xs = static_cast((*poly)[polyNpts-1].x()); + ys = static_cast((*poly)[polyNpts-1].y()); + xe = static_cast((*poly)[0].x()); + ye = static_cast((*poly)[0].y()); xs *= SUPERSAMPLE; ys *= SUPERSAMPLE; @@ -271,14 +271,14 @@ void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, for ( it = poly->begin(); it != poly->end(); ) { - xs = static_cast((*it).x()); - ys = static_cast((*it).y()); + xs = static_cast((*it).x()); + ys = static_cast((*it).y()); ++it; if( it != poly->end() ) { - xe = static_cast((*it).x()); - ye = static_cast((*it).y()); + xe = static_cast((*it).x()); + ye = static_cast((*it).y()); xs *= SUPERSAMPLE; ys *= SUPERSAMPLE; @@ -290,18 +290,18 @@ void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, } } - vals = new Q_INT32[sizeX]; + vals = new TQ_INT32[sizeX]; // x1 = minX; x2 = maxX; y1 = minY; y2 = maxY; - for (Q_INT32 i = 0; i < sizeY; i++, minScanlinesIter++, maxScanlinesIter++) + for (TQ_INT32 i = 0; i < sizeY; i++, minScanlinesIter++, maxScanlinesIter++) { if (! (i % SUPERSAMPLE)) { - memset (vals, 0, sizeof( Q_INT32 ) * sizeX); + memset (vals, 0, sizeof( TQ_INT32 ) * sizeX); } yy = static_cast(i) / static_cast(SUPERSAMPLE) + minY; - for (Q_INT32 j = *minScanlinesIter; j < *maxScanlinesIter; j++) + for (TQ_INT32 j = *minScanlinesIter; j < *maxScanlinesIter; j++) { x = j - minX * SUPERSAMPLE; vals[x] += 255; @@ -312,7 +312,7 @@ void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, y = (i / SUPERSAMPLE) + minY; if (y >= y1 && y <= y2) { - for (Q_INT32 j = 0; j < sizeX; j += SUPERSAMPLE) + for (TQ_INT32 j = 0; j < sizeX; j += SUPERSAMPLE) { x = (j / SUPERSAMPLE) + minX; @@ -327,20 +327,20 @@ void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, if (val > 0) { xx = static_cast(j) / static_cast(SUPERSAMPLE) + minX; - alpha = static_cast(val * calcAlphaBlend (vec, oneOverDist, xx - sx, yy - sy)); + alpha = static_cast(val * calcAlphaBlend (vec, oneOverDist, xx - sx, yy - sy)); // KisRectIteratorPixel srcIt = src->createRectIterator(x,y,1,1, false); -// const Q_UINT8* srcPixel = srcIt.oldRawData(); -// memcpy( buf, srcPixel, sizeof(Q_UINT8) * pixelSize ); +// const TQ_UINT8* srcPixel = srcIt.oldRawData(); +// memcpy( buf, srcPixel, sizeof(TQ_UINT8) * pixelSize ); src->readBytes(buf, x, y, 1, 1); #ifndef USE_READABLE_BUT_SLOW_CODE - Q_UINT8 *bufIter = buf; - const Q_UINT8 *colIter = col; - Q_UINT8 *bufEnd = buf+pixelSize; + TQ_UINT8 *bufIter = buf; + const TQ_UINT8 *colIter = col; + TQ_UINT8 *bufEnd = buf+pixelSize; for(; bufIter < bufEnd; bufIter++, colIter++) - *bufIter = (static_cast(*colIter * alpha) - + (static_cast(*bufIter) + *bufIter = (static_cast(*colIter * alpha) + + (static_cast(*bufIter) * (256 - alpha))) >> 8; #else //original, pre-ECL code for (b = 0; b < pixelSize; b++) @@ -361,17 +361,17 @@ void KisCubismFilter::fillPolyColor (KisPaintDeviceSP src, KisPaintDeviceSP dst, delete[] maxScanlines; } -void KisCubismFilter::cubism(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, Q_UINT32 tileSize, Q_UINT32 tileSaturation) +void KisCubismFilter::cubism(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, TQ_UINT32 tileSize, TQ_UINT32 tileSaturation) { Q_ASSERT(src); Q_ASSERT(dst); //fill the destination image with the background color (black for now) KisRectIteratorPixel dstIt = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); - Q_INT32 depth = src->colorSpace()->nColorChannels(); + TQ_INT32 depth = src->colorSpace()->nColorChannels(); while( ! dstIt.isDone() ) { - for( Q_INT32 i = 0; i < depth; i++) + for( TQ_INT32 i = 0; i < depth; i++) { dstIt.rawData()[i] = 0; } @@ -379,27 +379,27 @@ void KisCubismFilter::cubism(KisPaintDeviceSP src, KisPaintDeviceSP dst, const Q } //compute number of rows and columns - Q_INT32 cols = ( rect.width() + tileSize - 1) / tileSize; - Q_INT32 rows = ( rect.height() + tileSize - 1) / tileSize; - Q_INT32 numTiles = (rows + 1) * (cols + 1); + TQ_INT32 cols = ( rect.width() + tileSize - 1) / tileSize; + TQ_INT32 rows = ( rect.height() + tileSize - 1) / tileSize; + TQ_INT32 numTiles = (rows + 1) * (cols + 1); setProgressTotalSteps(numTiles); setProgressStage(i18n("Applying cubism filter..."),0); - Q_INT32* randomIndices = new Q_INT32[numTiles]; - for (Q_INT32 i = 0; i < numTiles; i++) + TQ_INT32* randomIndices = new TQ_INT32[numTiles]; + for (TQ_INT32 i = 0; i < numTiles; i++) { randomIndices[i] = i; } randomizeIndices (numTiles, randomIndices); - Q_INT32 count = 0; - Q_INT32 i, j, ix, iy; + TQ_INT32 count = 0; + TQ_INT32 i, j, ix, iy; double x, y, width, height, theta; KisPolygon *poly = new KisPolygon(); - Q_INT32 pixelSize = src->pixelSize(); - const Q_UINT8 *srcPixel /*= new Q_UINT8[ pixelSize ]*/; - Q_UINT8 *dstPixel = 0; + TQ_INT32 pixelSize = src->pixelSize(); + const TQ_UINT8 *srcPixel /*= new TQ_UINT8[ pixelSize ]*/; + TQ_UINT8 *dstPixel = 0; while (count < numTiles) { i = randomIndices[count] / (cols + 1); @@ -417,8 +417,8 @@ void KisCubismFilter::cubism(KisPaintDeviceSP src, KisPaintDeviceSP dst, const Q poly->rotate( theta ); poly->translate ( x, y ); // bounds check on x, y - ix = (Q_INT32) CLAMP (x, rect.x(), rect.x() + rect.width() - 1); - iy = (Q_INT32) CLAMP (y, rect.y(), rect.y() + rect.height() - 1); + ix = (TQ_INT32) CLAMP (x, rect.x(), rect.x() + rect.width() - 1); + iy = (TQ_INT32) CLAMP (y, rect.y(), rect.y() + rect.height() - 1); //read the pixel at ix, iy KisRectIteratorPixel srcIt = src->createRectIterator(ix,iy,1,1, false); @@ -433,15 +433,15 @@ void KisCubismFilter::cubism(KisPaintDeviceSP src, KisPaintDeviceSP dst, const Q setProgressDone(); } -KisFilterConfigWidget * KisCubismFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisCubismFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 2, 40, 10, i18n("Tile size"), "tileSize" ) ); param.push_back( KisIntegerWidgetParam( 2, 40, 10, i18n("Tile saturation"), "tileSaturation" ) ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisCubismFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisCubismFilter::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/cubismfilter/kis_cubism_filter.h b/krita/plugins/filters/cubismfilter/kis_cubism_filter.h index bd611d38..f2624030 100644 --- a/krita/plugins/filters/cubismfilter/kis_cubism_filter.h +++ b/krita/plugins/filters/cubismfilter/kis_cubism_filter.h @@ -30,7 +30,7 @@ class KisPolygon; class KisCubismFilterConfiguration : public KisFilterConfiguration { public: - KisCubismFilterConfiguration(Q_UINT32 tileSize, Q_UINT32 tileSaturation) + KisCubismFilterConfiguration(TQ_UINT32 tileSize, TQ_UINT32 tileSaturation) : KisFilterConfiguration( "cubism", 1 ) , m_tileSize(tileSize) , m_tileSaturation(tileSaturation) @@ -39,11 +39,11 @@ public: setProperty("tileSaturation", tileSaturation); }; public: - inline Q_UINT32 tileSize() { return getInt("tileSize"); }; - inline Q_UINT32 tileSaturation() {return getInt("tileSaturation"); }; + inline TQ_UINT32 tileSize() { return getInt("tileSize"); }; + inline TQ_UINT32 tileSaturation() {return getInt("tileSaturation"); }; private: - Q_UINT32 m_tileSize; - Q_UINT32 m_tileSaturation; + TQ_UINT32 m_tileSize; + TQ_UINT32 m_tileSaturation; }; class KisCubismFilter : public KisFilter @@ -51,7 +51,7 @@ class KisCubismFilter : public KisFilter public: KisCubismFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("cubism", i18n("Cubism")); }; virtual bool supportsPainting() { return false; } virtual bool supportsPreview() { return true; } @@ -60,18 +60,18 @@ public: virtual bool workWith(KisColorSpace* cs); virtual ColorSpaceIndependence colorSpaceIndependence() { return TO_RGBA8; }; public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); virtual KisFilterConfiguration* configuration() { return new KisCubismFilterConfiguration( 10, 10); }; private: //this function takes an array of ordered indices i1,i2,i3,... and randomizes them i3,i1,i2,... - void randomizeIndices (Q_INT32 count, Q_INT32* indices); - Q_INT32 randomIntNumber(Q_INT32 lowestNumber, Q_INT32 highestNumber); + void randomizeIndices (TQ_INT32 count, TQ_INT32* indices); + TQ_INT32 randomIntNumber(TQ_INT32 lowestNumber, TQ_INT32 highestNumber); double randomDoubleNumber(double lowestNumber, double highestNumber); double calcAlphaBlend(double *vec, double oneOverDist, double x, double y); - void convertSegment(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2, Q_INT32 offset, Q_INT32* min, Q_INT32* max, Q_INT32 xmin, Q_INT32 xmax); - void fillPolyColor(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisPolygon* poly, const Q_UINT8* col, Q_UINT8* dest, QRect rect); - void cubism(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, Q_UINT32 tileSize, Q_UINT32 tileSaturation); + void convertSegment(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2, TQ_INT32 offset, TQ_INT32* min, TQ_INT32* max, TQ_INT32 xmin, TQ_INT32 xmax); + void fillPolyColor(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisPolygon* poly, const TQ_UINT8* col, TQ_UINT8* dest, TQRect rect); + void cubism(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, TQ_UINT32 tileSize, TQ_UINT32 tileSaturation); }; diff --git a/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.cc b/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.cc index d4cb2a23..d2742ec8 100644 --- a/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.cc +++ b/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.cc @@ -25,13 +25,13 @@ typedef KGenericFactory KisCubismFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritacubismfilter, KisCubismFilterPluginFactory( "krita" ) ) -KisCubismFilterPlugin::KisCubismFilterPlugin(QObject *parent, const char *name, const QStringList &) : KParts::Plugin(parent, name) +KisCubismFilterPlugin::KisCubismFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) : KParts::Plugin(tqparent, name) { setInstance(KisCubismFilterPluginFactory::instance()); - if ( parent->inherits("KisFilterRegistry") ) + if ( tqparent->inherits("KisFilterRegistry") ) { - KisFilterRegistry * r = dynamic_cast(parent); + KisFilterRegistry * r = dynamic_cast(tqparent); r->add(new KisCubismFilter()); } } diff --git a/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.h b/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.h index 09217b1c..7c7d1a9c 100644 --- a/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.h +++ b/krita/plugins/filters/cubismfilter/kis_cubism_filter_plugin.h @@ -25,7 +25,7 @@ class KisCubismFilterPlugin : public KParts::Plugin { public: - KisCubismFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisCubismFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisCubismFilterPlugin(); }; diff --git a/krita/plugins/filters/cubismfilter/kis_polygon.cc b/krita/plugins/filters/cubismfilter/kis_polygon.cc index de5547af..309bd656 100644 --- a/krita/plugins/filters/cubismfilter/kis_polygon.cc +++ b/krita/plugins/filters/cubismfilter/kis_polygon.cc @@ -22,7 +22,7 @@ */ #include -#include +#include #include @@ -62,7 +62,7 @@ void KisPolygon::translate(double tx, double ty) } } -Q_INT32 KisPolygon::extents (double& x1, double& y1, double& x2, double& y2) +TQ_INT32 KisPolygon::extents (double& x1, double& y1, double& x2, double& y2) { if ( empty() ) { @@ -95,7 +95,7 @@ Q_INT32 KisPolygon::extents (double& x1, double& y1, double& x2, double& y2) return 1; } -Q_INT32 KisPolygon::numberOfPoints() +TQ_INT32 KisPolygon::numberOfPoints() { return count(); } diff --git a/krita/plugins/filters/cubismfilter/kis_polygon.h b/krita/plugins/filters/cubismfilter/kis_polygon.h index 1e5f8aa2..372ef18b 100644 --- a/krita/plugins/filters/cubismfilter/kis_polygon.h +++ b/krita/plugins/filters/cubismfilter/kis_polygon.h @@ -21,17 +21,17 @@ #ifndef _KIS_POLYGON_H_ #define _KIS_POLYGON_H_ -#include +#include -typedef QValueVector KisPointVector; +typedef TQValueVector KisPointVector; class KisPolygon : public KisPointVector { public: void addPoint(double x, double y); void translate(double tx, double ty); void rotate(double theta); - Q_INT32 extents(double &minX, double &minY, double &maxX, double &maxY); - Q_INT32 numberOfPoints(); + TQ_INT32 extents(double &minX, double &minY, double &maxX, double &maxY); + TQ_INT32 numberOfPoints(); }; #endif diff --git a/krita/plugins/filters/embossfilter/kis_emboss_filter.cc b/krita/plugins/filters/embossfilter/kis_emboss_filter.cc index 3fea6bb6..fa74f416 100644 --- a/krita/plugins/filters/embossfilter/kis_emboss_filter.cc +++ b/krita/plugins/filters/embossfilter/kis_emboss_filter.cc @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -54,15 +54,15 @@ KisEmbossFilter::KisEmbossFilter() : KisFilter(id(), "emboss", i18n("&Emboss wit { } -void KisEmbossFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisEmbossFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { Q_UNUSED(dst); //read the filter configuration values from the KisFilterConfiguration object - Q_UINT32 embossdepth = ((KisEmbossFilterConfiguration*)configuration)->depth(); + TQ_UINT32 embossdepth = ((KisEmbossFilterConfiguration*)configuration)->depth(); - //the actual filter function from digikam. It needs a pointer to a Q_UINT8 array + //the actual filter function from digikam. It needs a pointer to a TQ_UINT8 array //with the actual pixel data. Emboss(src, dst, rect, embossdepth); @@ -82,7 +82,7 @@ void KisEmbossFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFil * increase it. After this, get the gray tone */ -void KisEmbossFilter::Emboss(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, int d) +void KisEmbossFilter::Emboss(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, int d) { float Depth = d / 10.0; int R = 0, G = 0, B = 0; @@ -95,10 +95,10 @@ void KisEmbossFilter::Emboss(KisPaintDeviceSP src, KisPaintDeviceSP dst, const Q KisHLineIteratorPixel it = src->createHLineIterator(rect.x(), rect.y(), rect.width(), false); KisHLineIteratorPixel dstIt = dst->createHLineIterator(rect.x(), rect.y(), rect.width(), true); - QColor color1; - QColor color2; - Q_UINT8 opacity; - Q_UINT8 opacity2; + TQColor color1; + TQColor color2; + TQ_UINT8 opacity; + TQ_UINT8 opacity2; for (int y = 0 ; !cancelRequested() && (y < Height) ; ++y) { @@ -111,17 +111,17 @@ void KisEmbossFilter::Emboss(KisPaintDeviceSP src, KisPaintDeviceSP dst, const Q opacity = 0; opacity2 = 0; - src->colorSpace()->toQColor(it.rawData(), &color1, &opacity); + src->colorSpace()->toTQColor(it.rawData(), &color1, &opacity); src->pixel(rect.x() + x + Lim_Max(x, 1, Width), rect.y() + y + Lim_Max(y, 1, Height), &color2, &opacity2); - R = abs((int)((color1.red() - color2.red()) * Depth + (Q_UINT8_MAX / 2))); - G = abs((int)((color1.green() - color2.green()) * Depth + (Q_UINT8_MAX / 2))); - B = abs((int)((color1.blue() - color2.blue()) * Depth + (Q_UINT8_MAX / 2))); + R = abs((int)((color1.red() - color2.red()) * Depth + (TQ_UINT8_MAX / 2))); + G = abs((int)((color1.green() - color2.green()) * Depth + (TQ_UINT8_MAX / 2))); + B = abs((int)((color1.blue() - color2.blue()) * Depth + (TQ_UINT8_MAX / 2))); - Gray = CLAMP((R + G + B) / 3, 0, Q_UINT8_MAX); + Gray = CLAMP((R + G + B) / 3, 0, TQ_UINT8_MAX); - dst->colorSpace()->fromQColor(QColor(Gray, Gray, Gray), opacity, dstIt.rawData()); + dst->colorSpace()->fromTQColor(TQColor(Gray, Gray, Gray), opacity, dstIt.rawData()); } } @@ -158,16 +158,16 @@ int KisEmbossFilter::Lim_Max (int Now, int Up, int Max) return (Up); } -KisFilterConfigWidget * KisEmbossFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP) +KisFilterConfigWidget * KisEmbossFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 10, 300, 30, i18n("Depth"), "depth" ) ); - KisFilterConfigWidget * w = new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + KisFilterConfigWidget * w = new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); Q_CHECK_PTR(w); return w; } -KisFilterConfiguration* KisEmbossFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisEmbossFilter::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/embossfilter/kis_emboss_filter.h b/krita/plugins/filters/embossfilter/kis_emboss_filter.h index 9ab9ba7c..fe4410ed 100644 --- a/krita/plugins/filters/embossfilter/kis_emboss_filter.h +++ b/krita/plugins/filters/embossfilter/kis_emboss_filter.h @@ -27,13 +27,13 @@ class KisEmbossFilterConfiguration : public KisFilterConfiguration { public: - KisEmbossFilterConfiguration(Q_UINT32 depth) + KisEmbossFilterConfiguration(TQ_UINT32 depth) : KisFilterConfiguration( "emboss", 1 ) { setProperty("depth", depth); }; public: - inline Q_UINT32 depth() { return getInt("depth"); }; + inline TQ_UINT32 depth() { return getInt("depth"); }; }; class KisEmbossFilter : public KisFilter @@ -41,7 +41,7 @@ class KisEmbossFilter : public KisFilter public: KisEmbossFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("emboss", i18n("Emboss")); }; virtual bool supportsPainting() { return false; } virtual bool supportsPreview() { return true; } @@ -50,12 +50,12 @@ public: virtual std::list listOfExamplesConfiguration(KisPaintDeviceSP ) { std::list list; list.insert(list.begin(), new KisEmbossFilterConfiguration(100)); return list; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); virtual KisFilterConfiguration* configuration() {return new KisEmbossFilterConfiguration( 30 );}; private: - void Emboss(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, int d); + void Emboss(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, int d); inline int Lim_Max (int Now, int Up, int Max); }; diff --git a/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.cc b/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.cc index b5b45524..527a1b5c 100644 --- a/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.cc +++ b/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.cc @@ -25,12 +25,12 @@ typedef KGenericFactory KisEmbossFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritaembossfilter, KisEmbossFilterPluginFactory( "krita" ) ) -KisEmbossFilterPlugin::KisEmbossFilterPlugin(QObject *parent, const char *name, const QStringList &) : KParts::Plugin(parent, name) +KisEmbossFilterPlugin::KisEmbossFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) : KParts::Plugin(tqparent, name) { setInstance(KisEmbossFilterPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisEmbossFilter()); } } diff --git a/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.h b/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.h index 6a05d555..39803418 100644 --- a/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.h +++ b/krita/plugins/filters/embossfilter/kis_emboss_filter_plugin.h @@ -24,7 +24,7 @@ class KisEmbossFilterPlugin : public KParts::Plugin { public: - KisEmbossFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisEmbossFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisEmbossFilterPlugin(); }; diff --git a/krita/plugins/filters/example/example.cc b/krita/plugins/filters/example/example.cc index 83a03f86..8a9525e6 100644 --- a/krita/plugins/filters/example/example.cc +++ b/krita/plugins/filters/example/example.cc @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -44,14 +44,14 @@ typedef KGenericFactory KritaExampleFactory; K_EXPORT_COMPONENT_FACTORY( kritaexample, KritaExampleFactory( "krita" ) ) -KritaExample::KritaExample(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaExample::KritaExample(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaExampleFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterInvert()); } } @@ -64,7 +64,7 @@ KisFilterInvert::KisFilterInvert() : KisFilter(id(), "adjust", i18n("&Invert")) { } -void KisFilterInvert::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect) +void KisFilterInvert::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); @@ -76,7 +76,7 @@ void KisFilterInvert::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFil setProgressTotalSteps(rect.width() * rect.height()); KisColorSpace * cs = src->colorSpace(); - Q_INT32 psize = cs->pixelSize(); + TQ_INT32 psize = cs->pixelSize(); while( ! srcIt.isDone() ) { diff --git a/krita/plugins/filters/example/example.h b/krita/plugins/filters/example/example.h index 4e55da93..90e7757e 100644 --- a/krita/plugins/filters/example/example.h +++ b/krita/plugins/filters/example/example.h @@ -27,7 +27,7 @@ class KritaExample : public KParts::Plugin { public: - KritaExample(QObject *parent, const char *name, const QStringList &); + KritaExample(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaExample(); }; @@ -36,7 +36,7 @@ class KisFilterInvert : public KisFilter public: KisFilterInvert(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; static inline KisID id() { return KisID("invert", i18n("Invert")); }; virtual bool supportsPainting() { return true; } diff --git a/krita/plugins/filters/fastcolortransfer/fastcolortransfer.cc b/krita/plugins/filters/fastcolortransfer/fastcolortransfer.cc index ce9a7a90..1b3c811c 100644 --- a/krita/plugins/filters/fastcolortransfer/fastcolortransfer.cc +++ b/krita/plugins/filters/fastcolortransfer/fastcolortransfer.cc @@ -37,19 +37,19 @@ typedef KGenericFactory KritaFastColorTransferFactory; K_EXPORT_COMPONENT_FACTORY( kritafastcolortransfer, KritaFastColorTransferFactory( "krita" ) ) -FastColorTransferPlugin::FastColorTransferPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +FastColorTransferPlugin::FastColorTransferPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaFastColorTransferFactory::instance()); kdDebug(41006) << "Color Transfer Filter plugin. Class: " << className() << ", Parent: " - << parent -> className() + << tqparent -> className() << "\n"; - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterFastColorTransfer()); } } @@ -63,12 +63,12 @@ KisFilterFastColorTransfer::KisFilterFastColorTransfer() : KisFilter(id(), "colo } -KisFilterConfigWidget * KisFilterFastColorTransfer::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP ) +KisFilterConfigWidget * KisFilterFastColorTransfer::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP ) { - return new KisWdgFastColorTransfer(this, parent, "configuration of color to alpha"); + return new KisWdgFastColorTransfer(this, tqparent, "configuration of color to alpha"); } -KisFilterConfiguration* KisFilterFastColorTransfer::configuration(QWidget* w) +KisFilterConfiguration* KisFilterFastColorTransfer::configuration(TQWidget* w) { KisWdgFastColorTransfer * wCTA = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1); @@ -79,11 +79,11 @@ KisFilterConfiguration* KisFilterFastColorTransfer::configuration(QWidget* w) return config; } -void KisFilterFastColorTransfer::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisFilterFastColorTransfer::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { kdDebug() << "Start transfering color" << endl; - QVariant value; - QString fileName; + TQVariant value; + TQString fileName; if (config && config->getProperty("filename", value)) { fileName = value.toString(); @@ -131,10 +131,10 @@ void KisFilterFastColorTransfer::process(KisPaintDeviceSP src, KisPaintDeviceSP KisRectIteratorPixel srcLABIt = srcLAB->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), false ); while(!srcLABIt.isDone()) { - const Q_UINT16* data = reinterpret_cast(srcLABIt.oldRawData()); - Q_UINT32 L = data[0]; - Q_UINT32 A = data[1]; - Q_UINT32 B = data[2]; + const TQ_UINT16* data = reinterpret_cast(srcLABIt.oldRawData()); + TQ_UINT32 L = data[0]; + TQ_UINT32 A = data[1]; + TQ_UINT32 B = data[2]; meanL_src += L; meanA_src += A; meanB_src += B; @@ -160,10 +160,10 @@ void KisFilterFastColorTransfer::process(KisPaintDeviceSP src, KisPaintDeviceSP KisRectIteratorPixel refIt = ref->createRectIterator(0, 0, importedImage->width(), importedImage->height(), false ); while(!refIt.isDone()) { - const Q_UINT16* data = reinterpret_cast(refIt.oldRawData()); - Q_UINT32 L = data[0]; - Q_UINT32 A = data[1]; - Q_UINT32 B = data[2]; + const TQ_UINT16* data = reinterpret_cast(refIt.oldRawData()); + TQ_UINT32 L = data[0]; + TQ_UINT32 A = data[1]; + TQ_UINT32 B = data[2]; meanL_ref += L; meanA_ref += A; meanB_ref += B; @@ -194,10 +194,10 @@ void KisFilterFastColorTransfer::process(KisPaintDeviceSP src, KisPaintDeviceSP KisRectIteratorPixel dstIt = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); while(!dstIt.isDone()) { - Q_UINT16* data = reinterpret_cast(dstIt.rawData()); - data[0] = (Q_UINT16)CLAMP( ( (double)data[0] - meanL_src) * coefL + meanL_ref, 0., 65535.); - data[1] = (Q_UINT16)CLAMP( ( (double)data[1] - meanA_src) * coefA + meanA_ref, 0., 65535.); - data[2] = (Q_UINT16)CLAMP( ( (double)data[2] - meanB_src) * coefB + meanB_ref, 0., 65535.); + TQ_UINT16* data = reinterpret_cast(dstIt.rawData()); + data[0] = (TQ_UINT16)CLAMP( ( (double)data[0] - meanL_src) * coefL + meanL_ref, 0., 65535.); + data[1] = (TQ_UINT16)CLAMP( ( (double)data[1] - meanA_src) * coefA + meanA_ref, 0., 65535.); + data[2] = (TQ_UINT16)CLAMP( ( (double)data[2] - meanB_src) * coefB + meanB_ref, 0., 65535.); ++dstIt; } } diff --git a/krita/plugins/filters/fastcolortransfer/fastcolortransfer.h b/krita/plugins/filters/fastcolortransfer/fastcolortransfer.h index 0a156a4f..9c0c3c87 100644 --- a/krita/plugins/filters/fastcolortransfer/fastcolortransfer.h +++ b/krita/plugins/filters/fastcolortransfer/fastcolortransfer.h @@ -31,7 +31,7 @@ class FastColorTransferPlugin : public KParts::Plugin { public: - FastColorTransferPlugin(QObject *parent, const char *name, const QStringList &); + FastColorTransferPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~FastColorTransferPlugin(); }; @@ -40,7 +40,7 @@ class KisFilterFastColorTransfer : public KisFilter public: KisFilterFastColorTransfer(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; static inline KisID id() { return KisID("colortransfer", i18n("Color Transfer")); }; virtual bool supportsPainting() { return true; } @@ -48,8 +48,8 @@ class KisFilterFastColorTransfer : public KisFilter virtual bool supportsIncrementalPainting() { return false; } virtual bool supportsAdjustmentLayers() { return false; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.cpp b/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.cpp index f6a3e735..c5057286 100644 --- a/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.cpp +++ b/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.cpp @@ -20,18 +20,18 @@ #include "kis_wdg_fastcolortransfer.h" -#include +#include #include #include "wdgfastcolortransfer.h" -KisWdgFastColorTransfer::KisWdgFastColorTransfer(KisFilter* nfilter, QWidget * parent, const char * name) : KisFilterConfigWidget ( parent, name ) +KisWdgFastColorTransfer::KisWdgFastColorTransfer(KisFilter* nfilter, TQWidget * tqparent, const char * name) : KisFilterConfigWidget ( tqparent, name ) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgFastColorTransfer(this); widgetLayout -> addWidget(m_widget,0,0); - connect(m_widget->fileNameURLRequester, SIGNAL(textChanged(const QString&)), this, SIGNAL(sigPleaseUpdatePreview())); + connect(m_widget->fileNameURLRequester, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(sigPleaseUpdatePreview())); } @@ -41,7 +41,7 @@ KisWdgFastColorTransfer::~KisWdgFastColorTransfer() void KisWdgFastColorTransfer::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; if (config->getProperty("filename", value)) { widget()->fileNameURLRequester->setURL( value.toString() ); diff --git a/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.h b/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.h index 1110551a..aa1f60fb 100644 --- a/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.h +++ b/krita/plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.h @@ -36,7 +36,7 @@ class WdgFastColorTransfer; class KisWdgFastColorTransfer : public KisFilterConfigWidget { public: - KisWdgFastColorTransfer(KisFilter* nfilter, QWidget * parent, const char * name); + KisWdgFastColorTransfer(KisFilter* nfilter, TQWidget * tqparent, const char * name); ~KisWdgFastColorTransfer(); virtual void setConfiguration(KisFilterConfiguration*); inline WdgFastColorTransfer* widget() { return m_widget; } diff --git a/krita/plugins/filters/fastcolortransfer/wdgfastcolortransfer.ui b/krita/plugins/filters/fastcolortransfer/wdgfastcolortransfer.ui index fe67e79e..a7184b4b 100644 --- a/krita/plugins/filters/fastcolortransfer/wdgfastcolortransfer.ui +++ b/krita/plugins/filters/fastcolortransfer/wdgfastcolortransfer.ui @@ -1,6 +1,6 @@ WdgFastColorTransfer - + WdgFastColorTransfer @@ -19,15 +19,15 @@ 0 - + - layout1 + tqlayout1 unnamed - + label1 @@ -55,7 +55,7 @@ Expanding - + 20 101 @@ -66,7 +66,7 @@ - + kurlrequester.h klineedit.h diff --git a/krita/plugins/filters/halftone/kis_halftone.cpp b/krita/plugins/filters/halftone/kis_halftone.cpp index f67da1b5..0efb5978 100644 --- a/krita/plugins/filters/halftone/kis_halftone.cpp +++ b/krita/plugins/filters/halftone/kis_halftone.cpp @@ -36,21 +36,21 @@ typedef KGenericFactory KritaHalftoneFactory; K_EXPORT_COMPONENT_FACTORY( kritahalftone, KritaHalftoneFactory( "krita" ) ) - KritaHalftone::KritaHalftone(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) + KritaHalftone::KritaHalftone(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaHalftoneFactory::instance()); kdDebug(41006) << "Halftone filter plugin. Class: " << className() << ", Parent: " - << parent->className() + << tqparent->className() << "\n"; - if ( parent->inherits("KisFilterRegistry") ) + if ( tqparent->inherits("KisFilterRegistry") ) { - KisFilterRegistry * r = dynamic_cast(parent); + KisFilterRegistry * r = dynamic_cast(tqparent); r->add(new KisHalftoneReduction()); } } @@ -71,15 +71,15 @@ KisHalftoneReduction::~KisHalftoneReduction() { } -KisFilterConfigWidget * KisHalftoneReduction::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP ) +KisFilterConfigWidget * KisHalftoneReduction::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP ) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 0, 100, BEST_WAVELET_FREQUENCY_VALUE, i18n("Frequency"), "frequency" ) ); param.push_back( KisIntegerWidgetParam( 0, 100, 2, i18n("Half-size"), "halfsize" ) ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisHalftoneReduction::configuration(QWidget* nwidget ) +KisFilterConfiguration* KisHalftoneReduction::configuration(TQWidget* nwidget ) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) @@ -90,7 +90,7 @@ KisFilterConfiguration* KisHalftoneReduction::configuration(QWidget* nwidget ) } } -void KisHalftoneReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisHalftoneReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { float frequency = 1.0; @@ -105,7 +105,7 @@ void KisHalftoneReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, K } - Q_INT32 depth = src->colorSpace()->nColorChannels(); + TQ_INT32 depth = src->colorSpace()->nColorChannels(); int size; int maxrectsize = (rect.height() < rect.width()) ? rect.width() : rect.height(); @@ -113,7 +113,7 @@ void KisHalftoneReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, K KisMathToolbox* mathToolbox = KisMetaRegistry::instance()->mtRegistry()->get( src->colorSpace()->mathToolboxID() ); setProgressTotalSteps(mathToolbox->fastWaveletTotalSteps(rect) * 2 + size*size*depth ); - connect(mathToolbox, SIGNAL(nextStep()), this, SLOT(incProgress())); + connect(mathToolbox, TQT_SIGNAL(nextStep()), this, TQT_SLOT(incProgress())); kdDebug(41005) << size << " " << maxrectsize << " " << rect.x() << " " << rect.y() << endl; @@ -121,11 +121,11 @@ void KisHalftoneReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, K kdDebug(41005) << halfSize << endl; KisAutobrushShape* kas = new KisAutobrushCircleShape(2*halfSize+1, 2*halfSize+1 , halfSize, halfSize); - QImage mask; - kas->createBrush(&mask); + TQImage tqmask; + kas->createBrush(&tqmask); - KisKernelSP kernel = KisKernel::fromQImage(mask); // TODO: for 1.6 reuse the krita's core function for creating kernel : KisKernel::fromQImage - mask.save("testmask.png", "PNG"); + KisKernelSP kernel = KisKernel::fromTQImage(tqmask); // TODO: for 1.6 reuse the krita's core function for creating kernel : KisKernel::fromTQImage + tqmask.save("testtqmask.png", "PNG"); KisPaintDeviceSP interm = new KisPaintDevice(*src); KisColorSpace * cs = src->colorSpace(); @@ -184,7 +184,7 @@ void KisHalftoneReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, K delete wav; delete blurwav; delete buff; - disconnect(mathToolbox, SIGNAL(nextStep()), this, SLOT(incProgress())); + disconnect(mathToolbox, TQT_SIGNAL(nextStep()), this, TQT_SLOT(incProgress())); setProgressDone(); // Must be called even if you don't really support progression } diff --git a/krita/plugins/filters/halftone/kis_halftone.h b/krita/plugins/filters/halftone/kis_halftone.h index 57c0d874..1125c97b 100644 --- a/krita/plugins/filters/halftone/kis_halftone.h +++ b/krita/plugins/filters/halftone/kis_halftone.h @@ -32,7 +32,7 @@ class KritaHalftone : public KParts::Plugin { public: - KritaHalftone(QObject *parent, const char *name, const QStringList &); + KritaHalftone(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaHalftone(); }; @@ -62,10 +62,10 @@ public: ~KisHalftoneReduction(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); - virtual KisFilterConfiguration * configuration(QWidget* nwidget); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); + virtual KisFilterConfiguration * configuration(TQWidget* nwidget); virtual KisFilterConfiguration * configuration() {return new KisHalftoneReductionConfiguration( BEST_WAVELET_FREQUENCY_VALUE, 2 );}; - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); static inline KisID id() { return KisID("halftone", i18n("Halftone Reducer")); }; virtual bool supportsPainting() { return false; } diff --git a/krita/plugins/filters/imageenhancement/imageenhancement.cpp b/krita/plugins/filters/imageenhancement/imageenhancement.cpp index 12a0f22a..c455d8cd 100644 --- a/krita/plugins/filters/imageenhancement/imageenhancement.cpp +++ b/krita/plugins/filters/imageenhancement/imageenhancement.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -47,21 +47,21 @@ typedef KGenericFactory KritaImageEnhancementFactory; K_EXPORT_COMPONENT_FACTORY( kritaimageenhancement, KritaImageEnhancementFactory( "krita" ) ) - KritaImageEnhancement::KritaImageEnhancement(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) + KritaImageEnhancement::KritaImageEnhancement(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaImageEnhancementFactory::instance()); kdDebug(41006) << "Image enhancement filter plugin. Class: " << className() << ", Parent: " - << parent->className() + << tqparent->className() << "\n"; - if ( parent->inherits("KisFilterRegistry") ) + if ( tqparent->inherits("KisFilterRegistry") ) { - KisFilterRegistry * r = dynamic_cast(parent); + KisFilterRegistry * r = dynamic_cast(tqparent); r->add(new KisSimpleNoiseReducer()); r->add(new KisWaveletNoiseReduction()); } diff --git a/krita/plugins/filters/imageenhancement/imageenhancement.h b/krita/plugins/filters/imageenhancement/imageenhancement.h index 0d06c9b0..8c8f9d91 100644 --- a/krita/plugins/filters/imageenhancement/imageenhancement.h +++ b/krita/plugins/filters/imageenhancement/imageenhancement.h @@ -27,7 +27,7 @@ class KritaImageEnhancement : public KParts::Plugin { public: - KritaImageEnhancement(QObject *parent, const char *name, const QStringList &); + KritaImageEnhancement(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaImageEnhancement(); }; diff --git a/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp b/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp index a4fa8f50..0ff7a958 100644 --- a/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp +++ b/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp @@ -37,15 +37,15 @@ KisSimpleNoiseReducer::~KisSimpleNoiseReducer() { } -KisFilterConfigWidget * KisSimpleNoiseReducer::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP) +KisFilterConfigWidget * KisSimpleNoiseReducer::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 0, 255, 50, i18n("Threshold"), "threshold" ) ); param.push_back( KisIntegerWidgetParam( 0, 10, 1, i18n("Window size"), "windowsize") ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisSimpleNoiseReducer::configuration(QWidget* nwidget) +KisFilterConfiguration* KisSimpleNoiseReducer::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) @@ -62,7 +62,7 @@ inline int ABS(int v) return v; } -void KisSimpleNoiseReducer::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisSimpleNoiseReducer::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { int threshold, windowsize; if(config !=0) @@ -77,13 +77,13 @@ void KisSimpleNoiseReducer::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisColorSpace* cs = src->colorSpace(); - // Compute the blur mask + // Compute the blur tqmask KisAutobrushShape* kas = new KisAutobrushCircleShape(2*windowsize+1, 2*windowsize+1, windowsize, windowsize); - QImage mask; - kas->createBrush(&mask); + TQImage tqmask; + kas->createBrush(&tqmask); - KisKernelSP kernel = KisKernel::fromQImage(mask); + KisKernelSP kernel = KisKernel::fromTQImage(tqmask); KisPaintDeviceSP interm = new KisPaintDevice(*src); KisConvolutionPainter painter( interm ); @@ -108,7 +108,7 @@ void KisSimpleNoiseReducer::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, { if(srcIt.isSelected()) { - Q_UINT8 diff = cs->difference(srcIt.oldRawData(), intermIt.rawData()); + TQ_UINT8 diff = cs->difference(srcIt.oldRawData(), intermIt.rawData()); if( diff > threshold) { cs->bitBlt( dstIt.rawData(), 0, cs, intermIt.rawData(), 0, 0, 0, 255, 1, 1, KisCompositeOp(COMPOSITE_COPY) ); diff --git a/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.h b/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.h index 40523823..a233bb85 100644 --- a/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.h +++ b/krita/plugins/filters/imageenhancement/kis_simple_noise_reducer.h @@ -44,10 +44,10 @@ class KisSimpleNoiseReducer : public KisFilter KisSimpleNoiseReducer(); ~KisSimpleNoiseReducer(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); - virtual KisFilterConfiguration * configuration(QWidget* nwidget); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); + virtual KisFilterConfiguration * configuration(TQWidget* nwidget); virtual KisFilterConfiguration * configuration() { return new KisSimpleNoiseReducerConfiguration( 50, 1); }; - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); static inline KisID id() { return KisID("gaussiannoisereducer", i18n("Gaussian Noise Reducer")); }; virtual bool supportsPainting() { return false; } diff --git a/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp b/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp index 8792928b..021bf5c6 100644 --- a/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp +++ b/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp @@ -38,14 +38,14 @@ KisWaveletNoiseReduction::~KisWaveletNoiseReduction() { } -KisFilterConfigWidget * KisWaveletNoiseReduction::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP ) +KisFilterConfigWidget * KisWaveletNoiseReduction::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP ) { vKisDoubleWidgetParam param; param.push_back( KisDoubleWidgetParam( 0.0, 256.0, BEST_WAVELET_THRESHOLD_VALUE, i18n("Threshold"), "threshold" ) ); - return new KisMultiDoubleFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiDoubleFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisWaveletNoiseReduction::configuration(QWidget* nwidget ) +KisFilterConfiguration* KisWaveletNoiseReduction::configuration(TQWidget* nwidget ) { KisMultiDoubleFilterWidget* widget = (KisMultiDoubleFilterWidget*) nwidget; if( widget == 0 ) @@ -56,7 +56,7 @@ KisFilterConfiguration* KisWaveletNoiseReduction::configuration(QWidget* nwidget } } -void KisWaveletNoiseReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisWaveletNoiseReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { float threshold = 1.0; @@ -69,7 +69,7 @@ void KisWaveletNoiseReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP ds } - Q_INT32 depth = src->colorSpace()->nColorChannels(); + TQ_INT32 depth = src->colorSpace()->nColorChannels(); int size; int maxrectsize = (rect.height() < rect.width()) ? rect.width() : rect.height(); @@ -77,7 +77,7 @@ void KisWaveletNoiseReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP ds KisMathToolbox* mathToolbox = KisMetaRegistry::instance()->mtRegistry()->get( src->colorSpace()->mathToolboxID() ); setProgressTotalSteps(mathToolbox->fastWaveletTotalSteps(rect) * 2 + size*size*depth ); - connect(mathToolbox, SIGNAL(nextStep()), this, SLOT(incProgress())); + connect(mathToolbox, TQT_SIGNAL(nextStep()), this, TQT_SLOT(incProgress())); kdDebug(41005) << size << " " << maxrectsize << " " << rect.x() << " " << rect.y() << endl; @@ -124,7 +124,7 @@ void KisWaveletNoiseReduction::process(KisPaintDeviceSP src, KisPaintDeviceSP ds delete wav; delete buff; - disconnect(mathToolbox, SIGNAL(nextStep()), this, SLOT(incProgress())); + disconnect(mathToolbox, TQT_SIGNAL(nextStep()), this, TQT_SLOT(incProgress())); setProgressDone(); // Must be called even if you don't really support progression } diff --git a/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h b/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h index 289cb487..85a96ec8 100644 --- a/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h +++ b/krita/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h @@ -51,10 +51,10 @@ public: ~KisWaveletNoiseReduction(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); - virtual KisFilterConfiguration * configuration(QWidget* nwidget); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); + virtual KisFilterConfiguration * configuration(TQWidget* nwidget); virtual KisFilterConfiguration * configuration() {return new KisWaveletNoiseReductionConfiguration( BEST_WAVELET_THRESHOLD_VALUE );}; - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); static inline KisID id() { return KisID("waveletnoisereducer", i18n("Wavelet Noise Reducer")); }; virtual bool supportsPainting() { return false; } diff --git a/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.cpp b/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.cpp index 17178379..fc513f90 100644 --- a/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.cpp +++ b/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.cpp @@ -20,24 +20,24 @@ #include "kis_wdg_lens_correction.h" -#include +#include #include #include "wdglenscorrectionoptions.h" -KisWdgLensCorrection::KisWdgLensCorrection(KisFilter* /*nfilter*/, QWidget* parent, const char* name) - : KisFilterConfigWidget(parent,name) +KisWdgLensCorrection::KisWdgLensCorrection(KisFilter* /*nfilter*/, TQWidget* tqparent, const char* name) + : KisFilterConfigWidget(tqparent,name) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgLensCorrectionOptions(this); widgetLayout -> addWidget(m_widget, 0, 0); - connect( widget()->intXCenter, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intYCenter, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->dblCorrectionNearCenter, SIGNAL( valueChanged(double)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->dblCorrectionNearEdges, SIGNAL( valueChanged(double)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->dblBrightness, SIGNAL( valueChanged(double)), SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intXCenter, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intYCenter, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->dblCorrectionNearCenter, TQT_SIGNAL( valueChanged(double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->dblCorrectionNearEdges, TQT_SIGNAL( valueChanged(double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->dblBrightness, TQT_SIGNAL( valueChanged(double)), TQT_SIGNAL(sigPleaseUpdatePreview())); } KisWdgLensCorrection::~KisWdgLensCorrection() @@ -46,7 +46,7 @@ KisWdgLensCorrection::~KisWdgLensCorrection() void KisWdgLensCorrection::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; if (config->getProperty("xcenter", value)) { widget()->intXCenter->setValue( value.toUInt() ); diff --git a/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.h b/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.h index 9bb8aef5..b426c6c5 100644 --- a/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.h +++ b/krita/plugins/filters/lenscorrectionfilter/kis_wdg_lens_correction.h @@ -29,8 +29,9 @@ class KisFilter; class KisWdgLensCorrection : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgLensCorrection(KisFilter* nfilter, QWidget* parent = 0, const char* name = 0); + KisWdgLensCorrection(KisFilter* nfilter, TQWidget* tqparent = 0, const char* name = 0); ~KisWdgLensCorrection(); public: inline WdgLensCorrectionOptions* widget() { return m_widget; }; diff --git a/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.cc b/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.cc index 3dbd25d8..c013a963 100644 --- a/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.cc +++ b/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.cc @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -52,14 +52,14 @@ typedef KGenericFactory KritaLensCorrectionFilterFactory; K_EXPORT_COMPONENT_FACTORY( kritalenscorrectionfilter, KritaLensCorrectionFilterFactory( "krita" ) ) -KritaLensCorrectionFilter::KritaLensCorrectionFilter(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaLensCorrectionFilter::KritaLensCorrectionFilter(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaLensCorrectionFilterFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterLensCorrection()); } } @@ -72,9 +72,9 @@ KisFilterLensCorrection::KisFilterLensCorrection() : KisFilter(id(), "other", i1 { } -KisFilterConfiguration* KisFilterLensCorrection::configuration(QWidget* w) +KisFilterConfiguration* KisFilterLensCorrection::configuration(TQWidget* w) { - QVariant value; + TQVariant value; KisWdgLensCorrection* wN = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1); if(wN) @@ -88,25 +88,25 @@ KisFilterConfiguration* KisFilterLensCorrection::configuration(QWidget* w) return config; } -KisFilterConfigWidget * KisFilterLensCorrection::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisFilterLensCorrection::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { - return new KisWdgLensCorrection((KisFilter*)this, (QWidget*)parent, i18n("Configuration of lens correction filter").ascii()); + return new KisWdgLensCorrection((KisFilter*)this, (TQWidget*)tqparent, i18n("Configuration of lens correction filter").ascii()); } -void KisFilterLensCorrection::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rawrect) +void KisFilterLensCorrection::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rawrect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); - QRect layerrect = src->exactBounds(); + TQRect layerrect = src->exactBounds(); - QRect workingrect = layerrect.intersect( rawrect ); + TQRect workingrect = layerrect.intersect( rawrect ); setProgressTotalSteps(workingrect.width() * workingrect.height()); KisColorSpace* cs = dst->colorSpace(); - QVariant value; + TQVariant value; double xcenter = (config && config->getProperty("xcenter", value)) ? value.toInt() : 50; double ycenter = (config && config->getProperty("ycenter", value)) ? value.toInt() : 50; double correctionnearcenter = (config && config->getProperty("correctionnearcenter", value)) ? value.toDouble() : 0.; @@ -122,7 +122,7 @@ void KisFilterLensCorrection::process(KisPaintDeviceSP src, KisPaintDeviceSP dst double mult_sq = correctionnearcenter / 200.0; double mult_qd = correctionnearedges / 200.0; - Q_UINT16 lab[4]; + TQ_UINT16 lab[4]; while(!dstIt.isDone()) { @@ -141,9 +141,9 @@ void KisFilterLensCorrection::process(KisPaintDeviceSP src, KisPaintDeviceSP dst srcRSA.moveTo( KisPoint( srcX, srcY ) ); srcRSA.sampledOldRawData( dstIt.rawData() ); - cs->toLabA16( dstIt.rawData(), (Q_UINT8*)lab, 1); - lab[0] = CLAMP( lab[0] * static_cast( brighten ), 0, 65535); - cs->fromLabA16( (Q_UINT8*)lab, dstIt.rawData(), 1); + cs->toLabA16( dstIt.rawData(), (TQ_UINT8*)lab, 1); + lab[0] = CLAMP( lab[0] * static_cast( brighten ), 0, 65535); + cs->fromLabA16( (TQ_UINT8*)lab, dstIt.rawData(), 1); ++dstIt; incProgress(); diff --git a/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.h b/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.h index a73ac30b..e8c4cb91 100644 --- a/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.h +++ b/krita/plugins/filters/lenscorrectionfilter/lenscorrectionfilter.h @@ -29,7 +29,7 @@ class KisFilterConfigWidget; class KritaLensCorrectionFilter : public KParts::Plugin { public: - KritaLensCorrectionFilter(QObject *parent, const char *name, const QStringList &); + KritaLensCorrectionFilter(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaLensCorrectionFilter(); }; @@ -38,7 +38,7 @@ class KisFilterLensCorrection : public KisFilter public: KisFilterLensCorrection(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; static inline KisID id() { return KisID("lenscorrection", i18n("Lens Correction")); }; virtual bool supportsPainting() { return true; } @@ -46,8 +46,8 @@ class KisFilterLensCorrection : public KisFilter virtual bool supportsIncrementalPainting() { return false; } virtual bool supportsAdjustmentLayers() { return false; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/lenscorrectionfilter/wdglenscorrectionoptions.ui b/krita/plugins/filters/lenscorrectionfilter/wdglenscorrectionoptions.ui index 4d60a8bd..d5ef416d 100644 --- a/krita/plugins/filters/lenscorrectionfilter/wdglenscorrectionoptions.ui +++ b/krita/plugins/filters/lenscorrectionfilter/wdglenscorrectionoptions.ui @@ -1,6 +1,6 @@ WdgLensCorrectionOptions - + WdgLensCorrectionOptions @@ -29,7 +29,7 @@ Expanding - + 20 90 @@ -46,14 +46,14 @@ Expanding - + 16 20 - + groupBox1 @@ -64,7 +64,7 @@ unnamed - + Center_3 @@ -72,7 +72,7 @@ Y: - + Center_2 @@ -118,7 +118,7 @@ Expanding - + 16 20 @@ -135,14 +135,14 @@ Expanding - + 51 20 - + textLabel1 @@ -150,7 +150,7 @@ Near center: - + textLabel2 @@ -158,7 +158,7 @@ Near edges: - + Center @@ -190,7 +190,7 @@ - + textLabel2_2_2 @@ -213,7 +213,7 @@ - + knuminput.h knuminput.h diff --git a/krita/plugins/filters/levelfilter/kgradientslider.cc b/krita/plugins/filters/levelfilter/kgradientslider.cc index 15fd16fc..905583b2 100644 --- a/krita/plugins/filters/levelfilter/kgradientslider.cc +++ b/krita/plugins/filters/levelfilter/kgradientslider.cc @@ -23,38 +23,38 @@ #include #include -// Qt includes. +// TQt includes. -#include -#include -#include -#include +#include +#include +#include +#include // Local includes. #include "kgradientslider.h" -KGradientSlider::KGradientSlider(QWidget *parent, const char *name, WFlags f) - : QWidget(parent, name, f) +KGradientSlider::KGradientSlider(TQWidget *tqparent, const char *name, WFlags f) + : TQWidget(tqparent, name, f) { m_dragging = false; setMouseTracking(true); - setPaletteBackgroundColor(Qt::NoBackground); + setPaletteBackgroundColor(TQt::NoBackground); setMaximumSize(255, 28); m_blackcursor = 0; m_whitecursor = 255; m_gamma = 1.0; m_gammaEnabled = false; - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); } KGradientSlider::~KGradientSlider() { } -void KGradientSlider::paintEvent(QPaintEvent *) +void KGradientSlider::paintEvent(TQPaintEvent *) { int x, y; int wWidth = width(); @@ -62,71 +62,71 @@ void KGradientSlider::paintEvent(QPaintEvent *) int gradientHeight = (wHeight / 3); - // A QPixmap is used for enable the double buffering. + // A TQPixmap is used for enable the double buffering. /*if (!m_dragging) {*/ - QPixmap pm(size()); - QPainter p1; + TQPixmap pm(size()); + TQPainter p1; p1.begin(&pm, this); pm.fill(); // Draw first gradient y = 0; - p1.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQColor(0,0,0),1, TQt::SolidLine)); for( x=0; x<255; ++x ) { int gray = (255 * x) / wWidth; - p1.setPen(QColor(gray, gray, gray)); + p1.setPen(TQColor(gray, gray, gray)); p1.drawLine(x, y, x, y + gradientHeight - 1); } // Draw second gradient y = (wHeight / 3); if (m_blackcursor > 0) { - p1.fillRect(0, y, (int)m_blackcursor, gradientHeight, QBrush(Qt::black)); + p1.fillRect(0, y, (int)m_blackcursor, gradientHeight, TQBrush(TQt::black)); } if (m_whitecursor < 255) { - p1.fillRect((int)m_whitecursor, y, 255, gradientHeight, QBrush(Qt::white)); + p1.fillRect((int)m_whitecursor, y, 255, gradientHeight, TQBrush(TQt::white)); } for(x = (int)m_blackcursor; x < (int)m_whitecursor; ++x ) { double inten = (double)(x - m_blackcursor) / (double)(m_whitecursor - m_blackcursor); inten = pow (inten, (1.0 / m_gamma)); int gray = (int)(255 * inten); - p1.setPen(QColor(gray, gray, gray)); + p1.setPen(TQColor(gray, gray, gray)); p1.drawLine(x, y, x, y + gradientHeight - 1); } // Draw cursors y = (2 * wHeight / 3); - QPointArray *a = new QPointArray(3); - p1.setPen(Qt::black); + TQPointArray *a = new TQPointArray(3); + p1.setPen(TQt::black); a->setPoint(0, m_blackcursor, y); a->setPoint(1, m_blackcursor + 3, wHeight - 1); a->setPoint(2, m_blackcursor - 3, wHeight - 1); - p1.setBrush(Qt::black); + p1.setBrush(TQt::black); p1.drawPolygon(*a); if (m_gammaEnabled) { a->setPoint(0, m_gammacursor, y); a->setPoint(1, m_gammacursor + 3, wHeight - 1); a->setPoint(2, m_gammacursor - 3, wHeight - 1); - p1.setBrush(Qt::gray); + p1.setBrush(TQt::gray); p1.drawPolygon(*a); } a->setPoint(0, m_whitecursor, y); a->setPoint(1, m_whitecursor + 3, wHeight - 1); a->setPoint(2, m_whitecursor - 3, wHeight - 1); - p1.setBrush(Qt::white); + p1.setBrush(TQt::white); p1.drawPolygon(*a); p1.end(); bitBlt(this, 0, 0, &pm); } -void KGradientSlider::mousePressEvent ( QMouseEvent * e ) +void KGradientSlider::mousePressEvent ( TQMouseEvent * e ) { eCursor closest_cursor; int distance; @@ -176,7 +176,7 @@ void KGradientSlider::mousePressEvent ( QMouseEvent * e ) double delta = (double) (m_whitecursor - m_blackcursor) / 2.0; double mid = (double)m_blackcursor + delta; double tmp = log10 (1.0 / m_gamma); - m_gammacursor = (unsigned int)qRound(mid + delta * tmp); + m_gammacursor = (unsigned int)tqRound(mid + delta * tmp); } break; case WhiteCursor: @@ -188,7 +188,7 @@ void KGradientSlider::mousePressEvent ( QMouseEvent * e ) double delta = (double) (m_whitecursor - m_blackcursor) / 2.0; double mid = (double)m_blackcursor + delta; double tmp = log10 (1.0 / m_gamma); - m_gammacursor = (unsigned int)qRound(mid + delta * tmp); + m_gammacursor = (unsigned int)tqRound(mid + delta * tmp); } break; case GammaCursor: @@ -203,16 +203,16 @@ void KGradientSlider::mousePressEvent ( QMouseEvent * e ) m_gamma = 1.0 / pow (10, tmp); break; } - repaint(false); + tqrepaint(false); } -void KGradientSlider::mouseReleaseEvent ( QMouseEvent * e ) +void KGradientSlider::mouseReleaseEvent ( TQMouseEvent * e ) { if (e->button() != Qt::LeftButton) return; m_dragging = false; - repaint(false); + tqrepaint(false); switch (m_grab_cursor) { case BlackCursor: @@ -227,7 +227,7 @@ void KGradientSlider::mouseReleaseEvent ( QMouseEvent * e ) } } -void KGradientSlider::mouseMoveEvent ( QMouseEvent * e ) +void KGradientSlider::mouseMoveEvent ( TQMouseEvent * e ) { unsigned int x = abs(e->pos().x()); @@ -254,7 +254,7 @@ void KGradientSlider::mouseMoveEvent ( QMouseEvent * e ) double delta = (double) (m_whitecursor - m_blackcursor) / 2.0; double mid = (double)m_blackcursor + delta; double tmp = log10 (1.0 / m_gamma); - m_gammacursor = (unsigned int)qRound(mid + delta * tmp); + m_gammacursor = (unsigned int)tqRound(mid + delta * tmp); } } break; @@ -266,7 +266,7 @@ void KGradientSlider::mouseMoveEvent ( QMouseEvent * e ) double delta = (double) (m_whitecursor - m_blackcursor) / 2.0; double mid = (double)m_blackcursor + delta; double tmp = log10 (1.0 / m_gamma); - m_gammacursor = (unsigned int)qRound(mid + delta * tmp); + m_gammacursor = (unsigned int)tqRound(mid + delta * tmp); } } break; @@ -283,10 +283,10 @@ void KGradientSlider::mouseMoveEvent ( QMouseEvent * e ) } } - repaint(false); + tqrepaint(false); } -void KGradientSlider::leaveEvent( QEvent * ) +void KGradientSlider::leaveEvent( TQEvent * ) { } @@ -294,7 +294,7 @@ void KGradientSlider::leaveEvent( QEvent * ) void KGradientSlider::enableGamma(bool b) { m_gammaEnabled = b; - repaint(false); + tqrepaint(false); } double KGradientSlider::getGamma(void) @@ -309,9 +309,9 @@ void KGradientSlider::modifyBlack(int v) { double delta = (double) (m_whitecursor - m_blackcursor) / 2.0; double mid = (double)m_blackcursor + delta; double tmp = log10 (1.0 / m_gamma); - m_gammacursor = (unsigned int)qRound(mid + delta * tmp); + m_gammacursor = (unsigned int)tqRound(mid + delta * tmp); } - repaint(false); + tqrepaint(false); } } void KGradientSlider::modifyWhite(int v) { @@ -321,9 +321,9 @@ void KGradientSlider::modifyWhite(int v) { double delta = (double) (m_whitecursor - m_blackcursor) / 2.0; double mid = (double)m_blackcursor + delta; double tmp = log10 (1.0 / m_gamma); - m_gammacursor = (unsigned int)qRound(mid + delta * tmp); + m_gammacursor = (unsigned int)tqRound(mid + delta * tmp); } - repaint(false); + tqrepaint(false); } } void KGradientSlider::modifyGamma(double v) { @@ -331,8 +331,8 @@ void KGradientSlider::modifyGamma(double v) { double delta = (double) (m_whitecursor - m_blackcursor) / 2.0; double mid = (double)m_blackcursor + delta; double tmp = log10 (1.0 / m_gamma); - m_gammacursor = (unsigned int)qRound(mid + delta * tmp); - repaint(false); + m_gammacursor = (unsigned int)tqRound(mid + delta * tmp); + tqrepaint(false); } #include "kgradientslider.moc" diff --git a/krita/plugins/filters/levelfilter/kgradientslider.h b/krita/plugins/filters/levelfilter/kgradientslider.h index 1640d018..7acb74b8 100644 --- a/krita/plugins/filters/levelfilter/kgradientslider.h +++ b/krita/plugins/filters/levelfilter/kgradientslider.h @@ -21,16 +21,17 @@ #ifndef KGRADIENTSLIDER_H #define KGRADIENTSLIDER_H -// Qt includes. +// TQt includes. -#include -#include -#include -#include +#include +#include +#include +#include -class KGradientSlider : public QWidget +class KGradientSlider : public TQWidget { Q_OBJECT + TQ_OBJECT typedef enum { BlackCursor, @@ -39,7 +40,7 @@ Q_OBJECT } eCursor; public: - KGradientSlider(QWidget *parent = 0, const char *name = 0, WFlags f = 0); + KGradientSlider(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); virtual ~KGradientSlider(); @@ -55,11 +56,11 @@ signals: void modifiedGamma(double); protected: - void paintEvent(QPaintEvent *); - void mousePressEvent (QMouseEvent * e); - void mouseReleaseEvent ( QMouseEvent * e ); - void mouseMoveEvent ( QMouseEvent * e ); - void leaveEvent ( QEvent * ); + void paintEvent(TQPaintEvent *); + void mousePressEvent (TQMouseEvent * e); + void mouseReleaseEvent ( TQMouseEvent * e ); + void mouseMoveEvent ( TQMouseEvent * e ); + void leaveEvent ( TQEvent * ); public: void enableGamma(bool b); diff --git a/krita/plugins/filters/levelfilter/kis_level_filter.cc b/krita/plugins/filters/levelfilter/kis_level_filter.cc index 95f1ad9e..cf89e9c6 100644 --- a/krita/plugins/filters/levelfilter/kis_level_filter.cc +++ b/krita/plugins/filters/levelfilter/kis_level_filter.cc @@ -22,11 +22,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kis_filter_config_widget.h" #include "kis_level_filter.h" @@ -58,7 +58,7 @@ KisLevelFilterConfiguration::~KisLevelFilterConfiguration() delete m_adjustment; } -void KisLevelFilterConfiguration::fromXML( const QString& s ) +void KisLevelFilterConfiguration::fromXML( const TQString& s ) { KisFilterConfiguration::fromXML(s); blackvalue = getInt( "blackvalue" ); @@ -68,7 +68,7 @@ void KisLevelFilterConfiguration::fromXML( const QString& s ) outwhitevalue = getInt( "outwhitevalue" ); } -QString KisLevelFilterConfiguration::toString() +TQString KisLevelFilterConfiguration::toString() { m_properties.clear(); setProperty("blackvalue", blackvalue); @@ -86,12 +86,12 @@ KisLevelFilter::KisLevelFilter() } -KisFilterConfigWidget * KisLevelFilter::createConfigurationWidget(QWidget *parent, KisPaintDeviceSP dev) +KisFilterConfigWidget * KisLevelFilter::createConfigurationWidget(TQWidget *tqparent, KisPaintDeviceSP dev) { - return new KisLevelConfigWidget(parent, dev); + return new KisLevelConfigWidget(tqparent, dev); } -KisFilterConfiguration* KisLevelFilter::configuration(QWidget *nwidget) +KisFilterConfiguration* KisLevelFilter::configuration(TQWidget *nwidget) { KisLevelConfigWidget* widget = (KisLevelConfigWidget*)nwidget; @@ -117,7 +117,7 @@ bool KisLevelFilter::workWith(KisColorSpace* cs) } -void KisLevelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisLevelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { if (!config) { @@ -135,7 +135,7 @@ void KisLevelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilt } if (configBC->m_adjustment == 0) { - Q_UINT16 transfer[256]; + TQ_UINT16 transfer[256]; for (int i = 0; i < 256; i++) { if (i <= configBC->blackvalue) transfer[i] = configBC->outblackvalue; @@ -154,12 +154,12 @@ void KisLevelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilt KisRectIteratorPixel iter = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); setProgressTotalSteps(rect.width() * rect.height()); - Q_INT32 pixelsProcessed = 0; + TQ_INT32 pixelsProcessed = 0; while( ! iter.isDone() && !cancelRequested()) { - Q_UINT32 npix=0, maxpix = iter.nConseqPixels(); - Q_UINT8 selectedness = iter.selectedness(); + TQ_UINT32 npix=0, maxpix = iter.nConseqPixels(); + TQ_UINT8 selectedness = iter.selectedness(); // The idea here is to handle stretches of completely selected and completely unselected pixels. // Partially selected pixels are handled one pixel at a time. switch(selectedness) @@ -176,7 +176,7 @@ void KisLevelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilt case MAX_SELECTED: { - Q_UINT8 *firstPixel = iter.rawData(); + TQ_UINT8 *firstPixel = iter.rawData(); while(iter.selectedness()==MAX_SELECTED && maxpix) { --maxpix; @@ -194,8 +194,8 @@ void KisLevelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilt default: // adjust, but since it's partially selected we also only partially adjust src->colorSpace()->applyAdjustment(iter.oldRawData(), iter.rawData(), configBC->m_adjustment, 1); - const Q_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; - Q_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; + const TQ_UINT8 *pixels[2] = {iter.oldRawData(), iter.rawData()}; + TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; src->colorSpace()->mixColors(pixels, weights, 2, iter.rawData()); ++iter; pixelsProcessed++; @@ -207,8 +207,8 @@ void KisLevelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilt setProgressDone(); } -KisLevelConfigWidget::KisLevelConfigWidget(QWidget * parent, KisPaintDeviceSP dev, const char * name, WFlags f) - : KisFilterConfigWidget(parent, name, f) +KisLevelConfigWidget::KisLevelConfigWidget(TQWidget * tqparent, KisPaintDeviceSP dev, const char * name, WFlags f) + : KisFilterConfigWidget(tqparent, name, f) { m_page = new WdgLevel(this); histogram = NULL; @@ -221,33 +221,33 @@ KisLevelConfigWidget::KisLevelConfigWidget(QWidget * parent, KisPaintDeviceSP de m_page->outblackspin->setValue(0); m_page->outwhitespin->setValue(255); - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); Q_CHECK_PTR(l); - l->addWidget(m_page, 0, Qt::AlignTop); + l->addWidget(m_page, 0, TQt::AlignTop); - connect( m_page->blackspin, SIGNAL(valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->whitespin, SIGNAL(valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->ingradient, SIGNAL(modifiedGamma(double)), SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->blackspin, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->whitespin, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->ingradient, TQT_SIGNAL(modifiedGamma(double)), TQT_SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->blackspin, SIGNAL(valueChanged(int)), m_page->ingradient, SLOT(modifyBlack(int))); - connect( m_page->whitespin, SIGNAL(valueChanged(int)), m_page->ingradient, SLOT(modifyWhite(int))); - //connect( m_page->whitespin, SIGNAL(valueChanged(int)), m_page->ingradient, SLOT(modifyGamma())); + connect( m_page->blackspin, TQT_SIGNAL(valueChanged(int)), m_page->ingradient, TQT_SLOT(modifyBlack(int))); + connect( m_page->whitespin, TQT_SIGNAL(valueChanged(int)), m_page->ingradient, TQT_SLOT(modifyWhite(int))); + //connect( m_page->whitespin, TQT_SIGNAL(valueChanged(int)), m_page->ingradient, TQT_SLOT(modifyGamma())); - connect( m_page->ingradient, SIGNAL(modifiedBlack(int)), m_page->blackspin, SLOT(setValue(int))); - connect( m_page->ingradient, SIGNAL(modifiedWhite(int)), m_page->whitespin, SLOT(setValue(int))); - connect( m_page->ingradient, SIGNAL(modifiedGamma(double)), m_page->gammaspin, SLOT(setNum(double))); + connect( m_page->ingradient, TQT_SIGNAL(modifiedBlack(int)), m_page->blackspin, TQT_SLOT(setValue(int))); + connect( m_page->ingradient, TQT_SIGNAL(modifiedWhite(int)), m_page->whitespin, TQT_SLOT(setValue(int))); + connect( m_page->ingradient, TQT_SIGNAL(modifiedGamma(double)), m_page->gammaspin, TQT_SLOT(setNum(double))); - connect( m_page->outblackspin, SIGNAL(valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->outwhitespin, SIGNAL(valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->outblackspin, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( m_page->outwhitespin, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); - connect( m_page->outblackspin, SIGNAL(valueChanged(int)), m_page->outgradient, SLOT(modifyBlack(int))); - connect( m_page->outwhitespin, SIGNAL(valueChanged(int)), m_page->outgradient, SLOT(modifyWhite(int))); + connect( m_page->outblackspin, TQT_SIGNAL(valueChanged(int)), m_page->outgradient, TQT_SLOT(modifyBlack(int))); + connect( m_page->outwhitespin, TQT_SIGNAL(valueChanged(int)), m_page->outgradient, TQT_SLOT(modifyWhite(int))); - connect( m_page->outgradient, SIGNAL(modifiedBlack(int)), m_page->outblackspin, SLOT(setValue(int))); - connect( m_page->outgradient, SIGNAL(modifiedWhite(int)), m_page->outwhitespin, SLOT(setValue(int))); + connect( m_page->outgradient, TQT_SIGNAL(modifiedBlack(int)), m_page->outblackspin, TQT_SLOT(setValue(int))); + connect( m_page->outgradient, TQT_SIGNAL(modifiedWhite(int)), m_page->outwhitespin, TQT_SLOT(setValue(int))); - connect( (QObject*)(m_page->chkLogarithmic), SIGNAL(toggled(bool)), this, SLOT(drawHistogram(bool))); + connect( (TQObject*)(m_page->chkLogarithmic), TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(drawHistogram(bool))); KisHistogramProducerSP producer = new KisGenericLabHistogramProducer(); histogram = new KisHistogram(dev, producer, LINEAR); @@ -274,13 +274,13 @@ void KisLevelConfigWidget::drawHistogram(bool logarithmic) m_histlog = logarithmic; } - QPixmap pix(256, height); + TQPixmap pix(256, height); pix.fill(); - QPainter p(&pix); - p.setPen(QPen::QPen(Qt::gray,1, Qt::SolidLine)); + TQPainter p(&pix); + p.setPen(TQPen::TQPen(TQt::gray,1, TQt::SolidLine)); double highest = (double)histogram->calculations().getHighest(); - Q_INT32 bins = histogram->producer()->numberOfBins(); + TQ_INT32 bins = histogram->producer()->numberOfBins(); if (histogram->getHistogramType() == LINEAR) { double factor = (double)height / highest; diff --git a/krita/plugins/filters/levelfilter/kis_level_filter.h b/krita/plugins/filters/levelfilter/kis_level_filter.h index 5759fe75..fc18aeb1 100644 --- a/krita/plugins/filters/levelfilter/kis_level_filter.h +++ b/krita/plugins/filters/levelfilter/kis_level_filter.h @@ -25,7 +25,7 @@ #include "kis_filter_config_widget.h" class WdgLevel; -class QWidget; +class TQWidget; class KisColorAdjustment; class KisHistogram; @@ -35,13 +35,13 @@ public: KisLevelFilterConfiguration(); virtual ~KisLevelFilterConfiguration(); - virtual void fromXML( const QString& ); - virtual QString toString(); + virtual void fromXML( const TQString& ); + virtual TQString toString(); public: - Q_UINT8 blackvalue, whitevalue; + TQ_UINT8 blackvalue, whitevalue; double gammavalue; - Q_UINT16 outblackvalue, outwhitevalue; + TQ_UINT16 outblackvalue, outwhitevalue; KisColorAdjustment * m_adjustment; }; @@ -57,10 +57,10 @@ public: public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration * configuration(QWidget *); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration * configuration(TQWidget *); virtual KisFilterConfiguration * configuration() { return new KisLevelFilterConfiguration(); }; - virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP, KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("levels", i18n("Levels")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -74,8 +74,9 @@ public: class KisLevelConfigWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisLevelConfigWidget(QWidget * parent, KisPaintDeviceSP dev, const char * name = 0, WFlags f = 0 ); + KisLevelConfigWidget(TQWidget * tqparent, KisPaintDeviceSP dev, const char * name = 0, WFlags f = 0 ); virtual ~KisLevelConfigWidget(); KisLevelFilterConfiguration * config(); diff --git a/krita/plugins/filters/levelfilter/levelfilter.cc b/krita/plugins/filters/levelfilter/levelfilter.cc index ac7fd4e6..f9109811 100644 --- a/krita/plugins/filters/levelfilter/levelfilter.cc +++ b/krita/plugins/filters/levelfilter/levelfilter.cc @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -51,13 +51,13 @@ typedef KGenericFactory LevelFilterFactory; K_EXPORT_COMPONENT_FACTORY( kritalevelfilter, LevelFilterFactory( "krita" ) ) -LevelFilter::LevelFilter(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +LevelFilter::LevelFilter(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(LevelFilterFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisLevelFilter()); } } diff --git a/krita/plugins/filters/levelfilter/levelfilter.h b/krita/plugins/filters/levelfilter/levelfilter.h index e382e8a9..75716571 100644 --- a/krita/plugins/filters/levelfilter/levelfilter.h +++ b/krita/plugins/filters/levelfilter/levelfilter.h @@ -28,7 +28,7 @@ class KisColorAdjustment; class LevelFilter : public KParts::Plugin { public: - LevelFilter(QObject *parent, const char *name, const QStringList &); + LevelFilter(TQObject *tqparent, const char *name, const TQStringList &); virtual ~LevelFilter(); }; diff --git a/krita/plugins/filters/levelfilter/wdg_level.ui b/krita/plugins/filters/levelfilter/wdg_level.ui index 8a568aeb..0db94640 100644 --- a/krita/plugins/filters/levelfilter/wdg_level.ui +++ b/krita/plugins/filters/levelfilter/wdg_level.ui @@ -1,6 +1,6 @@ WdgLevel - + WdgLevel @@ -20,13 +20,13 @@ 0 - + 0 0 - + 32767 32767 @@ -42,7 +42,7 @@ 0 - + chkLogarithmic @@ -50,7 +50,7 @@ Logarithmic - + textLabel2 @@ -58,25 +58,25 @@ <b>Input levels</b> - + - layout7 + tqlayout7 unnamed - + histview - + 256 256 - + 256 256 @@ -86,9 +86,9 @@ true - + - layout5 + tqlayout5 @@ -98,22 +98,22 @@ ingradient - + 256 20 - + - layout5 + tqlayout5 unnamed - + blackspin @@ -134,21 +134,21 @@ MinimumExpanding - + 25 20 - + gammaspin 1.0 - + AlignCenter @@ -162,14 +162,14 @@ MinimumExpanding - + 25 20 - + whitespin @@ -184,7 +184,7 @@ - + textLabel3 @@ -192,9 +192,9 @@ <b>Output levels</b> - + - layout6 + tqlayout6 @@ -204,22 +204,22 @@ outgradient - + 256 20 - + - layout2 + tqlayout2 unnamed - + outblackspin @@ -240,14 +240,14 @@ MinimumExpanding - + 50 20 - + outwhitespin @@ -274,7 +274,7 @@ Expanding - + 21 20 @@ -291,7 +291,7 @@ Expanding - + 20 20 @@ -323,7 +323,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082 - + kgradientslider.h kgradientslider.h diff --git a/krita/plugins/filters/noisefilter/kis_wdg_noise.cpp b/krita/plugins/filters/noisefilter/kis_wdg_noise.cpp index ae2da57f..aafd868a 100644 --- a/krita/plugins/filters/noisefilter/kis_wdg_noise.cpp +++ b/krita/plugins/filters/noisefilter/kis_wdg_noise.cpp @@ -20,21 +20,21 @@ #include "kis_wdg_noise.h" -#include +#include #include #include "wdgnoiseoptions.h" -KisWdgNoise::KisWdgNoise(KisFilter* /*nfilter*/, QWidget* parent, const char* name) - : KisFilterConfigWidget(parent,name) +KisWdgNoise::KisWdgNoise(KisFilter* /*nfilter*/, TQWidget* tqparent, const char* name) + : KisFilterConfigWidget(tqparent,name) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgNoiseOptions(this); widgetLayout -> addWidget(m_widget,0,0); - connect( widget()->intLevel, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intOpacity, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intLevel, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intOpacity, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); } KisWdgNoise::~KisWdgNoise() @@ -43,7 +43,7 @@ KisWdgNoise::~KisWdgNoise() void KisWdgNoise::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; if (config->getProperty("level", value)) { widget()->intLevel->setValue( value.toUInt() ); diff --git a/krita/plugins/filters/noisefilter/kis_wdg_noise.h b/krita/plugins/filters/noisefilter/kis_wdg_noise.h index 297e78a7..53c0100d 100644 --- a/krita/plugins/filters/noisefilter/kis_wdg_noise.h +++ b/krita/plugins/filters/noisefilter/kis_wdg_noise.h @@ -29,8 +29,9 @@ class KisFilter; class KisWdgNoise : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgNoise(KisFilter* nfilter, QWidget* parent = 0, const char* name = 0); + KisWdgNoise(KisFilter* nfilter, TQWidget* tqparent = 0, const char* name = 0); ~KisWdgNoise(); public: inline WdgNoiseOptions* widget() { return m_widget; }; diff --git a/krita/plugins/filters/noisefilter/noisefilter.cc b/krita/plugins/filters/noisefilter/noisefilter.cc index 03e73f81..ae5e1e62 100644 --- a/krita/plugins/filters/noisefilter/noisefilter.cc +++ b/krita/plugins/filters/noisefilter/noisefilter.cc @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -48,14 +48,14 @@ typedef KGenericFactory KritaNoiseFilterFactory; K_EXPORT_COMPONENT_FACTORY( kritanoisefilter, KritaNoiseFilterFactory( "krita" ) ) -KritaNoiseFilter::KritaNoiseFilter(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaNoiseFilter::KritaNoiseFilter(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaNoiseFilterFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterNoise()); } } @@ -68,7 +68,7 @@ KisFilterNoise::KisFilterNoise() : KisFilter(id(), "other", i18n("&Random Noise. { } -KisFilterConfiguration* KisFilterNoise::configuration(QWidget* w) +KisFilterConfiguration* KisFilterNoise::configuration(TQWidget* w) { KisWdgNoise* wN = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1); @@ -80,12 +80,12 @@ KisFilterConfiguration* KisFilterNoise::configuration(QWidget* w) return config; } -KisFilterConfigWidget * KisFilterNoise::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev) +KisFilterConfigWidget * KisFilterNoise::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev) { - return new KisWdgNoise((KisFilter*)this, (QWidget*)parent, i18n("Configuration of noise filter").ascii()); + return new KisWdgNoise((KisFilter*)this, (TQWidget*)tqparent, i18n("Configuration of noise filter").ascii()); } -void KisFilterNoise::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisFilterNoise::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); @@ -93,28 +93,28 @@ void KisFilterNoise::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilt setProgressTotalSteps(rect.width() * rect.height()); KisColorSpace * cs = src->colorSpace(); - Q_INT32 psize = cs->pixelSize(); + TQ_INT32 psize = cs->pixelSize(); - QVariant value; + TQVariant value; int level = (config && config->getProperty("level", value)) ? value.toInt() : 50; int opacity = (config && config->getProperty("opacity", value)) ? value.toInt() : 100; KisRectIteratorPixel dstIt = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); KisRectIteratorPixel srcIt = src->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), false); - Q_UINT8* interm = new Q_UINT8[ cs->pixelSize() ]; - Q_UINT32 threshold = (RAND_MAX / 100) * (100 - level); + TQ_UINT8* interm = new TQ_UINT8[ cs->pixelSize() ]; + TQ_UINT32 threshold = (RAND_MAX / 100) * (100 - level); - Q_UINT8 weights[2]; + TQ_UINT8 weights[2]; weights[0] = (255 * opacity) / 100; weights[1] = 255 - weights[0]; - const Q_UINT8* pixels[2]; + const TQ_UINT8* pixels[2]; pixels[0] = interm; while(!srcIt.isDone()) { if(rand() > threshold) { - QColor c = qRgb((double)rand()/RAND_MAX * 255,(double)rand()/RAND_MAX * 255,(double)rand()/RAND_MAX * 255); - cs->fromQColor( c, interm, 0 ); + TQColor c = tqRgb((double)rand()/RAND_MAX * 255,(double)rand()/RAND_MAX * 255,(double)rand()/RAND_MAX * 255); + cs->fromTQColor( c, interm, 0 ); pixels[1] = srcIt.oldRawData(); cs->mixColors( pixels, weights, 2, dstIt.rawData() ); } diff --git a/krita/plugins/filters/noisefilter/noisefilter.h b/krita/plugins/filters/noisefilter/noisefilter.h index 176129c7..4f838b16 100644 --- a/krita/plugins/filters/noisefilter/noisefilter.h +++ b/krita/plugins/filters/noisefilter/noisefilter.h @@ -29,7 +29,7 @@ class KisFilterConfigWidget; class KritaNoiseFilter : public KParts::Plugin { public: - KritaNoiseFilter(QObject *parent, const char *name, const QStringList &); + KritaNoiseFilter(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaNoiseFilter(); }; @@ -38,15 +38,15 @@ class KisFilterNoise : public KisFilter public: KisFilterNoise(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; static inline KisID id() { return KisID("noise", i18n("Noise")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } virtual bool supportsIncrementalPainting() { return false; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/noisefilter/wdgnoiseoptions.ui b/krita/plugins/filters/noisefilter/wdgnoiseoptions.ui index 3a7862ad..969d4153 100644 --- a/krita/plugins/filters/noisefilter/wdgnoiseoptions.ui +++ b/krita/plugins/filters/noisefilter/wdgnoiseoptions.ui @@ -1,6 +1,6 @@ WdgNoiseOptions - + WdgNoiseOptions @@ -19,7 +19,7 @@ 0 - + textLabel2 @@ -27,7 +27,7 @@ Opacity: - + textLabel1 @@ -73,7 +73,7 @@ Expanding - + 21 20 @@ -90,7 +90,7 @@ Expanding - + 20 21 @@ -101,7 +101,7 @@ - + knuminput.h knuminput.h diff --git a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cc b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cc index bafa2644..2e280f52 100644 --- a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cc +++ b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cc @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -54,7 +54,7 @@ KisOilPaintFilter::KisOilPaintFilter() : KisFilter(id(), "artistic", i18n("&Oilp { } -void KisOilPaintFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisOilPaintFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { if (!configuration) { @@ -64,13 +64,13 @@ void KisOilPaintFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF Q_UNUSED(dst); - Q_INT32 x = rect.x(), y = rect.y(); - Q_INT32 width = rect.width(); - Q_INT32 height = rect.height(); + TQ_INT32 x = rect.x(), y = rect.y(); + TQ_INT32 width = rect.width(); + TQ_INT32 height = rect.height(); //read the filter configuration values from the KisFilterConfiguration object - Q_UINT32 brushSize = ((KisOilPaintFilterConfiguration*)configuration)->brushSize(); - Q_UINT32 smooth = ((KisOilPaintFilterConfiguration*)configuration)->smooth(); + TQ_UINT32 brushSize = ((KisOilPaintFilterConfiguration*)configuration)->brushSize(); + TQ_UINT32 smooth = ((KisOilPaintFilterConfiguration*)configuration)->smooth(); OilPaint(src, dst, x, y, width, height, brushSize, smooth); @@ -95,9 +95,9 @@ void KisOilPaintFilter::OilPaint(KisPaintDeviceSP src, KisPaintDeviceSP dst, int setProgressTotalSteps(h); setProgressStage(i18n("Applying oilpaint filter..."),0); - QRect bounds(x, y, w, h); + TQRect bounds(x, y, w, h); - for (Q_INT32 yOffset = 0; yOffset < h; yOffset++) { + for (TQ_INT32 yOffset = 0; yOffset < h; yOffset++) { KisHLineIteratorPixel it = src->createHLineIterator(x, y + yOffset, w, false); KisHLineIteratorPixel dstIt = dst->createHLineIterator(x, y + yOffset, w, true); @@ -107,7 +107,7 @@ void KisOilPaintFilter::OilPaint(KisPaintDeviceSP src, KisPaintDeviceSP dst, int if (it.isSelected()) { uint color = MostFrequentColor(src, bounds, it.x(), it.y(), BrushSize, Smoothness); - dst->colorSpace()->fromQColor(QColor(qRed(color), qGreen(color), qBlue(color)), qAlpha(color), dstIt.rawData()); + dst->colorSpace()->fromTQColor(TQColor(tqRed(color), tqGreen(color), tqBlue(color)), tqAlpha(color), dstIt.rawData()); } ++it; @@ -136,7 +136,7 @@ void KisOilPaintFilter::OilPaint(KisPaintDeviceSP src, KisPaintDeviceSP dst, int * the center of this matrix and find the most frequenty color */ -uint KisOilPaintFilter::MostFrequentColor (KisPaintDeviceSP src, const QRect& bounds, int X, int Y, int Radius, int Intensity) +uint KisOilPaintFilter::MostFrequentColor (KisPaintDeviceSP src, const TQRect& bounds, int X, int Y, int Radius, int Intensity) { uint color; uint I; @@ -159,12 +159,12 @@ uint KisOilPaintFilter::MostFrequentColor (KisPaintDeviceSP src, const QRect& bo while (!it.isDone()) { - if (bounds.contains(it.x(), it.y())) { + if (bounds.tqcontains(it.x(), it.y())) { // XXX: COLORSPACE_INDEPENDENCE - QColor c; - src->colorSpace()->toQColor(it.rawData(), &c); + TQColor c; + src->colorSpace()->toTQColor(it.rawData(), &c); // Swapping red and blue here is done because that gives the same // output as digikam, even though it might be interpreted as a bug @@ -217,7 +217,7 @@ uint KisOilPaintFilter::MostFrequentColor (KisPaintDeviceSP src, const QRect& bo } // Swap red and blue back to get the correct colour. - color = qRgb (B, G, R); + color = tqRgb (B, G, R); delete [] IntensityCount; // free all the arrays delete [] AverageColorR; @@ -228,15 +228,15 @@ uint KisOilPaintFilter::MostFrequentColor (KisPaintDeviceSP src, const QRect& bo } -KisFilterConfigWidget * KisOilPaintFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisOilPaintFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 1, 5, 1, i18n("Brush size"), "brushSize" ) ); param.push_back( KisIntegerWidgetParam( 10, 255, 30, i18n("Smooth"), "smooth" ) ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisOilPaintFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisOilPaintFilter::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h index 5397cb65..fbc07a63 100644 --- a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h +++ b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h @@ -29,7 +29,7 @@ class KisOilPaintFilterConfiguration : public KisFilterConfiguration public: - KisOilPaintFilterConfiguration(Q_UINT32 brushSize, Q_UINT32 smooth) + KisOilPaintFilterConfiguration(TQ_UINT32 brushSize, TQ_UINT32 smooth) : KisFilterConfiguration( "oilpaint", 1 ) { setProperty("brushSize", brushSize); @@ -37,8 +37,8 @@ public: }; public: - inline Q_UINT32 brushSize() { return getInt("brushSize"); }; - inline Q_UINT32 smooth() {return getInt("smooth"); }; + inline TQ_UINT32 brushSize() { return getInt("brushSize"); }; + inline TQ_UINT32 smooth() {return getInt("smooth"); }; }; @@ -48,19 +48,19 @@ class KisOilPaintFilter : public KisFilter public: KisOilPaintFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("oilpaint", i18n("Oilpaint")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } virtual bool supportsAdjustmentLayers() { return false; } virtual std::list listOfExamplesConfiguration(KisPaintDeviceSP dev); public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration * configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration * configuration(TQWidget*); virtual KisFilterConfiguration * configuration() { return new KisOilPaintFilterConfiguration( 1, 30); }; private: void OilPaint(KisPaintDeviceSP src, KisPaintDeviceSP dst, int x, int y, int w, int h, int BrushSize, int Smoothness); - uint MostFrequentColor(KisPaintDeviceSP, const QRect& bounds, int X, int Y, int Radius, int Intensity); + uint MostFrequentColor(KisPaintDeviceSP, const TQRect& bounds, int X, int Y, int Radius, int Intensity); // Function to calcule the color intensity and return the luminance (Y) // component of YIQ color model. inline uint GetIntensity(uint Red, uint Green, uint Blue) { return ((uint)(Red * 0.3 + Green * 0.59 + Blue * 0.11)); } diff --git a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.cc b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.cc index 95defb56..1d572938 100644 --- a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.cc +++ b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.cc @@ -26,12 +26,12 @@ typedef KGenericFactory KisOilPaintFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritaoilpaintfilter, KisOilPaintFilterPluginFactory( "krita" ) ) -KisOilPaintFilterPlugin::KisOilPaintFilterPlugin(QObject *parent, const char *name, const QStringList &) : KParts::Plugin(parent, name) +KisOilPaintFilterPlugin::KisOilPaintFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) : KParts::Plugin(tqparent, name) { setInstance(KisOilPaintFilterPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisOilPaintFilter()); } diff --git a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.h b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.h index e4066a77..847b8e0e 100644 --- a/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.h +++ b/krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter_plugin.h @@ -25,7 +25,7 @@ class KisOilPaintFilterPlugin : public KParts::Plugin { public: - KisOilPaintFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisOilPaintFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisOilPaintFilterPlugin(); }; diff --git a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.cc b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.cc index dadf9590..a87faeac 100644 --- a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.cc +++ b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.cc @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -55,20 +55,20 @@ KisPixelizeFilter::KisPixelizeFilter() : KisFilter(id(), "artistic", i18n("&Pixe { } -void KisPixelizeFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisPixelizeFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { Q_ASSERT( src ); Q_ASSERT( dst ); Q_ASSERT( configuration ); Q_ASSERT( rect.isValid() ); - Q_INT32 x = rect.x(), y = rect.y(); - Q_INT32 width = rect.width(); - Q_INT32 height = rect.height(); + TQ_INT32 x = rect.x(), y = rect.y(); + TQ_INT32 width = rect.width(); + TQ_INT32 height = rect.height(); //read the filter configuration values from the KisFilterConfiguration object - Q_UINT32 pixelWidth = ((KisPixelizeFilterConfiguration*)configuration)->pixelWidth(); - Q_UINT32 pixelHeight = ((KisPixelizeFilterConfiguration*)configuration)->pixelHeight(); + TQ_UINT32 pixelWidth = ((KisPixelizeFilterConfiguration*)configuration)->pixelWidth(); + TQ_UINT32 pixelHeight = ((KisPixelizeFilterConfiguration*)configuration)->pixelHeight(); pixelize(src, dst, x, y, width, height, pixelWidth, pixelHeight); } @@ -81,20 +81,20 @@ void KisPixelizeFilter::pixelize(KisPaintDeviceSP src, KisPaintDeviceSP dst, int if (!src) return; if (!dst) return; - Q_INT32 pixelSize = src->pixelSize(); - QMemArray average( pixelSize ); + TQ_INT32 pixelSize = src->pixelSize(); + TQMemArray average( pixelSize ); - Q_INT32 count; + TQ_INT32 count; //calculate the total number of pixels - Q_INT32 numX=0; - Q_INT32 numY=0; + TQ_INT32 numX=0; + TQ_INT32 numY=0; - for (Q_INT32 x = startx; x < startx + width; x += pixelWidth - (x % pixelWidth)) + for (TQ_INT32 x = startx; x < startx + width; x += pixelWidth - (x % pixelWidth)) { numX++; } - for (Q_INT32 y = starty; y < starty + height; y += pixelHeight - (y % pixelHeight)) + for (TQ_INT32 y = starty; y < starty + height; y += pixelHeight - (y % pixelHeight)) { numY++; } @@ -102,19 +102,19 @@ void KisPixelizeFilter::pixelize(KisPaintDeviceSP src, KisPaintDeviceSP dst, int setProgressTotalSteps( numX * numY ); setProgressStage(i18n("Applying pixelize filter..."),0); - Q_INT32 numberOfPixelsProcessed = 0; + TQ_INT32 numberOfPixelsProcessed = 0; - for (Q_INT32 y = starty; y < starty + height; y += pixelHeight - (y % pixelHeight)) + for (TQ_INT32 y = starty; y < starty + height; y += pixelHeight - (y % pixelHeight)) { - Q_INT32 h = pixelHeight - (y % pixelHeight); + TQ_INT32 h = pixelHeight - (y % pixelHeight); h = MIN(h, starty + height - y); - for (Q_INT32 x = startx; x < startx + width; x += pixelWidth - (x % pixelWidth)) + for (TQ_INT32 x = startx; x < startx + width; x += pixelWidth - (x % pixelWidth)) { - Q_INT32 w = pixelWidth - (x % pixelWidth); + TQ_INT32 w = pixelWidth - (x % pixelWidth); w = MIN(w, startx + width - x); - for (Q_INT32 i = 0; i < pixelSize; i++) + for (TQ_INT32 i = 0; i < pixelSize; i++) { average[i] = 0; } @@ -125,7 +125,7 @@ void KisPixelizeFilter::pixelize(KisPaintDeviceSP src, KisPaintDeviceSP dst, int while( ! srcIt.isDone() ) { if(srcIt.isSelected()) { - for (Q_INT32 i = 0; i < pixelSize; i++) + for (TQ_INT32 i = 0; i < pixelSize; i++) { average[i] += srcIt.oldRawData()[i]; } @@ -137,7 +137,7 @@ void KisPixelizeFilter::pixelize(KisPaintDeviceSP src, KisPaintDeviceSP dst, int //average if (count > 0) { - for (Q_INT32 i = 0; i < pixelSize; i++) + for (TQ_INT32 i = 0; i < pixelSize; i++) average[i] /= count; } //write @@ -163,15 +163,15 @@ void KisPixelizeFilter::pixelize(KisPaintDeviceSP src, KisPaintDeviceSP dst, int setProgressDone(); } -KisFilterConfigWidget * KisPixelizeFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisPixelizeFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 2, 40, 10, i18n("Pixel width"), "pixelWidth" ) ); param.push_back( KisIntegerWidgetParam( 2, 40, 10, i18n("Pixel height"), "pixelHeight" ) ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisPixelizeFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisPixelizeFilter::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.h b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.h index 16ce62e7..c7d8bb31 100644 --- a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.h +++ b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter.h @@ -27,15 +27,15 @@ class KisPixelizeFilterConfiguration : public KisFilterConfiguration { public: - KisPixelizeFilterConfiguration(Q_UINT32 pixelWidth, Q_UINT32 pixelHeight) + KisPixelizeFilterConfiguration(TQ_UINT32 pixelWidth, TQ_UINT32 pixelHeight) : KisFilterConfiguration( "pixelize", 1 ) { setProperty("pixelWidth", pixelWidth); setProperty("pixelHeight", pixelHeight); }; public: - inline Q_UINT32 pixelWidth() { return getInt("pixelWidth"); }; - inline Q_UINT32 pixelHeight() {return getInt("pixelHeight"); }; + inline TQ_UINT32 pixelWidth() { return getInt("pixelWidth"); }; + inline TQ_UINT32 pixelHeight() {return getInt("pixelHeight"); }; }; class KisPixelizeFilter : public KisFilter @@ -43,7 +43,7 @@ class KisPixelizeFilter : public KisFilter public: KisPixelizeFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("pixelize", i18n("Pixelize")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -51,8 +51,8 @@ public: virtual std::list listOfExamplesConfiguration(KisPaintDeviceSP ) { std::list list; list.insert(list.begin(), new KisPixelizeFilterConfiguration(10,10)); return list; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); virtual KisFilterConfiguration * configuration(); private: void pixelize(KisPaintDeviceSP src, KisPaintDeviceSP dst, int x, int y, int w, int h, int pixelWidth, int pixelHeight); diff --git a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.cc b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.cc index 39a56ec5..a5922b5c 100644 --- a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.cc +++ b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.cc @@ -26,13 +26,13 @@ typedef KGenericFactory KisPixelizeFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritapixelizefilter, KisPixelizeFilterPluginFactory( "krita" ) ) -KisPixelizeFilterPlugin::KisPixelizeFilterPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KisPixelizeFilterPlugin::KisPixelizeFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KisPixelizeFilterPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisPixelizeFilter()); } } diff --git a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.h b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.h index 33edf4d0..5cbeeef3 100644 --- a/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.h +++ b/krita/plugins/filters/pixelizefilter/kis_pixelize_filter_plugin.h @@ -25,7 +25,7 @@ class KisPixelizeFilterPlugin : public KParts::Plugin { public: - KisPixelizeFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisPixelizeFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisPixelizeFilterPlugin(); }; diff --git a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.cc b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.cc index a2bd633e..c208bb52 100644 --- a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.cc +++ b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.cc @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -57,15 +57,15 @@ KisRainDropsFilter::KisRainDropsFilter() : KisFilter(id(), "artistic", i18n("&Ra { } -void KisRainDropsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisRainDropsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { Q_UNUSED(dst); //read the filter configuration values from the KisFilterConfiguration object - Q_UINT32 dropSize = ((KisRainDropsFilterConfiguration*)configuration)->dropSize(); - Q_UINT32 number = ((KisRainDropsFilterConfiguration*)configuration)->number(); - Q_UINT32 fishEyes = ((KisRainDropsFilterConfiguration*)configuration)->fishEyes(); + TQ_UINT32 dropSize = ((KisRainDropsFilterConfiguration*)configuration)->dropSize(); + TQ_UINT32 number = ((KisRainDropsFilterConfiguration*)configuration)->number(); + TQ_UINT32 fishEyes = ((KisRainDropsFilterConfiguration*)configuration)->fishEyes(); rainDrops(src, dst, rect, dropSize, number, fishEyes); @@ -90,7 +90,7 @@ void KisRainDropsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Kis * and after this, a blur function will finish the effect. */ -void KisRainDropsFilter::rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, int DropSize, int Amount, int Coeff) +void KisRainDropsFilter::rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, int DropSize, int Amount, int Coeff) { setProgressTotalSteps(Amount); setProgressStage(i18n("Applying oilpaint filter..."),0); @@ -124,8 +124,8 @@ void KisRainDropsFilter::rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, c KisColorSpace * cs = src->colorSpace(); - QDateTime dt = QDateTime::currentDateTime(); - QDateTime Y2000( QDate(2000, 1, 1), QTime(0, 0, 0) ); + TQDateTime dt = TQDateTime::tqcurrentDateTime(); + TQDateTime Y2000( TQDate(2000, 1, 1), TQTime(0, 0, 0) ); srand ((uint) dt.secsTo(Y2000)); @@ -265,19 +265,19 @@ void KisRainDropsFilter::rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, c BoolMatrix[n][m] = true; - QColor originalColor; + TQColor originalColor; oldIt.moveTo(rect.x() + l, rect.y() + k); - cs->toQColor(oldIt.oldRawData(), &originalColor); + cs->toTQColor(oldIt.oldRawData(), &originalColor); - int newRed = CLAMP(originalColor.red() + Bright, 0, Q_UINT8_MAX); - int newGreen = CLAMP(originalColor.green() + Bright, 0, Q_UINT8_MAX); - int newBlue = CLAMP(originalColor.blue() + Bright, 0, Q_UINT8_MAX); + int newRed = CLAMP(originalColor.red() + Bright, 0, TQ_UINT8_MAX); + int newGreen = CLAMP(originalColor.green() + Bright, 0, TQ_UINT8_MAX); + int newBlue = CLAMP(originalColor.blue() + Bright, 0, TQ_UINT8_MAX); - QColor newColor; + TQColor newColor; newColor.setRgb(newRed, newGreen, newBlue); dstIt.moveTo(rect.x() + n, rect.y() + m); - cs->fromQColor(newColor, dstIt.rawData()); + cs->fromTQColor(newColor, dstIt.rawData()); } } } @@ -305,10 +305,10 @@ void KisRainDropsFilter::rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, c if ((m >= 0) && (m < Height) && (n >= 0) && (n < Width)) { - QColor color; + TQColor color; dstIt.moveTo(rect.x() + n, rect.y() + m); - cs->toQColor(dstIt.rawData(), &color); + cs->toTQColor(dstIt.rawData(), &color); R += color.red(); G += color.green(); @@ -322,12 +322,12 @@ void KisRainDropsFilter::rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, c if ((m >= 0) && (m < Height) && (n >= 0) && (n < Width)) { - QColor color; + TQColor color; color.setRgb((int)(R / BlurPixels), (int)(G / BlurPixels), (int)(B / BlurPixels)); dstIt.moveTo(rect.x() + n, rect.y() + m); - cs->fromQColor(color, dstIt.rawData()); + cs->fromTQColor(color, dstIt.rawData()); } } } @@ -418,16 +418,16 @@ uchar KisRainDropsFilter::LimitValues (int ColorValue) return ((uchar) ColorValue); } -KisFilterConfigWidget * KisRainDropsFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP) +KisFilterConfigWidget * KisRainDropsFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 1, 200, 80, i18n("Drop size"), "dropsize" ) ); param.push_back( KisIntegerWidgetParam( 1, 500, 80, i18n("Number"), "number" ) ); param.push_back( KisIntegerWidgetParam( 1, 100, 30, i18n("Fish eyes"), "fishEyes" ) ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisRainDropsFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisRainDropsFilter::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.h b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.h index c4a4d4da..eccb8917 100644 --- a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.h +++ b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter.h @@ -27,7 +27,7 @@ class KisRainDropsFilterConfiguration : public KisFilterConfiguration { public: - KisRainDropsFilterConfiguration(Q_UINT32 dropSize, Q_UINT32 number, Q_UINT32 fishEyes) + KisRainDropsFilterConfiguration(TQ_UINT32 dropSize, TQ_UINT32 number, TQ_UINT32 fishEyes) : KisFilterConfiguration( "raindrops", 1 ) { setProperty("dropsize", dropSize); @@ -35,9 +35,9 @@ public: setProperty("fishEyes", fishEyes); }; public: - inline Q_UINT32 dropSize() { return getInt("dropsize"); }; - inline Q_UINT32 number() {return getInt("number"); }; - inline Q_UINT32 fishEyes() {return getInt("fishEyes"); }; + inline TQ_UINT32 dropSize() { return getInt("dropsize"); }; + inline TQ_UINT32 number() {return getInt("number"); }; + inline TQ_UINT32 fishEyes() {return getInt("fishEyes"); }; }; @@ -46,7 +46,7 @@ class KisRainDropsFilter : public KisFilter public: KisRainDropsFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("raindrops", i18n("Raindrops")); }; virtual bool supportsPainting() { return false; } virtual bool supportsPreview() { return true; } @@ -55,10 +55,10 @@ public: { std::list list; list.insert(list.begin(), new KisRainDropsFilterConfiguration( 30, 80, 20)); return list; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); private: - void rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, int DropSize, int Amount, int Coeff); + void rainDrops(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, int DropSize, int Amount, int Coeff); bool** CreateBoolArray (uint Columns, uint Rows); void FreeBoolArray (bool** lpbArray, uint Columns); uchar LimitValues (int ColorValue); diff --git a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.cc b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.cc index 9b06b0c0..29106c62 100644 --- a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.cc +++ b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.cc @@ -29,12 +29,12 @@ typedef KGenericFactory KisRainDropsFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritaraindropsfilter, KisRainDropsFilterPluginFactory( "krita" ) ) -KisRainDropsFilterPlugin::KisRainDropsFilterPlugin(QObject *parent, const char *name, const QStringList &) : KParts::Plugin(parent, name) +KisRainDropsFilterPlugin::KisRainDropsFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) : KParts::Plugin(tqparent, name) { setInstance(KisRainDropsFilterPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisRainDropsFilter()); } } diff --git a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.h b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.h index 455f8f69..49834d37 100644 --- a/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.h +++ b/krita/plugins/filters/raindropsfilter/kis_raindrops_filter_plugin.h @@ -26,7 +26,7 @@ class KisRainDropsFilterPlugin : public KParts::Plugin { public: - KisRainDropsFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisRainDropsFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisRainDropsFilterPlugin(); }; diff --git a/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.cpp b/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.cpp index 380b405a..073382d4 100644 --- a/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.cpp +++ b/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.cpp @@ -20,22 +20,22 @@ #include "kis_wdg_random_pick.h" -#include +#include #include #include "wdgrandompickoptions.h" -KisWdgRandomPick::KisWdgRandomPick(KisFilter* /*nfilter*/, QWidget* parent, const char* name) - : KisFilterConfigWidget(parent,name) +KisWdgRandomPick::KisWdgRandomPick(KisFilter* /*nfilter*/, TQWidget* tqparent, const char* name) + : KisFilterConfigWidget(tqparent,name) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgRandomPickOptions(this); widgetLayout -> addWidget(m_widget,0,0); - connect( widget()->intLevel, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intWindowSize, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intOpacity, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intLevel, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intWindowSize, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intOpacity, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); } KisWdgRandomPick::~KisWdgRandomPick() @@ -44,7 +44,7 @@ KisWdgRandomPick::~KisWdgRandomPick() void KisWdgRandomPick::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; if (config->getProperty("level", value)) { widget()->intLevel->setValue( value.toUInt() ); diff --git a/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.h b/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.h index f7d86079..a6919cb0 100644 --- a/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.h +++ b/krita/plugins/filters/randompickfilter/kis_wdg_random_pick.h @@ -29,8 +29,9 @@ class KisFilter; class KisWdgRandomPick : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgRandomPick(KisFilter* nfilter, QWidget* parent = 0, const char* name = 0); + KisWdgRandomPick(KisFilter* nfilter, TQWidget* tqparent = 0, const char* name = 0); ~KisWdgRandomPick(); public: inline WdgRandomPickOptions* widget() { return m_widget; }; diff --git a/krita/plugins/filters/randompickfilter/randompickfilter.cc b/krita/plugins/filters/randompickfilter/randompickfilter.cc index 3289f683..b0bd0fdb 100644 --- a/krita/plugins/filters/randompickfilter/randompickfilter.cc +++ b/krita/plugins/filters/randompickfilter/randompickfilter.cc @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -49,14 +49,14 @@ typedef KGenericFactory KritaRandomPickFilterFactory; K_EXPORT_COMPONENT_FACTORY( kritarandompickfilter, KritaRandomPickFilterFactory( "krita" ) ) -KritaRandomPickFilter::KritaRandomPickFilter(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaRandomPickFilter::KritaRandomPickFilter(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaRandomPickFilterFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterRandomPick()); } } @@ -69,7 +69,7 @@ KisFilterRandomPick::KisFilterRandomPick() : KisFilter(id(), "other", i18n("&Ran { } -KisFilterConfiguration* KisFilterRandomPick::configuration(QWidget* w) +KisFilterConfiguration* KisFilterRandomPick::configuration(TQWidget* w) { KisWdgRandomPick* wN = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1); @@ -82,12 +82,12 @@ KisFilterConfiguration* KisFilterRandomPick::configuration(QWidget* w) return config; } -KisFilterConfigWidget * KisFilterRandomPick::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev) +KisFilterConfigWidget * KisFilterRandomPick::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev) { - return new KisWdgRandomPick((KisFilter*)this, (QWidget*)parent, i18n("Configuration of random pick filter").ascii()); + return new KisWdgRandomPick((KisFilter*)this, (TQWidget*)tqparent, i18n("Configuration of random pick filter").ascii()); } -void KisFilterRandomPick::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisFilterRandomPick::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); @@ -95,9 +95,9 @@ void KisFilterRandomPick::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki setProgressTotalSteps(rect.height() * rect.width()); KisColorSpace * cs = src->colorSpace(); - Q_INT32 psize = cs->pixelSize(); + TQ_INT32 psize = cs->pixelSize(); - QVariant value; + TQVariant value; int level = (config && config->getProperty("level", value)) ? value.toInt() : 50; double windowsize = (config && config->getProperty("windowsize", value)) ? value.toInt() / 2. : 2.5; int opacity = (config && config->getProperty("opacity", value)) ? value.toInt() : 100; @@ -106,11 +106,11 @@ void KisFilterRandomPick::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, Ki KisRectIteratorPixel srcIt = src->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), false); KisRandomAccessorPixel srcRA = src->createRandomAccessor(0, 0, false); - Q_UINT32 threshold = (RAND_MAX / 100) * (100 - level); + TQ_UINT32 threshold = (RAND_MAX / 100) * (100 - level); - Q_UINT8 weights[2]; + TQ_UINT8 weights[2]; weights[0] = (255 * opacity) / 100; weights[1] = 255 - weights[0]; - const Q_UINT8* pixels[2]; + const TQ_UINT8* pixels[2]; while(!srcIt.isDone()) { if(rand() > threshold) diff --git a/krita/plugins/filters/randompickfilter/randompickfilter.h b/krita/plugins/filters/randompickfilter/randompickfilter.h index 1d7f2c8f..88bd63b4 100644 --- a/krita/plugins/filters/randompickfilter/randompickfilter.h +++ b/krita/plugins/filters/randompickfilter/randompickfilter.h @@ -29,7 +29,7 @@ class KisFilterConfigWidget; class KritaRandomPickFilter : public KParts::Plugin { public: - KritaRandomPickFilter(QObject *parent, const char *name, const QStringList &); + KritaRandomPickFilter(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaRandomPickFilter(); }; @@ -38,15 +38,15 @@ class KisFilterRandomPick : public KisFilter public: KisFilterRandomPick(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; static inline KisID id() { return KisID("randompick", i18n("Random Pick")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } virtual bool supportsIncrementalPainting() { return false; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/randompickfilter/wdgrandompickoptions.ui b/krita/plugins/filters/randompickfilter/wdgrandompickoptions.ui index c4cb8947..5bdae980 100644 --- a/krita/plugins/filters/randompickfilter/wdgrandompickoptions.ui +++ b/krita/plugins/filters/randompickfilter/wdgrandompickoptions.ui @@ -1,6 +1,6 @@ WdgRandomPickOptions - + WdgRandomPickOptions @@ -19,7 +19,7 @@ 0 - + textLabel1 @@ -37,14 +37,14 @@ Expanding - + 20 50 - + textLabel2 @@ -80,7 +80,7 @@ 100 - + textLabel1_2 @@ -98,7 +98,7 @@ Expanding - + 16 20 @@ -123,7 +123,7 @@ - + knuminput.h knuminput.h diff --git a/krita/plugins/filters/roundcorners/kis_round_corners_filter.cc b/krita/plugins/filters/roundcorners/kis_round_corners_filter.cc index 715a2d58..0f8ee0cf 100644 --- a/krita/plugins/filters/roundcorners/kis_round_corners_filter.cc +++ b/krita/plugins/filters/roundcorners/kis_round_corners_filter.cc @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -56,22 +56,22 @@ KisRoundCornersFilter::KisRoundCornersFilter() : KisFilter(id(), "map", i18n("&R { } -void KisRoundCornersFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisRoundCornersFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { //read the filter configuration values from the KisFilterConfiguration object - Q_INT32 radius = (Q_INT32)((KisRoundCornersFilterConfiguration*)configuration)->radius(); - Q_UINT32 pixelSize = src->pixelSize(); + TQ_INT32 radius = (TQ_INT32)((KisRoundCornersFilterConfiguration*)configuration)->radius(); + TQ_UINT32 pixelSize = src->pixelSize(); setProgressTotalSteps( rect.height() ); setProgressStage(i18n("Applying pixelize filter..."),0); - for (Q_INT32 y = rect.y(); y < rect.height(); y++) + for (TQ_INT32 y = rect.y(); y < rect.height(); y++) { - Q_INT32 x = rect.x(); - Q_INT32 x0 = rect.x(); - Q_INT32 y0 = rect.x(); - Q_INT32 width = rect.width(); - Q_INT32 height = rect.height(); + TQ_INT32 x = rect.x(); + TQ_INT32 x0 = rect.x(); + TQ_INT32 y0 = rect.x(); + TQ_INT32 width = rect.width(); + TQ_INT32 height = rect.height(); KisHLineIteratorPixel dstIt = dst->createHLineIterator(x, y, width, true ); KisHLineIteratorPixel srcIt = src->createHLineIterator(x, y, width, false); while( ! srcIt.isDone() ) @@ -139,14 +139,14 @@ void KisRoundCornersFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, setProgressDone(); } -KisFilterConfigWidget * KisRoundCornersFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisRoundCornersFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 2, 100, 30, i18n("Radius"), "radius" ) ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisRoundCornersFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisRoundCornersFilter::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/roundcorners/kis_round_corners_filter.h b/krita/plugins/filters/roundcorners/kis_round_corners_filter.h index 2b965b5d..ec5fb9fb 100644 --- a/krita/plugins/filters/roundcorners/kis_round_corners_filter.h +++ b/krita/plugins/filters/roundcorners/kis_round_corners_filter.h @@ -27,13 +27,13 @@ class KisRoundCornersFilterConfiguration : public KisFilterConfiguration { public: - KisRoundCornersFilterConfiguration(Q_INT32 radius) + KisRoundCornersFilterConfiguration(TQ_INT32 radius) : KisFilterConfiguration( "roundcorners", 1 ) { setProperty("radius", radius); }; public: - inline Q_INT32 radius() { return getInt("radius"); }; + inline TQ_INT32 radius() { return getInt("radius"); }; }; class KisRoundCornersFilter : public KisFilter @@ -41,7 +41,7 @@ class KisRoundCornersFilter : public KisFilter public: KisRoundCornersFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("roundcorners", i18n("Round Corners")); }; virtual bool supportsPainting() { return false; } virtual bool supportsPreview() { return true; } @@ -49,8 +49,8 @@ public: virtual std::list listOfExamplesConfiguration(KisPaintDeviceSP ) { std::list list; list.insert(list.begin(), new KisRoundCornersFilterConfiguration(30)); return list; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); virtual KisFilterConfiguration * configuration() { return new KisRoundCornersFilterConfiguration( 30 ); }; private: }; diff --git a/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.cc b/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.cc index c21be444..46f1a2f4 100644 --- a/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.cc +++ b/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.cc @@ -26,13 +26,13 @@ typedef KGenericFactory KisRoundCornersFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritaroundcornersfilter, KisRoundCornersFilterPluginFactory( "krita" ) ) -KisRoundCornersFilterPlugin::KisRoundCornersFilterPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KisRoundCornersFilterPlugin::KisRoundCornersFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KisRoundCornersFilterPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisRoundCornersFilter()); } } diff --git a/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.h b/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.h index cb82b9fb..207d346e 100644 --- a/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.h +++ b/krita/plugins/filters/roundcorners/kis_round_corners_filter_plugin.h @@ -25,7 +25,7 @@ class KisRoundCornersFilterPlugin : public KParts::Plugin { public: - KisRoundCornersFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisRoundCornersFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisRoundCornersFilterPlugin(); }; diff --git a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cc b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cc index 541a5ab2..31d0bc43 100644 --- a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cc +++ b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cc @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -58,13 +58,13 @@ #define MIN(a,b) (((a)<(b))?(a):(b)) -void KisSmallTilesFilterConfiguration::fromXML(const QString & s) +void KisSmallTilesFilterConfiguration::fromXML(const TQString & s) { KisFilterConfiguration::fromXML(s); m_numberOfTiles = getInt("numberOfTiles"); } -QString KisSmallTilesFilterConfiguration::toString() +TQString KisSmallTilesFilterConfiguration::toString() { m_properties.clear(); setProperty("numberOfTiles()", m_numberOfTiles); @@ -76,20 +76,20 @@ KisSmallTilesFilter::KisSmallTilesFilter() : KisFilter(id(), "map", i18n("&Small { } -void KisSmallTilesFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisSmallTilesFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { //read the filter configuration values from the KisFilterConfiguration object - Q_UINT32 numberOfTiles = ((KisSmallTilesFilterConfiguration*)configuration)->numberOfTiles(); + TQ_UINT32 numberOfTiles = ((KisSmallTilesFilterConfiguration*)configuration)->numberOfTiles(); createSmallTiles(src, dst, rect, numberOfTiles); } -void KisSmallTilesFilter::createSmallTiles(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, Q_UINT32 numberOfTiles) +void KisSmallTilesFilter::createSmallTiles(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, TQ_UINT32 numberOfTiles) { if (!src) return; if (!dst) return; - QRect srcRect = src->exactBounds(); + TQRect srcRect = src->exactBounds(); int w = static_cast(srcRect.width() / numberOfTiles); int h = static_cast(srcRect.height() / numberOfTiles); @@ -138,13 +138,13 @@ void KisSmallTilesFilter::createSmallTiles(KisPaintDeviceSP src, KisPaintDeviceS //KisScaleWorker worker(tmp, 1.0 / static_cast(numberOfTiles), 1.0 / static_cast(numberOfTiles), new KisMitchellFilterStrategy() ); //worker.run(); -// QRect tmpRect = tmp->exactBounds(); +// TQRect tmpRect = tmp->exactBounds(); // -// for( Q_UINT32 i=0; i < numberOfTiles; i++ ) +// for( TQ_UINT32 i=0; i < numberOfTiles; i++ ) // { -// for( Q_UINT32 j=0; j < numberOfTiles; j++ ) +// for( TQ_UINT32 j=0; j < numberOfTiles; j++ ) // { -// for( Q_INT32 row = tmpRect.y(); row < tmpRect.height(); row++ ) +// for( TQ_INT32 row = tmpRect.y(); row < tmpRect.height(); row++ ) // { // KisHLineIteratorPixel tmpIt = tmp->createHLineIterator(tmpRect.x(), row, tmpRect.width() , false); // KisHLineIteratorPixel dstIt = dst->createHLineIterator( tmpRect.x() + i * tmpRect.width(), row + j * tmpRect.height(), tmpRect.width() , true); @@ -168,14 +168,14 @@ void KisSmallTilesFilter::createSmallTiles(KisPaintDeviceSP src, KisPaintDeviceS setProgressDone(); } -KisFilterConfigWidget * KisSmallTilesFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisSmallTilesFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { vKisIntegerWidgetParam param; param.push_back( KisIntegerWidgetParam( 2, 5, 1, i18n("Number of tiles"), "smalltiles" ) ); - return new KisMultiIntegerFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiIntegerFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisSmallTilesFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisSmallTilesFilter::configuration(TQWidget* nwidget) { KisMultiIntegerFilterWidget* widget = (KisMultiIntegerFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h index 41346a1e..8d82eda2 100644 --- a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h +++ b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h @@ -27,19 +27,19 @@ class KisSmallTilesFilterConfiguration : public KisFilterConfiguration { public: - KisSmallTilesFilterConfiguration(Q_UINT32 numberOfTiles) + KisSmallTilesFilterConfiguration(TQ_UINT32 numberOfTiles) : KisFilterConfiguration( "smalltiles", 1 ) , m_numberOfTiles(numberOfTiles) {}; - virtual void fromXML( const QString& ); - virtual QString toString(); + virtual void fromXML( const TQString& ); + virtual TQString toString(); public: - inline Q_UINT32 numberOfTiles() { return m_numberOfTiles; }; + inline TQ_UINT32 numberOfTiles() { return m_numberOfTiles; }; private: - Q_UINT32 m_numberOfTiles; + TQ_UINT32 m_numberOfTiles; }; class KisSmallTilesFilter : public KisFilter @@ -49,7 +49,7 @@ public: KisSmallTilesFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("smalltiles", i18n("Small Tiles")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } @@ -59,12 +59,12 @@ public: { std::list list; list.insert(list.begin(), new KisSmallTilesFilterConfiguration(2)); return list; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration * configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration * configuration(TQWidget*); virtual KisFilterConfiguration * configuration() { return new KisSmallTilesFilterConfiguration( 2 ); }; private: - void createSmallTiles(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect, Q_UINT32 numberOfTiles); + void createSmallTiles(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect, TQ_UINT32 numberOfTiles); }; #endif diff --git a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.cc b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.cc index 6c51632c..5a514b75 100644 --- a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.cc +++ b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.cc @@ -26,13 +26,13 @@ typedef KGenericFactory KisSmallTilesFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritasmalltilesfilter, KisSmallTilesFilterPluginFactory( "krita" ) ) -KisSmallTilesFilterPlugin::KisSmallTilesFilterPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KisSmallTilesFilterPlugin::KisSmallTilesFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KisSmallTilesFilterPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisSmallTilesFilter()); } } diff --git a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.h b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.h index f26fc155..0ca6edaa 100644 --- a/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.h +++ b/krita/plugins/filters/smalltilesfilter/kis_small_tiles_filter_plugin.h @@ -25,7 +25,7 @@ class KisSmallTilesFilterPlugin : public KParts::Plugin { public: - KisSmallTilesFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisSmallTilesFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisSmallTilesFilterPlugin(); }; diff --git a/krita/plugins/filters/sobelfilter/kis_sobel_filter.cc b/krita/plugins/filters/sobelfilter/kis_sobel_filter.cc index 122887b4..1eff06c7 100644 --- a/krita/plugins/filters/sobelfilter/kis_sobel_filter.cc +++ b/krita/plugins/filters/sobelfilter/kis_sobel_filter.cc @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -51,7 +51,7 @@ #define MIN(a,b) (((a)<(b))?(a):(b)) -void KisSobelFilterConfiguration::fromXML(const QString & s) +void KisSobelFilterConfiguration::fromXML(const TQString & s) { KisFilterConfiguration::fromXML(s); m_doHorizontally = getBool( "doHorizontally" ); @@ -59,7 +59,7 @@ void KisSobelFilterConfiguration::fromXML(const QString & s) m_keepSign = getBool( "makeOpaque" ); } -QString KisSobelFilterConfiguration::toString() +TQString KisSobelFilterConfiguration::toString() { m_properties.clear(); setProperty("doHorizontally", m_doHorizontally); @@ -74,7 +74,7 @@ KisSobelFilter::KisSobelFilter() : KisFilter(id(), "edge", i18n("&Sobel...")) { } -void KisSobelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect) +void KisSobelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect) { //read the filter configuration values from the KisFilterConfiguration object bool doHorizontally = ((KisSobelFilterConfiguration*)configuration)->doHorizontally(); @@ -86,14 +86,14 @@ void KisSobelFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilt sobel(rect, src, dst, doHorizontally, doVertically, keepSign, makeOpaque); } -void KisSobelFilter::prepareRow (KisPaintDeviceSP src, Q_UINT8* data, Q_UINT32 x, Q_UINT32 y, Q_UINT32 w, Q_UINT32 h) +void KisSobelFilter::prepareRow (KisPaintDeviceSP src, TQ_UINT8* data, TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 w, TQ_UINT32 h) { if (y > h -1) y = h -1; - Q_UINT32 pixelSize = src->pixelSize(); + TQ_UINT32 pixelSize = src->pixelSize(); src->readBytes( data, x, y, w, 1 ); - for (Q_UINT32 b = 0; b < pixelSize; b++) { + for (TQ_UINT32 b = 0; b < pixelSize; b++) { int offset = pixelSize - b; data[-offset] = data[b]; data[w * pixelSize + b] = data[(w - 1) * pixelSize + b]; @@ -103,48 +103,48 @@ void KisSobelFilter::prepareRow (KisPaintDeviceSP src, Q_UINT8* data, Q_UINT32 x #define RMS(a, b) (sqrt ((a) * (a) + (b) * (b))) #define ROUND(x) ((int) ((x) + 0.5)) -void KisSobelFilter::sobel(const QRect & rc, KisPaintDeviceSP src, KisPaintDeviceSP dst, bool doHorizontal, bool doVertical, bool keepSign, bool makeOpaque) +void KisSobelFilter::sobel(const TQRect & rc, KisPaintDeviceSP src, KisPaintDeviceSP dst, bool doHorizontal, bool doVertical, bool keepSign, bool makeOpaque) { - QRect rect = rc; //src->exactBounds(); - Q_UINT32 x = rect.x(); - Q_UINT32 y = rect.y(); - Q_UINT32 width = rect.width(); - Q_UINT32 height = rect.height(); - Q_UINT32 pixelSize = src->pixelSize(); + TQRect rect = rc; //src->exactBounds(); + TQ_UINT32 x = rect.x(); + TQ_UINT32 y = rect.y(); + TQ_UINT32 width = rect.width(); + TQ_UINT32 height = rect.height(); + TQ_UINT32 pixelSize = src->pixelSize(); setProgressTotalSteps( height ); setProgressStage(i18n("Applying sobel filter..."),0); /* allocate row buffers */ - Q_UINT8* prevRow = new Q_UINT8[ (width + 2) * pixelSize]; + TQ_UINT8* prevRow = new TQ_UINT8[ (width + 2) * pixelSize]; Q_CHECK_PTR(prevRow); - Q_UINT8* curRow = new Q_UINT8[ (width + 2) * pixelSize]; + TQ_UINT8* curRow = new TQ_UINT8[ (width + 2) * pixelSize]; Q_CHECK_PTR(curRow); - Q_UINT8* nextRow = new Q_UINT8[ (width + 2) * pixelSize]; + TQ_UINT8* nextRow = new TQ_UINT8[ (width + 2) * pixelSize]; Q_CHECK_PTR(nextRow); - Q_UINT8* dest = new Q_UINT8[ width * pixelSize]; + TQ_UINT8* dest = new TQ_UINT8[ width * pixelSize]; Q_CHECK_PTR(dest); - Q_UINT8* pr = prevRow + pixelSize; - Q_UINT8* cr = curRow + pixelSize; - Q_UINT8* nr = nextRow + pixelSize; + TQ_UINT8* pr = prevRow + pixelSize; + TQ_UINT8* cr = curRow + pixelSize; + TQ_UINT8* nr = nextRow + pixelSize; prepareRow (src, pr, x, y - 1, width, height); prepareRow (src, cr, x, y, width, height); - Q_UINT32 counter =0; - Q_UINT8* d; - Q_UINT8* tmp; - Q_INT32 gradient, horGradient, verGradient; + TQ_UINT32 counter =0; + TQ_UINT8* d; + TQ_UINT8* tmp; + TQ_INT32 gradient, horGradient, verGradient; // loop through the rows, applying the sobel convolution - for (Q_UINT32 row = 0; row < height; row++) + for (TQ_UINT32 row = 0; row < height; row++) { // prepare the next row prepareRow (src, nr, x, row + 1, width, height); d = dest; - for (Q_UINT32 col = 0; col < width * pixelSize; col++) + for (TQ_UINT32 col = 0; col < width * pixelSize; col++) { int positive = col + pixelSize; int negative = col - pixelSize; @@ -157,10 +157,10 @@ void KisSobelFilter::sobel(const QRect & rc, KisPaintDeviceSP src, KisPaintDevic ((pr[negative] + 2 * cr[negative] + nr[negative]) - (pr[positive] + 2 * cr[positive] + nr[positive])) : 0); - gradient = (Q_INT32)((doVertical && doHorizontal) ? + gradient = (TQ_INT32)((doVertical && doHorizontal) ? (ROUND (RMS (horGradient, verGradient)) / 5.66) // always >0 : (keepSign ? (127 + (ROUND ((horGradient + verGradient) / 8.0))) - : (ROUND (QABS (horGradient + verGradient) / 4.0)))); + : (ROUND (TQABS (horGradient + verGradient) / 4.0)))); *d++ = gradient; if (gradient > 10) counter ++; @@ -195,17 +195,17 @@ void KisSobelFilter::sobel(const QRect & rc, KisPaintDeviceSP src, KisPaintDevic } -KisFilterConfigWidget * KisSobelFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP) +KisFilterConfigWidget * KisSobelFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP) { vKisBoolWidgetParam param; param.push_back( KisBoolWidgetParam( true, i18n("Sobel horizontally"), "doHorizontally" ) ); param.push_back( KisBoolWidgetParam( true, i18n("Sobel vertically"), "doVertically" ) ); param.push_back( KisBoolWidgetParam( true, i18n("Keep sign of result"), "keepSign" ) ); param.push_back( KisBoolWidgetParam( true, i18n("Make image opaque"), "makeOpaque" ) ); - return new KisMultiBoolFilterWidget(parent, id().id().ascii(), id().id().ascii(), param ); + return new KisMultiBoolFilterWidget(tqparent, id().id().ascii(), id().id().ascii(), param ); } -KisFilterConfiguration* KisSobelFilter::configuration(QWidget* nwidget) +KisFilterConfiguration* KisSobelFilter::configuration(TQWidget* nwidget) { KisMultiBoolFilterWidget* widget = (KisMultiBoolFilterWidget*) nwidget; if( widget == 0 ) diff --git a/krita/plugins/filters/sobelfilter/kis_sobel_filter.h b/krita/plugins/filters/sobelfilter/kis_sobel_filter.h index 9127cd3a..757757bc 100644 --- a/krita/plugins/filters/sobelfilter/kis_sobel_filter.h +++ b/krita/plugins/filters/sobelfilter/kis_sobel_filter.h @@ -35,8 +35,8 @@ public: , m_makeOpaque(makeOpaque) {}; - virtual void fromXML( const QString& ); - virtual QString toString(); + virtual void fromXML( const TQString& ); + virtual TQString toString(); public: inline bool doHorizontally() { return m_doHorizontally; }; @@ -56,7 +56,7 @@ class KisSobelFilter : public KisFilter public: KisSobelFilter(); public: - virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const QRect&); + virtual void process(KisPaintDeviceSP,KisPaintDeviceSP, KisFilterConfiguration* , const TQRect&); static inline KisID id() { return KisID("sobel", i18n("Sobel")); }; virtual bool supportsPainting() { return false; } virtual bool supportsPreview() { return true; } @@ -64,12 +64,12 @@ public: virtual std::list listOfExamplesConfiguration(KisPaintDeviceSP ) { std::list list; list.insert(list.begin(), new KisSobelFilterConfiguration(true,true,true,true)); return list; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); virtual KisFilterConfiguration * configuration() { return new KisSobelFilterConfiguration( true, true, true, true); }; private: - void prepareRow (KisPaintDeviceSP src, Q_UINT8* data, Q_UINT32 x, Q_UINT32 y, Q_UINT32 w, Q_UINT32 h); - void sobel(const QRect & rc, KisPaintDeviceSP src, KisPaintDeviceSP dst, bool doHorizontal, bool doVertical, bool keepSign, bool makeOpaque); + void prepareRow (KisPaintDeviceSP src, TQ_UINT8* data, TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 w, TQ_UINT32 h); + void sobel(const TQRect & rc, KisPaintDeviceSP src, KisPaintDeviceSP dst, bool doHorizontal, bool doVertical, bool keepSign, bool makeOpaque); }; #endif diff --git a/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.cc b/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.cc index cc3b31b1..72f0103d 100644 --- a/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.cc +++ b/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.cc @@ -26,13 +26,13 @@ typedef KGenericFactory KisSobelFilterPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritasobelfilter, KisSobelFilterPluginFactory( "krita" ) ) -KisSobelFilterPlugin::KisSobelFilterPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KisSobelFilterPlugin::KisSobelFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KisSobelFilterPluginFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisSobelFilter()); } } diff --git a/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.h b/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.h index 95a80905..1d6948df 100644 --- a/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.h +++ b/krita/plugins/filters/sobelfilter/kis_sobel_filter_plugin.h @@ -25,7 +25,7 @@ class KisSobelFilterPlugin : public KParts::Plugin { public: - KisSobelFilterPlugin(QObject *parent, const char *name, const QStringList &); + KisSobelFilterPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisSobelFilterPlugin(); }; diff --git a/krita/plugins/filters/threadtest/threadtest.cc b/krita/plugins/filters/threadtest/threadtest.cc index f965b7f3..c3b2cf55 100644 --- a/krita/plugins/filters/threadtest/threadtest.cc +++ b/krita/plugins/filters/threadtest/threadtest.cc @@ -19,9 +19,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -47,13 +47,13 @@ typedef KGenericFactory KritaThreadTestFactory; K_EXPORT_COMPONENT_FACTORY( kritathreadtest, KritaThreadTestFactory( "krita" ) ) -KritaThreadTest::KritaThreadTest(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaThreadTest::KritaThreadTest(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaThreadTestFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * r = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * r = dynamic_cast(tqparent); r->add(new KisFilterInvert()); } } @@ -62,35 +62,35 @@ KritaThreadTest::~KritaThreadTest() { } -class InversionThread : public QThread +class InversionThread : public TQThread { public: - InversionThread(const QString & name, KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect& rect) - : QThread() + InversionThread(const TQString & name, KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect& rect) + : TQThread() , m_name(name) , m_src(src) , m_dst(dst) , m_rect(rect) { - kdDebug() << "Thread created " << m_name << ", " << QThread::currentThread() << ", " << m_rect << "\n"; + kdDebug() << "Thread created " << m_name << ", " << TQThread::currentThread() << ", " << m_rect << "\n"; }; void run() { - kdDebug() << "Thread started:" << m_name << ", " << QThread::currentThread() << "\n"; + kdDebug() << "Thread started:" << m_name << ", " << TQThread::currentThread() << "\n"; KisRectIteratorPixel dstIt = m_dst->createRectIterator(m_rect.x(), m_rect.y(), m_rect.width(), m_rect.height(), true ); KisRectIteratorPixel srcIt = m_src->createRectIterator(m_rect.x(), m_rect.y(), m_rect.width(), m_rect.height(), false); - Q_INT32 depth = m_src -> colorSpace() -> nColorChannels(); + TQ_INT32 depth = m_src -> colorSpace() -> nColorChannels(); kdDebug() << "Thread " << m_name << " starts loop \n"; while( ! srcIt.isDone() ) { if ( srcIt.isSelected() ) { for( int i = 0; i < depth; i++) { - dstIt.rawData()[i] = Q_UINT8_MAX - srcIt.oldRawData()[i]; + dstIt.rawData()[i] = TQ_UINT8_MAX - srcIt.oldRawData()[i]; } } ++srcIt; @@ -100,10 +100,10 @@ public: }; private: - QString m_name; + TQString m_name; KisPaintDeviceSP m_src; KisPaintDeviceSP m_dst; - QRect m_rect; + TQRect m_rect; }; @@ -111,17 +111,17 @@ KisFilterInvert::KisFilterInvert() : KisFilter(id(), "colors", i18n("Invert with { } -void KisFilterInvert::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect) +void KisFilterInvert::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect) { kdDebug() << "Going to invert " << rect << "\n"; int h2 = rect.height() / 2; int w2 = rect.width() / 2; setProgressTotalSteps(4); - InversionThread t1("t1", src, dst, QRect(0, 0, w2, h2)); - InversionThread t2("t2", src, dst, QRect(w2, 0, w2, h2)); - InversionThread t3("t3", src, dst, QRect(0, h2, w2, h2)); - InversionThread t4("t4", src, dst, QRect(w2, h2, w2, h2)); + InversionThread t1("t1", src, dst, TQRect(0, 0, w2, h2)); + InversionThread t2("t2", src, dst, TQRect(w2, 0, w2, h2)); + InversionThread t3("t3", src, dst, TQRect(0, h2, w2, h2)); + InversionThread t4("t4", src, dst, TQRect(w2, h2, w2, h2)); t1.start(); t2.start(); diff --git a/krita/plugins/filters/threadtest/threadtest.h b/krita/plugins/filters/threadtest/threadtest.h index da3ff44e..8c1e5a32 100644 --- a/krita/plugins/filters/threadtest/threadtest.h +++ b/krita/plugins/filters/threadtest/threadtest.h @@ -27,7 +27,7 @@ class KritaThreadTest : public KParts::Plugin { public: - KritaThreadTest(QObject *parent, const char *name, const QStringList &); + KritaThreadTest(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaThreadTest(); }; @@ -36,7 +36,7 @@ class KisFilterInvert : public KisFilter public: KisFilterInvert(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); static inline KisID id() { return KisID("invertthread", i18n("Invert with Threads")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } diff --git a/krita/plugins/filters/unsharp/kis_unsharp_filter.cc b/krita/plugins/filters/unsharp/kis_unsharp_filter.cc index aeecd7db..7ca942bd 100644 --- a/krita/plugins/filters/unsharp/kis_unsharp_filter.cc +++ b/krita/plugins/filters/unsharp/kis_unsharp_filter.cc @@ -31,16 +31,16 @@ #include "kis_wdg_unsharp.h" #include "wdgunsharp.h" -KisKernelSP kernelFromQImage(const QImage& img) +KisKernelSP kernelFromTQImage(const TQImage& img) { KisKernelSP k = new KisKernel; k->width = img.width(); k->height = img.height(); k->offset = 0; uint count = k->width * k->height; - k->data = new Q_INT32[count]; - Q_INT32* itData = k->data; - Q_UINT8* itImg = img.bits(); + k->data = new TQ_INT32[count]; + TQ_INT32* itData = k->data; + TQ_UINT8* itImg = img.bits(); k->factor = 0; for(uint i = 0; i < count; ++i , ++itData, itImg+=4) { @@ -55,12 +55,12 @@ KisUnsharpFilter::KisUnsharpFilter() : KisFilter(id(), "enhance", i18n("&Unsharp { } -KisFilterConfigWidget * KisUnsharpFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP ) +KisFilterConfigWidget * KisUnsharpFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP ) { - return new KisWdgUnsharp(this, parent, "configuration of color to alpha"); + return new KisWdgUnsharp(this, tqparent, "configuration of color to alpha"); } -KisFilterConfiguration* KisUnsharpFilter::configuration(QWidget* w) +KisFilterConfiguration* KisUnsharpFilter::configuration(TQWidget* w) { KisWdgUnsharp * wCTA = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1); @@ -74,7 +74,7 @@ KisFilterConfiguration* KisUnsharpFilter::configuration(QWidget* w) return 0; } -void KisUnsharpFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisUnsharpFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); @@ -83,7 +83,7 @@ void KisUnsharpFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi if(!config) config = new KisFilterConfiguration(id().id(), 1); - QVariant value; + TQVariant value; uint halfSize = (config->getProperty("halfSize", value)) ? value.toUInt() : 4; uint size = 2 * halfSize + 1; double amount = (config->getProperty("amount", value)) ? value.toDouble() : 0.5; @@ -92,10 +92,10 @@ void KisUnsharpFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi kdDebug() << " brush size = " << size << " " << halfSize << endl; KisAutobrushShape* kas = new KisAutobrushCircleShape(size, size , halfSize, halfSize); - QImage mask; - kas->createBrush(&mask); + TQImage tqmask; + kas->createBrush(&tqmask); - KisKernelSP kernel = kernelFromQImage(mask); // TODO: for 1.6 reuse the krita's core function for creating kernel : KisKernel::fromQImage + KisKernelSP kernel = kernelFromTQImage(tqmask); // TODO: for 1.6 reuse the krita's core function for creating kernel : KisKernel::fromTQImage KisPaintDeviceSP interm = new KisPaintDevice(*src); KisColorSpace * cs = src->colorSpace(); @@ -112,14 +112,14 @@ void KisUnsharpFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi KisHLineIteratorPixel srcIt = src->createHLineIterator(rect.x(), rect.y(), rect.width(), false); KisHLineIteratorPixel intermIt = interm->createHLineIterator(rect.x(), rect.y(), rect.width(), false); - Q_UINT8 *colors[2]; + TQ_UINT8 *colors[2]; int pixelsProcessed = 0; - Q_INT32 weights[2]; + TQ_INT32 weights[2]; /* weights[0] = 128; - Q_INT32 factor = (Q_UINT32) 128 / amount; + TQ_INT32 factor = (TQ_UINT32) 128 / amount; weights[1] = (factor - 128);*/ - Q_INT32 factor = 128; + TQ_INT32 factor = 128; weights[0] = factor * ( 1. + amount); weights[1] = -factor * amount; kdDebug() << (int) weights[0] << " " << (int)weights[1] << " " << factor << endl; @@ -129,7 +129,7 @@ void KisUnsharpFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi { if(srcIt.isSelected()) { - Q_UINT8 diff = cs->difference(srcIt.oldRawData(), intermIt.rawData()); + TQ_UINT8 diff = cs->difference(srcIt.oldRawData(), intermIt.rawData()); if( diff > threshold) { colors[0] = srcIt.rawData(); diff --git a/krita/plugins/filters/unsharp/kis_unsharp_filter.h b/krita/plugins/filters/unsharp/kis_unsharp_filter.h index 3b1dc882..e7b251f0 100644 --- a/krita/plugins/filters/unsharp/kis_unsharp_filter.h +++ b/krita/plugins/filters/unsharp/kis_unsharp_filter.h @@ -32,16 +32,16 @@ class KisUnsharpFilter : public KisFilter public: KisUnsharpFilter(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); - static inline KisID id() { return KisID("unsharpmask", i18n("Unsharp Mask")); }; + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); + static inline KisID id() { return KisID("unsharptqmask", i18n("Unsharp Mask")); }; virtual bool supportsPainting() { return true; } virtual bool supportsPreview() { return true; } virtual bool supportsIncrementalPainting() { return false; } virtual bool supportsAdjustmentLayers() { return false; } virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/unsharp/kis_wdg_unsharp.cc b/krita/plugins/filters/unsharp/kis_wdg_unsharp.cc index 101d5601..10b989e0 100644 --- a/krita/plugins/filters/unsharp/kis_wdg_unsharp.cc +++ b/krita/plugins/filters/unsharp/kis_wdg_unsharp.cc @@ -20,8 +20,8 @@ #include "kis_wdg_unsharp.h" -#include -#include +#include +#include #include #include @@ -30,20 +30,20 @@ #include "wdgunsharp.h" -KisWdgUnsharp::KisWdgUnsharp( KisFilter* , QWidget * parent, const char * name) : KisFilterConfigWidget ( parent, name ) +KisWdgUnsharp::KisWdgUnsharp( KisFilter* , TQWidget * tqparent, const char * name) : KisFilterConfigWidget ( tqparent, name ) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgUnsharp(this); widgetLayout -> addWidget(m_widget,0,0); - connect( widget()->intHalfSize, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->doubleAmount, SIGNAL( valueChanged(double)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intThreshold, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intHalfSize, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->doubleAmount, TQT_SIGNAL( valueChanged(double)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intThreshold, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); } void KisWdgUnsharp::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; widget()->intHalfSize->setValue( (config->getProperty("halfSize", value)) ? value.toUInt() : 4 ); widget()->doubleAmount->setValue( (config->getProperty("amount", value)) ? value.toDouble() : 0.1 ); widget()->intThreshold->setValue( (config->getProperty("threshold", value)) ? value.toUInt() : 20 ); diff --git a/krita/plugins/filters/unsharp/kis_wdg_unsharp.h b/krita/plugins/filters/unsharp/kis_wdg_unsharp.h index 1c4fd560..173916ac 100644 --- a/krita/plugins/filters/unsharp/kis_wdg_unsharp.h +++ b/krita/plugins/filters/unsharp/kis_wdg_unsharp.h @@ -33,8 +33,9 @@ class WdgUnsharp; class KisWdgUnsharp : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgUnsharp( KisFilter* nfilter, QWidget * parent, const char * name); + KisWdgUnsharp( KisFilter* nfilter, TQWidget * tqparent, const char * name); inline WdgUnsharp* widget() { return m_widget; }; virtual void setConfiguration(KisFilterConfiguration*); private: diff --git a/krita/plugins/filters/unsharp/unsharp.cc b/krita/plugins/filters/unsharp/unsharp.cc index 15170eff..cee34e77 100644 --- a/krita/plugins/filters/unsharp/unsharp.cc +++ b/krita/plugins/filters/unsharp/unsharp.cc @@ -27,8 +27,8 @@ typedef KGenericFactory UnsharpPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritaunsharpfilter, UnsharpPluginFactory( "krita" ) ) -UnsharpPlugin::UnsharpPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +UnsharpPlugin::UnsharpPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(UnsharpPluginFactory::instance()); @@ -36,11 +36,11 @@ UnsharpPlugin::UnsharpPlugin(QObject *parent, const char *name, const QStringLis kdDebug(41006) << "Extensions Image enhancement Filters plugin. Class: " << className() << ", Parent: " - << parent -> className() + << tqparent -> className() << "\n"; - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisUnsharpFilter()); } } diff --git a/krita/plugins/filters/unsharp/unsharp.h b/krita/plugins/filters/unsharp/unsharp.h index 410b7568..95a12ffa 100644 --- a/krita/plugins/filters/unsharp/unsharp.h +++ b/krita/plugins/filters/unsharp/unsharp.h @@ -30,7 +30,7 @@ class UnsharpPlugin : public KParts::Plugin { public: - UnsharpPlugin(QObject *parent, const char *name, const QStringList &); + UnsharpPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~UnsharpPlugin(); }; diff --git a/krita/plugins/filters/unsharp/wdgunsharp.ui b/krita/plugins/filters/unsharp/wdgunsharp.ui index 1acaadab..376ed16e 100644 --- a/krita/plugins/filters/unsharp/wdgunsharp.ui +++ b/krita/plugins/filters/unsharp/wdgunsharp.ui @@ -1,6 +1,6 @@ WdgUnsharp - + WdgUnsharp @@ -36,7 +36,7 @@ 1000 - + textLabel1 @@ -58,7 +58,7 @@ 2 - + textLabel2 @@ -66,7 +66,7 @@ Threshold: - + textLabel3 @@ -84,7 +84,7 @@ Expanding - + 21 20 @@ -115,7 +115,7 @@ Expanding - + 20 21 @@ -126,7 +126,7 @@ - + knuminput.h knuminput.h diff --git a/krita/plugins/filters/wavefilter/kis_wdg_wave.cpp b/krita/plugins/filters/wavefilter/kis_wdg_wave.cpp index bcc47103..1947277c 100644 --- a/krita/plugins/filters/wavefilter/kis_wdg_wave.cpp +++ b/krita/plugins/filters/wavefilter/kis_wdg_wave.cpp @@ -20,28 +20,28 @@ #include "kis_wdg_wave.h" -#include +#include #include #include #include "wdgwaveoptions.h" -KisWdgWave::KisWdgWave(KisFilter* /*nfilter*/, QWidget* parent, const char* name) - : KisFilterConfigWidget(parent,name) +KisWdgWave::KisWdgWave(KisFilter* /*nfilter*/, TQWidget* tqparent, const char* name) + : KisFilterConfigWidget(tqparent,name) { - QGridLayout *widgetLayout = new QGridLayout(this, 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout(this, 1, 1); m_widget = new WdgWaveOptions(this); widgetLayout -> addWidget(m_widget, 0, 0); - connect( widget()->intHWavelength, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intHShift, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intHAmplitude, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->cbHShape, SIGNAL( activated(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intVWavelength, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intVShift, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->intVAmplitude, SIGNAL( valueChanged(int)), SIGNAL(sigPleaseUpdatePreview())); - connect( widget()->cbVShape, SIGNAL( activated(int)), SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intHWavelength, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intHShift, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intHAmplitude, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->cbHShape, TQT_SIGNAL( activated(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intVWavelength, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intVShift, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->intVAmplitude, TQT_SIGNAL( valueChanged(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); + connect( widget()->cbVShape, TQT_SIGNAL( activated(int)), TQT_SIGNAL(sigPleaseUpdatePreview())); } KisWdgWave::~KisWdgWave() @@ -50,7 +50,7 @@ KisWdgWave::~KisWdgWave() void KisWdgWave::setConfiguration(KisFilterConfiguration* config) { - QVariant value; + TQVariant value; if (config->getProperty("horizontalwavelength", value)) { widget()->intHWavelength->setValue( value.toUInt() ); @@ -63,7 +63,7 @@ void KisWdgWave::setConfiguration(KisFilterConfiguration* config) { widget()->intHAmplitude->setValue( value.toUInt() ); } - if (config->getProperty("horizontalshape", value)) + if (config->getProperty("horizontaltqshape", value)) { widget()->cbHShape->setCurrentItem( value.toUInt() ); } @@ -79,7 +79,7 @@ void KisWdgWave::setConfiguration(KisFilterConfiguration* config) { widget()->intVAmplitude->setValue( value.toUInt() ); } - if (config->getProperty("verticalshape", value)) + if (config->getProperty("verticaltqshape", value)) { widget()->cbVShape->setCurrentItem( value.toUInt() ); } diff --git a/krita/plugins/filters/wavefilter/kis_wdg_wave.h b/krita/plugins/filters/wavefilter/kis_wdg_wave.h index e71082d1..edb5fddf 100644 --- a/krita/plugins/filters/wavefilter/kis_wdg_wave.h +++ b/krita/plugins/filters/wavefilter/kis_wdg_wave.h @@ -29,8 +29,9 @@ class KisFilter; class KisWdgWave : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisWdgWave(KisFilter* nfilter, QWidget* parent = 0, const char* name = 0); + KisWdgWave(KisFilter* nfilter, TQWidget* tqparent = 0, const char* name = 0); ~KisWdgWave(); public: inline WdgWaveOptions* widget() { return m_widget; }; diff --git a/krita/plugins/filters/wavefilter/wavefilter.cc b/krita/plugins/filters/wavefilter/wavefilter.cc index af6332bb..00977a84 100644 --- a/krita/plugins/filters/wavefilter/wavefilter.cc +++ b/krita/plugins/filters/wavefilter/wavefilter.cc @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -83,14 +83,14 @@ class KisTriangleWaveCurve : public KisWaveCurve { -KritaWaveFilter::KritaWaveFilter(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaWaveFilter::KritaWaveFilter(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaWaveFilterFactory::instance()); - if (parent->inherits("KisFilterRegistry")) { - KisFilterRegistry * manager = dynamic_cast(parent); + if (tqparent->inherits("KisFilterRegistry")) { + KisFilterRegistry * manager = dynamic_cast(tqparent); manager->add(new KisFilterWave()); } } @@ -103,7 +103,7 @@ KisFilterWave::KisFilterWave() : KisFilter(id(), "other", i18n("&Wave...")) { } -KisFilterConfiguration* KisFilterWave::configuration(QWidget* w) +KisFilterConfiguration* KisFilterWave::configuration(TQWidget* w) { KisWdgWave* wN = dynamic_cast(w); KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1); @@ -112,44 +112,44 @@ KisFilterConfiguration* KisFilterWave::configuration(QWidget* w) config->setProperty("horizontalwavelength", wN->widget()->intHWavelength->value() ); config->setProperty("horizontalshift", wN->widget()->intHShift->value() ); config->setProperty("horizontalamplitude", wN->widget()->intHAmplitude->value() ); - config->setProperty("horizontalshape", wN->widget()->cbHShape->currentItem() ); + config->setProperty("horizontaltqshape", wN->widget()->cbHShape->currentItem() ); config->setProperty("verticalwavelength", wN->widget()->intVWavelength->value() ); config->setProperty("verticalshift", wN->widget()->intVShift->value() ); config->setProperty("verticalamplitude", wN->widget()->intVAmplitude->value() ); - config->setProperty("verticalshape", wN->widget()->cbVShape->currentItem() ); + config->setProperty("verticaltqshape", wN->widget()->cbVShape->currentItem() ); } return config; } -KisFilterConfigWidget * KisFilterWave::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP /*dev*/) +KisFilterConfigWidget * KisFilterWave::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP /*dev*/) { - return new KisWdgWave((KisFilter*)this, (QWidget*)parent, i18n("Configuration of wave filter").ascii()); + return new KisWdgWave((KisFilter*)this, (TQWidget*)tqparent, i18n("Configuration of wave filter").ascii()); } -void KisFilterWave::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const QRect& rect) +void KisFilterWave::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* config, const TQRect& rect) { Q_ASSERT(src != 0); Q_ASSERT(dst != 0); setProgressTotalSteps(rect.width() * rect.height()); - QVariant value; + TQVariant value; int horizontalwavelength = (config && config->getProperty("horizontalwavelength", value)) ? value.toInt() : 50; int horizontalshift = (config && config->getProperty("horizontalshift", value)) ? value.toInt() : 50; int horizontalamplitude = (config && config->getProperty("horizontalamplitude", value)) ? value.toInt() : 4; - int horizontalshape = (config && config->getProperty("horizontalshape", value)) ? value.toInt() : 0; + int horizontaltqshape = (config && config->getProperty("horizontaltqshape", value)) ? value.toInt() : 0; int verticalwavelength = (config && config->getProperty("verticalwavelength", value)) ? value.toInt() : 50; int verticalshift = (config && config->getProperty("verticalshift", value)) ? value.toInt() : 50; int verticalamplitude = (config && config->getProperty("verticalamplitude", value)) ? value.toInt() : 4; - int verticalshape = (config && config->getProperty("verticalshape", value)) ? value.toInt() : 0; + int verticaltqshape = (config && config->getProperty("verticaltqshape", value)) ? value.toInt() : 0; KisRectIteratorPixel dstIt = dst->createRectIterator(rect.x(), rect.y(), rect.width(), rect.height(), true ); KisWaveCurve* verticalcurve; - if(verticalshape == 1) + if(verticaltqshape == 1) verticalcurve = new KisTriangleWaveCurve(verticalamplitude, verticalwavelength, verticalshift); else verticalcurve = new KisSinusoidalWaveCurve(verticalamplitude, verticalwavelength, verticalshift); KisWaveCurve* horizontalcurve; - if(horizontalshape == 1) + if(horizontaltqshape == 1) horizontalcurve = new KisTriangleWaveCurve(horizontalamplitude, horizontalwavelength, horizontalshift); else horizontalcurve = new KisSinusoidalWaveCurve(horizontalamplitude, horizontalwavelength, horizontalshift); diff --git a/krita/plugins/filters/wavefilter/wavefilter.h b/krita/plugins/filters/wavefilter/wavefilter.h index 1eb49c11..d57dfcf3 100644 --- a/krita/plugins/filters/wavefilter/wavefilter.h +++ b/krita/plugins/filters/wavefilter/wavefilter.h @@ -29,7 +29,7 @@ class KisFilterConfigWidget; class KritaWaveFilter : public KParts::Plugin { public: - KritaWaveFilter(QObject *parent, const char *name, const QStringList &); + KritaWaveFilter(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaWaveFilter(); }; @@ -38,7 +38,7 @@ class KisFilterWave : public KisFilter public: KisFilterWave(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect&); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect&); virtual ColorSpaceIndependence colorSpaceIndependence() { return FULLY_INDEPENDENT; }; static inline KisID id() { return KisID("wave", i18n("Wave")); }; virtual bool supportsPainting() { return true; } @@ -46,8 +46,8 @@ class KisFilterWave : public KisFilter virtual bool supportsIncrementalPainting() { return false; } virtual bool supportsAdjustmentLayers() { return false; } public: - virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev); - virtual KisFilterConfiguration* configuration(QWidget*); + virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev); + virtual KisFilterConfiguration* configuration(TQWidget*); }; #endif diff --git a/krita/plugins/filters/wavefilter/wdgwaveoptions.ui b/krita/plugins/filters/wavefilter/wdgwaveoptions.ui index e6bb0416..10fff389 100644 --- a/krita/plugins/filters/wavefilter/wdgwaveoptions.ui +++ b/krita/plugins/filters/wavefilter/wdgwaveoptions.ui @@ -1,6 +1,6 @@ WdgWaveOptions - + WdgWaveOptions @@ -29,7 +29,7 @@ Expanding - + 60 20 @@ -46,14 +46,14 @@ Expanding - + 20 60 - + groupBox1 @@ -64,7 +64,7 @@ unnamed - + textLabel1 @@ -86,7 +86,7 @@ 1000000 - + textLabel2 @@ -108,7 +108,7 @@ 1000000 - + textLabel2_2 @@ -145,7 +145,7 @@ cbHShape - + textLabel1_2 @@ -155,7 +155,7 @@ - + Vertical_wave @@ -166,7 +166,7 @@ unnamed - + textLabel1_3 @@ -188,7 +188,7 @@ 1000000 - + textLabel2_3 @@ -210,7 +210,7 @@ 1000000 - + textLabel2_2_2 @@ -247,7 +247,7 @@ cbVShape - + textLabel1_2_2 @@ -261,7 +261,7 @@ - + knuminput.h knuminput.h diff --git a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc index e23fd3cf..c44a31c8 100644 --- a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc +++ b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc @@ -42,15 +42,15 @@ typedef KGenericFactory DefaultPaintOpsPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritadefaultpaintops, DefaultPaintOpsPluginFactory( "kritacore" ) ) -DefaultPaintOpsPlugin::DefaultPaintOpsPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +DefaultPaintOpsPlugin::DefaultPaintOpsPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(DefaultPaintOpsPluginFactory::instance()); // This is not a gui plugin; only load it when the doc is created. - if ( parent->inherits("KisPaintOpRegistry") ) + if ( tqparent->inherits("KisPaintOpRegistry") ) { - KisPaintOpRegistry * r = dynamic_cast(parent); + KisPaintOpRegistry * r = dynamic_cast(tqparent); // Add hard-coded paint ops. Plugin paintops will add // themselves in the plugin initialization code. r->add ( new KisAirbrushOpFactory ); diff --git a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h index 402ae4a2..d7afb9d0 100644 --- a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h +++ b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h @@ -27,8 +27,9 @@ class DefaultPaintOpsPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - DefaultPaintOpsPlugin(QObject *parent, const char *name, const QStringList &); + DefaultPaintOpsPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~DefaultPaintOpsPlugin(); }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc index 6f2e5cb1..db320bec 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include @@ -59,18 +59,18 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info // // Most graphics apps -- especially the simple ones like Kolourpaint // and the previous version of this routine in Krita took a brush -// shape -- often a simple ellipse -- and filled that shape with a +// tqshape -- often a simple ellipse -- and filled that tqshape with a // random 'spray' of single pixels. // // Other, more advanced graphics apps, like the Gimp or Photoshop, -// take the brush shape and paint just as with the brush paint op, +// take the brush tqshape and paint just as with the brush paint op, // only making the initial dab more transparent, and perhaps adding // extra transparence near the edges. Then, using a timer, when the // cursor stays in place, dab upon dab is positioned in the same // place, which makes the result less and less transparent. // // What I want to do here is create an airbrush that approaches a real -// one. It won't use brush shapes, instead going for the old-fashioned +// one. It won't use brush tqshapes, instead going for the old-fashioned // circle. Depending upon pressure, both the size of the dab and the // rate of paint deposition is determined. The edges of the dab are // more transparent than the center, with perhaps even some fully @@ -91,7 +91,7 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info KisPaintDeviceSP device = m_painter->device(); - // For now: use the current brush shape -- it beats calculating + // For now: use the current brush tqshape -- it beats calculating // ellipes and cones, and it shows the working of the timer. if (!device) return; @@ -103,9 +103,9 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info KisPoint hotSpot = brush->hotSpot(info); KisPoint pt = pos - hotSpot; - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -115,15 +115,15 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info dab = brush->image(device->colorSpace(), info, xFraction, yFraction); } else { - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); - dab = computeDab(mask); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); + dab = computeDab(tqmask); } m_painter->setDab(dab); // Cache dab for future paints in the painter. m_painter->setPressure(info.pressure); // Cache pressure in the current painter. - QRect dabRect = QRect(0, 0, brush->maskWidth(info), brush->maskHeight(info)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(info), brush->tqmaskHeight(info)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -133,10 +133,10 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h index 7e751d3e..805664d7 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h @@ -36,7 +36,7 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("airbrush", i18n("Pixel Airbrush")); } - virtual QString pixmap() { return "airbrush.png"; } + virtual TQString pixmap() { return "airbrush.png"; } }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_brushop.cc b/krita/plugins/paintops/defaultpaintops/kis_brushop.cc index 4a7485e5..360fa66e 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_brushop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_brushop.cc @@ -22,12 +22,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -55,22 +55,22 @@ KisPaintOp * KisBrushOpFactory::createOp(const KisPaintOpSettings *settings, Kis return op; } -KisBrushOpSettings::KisBrushOpSettings(QWidget *parent) - : super(parent) +KisBrushOpSettings::KisBrushOpSettings(TQWidget *tqparent) + : super(tqparent) { - m_optionsWidget = new QWidget(parent, "brush option widget"); - QHBoxLayout * l = new QHBoxLayout(m_optionsWidget); + m_optionsWidget = new TQWidget(tqparent, "brush option widget"); + TQHBoxLayout * l = new TQHBoxLayout(m_optionsWidget); l->setAutoAdd(true); - m_pressureVariation = new QLabel(i18n("Pressure variation: "), m_optionsWidget); - m_size = new QCheckBox(i18n("Size"), m_optionsWidget); + m_pressureVariation = new TQLabel(i18n("Pressure variation: "), m_optionsWidget); + m_size = new TQCheckBox(i18n("Size"), m_optionsWidget); m_size->setChecked(true); - m_opacity = new QCheckBox(i18n("Opacity"), m_optionsWidget); - m_darken = new QCheckBox(i18n("Darken"), m_optionsWidget); + m_opacity = new TQCheckBox(i18n("Opacity"), m_optionsWidget); + m_darken = new TQCheckBox(i18n("Darken"), m_optionsWidget); m_curveControl = new WdgBrushCurveControl(m_optionsWidget); - QToolButton* moreButton = new QToolButton(Qt::UpArrow, m_optionsWidget); - moreButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - moreButton->setMinimumSize(QSize(24,24)); // Bah, I had hoped the above line would make this unneeded - connect(moreButton, SIGNAL(clicked()), this, SLOT(slotCustomCurves())); + TQToolButton* moreButton = new TQToolButton(TQt::UpArrow, m_optionsWidget); + moreButton->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + moreButton->setMinimumSize(TQSize(24,24)); // Bah, I had hoped the above line would make this unneeded + connect(moreButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCustomCurves())); m_customSize = false; m_customOpacity = false; @@ -79,7 +79,7 @@ KisBrushOpSettings::KisBrushOpSettings(QWidget *parent) } void KisBrushOpSettings::slotCustomCurves() { - if (m_curveControl->exec() == QDialog::Accepted) { + if (m_curveControl->exec() == TQDialog::Accepted) { m_customSize = m_curveControl->sizeCheckbox->isChecked(); m_customOpacity = m_curveControl->opacityCheckbox->isChecked(); m_customDarken = m_curveControl->darkenCheckbox->isChecked(); @@ -125,13 +125,13 @@ bool KisBrushOpSettings::varyDarken() const return m_darken->isChecked(); } -KisPaintOpSettings* KisBrushOpFactory::settings(QWidget * parent, const KisInputDevice& inputDevice) +KisPaintOpSettings* KisBrushOpFactory::settings(TQWidget * tqparent, const KisInputDevice& inputDevice) { if (inputDevice == KisInputDevice::mouse()) { // No options for mouse, only tablet devices return 0; } else { - return new KisBrushOpSettings(parent); + return new KisBrushOpSettings(tqparent); } } @@ -180,13 +180,13 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Painting should be implemented according to the following algorithm: // retrieve brush - // if brush == mask - // retrieve mask + // if brush == tqmask + // retrieve tqmask // else if brush == image // retrieve image - // subsample (mask | image) for position -- pos should be double! - // apply filters to mask (colour | gradient | pattern | etc. - // composite filtered mask into temporary layer + // subsample (tqmask | image) for position -- pos should be double! + // apply filters to tqmask (colour | gradient | pattern | etc. + // composite filtered tqmask into temporary layer // composite temporary layer into target layer // @see: doc/brush.txt @@ -207,9 +207,9 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -217,24 +217,24 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPaintDeviceSP dab = 0; - Q_UINT8 origOpacity = m_painter->opacity(); + TQ_UINT8 origOpacity = m_painter->opacity(); KisColor origColor = m_painter->paintColor(); if (m_pressureOpacity) { if (!m_customOpacity) - m_painter->setOpacity((Q_INT8)(origOpacity * info.pressure)); + m_painter->setOpacity((TQ_INT8)(origOpacity * info.pressure)); else - m_painter->setOpacity((Q_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); + m_painter->setOpacity((TQ_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); } if (m_pressureDarken) { KisColor darkened = origColor; // Darken docs aren't really clear about what exactly the amount param can have as value... - Q_UINT32 darkenAmount; + TQ_UINT32 darkenAmount; if (!m_customDarken) - darkenAmount = (Q_INT32)(255 - 75 * info.pressure); + darkenAmount = (TQ_INT32)(255 - 75 * info.pressure); else - darkenAmount = (Q_INT32)(255 - 75 * scaleToCurve(info.pressure, m_darkenCurve)); + darkenAmount = (TQ_INT32)(255 - 75 * scaleToCurve(info.pressure, m_darkenCurve)); darkened.colorSpace()->darken(origColor.data(), darkened.data(), darkenAmount, false, 0.0, 1); @@ -245,15 +245,15 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab = brush->image(device->colorSpace(), adjustedInfo, xFraction, yFraction); } else { - KisAlphaMaskSP mask = brush->mask(adjustedInfo, xFraction, yFraction); - dab = computeDab(mask); + KisAlphaMaskSP tqmask = brush->tqmask(adjustedInfo, xFraction, yFraction); + dab = computeDab(tqmask); } m_painter->setPressure(adjustedInfo.pressure); - QRect dabRect = QRect(0, 0, brush->maskWidth(adjustedInfo), - brush->maskHeight(adjustedInfo)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(adjustedInfo), + brush->tqmaskHeight(adjustedInfo)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -263,10 +263,10 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_brushop.h b/krita/plugins/paintops/defaultpaintops/kis_brushop.h index ecaf3ad2..6475b3d7 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_brushop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_brushop.h @@ -25,9 +25,9 @@ #include "kis_paintop.h" -class QWidget; -class QCheckBox; -class QLabel; +class TQWidget; +class TQCheckBox; +class TQLabel; class KisPoint; class KisPainter; class KCurve; @@ -41,15 +41,16 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("paintbrush", i18n("Pixel Brush")); } - virtual QString pixmap() { return "paintbrush.png"; } - virtual KisPaintOpSettings *settings(QWidget * parent, const KisInputDevice& inputDevice); + virtual TQString pixmap() { return "paintbrush.png"; } + virtual KisPaintOpSettings *settings(TQWidget * tqparent, const KisInputDevice& inputDevice); }; -class KisBrushOpSettings : public QObject, public KisPaintOpSettings { +class KisBrushOpSettings : public TQObject, public KisPaintOpSettings { Q_OBJECT + TQ_OBJECT typedef KisPaintOpSettings super; public: - KisBrushOpSettings(QWidget *parent); + KisBrushOpSettings(TQWidget *tqparent); bool varySize() const; bool varyOpacity() const; @@ -62,16 +63,16 @@ public: const double* opacityCurve() const { return m_opacityCurve; } const double* darkenCurve() const { return m_darkenCurve; } - virtual QWidget *widget() const { return m_optionsWidget; } + virtual TQWidget *widget() const { return m_optionsWidget; } private slots: void slotCustomCurves(); private: void transferCurve(KCurve* curve, double* target); - QWidget *m_optionsWidget; - QLabel * m_pressureVariation; - QCheckBox * m_size; - QCheckBox * m_opacity; - QCheckBox * m_darken; + TQWidget *m_optionsWidget; + TQLabel * m_pressureVariation; + TQCheckBox * m_size; + TQCheckBox * m_opacity; + TQCheckBox * m_darken; WdgBrushCurveControl* m_curveControl; bool m_customSize; diff --git a/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc b/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc index ae55f54f..72bf9e66 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include diff --git a/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui b/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui index 7682c12f..f6021ecc 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui +++ b/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui @@ -1,6 +1,6 @@ WdgBrushCurveControl - + WdgBrushCurveControl @@ -22,11 +22,11 @@ unnamed - + tabWidget - + Widget8 @@ -37,15 +37,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + sizeCheckbox @@ -70,7 +70,7 @@ - + Widget9 @@ -81,15 +81,15 @@ unnamed - + - layout3 + tqlayout3 unnamed - + opacityCheckbox @@ -114,7 +114,7 @@ - + TabPage @@ -125,15 +125,15 @@ unnamed - + - layout5 + tqlayout5 unnamed - + darkenCheckbox @@ -159,7 +159,7 @@ - + Layout1 @@ -183,14 +183,14 @@ Expanding - + 20 20 - + buttonOk @@ -207,7 +207,7 @@ true - + buttonCancel @@ -262,7 +262,7 @@ reject() - + kcurve.h kcurve.h diff --git a/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc b/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc index 79d00b96..139ed51d 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc @@ -22,7 +22,7 @@ #include "kis_duplicateop.h" -#include +#include #include @@ -108,9 +108,9 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -125,19 +125,19 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf dab->convertTo(KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } else { - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); - dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); + dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } m_painter->setPressure(info.pressure); KisPoint srcPointF = pt - m_painter->duplicateOffset(); - QPoint srcPoint = QPoint(x - static_cast(m_painter->duplicateOffset().x()), - y - static_cast(m_painter->duplicateOffset().y())); + TQPoint srcPoint = TQPoint(x - static_cast(m_painter->duplicateOffset().x()), + y - static_cast(m_painter->duplicateOffset().y())); - Q_INT32 sw = dab->extent().width(); - Q_INT32 sh = dab->extent().height(); + TQ_INT32 sw = dab->extent().width(); + TQ_INT32 sh = dab->extent().height(); if (srcPoint.x() < 0 ) srcPoint.setX(0); @@ -169,7 +169,7 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf } // First look for the grid corresponding to the start point KisSubPerspectiveGrid* subGridStart = *device->image()->perspectiveGrid()->begin();//device->image()->perspectiveGrid()->gridAt(KisPoint(srcPoint.x() +hotSpot.x(),srcPoint.y() +hotSpot.y())); - QRect r = QRect(0,0, device->image()->width(), device->image()->height()); + TQRect r = TQRect(0,0, device->image()->width(), device->image()->height()); #if 1 if(subGridStart) @@ -236,9 +236,9 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf if(heal) { - Q_UINT16 dataDevice[4]; - Q_UINT16 dataSrcDev[4]; - QMemArray matrix ( 3 * sw * sh ); + TQ_UINT16 dataDevice[4]; + TQ_UINT16 dataSrcDev[4]; + TQMemArray matrix ( 3 * sw * sh ); // First divide KisColorSpace* deviceCs = device->colorSpace(); KisHLineIteratorPixel deviceIt = device->createHLineIterator(x, y, sw, false ); @@ -248,12 +248,12 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf { for(int i= 0; !srcDevIt.isDone(); i++) { - deviceCs->toLabA16(deviceIt.rawData(), (Q_UINT8*)dataDevice, 1); - deviceCs->toLabA16(srcDevIt.rawData(), (Q_UINT8*)dataSrcDev, 1); + deviceCs->toLabA16(deviceIt.rawData(), (TQ_UINT8*)dataDevice, 1); + deviceCs->toLabA16(srcDevIt.rawData(), (TQ_UINT8*)dataSrcDev, 1); // Division for( int k = 0; k < 3; k++) { - matrixIt[k] = dataDevice[k] / (double)QMAX(dataSrcDev [k], 1); + matrixIt[k] = dataDevice[k] / (double)TQMAX(dataSrcDev [k], 1); } ++deviceIt; ++srcDevIt; @@ -266,7 +266,7 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf { int iter = 0; double err; - QMemArray solution ( 3 * sw * sh ); + TQMemArray solution ( 3 * sw * sh ); do { err = minimizeEnergy(&matrix[0], &solution[0],sw,sh); memcpy (&matrix[0], &solution[0], sw * sh * 3 * sizeof(double)); @@ -282,14 +282,14 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf { for(int i= 0; !srcDevIt.isDone(); i++) { - deviceCs->toLabA16(deviceIt.rawData(), (Q_UINT8*)dataDevice, 1); - deviceCs->toLabA16(srcDevIt.rawData(), (Q_UINT8*)dataSrcDev, 1); + deviceCs->toLabA16(deviceIt.rawData(), (TQ_UINT8*)dataDevice, 1); + deviceCs->toLabA16(srcDevIt.rawData(), (TQ_UINT8*)dataSrcDev, 1); // Multiplication for( int k = 0; k < 3; k++) { - dataSrcDev[k] = (int)CLAMP( matrixIt[k] * QMAX( dataSrcDev[k], 1), 0, 65535 ); + dataSrcDev[k] = (int)CLAMP( matrixIt[k] * TQMAX( dataSrcDev[k], 1), 0, 65535 ); } - deviceCs->fromLabA16((Q_UINT8*)dataSrcDev, srcDevIt.rawData(), 1); + deviceCs->fromLabA16((TQ_UINT8*)dataSrcDev, srcDevIt.rawData(), 1); ++deviceIt; ++srcDevIt; matrixIt +=3; @@ -312,8 +312,8 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf OPACITY_OPAQUE, 0, 0, sw, sh); copyPainter.end(); - QRect dabRect = QRect(0, 0, brush->maskWidth(info), brush->maskHeight(info)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(info), brush->tqmaskHeight(info)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -323,8 +323,8 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; sw = dstRect.width(); sh = dstRect.height(); diff --git a/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc b/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc index 4fe46af2..cbf67a15 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include @@ -86,33 +86,33 @@ void KisEraseOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPoint hotSpot = brush->hotSpot(info); KisPoint pt = pos - hotSpot; - Q_INT32 destX; + TQ_INT32 destX; double xFraction; - Q_INT32 destY; + TQ_INT32 destY; double yFraction; splitCoordinate(pt.x(), &destX, &xFraction); splitCoordinate(pt.y(), &destY, &yFraction); - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); KisPaintDeviceSP dab = new KisPaintDevice(device->colorSpace(), "erase op dab"); Q_CHECK_PTR(dab); - Q_INT32 maskWidth = mask->width(); - Q_INT32 maskHeight = mask->height(); + TQ_INT32 tqmaskWidth = tqmask->width(); + TQ_INT32 tqmaskHeight = tqmask->height(); - QRect dstRect; + TQRect dstRect; - KisRectIteratorPixel it = dab->createRectIterator(0, 0, maskWidth, maskHeight, true); + KisRectIteratorPixel it = dab->createRectIterator(0, 0, tqmaskWidth, tqmaskHeight, true); KisColorSpace* cs = dab->colorSpace(); while (!it.isDone()) { - cs->setAlpha(it.rawData(), Q_UINT8_MAX - mask->alphaAt(it.x(), it.y()), 1); + cs->setAlpha(it.rawData(), TQ_UINT8_MAX - tqmask->alphaAt(it.x(), it.y()), 1); ++it; } - QRect dabRect = QRect(0, 0, maskWidth, maskHeight); - dstRect = QRect(destX, destY, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, tqmaskWidth, tqmaskHeight); + dstRect = TQRect(destX, destY, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -122,10 +122,10 @@ void KisEraseOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - destX; - Q_INT32 sy = dstRect.y() - destY; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - destX; + TQ_INT32 sy = dstRect.y() - destY; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), COMPOSITE_ERASE, dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_eraseop.h b/krita/plugins/paintops/defaultpaintops/kis_eraseop.h index c15d11b3..8c88a122 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_eraseop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_eraseop.h @@ -36,7 +36,7 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("eraser", i18n("Pixel Eraser")); } - virtual QString pixmap() { return "eraser.png"; } + virtual TQString pixmap() { return "eraser.png"; } }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_penop.cc b/krita/plugins/paintops/defaultpaintops/kis_penop.cc index d93a75d4..0fcbca02 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_penop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_penop.cc @@ -21,7 +21,7 @@ */ -#include +#include #include @@ -70,8 +70,8 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPoint hotSpot = brush->hotSpot(info); KisPoint pt = pos - hotSpot; - Q_INT32 x = pt.roundX(); - Q_INT32 y = pt.roundY(); + TQ_INT32 x = pt.roundX(); + TQ_INT32 y = pt.roundY(); KisPaintDeviceSP dab = 0; if (brush->brushType() == IMAGE || @@ -79,14 +79,14 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab = brush->image(device->colorSpace(), info); } else { - // Compute mask without sub-pixel positioning - KisAlphaMaskSP mask = brush->mask(info); - dab = computeDab(mask); + // Compute tqmask without sub-pixel positioning + KisAlphaMaskSP tqmask = brush->tqmask(info); + dab = computeDab(tqmask); } m_painter->setPressure(info.pressure); - QRect dabRect = QRect(0, 0, brush->maskWidth(info), brush->maskHeight(info)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(info), brush->tqmaskHeight(info)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -104,7 +104,7 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisRectIteratorPixel pixelIt = dab->createRectIterator(dabRect.x(), dabRect.y(), dabRect.width(), dabRect.height(), true); while (!pixelIt.isDone()) { - Q_UINT8 alpha = cs->getAlpha(pixelIt.rawData()); + TQ_UINT8 alpha = cs->getAlpha(pixelIt.rawData()); if (alpha < (4 * OPACITY_OPAQUE) / 10) { cs->setAlpha(pixelIt.rawData(), OPACITY_TRANSPARENT, 1); @@ -115,10 +115,10 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) ++pixelIt; } - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_penop.h b/krita/plugins/paintops/defaultpaintops/kis_penop.h index f548bed5..ac03a501 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_penop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_penop.h @@ -23,8 +23,8 @@ #ifndef KIS_PENOP_H_ #define KIS_PENOP_H_ -#include -#include +#include +#include #include "kis_paintop.h" class KisPoint; @@ -38,7 +38,7 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id(){ return KisID("pen", i18n("Pixel Pencil")); } - virtual QString pixmap() { return "pencil.png"; } + virtual TQString pixmap() { return "pencil.png"; } }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc index a339c062..2e50bebb 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc @@ -20,14 +20,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -56,30 +56,30 @@ KisPaintOp * KisSmudgeOpFactory::createOp(const KisPaintOpSettings *settings, Ki return op; } -KisSmudgeOpSettings::KisSmudgeOpSettings(QWidget *parent, bool isTablet) - : super(parent) +KisSmudgeOpSettings::KisSmudgeOpSettings(TQWidget *tqparent, bool isTablet) + : super(tqparent) { - m_optionsWidget = new QWidget(parent, "brush option widget"); - QHBoxLayout * l = new QHBoxLayout(m_optionsWidget); + m_optionsWidget = new TQWidget(tqparent, "brush option widget"); + TQHBoxLayout * l = new TQHBoxLayout(m_optionsWidget); l->setAutoAdd(true); - m_rateLabel = new QLabel(i18n("Rate: "), m_optionsWidget); - m_rateSlider = new QSlider(0,100,1, 50, Qt::Horizontal, m_optionsWidget); + m_rateLabel = new TQLabel(i18n("Rate: "), m_optionsWidget); + m_rateSlider = new TQSlider(0,100,1, 50, Qt::Horizontal, m_optionsWidget); if(isTablet) { - m_pressureVariation = new QLabel(i18n("Pressure variation: "), m_optionsWidget); - m_size = new QCheckBox(i18n("Size"), m_optionsWidget); + m_pressureVariation = new TQLabel(i18n("Pressure variation: "), m_optionsWidget); + m_size = new TQCheckBox(i18n("Size"), m_optionsWidget); m_size->setChecked(true); - m_opacity = new QCheckBox(i18n("Opacity"), m_optionsWidget); - m_rate = new QCheckBox(i18n("Rate"), m_optionsWidget); + m_opacity = new TQCheckBox(i18n("Opacity"), m_optionsWidget); + m_rate = new TQCheckBox(i18n("Rate"), m_optionsWidget); m_curveControl = new WdgBrushCurveControl(m_optionsWidget); // We abuse the darken curve here for rate m_curveControl->tabWidget->setTabLabel(m_curveControl->tabWidget->page(2), i18n("Rate")); m_curveControl->tabWidget->setTabToolTip(m_curveControl->tabWidget->page(2), i18n("Modifies the rate. Bottom is 0% of the rate top is 100% of the original rate.")); - QToolButton* moreButton = new QToolButton(Qt::UpArrow, m_optionsWidget); - moreButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - moreButton->setMinimumSize(QSize(24,24)); // Bah, I had hoped the above line would make this unneeded - connect(moreButton, SIGNAL(clicked()), this, SLOT(slotCustomCurves())); + TQToolButton* moreButton = new TQToolButton(TQt::UpArrow, m_optionsWidget); + moreButton->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + moreButton->setMinimumSize(TQSize(24,24)); // Bah, I had hoped the above line would make this unneeded + connect(moreButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCustomCurves())); } else { m_pressureVariation = 0; m_size = 0; @@ -95,7 +95,7 @@ KisSmudgeOpSettings::KisSmudgeOpSettings(QWidget *parent, bool isTablet) } void KisSmudgeOpSettings::slotCustomCurves() { - if (m_curveControl->exec() == QDialog::Accepted) { + if (m_curveControl->exec() == TQDialog::Accepted) { m_customRate = m_curveControl->darkenCheckbox->isChecked(); m_customSize = m_curveControl->sizeCheckbox->isChecked(); m_customOpacity = m_curveControl->opacityCheckbox->isChecked(); @@ -145,13 +145,13 @@ bool KisSmudgeOpSettings::varyOpacity() const return m_opacity ? m_opacity->isChecked() : false; } -KisPaintOpSettings* KisSmudgeOpFactory::settings(QWidget * parent, const KisInputDevice& inputDevice) +KisPaintOpSettings* KisSmudgeOpFactory::settings(TQWidget * tqparent, const KisInputDevice& inputDevice) { if (inputDevice == KisInputDevice::mouse()) { // No options for mouse, only tablet devices - return new KisSmudgeOpSettings(parent, false); + return new KisSmudgeOpSettings(tqparent, false); } else { - return new KisSmudgeOpSettings(parent, true); + return new KisSmudgeOpSettings(tqparent, true); } } @@ -205,13 +205,13 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Painting should be implemented according to the following algorithm: // retrieve brush - // if brush == mask - // retrieve mask + // if brush == tqmask + // retrieve tqmask // else if brush == image // retrieve image - // subsample (mask | image) for position -- pos should be double! - // apply filters to mask (colour | gradient | pattern | etc. - // composite filtered mask into temporary layer + // subsample (tqmask | image) for position -- pos should be double! + // apply filters to tqmask (colour | gradient | pattern | etc. + // composite filtered tqmask into temporary layer // composite temporary layer into target layer // @see: doc/brush.txt @@ -232,9 +232,9 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -242,13 +242,13 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPaintDeviceSP dab = 0; - Q_UINT8 origOpacity = m_painter->opacity(); + TQ_UINT8 origOpacity = m_painter->opacity(); if (m_pressureOpacity) { if (!m_customOpacity) - m_painter->setOpacity((Q_INT8)(origOpacity * info.pressure)); + m_painter->setOpacity((TQ_INT8)(origOpacity * info.pressure)); else - m_painter->setOpacity((Q_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); + m_painter->setOpacity((TQ_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); } if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) { @@ -256,16 +256,16 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab->convertTo(KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } else { - KisAlphaMaskSP mask = brush->mask(adjustedInfo, xFraction, yFraction); - dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); + KisAlphaMaskSP tqmask = brush->tqmask(adjustedInfo, xFraction, yFraction); + dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } m_painter->setPressure(adjustedInfo.pressure); - QRect dabRect = QRect(0, 0, brush->maskWidth(adjustedInfo), - brush->maskHeight(adjustedInfo)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(adjustedInfo), + brush->tqmaskHeight(adjustedInfo)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -273,8 +273,8 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dstRect &= image->bounds(); } - Q_INT32 sw = dab->extent().width(); - Q_INT32 sh = dab->extent().height(); + TQ_INT32 sw = dab->extent().width(); + TQ_INT32 sh = dab->extent().height(); KisPainter copyPainter(m_srcdev); int opacity = OPACITY_OPAQUE; @@ -283,9 +283,9 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) opacity = rate(); if (m_pressureRate) { if (m_customRate) { - opacity = CLAMP((Q_UINT8)(double(opacity) * scaleToCurve(info.pressure, m_rateCurve)), OPACITY_TRANSPARENT, OPACITY_OPAQUE); + opacity = CLAMP((TQ_UINT8)(double(opacity) * scaleToCurve(info.pressure, m_rateCurve)), OPACITY_TRANSPARENT, OPACITY_OPAQUE); } else { - opacity = CLAMP((Q_UINT8)(double(opacity) * info.pressure), OPACITY_TRANSPARENT, OPACITY_OPAQUE); + opacity = CLAMP((TQ_UINT8)(double(opacity) * info.pressure), OPACITY_TRANSPARENT, OPACITY_OPAQUE); } } opacity = OPACITY_OPAQUE - opacity; @@ -306,8 +306,8 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; sw = dstRect.width(); sh = dstRect.height(); diff --git a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h index 26a82e07..d9c8872d 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h @@ -20,12 +20,12 @@ #define KIS_SMUDGEOP_H_ #include "kis_paintop.h" -#include +#include -class QWidget; -class QCheckBox; -class QLabel; -class QSlider; +class TQWidget; +class TQCheckBox; +class TQLabel; +class TQSlider; class KisPoint; class KisPainter; class KCurve; @@ -39,15 +39,16 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("smudge", i18n("Smudge Brush")); } - virtual QString pixmap() { return "paintbrush.png"; } - virtual KisPaintOpSettings *settings(QWidget * parent, const KisInputDevice& inputDevice); + virtual TQString pixmap() { return "paintbrush.png"; } + virtual KisPaintOpSettings *settings(TQWidget * tqparent, const KisInputDevice& inputDevice); }; -class KisSmudgeOpSettings : public QObject, public KisPaintOpSettings { +class KisSmudgeOpSettings : public TQObject, public KisPaintOpSettings { Q_OBJECT + TQ_OBJECT typedef KisPaintOpSettings super; public: - KisSmudgeOpSettings(QWidget *parent, bool isTablet); + KisSmudgeOpSettings(TQWidget *tqparent, bool isTablet); int rate() const; bool varyRate() const; @@ -61,18 +62,18 @@ public: const double* sizeCurve() const { return m_sizeCurve; } const double* opacityCurve() const { return m_opacityCurve; } - virtual QWidget *widget() const { return m_optionsWidget; } + virtual TQWidget *widget() const { return m_optionsWidget; } private slots: void slotCustomCurves(); private: void transferCurve(KCurve* curve, double* target); - QWidget *m_optionsWidget; - QLabel* m_rateLabel; - QSlider* m_rateSlider; - QLabel * m_pressureVariation; - QCheckBox * m_rate; - QCheckBox * m_size; - QCheckBox * m_opacity; + TQWidget *m_optionsWidget; + TQLabel* m_rateLabel; + TQSlider* m_rateSlider; + TQLabel * m_pressureVariation; + TQCheckBox * m_rate; + TQCheckBox * m_size; + TQCheckBox * m_opacity; WdgBrushCurveControl* m_curveControl; bool m_customSize; diff --git a/krita/plugins/tools/defaulttools/default_tools.cc b/krita/plugins/tools/defaulttools/default_tools.cc index c4edcfb3..a281a52c 100644 --- a/krita/plugins/tools/defaulttools/default_tools.cc +++ b/krita/plugins/tools/defaulttools/default_tools.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -56,14 +56,14 @@ typedef KGenericFactory DefaultToolsFactory; K_EXPORT_COMPONENT_FACTORY( kritadefaulttools, DefaultToolsFactory( "krita" ) ) -DefaultTools::DefaultTools(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +DefaultTools::DefaultTools(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(DefaultToolsFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add(new KisToolFillFactory()); r->add(new KisToolGradientFactory()); diff --git a/krita/plugins/tools/defaulttools/default_tools.h b/krita/plugins/tools/defaulttools/default_tools.h index 0088263d..b4c6d4de 100644 --- a/krita/plugins/tools/defaulttools/default_tools.h +++ b/krita/plugins/tools/defaulttools/default_tools.h @@ -34,8 +34,9 @@ class DefaultTools : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - DefaultTools(QObject *parent, const char *name, const QStringList &); + DefaultTools(TQObject *tqparent, const char *name, const TQStringList &); virtual ~DefaultTools(); }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_brush.cc b/krita/plugins/tools/defaulttools/kis_tool_brush.cc index a65795d1..3a931bfb 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_brush.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_brush.cc @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -52,10 +52,10 @@ KisToolBrush::KisToolBrush() setName("tool_brush"); setCursor(KisCursor::load("tool_freehand_cursor.png", 5, 5)); m_rate = 100; // Conveniently hardcoded for now - m_timer = new QTimer(this); + m_timer = new TQTimer(this); Q_CHECK_PTR(m_timer); - connect(m_timer, SIGNAL(timeout()), this, SLOT(timeoutPaint())); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeoutPaint())); } @@ -114,8 +114,8 @@ void KisToolBrush::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Brush"), - "tool_freehand", Qt::Key_B, this, - SLOT(activate()), collection, + "tool_freehand", TQt::Key_B, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw freehand")); m_action->setExclusiveGroup("tools"); @@ -130,14 +130,14 @@ void KisToolBrush::move(KisMoveEvent *e) { paintOutline(e->pos()); } -void KisToolBrush::leave(QEvent */*e*/) { +void KisToolBrush::leave(TQEvent */*e*/) { m_subject->canvasController()->kiscanvas()->update(); // remove the outline } void KisToolBrush::slotSetPaintingMode( int mode ) { - if (mode == QButton::On) { + if (mode == TQButton::On) { // Direct painting m_paintIncremental = true; } @@ -147,14 +147,14 @@ void KisToolBrush::slotSetPaintingMode( int mode ) } -QWidget* KisToolBrush::createOptionWidget(QWidget* parent) +TQWidget* KisToolBrush::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); - m_chkDirect = new QCheckBox(i18n("Paint direct"), widget, "chkDirect"); + TQWidget *widget = super::createOptionWidget(tqparent); + m_chkDirect = new TQCheckBox(i18n("Paint direct"), widget, "chkDirect"); m_chkDirect->setChecked(true); - connect(m_chkDirect, SIGNAL(stateChanged(int)), this, SLOT(slotSetPaintingMode(int))); + connect(m_chkDirect, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotSetPaintingMode(int))); - m_optionLayout = new QGridLayout(widget, 3, 2, 0, 6); + m_optionLayout = new TQGridLayout(widget, 3, 2, 0, 6); Q_CHECK_PTR(m_optionLayout); super::addOptionWidgetLayout(m_optionLayout); diff --git a/krita/plugins/tools/defaulttools/kis_tool_brush.h b/krita/plugins/tools/defaulttools/kis_tool_brush.h index 0024213d..a23e8d12 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_brush.h +++ b/krita/plugins/tools/defaulttools/kis_tool_brush.h @@ -25,16 +25,17 @@ #include "kis_tool_factory.h" #include "koffice_export.h" -class QTimer; +class TQTimer; class KisPoint; -class QHBoxLayout; -class QPainter; -class QRect; -class QCheckBox; -class QGridLayout; +class TQHBoxLayout; +class TQPainter; +class TQRect; +class TQCheckBox; +class TQGridLayout; class KRITACORE_EXPORT KisToolBrush : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -43,15 +44,15 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 0; } - QWidget* createOptionWidget(QWidget* parent); + virtual TQ_UINT32 priority() { return 0; } + TQWidget* createOptionWidget(TQWidget* tqparent); protected: virtual void initPaint(KisEvent *e); virtual void endPaint(); virtual void move(KisMoveEvent *e); - virtual void leave(QEvent *e); + virtual void leave(TQEvent *e); private slots: @@ -60,10 +61,10 @@ private slots: private: - Q_INT32 m_rate; - QTimer * m_timer; - QGridLayout* m_optionLayout; - QCheckBox * m_chkDirect; + TQ_INT32 m_rate; + TQTimer * m_timer; + TQGridLayout* m_optionLayout; + TQCheckBox * m_chkDirect; }; class KisToolBrushFactory : public KisToolFactory { diff --git a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc index ae553952..77020342 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc @@ -18,16 +18,16 @@ */ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include -#include +#include #include #include "kis_layer.h" @@ -77,7 +77,7 @@ void KisToolColorPicker::update(KisCanvasSubject *subject) void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) { if (m_subject) { - if (e->button() != QMouseEvent::LeftButton && e->button() != QMouseEvent::RightButton) + if (e->button() != TQMouseEvent::LeftButton && e->button() != TQMouseEvent::RightButton) return; KisImageSP img; @@ -102,9 +102,9 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) } } - QPoint pos = QPoint(e->pos().floorX(), e->pos().floorY()); + TQPoint pos = TQPoint(e->pos().floorX(), e->pos().floorY()); - if (!img->bounds().contains(pos)) { + if (!img->bounds().tqcontains(pos)) { return; } @@ -121,9 +121,9 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) KisColorSpace* cs = dev->colorSpace(); int pixelSize = cs->pixelSize(); - Q_UINT8* data = new Q_UINT8[pixelSize]; - Q_UINT8** pixels = new Q_UINT8*[counts[m_radius]]; - Q_UINT8* weights = new Q_UINT8[counts[m_radius]]; + TQ_UINT8* data = new TQ_UINT8[pixelSize]; + TQ_UINT8** pixels = new TQ_UINT8*[counts[m_radius]]; + TQ_UINT8* weights = new TQ_UINT8[counts[m_radius]]; int i = 0; // dummy init @@ -133,7 +133,7 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) if (x*x + y*y < m_radius * m_radius) { iter = dev->createHLineIterator(pos.x() + x, pos.y() + y, 1, false); - pixels[i] = new Q_UINT8[pixelSize]; + pixels[i] = new TQ_UINT8[pixelSize]; memcpy(pixels[i], iter.rawData(), pixelSize); if (x == 0 && y == 0) { @@ -151,7 +151,7 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) } } // Weird, I can't do that directly :/ - const Q_UINT8** cpixels = const_cast(pixels); + const TQ_UINT8** cpixels = const_cast(pixels); cs->mixColors(cpixels, weights, counts[m_radius], data); m_pickedColor = KisColor(data, cs); @@ -164,7 +164,7 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) displayPickedColor(); if (m_updateColor) { - if (e->button() == QMouseEvent::LeftButton) + if (e->button() == TQMouseEvent::LeftButton) m_subject->setFGColor(m_pickedColor); else m_subject->setBGColor(m_pickedColor); @@ -173,14 +173,14 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) if (m_addPalette) { // Convert to RGB to add to palette, we ought to have our own format :( KisPaletteEntry ent; - ent.color = m_pickedColor.toQColor(); + ent.color = m_pickedColor.toTQColor(); // We don't ask for a name, too intrusive here KisPalette* palette = m_palettes.at(m_optionsWidget-> cmbPalette->currentItem()); palette->add(ent); if (!palette->save()) { - KMessageBox::error(0, i18n("Cannot write to palette file %1. Maybe it is read-only.").arg(palette->filename()), i18n("Palette")); + KMessageBox::error(0, i18n("Cannot write to palette file %1. Maybe it is read-only.").tqarg(palette->filename()), i18n("Palette")); } } } @@ -190,19 +190,19 @@ void KisToolColorPicker::displayPickedColor() { if (m_pickedColor.data() && m_optionsWidget) { - QValueVector channels = m_pickedColor.colorSpace()->channels(); + TQValueVector channels = m_pickedColor.colorSpace()->channels(); m_optionsWidget->listViewChannels->clear(); for (int i = channels.count() - 1; i >= 0 ; --i) { - QString channelValueText; + TQString channelValueText; if (m_normaliseValues) { - channelValueText = i18n("%1%").arg(m_pickedColor.colorSpace()->normalisedChannelValueText(m_pickedColor.data(), i)); + channelValueText = i18n("%1%").tqarg(m_pickedColor.colorSpace()->normalisedChannelValueText(m_pickedColor.data(), i)); } else { channelValueText = m_pickedColor.colorSpace()->channelValueText(m_pickedColor.data(), i); } - m_optionsWidget->listViewChannels->insertItem(new QListViewItem(m_optionsWidget->listViewChannels, + m_optionsWidget->listViewChannels->insertItem(new TQListViewItem(m_optionsWidget->listViewChannels, channels[i]->name(), channelValueText)); } @@ -214,16 +214,16 @@ void KisToolColorPicker::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Color Picker"), "tool_colorpicker", Qt::Key_P, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Color Picker"), "tool_colorpicker", TQt::Key_P, this, TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Color picker")); m_action->setExclusiveGroup("tools"); m_ownAction = true; } } -QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) +TQWidget* KisToolColorPicker::createOptionWidget(TQWidget* tqparent) { - m_optionsWidget = new ColorPickerOptionsWidget(parent); + m_optionsWidget = new ColorPickerOptionsWidget(tqparent); m_optionsWidget->cbUpdateCurrentColour->setChecked(m_updateColor); @@ -235,12 +235,12 @@ QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) m_optionsWidget->listViewChannels->setSorting(-1); - connect(m_optionsWidget->cbUpdateCurrentColour, SIGNAL(toggled(bool)), SLOT(slotSetUpdateColor(bool))); - connect(m_optionsWidget->cbNormaliseValues, SIGNAL(toggled(bool)), SLOT(slotSetNormaliseValues(bool))); - connect(m_optionsWidget->cbPalette, SIGNAL(toggled(bool)), - SLOT(slotSetAddPalette(bool))); - connect(m_optionsWidget->radius, SIGNAL(valueChanged(int)), - SLOT(slotChangeRadius(int))); + connect(m_optionsWidget->cbUpdateCurrentColour, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetUpdateColor(bool))); + connect(m_optionsWidget->cbNormaliseValues, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetNormaliseValues(bool))); + connect(m_optionsWidget->cbPalette, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotSetAddPalette(bool))); + connect(m_optionsWidget->radius, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChangeRadius(int))); KisResourceServerBase* srv = KisResourceServerRegistry::instance()->get("PaletteServer"); @@ -248,7 +248,7 @@ QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) return m_optionsWidget; } - QValueList palettes = srv->resources(); + TQValueList palettes = srv->resources(); for(uint i = 0; i < palettes.count(); i++) { KisPalette* palette = dynamic_cast(*palettes.at(i)); @@ -258,12 +258,12 @@ QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) } } - connect(srv, SIGNAL(resourceAdded(KisResource*)), this, SLOT(slotAddPalette(KisResource*))); + connect(srv, TQT_SIGNAL(resourceAdded(KisResource*)), this, TQT_SLOT(slotAddPalette(KisResource*))); return m_optionsWidget; } -QWidget* KisToolColorPicker::optionWidget() +TQWidget* KisToolColorPicker::optionWidget() { return m_optionsWidget; } diff --git a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h index 2834b8c6..ab59ef17 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h +++ b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h @@ -22,7 +22,7 @@ #include "kis_tool_non_paint.h" #include "kis_tool_factory.h" -#include "qvaluevector.h" +#include "tqvaluevector.h" class ColorPickerOptionsWidget; class KisResource; @@ -31,6 +31,7 @@ class KisPalette; class KisToolColorPicker : public KisToolNonPaint { Q_OBJECT + TQ_OBJECT typedef KisToolNonPaint super; public: @@ -41,10 +42,10 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); virtual void buttonPress(KisButtonPressEvent *e); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } public slots: void slotSetUpdateColor(bool); @@ -64,7 +65,7 @@ private: ColorPickerOptionsWidget *m_optionsWidget; KisCanvasSubject *m_subject; - QValueVector m_palettes; + TQValueVector m_palettes; }; class KisToolColorPickerFactory : public KisToolFactory { diff --git a/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc b/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc index 71678e6f..bd03245d 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -46,7 +46,7 @@ #include "kis_boundary_painter.h" KisToolDuplicate::KisToolDuplicate() - : super(i18n("Duplicate Brush")), m_isOffsetNotUptodate(true), m_position(QPoint(-1,-1)) + : super(i18n("Duplicate Brush")), m_isOffsetNotUptodate(true), m_position(TQPoint(-1,-1)) { setName("tool_duplicate"); m_subject = 0; @@ -59,7 +59,7 @@ KisToolDuplicate::~KisToolDuplicate() void KisToolDuplicate::activate() { - m_position = QPoint(-1,-1); + m_position = TQPoint(-1,-1); super::activate(); if( m_subject->currentImg()->perspectiveGrid()->countSubGrids() != 1 ) { @@ -76,7 +76,7 @@ void KisToolDuplicate::buttonPress(KisButtonPressEvent *e) m_position = e->pos(); m_isOffsetNotUptodate = true; } else { - if (m_position != QPoint(-1, -1)) { + if (m_position != TQPoint(-1, -1)) { super::buttonPress(e); } } @@ -89,8 +89,8 @@ void KisToolDuplicate::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Duplicate Brush"), - "tool_duplicate", Qt::Key_C, this, - SLOT(activate()), collection, + "tool_duplicate", TQt::Key_C, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Duplicate parts of the image. Shift-click to select the point to duplicate from to begin.")); m_action->setExclusiveGroup("tools"); @@ -100,7 +100,7 @@ void KisToolDuplicate::setup(KActionCollection *collection) void KisToolDuplicate::initPaint(KisEvent *e) { - if( m_position != QPoint(-1,-1)) + if( m_position != TQPoint(-1,-1)) { if(m_isOffsetNotUptodate) { @@ -124,10 +124,10 @@ void KisToolDuplicate::move(KisMoveEvent *e) { // Paint the outline where we will (or are) copying from - if( m_position == QPoint(-1,-1) ) + if( m_position == TQPoint(-1,-1) ) return; - QPoint srcPos; + TQPoint srcPos; if (m_mode == PAINT) { // if we are in perspective correction mode, update the offset when moving if(m_perspectiveCorrection->isChecked()) @@ -147,7 +147,7 @@ void KisToolDuplicate::move(KisMoveEvent *e) // First look for the grid corresponding to the start point KisSubPerspectiveGrid* subGridStart = *m_subject->currentImg()->perspectiveGrid()->begin();//device->image()->perspectiveGrid()->gridAt(KisPoint(srcPoint.x() +hotSpot.x(),srcPoint.y() +hotSpot.y())); - QRect r = QRect(0,0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); + TQRect r = TQRect(0,0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); if(subGridStart) { @@ -182,26 +182,26 @@ void KisToolDuplicate::move(KisMoveEvent *e) KisPoint duplicateStartPoisitionT = KisPerspectiveMath::matProd(endM, m_positionStartPainting - m_offset); KisPoint duplicateRealPosition = KisPerspectiveMath::matProd(startM, duplicateStartPoisitionT + (currentPositionT - positionStartPaintingT) ); KisPoint p = e->pos() - duplicateRealPosition; - srcPos = p.floorQPoint(); + srcPos = p.floorTQPoint(); } }else { - srcPos = painter()->duplicateOffset().floorQPoint(); + srcPos = painter()->duplicateOffset().floorTQPoint(); } } else { if(m_isOffsetNotUptodate) - srcPos = e->pos().floorQPoint() - m_position.floorQPoint(); + srcPos = e->pos().floorTQPoint() - m_position.floorTQPoint(); else - srcPos = m_offset.floorQPoint(); + srcPos = m_offset.floorTQPoint(); } - Q_INT32 x; - Q_INT32 y; + TQ_INT32 x; + TQ_INT32 y; // like KisPaintOp::splitCoordinate - x = (Q_INT32)((e->x() < 0) ? e->x() - 1 : e->x()); - y = (Q_INT32)((e->y() < 0) ? e->y() - 1 : e->y()); - srcPos = QPoint(x - srcPos.x(), y - srcPos.y()); + x = (TQ_INT32)((e->x() < 0) ? e->x() - 1 : e->x()); + y = (TQ_INT32)((e->y() < 0) ? e->y() - 1 : e->y()); + srcPos = TQPoint(x - srcPos.x(), y - srcPos.y()); paintOutline(srcPos); super::move(e); @@ -212,7 +212,7 @@ void KisToolDuplicate::paintAt(const KisPoint &pos, const double xtilt, const double ytilt) { - if( m_position != QPoint(-1,-1)) + if( m_position != TQPoint(-1,-1)) { if(m_isOffsetNotUptodate) { @@ -226,29 +226,29 @@ void KisToolDuplicate::paintAt(const KisPoint &pos, } } -QString KisToolDuplicate::quickHelp() const { +TQString KisToolDuplicate::quickHelp() const { return i18n("To start, shift-click on the place you want to duplicate from. Then you can start painting. An indication of where you are copying from will be displayed while drawing and moving the mouse."); } -QWidget* KisToolDuplicate::createOptionWidget(QWidget* parent) +TQWidget* KisToolDuplicate::createOptionWidget(TQWidget* tqparent) { - QWidget* widget = KisToolPaint::createOptionWidget(parent); - m_healing = new QCheckBox(widget); + TQWidget* widget = KisToolPaint::createOptionWidget(tqparent); + m_healing = new TQCheckBox(widget); m_healing->setChecked( false); - addOptionWidgetOption(m_healing, new QLabel(i18n("Healing"), widget )); + addOptionWidgetOption(m_healing, new TQLabel(i18n("Healing"), widget )); m_healingRadius = new KIntNumInput(widget); KisBrush *brush = m_subject->currentBrush(); int healingradius = 20; if( brush ) { - healingradius = 2 * QMAX(brush->width(),brush->height()); + healingradius = 2 * TQMAX(brush->width(),brush->height()); } m_healingRadius->setValue( healingradius ); - addOptionWidgetOption(m_healingRadius, new QLabel(i18n("Healing radius"), widget )); - m_perspectiveCorrection = new QCheckBox(widget); - addOptionWidgetOption(m_perspectiveCorrection, new QLabel(i18n("Correct the perspective"), widget )); + addOptionWidgetOption(m_healingRadius, new TQLabel(i18n("Healing radius"), widget )); + m_perspectiveCorrection = new TQCheckBox(widget); + addOptionWidgetOption(m_perspectiveCorrection, new TQLabel(i18n("Correct the perspective"), widget )); return widget; } diff --git a/krita/plugins/tools/defaulttools/kis_tool_duplicate.h b/krita/plugins/tools/defaulttools/kis_tool_duplicate.h index 758542b8..2201badd 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_duplicate.h +++ b/krita/plugins/tools/defaulttools/kis_tool_duplicate.h @@ -27,13 +27,14 @@ class KisEvent; class KisButtonPressEvent; -class QCheckBox; +class TQCheckBox; class KIntNumInput; class KisToolDuplicate : public KisToolFreehand { typedef KisToolFreehand super; Q_OBJECT + TQ_OBJECT public: KisToolDuplicate(); @@ -41,7 +42,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FREEHAND; } - virtual Q_UINT32 priority() { return 0; } + virtual TQ_UINT32 priority() { return 0; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); @@ -50,8 +51,8 @@ public: const double xTilt, const double yTilt); - virtual QString quickHelp() const; - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQString quickHelp() const; + virtual TQWidget* createOptionWidget(TQWidget* tqparent); protected slots: virtual void activate(); @@ -64,9 +65,9 @@ protected: bool m_isOffsetNotUptodate; // Tells if the offset is update KisPoint m_position; // Give the position of the last alt-click KisPoint m_positionStartPainting; - QCheckBox* m_healing; + TQCheckBox* m_healing; KIntNumInput* m_healingRadius; - QCheckBox* m_perspectiveCorrection; + TQCheckBox* m_perspectiveCorrection; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc b/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc index dd8867c6..bae8ae04 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -75,23 +75,23 @@ void KisToolEllipse::move(KisMoveEvent *event) // erase old lines on canvas draw(m_dragStart, m_dragEnd); // move (alt) or resize ellipse - if (event->state() & Qt::AltButton) { + if (event->state() & TQt::AltButton) { KisPoint trans = event->pos() - m_dragEnd; m_dragStart += trans; m_dragEnd += trans; } else { - KisPoint diag = event->pos() - (event->state() & Qt::ControlButton + KisPoint diag = event->pos() - (event->state() & TQt::ControlButton ? m_dragCenter : m_dragStart); // circle? - if (event->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (event->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (event->state() & Qt::ControlButton) { + if (event->state() & TQt::ControlButton) { m_dragStart = m_dragCenter - diag; m_dragEnd = m_dragCenter + diag; } else { @@ -158,8 +158,8 @@ void KisToolEllipse::draw(const KisPoint& start, const KisPoint& end ) KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter p (canvas); - p.setRasterOp (Qt::NotROP); - p.drawEllipse (QRect (controller->windowToView (start).floorQPoint(), controller->windowToView (end).floorQPoint())); + p.setRasterOp (TQt::NotROP); + p.drawEllipse (TQRect (controller->windowToView (start).floorTQPoint(), controller->windowToView (end).floorTQPoint())); p.end (); } @@ -168,13 +168,13 @@ void KisToolEllipse::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F7)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F7)); m_action = new KRadioAction(i18n("&Ellipse"), "tool_ellipse", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw an ellipse")); diff --git a/krita/plugins/tools/defaulttools/kis_tool_ellipse.h b/krita/plugins/tools/defaulttools/kis_tool_ellipse.h index a7bd595c..4f79fbd6 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_ellipse.h +++ b/krita/plugins/tools/defaulttools/kis_tool_ellipse.h @@ -33,6 +33,7 @@ class KisToolEllipse : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolEllipse(); @@ -49,7 +50,7 @@ public: // virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } virtual enumToolType toolType() { return TOOL_SHAPE; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); diff --git a/krita/plugins/tools/defaulttools/kis_tool_fill.cc b/krita/plugins/tools/defaulttools/kis_tool_fill.cc index 3edd4f17..6e2ae99c 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_fill.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_fill.cc @@ -24,11 +24,11 @@ #include #include #include -#include -#include -#include +#include +#include +#include -#include +#include #include "knuminput.h" @@ -81,7 +81,7 @@ bool KisToolFill::flood(int startX, int startY) if (!device) return false; if (m_fillOnlySelection) { - QRect rc = device->selection()->selectedRect(); + TQRect rc = device->selection()->selectedRect(); KisPaintDeviceSP filled = new KisPaintDevice(device->colorSpace(), "filled"); KisFillPainter painter(filled); if (m_usePattern) @@ -145,41 +145,41 @@ void KisToolFill::buttonRelease(KisButtonReleaseEvent *e) { if (!m_subject) return; if (!m_currentImage || !m_currentImage->activeDevice()) return; - if (e->button() != QMouseEvent::LeftButton) return; + if (e->button() != TQMouseEvent::LeftButton) return; if(!m_wasPressed) return; m_wasPressed = false; int x, y; x = m_startPos.floorX(); y = m_startPos.floorY(); - if (!m_currentImage->bounds().contains(x, y)) { + if (!m_currentImage->bounds().tqcontains(x, y)) { return; } flood(x, y); notifyModified(); } -QWidget* KisToolFill::createOptionWidget(QWidget* parent) +TQWidget* KisToolFill::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); - m_lbThreshold = new QLabel(i18n("Threshold: "), widget); + m_lbThreshold = new TQLabel(i18n("Threshold: "), widget); m_slThreshold = new KIntNumInput( widget, "int_widget"); m_slThreshold->setRange( 1, 100); m_slThreshold->setSteps( 3, 3); m_slThreshold->setValue(m_threshold); - connect(m_slThreshold, SIGNAL(valueChanged(int)), this, SLOT(slotSetThreshold(int))); + connect(m_slThreshold, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetThreshold(int))); - m_checkUsePattern = new QCheckBox(i18n("Use pattern"), widget); + m_checkUsePattern = new TQCheckBox(i18n("Use pattern"), widget); m_checkUsePattern->setChecked(m_usePattern); - connect(m_checkUsePattern, SIGNAL(toggled(bool)), this, SLOT(slotSetUsePattern(bool))); + connect(m_checkUsePattern, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetUsePattern(bool))); - m_checkSampleMerged = new QCheckBox(i18n("Limit to current layer"), widget); + m_checkSampleMerged = new TQCheckBox(i18n("Limit to current layer"), widget); m_checkSampleMerged->setChecked(m_unmerged); - connect(m_checkSampleMerged, SIGNAL(toggled(bool)), this, SLOT(slotSetSampleMerged(bool))); + connect(m_checkSampleMerged, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetSampleMerged(bool))); - m_checkFillSelection = new QCheckBox(i18n("Fill entire selection"), widget); + m_checkFillSelection = new TQCheckBox(i18n("Fill entire selection"), widget); m_checkFillSelection->setChecked(m_fillOnlySelection); - connect(m_checkFillSelection, SIGNAL(toggled(bool)), this, SLOT(slotSetFillSelection(bool))); + connect(m_checkFillSelection, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFillSelection(bool))); addOptionWidgetOption(m_slThreshold, m_lbThreshold); @@ -219,9 +219,9 @@ void KisToolFill::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Fill"), "tool_color_fill", - Qt::Key_F, + TQt::Key_F, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Contiguous fill")); diff --git a/krita/plugins/tools/defaulttools/kis_tool_fill.h b/krita/plugins/tools/defaulttools/kis_tool_fill.h index 2b121d9c..411d711e 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_fill.h +++ b/krita/plugins/tools/defaulttools/kis_tool_fill.h @@ -21,15 +21,15 @@ #ifndef __filltool_h__ #define __filltool_h__ -#include +#include #include "kis_point.h" #include "kis_tool_paint.h" class KisPainter; -class QWidget; -class QLabel; -class QCheckBox; +class TQWidget; +class TQLabel; +class TQCheckBox; class KIntNumInput; class KActionCollection; @@ -37,6 +37,7 @@ class KisToolFill : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: @@ -45,7 +46,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 0; } + virtual TQ_UINT32 priority() { return 0; } virtual void update(KisCanvasSubject *subject); @@ -54,7 +55,7 @@ public: bool flood(int startX, int startY); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: virtual void slotSetThreshold(int); @@ -65,20 +66,20 @@ public slots: private: KisPoint m_startPos; int m_threshold; - Q_INT32 m_depth; + TQ_INT32 m_depth; KisLayerSP m_lay; - Q_UINT8* m_oldColor, *m_color; + TQ_UINT8* m_oldColor, *m_color; KisPainter *m_painter; KisCanvasSubject *m_subject; KisImageSP m_currentImage; bool *m_map, m_unmerged, m_usePattern, m_fillOnlySelection; KisSelectionSP m_selection; - QLabel *m_lbThreshold; + TQLabel *m_lbThreshold; KIntNumInput *m_slThreshold; - QCheckBox *m_checkUsePattern; - QCheckBox *m_checkSampleMerged; - QCheckBox *m_checkFillSelection; + TQCheckBox *m_checkUsePattern; + TQCheckBox *m_checkSampleMerged; + TQCheckBox *m_checkFillSelection; bool m_wasPressed; // use for preventing bug:133148 }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_gradient.cc b/krita/plugins/tools/defaulttools/kis_tool_gradient.cc index 6c35de4e..20ea5aa1 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_gradient.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_gradient.cc @@ -21,10 +21,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -58,7 +58,7 @@ KisToolGradient::KisToolGradient() m_endPos = KisPoint(0, 0); m_reverse = false; - m_shape = KisGradientPainter::GradientShapeLinear; + m_tqshape = KisGradientPainter::GradientShapeLinear; m_repeat = KisGradientPainter::GradientRepeatNone; m_antiAliasThreshold = 0.2; } @@ -79,7 +79,7 @@ void KisToolGradient::paint(KisCanvasPainter& gc) paintLine(gc); } -void KisToolGradient::paint(KisCanvasPainter& gc, const QRect&) +void KisToolGradient::paint(KisCanvasPainter& gc, const TQRect&) { if (m_dragging) paintLine(gc); @@ -91,7 +91,7 @@ void KisToolGradient::buttonPress(KisButtonPressEvent *e) return; } - if (e->button() == QMouseEvent::LeftButton) { + if (e->button() == TQMouseEvent::LeftButton) { m_dragging = true; m_startPos = e->pos(); m_endPos = e->pos(); @@ -105,7 +105,7 @@ void KisToolGradient::move(KisMoveEvent *e) paintLine(); } - if ((e->state() & Qt::ShiftButton) == Qt::ShiftButton) { + if ((e->state() & TQt::ShiftButton) == TQt::ShiftButton) { m_endPos = straightLine(e->pos()); } else { @@ -118,7 +118,7 @@ void KisToolGradient::move(KisMoveEvent *e) void KisToolGradient::buttonRelease(KisButtonReleaseEvent *e) { - if (m_dragging && e->button() == QMouseEvent::LeftButton) { + if (m_dragging && e->button() == TQMouseEvent::LeftButton) { KisCanvasController *controller = m_subject->canvasController(); KisImageSP img = m_subject->currentImg(); @@ -131,7 +131,7 @@ void KisToolGradient::buttonRelease(KisButtonReleaseEvent *e) return; } - if ((e->state() & Qt::ShiftButton) == Qt::ShiftButton) { + if ((e->state() & TQt::ShiftButton) == TQt::ShiftButton) { m_endPos = straightLine(e->pos()); } else { @@ -157,7 +157,7 @@ void KisToolGradient::buttonRelease(KisButtonReleaseEvent *e) progress->setSubject(&painter, true, true); } - bool painted = painter.paintGradient(m_startPos, m_endPos, m_shape, m_repeat, m_antiAliasThreshold, m_reverse, 0, 0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); + bool painted = painter.paintGradient(m_startPos, m_endPos, m_tqshape, m_repeat, m_antiAliasThreshold, m_reverse, 0, 0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); if (painted) { // does whole thing at moment @@ -215,30 +215,30 @@ void KisToolGradient::paintLine(KisCanvasPainter& gc) KisPoint end = controller->windowToView(m_endPos); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawLine(start.floorQPoint(), end.floorQPoint()); + gc.drawLine(start.floorTQPoint(), end.floorTQPoint()); gc.setRasterOp(op); gc.setPen(old); } } -QWidget* KisToolGradient::createOptionWidget(QWidget* parent) +TQWidget* KisToolGradient::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); Q_CHECK_PTR(widget); - m_lbShape = new QLabel(i18n("Shape:"), widget); - m_lbRepeat = new QLabel(i18n("Repeat:"), widget); + m_lbShape = new TQLabel(i18n("Shape:"), widget); + m_lbRepeat = new TQLabel(i18n("Repeat:"), widget); - m_ckReverse = new QCheckBox(i18n("Reverse"), widget, "reverse_check"); - connect(m_ckReverse, SIGNAL(toggled(bool)), this, SLOT(slotSetReverse(bool))); + m_ckReverse = new TQCheckBox(i18n("Reverse"), widget, "reverse_check"); + connect(m_ckReverse, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetReverse(bool))); - m_cmbShape = new QComboBox(false, widget, "shape_combo"); - connect(m_cmbShape, SIGNAL(activated(int)), this, SLOT(slotSetShape(int))); + m_cmbShape = new TQComboBox(false, widget, "tqshape_combo"); + connect(m_cmbShape, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetShape(int))); m_cmbShape->insertItem(i18n("Linear")); m_cmbShape->insertItem(i18n("Bi-Linear")); m_cmbShape->insertItem(i18n("Radial")); @@ -246,8 +246,8 @@ QWidget* KisToolGradient::createOptionWidget(QWidget* parent) m_cmbShape->insertItem(i18n("Conical")); m_cmbShape->insertItem(i18n("Conical Symmetric")); - m_cmbRepeat = new QComboBox(false, widget, "repeat_combo"); - connect(m_cmbRepeat, SIGNAL(activated(int)), this, SLOT(slotSetRepeat(int))); + m_cmbRepeat = new TQComboBox(false, widget, "repeat_combo"); + connect(m_cmbRepeat, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetRepeat(int))); m_cmbRepeat->insertItem(i18n("None")); m_cmbRepeat->insertItem(i18n("Forwards")); m_cmbRepeat->insertItem(i18n("Alternating")); @@ -258,21 +258,21 @@ QWidget* KisToolGradient::createOptionWidget(QWidget* parent) addOptionWidgetOption(m_ckReverse); - m_lbAntiAliasThreshold = new QLabel(i18n("Anti-alias threshold:"), widget); + m_lbAntiAliasThreshold = new TQLabel(i18n("Anti-alias threshold:"), widget); m_slAntiAliasThreshold = new KDoubleNumInput(widget, "threshold_slider"); m_slAntiAliasThreshold->setRange( 0, 1); m_slAntiAliasThreshold->setValue(m_antiAliasThreshold); - connect(m_slAntiAliasThreshold, SIGNAL(valueChanged(double)), this, SLOT(slotSetAntiAliasThreshold(double))); + connect(m_slAntiAliasThreshold, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotSetAntiAliasThreshold(double))); addOptionWidgetOption(m_slAntiAliasThreshold, m_lbAntiAliasThreshold); return widget; } -void KisToolGradient::slotSetShape(int shape) +void KisToolGradient::slotSetShape(int tqshape) { - m_shape = static_cast(shape); + m_tqshape = static_cast(tqshape); } void KisToolGradient::slotSetRepeat(int repeat) @@ -296,8 +296,8 @@ void KisToolGradient::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Gradient"), - "tool_gradient", Qt::Key_G, this, - SLOT(activate()), collection, + "tool_gradient", TQt::Key_G, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a gradient")); m_action->setExclusiveGroup("tools"); diff --git a/krita/plugins/tools/defaulttools/kis_tool_gradient.h b/krita/plugins/tools/defaulttools/kis_tool_gradient.h index c80529e3..59d78ad3 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_gradient.h +++ b/krita/plugins/tools/defaulttools/kis_tool_gradient.h @@ -37,16 +37,17 @@ class KDoubleNumInput; class KisCmbComposite; class KisPainter; -class QLabel; -class QPoint; -class QWidget; -class QCheckBox; +class TQLabel; +class TQPoint; +class TQWidget; +class TQCheckBox; class KisToolGradient : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: @@ -55,7 +56,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual void update(KisCanvasSubject *subject); @@ -64,9 +65,9 @@ public: virtual void buttonRelease(KisButtonReleaseEvent *event); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); - QWidget* createOptionWidget(QWidget* parent); + TQWidget* createOptionWidget(TQWidget* tqparent); public slots: void slotSetShape(int); @@ -87,18 +88,18 @@ private: KisCanvasSubject *m_subject; - KisGradientPainter::enumGradientShape m_shape; + KisGradientPainter::enumGradientShape m_tqshape; KisGradientPainter::enumGradientRepeat m_repeat; bool m_reverse; double m_antiAliasThreshold; - QLabel *m_lbShape; - QLabel *m_lbRepeat; - QCheckBox *m_ckReverse; - QComboBox *m_cmbShape; - QComboBox *m_cmbRepeat; - QLabel *m_lbAntiAliasThreshold; + TQLabel *m_lbShape; + TQLabel *m_lbRepeat; + TQCheckBox *m_ckReverse; + TQComboBox *m_cmbShape; + TQComboBox *m_cmbRepeat; + TQLabel *m_lbAntiAliasThreshold; KDoubleNumInput *m_slAntiAliasThreshold; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_line.cc b/krita/plugins/tools/defaulttools/kis_tool_line.cc index cbdf5448..a335f918 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_line.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_line.cc @@ -20,9 +20,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -72,10 +72,10 @@ void KisToolLine::update(KisCanvasSubject *subject) void KisToolLine::paint(KisCanvasPainter& gc) { if (m_dragging) - paintLine(gc, QRect()); + paintLine(gc, TQRect()); } -void KisToolLine::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolLine::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_dragging) paintLine(gc, rc); @@ -87,7 +87,7 @@ void KisToolLine::buttonPress(KisButtonPressEvent *e) if (!m_subject->currentBrush()) return; - if (e->button() == QMouseEvent::LeftButton) { + if (e->button() == TQMouseEvent::LeftButton) { m_dragging = true; //KisCanvasController *controller = m_subject->canvasController(); m_startPos = e->pos(); //controller->windowToView(e->pos()); @@ -102,11 +102,11 @@ void KisToolLine::move(KisMoveEvent *e) paintLine(); //KisCanvasController *controller = m_subject->canvasController(); - if (e->state() & Qt::AltButton) { + if (e->state() & TQt::AltButton) { KisPoint trans = e->pos() - m_endPos; m_startPos += trans; m_endPos += trans; - } else if (e->state() & Qt::ShiftButton) + } else if (e->state() & TQt::ShiftButton) m_endPos = straightLine(e->pos()); else m_endPos = e->pos();//controller->windowToView(e->pos()); @@ -116,7 +116,7 @@ void KisToolLine::move(KisMoveEvent *e) void KisToolLine::buttonRelease(KisButtonReleaseEvent *e) { - if (m_dragging && e->button() == QMouseEvent::LeftButton) { + if (m_dragging && e->button() == TQMouseEvent::LeftButton) { m_dragging = false; KisCanvasController *controller = m_subject->canvasController(); KisImageSP img = m_subject->currentImg(); @@ -127,7 +127,7 @@ void KisToolLine::buttonRelease(KisButtonReleaseEvent *e) return; } - if ((e->state() & Qt::ShiftButton) == Qt::ShiftButton) { + if ((e->state() & TQt::ShiftButton) == TQt::ShiftButton) { m_endPos = straightLine(e->pos()); } else { @@ -196,19 +196,19 @@ void KisToolLine::paintLine() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintLine(gc, rc); } } -void KisToolLine::paintLine(KisCanvasPainter& gc, const QRect&) +void KisToolLine::paintLine(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); KisPoint start; KisPoint end; @@ -223,9 +223,9 @@ void KisToolLine::paintLine(KisCanvasPainter& gc, const QRect&) // end.setY((end.y() - start.y())); // start *= m_subject->zoomFactor(); // end *= m_subject->zoomFactor(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawLine(start.floorQPoint(), end.floorQPoint()); + gc.drawLine(start.floorTQPoint(), end.floorTQPoint()); gc.setRasterOp(op); gc.setPen(old); } @@ -237,8 +237,8 @@ void KisToolLine::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Line"), - "tool_line", Qt::Key_L, this, - SLOT(activate()), collection, + "tool_line", TQt::Key_L, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a line")); m_action->setExclusiveGroup("tools"); @@ -246,7 +246,7 @@ void KisToolLine::setup(KActionCollection *collection) } } -QString KisToolLine::quickHelp() const { +TQString KisToolLine::quickHelp() const { return i18n("Alt+Drag will move the origin of the currently displayed line around, Shift+Drag will force you to draw straight lines"); } diff --git a/krita/plugins/tools/defaulttools/kis_tool_line.h b/krita/plugins/tools/defaulttools/kis_tool_line.h index 8a84a819..4ce0ff38 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_line.h +++ b/krita/plugins/tools/defaulttools/kis_tool_line.h @@ -32,13 +32,14 @@ class KisBrush; class KisPainter; -class QPoint; -class QWidget; +class TQPoint; +class TQWidget; class KisToolLine : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: @@ -47,7 +48,7 @@ class KisToolLine : public KisToolPaint { virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual void update(KisCanvasSubject *subject); virtual void buttonPress(KisButtonPressEvent *event); @@ -55,13 +56,13 @@ class KisToolLine : public KisToolPaint { virtual void buttonRelease(KisButtonReleaseEvent *event); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; private: void paintLine(); - void paintLine(KisCanvasPainter& gc, const QRect& rc); + void paintLine(KisCanvasPainter& gc, const TQRect& rc); KisPoint straightLine(KisPoint point); diff --git a/krita/plugins/tools/defaulttools/kis_tool_move.cc b/krita/plugins/tools/defaulttools/kis_tool_move.cc index 810bda37..643c29c8 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_move.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_move.cc @@ -20,10 +20,10 @@ */ #include -#include +#include #include #include -#include +#include #include "kis_canvas_subject.h" #include "kis_cursor.h" #include "kis_image.h" @@ -45,8 +45,8 @@ KisToolMove::KisToolMove() setName("tool_move"); setCursor(KisCursor::moveCursor()); - m_repeatTimer = new QTimer(this); - connect( m_repeatTimer, SIGNAL( timeout() ), this, SLOT( slotMove() ) ); + m_repeatTimer = new TQTimer(this); + connect( m_repeatTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotMove() ) ); } KisToolMove::~KisToolMove() @@ -62,8 +62,8 @@ void KisToolMove::update(KisCanvasSubject *subject) void KisToolMove::buttonPress(KisButtonPressEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); KisImageSP img = m_subject->currentImg(); KisLayerSP dev; @@ -76,9 +76,9 @@ void KisToolMove::buttonPress(KisButtonPressEvent *e) void KisToolMove::move(KisMoveEvent *e) { - if (m_subject && e->state() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); - if((e->state() & Qt::AltButton) || (e->state() & Qt::ControlButton)) { + if (m_subject && e->state() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); + if((e->state() & TQt::AltButton) || (e->state() & TQt::ControlButton)) { if(fabs(pos.x() - m_dragStart.x()) > fabs(pos.y() - m_dragStart.y())) pos.setY(m_dragStart.y()); else @@ -90,8 +90,8 @@ void KisToolMove::move(KisMoveEvent *e) void KisToolMove::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { - m_strategy.endDrag(e->pos().floorQPoint()); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + m_strategy.endDrag(e->pos().floorTQPoint()); } } @@ -102,9 +102,9 @@ void KisToolMove::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Move"), "tool_move", - Qt::SHIFT+Qt::Key_V, + TQt::SHIFT+TQt::Key_V, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Move")); @@ -114,7 +114,7 @@ void KisToolMove::setup(KActionCollection *collection) } -void KisToolMove::keyPress( QKeyEvent *e ) +void KisToolMove::keyPress( TQKeyEvent *e ) { m_keyEvent = e; @@ -126,7 +126,7 @@ void KisToolMove::keyPress( QKeyEvent *e ) if (!img || !(dev = img->activeLayer())) return; - m_dragStart = QPoint( 0, 0 ); + m_dragStart = TQPoint( 0, 0 ); m_strategy.startDrag( m_dragStart ); m_steps = 1; m_repeatTimer->start(200); @@ -134,23 +134,23 @@ void KisToolMove::keyPress( QKeyEvent *e ) } } -void KisToolMove::keyRelease(QKeyEvent *) +void KisToolMove::keyRelease(TQKeyEvent *) { m_repeatTimer->stop(); if ( m_subject && m_keyEvent) { - if ( m_keyEvent->key() == Qt::Key_Left ) { - m_strategy.endDrag(QPoint( -m_steps, 0 )); + if ( m_keyEvent->key() == TQt::Key_Left ) { + m_strategy.endDrag(TQPoint( -m_steps, 0 )); } - else if ( m_keyEvent->key() == Qt::Key_Right ) { - m_strategy.endDrag(QPoint(m_steps, 0) ); + else if ( m_keyEvent->key() == TQt::Key_Right ) { + m_strategy.endDrag(TQPoint(m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Up ) { - m_strategy.endDrag(QPoint(0, -m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Up ) { + m_strategy.endDrag(TQPoint(0, -m_steps) ); } - else if ( m_keyEvent->key() == Qt::Key_Down ) { - m_strategy.endDrag(QPoint(0, m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Down ) { + m_strategy.endDrag(TQPoint(0, m_steps) ); } } m_steps = 0; @@ -162,17 +162,17 @@ void KisToolMove::slotMove() { if (m_subject && m_keyEvent) { - if ( m_keyEvent->key() == Qt::Key_Left ) { - m_strategy.drag(QPoint(-m_steps, 0) ); + if ( m_keyEvent->key() == TQt::Key_Left ) { + m_strategy.drag(TQPoint(-m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Right ) { - m_strategy.drag(QPoint(m_steps, 0) ); + else if ( m_keyEvent->key() == TQt::Key_Right ) { + m_strategy.drag(TQPoint(m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Up ) { - m_strategy.drag(QPoint(0, -m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Up ) { + m_strategy.drag(TQPoint(0, -m_steps) ); } - else if ( m_keyEvent->key() == Qt::Key_Down ) { - m_strategy.drag(QPoint(0, m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Down ) { + m_strategy.drag(TQPoint(0, m_steps) ); } ++m_steps; diff --git a/krita/plugins/tools/defaulttools/kis_tool_move.h b/krita/plugins/tools/defaulttools/kis_tool_move.h index 128a9661..274cc3c7 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_move.h +++ b/krita/plugins/tools/defaulttools/kis_tool_move.h @@ -21,18 +21,19 @@ #ifndef KIS_TOOL_MOVE_H_ #define KIS_TOOL_MOVE_H_ -#include +#include #include "kis_strategy_move.h" #include "kis_tool_non_paint.h" #include "kis_tool_factory.h" -class QTimer; +class TQTimer; class KisToolMove : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolMove(); @@ -44,13 +45,13 @@ public: public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); - virtual void keyPress(QKeyEvent *e); - virtual void keyRelease(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); + virtual void keyRelease(TQKeyEvent *e); private slots: @@ -60,9 +61,9 @@ private: KisCanvasSubject *m_subject; KisStrategyMove m_strategy; - QPoint m_dragStart; - QTimer * m_repeatTimer; - QKeyEvent * m_keyEvent; + TQPoint m_dragStart; + TQTimer * m_repeatTimer; + TQKeyEvent * m_keyEvent; int m_steps; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_pan.cc b/krita/plugins/tools/defaulttools/kis_tool_pan.cc index 56da211d..f7a92dcb 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_pan.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_pan.cc @@ -85,7 +85,7 @@ void KisToolPan::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Pan"), "tool_pan", Qt::SHIFT+Qt::Key_H, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Pan"), "tool_pan", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Pan")); m_action->setExclusiveGroup("tools"); m_ownAction = true; diff --git a/krita/plugins/tools/defaulttools/kis_tool_pan.h b/krita/plugins/tools/defaulttools/kis_tool_pan.h index d0f37669..36ed9dcc 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_pan.h +++ b/krita/plugins/tools/defaulttools/kis_tool_pan.h @@ -32,6 +32,7 @@ class KRITATOOL_EXPORT KisToolPan : public KisToolNonPaint typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolPan(); @@ -41,7 +42,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_VIEW; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); @@ -52,11 +53,11 @@ public: private: KisCanvasSubject *m_subject; KisPoint m_dragPos; - Q_INT32 m_origScrollX; - Q_INT32 m_origScrollY; + TQ_INT32 m_origScrollX; + TQ_INT32 m_origScrollY; bool m_dragging; - QCursor m_openHandCursor; - QCursor m_closedHandCursor; + TQCursor m_openHandCursor; + TQCursor m_closedHandCursor; }; class KisToolPanFactory : public KisToolFactory { diff --git a/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc b/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc index 13b81c7f..741b5051 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -76,23 +76,23 @@ void KisToolRectangle::move(KisMoveEvent *event) // erase old lines on canvas draw(m_dragStart, m_dragEnd); // move (alt) or resize rectangle - if (event->state() & Qt::AltButton) { + if (event->state() & TQt::AltButton) { KisPoint trans = event->pos() - m_dragEnd; m_dragStart += trans; m_dragEnd += trans; } else { - KisPoint diag = event->pos() - (event->state() & Qt::ControlButton + KisPoint diag = event->pos() - (event->state() & TQt::ControlButton ? m_dragCenter : m_dragStart); // square? - if (event->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (event->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (event->state() & Qt::ControlButton) { + if (event->state() & TQt::ControlButton) { m_dragStart = m_dragCenter - diag; m_dragEnd = m_dragCenter + diag; } else { @@ -161,8 +161,8 @@ void KisToolRectangle::draw(const KisPoint& start, const KisPoint& end ) KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter p (canvas); - p.setRasterOp (Qt::NotROP); - p.drawRect (QRect (controller->windowToView (start).floorQPoint(), controller->windowToView (end).floorQPoint())); + p.setRasterOp (TQt::NotROP); + p.drawRect (TQRect (controller->windowToView (start).floorTQPoint(), controller->windowToView (end).floorTQPoint())); p.end (); } @@ -173,9 +173,9 @@ void KisToolRectangle::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Rectangle"), "tool_rectangle", - Qt::Key_F6, + TQt::Key_F6, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a rectangle")); diff --git a/krita/plugins/tools/defaulttools/kis_tool_rectangle.h b/krita/plugins/tools/defaulttools/kis_tool_rectangle.h index d9f1bf21..cc6c0853 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_rectangle.h +++ b/krita/plugins/tools/defaulttools/kis_tool_rectangle.h @@ -24,20 +24,21 @@ #ifndef __KIS_TOOL_RECTANGLE_H__ #define __KIS_TOOL_RECTANGLE_H__ -#include +#include #include "kis_tool_shape.h" #include "kis_types.h" #include "kis_tool_factory.h" #include "kis_point.h" -class QPainter; +class TQPainter; class KisPainter; class KisToolRectangle : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolRectangle(); @@ -55,7 +56,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); @@ -69,7 +70,7 @@ protected: KisPoint m_dragCenter; KisPoint m_dragStart; KisPoint m_dragEnd; - QRect m_final_lines; + TQRect m_final_lines; bool m_dragging; KisImageSP m_currentImage; diff --git a/krita/plugins/tools/defaulttools/kis_tool_text.cc b/krita/plugins/tools/defaulttools/kis_tool_text.cc index b75f1b1b..853ff322 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_text.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_text.cc @@ -16,17 +16,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#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,7 +34,7 @@ #include #include -#include +#include #include "kis_point.h" #include "kis_image.h" @@ -72,7 +72,7 @@ void KisToolText::update(KisCanvasSubject *subject) void KisToolText::buttonPress(KisButtonPressEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { m_wasPressed = true; } } @@ -81,15 +81,15 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) { if ( m_windowIsBeingShown ) return; - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { if(!m_wasPressed) return; m_wasPressed = false; KisImageSP img = m_subject->currentImg(); m_windowIsBeingShown = true; bool ok; - QString text = KInputDialog::getText(i18n("Font Tool"), i18n("Enter text:"), - QString::null, &ok); + TQString text = KInputDialog::getText(i18n("Font Tool"), i18n("Enter text:"), + TQString(), &ok); if (!ok) { m_windowIsBeingShown = false; return; @@ -100,37 +100,37 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) undoAdapter->beginMacro(i18n("Text")); } - QFontMetrics metrics(m_font); - QRect boundingRect = metrics.boundingRect(text).normalize(); + TQFontMetrics metrics(m_font); + TQRect boundingRect = metrics.boundingRect(text).normalize(); int xB = - boundingRect.x(); int yB = - boundingRect.y(); if (boundingRect.x() < 0 || boundingRect.y() < 0) boundingRect.moveBy(- boundingRect.x(), - boundingRect.y()); - QPixmap pixels(boundingRect.width(), boundingRect.height()); + TQPixmap pixels(boundingRect.width(), boundingRect.height()); { - QPainter paint(&pixels); - paint.fillRect(boundingRect, Qt::white); + TQPainter paint(&pixels); + paint.fillRect(boundingRect, TQt::white); paint.setFont(m_font); - paint.setBrush(QBrush(Qt::black)); + paint.setBrush(TQBrush(TQt::black)); paint.drawText(xB, yB, text); } - QImage image = pixels.convertToImage(); + TQImage image = pixels.convertToImage(); - Q_INT32 height = boundingRect.height(); - Q_INT32 width = boundingRect.width(); + TQ_INT32 height = boundingRect.height(); + TQ_INT32 width = boundingRect.width(); KisPaintLayer *layer = new KisPaintLayer(img, '"' + text + '"', OPACITY_OPAQUE); - KisGroupLayerSP parent = img->rootLayer(); + KisGroupLayerSP tqparent = img->rootLayer(); if (img->activeLayer()) - parent = img->activeLayer()->parent(); - img->addLayer(layer, parent, img->activeLayer()); + tqparent = img->activeLayer()->tqparent(); + img->addLayer(layer, tqparent, img->activeLayer()); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { - QRgb pixel = image.pixel(x, y); + TQRgb pixel = image.pixel(x, y); // use the 'blackness' as alpha :) - Q_UINT8 alpha = 255 - qRed(pixel) * OPACITY_OPAQUE / 255; - QColor c = m_subject->fgColor().toQColor(); + TQ_UINT8 alpha = 255 - tqRed(pixel) * OPACITY_OPAQUE / 255; + TQColor c = m_subject->fgColor().toTQColor(); layer->paintDevice()->setPixel(x, y, c, alpha); } } @@ -139,8 +139,8 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) layer->setCompositeOp(m_compositeOp); layer->setVisible(false); - Q_INT32 x = QMAX(0, static_cast(e->x() - width/2)); - Q_INT32 y = QMAX(0, static_cast(e->y() - height/2)); + TQ_INT32 x = TQMAX(0, static_cast(e->x() - width/2)); + TQ_INT32 y = TQMAX(0, static_cast(e->y() - height/2)); layer->setX(x); layer->setY(y); layer->setVisible(true); @@ -155,22 +155,22 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) } void KisToolText::setFont() { - KFontDialog::getFont( m_font, false/*, QWidget* parent! */ ); - m_lbFontName->setText(QString(m_font.family() + ", %1").arg(m_font.pointSize())); + KFontDialog::getFont( m_font, false/*, TQWidget* tqparent! */ ); + m_lbFontName->setText(TQString(m_font.family() + ", %1").tqarg(m_font.pointSize())); } -QWidget* KisToolText::createOptionWidget(QWidget* parent) +TQWidget* KisToolText::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); - m_lbFont = new QLabel(i18n("Font: "), widget); + m_lbFont = new TQLabel(i18n("Font: "), widget); - QHBox *fontBox = new QHBox(widget); - m_lbFontName = new KSqueezedTextLabel(QString(m_font.family() + ", %1") - .arg(m_font.pointSize()), fontBox); - m_btnMoreFonts = new QPushButton("...", fontBox); + TQHBox *fontBox = new TQHBox(widget); + m_lbFontName = new KSqueezedTextLabel(TQString(m_font.family() + ", %1") + .tqarg(m_font.pointSize()), fontBox); + m_btnMoreFonts = new TQPushButton("...", fontBox); - connect(m_btnMoreFonts, SIGNAL(released()), this, SLOT(setFont())); + connect(m_btnMoreFonts, TQT_SIGNAL(released()), this, TQT_SLOT(setFont())); addOptionWidgetOption(fontBox, m_lbFont); @@ -184,9 +184,9 @@ void KisToolText::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("T&ext"), "tool_text", - Qt::SHIFT+Qt::Key_T, + TQt::SHIFT+TQt::Key_T, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setExclusiveGroup("tools"); diff --git a/krita/plugins/tools/defaulttools/kis_tool_text.h b/krita/plugins/tools/defaulttools/kis_tool_text.h index b7bc857c..b2aa7e18 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_text.h +++ b/krita/plugins/tools/defaulttools/kis_tool_text.h @@ -23,10 +23,10 @@ #include "kis_tool_factory.h" -class QFont; -class QLabel; -class QWidget; -class QPushButton; +class TQFont; +class TQLabel; +class TQWidget; +class TQPushButton; class KSqueezedTextLabel; @@ -34,6 +34,7 @@ class KSqueezedTextLabel; class KisToolText : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: KisToolText(); @@ -42,20 +43,20 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent*); virtual void buttonRelease(KisButtonReleaseEvent *e); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: virtual void setFont(); private: KisCanvasSubject *m_subject; - QFont m_font; - QLabel *m_lbFont; + TQFont m_font; + TQLabel *m_lbFont; KSqueezedTextLabel *m_lbFontName; - QPushButton *m_btnMoreFonts; + TQPushButton *m_btnMoreFonts; bool m_wasPressed; // use for preventing bug:136151 bool m_windowIsBeingShown; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_zoom.cc b/krita/plugins/tools/defaulttools/kis_tool_zoom.cc index a5567f83..f866e5e2 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_zoom.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_zoom.cc @@ -41,12 +41,12 @@ KisToolZoom::KisToolZoom() setName("tool_zoom"); m_subject = 0; m_dragging = false; - m_startPos = QPoint(0, 0); - m_endPos = QPoint(0, 0); + m_startPos = TQPoint(0, 0); + m_endPos = TQPoint(0, 0); m_plusCursor = KisCursor::load("tool_zoom_plus_cursor.png", 8, 8); m_minusCursor = KisCursor::load("tool_zoom_minus_cursor.png", 8, 8); setCursor(m_plusCursor); - connect(&m_timer, SIGNAL(timeout()), SLOT(slotTimer())); + connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimer())); } KisToolZoom::~KisToolZoom() @@ -62,10 +62,10 @@ void KisToolZoom::update(KisCanvasSubject *subject) void KisToolZoom::paint(KisCanvasPainter& gc) { if (m_dragging) - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolZoom::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolZoom::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_dragging) paintOutline(gc, rc); @@ -75,8 +75,8 @@ void KisToolZoom::buttonPress(KisButtonPressEvent *e) { if (m_subject && m_subject->currentImg() && !m_dragging) { if (e->button() == Qt::LeftButton) { - m_startPos = e->pos().floorQPoint(); - m_endPos = e->pos().floorQPoint(); + m_startPos = e->pos().floorTQPoint(); + m_endPos = e->pos().floorTQPoint(); m_dragging = true; } } @@ -88,7 +88,7 @@ void KisToolZoom::move(KisMoveEvent *e) if (m_startPos != m_endPos) paintOutline(); - m_endPos = e->pos().floorQPoint(); + m_endPos = e->pos().floorTQPoint(); paintOutline(); } } @@ -98,19 +98,19 @@ void KisToolZoom::buttonRelease(KisButtonReleaseEvent *e) if (m_subject && m_dragging && e->button() == Qt::LeftButton) { KisCanvasController *controller = m_subject->canvasController(); - m_endPos = e->pos().floorQPoint(); + m_endPos = e->pos().floorTQPoint(); m_dragging = false; - QPoint delta = m_endPos - m_startPos; + TQPoint delta = m_endPos - m_startPos; if (sqrt(delta.x() * delta.x() + delta.y() * delta.y()) < 10) { - if (e->state() & Qt::ControlButton) { + if (e->state() & TQt::ControlButton) { controller->zoomOut(m_endPos.x(), m_endPos.y()); } else { controller->zoomIn(m_endPos.x(), m_endPos.y()); } } else { - controller->zoomTo(QRect(m_startPos, m_endPos)); + controller->zoomTo(TQRect(m_startPos, m_endPos)); } } } @@ -129,13 +129,13 @@ void KisToolZoom::deactivate() void KisToolZoom::slotTimer() { #if KDE_IS_VERSION(3,4,0) - int state = kapp->keyboardMouseState() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton); + int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton); #else int state = kapp->keyboardModifiers() & (KApplication::ShiftModifier |KApplication::ControlModifier|KApplication::Modifier1); #endif - if (state & Qt::ControlButton) { + if (state & TQt::ControlButton) { m_subject->canvasController()->setCanvasCursor(m_minusCursor); } else { m_subject->canvasController()->setCanvasCursor(m_plusCursor); @@ -148,29 +148,29 @@ void KisToolZoom::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolZoom::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolZoom::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::DotLine); - QPoint start; - QPoint end; + TQPen old = gc.pen(); + TQPen pen(TQt::DotLine); + TQPoint start; + TQPoint end; Q_ASSERT(controller); start = controller->windowToView(m_startPos); end = controller->windowToView(m_endPos); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawRect(QRect(start, end)); + gc.drawRect(TQRect(start, end)); gc.setRasterOp(op); gc.setPen(old); } @@ -181,7 +181,7 @@ void KisToolZoom::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Zoom"), "tool_zoom", Qt::Key_Z, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Zoom"), "tool_zoom", TQt::Key_Z, this, TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Zoom")); m_action->setExclusiveGroup("tools"); m_ownAction = true; diff --git a/krita/plugins/tools/defaulttools/kis_tool_zoom.h b/krita/plugins/tools/defaulttools/kis_tool_zoom.h index 235c3a74..3faa5bf1 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_zoom.h +++ b/krita/plugins/tools/defaulttools/kis_tool_zoom.h @@ -21,7 +21,7 @@ #ifndef KIS_ZOOM_TOOL_H_ #define KIS_ZOOM_TOOL_H_ -#include +#include #include "kis_tool_non_paint.h" @@ -33,6 +33,7 @@ class KisToolZoom : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolZoom(); @@ -44,18 +45,18 @@ public: public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_VIEW; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); private: void paintOutline(); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); public slots: @@ -69,12 +70,12 @@ private slots: private: KisCanvasSubject *m_subject; - QPoint m_startPos; - QPoint m_endPos; + TQPoint m_startPos; + TQPoint m_endPos; bool m_dragging; - QCursor m_plusCursor; - QCursor m_minusCursor; - QTimer m_timer; + TQCursor m_plusCursor; + TQCursor m_minusCursor; + TQTimer m_timer; }; diff --git a/krita/plugins/tools/defaulttools/wdgcolorpicker.ui b/krita/plugins/tools/defaulttools/wdgcolorpicker.ui index 4a26c53f..a2b9d7d3 100644 --- a/krita/plugins/tools/defaulttools/wdgcolorpicker.ui +++ b/krita/plugins/tools/defaulttools/wdgcolorpicker.ui @@ -1,6 +1,6 @@ ColorPickerOptionsWidget - + ColorPickerOptionsWidget @@ -25,7 +25,7 @@ 0 - + Sample All Visible Layers @@ -47,20 +47,20 @@ 0 - + 200 0 - + 200 32767 - + cbUpdateCurrentColour @@ -68,15 +68,15 @@ Update current color - + - layout2 + tqlayout2 unnamed - + cbPalette @@ -84,14 +84,14 @@ Add to palette: - + cmbPalette - + cbNormaliseValues @@ -99,15 +99,15 @@ Show colors as percentages - + - layout1 + tqlayout1 unnamed - + textLabel1 @@ -115,7 +115,7 @@ Sample radius: - + radius @@ -128,7 +128,7 @@ - + Channel @@ -163,5 +163,5 @@ - + diff --git a/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc b/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc index 25ceb924..42c95093 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc @@ -19,11 +19,11 @@ #include "kis_tool_move_selection.h" #include -#include +#include #include #include #include -#include +#include #include "kis_canvas_subject.h" #include "kis_cursor.h" #include "kis_image.h" @@ -41,22 +41,22 @@ class KisSelectionOffsetCommand : public KNamedCommand { typedef KNamedCommand super; public: - KisSelectionOffsetCommand(KisSelectionSP layer, const QPoint& oldpos, const QPoint& newpos); + KisSelectionOffsetCommand(KisSelectionSP layer, const TQPoint& oldpos, const TQPoint& newpos); virtual ~KisSelectionOffsetCommand(); virtual void execute(); virtual void unexecute(); private: - void moveTo(const QPoint& pos); + void moveTo(const TQPoint& pos); private: KisSelectionSP m_layer; - QPoint m_oldPos; - QPoint m_newPos; + TQPoint m_oldPos; + TQPoint m_newPos; }; - KisSelectionOffsetCommand::KisSelectionOffsetCommand(KisSelectionSP layer, const QPoint& oldpos, const QPoint& newpos) : + KisSelectionOffsetCommand::KisSelectionOffsetCommand(KisSelectionSP layer, const TQPoint& oldpos, const TQPoint& newpos) : super(i18n("Move Layer")) { m_layer = layer; @@ -79,7 +79,7 @@ private: moveTo(m_oldPos); } - void KisSelectionOffsetCommand::moveTo(const QPoint& pos) + void KisSelectionOffsetCommand::moveTo(const TQPoint& pos) { if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(false); @@ -88,7 +88,7 @@ private: m_layer->setX(pos.x()); m_layer->setY(pos.y()); - m_layer->parentPaintDevice()->setDirty(); + m_layer->tqparentPaintDevice()->setDirty(); if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(true); @@ -118,8 +118,8 @@ void KisToolMoveSelection::update(KisCanvasSubject *subject) void KisToolMoveSelection::buttonPress(KisButtonPressEvent *e) { m_dragging = false; - if (m_subject && e->button() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); KisImageSP img = m_subject->currentImg(); KisPaintLayerSP lay; @@ -145,8 +145,8 @@ void KisToolMoveSelection::buttonPress(KisButtonPressEvent *e) void KisToolMoveSelection::move(KisMoveEvent *e) { if (m_subject && m_dragging) { - QPoint pos = e->pos().floorQPoint(); - if((e->state() & Qt::AltButton) || (e->state() & Qt::ControlButton)) { + TQPoint pos = e->pos().floorTQPoint(); + if((e->state() & TQt::AltButton) || (e->state() & TQt::ControlButton)) { if(fabs(pos.x() - m_dragStart.x()) > fabs(pos.y() - m_dragStart.y())) pos.setY(m_dragStart.y()); else @@ -158,7 +158,7 @@ void KisToolMoveSelection::move(KisMoveEvent *e) if(!lay) return; KisSelectionSP sel = lay->paintDevice()->selection(); - QRect rc; + TQRect rc; pos -= m_dragStart; // convert to delta rc = sel->selectedRect(); @@ -166,8 +166,8 @@ void KisToolMoveSelection::move(KisMoveEvent *e) sel->setY(sel->getY() + pos.y()); rc = rc.unite(sel->selectedRect()); - m_layerPosition = QPoint(sel->getX(), sel->getY()); - m_dragStart = e->pos().floorQPoint(); + m_layerPosition = TQPoint(sel->getX(), sel->getY()); + m_dragStart = e->pos().floorTQPoint(); lay->paintDevice()->setDirty(rc); } @@ -176,7 +176,7 @@ void KisToolMoveSelection::move(KisMoveEvent *e) void KisToolMoveSelection::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton && m_dragging) { + if (m_subject && e->button() == TQMouseEvent::LeftButton && m_dragging) { m_dragging = false; KisImageSP img = m_subject->currentImg(); if(!img) return; @@ -209,9 +209,9 @@ void KisToolMoveSelection::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Move selection"), "tool_move", - Qt::SHIFT+Qt::Key_V, + TQt::SHIFT+TQt::Key_V, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Move the selection")); diff --git a/krita/plugins/tools/selectiontools/kis_tool_move_selection.h b/krita/plugins/tools/selectiontools/kis_tool_move_selection.h index b7eb47ec..60d73a9b 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_move_selection.h +++ b/krita/plugins/tools/selectiontools/kis_tool_move_selection.h @@ -27,6 +27,7 @@ class KisToolMoveSelection : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolMoveSelection(); @@ -38,7 +39,7 @@ public: public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SELECT; } - virtual Q_UINT32 priority() { return 10; } + virtual TQ_UINT32 priority() { return 10; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); @@ -46,9 +47,9 @@ public: private: KisCanvasSubject *m_subject; - QPoint m_dragStart; - QPoint m_layerStart; - QPoint m_layerPosition; + TQPoint m_dragStart; + TQPoint m_layerStart; + TQPoint m_layerPosition; bool m_dragging; }; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc b/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc index 9257d15a..c5737b2d 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -93,14 +93,14 @@ void KisToolSelectBrush::initPaint(KisEvent* /*e*/) m_target = selection; m_painter = new KisPainter(selection.data()); Q_CHECK_PTR(m_painter); - m_painter->setPaintColor(KisColor(Qt::black, selection->colorSpace())); + m_painter->setPaintColor(KisColor(TQt::black, selection->colorSpace())); m_painter->setBrush(m_subject->currentBrush()); m_painter->setOpacity(OPACITY_OPAQUE);//m_subject->fgColor().colorSpace()->intensity8(m_subject->fgColor().data())); m_painter->setCompositeOp(COMPOSITE_OVER); KisPaintOp * op = KisPaintOpRegistry::instance()->paintOp("paintbrush", 0, painter()); painter()->setPaintOp(op); // And now the painter owns the op and will destroy it. - // Set the cursor -- ideally. this should be a mask created from the brush, + // Set the cursor -- ideally. this should be a tqmask created from the brush, // now that X11 can handle colored cursors. #if 0 // Setting cursors has no effect until the tool is selected again; this @@ -134,7 +134,7 @@ void KisToolSelectBrush::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Selection Brush"), "tool_brush_selection", "Ctrl+Shift+B", this, - SLOT(activate()), collection, + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Paint a selection")); @@ -143,24 +143,24 @@ void KisToolSelectBrush::setup(KActionCollection *collection) } } -QWidget* KisToolSelectBrush::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectBrush::createOptionWidget(TQWidget* tqparent) { - Q_UNUSED(parent); + Q_UNUSED(tqparent); // Commented out due to the fact that this doesn't actually work if you change the action #if 0 - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Selection Brush")); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; #endif return 0; } -QWidget* KisToolSelectBrush::optionWidget() +TQWidget* KisToolSelectBrush::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_brush.h b/krita/plugins/tools/selectiontools/kis_tool_select_brush.h index cc49cd5e..a85ac55f 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_brush.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_brush.h @@ -25,18 +25,19 @@ #include #include -class QWidget; +class TQWidget; class KisPoint; class KisSelectedTransaction; class KisSelectionOptions; /** * The selection brush creates a selection by painting with the current - * brush shape. Not sure what kind of an icon could represent this... + * brush tqshape. Not sure what kind of an icon could represent this... * Depends a bit on how we're going to visualize selections. */ class KisToolSelectBrush : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -44,10 +45,10 @@ public: virtual ~KisToolSelectBrush(); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual enumToolType toolType() { return TOOL_SELECT; } - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void activate(); diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc index 01acbbcb..1344c39f 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -84,9 +84,9 @@ void KisToolSelectContiguous::buttonPress(KisButtonPressEvent * e) KisImageSP img; KisPaintDeviceSP dev; - QPoint pos; + TQPoint pos; - if (e->button() != QMouseEvent::LeftButton && e->button() != QMouseEvent::RightButton) + if (e->button() != TQMouseEvent::LeftButton && e->button() != TQMouseEvent::RightButton) return; if (!(img = m_subject->currentImg())) @@ -97,9 +97,9 @@ void KisToolSelectContiguous::buttonPress(KisButtonPressEvent * e) if (!dev || !img->activeLayer()->visible()) return; - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); - pos = QPoint(e->pos().floorX(), e->pos().floorY()); + pos = TQPoint(e->pos().floorX(), e->pos().floorY()); KisFillPainter fillpainter(dev); fillpainter.setFillThreshold(m_fuzziness); @@ -132,7 +132,7 @@ void KisToolSelectContiguous::buttonPress(KisButtonPressEvent * e) if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } @@ -146,7 +146,7 @@ void KisToolSelectContiguous::setup(KActionCollection *collection) "tool_contiguous_selection" , 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -183,21 +183,21 @@ void KisToolSelectContiguous::slotSetAction(int action) } -QWidget* KisToolSelectContiguous::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectContiguous::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Contiguous Area Selection")); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); l->setSpacing( 6 ); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QHBoxLayout * hbox = new QHBoxLayout(l); + TQHBoxLayout * hbox = new TQHBoxLayout(l); Q_CHECK_PTR(hbox); - QLabel * lbl = new QLabel(i18n("Fuzziness: "), m_optWidget); + TQLabel * lbl = new TQLabel(i18n("Fuzziness: "), m_optWidget); hbox->addWidget(lbl); KIntNumInput * input = new KIntNumInput(m_optWidget, "fuzziness"); @@ -206,29 +206,29 @@ QWidget* KisToolSelectContiguous::createOptionWidget(QWidget* parent) input->setRange(0, 200, 10, true); input->setValue(20); hbox->addWidget(input); - connect(input, SIGNAL(valueChanged(int)), this, SLOT(slotSetFuzziness(int))); + connect(input, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetFuzziness(int))); - QCheckBox* samplemerged = new QCheckBox(i18n("Sample merged"), m_optWidget); + TQCheckBox* samplemerged = new TQCheckBox(i18n("Sample merged"), m_optWidget); l->addWidget( samplemerged ); samplemerged->setChecked(m_sampleMerged); - connect(samplemerged, SIGNAL(stateChanged(int)), - this, SLOT(slotSetSampleMerged(int))); + connect(samplemerged, TQT_SIGNAL(stateChanged(int)), + this, TQT_SLOT(slotSetSampleMerged(int))); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectContiguous::optionWidget() +TQWidget* KisToolSelectContiguous::optionWidget() { return m_optWidget; } void KisToolSelectContiguous::slotSetSampleMerged(int state) { - if (state == QButton::NoChange) + if (state == TQButton::NoChange) return; - m_sampleMerged = (state == QButton::On); + m_sampleMerged = (state == TQButton::On); } #include "kis_tool_select_contiguous.moc" diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h index cc91b3ef..c60b0673 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h @@ -28,9 +28,9 @@ #include class KisCanvasSubject; -class QWidget; -class QVBoxLayout; -class QCheckBox; +class TQWidget; +class TQVBoxLayout; +class TQCheckBox; class KisSelectionOptions; /** @@ -41,6 +41,7 @@ class KisToolSelectContiguous : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectContiguous(); @@ -50,11 +51,11 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 7; } + virtual TQ_UINT32 priority() { return 7; } virtual enumToolType toolType() { return TOOL_SELECT; }; - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void buttonPress(KisButtonPressEvent *event); diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc index 226277b2..a97518ce 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -84,10 +84,10 @@ void KisToolSelectElliptical::update(KisCanvasSubject *subject) void KisToolSelectElliptical::paint(KisCanvasPainter& gc) { if (m_selecting) - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolSelectElliptical::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolSelectElliptical::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_selecting) paintOutline(gc, rc); @@ -131,23 +131,23 @@ void KisToolSelectElliptical::move(KisMoveEvent *e) if (m_subject && m_selecting) { paintOutline(); // move (alt) or resize ellipse - if (e->state() & Qt::AltButton) { + if (e->state() & TQt::AltButton) { KisPoint trans = e->pos() - m_endPos; m_startPos += trans; m_endPos += trans; } else { - KisPoint diag = e->pos() - (e->state() & Qt::ControlButton + KisPoint diag = e->pos() - (e->state() & TQt::ControlButton ? m_centerPos : m_startPos); // circle? - if (e->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (e->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (e->state() & Qt::ControlButton) { + if (e->state() & TQt::ControlButton) { m_startPos = m_centerPos - diag; m_endPos = m_centerPos + diag; } else { @@ -169,7 +169,7 @@ void KisToolSelectElliptical::buttonRelease(KisButtonReleaseEvent *e) if (m_startPos == m_endPos) { clearSelection(); } else { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisImageSP img = m_subject->currentImg(); if (!img) @@ -199,16 +199,16 @@ void KisToolSelectElliptical::buttonRelease(KisButtonReleaseEvent *e) if(m_selectAction==SELECTION_SUBTRACT) dev->selection()->invert(); } - QRect rc( m_startPos.floorQPoint(), m_endPos.floorQPoint()); + TQRect rc( m_startPos.floorTQPoint(), m_endPos.floorTQPoint()); rc = rc.normalize(); KisSelectionSP tmpSel = new KisSelection(dev); - KisAutobrushCircleShape shape(rc.width(),rc.height(), 1, 1); - Q_UINT8 value; + KisAutobrushCircleShape tqshape(rc.width(),rc.height(), 1, 1); + TQ_UINT8 value; for (int y = 0; y <= rc.height(); y++) for (int x = 0; x <= rc.width(); x++) { - value = MAX_SELECTED - shape.valueAt(x,y); + value = MAX_SELECTED - tqshape.valueAt(x,y); tmpSel->setSelected( x+rc.x(), y+rc.y(), value); } switch(m_selectAction) @@ -232,7 +232,7 @@ void KisToolSelectElliptical::buttonRelease(KisButtonReleaseEvent *e) if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } m_selecting = false; @@ -245,29 +245,29 @@ void KisToolSelectElliptical::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolSelectElliptical::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolSelectElliptical::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::DotLine); - QPoint start; - QPoint end; + TQPen old = gc.pen(); + TQPen pen(TQt::DotLine); + TQPoint start; + TQPoint end; Q_ASSERT(controller); - start = controller->windowToView(m_startPos).floorQPoint(); - end = controller->windowToView(m_endPos).floorQPoint(); + start = controller->windowToView(m_startPos).floorTQPoint(); + end = controller->windowToView(m_endPos).floorTQPoint(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawEllipse(QRect(start, end)); + gc.drawEllipse(TQRect(start, end)); gc.setRasterOp(op); gc.setPen(old); } @@ -285,9 +285,9 @@ void KisToolSelectElliptical::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Elliptical Selection"), "tool_elliptical_selection" , - Qt::Key_J, + TQt::Key_J, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -297,21 +297,21 @@ void KisToolSelectElliptical::setup(KActionCollection *collection) } } -QWidget* KisToolSelectElliptical::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectElliptical::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Elliptical Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectElliptical::optionWidget() +TQWidget* KisToolSelectElliptical::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h index e3b46737..dbccda59 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h @@ -23,7 +23,7 @@ #ifndef __KIS_TOOL_SELECT_ELLIPTICAL_H__ #define __KIS_TOOL_SELECT_ELLIPTICAL_H__ -#include +#include #include "kis_point.h" #include "kis_selection.h" @@ -36,6 +36,7 @@ class KisToolSelectElliptical : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectElliptical(); @@ -44,13 +45,13 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 4; } - virtual QWidget * createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQ_UINT32 priority() { return 4; } + virtual TQWidget * createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual enumToolType toolType() { return TOOL_SELECT; } virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); @@ -63,7 +64,7 @@ public slots: private: void clearSelection(); void paintOutline(); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); private: KisCanvasSubject *m_subject; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc index 6880c61b..08c30fc0 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -93,14 +93,14 @@ void KisToolSelectEraser::initPaint(KisEvent */*e*/) m_painter = new KisPainter(selection.data()); Q_CHECK_PTR(m_painter); m_painter->beginTransaction(i18n("Selection Eraser")); - m_painter->setPaintColor(KisColor(Qt::white, selection->colorSpace())); + m_painter->setPaintColor(KisColor(TQt::white, selection->colorSpace())); m_painter->setBrush(m_subject->currentBrush()); m_painter->setOpacity(OPACITY_OPAQUE); m_painter->setCompositeOp(COMPOSITE_ERASE); KisPaintOp * op = KisPaintOpRegistry::instance()->paintOp("eraser", 0, painter()); painter()->setPaintOp(op); // And now the painter owns the op and will destroy it. - // Set the cursor -- ideally. this should be a mask created from the brush, + // Set the cursor -- ideally. this should be a tqmask created from the brush, // now that X11 can handle colored cursors. #if 0 // Setting cursors has no effect until the tool is selected again; this @@ -121,7 +121,7 @@ void KisToolSelectEraser::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("Selection &Eraser"), "tool_eraser_selection", "Ctrl+Shift+E", this, - SLOT(activate()), collection, + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Erase parts of a selection")); @@ -130,24 +130,24 @@ void KisToolSelectEraser::setup(KActionCollection *collection) } } -QWidget* KisToolSelectEraser::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectEraser::createOptionWidget(TQWidget* tqparent) { - Q_UNUSED(parent); + Q_UNUSED(tqparent); // Commented out due to the fact that this doesn't actually work if you change the action #if 0 - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Selection Eraser")); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; #endif return 0; } -QWidget* KisToolSelectEraser::optionWidget() +TQWidget* KisToolSelectEraser::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h index 092122c8..79352df1 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h @@ -30,11 +30,12 @@ class KisSelectionOptions; /** * The selection eraser makes a selection smaller by painting with the - * current eraser shape. Not sure what kind of an icon could represent + * current eraser tqshape. Not sure what kind of an icon could represent * this... Depends a bit on how we're going to visualize selections. */ class KisToolSelectEraser : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -42,10 +43,10 @@ public: virtual ~KisToolSelectEraser(); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual enumToolType toolType() { return TOOL_SELECT; } - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void activate(); diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc b/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc index fe76c989..11c59824 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc @@ -19,11 +19,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -115,7 +115,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) KisImageSP img = m_subject->currentImg(); if (img && img->activeDevice()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = img->activeDevice(); bool hasSelection = dev->hasSelection(); KisSelectedTransaction *t = 0; @@ -128,7 +128,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) KisPainter painter(selection.data()); - painter.setPaintColor(KisColor(Qt::black, selection->colorSpace())); + painter.setPaintColor(KisColor(TQt::black, selection->colorSpace())); painter.setFillStyle(KisPainter::FillStyleForegroundColor); painter.setStrokeStyle(KisPainter::StrokeStyleNone); painter.setBrush(m_subject->currentBrush()); @@ -151,7 +151,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) if(hasSelection) { - QRect dirty(painter.dirtyRect()); + TQRect dirty(painter.dirtyRect()); dev->setDirty(dirty); dev->emitSelectionChanged(dirty); } else { @@ -162,7 +162,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } m_points.clear(); @@ -174,7 +174,7 @@ void KisToolSelectOutline::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolSelectOutline::paint(KisCanvasPainter& gc, const QRect&) +void KisToolSelectOutline::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -196,18 +196,18 @@ void KisToolSelectOutline::draw(KisCanvasPainter& gc) return; if (m_dragging && !m_points.empty()) { - QPen pen(Qt::white, 0, Qt::DotLine); + TQPen pen(TQt::white, 0, TQt::DotLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } } @@ -219,14 +219,14 @@ void KisToolSelectOutline::deactivate() KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QPen pen(Qt::white, 0, Qt::DotLine); + TQPen pen(TQt::white, 0, TQt::DotLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -236,8 +236,8 @@ void KisToolSelectOutline::deactivate() } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -256,7 +256,7 @@ void KisToolSelectOutline::setup(KActionCollection *collection) "tool_outline_selection", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -267,21 +267,21 @@ void KisToolSelectOutline::setup(KActionCollection *collection) } -QWidget* KisToolSelectOutline::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectOutline::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Outline Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectOutline::optionWidget() +TQWidget* KisToolSelectOutline::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_outline.h b/krita/plugins/tools/selectiontools/kis_tool_select_outline.h index eda10504..bc43ff88 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_outline.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_outline.h @@ -23,8 +23,8 @@ #ifndef __selecttoolfreehand_h__ #define __selecttoolfreehand_h__ -#include -#include +#include +#include #include "kis_point.h" #include "kis_tool_non_paint.h" @@ -37,6 +37,7 @@ class KisToolSelectOutline : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectOutline(); virtual ~KisToolSelectOutline(); @@ -44,15 +45,15 @@ public: virtual void update (KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 6; } + virtual TQ_UINT32 priority() { return 6; } virtual enumToolType toolType() { return TOOL_SELECT; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); - QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void slotSetAction(int); @@ -61,7 +62,7 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); @@ -72,7 +73,7 @@ protected: bool m_dragging; private: - typedef QValueVector KisPointVector; + typedef TQValueVector KisPointVector; KisCanvasSubject *m_subject; KisPointVector m_points; KisSelectionOptions * m_optWidget; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc index dc7cec97..dc8ceeca 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc @@ -19,11 +19,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -124,7 +124,7 @@ void KisToolSelectPolygonal::finish() KisImageSP img = m_subject->currentImg(); if (img && img->activeDevice()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = img->activeDevice(); bool hasSelection = dev->hasSelection(); @@ -138,7 +138,7 @@ void KisToolSelectPolygonal::finish() } KisPainter painter(selection.data()); - painter.setPaintColor(KisColor(Qt::black, selection->colorSpace())); + painter.setPaintColor(KisColor(TQt::black, selection->colorSpace())); painter.setFillStyle(KisPainter::FillStyleForegroundColor); painter.setStrokeStyle(KisPainter::StrokeStyleNone); painter.setBrush(m_subject->currentBrush()); @@ -161,7 +161,7 @@ void KisToolSelectPolygonal::finish() painter.paintPolygon(m_points); if(hasSelection) { - QRect rect(painter.dirtyRect()); + TQRect rect(painter.dirtyRect()); dev->setDirty(rect); dev->emitSelectionChanged(rect); } else { @@ -171,7 +171,7 @@ void KisToolSelectPolygonal::finish() if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } m_points.clear(); @@ -210,7 +210,7 @@ void KisToolSelectPolygonal::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolSelectPolygonal::paint(KisCanvasPainter& gc, const QRect&) +void KisToolSelectPolygonal::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -231,19 +231,19 @@ void KisToolSelectPolygonal::draw(KisCanvasPainter& gc) if (!m_subject) return; - QPen pen(Qt::white, 0, Qt::DotLine); + TQPen pen(TQt::white, 0, TQt::DotLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -254,8 +254,8 @@ void KisToolSelectPolygonal::draw(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -275,7 +275,7 @@ void KisToolSelectPolygonal::setup(KActionCollection *collection) "tool_polygonal_selection" , 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -286,21 +286,21 @@ void KisToolSelectPolygonal::setup(KActionCollection *collection) } -QWidget* KisToolSelectPolygonal::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectPolygonal::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Polygonal Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectPolygonal::optionWidget() +TQWidget* KisToolSelectPolygonal::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h index 05764c61..f233bd51 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h @@ -34,6 +34,7 @@ class KisToolSelectPolygonal : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectPolygonal(); virtual ~KisToolSelectPolygonal(); @@ -49,7 +50,7 @@ public: // virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 5; } + virtual TQ_UINT32 priority() { return 5; } virtual enumToolType toolType() { return TOOL_SELECT; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); @@ -57,8 +58,8 @@ public: virtual void doubleClick(KisDoubleClickEvent * event); void finish(); - QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void slotSetAction(int); @@ -67,7 +68,7 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); @@ -77,7 +78,7 @@ protected: bool m_dragging; private: - typedef QValueVector KisPointVector; + typedef TQValueVector KisPointVector; KisCanvasSubject *m_subject; KisPointVector m_points; KisSelectionOptions * m_optWidget; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc index 61a4c292..0f29844a 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc @@ -21,10 +21,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -85,10 +85,10 @@ void KisToolSelectRectangular::update(KisCanvasSubject *subject) void KisToolSelectRectangular::paint(KisCanvasPainter& gc) { if (m_selecting) - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolSelectRectangular::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolSelectRectangular::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_selecting) paintOutline(gc, rc); @@ -127,23 +127,23 @@ void KisToolSelectRectangular::move(KisMoveEvent *e) if (m_subject && m_selecting) { paintOutline(); // move (alt) or resize rectangle - if (e->state() & Qt::AltButton) { + if (e->state() & TQt::AltButton) { KisPoint trans = e->pos() - m_endPos; m_startPos += trans; m_endPos += trans; } else { - KisPoint diag = e->pos() - (e->state() & Qt::ControlButton + KisPoint diag = e->pos() - (e->state() & TQt::ControlButton ? m_centerPos : m_startPos); // square? - if (e->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (e->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (e->state() & Qt::ControlButton) { + if (e->state() & TQt::ControlButton) { m_startPos = m_centerPos - diag; m_endPos = m_centerPos + diag; } else { @@ -183,18 +183,18 @@ void KisToolSelectRectangular::buttonRelease(KisButtonReleaseEvent *e) m_endPos.setX(img->width()); if (img && img->activeDevice()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = img->activeDevice(); bool hasSelection = dev->hasSelection(); KisSelectedTransaction *t = 0; if (img->undo()) t = new KisSelectedTransaction(i18n("Rectangular Selection"), dev); KisSelectionSP selection = dev->selection(); - QRect rc(m_startPos.floorQPoint(), m_endPos.floorQPoint()); + TQRect rc(m_startPos.floorTQPoint(), m_endPos.floorTQPoint()); rc = rc.normalize(); // We don't want the border of the 'rectangle' to be included in our selection - rc.setSize(rc.size() - QSize(1,1)); + rc.setSize(rc.size() - TQSize(1,1)); if(! hasSelection) { @@ -232,7 +232,7 @@ void KisToolSelectRectangular::buttonRelease(KisButtonReleaseEvent *e) KisCanvasController *controller = m_subject -> canvasController(); controller -> kiscanvas() -> update(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } @@ -246,29 +246,29 @@ void KisToolSelectRectangular::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolSelectRectangular::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolSelectRectangular::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::DotLine); - QPoint start; - QPoint end; + TQPen old = gc.pen(); + TQPen pen(TQt::DotLine); + TQPoint start; + TQPoint end; Q_ASSERT(controller); - start = controller->windowToView(m_startPos.floorQPoint()); - end = controller->windowToView(m_endPos.floorQPoint()); + start = controller->windowToView(m_startPos.floorTQPoint()); + end = controller->windowToView(m_endPos.floorTQPoint()); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawRect(QRect(start, end)); + gc.drawRect(TQRect(start, end)); gc.setRasterOp(op); gc.setPen(old); } @@ -286,9 +286,9 @@ void KisToolSelectRectangular::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Rectangular Selection"), "tool_rect_selection", - Qt::Key_R, + TQt::Key_R, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -298,21 +298,21 @@ void KisToolSelectRectangular::setup(KActionCollection *collection) } } -QWidget* KisToolSelectRectangular::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectRectangular::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Rectangular Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectRectangular::optionWidget() +TQWidget* KisToolSelectRectangular::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h index 2724a2ca..7c3fb529 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h @@ -33,6 +33,7 @@ class KisToolSelectRectangular : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectRectangular(); @@ -41,13 +42,13 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } virtual enumToolType toolType() { return TOOL_SELECT; } - virtual QWidget * createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget * createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); @@ -60,7 +61,7 @@ public slots: private: void clearSelection(); void paintOutline(); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); private: KisCanvasSubject *m_subject; diff --git a/krita/plugins/tools/selectiontools/selection_tools.cc b/krita/plugins/tools/selectiontools/selection_tools.cc index 1297aa31..cff97ea5 100644 --- a/krita/plugins/tools/selectiontools/selection_tools.cc +++ b/krita/plugins/tools/selectiontools/selection_tools.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -51,14 +51,14 @@ typedef KGenericFactory SelectionToolsFactory; K_EXPORT_COMPONENT_FACTORY( kritaselectiontools, SelectionToolsFactory( "krita" ) ) -SelectionTools::SelectionTools(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +SelectionTools::SelectionTools(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(SelectionToolsFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add(new KisToolSelectOutlineFactory()); r->add(new KisToolSelectPolygonalFactory()); r->add(new KisToolSelectRectangularFactory()); diff --git a/krita/plugins/tools/selectiontools/selection_tools.h b/krita/plugins/tools/selectiontools/selection_tools.h index ad023762..ff888aa9 100644 --- a/krita/plugins/tools/selectiontools/selection_tools.h +++ b/krita/plugins/tools/selectiontools/selection_tools.h @@ -34,8 +34,9 @@ class SelectionTools : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - SelectionTools(QObject *parent, const char *name, const QStringList &); + SelectionTools(TQObject *tqparent, const char *name, const TQStringList &); virtual ~SelectionTools(); }; diff --git a/krita/plugins/tools/tool_crop/kis_tool_crop.cc b/krita/plugins/tools/tool_crop/kis_tool_crop.cc index fd83e204..763e19b1 100644 --- a/krita/plugins/tools/tool_crop/kis_tool_crop.cc +++ b/krita/plugins/tools/tool_crop/kis_tool_crop.cc @@ -21,13 +21,13 @@ */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -67,7 +67,7 @@ KisToolCrop::KisToolCrop() setCursor(m_cropCursor); m_subject = 0; m_selecting = false; - m_rectCrop = QRect(0, 0, 0, 0); + m_rectCrop = TQRect(0, 0, 0, 0); m_handleSize = 13; m_haveCropSelection = false; m_optWidget = 0; @@ -113,10 +113,10 @@ void KisToolCrop::deactivate() void KisToolCrop::paint(KisCanvasPainter& gc) { - paintOutlineWithHandles(gc, QRect()); + paintOutlineWithHandles(gc, TQRect()); } -void KisToolCrop::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolCrop::paint(KisCanvasPainter& gc, const TQRect& rc) { paintOutlineWithHandles(gc, rc); } @@ -133,7 +133,7 @@ void KisToolCrop::clearRect() controller->kiscanvas()->update(); - m_rectCrop = QRect(0,0,0,0); + m_rectCrop = TQRect(0,0,0,0); updateWidgetValues(); m_selecting = false; @@ -147,8 +147,8 @@ void KisToolCrop::buttonPress(KisButtonPressEvent *e) if (img && img->activeDevice() && e->button() == LeftButton) { - QPoint pos = e->pos().floorQPoint(); - QRect b = img->bounds(); + TQPoint pos = e->pos().floorTQPoint(); + TQRect b = img->bounds(); if (pos.x() < b.x()) pos.setX(b.x()); @@ -164,7 +164,7 @@ void KisToolCrop::buttonPress(KisButtonPressEvent *e) if( !m_haveCropSelection ) //if the selection is not set { - m_rectCrop = QRect( pos.x(), pos.y(), 0, 0); + m_rectCrop = TQRect( pos.x(), pos.y(), 0, 0); paintOutlineWithHandles(); } else @@ -189,28 +189,28 @@ void KisToolCrop::move(KisMoveEvent *e) { paintOutlineWithHandles(); - m_rectCrop.setBottomRight( e->pos().floorQPoint()); + m_rectCrop.setBottomRight( e->pos().floorTQPoint()); KisImageSP image = m_subject->currentImg(); - m_rectCrop.setRight( QMIN(m_rectCrop.right(), image->width())); - m_rectCrop.setBottom( QMIN(m_rectCrop.bottom(), image->width())); + m_rectCrop.setRight( TQMIN(m_rectCrop.right(), image->width())); + m_rectCrop.setBottom( TQMIN(m_rectCrop.bottom(), image->width())); m_rectCrop = m_rectCrop.normalize(); paintOutlineWithHandles(); } else //if the crop selection is set { - m_dragStop = e->pos().floorQPoint(); + m_dragStop = e->pos().floorTQPoint(); if (m_mouseOnHandleType != None && m_dragStart != m_dragStop ) { - Q_INT32 imageWidth = m_subject->currentImg()->width(); - Q_INT32 imageHeight = m_subject->currentImg()->height(); + TQ_INT32 imageWidth = m_subject->currentImg()->width(); + TQ_INT32 imageHeight = m_subject->currentImg()->height(); paintOutlineWithHandles(); - QPoint pos = e->pos().floorQPoint(); + TQPoint pos = e->pos().floorTQPoint(); if( m_mouseOnHandleType == Inside ) { m_rectCrop.moveBy( ( m_dragStop.x() - m_dragStart.x() ), ( m_dragStop.y() - m_dragStart.y() ) ); @@ -232,35 +232,35 @@ void KisToolCrop::move(KisMoveEvent *e) } } else if(m_optWidget->boolRatio->isChecked()) { - QPoint drag = m_dragStop - m_dragStart; + TQPoint drag = m_dragStop - m_dragStart; if( ! m_optWidget->boolWidth->isChecked() && !m_optWidget->boolHeight->isChecked() ) { switch (m_mouseOnHandleType) { case (UpperLeft): { - Q_INT32 dep = (drag.x() + drag.y()) / 2; + TQ_INT32 dep = (drag.x() + drag.y()) / 2; m_rectCrop.setTop( m_rectCrop.top() + dep ); m_rectCrop.setLeft( (int) ( m_rectCrop.right() - m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); } break; case (LowerRight): { - Q_INT32 dep = (drag.x() + drag.y()) / 2; + TQ_INT32 dep = (drag.x() + drag.y()) / 2; m_rectCrop.setBottom( m_rectCrop.bottom() + dep ); m_rectCrop.setWidth( (int) ( m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); break; } case (UpperRight): { - Q_INT32 dep = (drag.x() - drag.y()) / 2; + TQ_INT32 dep = (drag.x() - drag.y()) / 2; m_rectCrop.setTop( m_rectCrop.top() - dep ); m_rectCrop.setWidth( (int) ( m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); break; } case (LowerLeft): { - Q_INT32 dep = (drag.x() - drag.y()) / 2; + TQ_INT32 dep = (drag.x() - drag.y()) / 2; m_rectCrop.setBottom( m_rectCrop.bottom() - dep ); m_rectCrop.setLeft( (int) ( m_rectCrop.right() - m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); break; @@ -359,8 +359,8 @@ void KisToolCrop::move(KisMoveEvent *e) } m_rectCrop = m_rectCrop.normalize(); - m_rectCrop = m_rectCrop.intersect( QRect(0,0, imageWidth + 1, imageHeight + 1 ) ); - m_dragStart = e->pos().floorQPoint(); + m_rectCrop = m_rectCrop.intersect( TQRect(0,0, imageWidth + 1, imageHeight + 1 ) ); + m_dragStart = e->pos().floorTQPoint(); paintOutlineWithHandles(); } } @@ -371,7 +371,7 @@ void KisToolCrop::move(KisMoveEvent *e) if ( m_haveCropSelection ) //if the crop selection is set { KisCanvasController *controller = m_subject->canvasController(); - Q_INT32 type = mouseOnHandle(controller->windowToView(e->pos().floorQPoint())); + TQ_INT32 type = mouseOnHandle(controller->windowToView(e->pos().floorTQPoint())); //set resize cursor if we are on one of the handles setMoveResizeCursor(type); } @@ -381,7 +381,7 @@ void KisToolCrop::move(KisMoveEvent *e) void KisToolCrop::updateWidgetValues(bool updateratio) { - QRect r = realRectCrop(); + TQRect r = realRectCrop(); setOptionWidgetX(r.x()); setOptionWidgetY(r.y()); setOptionWidgetWidth(r.width() ); @@ -414,12 +414,12 @@ void KisToolCrop::validateSelection(bool updateratio) KisImageSP image = m_subject->currentImg(); if (image) { - Q_INT32 imageWidth = image->width(); - Q_INT32 imageHeight = image->height(); - m_rectCrop.setLeft(QMAX(0, m_rectCrop.left())); - m_rectCrop.setTop(QMAX(0, m_rectCrop.top())); - m_rectCrop.setRight(QMIN(imageWidth, m_rectCrop.right())); - m_rectCrop.setBottom(QMIN(imageHeight, m_rectCrop.bottom())); + TQ_INT32 imageWidth = image->width(); + TQ_INT32 imageHeight = image->height(); + m_rectCrop.setLeft(TQMAX(0, m_rectCrop.left())); + m_rectCrop.setTop(TQMAX(0, m_rectCrop.top())); + m_rectCrop.setRight(TQMIN(imageWidth, m_rectCrop.right())); + m_rectCrop.setBottom(TQMIN(imageHeight, m_rectCrop.bottom())); updateWidgetValues(updateratio); } @@ -432,36 +432,36 @@ void KisToolCrop::paintOutlineWithHandles() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutlineWithHandles(gc, rc); } } -void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const QRect&) +void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const TQRect&) { if (m_subject && (m_selecting || m_haveCropSelection)) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); pen.setWidth(1); - QPoint start; - QPoint end; + TQPoint start; + TQPoint end; Q_ASSERT(controller); start = controller->windowToView(m_rectCrop.topLeft()); end = controller->windowToView(m_rectCrop.bottomRight()); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); //draw handles - m_handlesRegion = handles(QRect(start, end)); + m_handlesRegion = handles(TQRect(start, end)); - Q_INT32 startx; - Q_INT32 starty; - Q_INT32 endx; - Q_INT32 endy; + TQ_INT32 startx; + TQ_INT32 starty; + TQ_INT32 endx; + TQ_INT32 endy; if(start.x()<=end.x()) { startx=start.x(); @@ -500,10 +500,10 @@ void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const QRect&) gc.drawLine(startx,endy + m_handleSize / 2 + 1, startx, controller->kiscanvas()->height()); gc.drawLine(endx,0,endx,starty - m_handleSize / 2); gc.drawLine(endx + m_handleSize / 2 + 1,starty, controller->kiscanvas()->width(), starty); - QMemArray rects = m_handlesRegion.rects (); - for (QMemArray ::ConstIterator it = rects.begin (); it != rects.end (); ++it) + TQMemArray rects = m_handlesRegion.rects (); + for (TQMemArray ::ConstIterator it = rects.begin (); it != rects.end (); ++it) { - gc.fillRect (*it, Qt::black); + gc.fillRect (*it, TQt::black); } @@ -523,12 +523,12 @@ void KisToolCrop::crop() { if (!img) return; - QRect rc = realRectCrop().normalize(); + TQRect rc = realRectCrop().normalize(); // The visitor adds the undo steps to the macro if (m_optWidget->cmbType->currentItem() == 0) { - QRect dirty = img->bounds(); + TQRect dirty = img->bounds(); // The layer(s) under the current layer will take care of adding // undo information to the Crop macro. @@ -548,7 +548,7 @@ void KisToolCrop::crop() { img->resize(rc, true); } - m_rectCrop = QRect(0,0,0,0); + m_rectCrop = TQRect(0,0,0,0); updateWidgetValues(); } @@ -660,7 +660,7 @@ void KisToolCrop::setRatio(double ) } } -void KisToolCrop::setOptionWidgetX(Q_INT32 x) +void KisToolCrop::setOptionWidgetX(TQ_INT32 x) { // Disable signals otherwise we get the valueChanged signal, which we don't want // to go through the logic for setting values that way. @@ -669,21 +669,21 @@ void KisToolCrop::setOptionWidgetX(Q_INT32 x) m_optWidget->intX->blockSignals(false); } -void KisToolCrop::setOptionWidgetY(Q_INT32 y) +void KisToolCrop::setOptionWidgetY(TQ_INT32 y) { m_optWidget->intY->blockSignals(true); m_optWidget->intY->setValue(y); m_optWidget->intY->blockSignals(false); } -void KisToolCrop::setOptionWidgetWidth(Q_INT32 x) +void KisToolCrop::setOptionWidgetWidth(TQ_INT32 x) { m_optWidget->intWidth->blockSignals(true); m_optWidget->intWidth->setValue(x); m_optWidget->intWidth->blockSignals(false); } -void KisToolCrop::setOptionWidgetHeight(Q_INT32 y) +void KisToolCrop::setOptionWidgetHeight(TQ_INT32 y) { m_optWidget->intHeight->blockSignals(true); m_optWidget->intHeight->setValue(y); @@ -698,23 +698,23 @@ void KisToolCrop::setOptionWidgetRatio(double ratio) } -QWidget* KisToolCrop::createOptionWidget(QWidget* parent) +TQWidget* KisToolCrop::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new WdgToolCrop(parent); + m_optWidget = new WdgToolCrop(tqparent); Q_CHECK_PTR(m_optWidget); - connect(m_optWidget->bnCrop, SIGNAL(clicked()), this, SLOT(crop())); + connect(m_optWidget->bnCrop, TQT_SIGNAL(clicked()), this, TQT_SLOT(crop())); - connect(m_optWidget->intX, SIGNAL(valueChanged(int)), this, SLOT(setCropX(int))); - connect(m_optWidget->intY, SIGNAL(valueChanged(int)), this, SLOT(setCropY(int))); - connect(m_optWidget->intWidth, SIGNAL(valueChanged(int)), this, SLOT(setCropWidth(int))); - connect(m_optWidget->intHeight, SIGNAL(valueChanged(int)), this, SLOT(setCropHeight(int))); - connect(m_optWidget->doubleRatio, SIGNAL(valueChanged(double)), this, SLOT(setRatio( double ))); + connect(m_optWidget->intX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropX(int))); + connect(m_optWidget->intY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropY(int))); + connect(m_optWidget->intWidth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropWidth(int))); + connect(m_optWidget->intHeight, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropHeight(int))); + connect(m_optWidget->doubleRatio, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(setRatio( double ))); return m_optWidget; } -QWidget* KisToolCrop::optionWidget() +TQWidget* KisToolCrop::optionWidget() { return m_optWidget; } @@ -728,7 +728,7 @@ void KisToolCrop::setup(KActionCollection *collection) "tool_crop", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -740,31 +740,31 @@ void KisToolCrop::setup(KActionCollection *collection) } } -QRect toQRect(double x, double y, int w, int h) +TQRect toTQRect(double x, double y, int w, int h) { - return QRect(int(x), int(y), w, h); + return TQRect(int(x), int(y), w, h); } -QRegion KisToolCrop::handles(QRect rect) +TQRegion KisToolCrop::handles(TQRect rect) { - QRegion handlesRegion; + TQRegion handlesRegion; //add handle at the lower right corner - handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0, QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0, TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the upper right corner - handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add rectangle at the lower left corner - handlesRegion += toQRect( 0 - m_handleSize / 2.0 , QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( 0 - m_handleSize / 2.0 , TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add rectangle at the upper left corner - handlesRegion += toQRect( 0 - m_handleSize / 2.0, 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( 0 - m_handleSize / 2.0, 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the lower edge of the rectangle - handlesRegion += toQRect( ( QABS( rect.width() ) - m_handleSize ) / 2.0 , QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( ( TQABS( rect.width() ) - m_handleSize ) / 2.0 , TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the right edge of the rectangle - handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0 , ( QABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0 , ( TQABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); //add handle at the upper edge of the rectangle - handlesRegion += toQRect( ( QABS( rect.width() ) - m_handleSize ) / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( ( TQABS( rect.width() ) - m_handleSize ) / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the left edge of the rectangle - handlesRegion += toQRect( 0 - m_handleSize / 2.0, ( QABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( 0 - m_handleSize / 2.0, ( TQABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); //move the handles to the correct position if( rect.width() >= 0 && rect.height() >= 0) @@ -773,30 +773,30 @@ QRegion KisToolCrop::handles(QRect rect) } else if( rect.width() < 0 && rect.height() >= 0) { - handlesRegion.translate ( rect.x() - QABS( rect.width() ), rect.y() ); + handlesRegion.translate ( rect.x() - TQABS( rect.width() ), rect.y() ); } else if( rect.width() >= 0 && rect.height() < 0) { - handlesRegion.translate ( rect.x(), rect.y() - QABS( rect.height() ) ); + handlesRegion.translate ( rect.x(), rect.y() - TQABS( rect.height() ) ); } else if( rect.width() < 0 && rect.height() < 0) { - handlesRegion.translate ( rect.x() - QABS( rect.width() ), rect.y() - QABS( rect.height() ) ); + handlesRegion.translate ( rect.x() - TQABS( rect.width() ), rect.y() - TQABS( rect.height() ) ); } return handlesRegion; } -Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) +TQ_INT32 KisToolCrop::mouseOnHandle(TQPoint currentViewPoint) { KisCanvasController *controller = m_subject->canvasController(); Q_ASSERT(controller); - QPoint start = controller->windowToView(m_rectCrop.topLeft()); - QPoint end = controller->windowToView(m_rectCrop.bottomRight()); + TQPoint start = controller->windowToView(m_rectCrop.topLeft()); + TQPoint end = controller->windowToView(m_rectCrop.bottomRight()); - Q_INT32 startx; - Q_INT32 starty; - Q_INT32 endx; - Q_INT32 endy; + TQ_INT32 startx; + TQ_INT32 starty; + TQ_INT32 endx; + TQ_INT32 endy; if(start.x()<=end.x()) { startx=start.x(); @@ -818,7 +818,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) endy=start.y(); } - if ( toQRect ( startx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + if ( toTQRect ( startx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -827,7 +827,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return UpperLeft; } - else if ( toQRect ( startx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -836,7 +836,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return LowerLeft; } - else if ( toQRect ( endx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( endx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -845,7 +845,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return UpperRight; } - else if ( toQRect ( endx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( endx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -854,7 +854,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return LowerRight; } - else if ( toQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -862,7 +862,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Upper; } - else if ( toQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, endy - m_handleSize / 2, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, endy - m_handleSize / 2, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -870,7 +870,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Lower; } - else if ( toQRect ( startx - m_handleSize / 2.0, starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx - m_handleSize / 2.0, starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -878,7 +878,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Left; } - else if ( toQRect ( endx - m_handleSize / 2.0 , starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( endx - m_handleSize / 2.0 , starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -886,14 +886,14 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Right; } - else if ( toQRect ( startx , starty, endx - startx , endy - starty ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx , starty, endx - startx , endy - starty ).tqcontains( currentViewPoint ) ) { return Inside; } else return None; } -void KisToolCrop::setMoveResizeCursor (Q_INT32 handle) +void KisToolCrop::setMoveResizeCursor (TQ_INT32 handle) { switch (handle) { diff --git a/krita/plugins/tools/tool_crop/kis_tool_crop.h b/krita/plugins/tools/tool_crop/kis_tool_crop.h index 538e4158..5be2daa2 100644 --- a/krita/plugins/tools/tool_crop/kis_tool_crop.h +++ b/krita/plugins/tools/tool_crop/kis_tool_crop.h @@ -21,26 +21,27 @@ #ifndef KIS_TOOL_CROP_H_ #define KIS_TOOL_CROP_H_ -#include -#include +#include +#include #include #include -class QRect; -class QCursor; +class TQRect; +class TQCursor; class WdgToolCrop; /** * Crop tool * * TODO: - crop from selection -- i.e, set crop outline to the exact bounds of the selection. - * - (when moving to Qt 4: replace rectangle with darker, dimmer overlay layer + * - (when moving to TQt 4: replace rectangle with darker, dimmer overlay layer * like we have for selections right now) */ class KisToolCrop : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: @@ -49,14 +50,14 @@ public: virtual void update(KisCanvasSubject *subject); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); @@ -70,16 +71,16 @@ public slots: private: void clearRect(); - QRegion handles(QRect rect); + TQRegion handles(TQRect rect); void paintOutlineWithHandles(); - void paintOutlineWithHandles(KisCanvasPainter& gc, const QRect& rc); - Q_INT32 mouseOnHandle (const QPoint currentViewPoint); - void setMoveResizeCursor (Q_INT32 handle); + void paintOutlineWithHandles(KisCanvasPainter& gc, const TQRect& rc); + TQ_INT32 mouseOnHandle (const TQPoint currentViewPoint); + void setMoveResizeCursor (TQ_INT32 handle); void validateSelection(bool updateratio = true); - void setOptionWidgetX(Q_INT32 x); - void setOptionWidgetY(Q_INT32 y); - void setOptionWidgetWidth(Q_INT32 x); - void setOptionWidgetHeight(Q_INT32 y); + void setOptionWidgetX(TQ_INT32 x); + void setOptionWidgetY(TQ_INT32 y); + void setOptionWidgetWidth(TQ_INT32 x); + void setOptionWidgetHeight(TQ_INT32 y); void setOptionWidgetRatio(double ratio); private slots: @@ -91,26 +92,26 @@ private slots: void setCropHeight(int y); void setRatio(double ratio); - inline QRect realRectCrop() { QRect r = m_rectCrop; r.setSize(r.size() - QSize(1,1)); return r; } + inline TQRect realRectCrop() { TQRect r = m_rectCrop; r.setSize(r.size() - TQSize(1,1)); return r; } private: void updateWidgetValues(bool updateratio = true); KisCanvasSubject *m_subject; - QRect m_rectCrop; // Is the coordinate of the outline rect and not of the region to crop (to get the region to crop you need to remove 1 to width and height -// QPoint m_startPos; -// QPoint m_endPos; + TQRect m_rectCrop; // Is the coordinate of the outline rect and not of the region to crop (to get the region to crop you need to remove 1 to width and height +// TQPoint m_startPos; +// TQPoint m_endPos; bool m_selecting; - QPoint m_dragStart; - QPoint m_dragStop; + TQPoint m_dragStart; + TQPoint m_dragStop; WdgToolCrop* m_optWidget; - Q_INT32 m_handleSize; - QRegion m_handlesRegion; + TQ_INT32 m_handleSize; + TQRegion m_handlesRegion; bool m_haveCropSelection; - Q_INT32 m_dx, m_dy; - Q_INT32 m_mouseOnHandleType; - QCursor m_cropCursor; + TQ_INT32 m_dx, m_dy; + TQ_INT32 m_mouseOnHandleType; + TQCursor m_cropCursor; enum handleType { diff --git a/krita/plugins/tools/tool_crop/tool_crop.cc b/krita/plugins/tools/tool_crop/tool_crop.cc index 542af31b..7090b713 100644 --- a/krita/plugins/tools/tool_crop/tool_crop.cc +++ b/krita/plugins/tools/tool_crop/tool_crop.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -42,14 +42,14 @@ typedef KGenericFactory ToolCropFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolcrop, ToolCropFactory( "krita" ) ) -ToolCrop::ToolCrop(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolCrop::ToolCrop(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolCropFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add(new KisToolCropFactory()); } diff --git a/krita/plugins/tools/tool_crop/tool_crop.h b/krita/plugins/tools/tool_crop/tool_crop.h index 1ebe9064..df5d7c28 100644 --- a/krita/plugins/tools/tool_crop/tool_crop.h +++ b/krita/plugins/tools/tool_crop/tool_crop.h @@ -29,8 +29,9 @@ class KisView; class ToolCrop : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolCrop(QObject *parent, const char *name, const QStringList &); + ToolCrop(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolCrop(); private: diff --git a/krita/plugins/tools/tool_crop/wdg_tool_crop.ui b/krita/plugins/tools/tool_crop/wdg_tool_crop.ui index 8099af7c..4f857cf9 100644 --- a/krita/plugins/tools/tool_crop/wdg_tool_crop.ui +++ b/krita/plugins/tools/tool_crop/wdg_tool_crop.ui @@ -1,6 +1,6 @@ WdgToolCrop - + WdgToolCrop @@ -25,9 +25,9 @@ 0 - + - layout3 + tqlayout3 @@ -39,7 +39,7 @@ 3 - + textLabel1 @@ -66,7 +66,7 @@ 1000000000 - + boolWidth @@ -93,7 +93,7 @@ 1000000000 - + boolHeight @@ -104,7 +104,7 @@ Will keep the height of the crop constant - + textLabel3 @@ -123,7 +123,7 @@ 2 - + boolRatio @@ -136,9 +136,9 @@ - + - layout9 + tqlayout9 @@ -147,7 +147,7 @@ 0 - + Layer @@ -165,7 +165,7 @@ 1 - + bnCrop @@ -185,7 +185,7 @@ Expanding - + 20 16 @@ -204,7 +204,7 @@ cmbType bnCrop - + knuminput.h knuminput.h diff --git a/krita/plugins/tools/tool_curves/kis_curve_framework.cc b/krita/plugins/tools/tool_curves/kis_curve_framework.cc index 2ccb87a4..416d3bfd 100644 --- a/krita/plugins/tools/tool_curves/kis_curve_framework.cc +++ b/krita/plugins/tools/tool_curves/kis_curve_framework.cc @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include "kis_point.h" #include "kis_curve_framework.h" @@ -79,12 +79,12 @@ KisCurve KisCurve::selectedPivots(bool selected) KisCurve KisCurve::subCurve(const KisPoint& tend) { - return subCurve(find(tend).previousPivot(),find(tend)); + return subCurve(tqfind(tend).previousPivot(),tqfind(tend)); } KisCurve KisCurve::subCurve(const CurvePoint& tend) { - return subCurve(find(tend).previousPivot(),find(tend)); + return subCurve(tqfind(tend).previousPivot(),tqfind(tend)); } KisCurve KisCurve::subCurve(iterator tend) @@ -94,12 +94,12 @@ KisCurve KisCurve::subCurve(iterator tend) KisCurve KisCurve::subCurve(const KisPoint& tstart, const KisPoint& tend) { - return subCurve(find(tstart),find(tend)); + return subCurve(tqfind(tstart),tqfind(tend)); } KisCurve KisCurve::subCurve(const CurvePoint& tstart, const CurvePoint& tend) { - return subCurve(find(tstart),find(tend)); + return subCurve(tqfind(tstart),tqfind(tend)); } KisCurve KisCurve::subCurve(iterator tstart, iterator tend) @@ -137,7 +137,7 @@ KisCurve::iterator KisCurve::deleteCurve (const KisPoint& pos1, const KisPoint& KisCurve::iterator KisCurve::deleteCurve (const CurvePoint& pos1, const CurvePoint& pos2) { - return deleteCurve (find(pos1),find(pos2)); + return deleteCurve (tqfind(pos1),tqfind(pos2)); } KisCurve::iterator KisCurve::deleteCurve (KisCurve::iterator pos1, KisCurve::iterator pos2) @@ -154,12 +154,12 @@ KisCurve::iterator KisCurve::deleteCurve (KisCurve::iterator pos1, KisCurve::ite KisCurve::iterator KisCurve::selectPivot(const KisPoint& pt, bool isSelected) { - return selectPivot(find(CurvePoint(pt,true)),isSelected); + return selectPivot(tqfind(CurvePoint(pt,true)),isSelected); } KisCurve::iterator KisCurve::selectPivot(const CurvePoint& pt, bool isSelected) { - return selectPivot(find(pt),isSelected); + return selectPivot(tqfind(pt),isSelected); } KisCurve::iterator KisCurve::selectPivot(KisCurve::iterator it, bool isSelected) @@ -171,7 +171,7 @@ KisCurve::iterator KisCurve::selectPivot(KisCurve::iterator it, bool isSelected) } KisCurve selected = pivots(); for (iterator i = selected.begin(); i != selected.end(); i++) - (*find((*i))).setSelected(sel); + (*tqfind((*i))).setSelected(sel); (*it).setSelected(isSelected); return it; @@ -184,7 +184,7 @@ KisCurve::iterator KisCurve::movePivot(const KisPoint& oldPt, const KisPoint& ne KisCurve::iterator KisCurve::movePivot(const CurvePoint& oldPt, const KisPoint& newPt) { - return movePivot(find(oldPt), newPt); + return movePivot(tqfind(oldPt), newPt); } KisCurve::iterator KisCurve::movePivot(KisCurve::iterator it, const KisPoint& newPt) @@ -213,7 +213,7 @@ void KisCurve::deletePivot (const KisPoint& pt) void KisCurve::deletePivot (const CurvePoint& pt) { - deletePivot(find(pt)); + deletePivot(tqfind(pt)); } void KisCurve::deletePivot (KisCurve::iterator it) diff --git a/krita/plugins/tools/tool_curves/kis_curve_framework.h b/krita/plugins/tools/tool_curves/kis_curve_framework.h index 23e326c8..c27369aa 100644 --- a/krita/plugins/tools/tool_curves/kis_curve_framework.h +++ b/krita/plugins/tools/tool_curves/kis_curve_framework.h @@ -78,8 +78,8 @@ public: void setHint(int h) {m_hint = h;} }; -typedef QValueList PointList; -typedef QValueList::iterator BaseIterator; +typedef TQValueList PointList; +typedef TQValueList::iterator BaseIterator; class CurveIterator; @@ -130,10 +130,10 @@ public: iterator begin() const; iterator lastIterator() const; iterator end() const; - iterator find(const CurvePoint& pt); - iterator find(const KisPoint& pt); - iterator find(iterator it, const CurvePoint& pt); - iterator find(iterator it, const KisPoint& pt); + iterator tqfind(const CurvePoint& pt); + iterator tqfind(const KisPoint& pt); + iterator tqfind(iterator it, const CurvePoint& pt); + iterator tqfind(iterator it, const KisPoint& pt); KisCurve pivots(); KisCurve selectedPivots(bool = true); @@ -312,34 +312,34 @@ inline KisCurve::iterator KisCurve::end() const return iterator(*this,m_curve.end()); } -inline KisCurve::iterator KisCurve::find (const CurvePoint& pt) +inline KisCurve::iterator KisCurve::tqfind (const CurvePoint& pt) { - return iterator(*this,m_curve.find(pt)); + return iterator(*this,m_curve.tqfind(pt)); } -inline KisCurve::iterator KisCurve::find (const KisPoint& pt) +inline KisCurve::iterator KisCurve::tqfind (const KisPoint& pt) { - return iterator(*this,m_curve.find(CurvePoint(pt))); + return iterator(*this,m_curve.tqfind(CurvePoint(pt))); } -inline KisCurve::iterator KisCurve::find (KisCurve::iterator it, const CurvePoint& pt) +inline KisCurve::iterator KisCurve::tqfind (KisCurve::iterator it, const CurvePoint& pt) { - return iterator(*this,m_curve.find(it.position(),pt)); + return iterator(*this,m_curve.tqfind(it.position(),pt)); } -inline KisCurve::iterator KisCurve::find (iterator it, const KisPoint& pt) +inline KisCurve::iterator KisCurve::tqfind (iterator it, const KisPoint& pt) { - return iterator(*this,m_curve.find(it.position(),CurvePoint(pt))); + return iterator(*this,m_curve.tqfind(it.position(),CurvePoint(pt))); } inline void KisCurve::calculateCurve(const KisPoint& start, const KisPoint& end, KisCurve::iterator it) { - calculateCurve(find(CurvePoint(start)),find(CurvePoint(end)),it); + calculateCurve(tqfind(CurvePoint(start)),tqfind(CurvePoint(end)),it); } inline void KisCurve::calculateCurve(const CurvePoint& start, const CurvePoint& end, KisCurve::iterator it) { - calculateCurve(find(start),find(end),it); + calculateCurve(tqfind(start),tqfind(end),it); } inline void KisCurve::calculateCurve(KisCurve::iterator, KisCurve::iterator, KisCurve::iterator) diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier.cc b/krita/plugins/tools/tool_curves/kis_tool_bezier.cc index b6d16f78..cd9e7cf4 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier.cc @@ -20,9 +20,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -260,7 +260,7 @@ void KisCurveBezier::deletePivot (KisCurve::iterator it) } } -KisToolBezier::KisToolBezier(const QString& UIName) +KisToolBezier::KisToolBezier(const TQString& UIName) : super(UIName) { m_derivated = new KisCurveBezier; @@ -276,20 +276,20 @@ KisToolBezier::~KisToolBezier() } -KisCurve::iterator KisToolBezier::handleUnderMouse(const QPoint& pos) +KisCurve::iterator KisToolBezier::handleUnderMouse(const TQPoint& pos) { - QPoint qpos; + TQPoint qpos; KisCurve pivs = m_curve->pivots(), inHandle; KisCurve::iterator it; int hint; for (it = pivs.begin(); it != pivs.end(); it++) { - qpos = m_subject->canvasController()->windowToView((*it).point().toQPoint()); + qpos = m_subject->canvasController()->windowToView((*it).point().toTQPoint()); hint = (*it).hint(); if (hint != BEZIERENDHINT && !m_derivated->groupSelected(it)) continue; if (hint == BEZIERENDHINT && (m_actionOptions & SHIFTOPTION)) continue; - if (pivotRect(qpos).contains(pos)) { + if (pivotRect(qpos).tqcontains(pos)) { inHandle.pushPoint((*it)); if (hint == BEZIERENDHINT && !(m_actionOptions & SHIFTOPTION)) break; @@ -300,7 +300,7 @@ KisCurve::iterator KisToolBezier::handleUnderMouse(const QPoint& pos) if (inHandle.isEmpty()) return m_curve->end(); - return m_curve->find(inHandle.last()); + return m_curve->tqfind(inHandle.last()); } KisCurve::iterator KisToolBezier::drawPoint (KisCanvasPainter& gc, KisCurve::iterator point) @@ -321,11 +321,11 @@ KisCurve::iterator KisToolBezier::drawPoint (KisCanvasPainter& gc, KisCurve::ite if (control2 != m_curve->end()) { point = control2; - QPointArray vec(4); - vec[0] = controller->windowToView((*origin).point().toQPoint()); - vec[1] = controller->windowToView((*control1).point().toQPoint()); - vec[2] = controller->windowToView((*control2).point().toQPoint()); - vec[3] = controller->windowToView((*destination).point().toQPoint()); + TQPointArray vec(4); + vec[0] = controller->windowToView((*origin).point().toTQPoint()); + vec[1] = controller->windowToView((*control1).point().toTQPoint()); + vec[2] = controller->windowToView((*control2).point().toTQPoint()); + vec[3] = controller->windowToView((*destination).point().toTQPoint()); gc.drawCubicBezier(vec); } @@ -341,14 +341,14 @@ void KisToolBezier::drawPivotHandle (KisCanvasPainter& gc, KisCurve::iterator po KisCanvasController *controller = m_subject->canvasController(); - QPoint endpPos = controller->windowToView((*point).point().toQPoint()); + TQPoint endpPos = controller->windowToView((*point).point().toTQPoint()); if (!m_derivated->groupSelected(point)) { gc.setPen(m_pivotPen); gc.drawRoundRect(pivotRect(endpPos),m_pivotRounding,m_pivotRounding); } else { - QPoint nextControlPos = controller->windowToView((*point.next()).point().toQPoint()); - QPoint prevControlPos = controller->windowToView((*point.previousPivot()).point().toQPoint()); + TQPoint nextControlPos = controller->windowToView((*point.next()).point().toTQPoint()); + TQPoint prevControlPos = controller->windowToView((*point.previousPivot()).point().toTQPoint()); gc.setPen(m_selectedPivotPen); gc.drawRoundRect(selectedPivotRect(endpPos),m_selectedPivotRounding,m_selectedPivotRounding); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier.h b/krita/plugins/tools/tool_curves/kis_tool_bezier.h index ec4ce7bb..09f5b77d 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier.h +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier.h @@ -77,14 +77,15 @@ class KisToolBezier : public KisToolCurve { typedef KisToolCurve super; Q_OBJECT + TQ_OBJECT public: - KisToolBezier(const QString&); + KisToolBezier(const TQString&); virtual ~KisToolBezier(); protected: - virtual KisCurve::iterator handleUnderMouse(const QPoint& pos); + virtual KisCurve::iterator handleUnderMouse(const TQPoint& pos); virtual void drawPivotHandle(KisCanvasPainter& gc, KisCurve::iterator point); virtual KisCurve::iterator drawPoint(KisCanvasPainter& gc, KisCurve::iterator point); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc index 94ee2b79..a29d0ca0 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc @@ -19,13 +19,13 @@ */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -95,13 +95,13 @@ void KisToolBezierPaint::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Bezier"), "tool_bezier_paint", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h index 052f23e6..fb358aea 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h @@ -29,6 +29,7 @@ class KisToolBezierPaint : public KisToolBezier { typedef KisToolBezier super; Q_OBJECT + TQ_OBJECT public: KisToolBezierPaint(); @@ -36,7 +37,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 7; } + virtual TQ_UINT32 priority() { return 7; } protected: @@ -56,7 +57,7 @@ public: t->setup(ac); return t; } - virtual KisID id() { return KisID("beziershape", i18n("Bezier Painting Tool")); } + virtual KisID id() { return KisID("beziertqshape", i18n("Bezier Painting Tool")); } }; #endif //__KIS_TOOL_CURVE_PAINT_H_ diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc index 94ebde37..c4649f24 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc @@ -19,13 +19,13 @@ */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -67,9 +67,9 @@ KisToolBezierSelect::~KisToolBezierSelect() } -QValueVector KisToolBezierSelect::convertCurve() +TQValueVector KisToolBezierSelect::convertCurve() { - QValueVector points; + TQValueVector points; for (KisCurve::iterator i = m_curve->begin(); i != m_curve->end(); i++) { if (((*i).hint() != BEZIERPREVCONTROLHINT) && ((*i).hint() != BEZIERNEXTCONTROLHINT)) @@ -84,13 +84,13 @@ void KisToolBezierSelect::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Bezier"), "tool_bezier_select", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h index ac596eeb..9b7cd975 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h @@ -29,6 +29,7 @@ class KisToolBezierSelect : public KisToolBezier { typedef KisToolBezier super; Q_OBJECT + TQ_OBJECT public: KisToolBezierSelect(); @@ -36,11 +37,11 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SELECT; } - virtual Q_UINT32 priority() { return 10; } + virtual TQ_UINT32 priority() { return 10; } protected: - virtual QValueVector convertCurve(); + virtual TQValueVector convertCurve(); }; diff --git a/krita/plugins/tools/tool_curves/kis_tool_curve.cc b/krita/plugins/tools/tool_curves/kis_tool_curve.cc index 526311e3..3ca41af6 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_curve.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_curve.cc @@ -21,10 +21,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -53,17 +53,17 @@ #include "kis_curve_framework.h" #include "kis_tool_curve.h" -QRect KisToolCurve::pivotRect (const QPoint& pos) +TQRect KisToolCurve::pivotRect (const TQPoint& pos) { - return QRect (pos-QPoint(4,4),pos+QPoint(4,4)); + return TQRect (pos-TQPoint(4,4),pos+TQPoint(4,4)); } -QRect KisToolCurve::selectedPivotRect (const QPoint& pos) +TQRect KisToolCurve::selectedPivotRect (const TQPoint& pos) { - return QRect (pos-QPoint(5,5),pos+QPoint(5,5)); + return TQRect (pos-TQPoint(5,5),pos+TQPoint(5,5)); } -KisToolCurve::KisToolCurve(const QString& UIName) +KisToolCurve::KisToolCurve(const TQString& UIName) : super(UIName) { m_UIName = UIName; @@ -75,9 +75,9 @@ KisToolCurve::KisToolCurve(const QString& UIName) m_dragging = false; m_draggingCursor = false; m_drawPivots = true; - m_drawingPen = QPen(Qt::white, 0, Qt::SolidLine); - m_pivotPen = QPen(Qt::gray, 0, Qt::SolidLine); - m_selectedPivotPen = QPen(Qt::yellow, 0, Qt::SolidLine); + m_drawingPen = TQPen(TQt::white, 0, TQt::SolidLine); + m_pivotPen = TQPen(TQt::gray, 0, TQt::SolidLine); + m_selectedPivotPen = TQPen(TQt::yellow, 0, TQt::SolidLine); m_pivotRounding = m_selectedPivotRounding = 55; m_actionOptions = NOOPTIONS; @@ -118,13 +118,13 @@ void KisToolCurve::buttonPress(KisButtonPressEvent *event) if (event->button() == Qt::LeftButton) { m_dragging = true; m_currentPoint = event->pos(); - PointPair temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toQPoint())); + PointPair temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !(m_actionOptions)) { draw(true, true); m_curve->selectAll(false); draw(true, true); draw(m_curve->end()); - m_previous = m_curve->find(m_curve->last()); + m_previous = m_curve->tqfind(m_curve->last()); m_current = m_curve->pushPivot(event->pos()); if (m_curve->pivots().count() > 1) m_curve->calculateCurve(m_previous,m_current,m_current); @@ -143,28 +143,28 @@ void KisToolCurve::buttonPress(KisButtonPressEvent *event) } } -void KisToolCurve::keyPress(QKeyEvent *event) +void KisToolCurve::keyPress(TQKeyEvent *event) { - if (event->key() == Qt::Key_Return) { + if (event->key() == TQt::Key_Return) { m_dragging = false; commitCurve(); } else - if (event->key() == Qt::Key_Escape) { + if (event->key() == TQt::Key_Escape) { m_dragging = false; draw(false); m_curve->clear(); } else - if (event->key() == Qt::Key_Delete) { + if (event->key() == TQt::Key_Delete) { draw(false); m_dragging = false; m_curve->deleteSelected(); - m_current = m_curve->find(m_curve->last()); + m_current = m_curve->tqfind(m_curve->last()); m_previous = m_curve->selectPivot(m_current); draw(false); } } -void KisToolCurve::keyRelease(QKeyEvent *) +void KisToolCurve::keyRelease(TQKeyEvent *) { } @@ -183,7 +183,7 @@ void KisToolCurve::doubleClick(KisDoubleClickEvent *) void KisToolCurve::move(KisMoveEvent *event) { updateOptions(event->state()); - PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toQPoint())); + PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !m_dragging) { if (m_draggingCursor) { setCursor(KisCursor::load(m_cursor, 6, 6)); @@ -220,10 +220,10 @@ double pointToSegmentDistance(const KisPoint& p, const KisPoint& l0, const KisPo return distance; } -PointPair KisToolCurve::pointUnderMouse(const QPoint& pos) +PointPair KisToolCurve::pointUnderMouse(const TQPoint& pos) { KisCurve::iterator it, next; - QPoint pos1, pos2; + TQPoint pos1, pos2; it = handleUnderMouse(pos); if (it != m_curve->end()) return PointPair(it,true); @@ -234,8 +234,8 @@ PointPair KisToolCurve::pointUnderMouse(const QPoint& pos) return PointPair(m_curve->end(),false); if ((*it).hint() > LINEHINT || (*next).hint() > LINEHINT) continue; - pos1 = m_subject->canvasController()->windowToView((*it).point().toQPoint()); - pos2 = m_subject->canvasController()->windowToView((*next).point().toQPoint()); + pos1 = m_subject->canvasController()->windowToView((*it).point().toTQPoint()); + pos2 = m_subject->canvasController()->windowToView((*next).point().toTQPoint()); if (pos1 == pos2) continue; if (pointToSegmentDistance(pos,pos1,pos2) <= MAXDISTANCE) @@ -245,17 +245,17 @@ PointPair KisToolCurve::pointUnderMouse(const QPoint& pos) return PointPair(it,false); } -KisCurve::iterator KisToolCurve::handleUnderMouse(const QPoint& pos) +KisCurve::iterator KisToolCurve::handleUnderMouse(const TQPoint& pos) { KisCurve pivs = m_curve->pivots(), inHandle; KisCurve::iterator it; for (it = pivs.begin(); it != pivs.end(); it++) { - if (pivotRect(m_subject->canvasController()->windowToView((*it).point().toQPoint())).contains(pos)) + if (pivotRect(m_subject->canvasController()->windowToView((*it).point().toTQPoint())).tqcontains(pos)) inHandle.pushPoint((*it)); } if (inHandle.isEmpty()) return m_curve->end(); - return m_curve->find(inHandle.last()); + return m_curve->tqfind(inHandle.last()); } KisCurve::iterator KisToolCurve::selectByMouse(KisCurve::iterator it) @@ -278,13 +278,13 @@ int KisToolCurve::updateOptions(int key) { int options = 0x0000; - if (key & Qt::ControlButton) + if (key & TQt::ControlButton) options |= CONTROLOPTION; - if (key & Qt::ShiftButton) + if (key & TQt::ShiftButton) options |= SHIFTOPTION; - if (key & Qt::AltButton) + if (key & TQt::AltButton) options |= ALTOPTION; if (options != m_actionOptions) { @@ -317,7 +317,7 @@ void KisToolCurve::draw(KisCurve::iterator inf, bool pivotonly, bool minimal) return; gc->setPen(m_drawingPen); - gc->setRasterOp(Qt::XorROP); + gc->setRasterOp(TQt::XorROP); KisCurve::iterator it, finish; @@ -344,8 +344,8 @@ void KisToolCurve::draw(KisCurve::iterator inf, bool pivotonly, bool minimal) return; } for (KisCurve::iterator i = sel.begin(); i != sel.end(); i++) { - it = m_curve->find(*i).previousPivot(); - finish = m_curve->find(*i).nextPivot(); + it = m_curve->tqfind(*i).previousPivot(); + finish = m_curve->tqfind(*i).nextPivot(); if ((*finish).isSelected()) finish = finish.previousPivot(); while (it != finish) { @@ -374,8 +374,8 @@ KisCurve::iterator KisToolCurve::drawPoint(KisCanvasPainter& gc, KisCurve::itera { KisCanvasController *controller = m_subject->canvasController(); - QPoint pos1, pos2; - pos1 = controller->windowToView((*point).point().toQPoint()); + TQPoint pos1, pos2; + pos1 = controller->windowToView((*point).point().toTQPoint()); switch ((*point).hint()) { case POINTHINT: @@ -385,7 +385,7 @@ KisCurve::iterator KisToolCurve::drawPoint(KisCanvasPainter& gc, KisCurve::itera case LINEHINT: gc.drawPoint(pos1); if (++point != m_curve->end() && (*point).hint() <= LINEHINT) { - pos2 = controller->windowToView((*point).point().toQPoint()); + pos2 = controller->windowToView((*point).point().toTQPoint()); gc.drawLine(pos1,pos2); } break; @@ -401,7 +401,7 @@ void KisToolCurve::drawPivotHandle(KisCanvasPainter& gc, KisCurve::iterator poin KisCanvasController *controller = m_subject->canvasController(); if (m_drawPivots) { - QPoint pos = controller->windowToView((*point).point().toQPoint()); + TQPoint pos = controller->windowToView((*point).point().toTQPoint()); if ((*point).isSelected()) { gc.setPen(m_selectedPivotPen); gc.drawRoundRect(selectedPivotRect(pos),m_selectedPivotRounding,m_selectedPivotRounding); @@ -418,7 +418,7 @@ void KisToolCurve::paint(KisCanvasPainter&) draw(false); } -void KisToolCurve::paint(KisCanvasPainter&, const QRect&) +void KisToolCurve::paint(KisCanvasPainter&, const TQRect&) { draw(false); } @@ -487,9 +487,9 @@ KisCurve::iterator KisToolCurve::paintPoint (KisPainter& painter, KisCurve::iter return point; } -QValueVector KisToolCurve::convertCurve() +TQValueVector KisToolCurve::convertCurve() { - QValueVector points; + TQValueVector points; for (KisCurve::iterator i = m_curve->begin(); i != m_curve->end(); i++) if ((*i).hint() != NOHINTS) @@ -500,7 +500,7 @@ QValueVector KisToolCurve::convertCurve() void KisToolCurve::selectCurve() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = m_currentImage->activeDevice(); bool hasSelection = dev->hasSelection(); KisSelectedTransaction *t = 0; @@ -513,7 +513,7 @@ void KisToolCurve::selectCurve() KisPainter painter(selection.data()); - painter.setPaintColor(KisColor(Qt::black, selection->colorSpace())); + painter.setPaintColor(KisColor(TQt::black, selection->colorSpace())); painter.setFillStyle(KisPainter::FillStyleForegroundColor); painter.setStrokeStyle(KisPainter::StrokeStyleNone); painter.setBrush(m_subject->currentBrush()); @@ -536,7 +536,7 @@ void KisToolCurve::selectCurve() if(hasSelection) { - QRect dirty(painter.dirtyRect()); + TQRect dirty(painter.dirtyRect()); dev->setDirty(dirty); dev->emitSelectionChanged(dirty); } else { @@ -547,17 +547,17 @@ void KisToolCurve::selectCurve() if (m_currentImage->undo()) m_currentImage->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); draw(false); } -QWidget* KisToolCurve::createOptionWidget(QWidget* parent) +TQWidget* KisToolCurve::createOptionWidget(TQWidget* tqparent) { if (toolType() == TOOL_SHAPE || toolType() == TOOL_FREEHAND) - return super::createOptionWidget(parent); + return super::createOptionWidget(tqparent); else if (toolType() == TOOL_SELECT) - return createSelectionOptionWidget(parent); + return createSelectionOptionWidget(tqparent); else kdDebug(0) << "NO SUPPORT FOR THIS TOOL TYPE" << endl; return 0; @@ -568,21 +568,21 @@ void KisToolCurve::slotSetAction(int action) { m_selectAction =(enumSelectionMode)action; } -QWidget* KisToolCurve::createSelectionOptionWidget(QWidget* parent) +TQWidget* KisToolCurve::createSelectionOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(m_UIName); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolCurve::optionWidget() +TQWidget* KisToolCurve::optionWidget() { if (toolType() == TOOL_SELECT) return m_optWidget; diff --git a/krita/plugins/tools/tool_curves/kis_tool_curve.h b/krita/plugins/tools/tool_curves/kis_tool_curve.h index 17a0c418..d6552d47 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_curve.h +++ b/krita/plugins/tools/tool_curves/kis_tool_curve.h @@ -21,8 +21,8 @@ #ifndef KIS_TOOL_CURVE_H_ #define KIS_TOOL_CURVE_H_ -#include -#include +#include +#include #include "kis_selection.h" #include "kis_tool_paint.h" @@ -31,11 +31,11 @@ #include "kis_curve_framework.h" -class QRect; +class TQRect; class KisPainter; class KisSelectionOptions; -typedef QPair PointPair; +typedef TQPair PointPair; const double MAXDISTANCE = 2.5; double pointToSegmentDistance(const KisPoint& p, const KisPoint& l0, const KisPoint& l1); @@ -44,20 +44,21 @@ class KisToolCurve : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: - KisToolCurve(const QString& UIName); + KisToolCurve(const TQString& UIName); virtual ~KisToolCurve(); virtual void update (KisCanvasSubject *subject); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); virtual void doubleClick(KisDoubleClickEvent *event); - virtual void keyPress(QKeyEvent *event); - virtual void keyRelease(QKeyEvent *event); + virtual void keyPress(TQKeyEvent *event); + virtual void keyRelease(TQKeyEvent *event); public slots: @@ -66,7 +67,7 @@ public slots: protected: virtual void paint(KisCanvasPainter&); - virtual void paint(KisCanvasPainter&, const QRect&); + virtual void paint(KisCanvasPainter&, const TQRect&); /* ********************** * * KisToolCurve interface * @@ -77,8 +78,8 @@ protected: */ virtual int updateOptions(int); - virtual PointPair pointUnderMouse(const QPoint& pos); - virtual KisCurve::iterator handleUnderMouse(const QPoint& pos); + virtual PointPair pointUnderMouse(const TQPoint& pos); + virtual KisCurve::iterator handleUnderMouse(const TQPoint& pos); /* * Select the needed points; called after pointUnderMouse @@ -108,7 +109,7 @@ protected: /* * Called by selectCurve(), this convert m_curve to a vector of KisPoint in order to be used by paintPolygon() */ - virtual QValueVector convertCurve(); + virtual TQValueVector convertCurve(); /* * Called by paintCurve(), it behaves essentially like drawPoint(), but this uses a KisPainter @@ -133,12 +134,12 @@ protected: /* * Return the rect around a given point, assuming that that point is an unselected pivot */ - QRect pivotRect (const QPoint&); + TQRect pivotRect (const TQPoint&); /* * Same as above for selected pivots */ - QRect selectedPivotRect (const QPoint&); + TQRect selectedPivotRect (const TQPoint&); protected: @@ -151,9 +152,9 @@ protected: bool m_dragging; bool m_drawPivots; - QPen m_drawingPen; - QPen m_pivotPen; - QPen m_selectedPivotPen; + TQPen m_drawingPen; + TQPen m_pivotPen; + TQPen m_selectedPivotPen; int m_pivotRounding; int m_selectedPivotRounding; @@ -161,12 +162,12 @@ protected: bool m_supportMinimalDraw; bool m_draggingCursor; - QString m_transactionMessage; - QString m_cursor; + TQString m_transactionMessage; + TQString m_cursor; private: - QString m_UIName; + TQString m_UIName; /* ********************************** * @@ -178,12 +179,12 @@ public: /* * This initializes our Option Widget (called by createOptionWidget()) */ - virtual QWidget* createSelectionOptionWidget(QWidget* parent); + virtual TQWidget* createSelectionOptionWidget(TQWidget* tqparent); /* * This return our internal KisSelectionOptions if toolType() returns TOOL_SELECT */ - virtual QWidget* optionWidget(); + virtual TQWidget* optionWidget(); public slots: diff --git a/krita/plugins/tools/tool_curves/kis_tool_example.cc b/krita/plugins/tools/tool_curves/kis_tool_example.cc index 9fcc5d01..9458d966 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_example.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_example.cc @@ -19,9 +19,9 @@ */ -#include -#include -#include +#include +#include +#include #include #include @@ -88,13 +88,13 @@ void KisToolExample::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Example"), "tool_example", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_example.h b/krita/plugins/tools/tool_curves/kis_tool_example.h index af1d3574..ec1e8f8e 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_example.h +++ b/krita/plugins/tools/tool_curves/kis_tool_example.h @@ -37,6 +37,7 @@ class KisToolExample : public KisToolCurve { typedef KisToolCurve super; Q_OBJECT + TQ_OBJECT public: KisToolExample(); @@ -59,7 +60,7 @@ public: t->setup(ac); return t; } - virtual KisID id() { return KisID("exampleshape", i18n("Example Tool")); } + virtual KisID id() { return KisID("exampletqshape", i18n("Example Tool")); } }; diff --git a/krita/plugins/tools/tool_curves/kis_tool_moutline.cc b/krita/plugins/tools/tool_curves/kis_tool_moutline.cc index 75ab0205..1f0c4ac2 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_moutline.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_moutline.cc @@ -21,12 +21,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -77,18 +77,18 @@ const int PAGESTEP = 5; class Node { - QPoint m_pos; + TQPoint m_pos; int m_gCost; int m_hCost; int m_tCost; bool m_malus; - QPoint m_parent; + TQPoint m_parent; public: Node() { - m_pos = m_parent = QPoint(-1,-1); + m_pos = m_parent = TQPoint(-1,-1); m_gCost = m_hCost = m_tCost = 0; m_malus = false; } @@ -100,14 +100,14 @@ public: m_hCost = node.hCost(); m_tCost = node.tCost(); m_malus = node.malus(); - m_parent = node.parent(); + m_parent = node.tqparent(); } - Node(const QPoint& parent, const QPoint& pos, int g, int h, bool malus) + Node(const TQPoint& tqparent, const TQPoint& pos, int g, int h, bool malus) : m_pos(pos), m_hCost(h), m_malus(malus) { setGCost(g); - m_parent = parent; + m_parent = tqparent; } ~Node () { @@ -117,10 +117,10 @@ public: int hCost () const {return m_hCost;} int tCost () const {return m_tCost;} bool malus () const {return m_malus;} - QPoint pos () const {return m_pos;} + TQPoint pos () const {return m_pos;} int col () const {return m_pos.x();} int row () const {return m_pos.y();} - QPoint parent () const {return m_parent;} + TQPoint tqparent () const {return m_parent;} void setGCost (int g) { @@ -132,7 +132,7 @@ public: m_hCost = h; m_tCost = m_gCost+m_hCost; } - void setPos (const QPoint& pos) + void setPos (const TQPoint& pos) { m_pos = pos; } @@ -142,7 +142,7 @@ public: } void clear () { - m_pos = QPoint(-1,-1); + m_pos = TQPoint(-1,-1); } bool operator== (const Node& n2) const @@ -153,11 +153,11 @@ public: { return m_pos != n2.pos(); } - bool operator== (const QPoint& n2) const + bool operator== (const TQPoint& n2) const { return m_pos == n2; } - bool operator!= (const QPoint& n2) const + bool operator!= (const TQPoint& n2) const { return m_pos != n2; } @@ -170,10 +170,10 @@ public: return m_tCost > n2.tCost(); } - QValueList getNeighbor(const GrayMatrix& src, const Node& end) + TQValueList getNeighbor(const GrayMatrix& src, const Node& end) { - QPoint tmpdist; - QValueList temp; + TQPoint tmpdist; + TQValueList temp; int dcol, drow; int g, h; bool malus; @@ -183,7 +183,7 @@ public: for (int i = 0; i < 8; i++) { dcol = m_pos.x() + x[i]; drow = m_pos.y() + y[i]; - tmpdist = QPoint(dcol,drow) - end.pos(); + tmpdist = TQPoint(dcol,drow) - end.pos(); // I use src[0] here because all cols have same number of rows if (dcol == (int)src.count() || dcol < 0 || drow == (int)src[0].count() || drow < 0) @@ -197,17 +197,17 @@ public: else g = m_gCost + ORTHOGONAL_COST; h = ORTHOGONAL_COST * (abs(tmpdist.x()) + abs(tmpdist.y())); - temp.append(Node(m_pos,QPoint(dcol,drow),g,h,malus)); + temp.append(Node(m_pos,TQPoint(dcol,drow),g,h,malus)); } return temp; } }; -KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, - Q_INT32 i3, Q_INT32 i4, Q_INT32 i5, - Q_INT32 i6, Q_INT32 i7, Q_INT32 i8, - Q_INT32 factor, Q_INT32 offset ) +KisKernelSP createKernel( TQ_INT32 i0, TQ_INT32 i1, TQ_INT32 i2, + TQ_INT32 i3, TQ_INT32 i4, TQ_INT32 i5, + TQ_INT32 i6, TQ_INT32 i7, TQ_INT32 i8, + TQ_INT32 factor, TQ_INT32 offset ) { KisKernelSP kernel = new KisKernel(); kernel->width = 3; @@ -216,7 +216,7 @@ KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, kernel->factor = factor; kernel->offset = offset; - kernel->data = new Q_INT32[9]; + kernel->data = new TQ_INT32[9]; kernel->data[0] = i0; kernel->data[1] = i1; kernel->data[2] = i2; @@ -230,8 +230,8 @@ KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, return kernel; } -KisCurveMagnetic::KisCurveMagnetic (KisToolMagnetic *parent) - : m_parent(parent) +KisCurveMagnetic::KisCurveMagnetic (KisToolMagnetic *tqparent) + : m_parent(tqparent) { m_standardkeepselected = false; } @@ -263,11 +263,11 @@ void KisCurveMagnetic::calculateCurve (KisCurve::iterator p1, KisCurve::iterator return; if (m_parent->editingMode()) return; - QPoint start = (*p1).point().roundQPoint(); - QPoint end = (*p2).point().roundQPoint(); - QRect rc = QRect(start,end).normalize(); - rc.setTopLeft(rc.topLeft()+QPoint(-8,-8)); // Enlarge the view, so problems with gaussian blur can be removed - rc.setBottomRight(rc.bottomRight()+QPoint(8,8)); // and we are able to find paths that go beyond the rect. + TQPoint start = (*p1).point().roundTQPoint(); + TQPoint end = (*p2).point().roundTQPoint(); + TQRect rc = TQRect(start,end).normalize(); + rc.setTopLeft(rc.topLeft()+TQPoint(-8,-8)); // Enlarge the view, so problems with gaussian blur can be removed + rc.setBottomRight(rc.bottomRight()+TQPoint(8,8)); // and we are able to find paths that go beyond the rect. KisPaintDeviceSP src = m_parent->m_currentImage->activeDevice(); GrayMatrix dst = GrayMatrix(rc.width(),GrayCol(rc.height())); @@ -280,7 +280,7 @@ void KisCurveMagnetic::calculateCurve (KisCurve::iterator p1, KisCurve::iterator NodeMatrix openMatrix = NodeMatrix(rc.width(),NodeCol(rc.height())); NodeMatrix closedMatrix = NodeMatrix(rc.width(),NodeCol(rc.height())); - QPoint tl(rc.topLeft().x(),rc.topLeft().y()); + TQPoint tl(rc.topLeft().x(),rc.topLeft().y()); start -= tl; // Relative to the matrix end -= tl; // Relative to the matrix @@ -294,28 +294,28 @@ void KisCurveMagnetic::calculateCurve (KisCurve::iterator p1, KisCurve::iterator openSet.erase(openSet.begin()); openMatrix[current.col()][current.row()].clear(); - QValueList successors = current.getNeighbor(dst,endNode); - for (QValueList::iterator i = successors.begin(); i != successors.end(); i++) { + TQValueList successors = current.getNeighbor(dst,endNode); + for (TQValueList::iterator i = successors.begin(); i != successors.end(); i++) { int col = (*i).col(); int row = (*i).row(); if ((*i) == endNode) { - while (current.parent() != QPoint(-1,-1)) { + while (current.tqparent() != TQPoint(-1,-1)) { it = addPoint(it,tl+current.pos(),false,false,LINEHINT); - current = closedMatrix[current.parent().x()][current.parent().y()]; + current = closedMatrix[current.tqparent().x()][current.tqparent().y()]; } return; } Node *openNode = &openMatrix[col][row]; - if (*openNode != QPoint(-1,-1)) { + if (*openNode != TQPoint(-1,-1)) { if (*i > *openNode) continue; else { - openSet.erase(qFind(openSet.begin(),openSet.end(),*openNode)); + openSet.erase(tqFind(openSet.begin(),openSet.end(),*openNode)); openNode->clear(); // Clear the Node } } Node *closedNode = &closedMatrix[col][row]; - if (*closedNode != QPoint(-1,-1)) { + if (*closedNode != TQPoint(-1,-1)) { if ((*i) > (*closedNode)) continue; else { @@ -352,13 +352,13 @@ void KisCurveMagnetic::findEdge (int col, int row, const GrayMatrix& src, Node& x = (int)(col + mindist.x()); y = (int)(row + mindist.y()); - node.setPos(QPoint(x,y)); + node.setPos(TQPoint(x,y)); } -void KisCurveMagnetic::reduceMatrix (QRect& rc, GrayMatrix& m, int top, int right, int bottom, int left) +void KisCurveMagnetic::reduceMatrix (TQRect& rc, GrayMatrix& m, int top, int right, int bottom, int left) { - QPoint topleft(top, left); - QPoint bottomright(bottom, right); + TQPoint topleft(top, left); + TQPoint bottomright(bottom, right); rc.setTopLeft(rc.topLeft()+topleft); rc.setBottomRight(rc.bottomRight()-bottomright); @@ -377,7 +377,7 @@ void KisCurveMagnetic::reduceMatrix (QRect& rc, GrayMatrix& m, int top, int righ } } -void KisCurveMagnetic::detectEdges (const QRect & rect, KisPaintDeviceSP src, GrayMatrix& dst) +void KisCurveMagnetic::detectEdges (const TQRect & rect, KisPaintDeviceSP src, GrayMatrix& dst) { GrayMatrix graysrc(rect.width(),GrayCol(rect.height())); GrayMatrix xdeltas(rect.width(),GrayCol(rect.height())); @@ -392,7 +392,7 @@ void KisCurveMagnetic::detectEdges (const QRect & rect, KisPaintDeviceSP src, Gr nonMaxSupp(magnitude, xdeltas, ydeltas, dst); } -void KisCurveMagnetic::gaussianBlur (const QRect& rect, KisPaintDeviceSP src, KisPaintDeviceSP dst) +void KisCurveMagnetic::gaussianBlur (const TQRect& rect, KisPaintDeviceSP src, KisPaintDeviceSP dst) { int grectx = rect.x(); int grecty = rect.y(); @@ -410,20 +410,20 @@ void KisCurveMagnetic::gaussianBlur (const QRect& rect, KisPaintDeviceSP src, Ki painter.applyMatrix(kernel, grectx, grecty, grectw, grecth, BORDER_AVOID); } -void KisCurveMagnetic::toGrayScale (const QRect& rect, KisPaintDeviceSP src, GrayMatrix& dst) +void KisCurveMagnetic::toGrayScale (const TQRect& rect, KisPaintDeviceSP src, GrayMatrix& dst) { int grectx = rect.x(); int grecty = rect.y(); int grectw = rect.width(); int grecth = rect.height(); - QColor c; + TQColor c; KisColorSpace *cs = src->colorSpace(); for (int row = 0; row < grecth; row++) { KisHLineIteratorPixel srcIt = src->createHLineIterator(grectx, grecty+row, grectw, false); for (int col = 0; col < grectw; col++) { - cs->toQColor(srcIt.rawData(),&c); - dst[col][row] = qGray(c.rgb()); + cs->toTQColor(srcIt.rawData(),&c); + dst[col][row] = tqGray(c.rgb()); ++srcIt; } } @@ -432,7 +432,7 @@ void KisCurveMagnetic::toGrayScale (const QRect& rect, KisPaintDeviceSP src, Gra void KisCurveMagnetic::getDeltas (const GrayMatrix& src, GrayMatrix& xdelta, GrayMatrix& ydelta) { uint start = 1, xend = src[0].count()-1, yend = src.count()-1; - Q_INT16 deri; + TQ_INT16 deri; for (uint col = 0; col < src.count(); col++) { for (uint row = 0; row < src[col].count(); row++) { if (row >= start && row < xend) { @@ -453,7 +453,7 @@ void KisCurveMagnetic::getMagnitude (const GrayMatrix& xdelta, const GrayMatrix& { for (uint col = 0; col < xdelta.count(); col++) { for (uint row = 0; row < xdelta[col].count(); row++) - gradient[col][row] = (Q_INT16)(ROUND(RMS(xdelta[col][row],ydelta[col][row]))); + gradient[col][row] = (TQ_INT16)(ROUND(RMS(xdelta[col][row],ydelta[col][row]))); } } @@ -471,12 +471,12 @@ void KisCurveMagnetic::nonMaxSupp (const GrayMatrix& magnitude, const GrayMatrix // For this reason: first direction is relative to Gy only and third direction to Gx only double theta; // theta = invtan (|Gy| / |Gx|) This give the direction relative to a quadrant - Q_INT16 mag; // Current magnitude - Q_INT16 lmag; // Magnitude at the left (So this pixel is "more internal" than the current - Q_INT16 rmag; // Magnitude at the right (So this pixel is "more external") + TQ_INT16 mag; // Current magnitude + TQ_INT16 lmag; // Magnitude at the left (So this pixel is "more internal" than the current + TQ_INT16 rmag; // Magnitude at the right (So this pixel is "more external") double xdel; // Current xdelta double ydel; // Current ydelta - Q_INT16 result; + TQ_INT16 result; for (uint col = 0; col < magnitude.count(); col++) { for (uint row = 0; row < magnitude[col].count(); row++) { @@ -590,9 +590,9 @@ void KisToolMagnetic::deactivate () m_drawPivots = true; } -void KisToolMagnetic::keyPress(QKeyEvent *event) +void KisToolMagnetic::keyPress(TQKeyEvent *event) { - if (event->key() == Qt::Key_Control) { + if (event->key() == TQt::Key_Control) { draw(false); if (m_editingMode) { m_editingMode = false; @@ -604,7 +604,7 @@ void KisToolMagnetic::keyPress(QKeyEvent *event) m_mode->setText(i18n("Manual Mode")); } draw(false); - } else if (event->key() == Qt::Key_Delete && m_curve->count()) { + } else if (event->key() == TQt::Key_Delete && m_curve->count()) { draw(false); m_dragging = false; if (m_curve->pivots().count() == 2) @@ -648,7 +648,7 @@ void KisToolMagnetic::buttonPress(KisButtonPressEvent *event) m_currentPoint = event->pos(); PointPair temp(m_curve->end(),false); if (m_editingMode) - temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toQPoint())); + temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !(m_actionOptions)) { if (m_editingMode) { draw(true, true); @@ -691,10 +691,10 @@ void KisToolMagnetic::buttonPress(KisButtonPressEvent *event) void KisToolMagnetic::move(KisMoveEvent *event) { updateOptions(event->state()); - if (m_currentPoint == event->pos().floorQPoint()) + if (m_currentPoint == event->pos().floorTQPoint()) return; if (m_editingMode) { - PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toQPoint())); + PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !m_dragging) { if (m_editingCursor || m_draggingCursor) { setCursor(KisCursor::load("tool_moutline_cursor.png", 6, 6)); @@ -736,7 +736,7 @@ void KisToolMagnetic::move(KisMoveEvent *event) else draw(m_current); m_curve->movePivot(m_current,event->pos()); - m_currentPoint = event->pos().floorQPoint(); + m_currentPoint = event->pos().floorTQPoint(); draw(m_current); } @@ -759,22 +759,22 @@ void KisToolMagnetic::slotSetDistance (int dist) m_distance = dist; } -QWidget* KisToolMagnetic::createOptionWidget(QWidget* parent) +TQWidget* KisToolMagnetic::createOptionWidget(TQWidget* tqparent) { - m_optWidget = super::createOptionWidget(parent); - QVBoxLayout * l = dynamic_cast(m_optWidget->layout()); - QGridLayout *box = new QGridLayout(l, 2, 2, 3); + m_optWidget = super::createOptionWidget(tqparent); + TQVBoxLayout * l = dynamic_cast(m_optWidget->tqlayout()); + TQGridLayout *box = new TQGridLayout(l, 2, 2, 3); box->setColStretch(0, 1); box->setColStretch(1, 1); Q_CHECK_PTR(box); - m_mode = new QLabel(i18n("Automatic mode"), m_optWidget); - m_lbDistance = new QLabel(i18n("Distance: "), m_optWidget); - QPushButton *finish = new QPushButton(i18n("To Selection"), m_optWidget); - m_slDistance = new QSlider(MINDIST, MAXDIST, PAGESTEP, m_distance, Qt::Horizontal, m_optWidget); + m_mode = new TQLabel(i18n("Automatic mode"), m_optWidget); + m_lbDistance = new TQLabel(i18n("Distance: "), m_optWidget); + TQPushButton *finish = new TQPushButton(i18n("To Selection"), m_optWidget); + m_slDistance = new TQSlider(MINDIST, MAXDIST, PAGESTEP, m_distance, Qt::Horizontal, m_optWidget); - connect(m_slDistance, SIGNAL(valueChanged(int)), this, SLOT(slotSetDistance(int))); - connect(finish, SIGNAL(clicked()), this, SLOT(slotCommitCurve())); + connect(m_slDistance, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDistance(int))); + connect(finish, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCommitCurve())); box->addWidget(m_lbDistance, 0, 0); box->addWidget(m_slDistance, 0, 1); @@ -789,13 +789,13 @@ void KisToolMagnetic::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("Magnetic Outline"), "tool_moutline", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_moutline.h b/krita/plugins/tools/tool_curves/kis_tool_moutline.h index 43a140be..e5ff62a1 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_moutline.h +++ b/krita/plugins/tools/tool_curves/kis_tool_moutline.h @@ -25,15 +25,15 @@ #include "kis_curve_framework.h" #include "kis_tool_curve.h" -class QSlider; +class TQSlider; class KisToolMagnetic; class KisVector2D; class Node; -typedef QValueVector NodeCol; -typedef QValueVector NodeMatrix; -typedef QValueVector GrayCol; -typedef QValueVector GrayMatrix; +typedef TQValueVector NodeCol; +typedef TQValueVector NodeMatrix; +typedef TQValueVector GrayCol; +typedef TQValueVector GrayMatrix; class KisCurveMagnetic : public KisCurve { @@ -41,19 +41,19 @@ class KisCurveMagnetic : public KisCurve { KisToolMagnetic *m_parent; - void reduceMatrix (QRect&, GrayMatrix&, int, int, int, int); + void reduceMatrix (TQRect&, GrayMatrix&, int, int, int, int); void findEdge (int, int, const GrayMatrix&, Node&); - void detectEdges (const QRect&, KisPaintDeviceSP, GrayMatrix&); + void detectEdges (const TQRect&, KisPaintDeviceSP, GrayMatrix&); - void gaussianBlur (const QRect&, KisPaintDeviceSP, KisPaintDeviceSP); - void toGrayScale (const QRect&, KisPaintDeviceSP, GrayMatrix&); + void gaussianBlur (const TQRect&, KisPaintDeviceSP, KisPaintDeviceSP); + void toGrayScale (const TQRect&, KisPaintDeviceSP, GrayMatrix&); void getDeltas (const GrayMatrix&, GrayMatrix&, GrayMatrix&); void getMagnitude (const GrayMatrix&, const GrayMatrix&, GrayMatrix&); void nonMaxSupp (const GrayMatrix&, const GrayMatrix&, const GrayMatrix&, GrayMatrix&); public: - KisCurveMagnetic (KisToolMagnetic *parent); + KisCurveMagnetic (KisToolMagnetic *tqparent); ~KisCurveMagnetic (); virtual KisCurve::iterator addPivot (iterator, const KisPoint&); @@ -66,6 +66,7 @@ class KisToolMagnetic : public KisToolCurve { typedef KisToolCurve super; Q_OBJECT + TQ_OBJECT friend class KisCurveMagnetic; @@ -77,9 +78,9 @@ public: virtual void update (KisCanvasSubject*); virtual void setup (KActionCollection*); virtual enumToolType toolType() { return TOOL_SELECT; } - virtual Q_UINT32 priority() { return 9; } + virtual TQ_UINT32 priority() { return 9; } - virtual void keyPress(QKeyEvent*); + virtual void keyPress(TQKeyEvent*); virtual void buttonPress(KisButtonPressEvent*); virtual void buttonRelease(KisButtonReleaseEvent*); virtual void move(KisMoveEvent*); @@ -87,7 +88,7 @@ public: virtual KisCurve::iterator selectByMouse(KisCurve::iterator it); bool editingMode() {return m_editingMode;} - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: @@ -100,10 +101,10 @@ public slots: private: KisCurveMagnetic *m_derived; - QWidget* m_optWidget; - QLabel* m_mode; - QLabel* m_lbDistance; - QSlider* m_slDistance; + TQWidget* m_optWidget; + TQLabel* m_mode; + TQLabel* m_lbDistance; + TQSlider* m_slDistance; bool m_editingMode; bool m_editingCursor; bool m_draggingCursor; diff --git a/krita/plugins/tools/tool_curves/tool_curves.cc b/krita/plugins/tools/tool_curves/tool_curves.cc index bb4b2736..c25ed941 100644 --- a/krita/plugins/tools/tool_curves/tool_curves.cc +++ b/krita/plugins/tools/tool_curves/tool_curves.cc @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include @@ -45,14 +45,14 @@ typedef KGenericFactory ToolCurvesFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolcurves, ToolCurvesFactory( "krita" ) ) -ToolCurves::ToolCurves(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolCurves::ToolCurves(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolCurvesFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast( parent ); + KisToolRegistry * r = dynamic_cast( tqparent ); r->add(new KisToolBezierPaintFactory()); r->add(new KisToolBezierSelectFactory()); r->add(new KisToolMagneticFactory()); diff --git a/krita/plugins/tools/tool_curves/tool_curves.h b/krita/plugins/tools/tool_curves/tool_curves.h index 7a097d46..db6d5a7f 100644 --- a/krita/plugins/tools/tool_curves/tool_curves.h +++ b/krita/plugins/tools/tool_curves/tool_curves.h @@ -26,8 +26,9 @@ class ToolCurves : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolCurves(QObject *parent, const char *name, const QStringList &); + ToolCurves(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolCurves(); }; diff --git a/krita/plugins/tools/tool_curves/wdg_tool_example.ui b/krita/plugins/tools/tool_curves/wdg_tool_example.ui index 3841185f..eac06e2b 100644 --- a/krita/plugins/tools/tool_curves/wdg_tool_example.ui +++ b/krita/plugins/tools/tool_curves/wdg_tool_example.ui @@ -1,6 +1,6 @@ WdgToolExample - + WdgToolExample @@ -22,15 +22,15 @@ 0 - + - layout8 + tqlayout8 unnamed - + textLabel1 @@ -57,15 +57,15 @@ - + - layout7 + tqlayout7 unnamed - + textLabel2 @@ -120,7 +120,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082 - + knuminput.h knuminput.h diff --git a/krita/plugins/tools/tool_filter/kis_filterop.cc b/krita/plugins/tools/tool_filter/kis_filterop.cc index a2ca604a..1f2200b3 100644 --- a/krita/plugins/tools/tool_filter/kis_filterop.cc +++ b/krita/plugins/tools/tool_filter/kis_filterop.cc @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include @@ -74,22 +74,22 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); splitCoordinate(pt.y(), &y, &yFraction); - // Filters always work with a mask, never with an image; that + // Filters always work with a tqmask, never with an image; that // wouldn't be useful at all. - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); m_painter->setPressure(info.pressure); - Q_INT32 maskWidth = mask->width(); - Q_INT32 maskHeight = mask->height(); + TQ_INT32 tqmaskWidth = tqmask->width(); + TQ_INT32 tqmaskHeight = tqmask->height(); // Create a temporary paint device KisPaintDeviceSP tmpDev = new KisPaintDevice(colorSpace, "filterop tmpdev"); @@ -98,21 +98,21 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Copy the layer data onto the new paint device KisPainter p( tmpDev ); - p.bitBlt( 0, 0, COMPOSITE_COPY, m_source, OPACITY_OPAQUE, x, y, maskWidth, maskHeight ); + p.bitBlt( 0, 0, COMPOSITE_COPY, m_source, OPACITY_OPAQUE, x, y, tqmaskWidth, tqmaskHeight ); // Filter the paint device filter->disableProgress(); - filter->process( tmpDev, tmpDev, m_filterConfiguration, QRect( 0, 0, maskWidth, maskHeight )); + filter->process( tmpDev, tmpDev, m_filterConfiguration, TQRect( 0, 0, tqmaskWidth, tqmaskHeight )); filter->enableProgress(); - // Apply the mask on the paint device (filter before mask because edge pixels may be important) - for (int y = 0; y < maskHeight; y++) + // Apply the tqmask on the paint device (filter before tqmask because edge pixels may be important) + for (int y = 0; y < tqmaskHeight; y++) { - KisHLineIterator hiter = tmpDev->createHLineIterator(0, y, maskWidth, false); + KisHLineIterator hiter = tmpDev->createHLineIterator(0, y, tqmaskWidth, false); int x=0; while(! hiter.isDone()) { - Q_UINT8 alpha = mask->alphaAt( x++, y ); + TQ_UINT8 alpha = tqmask->alphaAt( x++, y ); colorSpace->setAlpha(hiter.rawData(), alpha, 1); ++hiter; @@ -120,8 +120,8 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) } // Blit the paint device onto the layer - QRect dabRect = QRect(0, 0, maskWidth, maskHeight); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, tqmaskWidth, tqmaskHeight); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = m_painter->device()->image(); @@ -131,10 +131,10 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), tmpDev.data(), diff --git a/krita/plugins/tools/tool_filter/kis_tool_filter.cc b/krita/plugins/tools/tool_filter/kis_tool_filter.cc index 1cc1240f..bb303862 100644 --- a/krita/plugins/tools/tool_filter/kis_tool_filter.cc +++ b/krita/plugins/tools/tool_filter/kis_tool_filter.cc @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -67,7 +67,7 @@ void KisToolFilter::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Filter Brush"), "tool_filter", 0, this, - SLOT(activate()), collection, + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Paint with filters")); @@ -96,14 +96,14 @@ void KisToolFilter::initPaint(KisEvent *e) dynamic_cast(op)->setFilterConfiguration( m_filter->configuration( m_filterConfigurationWidget) ); } -QWidget* KisToolFilter::createOptionWidget(QWidget* parent) +TQWidget* KisToolFilter::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); m_cbFilter = new KisCmbIDList(widget); Q_CHECK_PTR(m_cbFilter); - QLabel* lbFilter = new QLabel(i18n("Filter:"), widget); + TQLabel* lbFilter = new TQLabel(i18n("Filter:"), widget); Q_CHECK_PTR(lbFilter); // Check which filters support painting @@ -120,11 +120,11 @@ QWidget* KisToolFilter::createOptionWidget(QWidget* parent) addOptionWidgetOption(m_cbFilter, lbFilter); - m_optionLayout = new QGridLayout(widget, 1, 1, 0, 6); + m_optionLayout = new TQGridLayout(widget, 1, 1, 0, 6); Q_CHECK_PTR(m_optionLayout); super::addOptionWidgetLayout(m_optionLayout); - connect(m_cbFilter, SIGNAL(activated ( const KisID& )), this, SLOT( changeFilter( const KisID& ) ) ); + connect(m_cbFilter, TQT_SIGNAL(activated ( const KisID& )), this, TQT_SLOT( changeFilter( const KisID& ) ) ); changeFilter( m_cbFilter->currentItem () ); return widget; diff --git a/krita/plugins/tools/tool_filter/kis_tool_filter.h b/krita/plugins/tools/tool_filter/kis_tool_filter.h index 631c1355..d8335f74 100644 --- a/krita/plugins/tools/tool_filter/kis_tool_filter.h +++ b/krita/plugins/tools/tool_filter/kis_tool_filter.h @@ -24,8 +24,8 @@ #include "kis_tool_freehand.h" #include "kis_tool_factory.h" -class QComboBox; -class QGridLayout; +class TQComboBox; +class TQGridLayout; class KisEvent; class KisFilterConfigurationWidget; class KisButtonPressEvent; @@ -36,6 +36,7 @@ class KisCmbIDList; class KisToolFilter : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -44,8 +45,8 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FREEHAND; } - virtual Q_UINT32 priority() { return 1; } - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQ_UINT32 priority() { return 1; } + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: void changeFilter( const KisID & filter); @@ -55,8 +56,8 @@ protected: private: KisFilterSP m_filter; - QWidget* m_filterConfigurationWidget; - QGridLayout* m_optionLayout; + TQWidget* m_filterConfigurationWidget; + TQGridLayout* m_optionLayout; KisCmbIDList * m_cbFilter; }; diff --git a/krita/plugins/tools/tool_filter/tool_filter.cc b/krita/plugins/tools/tool_filter/tool_filter.cc index 2102dfdb..f03ffbca 100644 --- a/krita/plugins/tools/tool_filter/tool_filter.cc +++ b/krita/plugins/tools/tool_filter/tool_filter.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -44,14 +44,14 @@ typedef KGenericFactory ToolFilterFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolfilter, ToolFilterFactory( "krita" ) ) -ToolFilter::ToolFilter(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolFilter::ToolFilter(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolFilterFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add( new KisToolFilterFactory()); // XXX: Put this in a separate plugin? diff --git a/krita/plugins/tools/tool_filter/tool_filter.h b/krita/plugins/tools/tool_filter/tool_filter.h index 2eee589a..7bf33dca 100644 --- a/krita/plugins/tools/tool_filter/tool_filter.h +++ b/krita/plugins/tools/tool_filter/tool_filter.h @@ -29,8 +29,9 @@ class KisView; class ToolFilter : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolFilter(QObject *parent, const char *name, const QStringList &); + ToolFilter(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolFilter(); private: diff --git a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc index 944807eb..04524e48 100644 --- a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc +++ b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc @@ -19,11 +19,11 @@ */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -95,9 +95,9 @@ void KisToolPerspectiveGrid::update (KisCanvasSubject *subject) super::update(m_subject); } -bool KisToolPerspectiveGrid::mouseNear(const QPoint& mousep, const QPoint point) +bool KisToolPerspectiveGrid::mouseNear(const TQPoint& mousep, const TQPoint point) { - return (QRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).contains(mousep) ); + return (TQRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).tqcontains(mousep) ); } void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) @@ -128,40 +128,40 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) return; KisCanvasController *controller = m_subject->canvasController(); Q_ASSERT(controller); - QPoint mousep = controller->windowToView( event->pos().roundQPoint() ); + TQPoint mousep = controller->windowToView( event->pos().roundTQPoint() ); - for( QValueList::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) + for( TQValueList::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) { KisSubPerspectiveGrid* grid = *it; - if( mouseNear( mousep, controller->windowToView(grid->topLeft()->roundQPoint() ) ) ) + if( mouseNear( mousep, controller->windowToView(grid->topLeft()->roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPLEFT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->topLeft(); break; } - else if( mouseNear( mousep, controller->windowToView(grid->topRight()->roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(grid->topRight()->roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPRIGHT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->topRight(); break; } - else if( mouseNear( mousep, controller->windowToView(grid->bottomLeft()->roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(grid->bottomLeft()->roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMLEFT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->bottomLeft(); break; } - else if( mouseNear( mousep, controller->windowToView(grid->bottomRight()->roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(grid->bottomRight()->roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMRIGHT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->bottomRight(); break; } - else if( !grid->leftGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->bottomLeft() )*0.5) ).roundQPoint() ) ) + else if( !grid->leftGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->bottomLeft() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS LEFT HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -176,7 +176,7 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) drawGrid(); break; } - else if( !grid->rightGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topRight() + *grid->bottomRight() )*0.5) ).roundQPoint() ) ) + else if( !grid->rightGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topRight() + *grid->bottomRight() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS RIGHT HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -191,7 +191,7 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) drawGrid(); break; } - else if( !grid->topGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->topRight() )*0.5) ).roundQPoint() ) ) + else if( !grid->topGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->topRight() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS TOP HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -206,7 +206,7 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) drawGrid(); break; } - else if( !grid->bottomGrid() && mouseNear( mousep, controller->windowToView( ((*grid->bottomLeft() + *grid->bottomRight() )*0.5) ).roundQPoint() ) ) + else if( !grid->bottomGrid() && mouseNear( mousep, controller->windowToView( ((*grid->bottomLeft() + *grid->bottomRight() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS BOTTOM HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -297,7 +297,7 @@ void KisToolPerspectiveGrid::paint(KisCanvasPainter& gc) } } -void KisToolPerspectiveGrid::paint(KisCanvasPainter& gc, const QRect&) +void KisToolPerspectiveGrid::paint(KisCanvasPainter& gc, const TQRect&) { if( m_mode == MODE_CREATION ) { @@ -324,19 +324,19 @@ void KisToolPerspectiveGrid::drawGridCreation(KisCanvasPainter& gc) if (!m_subject) return; - QPen pen(Qt::white); + TQPen pen(TQt::white); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -347,8 +347,8 @@ void KisToolPerspectiveGrid::drawGridCreation(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -358,7 +358,7 @@ void KisToolPerspectiveGrid::drawGridCreation(KisCanvasPainter& gc) } } -void KisToolPerspectiveGrid::drawSmallRectangle(KisCanvasPainter& gc, QPoint p) +void KisToolPerspectiveGrid::drawSmallRectangle(KisCanvasPainter& gc, TQPoint p) { gc.drawRect( p.x() - m_handleHalfSize - 1, p.y() - m_handleHalfSize - 1, m_handleSize, m_handleSize); } @@ -371,15 +371,15 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) KisCanvasController *controller = m_subject->canvasController(); - QPen pen(Qt::white); - QPoint startPos; - QPoint endPos; + TQPen pen(TQt::white); + TQPoint startPos; + TQPoint endPos; gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisPerspectiveGrid* pGrid = m_subject->currentImg()->perspectiveGrid(); - for( QValueList::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) + for( TQValueList::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) { KisSubPerspectiveGrid* grid = *it; int index = grid->index(); @@ -388,8 +388,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) bool drawTop = !(grid->topGrid() && (index > grid->topGrid()->index() ) ); bool drawBottom = !(grid->bottomGrid() && (index > grid->bottomGrid()->index() ) ); if(drawTop) { - startPos = controller->windowToView(grid->topLeft()->roundQPoint()); - endPos = controller->windowToView(grid->topRight()->roundQPoint()); + startPos = controller->windowToView(grid->topLeft()->roundTQPoint()); + endPos = controller->windowToView(grid->topRight()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->topGrid() ) { @@ -403,8 +403,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) } } if(drawRight) { - startPos = controller->windowToView(grid->topRight()->roundQPoint()); - endPos = controller->windowToView(grid->bottomRight()->roundQPoint()); + startPos = controller->windowToView(grid->topRight()->roundTQPoint()); + endPos = controller->windowToView(grid->bottomRight()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->rightGrid() ) { @@ -412,8 +412,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) } } if(drawBottom) { - startPos = controller->windowToView(grid->bottomRight()->roundQPoint()); - endPos = controller->windowToView(grid->bottomLeft()->roundQPoint()); + startPos = controller->windowToView(grid->bottomRight()->roundTQPoint()); + endPos = controller->windowToView(grid->bottomLeft()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->bottomGrid() ) { @@ -427,8 +427,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) } } if(drawLeft) { - startPos = controller->windowToView(grid->bottomLeft()->roundQPoint()); - endPos = controller->windowToView(grid->topLeft()->roundQPoint()); + startPos = controller->windowToView(grid->bottomLeft()->roundTQPoint()); + endPos = controller->windowToView(grid->topLeft()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->leftGrid() ) { @@ -438,14 +438,14 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) KisPoint tbVpf = grid->topBottomVanishingPoint(); if( fabs(tbVpf.x()) < 30000000. && fabs(tbVpf.y()) < 30000000.) { - QPoint tbVp = controller->windowToView(tbVpf.roundQPoint()); + TQPoint tbVp = controller->windowToView(tbVpf.roundTQPoint()); gc.drawLine( tbVp.x() - m_handleHalfSize, tbVp.y() - m_handleHalfSize, tbVp.x() + m_handleHalfSize, tbVp.y() + m_handleHalfSize); gc.drawLine( tbVp.x() - m_handleHalfSize, tbVp.y() + m_handleHalfSize, tbVp.x() + m_handleHalfSize, tbVp.y() - m_handleHalfSize); } KisPoint lrVpf = grid->leftRightVanishingPoint(); if( fabs(lrVpf.x()) < 30000000. && fabs(lrVpf.y()) < 30000000.) { // Don't display it, if it is too far, or you get funny results - QPoint lrVp = controller->windowToView(lrVpf.roundQPoint()); + TQPoint lrVp = controller->windowToView(lrVpf.roundTQPoint()); gc.drawLine( lrVp.x() - m_handleHalfSize, lrVp.y() - m_handleHalfSize, lrVp.x() + m_handleHalfSize, lrVp.y() + m_handleHalfSize); gc.drawLine( lrVp.x() - m_handleHalfSize, lrVp.y() + m_handleHalfSize, lrVp.x() + m_handleHalfSize, lrVp.y() - m_handleHalfSize); } @@ -474,7 +474,7 @@ void KisToolPerspectiveGrid::setup(KActionCollection *collection) "tool_perspectivegrid" , 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -485,12 +485,12 @@ void KisToolPerspectiveGrid::setup(KActionCollection *collection) } -// QWidget* KisToolPerspectiveGrid::createOptionWidget(QWidget* parent) +// TQWidget* KisToolPerspectiveGrid::createOptionWidget(TQWidget* tqparent) // { // return 0; // } // -// QWidget* KisToolPerspectiveGrid::optionWidget() +// TQWidget* KisToolPerspectiveGrid::optionWidget() // { // return 0; // } diff --git a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h index b6318c7d..2b5467d4 100644 --- a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h +++ b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h @@ -28,6 +28,7 @@ class KisToolPerspectiveGrid : public KisToolNonPaint { Q_OBJECT + TQ_OBJECT enum PerspectiveGridEditionMode { MODE_CREATION, // This is the mode when there is not yet a perspective grid MODE_EDITING, // This is the mode when the grid has been created, and we are waiting for the user to click on a control box @@ -49,14 +50,14 @@ public: // virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } virtual enumToolType toolType() { return TOOL_VIEW; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); -// QWidget* createOptionWidget(QWidget* parent); -// virtual QWidget* optionWidget(); +// TQWidget* createOptionWidget(TQWidget* tqparent); +// virtual TQWidget* optionWidget(); public slots: virtual void activate(); @@ -64,15 +65,15 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void drawGridCreation(KisCanvasPainter& gc); void drawGridCreation(); void drawGrid(KisCanvasPainter& gc); void drawGrid(); private: - void drawSmallRectangle(KisCanvasPainter& gc, QPoint p); - bool mouseNear(const QPoint& mousep, const QPoint point); + void drawSmallRectangle(KisCanvasPainter& gc, TQPoint p); + bool mouseNear(const TQPoint& mousep, const TQPoint point); protected: KisPoint m_dragStart; @@ -80,11 +81,11 @@ protected: bool m_dragging; private: - typedef QValueVector KisPointVector; + typedef TQValueVector KisPointVector; KisCanvasSubject *m_subject; KisPointVector m_points; PerspectiveGridEditionMode m_mode; - Q_INT32 m_handleSize, m_handleHalfSize; + TQ_INT32 m_handleSize, m_handleHalfSize; KisPerspectiveGridNodeSP m_selectedNode1, m_selectedNode2; }; diff --git a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc index 157a7457..54a39f0f 100644 --- a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc +++ b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -42,14 +42,14 @@ typedef KGenericFactory ToolPerspectiveGridFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolperspectivegrid, ToolPerspectiveGridFactory( "krita" ) ) -ToolPerspectiveGrid::ToolPerspectiveGrid(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPerspectiveGrid::ToolPerspectiveGrid(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPerspectiveGridFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add(new KisToolPerspectiveGridFactory()); } diff --git a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h index e98cbf09..aed4a60c 100644 --- a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h +++ b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h @@ -29,8 +29,9 @@ class KisView; class ToolPerspectiveGrid : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPerspectiveGrid(QObject *parent, const char *name, const QStringList &); + ToolPerspectiveGrid(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPerspectiveGrid(); private: diff --git a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc index f334c429..b662c940 100644 --- a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc +++ b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc @@ -24,13 +24,13 @@ #include "kis_tool_perspectivetransform.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -65,19 +65,19 @@ namespace { typedef KisSelectedTransaction super; public: - PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, QRect initialRect); + PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, TQRect initialRect); virtual ~PerspectiveTransformCmd(); public: virtual void execute(); virtual void unexecute(); void transformArgs(KisPoint &topleft, KisPoint &topright, KisPoint &bottomleft, KisPoint& bottomright) const; - KisSelectionSP origSelection(QRect& initialRect) const; + KisSelectionSP origSelection(TQRect& initialRect) const; KisPaintDeviceSP theDevice(); KisPaintDeviceSP origDevice(); private: - QRect m_initialRect; + TQRect m_initialRect; KisPoint m_topleft, m_topright, m_bottomleft, m_bottomright; KisToolPerspectiveTransform *m_tool; KisSelectionSP m_origSelection; @@ -85,7 +85,7 @@ namespace { KisPaintDeviceSP m_origDevice; }; - PerspectiveTransformCmd::PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, QRect initialRect) : + PerspectiveTransformCmd::PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, TQRect initialRect) : super(i18n("Perspective Transform"), device), m_initialRect(initialRect) , m_topleft(topleft), m_topright(topright), m_bottomleft(bottomleft), m_bottomright(bottomright) , m_tool(tool), m_origSelection(origSel), m_device(device), m_origDevice(origDevice) @@ -104,7 +104,7 @@ namespace { bottomright = m_bottomright; } - KisSelectionSP PerspectiveTransformCmd::origSelection(QRect& initialRect) const + KisSelectionSP PerspectiveTransformCmd::origSelection(TQRect& initialRect) const { initialRect = m_initialRect; return m_origSelection; @@ -157,7 +157,7 @@ void KisToolPerspectiveTransform::deactivate() paintOutline(); - disconnect(m_subject->currentImg().data(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + disconnect(m_subject->currentImg().data(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolPerspectiveTransform::activate() @@ -196,12 +196,12 @@ void KisToolPerspectiveTransform::activate() initHandles(); } } - connect(m_subject->currentImg(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + connect(m_subject->currentImg(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolPerspectiveTransform::initHandles() { -// Q_INT32 x,y,w,h; +// TQ_INT32 x,y,w,h; KisImageSP img = m_subject->currentImg(); KisPaintDeviceSP dev = img->activeDevice(); @@ -230,17 +230,17 @@ void KisToolPerspectiveTransform::initHandles() void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc) { - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc, const TQRect& rc) { paintOutline(gc, rc); } -bool KisToolPerspectiveTransform::mouseNear(const QPoint& mousep, const QPoint point) +bool KisToolPerspectiveTransform::mouseNear(const TQPoint& mousep, const TQPoint point) { - return (QRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).contains(mousep) ); + return (TQRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).tqcontains(mousep) ); } void KisToolPerspectiveTransform::buttonPress(KisButtonPressEvent *event) @@ -272,43 +272,43 @@ void KisToolPerspectiveTransform::buttonPress(KisButtonPressEvent *event) m_actualyMoveWhileSelected = false; m_dragEnd = event->pos(); KisCanvasController *controller = m_subject->canvasController(); - QPoint mousep = controller->windowToView( event->pos().roundQPoint() ); - if( mouseNear( mousep, controller->windowToView(m_topleft.roundQPoint() ) ) ) + TQPoint mousep = controller->windowToView( event->pos().roundTQPoint() ); + if( mouseNear( mousep, controller->windowToView(m_topleft.roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPLEFT HANDLE " << endl; m_currentSelectedPoint = &m_topleft; } - else if( mouseNear( mousep, controller->windowToView(m_topright.roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(m_topright.roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPRIGHT HANDLE " << endl; m_currentSelectedPoint = &m_topright; } - else if( mouseNear( mousep, controller->windowToView(m_bottomleft.roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(m_bottomleft.roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMLEFT HANDLE " << endl; m_currentSelectedPoint = &m_bottomleft; } - else if( mouseNear( mousep, controller->windowToView(m_bottomright.roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(m_bottomright.roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMRIGHT HANDLE " << endl; m_currentSelectedPoint = &m_bottomright; - } else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_topright)*0.5).roundQPoint() ) ) ) + } else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_topright)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS TOP HANDLE " << endl; m_handleSelected = TOPHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft)*0.5).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS LEFT HANDLE " << endl; m_handleSelected = LEFTHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomleft+m_bottomright)*0.5).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomleft+m_bottomright)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOM HANDLE " << endl; m_handleSelected = BOTTOMHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomright+m_topright)*0.5).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomright+m_topright)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS RIGHT HANDLE " << endl; m_handleSelected = RIGHTHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft + m_bottomright+m_topright)*0.25).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft + m_bottomright+m_topright)*0.25).roundTQPoint() ) ) ) { kdDebug() << " PRESS MIDDLE HANDLE " << endl; m_handleSelected = MIDDLEHANDLE; @@ -368,7 +368,7 @@ void KisToolPerspectiveTransform::move(KisMoveEvent *event) KisPoint topRight = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.topRight() ); KisPoint bottomLeft = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.bottomLeft() ); KisPoint bottomRight = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.bottomRight() ); - QRect dstRect = m_initialRect; + TQRect dstRect = m_initialRect; switch(m_handleSelected) { case TOPHANDLE: @@ -458,9 +458,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event) m_bottomright = KisPerspectiveMath::matProd(matrix, m_initialRect.bottomRight()); m_interractionMode = EDITRECTINTERRACTION; paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } else { paintOutline(); } @@ -475,9 +475,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event) if(m_actualyMoveWhileSelected) { paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } if(m_handleSelected != NOHANDLE) @@ -486,9 +486,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event) if(m_actualyMoveWhileSelected) { // paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } } @@ -503,19 +503,19 @@ void KisToolPerspectiveTransform::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); pen.setWidth(1); Q_ASSERT(controller); @@ -525,8 +525,8 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect { kdDebug() << "DRAWRECTINTERRACTION paintOutline " << m_points.size() << endl; KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { if (it == m_points.begin()) @@ -535,8 +535,8 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -547,12 +547,12 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect break; case EDITRECTINTERRACTION: { - QPoint topleft = controller->windowToView(m_topleft ).roundQPoint(); - QPoint topright = controller->windowToView(m_topright).roundQPoint(); - QPoint bottomleft = controller->windowToView(m_bottomleft).roundQPoint(); - QPoint bottomright = controller->windowToView(m_bottomright).roundQPoint(); + TQPoint topleft = controller->windowToView(m_topleft ).roundTQPoint(); + TQPoint topright = controller->windowToView(m_topright).roundTQPoint(); + TQPoint bottomleft = controller->windowToView(m_bottomleft).roundTQPoint(); + TQPoint bottomright = controller->windowToView(m_bottomright).roundTQPoint(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); gc.drawRect(topleft.x()-4, topleft.y()-4, 8, 8); gc.drawLine(topleft.x(), topleft.y(), (topleft.x()+topright.x())/2, (topleft.y()+topright.y())/2); @@ -593,7 +593,7 @@ void KisToolPerspectiveTransform::transform() m_topleft, m_topright, m_bottomleft, m_bottomright, m_origSelection, m_initialRect); // Copy the original state back. - QRect rc = m_origDevice->extent(); + TQRect rc = m_origDevice->extent(); rc = rc.normalize(); img->activeDevice()->clear(); KisPainter gc(img->activeDevice()); @@ -603,7 +603,7 @@ void KisToolPerspectiveTransform::transform() // Also restore the original selection. if(m_origSelection) { - QRect rc = m_origSelection->selectedRect(); + TQRect rc = m_origSelection->selectedRect(); rc = rc.normalize(); img->activeDevice()->selection()->clear(); KisPainter sgc(img->activeDevice()->selection().data()); @@ -681,27 +681,27 @@ void KisToolPerspectiveTransform::slotLayerActivated(KisLayerSP) } -QWidget* KisToolPerspectiveTransform::createOptionWidget(QWidget* /*parent*/) +TQWidget* KisToolPerspectiveTransform::createOptionWidget(TQWidget* /*tqparent*/) { #if 0 - m_optWidget = new WdgToolPerspectiveTransform(parent); + m_optWidget = new WdgToolPerspectiveTransform(tqparent); Q_CHECK_PTR(m_optWidget); m_optWidget->cmbFilter->clear(); m_optWidget->cmbFilter->setIDList(KisFilterStrategyRegistry::instance()->listKeys()); m_optWidget->cmbFilter->setCurrentText("Mitchell"); - connect(m_optWidget->cmbFilter, SIGNAL(activated(const KisID &)), - this, SLOT(slotSetFilter(const KisID &))); + connect(m_optWidget->cmbFilter, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(slotSetFilter(const KisID &))); KisID filterID = m_optWidget->cmbFilter->currentItem(); m_filter = KisFilterStrategyRegistry::instance()->get(filterID); /* - connect(m_optWidget->intStartX, SIGNAL(valueChanged(int)), this, SLOT(setStartX(int))); - connect(m_optWidget->intStartY, SIGNAL(valueChanged(int)), this, SLOT(setStartY(int))); - connect(m_optWidget->intEndX, SIGNAL(valueChanged(int)), this, SLOT(setEndX(int))); - connect(m_optWidget->intEndY, SIGNAL(valueChanged(int)), this, SLOT(setEndY(int))); + connect(m_optWidget->intStartX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartX(int))); + connect(m_optWidget->intStartY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartY(int))); + connect(m_optWidget->intEndX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndX(int))); + connect(m_optWidget->intEndY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndY(int))); */ m_optWidget->intStartX->hide(); m_optWidget->intStartY->hide(); @@ -715,7 +715,7 @@ QWidget* KisToolPerspectiveTransform::createOptionWidget(QWidget* /*parent*/) return 0; } -QWidget* KisToolPerspectiveTransform::optionWidget() +TQWidget* KisToolPerspectiveTransform::optionWidget() { return 0; } @@ -729,7 +729,7 @@ void KisToolPerspectiveTransform::setup(KActionCollection *collection) "tool_perspectivetransform", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h index e2600cfc..94b808c2 100644 --- a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h +++ b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h @@ -24,7 +24,7 @@ #ifndef KIS_TOOL_PERSPECTIVETRANSFORM_H_ #define KIS_TOOL_PERSPECTIVETRANSFORM_H_ -#include +#include #include #include @@ -46,20 +46,21 @@ class KisToolPerspectiveTransform : public KisToolNonPaint, KisCommandHistoryLis typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT enum InterractionMode { DRAWRECTINTERRACTION, EDITRECTINTERRACTION }; enum HandleSelected { NOHANDLE, TOPHANDLE, BOTTOMHANDLE, RIGHTHANDLE, LEFTHANDLE, MIDDLEHANDLE }; public: KisToolPerspectiveTransform(); virtual ~KisToolPerspectiveTransform(); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 4; } + virtual TQ_UINT32 priority() { return 4; } virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); @@ -75,8 +76,8 @@ public: private: - bool mouseNear(const QPoint& mousep, const QPoint point); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + bool mouseNear(const TQPoint& mousep, const TQPoint point); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); void transform(); void initHandles(); @@ -89,7 +90,7 @@ protected slots: private: bool m_dragging; InterractionMode m_interractionMode; - QRect m_initialRect; + TQRect m_initialRect; KisPoint m_dragStart, m_dragEnd; KisPoint m_topleft, m_topright, m_bottomleft, m_bottomright; KisPoint* m_currentSelectedPoint; @@ -102,7 +103,7 @@ private: int m_handleHalfSize, m_handleSize; // The following variables are used in during the draw rect interraction mode - typedef QValueVector KisPointVector; + typedef TQValueVector KisPointVector; KisPointVector m_points; // The following variables are used when moving a middle handle HandleSelected m_handleSelected; diff --git a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc index 3fdbe3bb..9102bb0c 100644 --- a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc +++ b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -42,15 +42,15 @@ typedef KGenericFactory ToolPerspectiveTransformFactor K_EXPORT_COMPONENT_FACTORY( kritatoolperspectivetransform, ToolPerspectiveTransformFactory( "krita" ) ) -ToolPerspectiveTransform::ToolPerspectiveTransform(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPerspectiveTransform::ToolPerspectiveTransform(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPerspectiveTransformFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { kdDebug() << " add perspective transform tool to the registry" << endl; - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add(new KisToolPerspectiveTransformFactory()); } diff --git a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h index 6cc6370f..1cbeadee 100644 --- a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h +++ b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h @@ -29,8 +29,9 @@ class KisView; class ToolPerspectiveTransform : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPerspectiveTransform(QObject *parent, const char *name, const QStringList &); + ToolPerspectiveTransform(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPerspectiveTransform(); private: diff --git a/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc b/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc index 9589e19f..35ffd5ed 100644 --- a/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc +++ b/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include #include @@ -159,7 +159,7 @@ void KisToolPolygon::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolPolygon::paint(KisCanvasPainter& gc, const QRect&) +void KisToolPolygon::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -180,19 +180,19 @@ void KisToolPolygon::draw(KisCanvasPainter& gc) if (!m_subject || !m_currentImage) return; - QPen pen(Qt::white, 0, Qt::SolidLine); + TQPen pen(TQt::white, 0, TQt::SolidLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -203,8 +203,8 @@ void KisToolPolygon::draw(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -221,13 +221,13 @@ void KisToolPolygon::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Polygon"), "tool_polygon", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -238,9 +238,9 @@ void KisToolPolygon::setup(KActionCollection *collection) } } -void KisToolPolygon::keyPress(QKeyEvent *e) +void KisToolPolygon::keyPress(TQKeyEvent *e) { - if (e->key()==Qt::Key_Escape) { + if (e->key()==TQt::Key_Escape) { // erase old lines on canvas draw(); m_dragging = false; diff --git a/krita/plugins/tools/tool_polygon/kis_tool_polygon.h b/krita/plugins/tools/tool_polygon/kis_tool_polygon.h index 7ca24914..f68cae64 100644 --- a/krita/plugins/tools/tool_polygon/kis_tool_polygon.h +++ b/krita/plugins/tools/tool_polygon/kis_tool_polygon.h @@ -21,7 +21,7 @@ #ifndef KIS_TOOL_POLYGON_H_ #define KIS_TOOL_POLYGON_H_ -#include +#include #include "kis_tool_shape.h" @@ -35,6 +35,7 @@ class KisToolPolygon : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolPolygon(); @@ -52,22 +53,22 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 4; } + virtual TQ_UINT32 priority() { return 4; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); - virtual QString quickHelp() const { + virtual TQString quickHelp() const { return i18n("Shift-click will end the polygon."); } virtual void doubleClick(KisDoubleClickEvent * event); protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); void finish(); - virtual void keyPress(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); protected: KisPoint m_dragStart; KisPoint m_dragEnd; @@ -75,7 +76,7 @@ protected: bool m_dragging; KisImageSP m_currentImage; private: - typedef QValueVector KisPointVector; + typedef TQValueVector KisPointVector; KisPointVector m_points; }; diff --git a/krita/plugins/tools/tool_polygon/tool_polygon.cc b/krita/plugins/tools/tool_polygon/tool_polygon.cc index a1fec49c..81abbb95 100644 --- a/krita/plugins/tools/tool_polygon/tool_polygon.cc +++ b/krita/plugins/tools/tool_polygon/tool_polygon.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -42,14 +42,14 @@ typedef KGenericFactory ToolPolygonFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolpolygon, ToolPolygonFactory( "krita" ) ) -ToolPolygon::ToolPolygon(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPolygon::ToolPolygon(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPolygonFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast( parent ); + KisToolRegistry * r = dynamic_cast( tqparent ); r->add(new KisToolPolygonFactory()); } diff --git a/krita/plugins/tools/tool_polygon/tool_polygon.h b/krita/plugins/tools/tool_polygon/tool_polygon.h index 6249d935..ec816736 100644 --- a/krita/plugins/tools/tool_polygon/tool_polygon.h +++ b/krita/plugins/tools/tool_polygon/tool_polygon.h @@ -27,10 +27,11 @@ class ToolPolygon : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPolygon(QObject *parent, const char *name, const QStringList &); + ToolPolygon(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPolygon(); }; diff --git a/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc b/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc index 2f7a8e59..baeb946d 100644 --- a/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc +++ b/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include #include @@ -68,7 +68,7 @@ void KisToolPolyline::update (KisCanvasSubject *subject) void KisToolPolyline::buttonPress(KisButtonPressEvent *event) { if (m_currentImage) { - if (event->button() == LeftButton && event->state() != Qt::ShiftButton ) { + if (event->button() == LeftButton && event->state() != TQt::ShiftButton ) { m_dragging = true; @@ -82,7 +82,7 @@ void KisToolPolyline::buttonPress(KisButtonPressEvent *event) m_dragEnd = event->pos(); draw(); } - } else if (event->button() == LeftButton && event->state() == Qt::ShiftButton ) { + } else if (event->button() == LeftButton && event->state() == TQt::ShiftButton ) { finish(); } } @@ -176,7 +176,7 @@ void KisToolPolyline::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolPolyline::paint(KisCanvasPainter& gc, const QRect&) +void KisToolPolyline::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -197,19 +197,19 @@ void KisToolPolyline::draw(KisCanvasPainter& gc) if (!m_subject || !m_currentImage) return; - QPen pen(Qt::white, 0, Qt::SolidLine); + TQPen pen(TQt::white, 0, TQt::SolidLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -220,8 +220,8 @@ void KisToolPolyline::draw(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -236,13 +236,13 @@ void KisToolPolyline::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Polyline"), "polyline", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -253,14 +253,14 @@ void KisToolPolyline::setup(KActionCollection *collection) } } -QString KisToolPolyline::quickHelp() const +TQString KisToolPolyline::quickHelp() const { return i18n("Press shift-mouseclick to end the polyline."); } -void KisToolPolyline::keyPress(QKeyEvent *e) +void KisToolPolyline::keyPress(TQKeyEvent *e) { - if (e->key()==Qt::Key_Escape) { + if (e->key()==TQt::Key_Escape) { // erase old lines on canvas draw(); m_dragging = false; diff --git a/krita/plugins/tools/tool_polyline/kis_tool_polyline.h b/krita/plugins/tools/tool_polyline/kis_tool_polyline.h index 5dfff695..b234c53b 100644 --- a/krita/plugins/tools/tool_polyline/kis_tool_polyline.h +++ b/krita/plugins/tools/tool_polyline/kis_tool_polyline.h @@ -21,8 +21,8 @@ #ifndef KIS_TOOL_POLYLINE_H_ #define KIS_TOOL_POLYLINE_H_ -#include -#include +#include +#include #include "kis_tool_paint.h" #include "kis_point.h" @@ -38,6 +38,7 @@ class KisToolPolyline : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: KisToolPolyline(); @@ -55,15 +56,15 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 5; } + virtual TQ_UINT32 priority() { return 5; } virtual void buttonPress(KisButtonPressEvent *event); virtual void doubleClick(KisDoubleClickEvent *e); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; void finish(); - virtual void keyPress(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); public slots: @@ -71,7 +72,7 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); @@ -82,7 +83,7 @@ protected: bool m_dragging; KisImageSP m_currentImage; private: - typedef QValueVector KisPointVector; + typedef TQValueVector KisPointVector; KisPointVector m_points; }; diff --git a/krita/plugins/tools/tool_polyline/tool_polyline.cc b/krita/plugins/tools/tool_polyline/tool_polyline.cc index ae1fdda5..830a2d22 100644 --- a/krita/plugins/tools/tool_polyline/tool_polyline.cc +++ b/krita/plugins/tools/tool_polyline/tool_polyline.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -43,14 +43,14 @@ typedef KGenericFactory ToolPolylineFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolpolyline, ToolPolylineFactory( "krita" ) ) -ToolPolyline::ToolPolyline(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPolyline::ToolPolyline(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPolylineFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add(new KisToolPolylineFactory()); } diff --git a/krita/plugins/tools/tool_polyline/tool_polyline.h b/krita/plugins/tools/tool_polyline/tool_polyline.h index 14987487..9f483363 100644 --- a/krita/plugins/tools/tool_polyline/tool_polyline.h +++ b/krita/plugins/tools/tool_polyline/tool_polyline.h @@ -29,8 +29,9 @@ class KisView; class ToolPolyline : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPolyline(QObject *parent, const char *name, const QStringList &); + ToolPolyline(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPolyline(); private: diff --git a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc index cdb38cb3..bfac2a5d 100644 --- a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc +++ b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -47,10 +47,10 @@ #include "kis_tool_selectsimilar.h" -void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const Q_UINT8 * c, int fuzziness, enumSelectionMode mode) +void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const TQ_UINT8 * c, int fuzziness, enumSelectionMode mode) { // XXX: Multithread this! - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; dev->exactBounds(x, y, w, h); @@ -63,7 +63,7 @@ void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const Q_UINT8 //if (dev->colorSpace()->hasAlpha()) // opacity = dev->colorSpace()->getAlpha(hiter.rawData()); - Q_UINT8 match = cs->difference(c, hiter.rawData()); + TQ_UINT8 match = cs->difference(c, hiter.rawData()); if (mode == SELECTION_ADD) { if (match <= fuzziness) { @@ -96,8 +96,8 @@ KisToolSelectSimilar::KisToolSelectSimilar() m_selectionOptionsWidget = 0; m_fuzziness = 20; m_currentSelectAction = m_defaultSelectAction = SELECTION_ADD; - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), SLOT(slotTimer()) ); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimer()) ); } KisToolSelectSimilar::~KisToolSelectSimilar() @@ -124,13 +124,13 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) { if (m_subject) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisImageSP img; KisPaintDeviceSP dev; - QPoint pos; - Q_UINT8 opacity = OPACITY_OPAQUE; + TQPoint pos; + TQ_UINT8 opacity = OPACITY_OPAQUE; - if (e->button() != QMouseEvent::LeftButton && e->button() != QMouseEvent::RightButton) + if (e->button() != TQMouseEvent::LeftButton && e->button() != TQMouseEvent::RightButton) return; if (!(img = m_subject->currentImg())) @@ -141,7 +141,7 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) if (!dev || !img->activeLayer()->visible()) return; - pos = QPoint(e->pos().floorX(), e->pos().floorY()); + pos = TQPoint(e->pos().floorX(), e->pos().floorY()); KisSelectedTransaction *t = 0; if (img->undo()) t = new KisSelectedTransaction(i18n("Similar Selection"),dev); @@ -159,23 +159,23 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) img->undoAdapter()->addCommand(t); m_subject->canvasController()->updateCanvas(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } void KisToolSelectSimilar::slotTimer() { #if KDE_IS_VERSION(3,4,0) - int state = kapp->keyboardMouseState() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton); + int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton); #else int state = kapp->keyboardModifiers() & (KApplication::ShiftModifier |KApplication::ControlModifier|KApplication::Modifier1); #endif enumSelectionMode action; - if (state == Qt::ShiftButton) + if (state == TQt::ShiftButton) action = SELECTION_ADD; - else if (state == Qt::ControlButton) + else if (state == TQt::ControlButton) action = SELECTION_SUBTRACT; else action = m_defaultSelectAction; @@ -202,7 +202,7 @@ void KisToolSelectSimilar::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Similar Selection"), "tool_similar_selection", "Ctrl+E", this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Similar Selection"), "tool_similar_selection", "Ctrl+E", this, TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Select similar colors")); m_action->setExclusiveGroup("tools"); @@ -226,26 +226,26 @@ void KisToolSelectSimilar::slotSetAction(int action) m_defaultSelectAction = (enumSelectionMode)action; } -QWidget* KisToolSelectSimilar::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectSimilar::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new QWidget(parent); + m_optWidget = new TQWidget(tqparent); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Similar Selection")); - QVBoxLayout * l = new QVBoxLayout(m_optWidget, 0, 6); + TQVBoxLayout * l = new TQVBoxLayout(m_optWidget, 0, 6); Q_CHECK_PTR(l); m_selectionOptionsWidget = new KisSelectionOptions(m_optWidget, m_subject); Q_CHECK_PTR(m_selectionOptionsWidget); l->addWidget(m_selectionOptionsWidget); - connect (m_selectionOptionsWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_selectionOptionsWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QHBoxLayout * hbox = new QHBoxLayout(l); + TQHBoxLayout * hbox = new TQHBoxLayout(l); Q_CHECK_PTR(hbox); - QLabel * lbl = new QLabel(i18n("Fuzziness: "), m_optWidget); + TQLabel * lbl = new TQLabel(i18n("Fuzziness: "), m_optWidget); Q_CHECK_PTR(lbl); hbox->addWidget(lbl); @@ -256,14 +256,14 @@ QWidget* KisToolSelectSimilar::createOptionWidget(QWidget* parent) input->setRange(0, 200, 10, true); input->setValue(20); hbox->addWidget(input); - connect(input, SIGNAL(valueChanged(int)), this, SLOT(slotSetFuzziness(int))); + connect(input, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetFuzziness(int))); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectSimilar::optionWidget() +TQWidget* KisToolSelectSimilar::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h index 10a57dd3..d98659d0 100644 --- a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h +++ b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h @@ -23,9 +23,9 @@ #include class KisCanvasSubject; -class QWidget; -class QVBoxLayout; -class QCheckBox; +class TQWidget; +class TQVBoxLayout; +class TQCheckBox; class KisIntSpinbox; /** @@ -40,6 +40,7 @@ class KisSelectionOptions; class KisToolSelectSimilar : public KisToolNonPaint { Q_OBJECT + TQ_OBJECT typedef KisToolNonPaint super; public: @@ -48,7 +49,7 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 8; } + virtual TQ_UINT32 priority() { return 8; } virtual enumToolType toolType() { return TOOL_SELECT; } public slots: @@ -60,22 +61,22 @@ public slots: virtual void slotSetAction(int); private: - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void buttonPress(KisButtonPressEvent *e); void setPickerCursor(enumSelectionMode); KisCanvasSubject *m_subject; - QWidget *m_optWidget; + TQWidget *m_optWidget; KisSelectionOptions *m_selectionOptionsWidget; int m_fuzziness; enumSelectionMode m_defaultSelectAction; enumSelectionMode m_currentSelectAction; - QTimer *m_timer; - QCursor m_addCursor; - QCursor m_subtractCursor; + TQTimer *m_timer; + TQCursor m_addCursor; + TQCursor m_subtractCursor; private slots: void slotTimer(); diff --git a/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc b/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc index fc6b0c41..2b1cb867 100644 --- a/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc +++ b/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include #include @@ -41,14 +41,14 @@ typedef KGenericFactory SelectSimilarFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolselectsimilar, SelectSimilarFactory( "krita" ) ) -SelectSimilar::SelectSimilar(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +SelectSimilar::SelectSimilar(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(SelectSimilarFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); r->add(new KisToolSelectSimilarFactory()); } } diff --git a/krita/plugins/tools/tool_selectsimilar/selectsimilar.h b/krita/plugins/tools/tool_selectsimilar/selectsimilar.h index ca181bcc..c3287a4c 100644 --- a/krita/plugins/tools/tool_selectsimilar/selectsimilar.h +++ b/krita/plugins/tools/tool_selectsimilar/selectsimilar.h @@ -24,8 +24,9 @@ class SelectSimilar : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - SelectSimilar(QObject *parent, const char *name, const QStringList &); + SelectSimilar(TQObject *tqparent, const char *name, const TQStringList &); virtual ~SelectSimilar(); diff --git a/krita/plugins/tools/tool_star/kis_tool_star.cc b/krita/plugins/tools/tool_star/kis_tool_star.cc index 22e890ac..3ba619de 100644 --- a/krita/plugins/tools/tool_star/kis_tool_star.cc +++ b/krita/plugins/tools/tool_star/kis_tool_star.cc @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -88,7 +88,7 @@ void KisToolStar::move(KisMoveEvent *event) // erase old lines on canvas draw(m_dragStart, m_dragEnd); // move (alt) or resize star - if (event->state() & Qt::AltButton) { + if (event->state() & TQt::AltButton) { KisPoint trans = event->pos() - m_dragEnd; m_dragStart += trans; m_dragEnd += trans; @@ -154,21 +154,21 @@ void KisToolStar::draw(const KisPoint& start, const KisPoint& end ) KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter p (canvas); - QPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); KisPoint startPos; KisPoint endPos; startPos = controller->windowToView(start); endPos = controller->windowToView(end); - p.setRasterOp(Qt::NotROP); + p.setRasterOp(TQt::NotROP); vKisPoint points = starCoordinates(m_vertices, startPos.x(), startPos.y(), endPos.x(), endPos.y()); for (uint i = 0; i < points.count() - 1; i++) { - p.drawLine(points[i].floorQPoint(), points[i + 1].floorQPoint()); + p.drawLine(points[i].floorTQPoint(), points[i + 1].floorTQPoint()); } - p.drawLine(points[points.count() - 1].floorQPoint(), points[0].floorQPoint()); + p.drawLine(points[points.count() - 1].floorTQPoint(), points[0].floorTQPoint()); p.end (); } @@ -178,13 +178,13 @@ void KisToolStar::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Star"), "tool_star", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -198,7 +198,7 @@ void KisToolStar::setup(KActionCollection *collection) vKisPoint KisToolStar::starCoordinates(int N, double mx, double my, double x, double y) { double R=0, r=0; - Q_INT32 n=0; + TQ_INT32 n=0; double angle; vKisPoint starCoordinatesArray(2*N); @@ -225,16 +225,16 @@ vKisPoint KisToolStar::starCoordinates(int N, double mx, double my, double x, do return starCoordinatesArray; } -QWidget* KisToolStar::createOptionWidget(QWidget* parent) +TQWidget* KisToolStar::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); m_optWidget = new WdgToolStar(widget); Q_CHECK_PTR(m_optWidget); m_optWidget->ratioSpinBox->setValue(m_innerOuterRatio); - QGridLayout *optionLayout = new QGridLayout(widget, 1, 1); + TQGridLayout *optionLayout = new TQGridLayout(widget, 1, 1); super::addOptionWidgetLayout(optionLayout); optionLayout->addWidget(m_optWidget, 0, 0); diff --git a/krita/plugins/tools/tool_star/kis_tool_star.h b/krita/plugins/tools/tool_star/kis_tool_star.h index e922aa6c..2637ffd5 100644 --- a/krita/plugins/tools/tool_star/kis_tool_star.h +++ b/krita/plugins/tools/tool_star/kis_tool_star.h @@ -34,6 +34,7 @@ class KisToolStar : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolStar(); @@ -45,7 +46,7 @@ public: virtual void update (KisCanvasSubject *subject); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); // // KisToolPaint interface @@ -53,28 +54,28 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 6; } + virtual TQ_UINT32 priority() { return 6; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); protected: virtual void draw(const KisPoint& start, const KisPoint& stop); - //virtual void draw(KisPainter *gc, const QRect& rc); + //virtual void draw(KisPainter *gc, const TQRect& rc); protected: int m_lineThickness; KisPoint m_dragStart; KisPoint m_dragEnd; - QRect m_final_lines; + TQRect m_final_lines; bool m_dragging; KisImageSP m_currentImage; private: vKisPoint starCoordinates(int N, double mx, double my, double x, double y); - Q_INT32 m_innerOuterRatio; - Q_INT32 m_vertices; + TQ_INT32 m_innerOuterRatio; + TQ_INT32 m_vertices; WdgToolStar* m_optWidget; }; @@ -93,7 +94,7 @@ public: t->setup(ac); return t; } - virtual KisID id() { return KisID("starshape", i18n("Star Tool")); } + virtual KisID id() { return KisID("startqshape", i18n("Star Tool")); } }; diff --git a/krita/plugins/tools/tool_star/tool_star.cc b/krita/plugins/tools/tool_star/tool_star.cc index b264cbde..52c4187c 100644 --- a/krita/plugins/tools/tool_star/tool_star.cc +++ b/krita/plugins/tools/tool_star/tool_star.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -42,14 +42,14 @@ typedef KGenericFactory ToolStarFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolstar, ToolStarFactory( "krita" ) ) -ToolStar::ToolStar(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolStar::ToolStar(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolStarFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast( parent ); + KisToolRegistry * r = dynamic_cast( tqparent ); r->add(new KisToolStarFactory()); } diff --git a/krita/plugins/tools/tool_star/tool_star.h b/krita/plugins/tools/tool_star/tool_star.h index 28a44f5c..36172dd6 100644 --- a/krita/plugins/tools/tool_star/tool_star.h +++ b/krita/plugins/tools/tool_star/tool_star.h @@ -29,8 +29,9 @@ class KisView; class ToolStar : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolStar(QObject *parent, const char *name, const QStringList &); + ToolStar(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolStar(); private: diff --git a/krita/plugins/tools/tool_star/wdg_tool_star.ui b/krita/plugins/tools/tool_star/wdg_tool_star.ui index db7c0e4b..b342a927 100644 --- a/krita/plugins/tools/tool_star/wdg_tool_star.ui +++ b/krita/plugins/tools/tool_star/wdg_tool_star.ui @@ -1,6 +1,6 @@ WdgToolStar - + WdgToolStar @@ -22,15 +22,15 @@ 0 - + - layout8 + tqlayout8 unnamed - + textLabel1 @@ -57,15 +57,15 @@ - + - layout7 + tqlayout7 unnamed - + textLabel2 @@ -120,7 +120,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082 - + knuminput.h knuminput.h diff --git a/krita/plugins/tools/tool_transform/kis_tool_transform.cc b/krita/plugins/tools/tool_transform/kis_tool_transform.cc index 05cdfd44..593ad450 100644 --- a/krita/plugins/tools/tool_transform/kis_tool_transform.cc +++ b/krita/plugins/tools/tool_transform/kis_tool_transform.cc @@ -20,13 +20,13 @@ */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -62,14 +62,14 @@ namespace { typedef KisSelectedTransaction super; public: - TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, QPoint startPos, QPoint endPos); + TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, TQPoint startPos, TQPoint endPos); virtual ~TransformCmd(); public: virtual void execute(); virtual void unexecute(); void transformArgs(double &sx, double &sy, double &tx, double &ty, double &a); - KisSelectionSP origSelection(QPoint &startPos, QPoint &endPos); + KisSelectionSP origSelection(TQPoint &startPos, TQPoint &endPos); KisPaintDeviceSP theDevice(); KisPaintDeviceSP origDevice(); @@ -81,13 +81,13 @@ namespace { double m_a; KisToolTransform *m_tool; KisSelectionSP m_origSelection; - QPoint m_startPos; - QPoint m_endPos; + TQPoint m_startPos; + TQPoint m_endPos; KisPaintDeviceSP m_device; KisPaintDeviceSP m_origDevice; }; - TransformCmd::TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, QPoint startPos, QPoint endPos) : + TransformCmd::TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, TQPoint startPos, TQPoint endPos) : super(i18n("Transform"), device) , m_scaleX(scaleX) , m_scaleY(scaleY) @@ -116,7 +116,7 @@ namespace { a = m_a; } - KisSelectionSP TransformCmd::origSelection(QPoint &startPos, QPoint &endPos) + KisSelectionSP TransformCmd::origSelection(TQPoint &startPos, TQPoint &endPos) { startPos = m_startPos; endPos = m_endPos; @@ -152,8 +152,8 @@ KisToolTransform::KisToolTransform() setCursor(KisCursor::selectCursor()); m_subject = 0; m_selecting = false; - m_startPos = QPoint(0, 0); - m_endPos = QPoint(0, 0); + m_startPos = TQPoint(0, 0); + m_endPos = TQPoint(0, 0); m_optWidget = 0; m_sizeCursors[0] = KisCursor::sizeVerCursor(); m_sizeCursors[1] = KisCursor::sizeBDiagCursor(); @@ -181,7 +181,7 @@ void KisToolTransform::deactivate() paintOutline(); - disconnect(m_subject->currentImg().data(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + disconnect(m_subject->currentImg().data(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolTransform::activate() @@ -222,12 +222,12 @@ void KisToolTransform::activate() initHandles(); } } - connect(m_subject->currentImg(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + connect(m_subject->currentImg(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolTransform::initHandles() { - Q_INT32 x,y,w,h; + TQ_INT32 x,y,w,h; KisImageSP img = m_subject->currentImg(); KisPaintDeviceSP dev = img->activeDevice(); @@ -241,15 +241,15 @@ void KisToolTransform::initHandles() { KisSelectionSP sel = dev->selection(); m_origSelection = new KisSelection(*sel.data()); - QRect r = sel->selectedExactRect(); + TQRect r = sel->selectedExactRect(); r.rect(&x, &y, &w, &h); } else { dev->exactBounds(x,y,w,h); m_origSelection = 0; } - m_startPos = QPoint(x, y); - m_endPos = QPoint(x+w-1, y+h-1); + m_startPos = TQPoint(x, y); + m_endPos = TQPoint(x+w-1, y+h-1); m_org_cenX = (m_startPos.x() + m_endPos.x()) / 2.0; m_org_cenY = (m_startPos.y() + m_endPos.y()) / 2.0; @@ -264,10 +264,10 @@ void KisToolTransform::initHandles() void KisToolTransform::paint(KisCanvasPainter& gc) { - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolTransform::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolTransform::paint(KisCanvasPainter& gc, const TQRect& rc) { paintOutline(gc, rc); } @@ -275,7 +275,7 @@ void KisToolTransform::paint(KisCanvasPainter& gc, const QRect& rc) void KisToolTransform::buttonPress(KisButtonPressEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { m_wasPressed = true; } @@ -286,42 +286,42 @@ void KisToolTransform::buttonPress(KisButtonPressEvent *e) switch(m_function) { case ROTATE: - m_clickoffset = e->pos().floorQPoint() - - QPoint(static_cast(m_translateX),static_cast(m_translateY)); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint(static_cast(m_translateX),static_cast(m_translateY)); m_clickangle = -m_a - atan2(m_clickoffset.x(),m_clickoffset.y()); - m_clickoffset = QPoint(0, 0); + m_clickoffset = TQPoint(0, 0); break; case MOVE: - m_clickoffset = e->pos().floorQPoint() - - QPoint(static_cast(m_translateX),static_cast(m_translateY)); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint(static_cast(m_translateX),static_cast(m_translateY)); break; case TOPSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_topleft + m_topright)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_topleft + m_topright)/2); break; case TOPRIGHTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_topright; + m_clickoffset = e->pos().floorTQPoint() - m_topright; break; case RIGHTSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_topright + m_bottomright)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_topright + m_bottomright)/2); break; case BOTTOMRIGHTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_bottomright; + m_clickoffset = e->pos().floorTQPoint() - m_bottomright; break; case BOTTOMSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_bottomleft + m_bottomright)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_bottomleft + m_bottomright)/2); break; case BOTTOMLEFTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_bottomleft; + m_clickoffset = e->pos().floorTQPoint() - m_bottomleft; break; case LEFTSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_topleft + m_bottomleft)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_topleft + m_bottomleft)/2); break; case TOPLEFTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_topleft; + m_clickoffset = e->pos().floorTQPoint() - m_topleft; break; } m_selecting = true; @@ -330,11 +330,11 @@ void KisToolTransform::buttonPress(KisButtonPressEvent *e) } } -int KisToolTransform::det(QPoint v,QPoint w) +int KisToolTransform::det(TQPoint v,TQPoint w) { return v.x()*w.y()-v.y()*w.x(); } -int KisToolTransform::distsq(QPoint v,QPoint w) +int KisToolTransform::distsq(TQPoint v,TQPoint w) { v -= w; return v.x()*v.x() + v.y()*v.y(); @@ -391,12 +391,12 @@ void KisToolTransform::move(KisMoveEvent *e) KisCanvasController *controller = m_subject->canvasController(); Q_ASSERT(controller); - QPoint topleft = m_topleft; - QPoint topright = m_topright; - QPoint bottomleft = m_bottomleft; - QPoint bottomright = m_bottomright; + TQPoint topleft = m_topleft; + TQPoint topright = m_topright; + TQPoint bottomleft = m_bottomleft; + TQPoint bottomright = m_bottomright; - QPoint mousePos = e->pos().floorQPoint(); + TQPoint mousePos = e->pos().floorTQPoint(); if (m_subject && m_selecting) { paintOutline(); @@ -428,7 +428,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_startPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX>0) // handle the mirrored cases m_scaleX = fabs(m_scaleY); @@ -446,7 +446,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_startPos.y() - m_org_cenY); // enforce same aspect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -473,7 +473,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleX = (newX - dx) / (m_endPos.x() - m_org_cenX); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleY>0) // handle the mirrored cases m_scaleY = fabs(m_scaleX); @@ -491,7 +491,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_endPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -518,7 +518,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_endPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX>0) // handle the mirrored cases m_scaleX = fabs(m_scaleY); @@ -536,7 +536,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_endPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -563,7 +563,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleX = (newX - dx) / (m_startPos.x() - m_org_cenX); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleY>0) // handle the mirrored cases m_scaleY = fabs(m_scaleX); @@ -581,7 +581,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_startPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -646,7 +646,7 @@ void KisToolTransform::move(KisMoveEvent *e) void KisToolTransform::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { if(!m_wasPressed) return; m_wasPressed = false; @@ -660,9 +660,9 @@ void KisToolTransform::buttonRelease(KisButtonReleaseEvent *e) if(m_actualyMoveWhileSelected) { paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } } @@ -673,7 +673,7 @@ void KisToolTransform::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } @@ -688,38 +688,38 @@ void KisToolTransform::recalcOutline() x = (m_startPos.x() - m_org_cenX) * m_scaleX; y = (m_startPos.y() - m_org_cenY) * m_scaleY; - m_topleft = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_topleft = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); x = (m_endPos.x() - m_org_cenX) * m_scaleX; y = (m_startPos.y() - m_org_cenY) * m_scaleY; - m_topright = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_topright = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); x = (m_startPos.x() - m_org_cenX) * m_scaleX; y = (m_endPos.y() - m_org_cenY) * m_scaleY; - m_bottomleft = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_bottomleft = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); x = (m_endPos.x() - m_org_cenX) * m_scaleX; y = (m_endPos.y() - m_org_cenY) * m_scaleY; - m_bottomright = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_bottomright = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); } -void KisToolTransform::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolTransform::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); pen.setWidth(1); Q_ASSERT(controller); recalcOutline(); - QPoint topleft = controller->windowToView(m_topleft); - QPoint topright = controller->windowToView(m_topright); - QPoint bottomleft = controller->windowToView(m_bottomleft); - QPoint bottomright = controller->windowToView(m_bottomright); + TQPoint topleft = controller->windowToView(m_topleft); + TQPoint topright = controller->windowToView(m_topright); + TQPoint bottomleft = controller->windowToView(m_bottomleft); + TQPoint bottomright = controller->windowToView(m_bottomright); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); gc.drawRect(topleft.x()-4, topleft.y()-4, 8, 8); gc.drawLine(topleft.x(), topleft.y(), (topleft.x()+topright.x())/2, (topleft.y()+topright.y())/2); @@ -759,7 +759,7 @@ void KisToolTransform::transform() m_scaleX, m_scaleY, m_translateX, m_translateY, m_a, m_origSelection, m_startPos, m_endPos); // Copy the original state back. - QRect rc = m_origDevice->extent(); + TQRect rc = m_origDevice->extent(); rc = rc.normalize(); img->activeDevice()->clear(); KisPainter gc(img->activeDevice()); @@ -769,8 +769,8 @@ void KisToolTransform::transform() // Also restore the original selection. if(m_origSelection) { - //QRect rc = m_origSelection->extent(); - QRect rc = m_origSelection->selectedRect(); + //TQRect rc = m_origSelection->extent(); + TQRect rc = m_origSelection->selectedRect(); rc = rc.normalize(); img->activeDevice()->selection()->clear(); KisPainter sgc(img->activeDevice()->selection().data()); @@ -856,27 +856,27 @@ void KisToolTransform::slotLayerActivated(KisLayerSP) } -QWidget* KisToolTransform::createOptionWidget(QWidget* parent) +TQWidget* KisToolTransform::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new WdgToolTransform(parent); + m_optWidget = new WdgToolTransform(tqparent); Q_CHECK_PTR(m_optWidget); m_optWidget->cmbFilter->clear(); m_optWidget->cmbFilter->setIDList(KisFilterStrategyRegistry::instance()->listKeys()); m_optWidget->cmbFilter->setCurrentText("Mitchell"); - connect(m_optWidget->cmbFilter, SIGNAL(activated(const KisID &)), - this, SLOT(slotSetFilter(const KisID &))); + connect(m_optWidget->cmbFilter, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(slotSetFilter(const KisID &))); KisID filterID = m_optWidget->cmbFilter->currentItem(); m_filter = KisFilterStrategyRegistry::instance()->get(filterID); /* - connect(m_optWidget->intStartX, SIGNAL(valueChanged(int)), this, SLOT(setStartX(int))); - connect(m_optWidget->intStartY, SIGNAL(valueChanged(int)), this, SLOT(setStartY(int))); - connect(m_optWidget->intEndX, SIGNAL(valueChanged(int)), this, SLOT(setEndX(int))); - connect(m_optWidget->intEndY, SIGNAL(valueChanged(int)), this, SLOT(setEndY(int))); + connect(m_optWidget->intStartX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartX(int))); + connect(m_optWidget->intStartY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartY(int))); + connect(m_optWidget->intEndX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndX(int))); + connect(m_optWidget->intEndY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndY(int))); */ m_optWidget->intStartX->hide(); m_optWidget->intStartY->hide(); @@ -889,7 +889,7 @@ QWidget* KisToolTransform::createOptionWidget(QWidget* parent) return m_optWidget; } -QWidget* KisToolTransform::optionWidget() +TQWidget* KisToolTransform::optionWidget() { return m_optWidget; } @@ -903,7 +903,7 @@ void KisToolTransform::setup(KActionCollection *collection) "tool_transform", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_transform/kis_tool_transform.h b/krita/plugins/tools/tool_transform/kis_tool_transform.h index 9ae4f4da..3d5ff8b3 100644 --- a/krita/plugins/tools/tool_transform/kis_tool_transform.h +++ b/krita/plugins/tools/tool_transform/kis_tool_transform.h @@ -22,7 +22,7 @@ #ifndef KIS_TOOL_TRANSFORM_H_ #define KIS_TOOL_TRANSFORM_H_ -#include +#include #include #include @@ -42,19 +42,20 @@ class KisToolTransform : public KisToolNonPaint, KisCommandHistoryListener { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolTransform(); virtual ~KisToolTransform(); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); @@ -75,15 +76,15 @@ public: private: - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); void transform(); void recalcOutline(); double rotX(double x, double y) { return m_cosa*x - m_sina*y;}; double rotY(double x, double y) { return m_sina*x + m_cosa*y;}; double invrotX(double x, double y) { return m_cosa*x + m_sina*y;}; double invrotY(double x, double y) { return -m_sina*x + m_cosa*y;}; - int det(QPoint v,QPoint w); - int distsq(QPoint v,QPoint w); + int det(TQPoint v,TQPoint w); + int distsq(TQPoint v,TQPoint w); void setFunctionalCursor(); void initHandles(); @@ -102,21 +103,21 @@ protected slots: private: enum function {ROTATE,MOVE,TOPLEFTSCALE,TOPSCALE,TOPRIGHTSCALE,RIGHTSCALE, BOTTOMRIGHTSCALE, BOTTOMSCALE,BOTTOMLEFTSCALE, LEFTSCALE}; - QCursor m_sizeCursors[8]; + TQCursor m_sizeCursors[8]; function m_function; - QPoint m_startPos; - QPoint m_endPos; + TQPoint m_startPos; + TQPoint m_endPos; bool m_selecting; bool m_actualyMoveWhileSelected; - QPoint m_topleft; - QPoint m_topright; - QPoint m_bottomleft; - QPoint m_bottomright; + TQPoint m_topleft; + TQPoint m_topright; + TQPoint m_bottomleft; + TQPoint m_bottomright; double m_scaleX; double m_scaleY; double m_translateX; double m_translateY; - QPoint m_clickoffset; + TQPoint m_clickoffset; double m_org_cenX; double m_org_cenY; double m_cosa; diff --git a/krita/plugins/tools/tool_transform/tool_transform.cc b/krita/plugins/tools/tool_transform/tool_transform.cc index e8c77aa7..b91ab784 100644 --- a/krita/plugins/tools/tool_transform/tool_transform.cc +++ b/krita/plugins/tools/tool_transform/tool_transform.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -42,14 +42,14 @@ typedef KGenericFactory ToolTransformFactory; K_EXPORT_COMPONENT_FACTORY( kritatooltransform, ToolTransformFactory( "krita" ) ) -ToolTransform::ToolTransform(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolTransform::ToolTransform(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolTransformFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast(parent); + KisToolRegistry * r = dynamic_cast(tqparent); KisToolTransformFactory * f = new KisToolTransformFactory(); Q_CHECK_PTR(f); r->add(f); diff --git a/krita/plugins/tools/tool_transform/tool_transform.h b/krita/plugins/tools/tool_transform/tool_transform.h index 42eba788..04bfbaa9 100644 --- a/krita/plugins/tools/tool_transform/tool_transform.h +++ b/krita/plugins/tools/tool_transform/tool_transform.h @@ -29,8 +29,9 @@ class KisView; class ToolTransform : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolTransform(QObject *parent, const char *name, const QStringList &); + ToolTransform(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolTransform(); private: diff --git a/krita/plugins/tools/tool_transform/wdg_tool_transform.ui b/krita/plugins/tools/tool_transform/wdg_tool_transform.ui index b9307451..2f41e1b3 100644 --- a/krita/plugins/tools/tool_transform/wdg_tool_transform.ui +++ b/krita/plugins/tools/tool_transform/wdg_tool_transform.ui @@ -1,6 +1,6 @@ WdgToolTransform - + WdgToolTransform @@ -25,31 +25,31 @@ 3 - + - layout11 + tqlayout11 unnamed - + - layout7 + tqlayout7 unnamed - + - layout1 + tqlayout1 unnamed - + textLabel1 @@ -70,15 +70,15 @@ - + - layout2 + tqlayout2 unnamed - + textLabel2 @@ -101,23 +101,23 @@ - + - layout8 + tqlayout8 unnamed - + - layout3 + tqlayout3 unnamed - + textLabel3 @@ -138,15 +138,15 @@ - + - layout4 + tqlayout4 unnamed - + textLabel4 @@ -171,14 +171,14 @@ - + textLabel1_2 Filter: - + AlignVCenter|AlignRight @@ -197,7 +197,7 @@ Expanding - + 20 21 @@ -235,7 +235,7 @@ intEndX intEndY - + knuminput.h kis_cmb_idlist.h diff --git a/krita/plugins/viewplugins/colorrange/colorrange.cc b/krita/plugins/viewplugins/colorrange/colorrange.cc index 9c52e027..cc9bf95c 100644 --- a/krita/plugins/viewplugins/colorrange/colorrange.cc +++ b/krita/plugins/viewplugins/colorrange/colorrange.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -50,15 +50,15 @@ typedef KGenericFactory ColorRangeFactory; K_EXPORT_COMPONENT_FACTORY( kritacolorrange, ColorRangeFactory( "krita" ) ) -ColorRange::ColorRange(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ColorRange::ColorRange(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if (parent->inherits("KisView")) { + if (tqparent->inherits("KisView")) { setInstance(ColorRangeFactory::instance()); setXMLFile(locate("data","kritaplugins/colorrange.rc"), true); - m_view = dynamic_cast(parent); - m_view->canvasSubject()->selectionManager()->addSelectionAction( new KAction(i18n("&Color Range..."), 0, 0, this, SLOT(slotActivated()), actionCollection(), "colorrange") ); + m_view = dynamic_cast(tqparent); + m_view->canvasSubject()->selectionManager()->addSelectionAction( new KAction(i18n("&Color Range..."), 0, 0, this, TQT_SLOT(slotActivated()), actionCollection(), "colorrange") ); } } diff --git a/krita/plugins/viewplugins/colorrange/colorrange.h b/krita/plugins/viewplugins/colorrange/colorrange.h index 1cc10cef..322f5bc4 100644 --- a/krita/plugins/viewplugins/colorrange/colorrange.h +++ b/krita/plugins/viewplugins/colorrange/colorrange.h @@ -28,8 +28,9 @@ class KisView; class ColorRange : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ColorRange(QObject *parent, const char *name, const QStringList &); + ColorRange(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ColorRange(); private slots: diff --git a/krita/plugins/viewplugins/colorrange/dlg_colorrange.cc b/krita/plugins/viewplugins/colorrange/dlg_colorrange.cc index 1cd115c1..acec9b17 100644 --- a/krita/plugins/viewplugins/colorrange/dlg_colorrange.cc +++ b/krita/plugins/viewplugins/colorrange/dlg_colorrange.cc @@ -17,16 +17,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -103,7 +103,7 @@ namespace { } -Q_UINT32 matchColors(const QColor & c, enumAction action) +TQ_UINT32 matchColors(const TQColor & c, enumAction action) { int r = c.red(); int g = c.green(); @@ -174,8 +174,8 @@ Q_UINT32 matchColors(const QColor & c, enumAction action) -DlgColorRange::DlgColorRange( KisView * view, KisPaintDeviceSP dev, QWidget * parent, const char * name) - : super (parent, name, true, i18n("Color Range"), Ok | Cancel, Ok) +DlgColorRange::DlgColorRange( KisView * view, KisPaintDeviceSP dev, TQWidget * tqparent, const char * name) + : super (tqparent, name, true, i18n("Color Range"), Ok | Cancel, Ok) { m_dev = dev; m_view = view; @@ -187,7 +187,7 @@ DlgColorRange::DlgColorRange( KisView * view, KisPaintDeviceSP dev, QWidget * p setCaption(i18n("Color Range")); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); if (m_dev->image()->undo()) m_transaction = new KisSelectedTransaction(i18n("Select by Color Range"), m_dev); @@ -201,29 +201,29 @@ DlgColorRange::DlgColorRange( KisView * view, KisPaintDeviceSP dev, QWidget * p m_mode = SELECTION_ADD; m_currentAction = REDS; - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); - connect(this, SIGNAL(cancelClicked()), - this, SLOT(cancelClicked())); + connect(this, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(cancelClicked())); - connect(m_page->chkInvert, SIGNAL(clicked()), - this, SLOT(slotInvertClicked())); + connect(m_page->chkInvert, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotInvertClicked())); - connect(m_page->cmbSelect, SIGNAL(activated(int)), - this, SLOT(slotSelectionTypeChanged(int))); + connect(m_page->cmbSelect, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectionTypeChanged(int))); - connect (m_page->radioAdd, SIGNAL(toggled(bool)), - this, SLOT(slotAdd(bool))); + connect (m_page->radioAdd, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotAdd(bool))); - connect (m_page->radioSubtract, SIGNAL(toggled(bool)), - this, SLOT(slotSubtract(bool))); + connect (m_page->radioSubtract, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSubtract(bool))); - connect (m_page->bnSelect, SIGNAL(clicked()), - this, SLOT(slotSelectClicked())); + connect (m_page->bnSelect, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSelectClicked())); - connect (m_page->bnDeselect, SIGNAL(clicked()), - this, SLOT(slotDeselectClicked())); + connect (m_page->bnDeselect, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeselectClicked())); } @@ -237,9 +237,9 @@ void DlgColorRange::updatePreview() { if (!m_selection) return; - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; m_dev->exactBounds(x, y, w, h); - QPixmap pix = QPixmap(m_selection->maskImage().smoothScale(350, 350, QImage::ScaleMin)); + TQPixmap pix = TQPixmap(m_selection->tqmaskImage().smoothScale(350, 350, TQ_ScaleMin)); m_subject->canvasController()->updateCanvas(); m_page->pixSelection->setPixmap(pix); } @@ -284,22 +284,22 @@ void DlgColorRange::slotAdd(bool on) void DlgColorRange::slotSelectClicked() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); // XXX: Multithread this! - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; m_dev->exactBounds(x, y, w, h); KisColorSpace * cs = m_dev->colorSpace(); - Q_UINT8 opacity; + TQ_UINT8 opacity; for (int y2 = y; y2 < h - y; ++y2) { KisHLineIterator hiter = m_dev->createHLineIterator(x, y2, w, false); KisHLineIterator selIter = m_selection ->createHLineIterator(x, y2, w, true); while (!hiter.isDone()) { - QColor c; + TQColor c; - cs->toQColor(hiter.rawData(), &c, &opacity); + cs->toTQColor(hiter.rawData(), &c, &opacity); // Don't try to select transparent pixels. if (opacity > OPACITY_TRANSPARENT) { - Q_UINT8 match = matchColors(c, m_currentAction); + TQ_UINT8 match = matchColors(c, m_currentAction); if (match) { // Personally, I think the invert option a bit silly. But it's possible I don't quite understand it. BSAR. @@ -308,7 +308,7 @@ void DlgColorRange::slotSelectClicked() *(selIter.rawData()) = match; } else if (m_mode == SELECTION_SUBTRACT) { - Q_UINT8 selectedness = *(selIter.rawData()); + TQ_UINT8 selectedness = *(selIter.rawData()); if (match < selectedness) { *(selIter.rawData()) = selectedness - match; } @@ -319,7 +319,7 @@ void DlgColorRange::slotSelectClicked() } else { if (m_mode == SELECTION_ADD) { - Q_UINT8 selectedness = *(selIter.rawData()); + TQ_UINT8 selectedness = *(selIter.rawData()); if (match < selectedness) { *(selIter.rawData()) = selectedness - match; } @@ -338,7 +338,7 @@ void DlgColorRange::slotSelectClicked() } } updatePreview(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void DlgColorRange::slotDeselectClicked() diff --git a/krita/plugins/viewplugins/colorrange/dlg_colorrange.h b/krita/plugins/viewplugins/colorrange/dlg_colorrange.h index 5a792abd..474a8b5e 100644 --- a/krita/plugins/viewplugins/colorrange/dlg_colorrange.h +++ b/krita/plugins/viewplugins/colorrange/dlg_colorrange.h @@ -20,7 +20,7 @@ #ifndef DLG_COLORRANGE #define DLG_COLORRANGE -#include +#include #include @@ -51,18 +51,19 @@ enum enumAction { /** - * This dialog allows the user to create a selection mask based + * This dialog allows the user to create a selection tqmask based * on a (range of) colors. */ class DlgColorRange: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgColorRange(KisView * view, KisPaintDeviceSP layer, QWidget * parent = 0, const char* name = 0); + DlgColorRange(KisView * view, KisPaintDeviceSP layer, TQWidget * tqparent = 0, const char* name = 0); ~DlgColorRange(); private slots: @@ -79,7 +80,7 @@ private slots: void slotDeselectClicked(); private: - QImage createMask(KisSelectionSP selection, KisPaintDeviceSP layer); + TQImage createMask(KisSelectionSP selection, KisPaintDeviceSP layer); private: @@ -89,7 +90,7 @@ private: KisView * m_view; KisCanvasSubject * m_subject; enumSelectionMode m_mode; - QCursor m_oldCursor; + TQCursor m_oldCursor; KisSelectedTransaction *m_transaction; enumAction m_currentAction; bool m_invert; diff --git a/krita/plugins/viewplugins/colorrange/wdg_colorrange.ui b/krita/plugins/viewplugins/colorrange/wdg_colorrange.ui index e9ed74f5..3eafd180 100644 --- a/krita/plugins/viewplugins/colorrange/wdg_colorrange.ui +++ b/krita/plugins/viewplugins/colorrange/wdg_colorrange.ui @@ -1,6 +1,6 @@ WdgColorRange - + WdgColorRange @@ -19,31 +19,31 @@ unnamed - + - layout10 + tqlayout10 unnamed - + - layout8 + tqlayout8 unnamed - + - layout7 + tqlayout7 unnamed - + Reds @@ -98,7 +98,7 @@ cmbSelect - + chkInvert @@ -108,7 +108,7 @@ - + grpSelection @@ -119,7 +119,7 @@ unnamed - + radioAdd @@ -130,7 +130,7 @@ true - + radioSubtract @@ -142,15 +142,15 @@ - + - layout9 + tqlayout9 unnamed - + bnSelect @@ -158,7 +158,7 @@ &Select - + bnDeselect @@ -176,7 +176,7 @@ Expanding - + 20 40 @@ -187,7 +187,7 @@ - + grpPreview @@ -209,7 +209,7 @@ unnamed - + pixSelection @@ -233,7 +233,7 @@ false - + AlignCenter @@ -248,5 +248,5 @@ - + diff --git a/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.cc b/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.cc index 62528a0c..3ffc80fb 100644 --- a/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.cc +++ b/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.cc @@ -19,13 +19,13 @@ */ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -58,19 +58,19 @@ typedef KGenericFactory ColorSpaceConversionFactory; K_EXPORT_COMPONENT_FACTORY( kritacolorspaceconversion, ColorSpaceConversionFactory( "krita" ) ) -ColorSpaceConversion::ColorSpaceConversion(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ColorSpaceConversion::ColorSpaceConversion(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; setInstance(ColorSpaceConversionFactory::instance()); setXMLFile(locate("data","kritaplugins/colorspaceconversion.rc"), true); - (void) new KAction(i18n("&Convert Image Type..."), 0, 0, this, SLOT(slotImgColorSpaceConversion()), actionCollection(), "imgcolorspaceconversion"); - (void) new KAction(i18n("&Convert Layer Type..."), 0, 0, this, SLOT(slotLayerColorSpaceConversion()), actionCollection(), "layercolorspaceconversion"); + (void) new KAction(i18n("&Convert Image Type..."), 0, 0, this, TQT_SLOT(slotImgColorSpaceConversion()), actionCollection(), "imgcolorspaceconversion"); + (void) new KAction(i18n("&Convert Layer Type..."), 0, 0, this, TQT_SLOT(slotLayerColorSpaceConversion()), actionCollection(), "layercolorspaceconversion"); } } @@ -91,7 +91,7 @@ void ColorSpaceConversion::slotImgColorSpaceConversion() if (KMessageBox::warningContinueCancel(m_view, i18n("This conversion will convert your %1 image through 16-bit L*a*b* and back.\n" "Watercolor and openEXR colorspaces will even be converted through 8-bit RGB.\n") - .arg(image->colorSpace()->id().name()), + .tqarg(image->colorSpace()->id().name()), i18n("Colorspace Conversion"), KGuiItem(i18n("Continue")), "lab16degradation") != KMessageBox::Continue) return; @@ -103,14 +103,14 @@ void ColorSpaceConversion::slotImgColorSpaceConversion() dlgColorSpaceConversion->setCaption(i18n("Convert All Layers From ") + image->colorSpace()->id().name()); - if (dlgColorSpaceConversion->exec() == QDialog::Accepted) { + if (dlgColorSpaceConversion->exec() == TQDialog::Accepted) { // XXX: Do the rest of the stuff KisID cspace = dlgColorSpaceConversion->m_page->cmbColorSpaces->currentItem(); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getColorSpace(cspace, dlgColorSpaceConversion->m_page->cmbDestProfile->currentText()); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); image->convertTo(cs, dlgColorSpaceConversion->m_page->grpIntent->selectedId()); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } delete dlgColorSpaceConversion; } @@ -128,7 +128,7 @@ void ColorSpaceConversion::slotLayerColorSpaceConversion() if (KMessageBox::warningContinueCancel(m_view, i18n("This conversion will convert your %1 layer through 16-bit L*a*b* and back.\n" "Watercolor and openEXR colorspaces will even be converted through 8-bit RGB.\n") - .arg(dev->colorSpace()->id().name()), + .tqarg(dev->colorSpace()->id().name()), i18n("Colorspace Conversion"), KGuiItem(i18n("Continue")), "lab16degradation") != KMessageBox::Continue) return; @@ -140,14 +140,14 @@ void ColorSpaceConversion::slotLayerColorSpaceConversion() dlgColorSpaceConversion->setCaption(i18n("Convert Current Layer From") + dev->colorSpace()->id().name()); - if (dlgColorSpaceConversion->exec() == QDialog::Accepted) { + if (dlgColorSpaceConversion->exec() == TQDialog::Accepted) { KisID cspace = dlgColorSpaceConversion->m_page->cmbColorSpaces->currentItem(); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry() -> getColorSpace(cspace, dlgColorSpaceConversion->m_page->cmbDestProfile->currentText()); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); dev->convertTo(cs, dlgColorSpaceConversion->m_page->grpIntent->selectedId()); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } delete dlgColorSpaceConversion; } diff --git a/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.h b/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.h index 3bf85530..402fde65 100644 --- a/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.h +++ b/krita/plugins/viewplugins/colorspaceconversion/colorspaceconversion.h @@ -31,8 +31,9 @@ class KisView; class ColorSpaceConversion : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ColorSpaceConversion(QObject *parent, const char *name, const QStringList &); + ColorSpaceConversion(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ColorSpaceConversion(); private slots: diff --git a/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.cc b/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.cc index b59fb546..b296ca2f 100644 --- a/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.cc +++ b/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.cc @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,26 +39,26 @@ #include "wdgconvertcolorspace.h" #include "dlg_colorspaceconversion.h" -DlgColorSpaceConversion::DlgColorSpaceConversion( QWidget * parent, +DlgColorSpaceConversion::DlgColorSpaceConversion( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Image Size"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Image Size"), Ok | Cancel, Ok) { m_page = new WdgConvertColorSpace(this, "colorspace_conversion"); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); m_page->cmbColorSpaces->setIDList(KisMetaRegistry::instance()->csRegistry()->listKeys()); fillCmbDestProfile(m_page->cmbColorSpaces->currentItem()); - connect(m_page->cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbDestProfile(const KisID &))); + connect(m_page->cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbDestProfile(const KisID &))); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } @@ -79,8 +79,8 @@ void DlgColorSpaceConversion::fillCmbDestProfile(const KisID & s) { m_page->cmbDestProfile->clear(); - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor(s); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor(s); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page->cmbDestProfile->insertItem((*it)->productName()); diff --git a/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.h b/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.h index ed086a8d..48ef3efe 100644 --- a/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.h +++ b/krita/plugins/viewplugins/colorspaceconversion/dlg_colorspaceconversion.h @@ -32,10 +32,11 @@ class WdgConvertColorSpace; class DlgColorSpaceConversion: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgColorSpaceConversion(QWidget * parent = 0, const char* name = 0); + DlgColorSpaceConversion(TQWidget * tqparent = 0, const char* name = 0); ~DlgColorSpaceConversion(); WdgConvertColorSpace * m_page; diff --git a/krita/plugins/viewplugins/colorspaceconversion/wdgconvertcolorspace.ui b/krita/plugins/viewplugins/colorspaceconversion/wdgconvertcolorspace.ui index 31f29be5..ae183206 100644 --- a/krita/plugins/viewplugins/colorspaceconversion/wdgconvertcolorspace.ui +++ b/krita/plugins/viewplugins/colorspaceconversion/wdgconvertcolorspace.ui @@ -1,6 +1,6 @@ WdgConvertColorSpace - + WdgConvertColorSpace @@ -19,7 +19,7 @@ unnamed - + lblConvert @@ -53,7 +53,7 @@ cmbDestProfile - + grpIntent @@ -67,7 +67,7 @@ unnamed - + radioPerceptual @@ -90,7 +90,7 @@ the perceived color. White point changed to result in neutral grays. Intended for images. - + radioRelativeColorimetric @@ -110,7 +110,7 @@ then, it is used. Else reverts to perceptual intent. - + radioSaturation @@ -135,7 +135,7 @@ then, it is used. Else reverts to perceptual intent. - + radioAbsoluteColorimetric @@ -159,7 +159,7 @@ colors (Pantone, TruMatch, logo colors, ...) - + lblDestICMProfile @@ -214,5 +214,5 @@ colors (Pantone, TruMatch, logo colors, ...) 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388db5944d4c5c5518869f73ce9db9cc40f929cc30300e18129a50685268a28291982e1a2175212eaab1c49d3f8971e7aec6aedb54a32b435dd8685cb8c0c4b8b0feb421b7bd8186a069d23209144b18cb0c02f3732ff3c3ccbdd705a571941213f1dd9d93739ef37e6fbeef08d334d9d5d0d090c701c8344d2176c1a6697a5d5d5dd8b64d2a95c2b2ac7f05b12c8b783c8e6118d8b6fd685fdb753a39394928e2a7c55724d693a7e214104220242805520a84d8b9e4790f0b1302c7751958f1e30534be9fa41a0c60db362dbe227f64af91b6e7719c2dfc0117a71c603da591de2882a7d3d4ec27122b10acad50aeb88044d542b84de3af7ab44aa55274f4e449dbf354bc347aa096fbf37e7efa2ecbad1b36907d78b289de8120232f37726250c3f52cf0a026a0f6065b9645d929e038167aa096d91b307171059034b5f8e9e9eb44fa052b4b25eeccd9dc99cb71f6ad082fbea2e351c075bdbdc13b9109fc01b83fef63e2e232e03076b68393231a0dcd024daf502c1e66e67a89cb971ef0e5a74bb4b61e6378248094b92ab0ac024b70ca017ef8360394187b2dc6d8b89ffa500e4d4f93d9083275d5e6f9913ade3dd70ee87c7d25c95646a25415aadab152b09ed4f8c5cc130a853839eac3951b684a61e70ef3f9c739668c24eba912afbfddc6d4d506e6a6d7b8b7d082aa8eb8dab19482cdcd220e36dd3dc19df23545de0a71f952861923493456cfd3cf36123c54a0b7bf0e8064621b21f7712c040857071ca4eea0f40a99f510573ec971cb48030e811a1faded3e94be85f2fb00703d1ff26f96ab9f011a5b04d0c4f26fdb948a754c1b25668c2491483d5d5d611617d6b8f0fe32cb779b492ce65168b4c774a4701eefd8f3a02d56e6e8f13aeefe9a63fa5a89d1970e91d908f3d46003e1480d173e28b37827c9b977348ab92ce16890237d1ec907ee3e8e3d8f60d0e1f4583d009f7d9860662acff89bad1c1faad0717493f7ce7713ed8cb0995c255f2a317a26427b67198f6a70f51c0a41b902279ed1187f23cc17130b7c74de65eac77a7a8f05517e41e2deefa4930576db60fa7a8ee1535134df3e93e7b82e0817476439fd6a9070a49f6fbe4a3077739db99b15c001146dd13a46cf1cc1f83943c62e51de76b0738fc9381e8f3390f0236b252e124999e11724fd833196164bacadb87848224fe874f779b43fe9f2dca928956d505a96dbb3f9bdc18661e00534c26d1a7a40e13912a11c9454280da41048a9915c75585df500074d53d816dc9edd229528ef0db66dbbea3ffdaffa471f1f28d8344df1bf800f1a6e9aa6f813c39885bc050f269c0000000049454e44ae426082 - + diff --git a/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.cc b/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.cc index 545f886f..b61f4a9d 100644 --- a/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.cc +++ b/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.cc @@ -19,14 +19,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -37,29 +37,29 @@ #include "dlg_dropshadow.h" #include "wdg_dropshadow.h" -DlgDropshadow::DlgDropshadow( const QString & /*imageCS*/, - const QString & /*layerCS*/, - QWidget * parent, +DlgDropshadow::DlgDropshadow( const TQString & /*imageCS*/, + const TQString & /*layerCS*/, + TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Drop Shadow"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Drop Shadow"), Ok | Cancel, Ok) { m_page = new WdgDropshadow(this, "dropshadow"); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); KConfig * cfg = KGlobal::config(); m_page->xOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_x", 8) ); m_page->yOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_y", 8) ); m_page->blurRadiusSpinBox->setValue( cfg->readNumEntry("dropshadow_blurRadius", 5) ); - QColor black(0,0,0); + TQColor black(0,0,0); m_page->shadowColorButton->setColor( cfg->readColorEntry("dropshadow_color", &black) ); m_page->opacitySlider->setValue( cfg->readNumEntry("dropshadow_opacity", 80 ) ); m_page->opacitySpinBox->setValue( cfg->readNumEntry("dropshadow_opacity", 80 ) ); m_page->allowResizingCheckBox->setChecked( cfg->readBoolEntry("dropshadow_resizing", true ) ); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } DlgDropshadow::~DlgDropshadow() @@ -67,29 +67,29 @@ DlgDropshadow::~DlgDropshadow() delete m_page; } -Q_INT32 DlgDropshadow::getXOffset() +TQ_INT32 DlgDropshadow::getXOffset() { return m_page->xOffsetSpinBox->value(); } -Q_INT32 DlgDropshadow::getYOffset() +TQ_INT32 DlgDropshadow::getYOffset() { return m_page->yOffsetSpinBox->value(); } -Q_INT32 DlgDropshadow::getBlurRadius() +TQ_INT32 DlgDropshadow::getBlurRadius() { return m_page->blurRadiusSpinBox->value(); } -Q_UINT8 DlgDropshadow::getShadowOpacity() +TQ_UINT8 DlgDropshadow::getShadowOpacity() { double opacity = (double)m_page->opacitySpinBox->value(); //convert percent to a 8 bit opacity value - return (Q_UINT8)(opacity / 100 * 255); + return (TQ_UINT8)(opacity / 100 * 255); } -QColor DlgDropshadow::getShadowColor() +TQColor DlgDropshadow::getShadowColor() { return m_page->shadowColorButton->color(); } diff --git a/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.h b/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.h index 8e514658..9261e723 100644 --- a/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.h +++ b/krita/plugins/viewplugins/dropshadow/dlg_dropshadow.h @@ -24,7 +24,7 @@ #include class WdgDropshadow; -class QColor; +class TQColor; /** * This dialog allows the user to configure the decomposition of an image @@ -33,20 +33,21 @@ class QColor; class DlgDropshadow: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgDropshadow(const QString & imageCS, const QString & layerCS, QWidget * parent = 0, + DlgDropshadow(const TQString & imageCS, const TQString & layerCS, TQWidget * tqparent = 0, const char* name = 0); ~DlgDropshadow(); public: - Q_INT32 getXOffset(); - Q_INT32 getYOffset(); - Q_INT32 getBlurRadius(); - Q_UINT8 getShadowOpacity(); - QColor getShadowColor(); + TQ_INT32 getXOffset(); + TQ_INT32 getYOffset(); + TQ_INT32 getBlurRadius(); + TQ_UINT8 getShadowOpacity(); + TQColor getShadowColor(); bool allowResizingChecked(); private slots: void okClicked(); diff --git a/krita/plugins/viewplugins/dropshadow/kis_dropshadow.cc b/krita/plugins/viewplugins/dropshadow/kis_dropshadow.cc index 7881f568..e8818760 100644 --- a/krita/plugins/viewplugins/dropshadow/kis_dropshadow.cc +++ b/krita/plugins/viewplugins/dropshadow/kis_dropshadow.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -68,7 +68,7 @@ KisDropshadow::KisDropshadow(KisView * view) { } -void KisDropshadow::dropshadow(KisProgressDisplayInterface * progress, Q_INT32 xoffset, Q_INT32 yoffset, Q_INT32 blurradius, QColor color, Q_UINT8 opacity, bool allowResize) +void KisDropshadow::dropshadow(KisProgressDisplayInterface * progress, TQ_INT32 xoffset, TQ_INT32 yoffset, TQ_INT32 blurradius, TQColor color, TQ_UINT8 opacity, bool allowResize) { KisImageSP image = m_view->canvasSubject()->currentImg(); if (!image) return; @@ -92,9 +92,9 @@ void KisDropshadow::dropshadow(KisProgressDisplayInterface * progress, Q_INT32 x KisPaintDeviceSP bShadowDev; KisRgbColorSpace *rgb8cs = static_cast(shadowDev->colorSpace()); - QRect rect = dev->exactBounds(); + TQRect rect = dev->exactBounds(); - for (Q_INT32 row = 0; row < rect.height(); ++row) + for (TQ_INT32 row = 0; row < rect.height(); ++row) { KisHLineIteratorPixel srcIt = dev->createHLineIterator(rect.x(), rect.y() + row, rect.width(), false); KisHLineIteratorPixel dstIt = shadowDev->createHLineIterator(rect.x(), rect.y() + row, rect.width(), true); @@ -103,7 +103,7 @@ void KisDropshadow::dropshadow(KisProgressDisplayInterface * progress, Q_INT32 x if (srcIt.isSelected()) { //set the shadow color - Q_UINT8 alpha = dev->colorSpace()->getAlpha(srcIt.rawData()); + TQ_UINT8 alpha = dev->colorSpace()->getAlpha(srcIt.rawData()); rgb8cs->setPixel(dstIt.rawData(), color.red(), color.green(), color.blue(), alpha); } ++srcIt; @@ -122,26 +122,26 @@ void KisDropshadow::dropshadow(KisProgressDisplayInterface * progress, Q_INT32 x if (!m_cancelRequested) { shadowDev->move (xoffset,yoffset); - KisGroupLayerSP parent = image->rootLayer(); + KisGroupLayerSP tqparent = image->rootLayer(); if (image->activeLayer()) - parent = image->activeLayer()->parent().data(); + tqparent = image->activeLayer()->tqparent().data(); KisPaintLayerSP l = new KisPaintLayer(image, i18n("Drop Shadow"), opacity, shadowDev); - image->addLayer( l.data(), parent, src->siblingBelow() ); + image->addLayer( l.data(), tqparent, src->siblingBelow() ); if (allowResize) { - QRect shadowBounds = shadowDev->exactBounds(); + TQRect shadowBounds = shadowDev->exactBounds(); - if (!image->bounds().contains(shadowBounds)) { + if (!image->bounds().tqcontains(shadowBounds)) { - QRect newImageSize = image->bounds() | shadowBounds; + TQRect newImageSize = image->bounds() | shadowBounds; image->resize(newImageSize.width(), newImageSize.height()); if (shadowBounds.left() < 0 || shadowBounds.top() < 0) { - Q_INT32 newRootX = image->rootLayer()->x(); - Q_INT32 newRootY = image->rootLayer()->y(); + TQ_INT32 newRootX = image->rootLayer()->x(); + TQ_INT32 newRootY = image->rootLayer()->y(); if (shadowBounds.left() < 0) { newRootX += -shadowBounds.left(); @@ -150,8 +150,8 @@ void KisDropshadow::dropshadow(KisProgressDisplayInterface * progress, Q_INT32 x newRootY += -shadowBounds.top(); } - KCommand *moveCommand = image->rootLayer()->moveCommand(QPoint(image->rootLayer()->x(), image->rootLayer()->y()), - QPoint(newRootX, newRootY)); + KCommand *moveCommand = image->rootLayer()->moveCommand(TQPoint(image->rootLayer()->x(), image->rootLayer()->y()), + TQPoint(newRootX, newRootY)); Q_ASSERT(moveCommand != 0); if (moveCommand) { @@ -175,41 +175,41 @@ void KisDropshadow::dropshadow(KisProgressDisplayInterface * progress, Q_INT32 x emit notifyProgressDone(); } -void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstDev, QRect& rect, double horz, double vert, BlurMethod method, KisProgressDisplayInterface *) +void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstDev, TQRect& rect, double horz, double vert, BlurMethod method, KisProgressDisplayInterface *) { - Q_INT32 width, height; - Q_INT32 bytes; - Q_UINT8 *dest, *dp; - Q_UINT8 *src, *sp, *sp_p, *sp_m; - Q_INT32 *buf = NULL; - Q_INT32 *bb; + TQ_INT32 width, height; + TQ_INT32 bytes; + TQ_UINT8 *dest, *dp; + TQ_UINT8 *src, *sp, *sp_p, *sp_m; + TQ_INT32 *buf = NULL; + TQ_INT32 *bb; double n_p[5], n_m[5]; double d_p[5], d_m[5]; double bd_p[5], bd_m[5]; double *val_p = NULL; double *val_m = NULL; double *vp, *vm; - Q_INT32 x1, y1, x2, y2; - Q_INT32 i, j; - Q_INT32 row, col, b; - Q_INT32 terms; + TQ_INT32 x1, y1, x2, y2; + TQ_INT32 i, j; + TQ_INT32 row, col, b; + TQ_INT32 terms; double progress, max_progress; - Q_INT32 initial_p[4]; - Q_INT32 initial_m[4]; + TQ_INT32 initial_p[4]; + TQ_INT32 initial_m[4]; double std_dev; - Q_INT32 pixels; - Q_INT32 total = 1; - Q_INT32 start, end; - Q_INT32 *curve; - Q_INT32 *sum = NULL; - Q_INT32 val; - Q_INT32 length; - Q_INT32 initial_pp, initial_mm; - - x1 = (Q_INT32)(rect.x() - horz); - y1 = (Q_INT32)(rect.y() - vert); - width = (Q_INT32)(rect.width() + 2 * horz); - height = (Q_INT32)(rect.height() + 2 * vert); + TQ_INT32 pixels; + TQ_INT32 total = 1; + TQ_INT32 start, end; + TQ_INT32 *curve; + TQ_INT32 *sum = NULL; + TQ_INT32 val; + TQ_INT32 length; + TQ_INT32 initial_pp, initial_mm; + + x1 = (TQ_INT32)(rect.x() - horz); + y1 = (TQ_INT32)(rect.y() - vert); + width = (TQ_INT32)(rect.width() + 2 * horz); + height = (TQ_INT32)(rect.height() + 2 * vert); x2 = x1 + width; y2 = y1 + height; @@ -227,12 +227,12 @@ void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstD break; case BLUR_RLE: - buf = new Q_INT32[MAX (width, height) * 2]; + buf = new TQ_INT32[MAX (width, height) * 2]; break; } - src = new Q_UINT8[MAX (width, height) * bytes]; - dest = new Q_UINT8[MAX (width, height) * bytes]; + src = new TQ_UINT8[MAX (width, height) * bytes]; + dest = new TQ_UINT8[MAX (width, height) * bytes]; progress = 0.0; max_progress = (horz <= 0.0 ) ? 0 : width * height * horz; @@ -256,7 +256,7 @@ void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstD case BLUR_RLE: curve = make_curve (std_dev, &length); - sum = new Q_INT32[2 * length + 1]; + sum = new TQ_INT32[2 * length + 1]; sum[0] = 0; @@ -382,7 +382,7 @@ void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstD dstDev->writeBytes(dest, col + x1, y1, 1, height); progress += height * vert; - if ((col % 5) == 0) emit notifyProgress( (Q_UINT32)((progress * 100) / max_progress)); + if ((col % 5) == 0) emit notifyProgress( (TQ_UINT32)((progress * 100) / max_progress)); } } @@ -406,7 +406,7 @@ void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstD case BLUR_RLE: curve = make_curve (std_dev, &length); - sum = new Q_INT32[2 * length + 1]; + sum = new TQ_INT32[2 * length + 1]; sum[0] = 0; @@ -535,7 +535,7 @@ void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstD progress += width * horz; //if ((row % 5) == 0) gimp_progress_update (progress / max_progress); - if ((row % 5) == 0) emit notifyProgress( (Q_UINT32)((progress * 100) / max_progress )); + if ((row % 5) == 0) emit notifyProgress( (TQ_UINT32)((progress * 100) / max_progress )); } } @@ -558,7 +558,7 @@ void KisDropshadow::gaussianblur (KisPaintDeviceSP srcDev, KisPaintDeviceSP dstD void KisDropshadow::find_constants (double n_p[], double n_m[], double d_p[], double d_m[], double bd_p[], double bd_m[], double std_dev) { - Q_INT32 i; + TQ_INT32 i; double constants [8]; double div; @@ -637,10 +637,10 @@ void KisDropshadow::find_constants (double n_p[], double n_m[], double d_p[], do } -void KisDropshadow::transfer_pixels (double *src1, double *src2, Q_UINT8 *dest, Q_INT32 bytes, Q_INT32 width) +void KisDropshadow::transfer_pixels (double *src1, double *src2, TQ_UINT8 *dest, TQ_INT32 bytes, TQ_INT32 width) { - Q_INT32 b; - Q_INT32 bend = bytes * width; + TQ_INT32 b; + TQ_INT32 bend = bytes * width; double sum; for(b = 0; b < bend; b++) @@ -649,12 +649,12 @@ void KisDropshadow::transfer_pixels (double *src1, double *src2, Q_UINT8 *dest, if (sum > 255) sum = 255; else if(sum < 0) sum = 0; - *dest++ = (Q_UINT8) sum; + *dest++ = (TQ_UINT8) sum; } } //The equations: g(r) = exp (- r^2 / (2 * sigma^2)), r = sqrt (x^2 + y ^2) -Q_INT32 * KisDropshadow::make_curve(double sigma, Q_INT32 *length) +TQ_INT32 * KisDropshadow::make_curve(double sigma, TQ_INT32 *length) { int *curve; double sigma2; @@ -669,7 +669,7 @@ Q_INT32 * KisDropshadow::make_curve(double sigma, Q_INT32 *length) if ((n % 2) == 0) n += 1; - curve = new Q_INT32[n]; + curve = new TQ_INT32[n]; *length = n / 2; curve += *length; @@ -677,7 +677,7 @@ Q_INT32 * KisDropshadow::make_curve(double sigma, Q_INT32 *length) for (i = 1; i <= *length; i++) { - temp = (Q_INT32) (exp (- (i * i) / sigma2) * 255); + temp = (TQ_INT32) (exp (- (i * i) / sigma2) * 255); curve[-i] = temp; curve[i] = temp; } @@ -685,12 +685,12 @@ Q_INT32 * KisDropshadow::make_curve(double sigma, Q_INT32 *length) return curve; } -void KisDropshadow::run_length_encode (Q_UINT8 *src, Q_INT32 *dest, Q_INT32 bytes, Q_INT32 width) +void KisDropshadow::run_length_encode (TQ_UINT8 *src, TQ_INT32 *dest, TQ_INT32 bytes, TQ_INT32 width) { - Q_INT32 start; - Q_INT32 i; - Q_INT32 j; - Q_UINT8 last; + TQ_INT32 start; + TQ_INT32 i; + TQ_INT32 j; + TQ_UINT8 last; last = *src; src += bytes; @@ -718,9 +718,9 @@ void KisDropshadow::run_length_encode (Q_UINT8 *src, Q_INT32 *dest, Q_INT32 byte } } -void KisDropshadow::multiply_alpha (Q_UINT8 *buf, Q_INT32 width, Q_INT32 bytes) +void KisDropshadow::multiply_alpha (TQ_UINT8 *buf, TQ_INT32 width, TQ_INT32 bytes) { - Q_INT32 i, j; + TQ_INT32 i, j; double alpha; for (i = 0; i < width * bytes; i += bytes) @@ -728,17 +728,17 @@ void KisDropshadow::multiply_alpha (Q_UINT8 *buf, Q_INT32 width, Q_INT32 bytes) alpha = buf[i + bytes - 1] * (1.0 / 255.0); for (j = 0; j < bytes - 1; j++) { double a = (double)(buf[i + j]) * alpha; - buf[i + j] = (Q_UINT8)a; + buf[i + j] = (TQ_UINT8)a; } } } -void KisDropshadow::separate_alpha (Q_UINT8 *buf, Q_INT32 width, Q_INT32 bytes) +void KisDropshadow::separate_alpha (TQ_UINT8 *buf, TQ_INT32 width, TQ_INT32 bytes) { - Q_INT32 i, j; - Q_UINT8 alpha; + TQ_INT32 i, j; + TQ_UINT8 alpha; double recip_alpha; - Q_UINT32 new_val; + TQ_UINT32 new_val; for (i = 0; i < width * bytes; i += bytes) { @@ -748,7 +748,7 @@ void KisDropshadow::separate_alpha (Q_UINT8 *buf, Q_INT32 width, Q_INT32 bytes) recip_alpha = 255.0 / alpha; for (j = 0; j < bytes - 1; j++) { - new_val = (Q_UINT32)(buf[i + j] * recip_alpha); + new_val = (TQ_UINT32)(buf[i + j] * recip_alpha); buf[i + j] = MIN (255, new_val); } } diff --git a/krita/plugins/viewplugins/dropshadow/kis_dropshadow.h b/krita/plugins/viewplugins/dropshadow/kis_dropshadow.h index 3aca424f..94c6decc 100644 --- a/krita/plugins/viewplugins/dropshadow/kis_dropshadow.h +++ b/krita/plugins/viewplugins/dropshadow/kis_dropshadow.h @@ -31,36 +31,37 @@ typedef enum } BlurMethod; -class QColor; +class TQColor; class KisView; class KisProgressDisplayInterface; class KisDropshadow : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: KisDropshadow(KisView * view); virtual ~KisDropshadow() {}; - void dropshadow(KisProgressDisplayInterface * progress, Q_INT32 xoffset, Q_INT32 yoffset, Q_INT32 blurradius, QColor color, Q_UINT8 opacity, bool allowResize); + void dropshadow(KisProgressDisplayInterface * progress, TQ_INT32 xoffset, TQ_INT32 yoffset, TQ_INT32 blurradius, TQColor color, TQ_UINT8 opacity, bool allowResize); public: // Implement KisProgressSubject virtual void cancel() { m_cancelRequested = true; } private: void gaussianblur (KisPaintDeviceSP src, KisPaintDeviceSP dst, - QRect& rect, double horz, double vert, + TQRect& rect, double horz, double vert, BlurMethod method, KisProgressDisplayInterface * progressDisplay); //gaussian blur helper functions void find_constants(double n_p[], double n_m[], double d_p[], double d_m[], double bd_p[], double bd_m[], double std_dev); - void transfer_pixels(double *src1, double *src2, Q_UINT8 *dest, Q_INT32 bytes, Q_INT32 width); - Q_INT32* make_curve(double sigma, Q_INT32 *length); - void run_length_encode (Q_UINT8 *src, Q_INT32 *dest, Q_INT32 bytes, Q_INT32 width); - void multiply_alpha (Q_UINT8 *buf, Q_INT32 width, Q_INT32 bytes); - void separate_alpha (Q_UINT8 *buf, Q_INT32 width, Q_INT32 bytes); + void transfer_pixels(double *src1, double *src2, TQ_UINT8 *dest, TQ_INT32 bytes, TQ_INT32 width); + TQ_INT32* make_curve(double sigma, TQ_INT32 *length); + void run_length_encode (TQ_UINT8 *src, TQ_INT32 *dest, TQ_INT32 bytes, TQ_INT32 width); + void multiply_alpha (TQ_UINT8 *buf, TQ_INT32 width, TQ_INT32 bytes); + void separate_alpha (TQ_UINT8 *buf, TQ_INT32 width, TQ_INT32 bytes); private: KisView * m_view; diff --git a/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.cc b/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.cc index efe01a95..eabbe0f1 100644 --- a/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.cc +++ b/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.cc @@ -39,16 +39,16 @@ K_EXPORT_COMPONENT_FACTORY( kritadropshadow, KGenericFactory( "krita" ) ) -KisDropshadowPlugin::KisDropshadowPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KisDropshadowPlugin::KisDropshadowPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) { + if ( tqparent->inherits("KisView") ) { setInstance(KGenericFactory::instance()); setXMLFile(locate("data","kritaplugins/dropshadow.rc"), true); - m_view = (KisView*) parent; - (void) new KAction(i18n("Add Drop Shadow..."), 0, 0, this, SLOT(slotDropshadow()), actionCollection(), "dropshadow"); + m_view = (KisView*) tqparent; + (void) new KAction(i18n("Add Drop Shadow..."), 0, 0, this, TQT_SLOT(slotDropshadow()), actionCollection(), "dropshadow"); } } @@ -71,7 +71,7 @@ void KisDropshadowPlugin::slotDropshadow() dlgDropshadow->setCaption(i18n("Drop Shadow")); - if (dlgDropshadow->exec() == QDialog::Accepted) { + if (dlgDropshadow->exec() == TQDialog::Accepted) { KisDropshadow dropshadow(m_view); dropshadow.dropshadow(m_view->canvasSubject()->progressDisplay(), diff --git a/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.h b/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.h index fd64acdb..fc888dfb 100644 --- a/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.h +++ b/krita/plugins/viewplugins/dropshadow/kis_dropshadow_plugin.h @@ -29,8 +29,9 @@ class KisView; class KisDropshadowPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KisDropshadowPlugin(QObject *parent, const char *name, const QStringList &); + KisDropshadowPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisDropshadowPlugin(); private slots: diff --git a/krita/plugins/viewplugins/dropshadow/wdg_dropshadow.ui b/krita/plugins/viewplugins/dropshadow/wdg_dropshadow.ui index d78999c8..4bd2f38c 100644 --- a/krita/plugins/viewplugins/dropshadow/wdg_dropshadow.ui +++ b/krita/plugins/viewplugins/dropshadow/wdg_dropshadow.ui @@ -1,6 +1,6 @@ WdgDropshadow - + WdgDropshadow @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -24,7 +24,7 @@ Offset X: - + textLabel1_2 @@ -32,7 +32,7 @@ Offset Y: - + textLabel2 @@ -40,7 +40,7 @@ Blur radius: - + textLabel3 @@ -48,7 +48,7 @@ Color: - + textLabel4 @@ -56,7 +56,7 @@ Opacity: - + opacitySlider @@ -70,7 +70,7 @@ Horizontal - + opacitySpinBox @@ -84,7 +84,7 @@ 80 - + allowResizingCheckBox @@ -95,7 +95,7 @@ true - + xOffsetSpinBox @@ -116,14 +116,14 @@ Expanding - + 200 20 - + yOffsetSpinBox @@ -144,14 +144,14 @@ Expanding - + 200 20 - + blurRadiusSpinBox @@ -169,7 +169,7 @@ Expanding - + 190 20 @@ -194,7 +194,7 @@ Expanding - + 120 31 @@ -228,7 +228,7 @@ opacitySpinBox allowResizingCheckBox - + kcolorbutton.h diff --git a/krita/plugins/viewplugins/filtersgallery/filters_gallery.cc b/krita/plugins/viewplugins/filtersgallery/filters_gallery.cc index f0849807..a6d2d6d9 100644 --- a/krita/plugins/viewplugins/filtersgallery/filters_gallery.cc +++ b/krita/plugins/viewplugins/filtersgallery/filters_gallery.cc @@ -21,7 +21,7 @@ #include "filters_gallery.h" -#include +#include #include #include @@ -48,25 +48,25 @@ namespace FiltersGallery { typedef KGenericFactory KritaFiltersGalleryFactory; K_EXPORT_COMPONENT_FACTORY( kritafiltersgallery, KritaFiltersGalleryFactory( "krita" ) ) -KritaFiltersGallery::KritaFiltersGallery(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaFiltersGallery::KritaFiltersGallery(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(KritaFiltersGallery::instance()); setXMLFile(locate("data","kritaplugins/kritafiltersgallery.rc"), true); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; - (void) new KAction(i18n("&Filters Gallery"), 0, 0, this, SLOT(showFiltersGalleryDialog()), actionCollection(), "krita_filters_gallery"); + (void) new KAction(i18n("&Filters Gallery"), 0, 0, this, TQT_SLOT(showFiltersGalleryDialog()), actionCollection(), "krita_filters_gallery"); // Add a docker with the list of filters -// QImage img; +// TQImage img; // if(img.load(locate("data","krita/images/previewfilter.png"))) // { // KisPaintDeviceSP preview = new KisPaintDevice(KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),"")); -// preview->convertFromQImage(img,""); +// preview->convertFromTQImage(img,""); // m_view->canvasSubject()->paletteManager()->addWidget(new KisFiltersListView(preview,m_view),"filterslist",krita::EFFECTSBOX, 0); // } @@ -84,7 +84,7 @@ void KritaFiltersGallery::showFiltersGalleryDialog() KisDlgFiltersGallery dlg(m_view, m_view); if (dlg.exec()) { - QApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( TQt::waitCursor ); KisFilter* filter = dlg.currentFilter(); if(filter ) @@ -94,13 +94,13 @@ void KritaFiltersGallery::showFiltersGalleryDialog() KisPaintDeviceSP dev = img->activeDevice(); if (!dev) return; - QRect r1 = dev->exactBounds(); - QRect r2 = img->bounds(); + TQRect r1 = dev->exactBounds(); + TQRect r2 = img->bounds(); - QRect rect = r1.intersect(r2); + TQRect rect = r1.intersect(r2); if (dev->hasSelection()) { - QRect r3 = dev->selection()->selectedExactRect(); + TQRect r3 = dev->selection()->selectedExactRect(); rect = rect.intersect(r3); } KisFilterConfiguration* config = filter->configuration( dlg.currentConfigWidget()); @@ -125,7 +125,7 @@ void KritaFiltersGallery::showFiltersGalleryDialog() delete cmd; } filter->disableProgress(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } diff --git a/krita/plugins/viewplugins/filtersgallery/filters_gallery.h b/krita/plugins/viewplugins/filtersgallery/filters_gallery.h index 0e45e582..6be60d94 100644 --- a/krita/plugins/viewplugins/filtersgallery/filters_gallery.h +++ b/krita/plugins/viewplugins/filtersgallery/filters_gallery.h @@ -32,8 +32,9 @@ namespace FiltersGallery { class KritaFiltersGallery : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KritaFiltersGallery(QObject *parent, const char *name, const QStringList &); + KritaFiltersGallery(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaFiltersGallery(); public slots: void showFiltersGalleryDialog(); diff --git a/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.cc b/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.cc index bb7c20ee..8269ee57 100644 --- a/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.cc +++ b/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.cc @@ -21,10 +21,10 @@ */ #include "kis_dlg_filtersgallery.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -43,8 +43,8 @@ namespace Plugins { namespace FiltersGallery { -KisDlgFiltersGallery::KisDlgFiltersGallery(KisView* view, QWidget* parent,const char *name) - : KDialogBase(parent,name, true,i18n("Filters Gallery"), Ok | Cancel), m_view(view),m_currentConfigWidget(0), m_currentFilter(0) +KisDlgFiltersGallery::KisDlgFiltersGallery(KisView* view, TQWidget* tqparent,const char *name) + : KDialogBase(tqparent,name, true,i18n("Filters Gallery"), Ok | Cancel), m_view(view),m_currentConfigWidget(0), m_currentFilter(0) { // Initialize main widget m_widget = new KisWdgFiltersGallery(this); @@ -53,21 +53,21 @@ KisDlgFiltersGallery::KisDlgFiltersGallery(KisView* view, QWidget* parent,const setMainWidget(m_widget); // Initialize filters list - connect(m_widget->filtersList , SIGNAL(selectionChanged(QIconViewItem*)), this, SLOT(selectionHasChanged(QIconViewItem* ))); + connect(m_widget->filtersList , TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(selectionHasChanged(TQIconViewItem* ))); // Initialize configWidgetHolder m_widget->configWidgetHolder->setColumnLayout ( 0, Qt::Horizontal ); - //m_widget->configWidgetHolder->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + //m_widget->configWidgetHolder->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum); // Initialize preview widget if (m_view->canvasSubject()->currentImg() && m_view->canvasSubject()->currentImg()->activeDevice()) { m_widget->previewWidget->slotSetDevice( m_view->canvasSubject()->currentImg()->activeDevice().data() ); } - connect( m_widget->previewWidget, SIGNAL(updated()), this, SLOT(refreshPreview())); - resize( minimumSizeHint()); - m_widget->previewWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding); - m_labelNoCW = new QLabel(i18n("No configuration options are available for this filter."), m_widget->configWidgetHolder); - m_widget->configWidgetHolder->layout()->add(m_labelNoCW); + connect( m_widget->previewWidget, TQT_SIGNAL(updated()), this, TQT_SLOT(refreshPreview())); + resize( tqminimumSizeHint()); + m_widget->previewWidget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::MinimumExpanding); + m_labelNoCW = new TQLabel(i18n("No configuration options are available for this filter."), m_widget->configWidgetHolder); + m_widget->configWidgetHolder->tqlayout()->add(m_labelNoCW); m_labelNoCW->hide(); } @@ -75,13 +75,13 @@ KisDlgFiltersGallery::~KisDlgFiltersGallery() { } -void KisDlgFiltersGallery::selectionHasChanged ( QIconViewItem * item ) +void KisDlgFiltersGallery::selectionHasChanged ( TQIconViewItem * item ) { KisFiltersIconViewItem* kisitem = (KisFiltersIconViewItem*) item; m_currentFilter = kisitem->filter(); if(m_currentConfigWidget != 0) { - m_widget->configWidgetHolder->layout()->remove(m_currentConfigWidget); + m_widget->configWidgetHolder->tqlayout()->remove(m_currentConfigWidget); delete m_currentConfigWidget; m_currentConfigWidget = 0; } else { @@ -94,10 +94,10 @@ void KisDlgFiltersGallery::selectionHasChanged ( QIconViewItem * item ) m_currentConfigWidget = m_currentFilter->createConfigurationWidget(m_widget->configWidgetHolder, activeLayer->paintDevice()); if(m_currentConfigWidget != 0) { - //m_currentConfigWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - m_widget->configWidgetHolder->layout()->add(m_currentConfigWidget); + //m_currentConfigWidget->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_widget->configWidgetHolder->tqlayout()->add(m_currentConfigWidget); m_currentConfigWidget->show(); - connect(m_currentConfigWidget, SIGNAL(sigPleaseUpdatePreview()), this, SLOT(slotConfigChanged())); + connect(m_currentConfigWidget, TQT_SIGNAL(sigPleaseUpdatePreview()), this, TQT_SLOT(slotConfigChanged())); } else { m_labelNoCW->show(); diff --git a/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.h b/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.h index a6a216ca..258311c0 100644 --- a/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.h +++ b/krita/plugins/viewplugins/filtersgallery/kis_dlg_filtersgallery.h @@ -26,9 +26,9 @@ class KisView; class KisFilter; -class QIconViewItem; -class QLabel; -class QHBoxLayout; +class TQIconViewItem; +class TQLabel; +class TQHBoxLayout; class KisPreviewWidget; class KisWdgFiltersGallery; class KisFiltersListView; @@ -43,22 +43,23 @@ namespace FiltersGallery { class KisDlgFiltersGallery : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KisDlgFiltersGallery(KisView* view, QWidget* parent,const char *name = ""); + KisDlgFiltersGallery(KisView* view, TQWidget* tqparent,const char *name = ""); ~KisDlgFiltersGallery(); public: inline KisFilter* currentFilter() { return m_currentFilter; }; - inline QWidget* currentConfigWidget() { return m_currentConfigWidget; } + inline TQWidget* currentConfigWidget() { return m_currentConfigWidget; } private slots: void slotConfigChanged(); void refreshPreview(); - void selectionHasChanged ( QIconViewItem * item ); + void selectionHasChanged ( TQIconViewItem * item ); private: KisWdgFiltersGallery* m_widget; KisView* m_view; - QWidget* m_currentConfigWidget; + TQWidget* m_currentConfigWidget; KisFilter* m_currentFilter; - QLabel* m_labelNoCW; + TQLabel* m_labelNoCW; }; } diff --git a/krita/plugins/viewplugins/filtersgallery/kis_wdg_filtersgallery.ui b/krita/plugins/viewplugins/filtersgallery/kis_wdg_filtersgallery.ui index 35553294..488c9564 100644 --- a/krita/plugins/viewplugins/filtersgallery/kis_wdg_filtersgallery.ui +++ b/krita/plugins/viewplugins/filtersgallery/kis_wdg_filtersgallery.ui @@ -1,6 +1,6 @@ KisWdgFiltersGallery - + KisWdgFiltersGallery @@ -37,7 +37,7 @@ filtersList - + configWidgetHolder @@ -49,7 +49,7 @@ 0 - + 0 0 @@ -115,7 +115,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042949444154388db5954d6c545514c77ff7de37eff1a6a550da994e5ba798868f948fc847a2a2911816c436b0a02ed0083161a1981877ee10d90aa94656063491882c5cd4c4b8103f20cd806909a98604da8482341de80cb69de9bcd799799d79efba980f1da3a80b4f727273939bdff99f9b93f3175a6b6a21849080020c4002a29a8f0a5dcd002803bed63a1035f0d0d0504b6f6fef51d7758fa4d3e98d8ee3fc03af128ee3303939399548242eb8aefb09300f78464de9f0f0f0d148cc7caf3d5424de97a7ec17104220242805520a44557bbd4b21f083801d33e63a6d1bc7bf19c6064e0319a35a58b9ae7ba43d54e4d7c54b64dc097c7f09d30ef04b36736983cc7c11b4456b9b492c5e20dc54a6540e00896a8268a7017010f8bcae1830d2e9f4c69ebe3c197782b2ce60d94ddc9b30f9feeb45ae5d7181c5ead35636ef08d3ffe26a76ee3208b4031a56d80aa00768fda362e9380e25bf80ef3b587613d7afc099533380a4b5dda46fcb5aa42998b9eb7173dce5e6788e434763ec7fc942532008ea436003660d2caa7f8d69c3bd8910674e4d033e83877ad8d36fb0aa4d6058658ac5358c5df6383bf480f31fdda5a3632bbbfb6da4ccd5c00a10b2012cc12fd97cfb5516f0187c25cee0619396480ec3ca909d0f3372d1e5f9fe66de3ad605587c712ec55256a2540d5519d19ae24a29057329839f7ecc138944d833102290f3184ae1e6d6f0e98739c61229e6d21eafbed1c9c8c5558c8f3ee4ceed76946a1c43d97091828585223e2eebfbc295f60d45de89707628cb58224577bc85a79e5d4d786581cddb9b0148259711b20145836221400416e0232d1f6595c9ce4538773ac7b54406f0b15784e8e80aa1ac2594190220d021e49f2437960156b70ba095e95f96f18acd8c263cc6122962b1167a7ba34cdd7ec8c977a699bed546722a8fc2a02b6e2185fff78ab586ce78894ddb9ab9f5738ed14b1e030756929d8ff2e4ae5544632b38f96e89a99b298ebd6950cc2d12ed0eb3618b26f520788462ad09877df60db600f0f1fb49c646f21c7ebd836dcf94e9d9b4c0db27d6d3bd36c6426a96bce731703046d7da129a4670836284a054869d4f1b1c7e2dca67676ef3c1898091ef5ad8bc358c3205c93bf7c9a40ad4c660f4728edd7bbb3142ea2fc1da711cfc200011e08b45f6bd1c261adbce9717928c5f9d63fc6a19f0014567773303073790f8214bd6f5282dfbb8b9fa1f6b40d7c1939393533b92e63ad9240990484aec7e41b27d579cbb531e0f67023492d86316ebb768ba1e0f786e6f37e56550c62237aee7011e54abd7c1412291b8a06de378b4d3c0b215da9708e5a3a442192085404a83d4accfecac067c0c43e13a70e3fa12e96409e0325000966bbb354465339d04a6f9dd15fe6dde07ce030780278088d05ad72cc9a6b2f2daaaa74d75a1f0e8d0d5f60b40868a8364ead6248430000b0857a126ffcdf396abf03ce089ffcb4c7f033046c6b4a995e7a00000000049454e44ae426082 - + kis_previewwidget.h kis_filters_listview.h diff --git a/krita/plugins/viewplugins/histogram/dlg_histogram.cc b/krita/plugins/viewplugins/histogram/dlg_histogram.cc index 0440c9db..fe27b257 100644 --- a/krita/plugins/viewplugins/histogram/dlg_histogram.cc +++ b/krita/plugins/viewplugins/histogram/dlg_histogram.cc @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,15 +39,15 @@ #include "kis_histogram_widget.h" -DlgHistogram::DlgHistogram( QWidget * parent, const char * name) - : super (parent, name, true, i18n("Histogram"), Ok | Cancel, Ok) +DlgHistogram::DlgHistogram( TQWidget * tqparent, const char * name) + : super (tqparent, name, true, i18n("Histogram"), Ok | Cancel, Ok) { m_page = new KisHistogramWidget(this, "histogram"); Q_CHECK_PTR(m_page); setCaption(i18n("Histogram")); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); } DlgHistogram::~DlgHistogram() diff --git a/krita/plugins/viewplugins/histogram/dlg_histogram.h b/krita/plugins/viewplugins/histogram/dlg_histogram.h index 790e77ef..8e3fda00 100644 --- a/krita/plugins/viewplugins/histogram/dlg_histogram.h +++ b/krita/plugins/viewplugins/histogram/dlg_histogram.h @@ -35,10 +35,11 @@ class KisHistogramWidget; class DlgHistogram: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgHistogram(QWidget * parent = 0, + DlgHistogram(TQWidget * tqparent = 0, const char* name = 0); ~DlgHistogram(); diff --git a/krita/plugins/viewplugins/histogram/histogram.cc b/krita/plugins/viewplugins/histogram/histogram.cc index 7db92dee..59ea0fff 100644 --- a/krita/plugins/viewplugins/histogram/histogram.cc +++ b/krita/plugins/viewplugins/histogram/histogram.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -52,27 +52,27 @@ typedef KGenericFactory HistogramFactory; K_EXPORT_COMPONENT_FACTORY( kritahistogram, HistogramFactory( "krita" ) ) -Histogram::Histogram(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +Histogram::Histogram(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) { + if ( tqparent->inherits("KisView") ) { setInstance(HistogramFactory::instance()); setXMLFile(locate("data","kritaplugins/histogram.rc"), true); - m_action = new KAction(i18n("&Histogram"), 0, 0, this, SLOT(slotActivated()), actionCollection(), "histogram"); + m_action = new KAction(i18n("&Histogram"), 0, 0, this, TQT_SLOT(slotActivated()), actionCollection(), "histogram"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; if (KisImageSP img = m_view->canvasSubject()->currentImg()) { - connect(img, SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, SLOT(slotLayersChanged())); - connect(img, SIGNAL(sigLayerAdded(KisLayerSP)), this, SLOT(slotLayersChanged())); - connect(img, SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayersChanged())); - connect(img, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), this, SLOT(slotLayersChanged())); - connect(img, SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayersChanged())); - connect(img, SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayersChanged())); + connect(img, TQT_SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, TQT_SLOT(slotLayersChanged())); + connect(img, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), this, TQT_SLOT(slotLayersChanged())); + connect(img, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayersChanged())); + connect(img, TQT_SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), this, TQT_SLOT(slotLayersChanged())); + connect(img, TQT_SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayersChanged())); + connect(img, TQT_SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayersChanged())); m_img = img; } } @@ -95,7 +95,7 @@ void Histogram::slotActivated() if (dev) dlgHistogram->setPaintDevice(dev); - if (dlgHistogram->exec() == QDialog::Accepted) { + if (dlgHistogram->exec() == TQDialog::Accepted) { // Do nothing; this is an informational dialog } delete dlgHistogram; diff --git a/krita/plugins/viewplugins/histogram/histogram.h b/krita/plugins/viewplugins/histogram/histogram.h index adaa6bfd..9cce8359 100644 --- a/krita/plugins/viewplugins/histogram/histogram.h +++ b/krita/plugins/viewplugins/histogram/histogram.h @@ -30,8 +30,9 @@ class KisImage; class Histogram : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - Histogram(QObject *parent, const char *name, const QStringList &); + Histogram(TQObject *tqparent, const char *name, const TQStringList &); virtual ~Histogram(); private slots: diff --git a/krita/plugins/viewplugins/histogram/kis_histogram_widget.cc b/krita/plugins/viewplugins/histogram/kis_histogram_widget.cc index 0e738435..12005e05 100644 --- a/krita/plugins/viewplugins/histogram/kis_histogram_widget.cc +++ b/krita/plugins/viewplugins/histogram/kis_histogram_widget.cc @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -39,8 +39,8 @@ #include "kis_colorspace.h" -KisHistogramWidget::KisHistogramWidget(QWidget *parent, const char *name) - : super(parent, name) +KisHistogramWidget::KisHistogramWidget(TQWidget *tqparent, const char *name) + : super(tqparent, name) { m_from = 0.0; m_width = 0.0; @@ -72,11 +72,11 @@ void KisHistogramWidget::setPaintDevice(KisPaintDeviceSP dev) m_from = m_histogramView->currentProducer()->viewFrom(); m_width = m_histogramView->currentProducer()->viewWidth(); - connect(grpType, SIGNAL(clicked(int)), this, SLOT(slotTypeSwitched(int))); - connect(cmbChannel, SIGNAL(activated(int)), this, SLOT(setActiveChannel(int))); - connect(zoomIn, SIGNAL(clicked()), this, SLOT(slotZoomIn())); - connect(zoomOut, SIGNAL(clicked()), this, SLOT(slotZoomOut())); - connect(currentView, SIGNAL(valueChanged(int)), this, SLOT(slide(int))); + connect(grpType, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotTypeSwitched(int))); + connect(cmbChannel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setActiveChannel(int))); + connect(zoomIn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotZoomIn())); + connect(zoomOut, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotZoomOut())); + connect(currentView, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slide(int))); } void KisHistogramWidget::setActiveChannel(int channel) diff --git a/krita/plugins/viewplugins/histogram/kis_histogram_widget.h b/krita/plugins/viewplugins/histogram/kis_histogram_widget.h index 84b551d8..f83394e7 100644 --- a/krita/plugins/viewplugins/histogram/kis_histogram_widget.h +++ b/krita/plugins/viewplugins/histogram/kis_histogram_widget.h @@ -30,9 +30,10 @@ class KisColorSpace; class KisHistogramWidget : public WdgHistogram { typedef WdgHistogram super; Q_OBJECT + TQ_OBJECT public: - KisHistogramWidget(QWidget *parent, const char *name); + KisHistogramWidget(TQWidget *tqparent, const char *name); virtual ~KisHistogramWidget(); void setPaintDevice(KisPaintDeviceSP dev); diff --git a/krita/plugins/viewplugins/histogram/wdghistogram.ui b/krita/plugins/viewplugins/histogram/wdghistogram.ui index e538adae..77c418ed 100644 --- a/krita/plugins/viewplugins/histogram/wdghistogram.ui +++ b/krita/plugins/viewplugins/histogram/wdghistogram.ui @@ -1,6 +1,6 @@ WdgHistogram - + WdgHistogram @@ -16,7 +16,7 @@ unnamed - + grpType @@ -27,7 +27,7 @@ unnamed - + radioLinear @@ -38,7 +38,7 @@ true - + radioLog @@ -56,14 +56,14 @@ Preferred - + 20 20 - + cmbChannel @@ -75,14 +75,14 @@ 0 - + 200 0 - + lblChannel @@ -103,7 +103,7 @@ Preferred - + 20 21 @@ -124,22 +124,22 @@ 0 - + 256 150 - + - layout2 + tqlayout2 unnamed - + textLabel1 @@ -147,7 +147,7 @@ View: - + zoomIn @@ -163,7 +163,7 @@ + - + zoomOut @@ -179,7 +179,7 @@ - - + currentView @@ -222,7 +222,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082 - + kis_histogram_view.h diff --git a/krita/plugins/viewplugins/histogram_docker/histogramdocker.cc b/krita/plugins/viewplugins/histogram_docker/histogramdocker.cc index 93d77bfb..2b458de4 100644 --- a/krita/plugins/viewplugins/histogram_docker/histogramdocker.cc +++ b/krita/plugins/viewplugins/histogram_docker/histogramdocker.cc @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -46,12 +46,12 @@ typedef KGenericFactory KritaHistogramDockerFactory; K_EXPORT_COMPONENT_FACTORY( kritahistogramdocker, KritaHistogramDockerFactory( "krita" ) ) -KritaHistogramDocker::KritaHistogramDocker(QObject *parent, const char *name, const QStringList&) - : KParts::Plugin(parent, name) +KritaHistogramDocker::KritaHistogramDocker(TQObject *tqparent, const char *name, const TQStringList&) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) { - m_view = dynamic_cast(parent); + if ( tqparent->inherits("KisView") ) { + m_view = dynamic_cast(tqparent); setInstance(KritaHistogramDockerFactory::instance()); setXMLFile(locate("data","kritaplugins/kritahistogramdocker.rc"), true); @@ -68,7 +68,7 @@ KritaHistogramDocker::KritaHistogramDocker(QObject *parent, const char *name, co m_hview = new KisHistogramView(m_view); - QToolTip::add(m_hview, i18n("Right-click to select histogram type")); + TQToolTip::add(m_hview, i18n("Right-click to select histogram type")); m_hview->setHistogram(m_histogram); m_hview->setColor(true); m_hview->setCurrentChannels(m_producer, m_producer->channels()); @@ -76,14 +76,14 @@ KritaHistogramDocker::KritaHistogramDocker(QObject *parent, const char *name, co m_hview->setCaption(i18n("Histogram")); - connect(m_hview, SIGNAL(rightClicked(const QPoint&)), - this, SLOT(popupMenu(const QPoint&))); - connect(m_cache, SIGNAL(cacheUpdated()), - new HistogramDockerUpdater(this, m_histogram, m_hview, m_producer), SLOT(updated())); - connect(&m_popup, SIGNAL(activated(int)), - this, SLOT(producerChanged(int))); - connect(img, SIGNAL(sigColorSpaceChanged(KisColorSpace*)), - this, SLOT(colorSpaceChanged(KisColorSpace*))); // No need to force updates here + connect(m_hview, TQT_SIGNAL(rightClicked(const TQPoint&)), + this, TQT_SLOT(popupMenu(const TQPoint&))); + connect(m_cache, TQT_SIGNAL(cacheUpdated()), + new HistogramDockerUpdater(this, m_histogram, m_hview, m_producer), TQT_SLOT(updated())); + connect(&m_popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(producerChanged(int))); + connect(img, TQT_SIGNAL(sigColorSpaceChanged(KisColorSpace*)), + this, TQT_SLOT(colorSpaceChanged(KisColorSpace*))); // No need to force updates here // Add it to the control palette m_view->canvasSubject()->paletteManager()->addWidget( @@ -143,12 +143,12 @@ void KritaHistogramDocker::producerChanged(int pos) m_hview->setColor(true); m_hview->setCurrentChannels(m_producer, m_producer->channels()); - connect(m_cache, SIGNAL(cacheUpdated()), - new HistogramDockerUpdater(this, m_histogram, m_hview, m_producer), SLOT(updated())); + connect(m_cache, TQT_SIGNAL(cacheUpdated()), + new HistogramDockerUpdater(this, m_histogram, m_hview, m_producer), TQT_SLOT(updated())); } } -void KritaHistogramDocker::popupMenu(const QPoint& pos) +void KritaHistogramDocker::popupMenu(const TQPoint& pos) { m_popup.popup(pos, m_currentProducerPos); } @@ -171,11 +171,11 @@ void KritaHistogramDocker::colorSpaceChanged(KisColorSpace* cs) producerChanged(0); } -HistogramDockerUpdater::HistogramDockerUpdater(QObject* /*parent*/, KisHistogramSP h, KisHistogramView* v, +HistogramDockerUpdater::HistogramDockerUpdater(TQObject* /*tqparent*/, KisHistogramSP h, KisHistogramView* v, KisAccumulatingHistogramProducer* p) : m_histogram(h), m_view(v), m_producer(p) { - connect(p, SIGNAL(completed()), this, SLOT(completed())); + connect(p, TQT_SIGNAL(completed()), this, TQT_SLOT(completed())); } void HistogramDockerUpdater::updated() { diff --git a/krita/plugins/viewplugins/histogram_docker/histogramdocker.h b/krita/plugins/viewplugins/histogram_docker/histogramdocker.h index 5cc57e18..bc023a89 100644 --- a/krita/plugins/viewplugins/histogram_docker/histogramdocker.h +++ b/krita/plugins/viewplugins/histogram_docker/histogramdocker.h @@ -21,8 +21,8 @@ #ifndef _HISTOGRAMDOCKER_H_ #define _HISTOGRAMDOCKER_H_ -#include -#include +#include +#include #include #include @@ -39,12 +39,13 @@ class KisColorSpace; class KritaHistogramDocker : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KritaHistogramDocker(QObject *parent, const char *name, const QStringList &); + KritaHistogramDocker(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaHistogramDocker(); private slots: void producerChanged(int pos); - void popupMenu(const QPoint & pos); + void popupMenu(const TQPoint & pos); void colorSpaceChanged(KisColorSpace* cs); private: KisHistogramProducerFactory* m_factory; @@ -54,17 +55,18 @@ private: KisView* m_view; KisHistogramView* m_hview; KisImageRasteredCache* m_cache; - QPopupMenu m_popup; + TQPopupMenu m_popup; KisHistogramSP m_histogram; uint m_currentProducerPos; }; class KisGenericRGBHistogramProducerFactory; -class HistogramDockerUpdater : public QObject { +class HistogramDockerUpdater : public TQObject { Q_OBJECT + TQ_OBJECT public: - HistogramDockerUpdater(QObject* parent, KisHistogramSP h, KisHistogramView* v, + HistogramDockerUpdater(TQObject* tqparent, KisHistogramSP h, KisHistogramView* v, KisAccumulatingHistogramProducer* p); public slots: void updated(); diff --git a/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.cc b/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.cc index f899f2af..dd315549 100644 --- a/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.cc +++ b/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.cc @@ -18,20 +18,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include "kis_accumulating_producer.h" -static const int EmitCompletedType = QEvent::User + 1; +static const int EmitCompletedType = TQEvent::User + 1; /** * The threaded producer definition in c++ file because this is really an internal affair. * Note that since we _know_ that we'll only have a single instance of it running, at most, * we don't care too much about locking and synchronization **/ -class KisAccumulatingHistogramProducer::ThreadedProducer : public QThread { +class KisAccumulatingHistogramProducer::ThreadedProducer : public TQThread { KisAccumulatingHistogramProducer* m_source; bool m_stop; protected: @@ -71,7 +71,7 @@ void KisAccumulatingHistogramProducer::ThreadedProducer::run() { uint count = m_source->m_source->count(); // Talk about bad naming schemes... KisCachedHistogramObserver::Producers* source = m_source->m_source; - QValueVector& bins = m_source->m_bins; + TQValueVector& bins = m_source->m_bins; int channels = m_source->m_channels; int nrOfBins = m_source->m_nrOfBins; @@ -88,11 +88,11 @@ void KisAccumulatingHistogramProducer::ThreadedProducer::run() { if (!m_stop) { // This function is thread-safe; and it takes ownership of the event - QApplication::postEvent(m_source, new QCustomEvent(EmitCompletedType)); + TQApplication::postEvent(m_source, new TQCustomEvent(EmitCompletedType)); } } -void KisAccumulatingHistogramProducer::customEvent(QCustomEvent* e) { +void KisAccumulatingHistogramProducer::customEvent(TQCustomEvent* e) { if (e->type() == EmitCompletedType) { emit completed(); } diff --git a/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.h b/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.h index 4ef9f02a..46a0717d 100644 --- a/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.h +++ b/krita/plugins/viewplugins/histogram_docker/kis_accumulating_producer.h @@ -21,7 +21,7 @@ #ifndef _KIS_ACCUMULATING_PRODUCER_H_ #define _KIS_ACCUMULATING_PRODUCER_H_ -#include +#include #include #include "kis_cachedhistogram.h" @@ -34,23 +34,24 @@ * of HistogramProducers if you'd take addRegionsToBinAsync = addRegionToBin, but since that is * already violated with the asynchronousity of it that is not really an issue anymore, I think) **/ -class KisAccumulatingHistogramProducer : public QObject, public KisBasicHistogramProducer { +class KisAccumulatingHistogramProducer : public TQObject, public KisBasicHistogramProducer { Q_OBJECT + TQ_OBJECT public: KisAccumulatingHistogramProducer(KisCachedHistogramObserver::Producers* source); ~KisAccumulatingHistogramProducer(); /// Does _nothing_, use addRegionsToBinAsync - virtual void addRegionToBin(Q_UINT8 *, Q_UINT8*, Q_UINT32, KisColorSpace *) {} + virtual void addRegionToBin(TQ_UINT8 *, TQ_UINT8*, TQ_UINT32, KisColorSpace *) {} virtual void addRegionsToBinAsync(); - virtual QString positionToString(double pos) const + virtual TQString positionToString(double pos) const { return m_source->at(0)->positionToString(pos); } virtual void setView(double, double) {} // No view support virtual double maximalZoom() const { return 1.0; } - virtual Q_INT32 numberOfBins() { return m_source->at(0)->numberOfBins(); } + virtual TQ_INT32 numberOfBins() { return m_source->at(0)->numberOfBins(); } - virtual QValueVector channels() { return m_source->at(0)->channels(); } + virtual TQValueVector channels() { return m_source->at(0)->channels(); } /// Call this when the 'source' list has changed colorspace virtual void changedSourceProducer() { @@ -63,7 +64,7 @@ signals: void completed(); protected: - virtual void customEvent(QCustomEvent* e); + virtual void customEvent(TQCustomEvent* e); /// source already converts external to internal virtual int externalToInternal(int ext) { return ext; } KisCachedHistogramObserver::Producers* m_source; diff --git a/krita/plugins/viewplugins/histogram_docker/kis_cachedhistogram.h b/krita/plugins/viewplugins/histogram_docker/kis_cachedhistogram.h index dfe7a05e..a9b38a4a 100644 --- a/krita/plugins/viewplugins/histogram_docker/kis_cachedhistogram.h +++ b/krita/plugins/viewplugins/histogram_docker/kis_cachedhistogram.h @@ -21,14 +21,14 @@ #ifndef _CACHED_HISTOGRAM_H_ #define _CACHED_HISTOGRAM_H_ -#include +#include #include #include "kis_imagerasteredcache.h" class KisCachedHistogramObserver : public KisImageRasteredCache::Observer { public: - typedef QValueVector Producers; + typedef TQValueVector Producers; KisCachedHistogramObserver(Producers* p, KisHistogramProducerFactory* f, int x, int y, int w, int h, bool add = true) : m_producers(p), m_factory(f), m_x(x), m_y(y), m_w(w), m_h(h) diff --git a/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.cc b/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.cc index 2c6562df..19599cd9 100644 --- a/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.cc +++ b/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.cc @@ -20,7 +20,7 @@ #include -#include +#include #include @@ -47,21 +47,21 @@ KisImageRasteredCache::KisImageRasteredCache(KisView* view, Observer* o) imageSizeChanged(img->width(), img->height()); - connect(img, SIGNAL(sigImageUpdated(QRect)), - this, SLOT(imageUpdated(QRect))); - connect(img, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), - this, SLOT(imageSizeChanged(Q_INT32, Q_INT32))); - connect(&m_timer, SIGNAL(timeout()), this, SLOT(timeOut())); + connect(img, TQT_SIGNAL(sigImageUpdated(TQRect)), + this, TQT_SLOT(imageUpdated(TQRect))); + connect(img, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), + this, TQT_SLOT(imageSizeChanged(TQ_INT32, TQ_INT32))); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeOut())); } KisImageRasteredCache::~KisImageRasteredCache() { cleanUpElements(); } -void KisImageRasteredCache::imageUpdated(QRect rc) { +void KisImageRasteredCache::imageUpdated(TQRect rc) { if (rc.isValid()) { - QRect r(0, 0, m_width * m_rasterSize, m_height * m_rasterSize); + TQRect r(0, 0, m_width * m_rasterSize, m_height * m_rasterSize); r &= rc; uint x = static_cast(r.x() / m_rasterSize); @@ -93,7 +93,7 @@ void KisImageRasteredCache::imageUpdated(QRect rc) { } } -void KisImageRasteredCache::imageSizeChanged(Q_INT32 w, Q_INT32 h) { +void KisImageRasteredCache::imageSizeChanged(TQ_INT32 w, TQ_INT32 h) { KisImageSP image = m_view->canvasSubject()->currentImg(); @@ -120,7 +120,7 @@ void KisImageRasteredCache::imageSizeChanged(Q_INT32 w, Q_INT32 h) { rasterX++; } - imageUpdated(QRect(0,0, image->width(), image->height())); + imageUpdated(TQRect(0,0, image->width(), image->height())); } void KisImageRasteredCache::timeOut() { @@ -140,7 +140,7 @@ void KisImageRasteredCache::timeOut() { // If there are still elements, we need to be called again (this emulates processEvents) if (!m_queue.isEmpty()) { - QTimer::singleShot(0, this, SLOT(timeOut())); + TQTimer::singleShot(0, this, TQT_SLOT(timeOut())); } else { emit cacheUpdated(); m_imageProjection = 0; diff --git a/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.h b/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.h index 6335eadb..7df7df8f 100644 --- a/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.h +++ b/krita/plugins/viewplugins/histogram_docker/kis_imagerasteredcache.h @@ -21,17 +21,18 @@ #ifndef _KIS_IMAGE_RASTERED_CACHE_H_ #define _KIS_IMAGE_RASTERED_CACHE_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include class KisView; -class KisImageRasteredCache : public QObject { +class KisImageRasteredCache : public TQObject { Q_OBJECT + TQ_OBJECT public: class Observer { @@ -48,8 +49,8 @@ signals: void cacheUpdated(); private slots: - void imageUpdated(QRect rc); - void imageSizeChanged(Q_INT32 w, Q_INT32 h); + void imageUpdated(TQRect rc); + void imageSizeChanged(TQ_INT32 w, TQ_INT32 h); void timeOut(); private: @@ -59,15 +60,15 @@ private: Observer* observer; bool valid; }; - typedef QValueVector< QValueVector > Raster; - typedef QValueList Queue; + typedef TQValueVector< TQValueVector > Raster; + typedef TQValueList Queue; void cleanUpElements(); Observer* m_observer; Raster m_raster; Queue m_queue; - QTimer m_timer; + TQTimer m_timer; int m_timeOutMSec; int m_rasterSize; int m_width, m_height; diff --git a/krita/plugins/viewplugins/history_docker/historydocker.cc b/krita/plugins/viewplugins/history_docker/historydocker.cc index 20b1d013..69b952ea 100644 --- a/krita/plugins/viewplugins/history_docker/historydocker.cc +++ b/krita/plugins/viewplugins/history_docker/historydocker.cc @@ -37,13 +37,13 @@ typedef KGenericFactory KritaHistoryDockerFactory; K_EXPORT_COMPONENT_FACTORY( kritahistorydocker, KritaHistoryDockerFactory( "krita" ) ) -KritaHistoryDocker::KritaHistoryDocker(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KritaHistoryDocker::KritaHistoryDocker(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(KritaHistoryDockerFactory::instance()); // Create history docker diff --git a/krita/plugins/viewplugins/history_docker/historydocker.h b/krita/plugins/viewplugins/history_docker/historydocker.h index 8556d37c..922bb52e 100644 --- a/krita/plugins/viewplugins/history_docker/historydocker.h +++ b/krita/plugins/viewplugins/history_docker/historydocker.h @@ -26,7 +26,7 @@ class KritaHistoryDocker : public KParts::Plugin { public: - KritaHistoryDocker(QObject *parent, const char *name, const QStringList &); + KritaHistoryDocker(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KritaHistoryDocker(); }; diff --git a/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc b/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc index 9a641b94..ac3a1b11 100644 --- a/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc +++ b/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc @@ -26,11 +26,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -45,9 +45,9 @@ using namespace std; // XXX: I'm really real bad at arithmetic, let alone math. Here // be rounding errors. (Boudewijn) -DlgImageSize::DlgImageSize( QWidget * parent, +DlgImageSize::DlgImageSize( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Image Size"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Image Size"), Ok | Cancel, Ok) { m_lock = false; @@ -58,13 +58,13 @@ DlgImageSize::DlgImageSize( QWidget * parent, m_page->cmbFilterType->setCurrentText("Mitchell"); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); unblockAll(); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } @@ -78,7 +78,7 @@ void DlgImageSize::hideScaleBox() m_page->grpResizeScale->hide(); } -void DlgImageSize::setWidth(Q_UINT32 w) +void DlgImageSize::setWidth(TQ_UINT32 w) { blockAll(); @@ -90,7 +90,7 @@ void DlgImageSize::setWidth(Q_UINT32 w) unblockAll(); } -void DlgImageSize::setWidthPercent(Q_UINT32 w) +void DlgImageSize::setWidthPercent(TQ_UINT32 w) { blockAll(); @@ -101,19 +101,19 @@ void DlgImageSize::setWidthPercent(Q_UINT32 w) } -void DlgImageSize::setMaximumWidth(Q_UINT32 w) +void DlgImageSize::setMaximumWidth(TQ_UINT32 w) { m_page->intWidth->setMaxValue(w); m_maxW = w; } -Q_INT32 DlgImageSize::width() +TQ_INT32 DlgImageSize::width() { - //return (Q_INT32)qRound(m_oldW); - return (Q_INT32)qRound(m_page->intWidth->value()); + //return (TQ_INT32)tqRound(m_oldW); + return (TQ_INT32)tqRound(m_page->intWidth->value()); } -void DlgImageSize::setHeight(Q_UINT32 h) +void DlgImageSize::setHeight(TQ_UINT32 h) { blockAll(); @@ -126,7 +126,7 @@ void DlgImageSize::setHeight(Q_UINT32 h) } -void DlgImageSize::setHeightPercent(Q_UINT32 h) +void DlgImageSize::setHeightPercent(TQ_UINT32 h) { blockAll(); @@ -138,17 +138,17 @@ void DlgImageSize::setHeightPercent(Q_UINT32 h) -void DlgImageSize::setMaximumHeight(Q_UINT32 h) +void DlgImageSize::setMaximumHeight(TQ_UINT32 h) { m_page->intHeight->setMaxValue(h); m_maxH = h; } -Q_INT32 DlgImageSize::height() +TQ_INT32 DlgImageSize::height() { - //return (Q_INT32)qRound(m_oldH); - return (Q_INT32)qRound(m_page->intHeight->value()); + //return (TQ_INT32)tqRound(m_oldH); + return (TQ_INT32)tqRound(m_page->intHeight->value()); } bool DlgImageSize::scale() @@ -181,14 +181,14 @@ void DlgImageSize::slotWidthPixelsChanged(int w) double wPercent = double(w) * 100 / double(m_origW); - m_page->intWidthPercent->setValue(qRound(wPercent)); + m_page->intWidthPercent->setValue(tqRound(wPercent)); // Set height in pixels and percent of necessary if (m_page->chkConstrain->isChecked()) { - m_page->intHeightPercent->setValue(qRound(wPercent)); + m_page->intHeightPercent->setValue(tqRound(wPercent)); - m_oldH = qRound(m_origH * wPercent / 100); - m_page->intHeight->setValue(qRound(m_oldH)); + m_oldH = tqRound(m_origH * wPercent / 100); + m_page->intHeight->setValue(tqRound(m_oldH)); } m_oldW = w; @@ -202,14 +202,14 @@ void DlgImageSize::slotHeightPixelsChanged(int h) double hPercent = double(h) * 100 / double(m_origH); - m_page->intHeightPercent->setValue(qRound(hPercent)); + m_page->intHeightPercent->setValue(tqRound(hPercent)); // Set width in pixels and percent of necessary if (m_page->chkConstrain->isChecked()) { - m_page->intWidthPercent->setValue(qRound(hPercent)); + m_page->intWidthPercent->setValue(tqRound(hPercent)); - m_oldW = qRound(m_origW * hPercent / 100); - m_page->intWidth->setValue(qRound(m_oldW)); + m_oldW = tqRound(m_origW * hPercent / 100); + m_page->intWidth->setValue(tqRound(m_oldW)); } m_oldH = h; @@ -221,11 +221,11 @@ void DlgImageSize::slotWidthPercentChanged(int w) { blockAll(); - m_page->intWidth->setValue(qRound(w * m_origW / 100)); + m_page->intWidth->setValue(tqRound(w * m_origW / 100)); if (m_page->chkConstrain->isChecked()) { m_page->intHeightPercent->setValue(w); - m_page->intHeight->setValue(qRound( w * m_origH / 100)); + m_page->intHeight->setValue(tqRound( w * m_origH / 100)); } unblockAll(); @@ -235,10 +235,10 @@ void DlgImageSize::slotHeightPercentChanged(int h) { blockAll(); - m_page->intHeight->setValue(qRound(h * m_origH / 100)); + m_page->intHeight->setValue(tqRound(h * m_origH / 100)); if (m_page->chkConstrain->isChecked()) { m_page->intWidthPercent->setValue(h); - m_page->intWidth->setValue(qRound( h * m_origW / 100)); + m_page->intWidth->setValue(tqRound( h * m_origW / 100)); } unblockAll(); @@ -259,17 +259,17 @@ void DlgImageSize::blockAll() void DlgImageSize::unblockAll() { // XXX: more efficient to use blockSignals? - connect (m_page->intWidth, SIGNAL(valueChanged(int)), - this, SLOT(slotWidthPixelsChanged(int))); + connect (m_page->intWidth, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotWidthPixelsChanged(int))); - connect (m_page->intHeight, SIGNAL(valueChanged(int)), - this, SLOT(slotHeightPixelsChanged(int))); + connect (m_page->intHeight, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotHeightPixelsChanged(int))); - connect (m_page->intWidthPercent, SIGNAL(valueChanged(int)), - this, SLOT(slotWidthPercentChanged(int))); + connect (m_page->intWidthPercent, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotWidthPercentChanged(int))); - connect (m_page->intHeightPercent, SIGNAL(valueChanged(int)), - this, SLOT(slotHeightPercentChanged(int))); + connect (m_page->intHeightPercent, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotHeightPercentChanged(int))); } diff --git a/krita/plugins/viewplugins/imagesize/dlg_imagesize.h b/krita/plugins/viewplugins/imagesize/dlg_imagesize.h index 169d8cbd..589f1ad6 100644 --- a/krita/plugins/viewplugins/imagesize/dlg_imagesize.h +++ b/krita/plugins/viewplugins/imagesize/dlg_imagesize.h @@ -26,30 +26,31 @@ class KisFilterStrategy; class WdgImageSize; /** - * This dialog allows the user to create a selection mask based + * This dialog allows the user to create a selection tqmask based * on a (range of) colors. */ class DlgImageSize: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgImageSize(QWidget * parent = 0, + DlgImageSize(TQWidget * tqparent = 0, const char* name = 0); ~DlgImageSize(); void hideScaleBox(); - void setWidth(Q_UINT32 w); - void setWidthPercent(Q_UINT32 w); - void setMaximumWidth(Q_UINT32 w); - Q_INT32 width(); + void setWidth(TQ_UINT32 w); + void setWidthPercent(TQ_UINT32 w); + void setMaximumWidth(TQ_UINT32 w); + TQ_INT32 width(); - void setHeight(Q_UINT32 h); - void setHeightPercent(Q_UINT32 h); - void setMaximumHeight(Q_UINT32 h); - Q_INT32 height(); + void setHeight(TQ_UINT32 h); + void setHeightPercent(TQ_UINT32 h); + void setMaximumHeight(TQ_UINT32 h); + TQ_INT32 height(); bool scale(); bool cropLayers(); diff --git a/krita/plugins/viewplugins/imagesize/dlg_layersize.cc b/krita/plugins/viewplugins/imagesize/dlg_layersize.cc index ba942eca..faf64c00 100644 --- a/krita/plugins/viewplugins/imagesize/dlg_layersize.cc +++ b/krita/plugins/viewplugins/imagesize/dlg_layersize.cc @@ -27,11 +27,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -46,9 +46,9 @@ using namespace std; // XXX: I'm really real bad at arithmetic, let alone math. Here // be rounding errors. (Boudewijn) -DlgLayerSize::DlgLayerSize( QWidget * parent, +DlgLayerSize::DlgLayerSize( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Scale Layer"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Scale Layer"), Ok | Cancel, Ok) { m_lock = false; @@ -59,13 +59,13 @@ DlgLayerSize::DlgLayerSize( QWidget * parent, m_page->cmbFilterType->setCurrentText("Mitchell"); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); unblockAll(); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } @@ -74,7 +74,7 @@ DlgLayerSize::~DlgLayerSize() delete m_page; } -void DlgLayerSize::setWidth(Q_UINT32 w) +void DlgLayerSize::setWidth(TQ_UINT32 w) { blockAll(); @@ -86,7 +86,7 @@ void DlgLayerSize::setWidth(Q_UINT32 w) unblockAll(); } -void DlgLayerSize::setWidthPercent(Q_UINT32 w) +void DlgLayerSize::setWidthPercent(TQ_UINT32 w) { blockAll(); @@ -97,19 +97,19 @@ void DlgLayerSize::setWidthPercent(Q_UINT32 w) } -void DlgLayerSize::setMaximumWidth(Q_UINT32 w) +void DlgLayerSize::setMaximumWidth(TQ_UINT32 w) { m_page->intWidth->setMaxValue(w); m_maxW = w; } -Q_INT32 DlgLayerSize::width() +TQ_INT32 DlgLayerSize::width() { - //return (Q_INT32)qRound(m_oldW); - return (Q_INT32)qRound(m_page->intWidth->value()); + //return (TQ_INT32)tqRound(m_oldW); + return (TQ_INT32)tqRound(m_page->intWidth->value()); } -void DlgLayerSize::setHeight(Q_UINT32 h) +void DlgLayerSize::setHeight(TQ_UINT32 h) { blockAll(); @@ -122,7 +122,7 @@ void DlgLayerSize::setHeight(Q_UINT32 h) } -void DlgLayerSize::setHeightPercent(Q_UINT32 h) +void DlgLayerSize::setHeightPercent(TQ_UINT32 h) { blockAll(); @@ -132,16 +132,16 @@ void DlgLayerSize::setHeightPercent(Q_UINT32 h) unblockAll(); } -void DlgLayerSize::setMaximumHeight(Q_UINT32 h) +void DlgLayerSize::setMaximumHeight(TQ_UINT32 h) { m_page->intHeight->setMaxValue(h); m_maxH = h; } -Q_INT32 DlgLayerSize::height() +TQ_INT32 DlgLayerSize::height() { - //return (Q_INT32)qRound(m_oldH); - return (Q_INT32)qRound(m_page->intHeight->value()); + //return (TQ_INT32)tqRound(m_oldH); + return (TQ_INT32)tqRound(m_page->intHeight->value()); } KisFilterStrategy *DlgLayerSize::filterType() @@ -165,14 +165,14 @@ void DlgLayerSize::slotWidthPixelsChanged(int w) double wPercent = double(w) * 100 / double(m_origW); - m_page->intWidthPercent->setValue(qRound(wPercent)); + m_page->intWidthPercent->setValue(tqRound(wPercent)); // Set height in pixels and percent of necessary if (m_page->chkConstrain->isChecked()) { - m_page->intHeightPercent->setValue(qRound(wPercent)); + m_page->intHeightPercent->setValue(tqRound(wPercent)); - m_oldH = qRound(m_origH * wPercent / 100); - m_page->intHeight->setValue(qRound(m_oldH)); + m_oldH = tqRound(m_origH * wPercent / 100); + m_page->intHeight->setValue(tqRound(m_oldH)); } m_oldW = w; @@ -186,14 +186,14 @@ void DlgLayerSize::slotHeightPixelsChanged(int h) double hPercent = double(h) * 100 / double(m_origH); - m_page->intHeightPercent->setValue(qRound(hPercent)); + m_page->intHeightPercent->setValue(tqRound(hPercent)); // Set width in pixels and percent of necessary if (m_page->chkConstrain->isChecked()) { - m_page->intWidthPercent->setValue(qRound(hPercent)); + m_page->intWidthPercent->setValue(tqRound(hPercent)); - m_oldW = qRound(m_origW * hPercent / 100); - m_page->intWidth->setValue(qRound(m_oldW)); + m_oldW = tqRound(m_origW * hPercent / 100); + m_page->intWidth->setValue(tqRound(m_oldW)); } m_oldH = h; @@ -205,11 +205,11 @@ void DlgLayerSize::slotWidthPercentChanged(int w) { blockAll(); - m_page->intWidth->setValue(qRound(w * m_origW / 100)); + m_page->intWidth->setValue(tqRound(w * m_origW / 100)); if (m_page->chkConstrain->isChecked()) { m_page->intHeightPercent->setValue(w); - m_page->intHeight->setValue(qRound( w * m_origH / 100)); + m_page->intHeight->setValue(tqRound( w * m_origH / 100)); } unblockAll(); @@ -219,10 +219,10 @@ void DlgLayerSize::slotHeightPercentChanged(int h) { blockAll(); - m_page->intHeight->setValue(qRound(h * m_origH / 100)); + m_page->intHeight->setValue(tqRound(h * m_origH / 100)); if (m_page->chkConstrain->isChecked()) { m_page->intWidthPercent->setValue(h); - m_page->intWidth->setValue(qRound( h * m_origW / 100)); + m_page->intWidth->setValue(tqRound( h * m_origW / 100)); } unblockAll(); @@ -243,17 +243,17 @@ void DlgLayerSize::blockAll() void DlgLayerSize::unblockAll() { // XXX: more efficient to use blockSignals? - connect (m_page->intWidth, SIGNAL(valueChanged(int)), - this, SLOT(slotWidthPixelsChanged(int))); + connect (m_page->intWidth, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotWidthPixelsChanged(int))); - connect (m_page->intHeight, SIGNAL(valueChanged(int)), - this, SLOT(slotHeightPixelsChanged(int))); + connect (m_page->intHeight, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotHeightPixelsChanged(int))); - connect (m_page->intWidthPercent, SIGNAL(valueChanged(int)), - this, SLOT(slotWidthPercentChanged(int))); + connect (m_page->intWidthPercent, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotWidthPercentChanged(int))); - connect (m_page->intHeightPercent, SIGNAL(valueChanged(int)), - this, SLOT(slotHeightPercentChanged(int))); + connect (m_page->intHeightPercent, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotHeightPercentChanged(int))); } diff --git a/krita/plugins/viewplugins/imagesize/dlg_layersize.h b/krita/plugins/viewplugins/imagesize/dlg_layersize.h index fa27b732..d44e7a93 100644 --- a/krita/plugins/viewplugins/imagesize/dlg_layersize.h +++ b/krita/plugins/viewplugins/imagesize/dlg_layersize.h @@ -29,22 +29,23 @@ class KisFilterStrategy; class DlgLayerSize: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgLayerSize(QWidget * parent = 0, + DlgLayerSize(TQWidget * tqparent = 0, const char* name = 0); ~DlgLayerSize(); - void setWidth(Q_UINT32 w); - void setWidthPercent(Q_UINT32 w); - void setMaximumWidth(Q_UINT32 w); - Q_INT32 width(); + void setWidth(TQ_UINT32 w); + void setWidthPercent(TQ_UINT32 w); + void setMaximumWidth(TQ_UINT32 w); + TQ_INT32 width(); - void setHeight(Q_UINT32 h); - void setHeightPercent(Q_UINT32 h); - void setMaximumHeight(Q_UINT32 h); - Q_INT32 height(); + void setHeight(TQ_UINT32 h); + void setHeightPercent(TQ_UINT32 h); + void setMaximumHeight(TQ_UINT32 h); + TQ_INT32 height(); KisFilterStrategy *filterType(); private slots: diff --git a/krita/plugins/viewplugins/imagesize/imagesize.cc b/krita/plugins/viewplugins/imagesize/imagesize.cc index df400b5a..fff6cc27 100644 --- a/krita/plugins/viewplugins/imagesize/imagesize.cc +++ b/krita/plugins/viewplugins/imagesize/imagesize.cc @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -58,21 +58,21 @@ typedef KGenericFactory ImageSizeFactory; K_EXPORT_COMPONENT_FACTORY( kritaimagesize, ImageSizeFactory( "krita" ) ) -ImageSize::ImageSize(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ImageSize::ImageSize(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(ImageSizeFactory::instance()); setXMLFile(locate("data","kritaplugins/imagesize.rc"), true); - (void) new KAction(i18n("Change &Image Size..."), 0, "Shift-s", this, SLOT(slotImageSize()), actionCollection(), "imagesize"); - (void) new KAction(i18n("&Scale Layer..."), 0, 0, this, SLOT(slotLayerSize()), actionCollection(), "layerscale"); + (void) new KAction(i18n("Change &Image Size..."), 0, "Shift-s", this, TQT_SLOT(slotImageSize()), actionCollection(), "imagesize"); + (void) new KAction(i18n("&Scale Layer..."), 0, 0, this, TQT_SLOT(slotLayerSize()), actionCollection(), "layerscale"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; // Selection manager takes ownership? - KAction * a = new KAction(i18n("&Scale Selection..."), 0, 0, this, SLOT(slotSelectionScale()), actionCollection(), "selectionscale"); + KAction * a = new KAction(i18n("&Scale Selection..."), 0, 0, this, TQT_SLOT(slotSelectionScale()), actionCollection(), "selectionscale"); Q_CHECK_PTR(a); m_view ->canvasSubject()-> selectionManager()->addSelectionAction(a); } @@ -99,9 +99,9 @@ void ImageSize::slotImageSize() dlgImageSize->setWidth(image->width()); dlgImageSize->setHeight(image->height()); - if (dlgImageSize->exec() == QDialog::Accepted) { - Q_INT32 w = dlgImageSize->width(); - Q_INT32 h = dlgImageSize->height(); + if (dlgImageSize->exec() == TQDialog::Accepted) { + TQ_INT32 w = dlgImageSize->width(); + TQ_INT32 h = dlgImageSize->height(); if (dlgImageSize->scale()) { m_view->scaleCurrentImage((double)w / ((double)(image->width())), @@ -130,14 +130,14 @@ void ImageSize::slotLayerSize() KisConfig cfg; KisPaintDeviceSP dev = image->activeDevice(); - QRect rc = dev->exactBounds(); + TQRect rc = dev->exactBounds(); dlgLayerSize->setWidth(rc.width()); dlgLayerSize->setHeight(rc.height()); - if (dlgLayerSize->exec() == QDialog::Accepted) { - Q_INT32 w = dlgLayerSize->width(); - Q_INT32 h = dlgLayerSize->height(); + if (dlgLayerSize->exec() == TQDialog::Accepted) { + TQ_INT32 w = dlgLayerSize->width(); + TQ_INT32 h = dlgLayerSize->height(); m_view->scaleLayer((double)w / ((double)(rc.width())), (double)h / ((double)(rc.height())), @@ -165,14 +165,14 @@ void ImageSize::slotSelectionScale() dlgLayerSize->setCaption(i18n("Scale Selection")); KisConfig cfg; - QRect rc = layer->selection()->selectedRect(); + TQRect rc = layer->selection()->selectedRect(); dlgLayerSize->setWidth(rc.width()); dlgLayerSize->setHeight(rc.height()); - if (dlgLayerSize->exec() == QDialog::Accepted) { - Q_INT32 w = dlgLayerSize->width(); - Q_INT32 h = dlgLayerSize->height(); + if (dlgLayerSize->exec() == TQDialog::Accepted) { + TQ_INT32 w = dlgLayerSize->width(); + TQ_INT32 h = dlgLayerSize->height(); KisScaleWorker worker (layer->selection().data(), (double)w / ((double)(rc.width())), diff --git a/krita/plugins/viewplugins/imagesize/imagesize.h b/krita/plugins/viewplugins/imagesize/imagesize.h index ce8f0f41..e83f3f7a 100644 --- a/krita/plugins/viewplugins/imagesize/imagesize.h +++ b/krita/plugins/viewplugins/imagesize/imagesize.h @@ -28,8 +28,9 @@ class KisPainter; class ImageSize : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ImageSize(QObject *parent, const char *name, const QStringList &); + ImageSize(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ImageSize(); private slots: diff --git a/krita/plugins/viewplugins/imagesize/wdg_imagesize.ui b/krita/plugins/viewplugins/imagesize/wdg_imagesize.ui index 896bbb05..4cdd5c95 100644 --- a/krita/plugins/viewplugins/imagesize/wdg_imagesize.ui +++ b/krita/plugins/viewplugins/imagesize/wdg_imagesize.ui @@ -1,6 +1,6 @@ WdgImageSize - + WdgImageSize @@ -19,7 +19,7 @@ unnamed - + grpResizeScale @@ -30,7 +30,7 @@ unnamed - + pixmapLabel1_2 @@ -51,7 +51,7 @@ Expanding - + 65 20 @@ -68,14 +68,14 @@ Expanding - + 65 20 - + pixmapLabel2_2 @@ -94,7 +94,7 @@ true - + radioResize @@ -102,7 +102,7 @@ &Resize - + chkCrop @@ -123,14 +123,14 @@ Expanding - + 121 20 - + radioScale @@ -143,7 +143,7 @@ - + grpPixelDimensions @@ -154,7 +154,7 @@ unnamed - + lblWidth @@ -173,7 +173,7 @@ 0 - + textLabel2 @@ -184,7 +184,7 @@ intHeight - + lblWidthOriginal @@ -197,11 +197,11 @@ - + AlignVCenter|AlignRight - + lblHeightOriginal @@ -214,11 +214,11 @@ - + AlignVCenter|AlignRight - + lblOrignal @@ -226,7 +226,7 @@ Original: - + lblNew @@ -276,7 +276,7 @@ % - + lblPercent @@ -287,7 +287,7 @@ intWidthPercent - + chkConstrain @@ -300,14 +300,14 @@ - + lblFilterType Filter: - + AlignVCenter|AlignRight @@ -358,7 +358,7 @@ chkConstrain radioScale - + knuminput.h diff --git a/krita/plugins/viewplugins/imagesize/wdg_layersize.ui b/krita/plugins/viewplugins/imagesize/wdg_layersize.ui index 1b642fd8..fb7547d2 100644 --- a/krita/plugins/viewplugins/imagesize/wdg_layersize.ui +++ b/krita/plugins/viewplugins/imagesize/wdg_layersize.ui @@ -1,6 +1,6 @@ WdgLayerSize - + WdgLayerSize @@ -22,7 +22,7 @@ 0 - + grpPixelDimensions @@ -33,7 +33,7 @@ unnamed - + lblWidth @@ -52,7 +52,7 @@ 0 - + textLabel2 @@ -63,7 +63,7 @@ intHeight - + lblWidthOriginal @@ -76,11 +76,11 @@ - + AlignVCenter|AlignRight - + lblHeightOriginal @@ -93,11 +93,11 @@ - + AlignVCenter|AlignRight - + lblOrignal @@ -105,7 +105,7 @@ Original: - + lblNew @@ -155,7 +155,7 @@ % - + lblPercent @@ -166,7 +166,7 @@ intWidthPercent - + chkConstrain @@ -179,7 +179,7 @@ - + lblFilterType @@ -227,7 +227,7 @@ intHeightPercent chkConstrain - + knuminput.h diff --git a/krita/plugins/viewplugins/imagesize/wdg_resolution.ui b/krita/plugins/viewplugins/imagesize/wdg_resolution.ui index ead01819..df0e010d 100644 --- a/krita/plugins/viewplugins/imagesize/wdg_resolution.ui +++ b/krita/plugins/viewplugins/imagesize/wdg_resolution.ui @@ -1,6 +1,6 @@ WdgResolution - + WdgResolution @@ -19,7 +19,7 @@ unnamed - + grpSize @@ -30,7 +30,7 @@ unnamed - + lblHeight @@ -38,7 +38,7 @@ Height: - + lblWidth @@ -64,7 +64,7 @@ - + grpResolution @@ -75,7 +75,7 @@ unnamed - + lblScreen @@ -83,7 +83,7 @@ Screen resolution: - + lblScreenResolution @@ -96,11 +96,11 @@ 100 - + AlignVCenter|AlignRight - + lblYResolution @@ -108,7 +108,7 @@ Image Y resolution: - + lblImageXRes @@ -138,7 +138,7 @@ - + knuminput.h knuminput.h diff --git a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc index 748c5b9b..134610d6 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc @@ -26,11 +26,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,15 +39,15 @@ using namespace std; #include "dlg_border_selection.h" #include "wdg_border_selection.h" -DlgBorderSelection::DlgBorderSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Border Selection"), Ok | Cancel, Ok) +DlgBorderSelection::DlgBorderSelection( TQWidget * tqparent, const char * name) : super (tqparent, name, true, i18n("Border Selection"), Ok | Cancel, Ok) { m_page = new WdgBorderSelection(this, "border_selection"); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(okClicked())); } DlgBorderSelection::~DlgBorderSelection() @@ -55,12 +55,12 @@ DlgBorderSelection::~DlgBorderSelection() delete m_page; } -Q_INT32 DlgBorderSelection::xradius() +TQ_INT32 DlgBorderSelection::xradius() { return m_page->radiusSpinBox->value(); } -Q_INT32 DlgBorderSelection::yradius() +TQ_INT32 DlgBorderSelection::yradius() { return m_page->radiusSpinBox->value(); } diff --git a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h index baf716d4..b3d5a94d 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h +++ b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h @@ -27,14 +27,15 @@ class WdgBorderSelection; class DlgBorderSelection: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgBorderSelection(QWidget * parent = 0, const char* name = 0); + DlgBorderSelection(TQWidget * tqparent = 0, const char* name = 0); ~DlgBorderSelection(); - Q_INT32 xradius(); - Q_INT32 yradius(); + TQ_INT32 xradius(); + TQ_INT32 yradius(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc index 82055aeb..b73acc69 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc @@ -26,11 +26,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,15 +39,15 @@ using namespace std; #include "dlg_grow_selection.h" #include "wdg_grow_selection.h" -DlgGrowSelection::DlgGrowSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Grow Selection"), Ok | Cancel, Ok) +DlgGrowSelection::DlgGrowSelection( TQWidget * tqparent, const char * name) : super (tqparent, name, true, i18n("Grow Selection"), Ok | Cancel, Ok) { m_page = new WdgGrowSelection(this, "grow_selection"); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(okClicked())); } DlgGrowSelection::~DlgGrowSelection() @@ -55,12 +55,12 @@ DlgGrowSelection::~DlgGrowSelection() delete m_page; } -Q_INT32 DlgGrowSelection::xradius() +TQ_INT32 DlgGrowSelection::xradius() { return m_page->radiusSpinBox->value(); } -Q_INT32 DlgGrowSelection::yradius() +TQ_INT32 DlgGrowSelection::yradius() { return m_page->radiusSpinBox->value(); } diff --git a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h index f5cd36ff..bb2a8ab0 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h +++ b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h @@ -27,14 +27,15 @@ class WdgGrowSelection; class DlgGrowSelection: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgGrowSelection(QWidget * parent = 0, const char* name = 0); + DlgGrowSelection(TQWidget * tqparent = 0, const char* name = 0); ~DlgGrowSelection(); - Q_INT32 xradius(); - Q_INT32 yradius(); + TQ_INT32 xradius(); + TQ_INT32 yradius(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc index 69e31d1d..2a952816 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc @@ -26,11 +26,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,15 +39,15 @@ using namespace std; #include "dlg_shrink_selection.h" #include "wdg_shrink_selection.h" -DlgShrinkSelection::DlgShrinkSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Shrink Selection"), Ok | Cancel, Ok) +DlgShrinkSelection::DlgShrinkSelection( TQWidget * tqparent, const char * name) : super (tqparent, name, true, i18n("Shrink Selection"), Ok | Cancel, Ok) { m_page = new WdgShrinkSelection(this, "shrink_selection"); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(okClicked())); } DlgShrinkSelection::~DlgShrinkSelection() @@ -55,12 +55,12 @@ DlgShrinkSelection::~DlgShrinkSelection() delete m_page; } -Q_INT32 DlgShrinkSelection::xradius() +TQ_INT32 DlgShrinkSelection::xradius() { return m_page->radiusSpinBox->value(); } -Q_INT32 DlgShrinkSelection::yradius() +TQ_INT32 DlgShrinkSelection::yradius() { return m_page->radiusSpinBox->value(); } diff --git a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h index e8e32f43..385d623a 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h +++ b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h @@ -27,14 +27,15 @@ class WdgShrinkSelection; class DlgShrinkSelection: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgShrinkSelection(QWidget * parent = 0, const char* name = 0); + DlgShrinkSelection(TQWidget * tqparent = 0, const char* name = 0); ~DlgShrinkSelection(); - Q_INT32 xradius(); - Q_INT32 yradius(); + TQ_INT32 xradius(); + TQ_INT32 yradius(); bool shrinkFromImageBorder(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/modify_selection.cc b/krita/plugins/viewplugins/modify_selection/modify_selection.cc index 6f2d0511..9ed5ba18 100644 --- a/krita/plugins/viewplugins/modify_selection/modify_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/modify_selection.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -55,20 +55,20 @@ typedef KGenericFactory ModifySelectionFactory; K_EXPORT_COMPONENT_FACTORY( kritamodifyselection, ModifySelectionFactory( "krita" ) ) -ModifySelection::ModifySelection(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ModifySelection::ModifySelection(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(ModifySelectionFactory::instance()); setXMLFile(locate("data","kritaplugins/modify_selection.rc"), true); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; // Selection manager takes ownership? - KAction* a = new KAction(i18n("Grow Selection..."), 0, 0, this, SLOT(slotGrowSelection()), actionCollection(), "growselection"); - KAction* b = new KAction(i18n("Shrink Selection..."), 0, 0, this, SLOT(slotShrinkSelection()), actionCollection(), "shrinkselection"); - KAction* c = new KAction(i18n("Border Selection..."), 0, 0, this, SLOT(slotBorderSelection()), actionCollection(), "borderselection"); + KAction* a = new KAction(i18n("Grow Selection..."), 0, 0, this, TQT_SLOT(slotGrowSelection()), actionCollection(), "growselection"); + KAction* b = new KAction(i18n("Shrink Selection..."), 0, 0, this, TQT_SLOT(slotShrinkSelection()), actionCollection(), "shrinkselection"); + KAction* c = new KAction(i18n("Border Selection..."), 0, 0, this, TQT_SLOT(slotBorderSelection()), actionCollection(), "borderselection"); Q_CHECK_PTR(a); Q_CHECK_PTR(b); @@ -98,9 +98,9 @@ void ModifySelection::slotGrowSelection() KisConfig cfg; - if (dlgGrowSelection->exec() == QDialog::Accepted) { - Q_INT32 xradius = dlgGrowSelection->xradius(); - Q_INT32 yradius = dlgGrowSelection->yradius(); + if (dlgGrowSelection->exec() == TQDialog::Accepted) { + TQ_INT32 xradius = dlgGrowSelection->xradius(); + TQ_INT32 yradius = dlgGrowSelection->yradius(); m_view ->canvasSubject()-> selectionManager()->grow(xradius, yradius); } @@ -121,9 +121,9 @@ void ModifySelection::slotShrinkSelection() KisConfig cfg; - if (dlgShrinkSelection->exec() == QDialog::Accepted) { - Q_INT32 xradius = dlgShrinkSelection->xradius(); - Q_INT32 yradius = dlgShrinkSelection->yradius(); + if (dlgShrinkSelection->exec() == TQDialog::Accepted) { + TQ_INT32 xradius = dlgShrinkSelection->xradius(); + TQ_INT32 yradius = dlgShrinkSelection->yradius(); bool shrinkFromImageBorder = dlgShrinkSelection->shrinkFromImageBorder(); m_view ->canvasSubject()-> selectionManager()->shrink(xradius, yradius, shrinkFromImageBorder); @@ -145,9 +145,9 @@ void ModifySelection::slotBorderSelection() KisConfig cfg; - if (dlgBorderSelection->exec() == QDialog::Accepted) { - Q_INT32 xradius = dlgBorderSelection->xradius(); - Q_INT32 yradius = dlgBorderSelection->yradius(); + if (dlgBorderSelection->exec() == TQDialog::Accepted) { + TQ_INT32 xradius = dlgBorderSelection->xradius(); + TQ_INT32 yradius = dlgBorderSelection->yradius(); m_view ->canvasSubject()-> selectionManager()->border(xradius, yradius); } diff --git a/krita/plugins/viewplugins/modify_selection/modify_selection.h b/krita/plugins/viewplugins/modify_selection/modify_selection.h index d3677088..173ca400 100644 --- a/krita/plugins/viewplugins/modify_selection/modify_selection.h +++ b/krita/plugins/viewplugins/modify_selection/modify_selection.h @@ -27,8 +27,9 @@ class KisView; class ModifySelection : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ModifySelection(QObject *parent, const char *name, const QStringList &); + ModifySelection(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ModifySelection(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui b/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui index 621685da..06d01e9f 100644 --- a/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui +++ b/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui @@ -1,6 +1,6 @@ WdgBorderSelection - + WdgBorderSelection @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -24,7 +24,7 @@ Border selection by - + radiusSpinBox @@ -38,7 +38,7 @@ 1 - + pixels @@ -53,5 +53,5 @@ radiusSpinBox - + diff --git a/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui b/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui index d2eb12aa..d1180803 100644 --- a/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui +++ b/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui @@ -1,6 +1,6 @@ WdgGrowSelection - + WdgGrowSelection @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -24,7 +24,7 @@ Grow selection by - + radiusSpinBox @@ -38,7 +38,7 @@ 1 - + pixels @@ -53,5 +53,5 @@ radiusSpinBox - + diff --git a/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui b/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui index 2896325f..28429d72 100644 --- a/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui +++ b/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui @@ -1,6 +1,6 @@ WdgShrinkSelection - + WdgShrinkSelection @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -24,7 +24,7 @@ Shrink selection by - + radiusSpinBox @@ -38,7 +38,7 @@ 1 - + pixels @@ -48,7 +48,7 @@ comboBox1 - + shrinkFromImageBorderCheckBox @@ -64,5 +64,5 @@ radiusSpinBox - + diff --git a/krita/plugins/viewplugins/performancetest/dlg_perftest.cc b/krita/plugins/viewplugins/performancetest/dlg_perftest.cc index 1d9a045e..f65507b6 100644 --- a/krita/plugins/viewplugins/performancetest/dlg_perftest.cc +++ b/krita/plugins/viewplugins/performancetest/dlg_perftest.cc @@ -26,10 +26,10 @@ using namespace std; -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,9 +39,9 @@ using namespace std; #include "wdg_perftest.h" -DlgPerfTest::DlgPerfTest( QWidget * parent, +DlgPerfTest::DlgPerfTest( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Performance Test"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Performance Test"), Ok | Cancel, Ok) { m_lock = false; @@ -49,13 +49,13 @@ DlgPerfTest::DlgPerfTest( QWidget * parent, Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); - connect(m_page->btnSelectAll, SIGNAL(clicked()), this, SLOT(selectAllClicked())); - connect(m_page->btnDeselectAll, SIGNAL(clicked()), this, SLOT(deselectAllClicked())); + connect(m_page->btnSelectAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectAllClicked())); + connect(m_page->btnDeselectAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(deselectAllClicked())); } DlgPerfTest::~DlgPerfTest() diff --git a/krita/plugins/viewplugins/performancetest/dlg_perftest.h b/krita/plugins/viewplugins/performancetest/dlg_perftest.h index 7cb4f159..39f5cb41 100644 --- a/krita/plugins/viewplugins/performancetest/dlg_perftest.h +++ b/krita/plugins/viewplugins/performancetest/dlg_perftest.h @@ -27,10 +27,11 @@ class WdgPerfTest; class DlgPerfTest: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgPerfTest(QWidget * parent = 0, + DlgPerfTest(TQWidget * tqparent = 0, const char* name = 0); ~DlgPerfTest(); diff --git a/krita/plugins/viewplugins/performancetest/perftest.cc b/krita/plugins/viewplugins/performancetest/perftest.cc index 1c5ede34..2380037a 100644 --- a/krita/plugins/viewplugins/performancetest/perftest.cc +++ b/krita/plugins/viewplugins/performancetest/perftest.cc @@ -22,13 +22,13 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -41,7 +41,7 @@ #include #include -#include +#include #include "kis_meta_registry.h" #include @@ -78,17 +78,17 @@ typedef KGenericFactory PerfTestFactory; K_EXPORT_COMPONENT_FACTORY( kritaperftest, PerfTestFactory( "krita" ) ) -PerfTest::PerfTest(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +PerfTest::PerfTest(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(PerfTestFactory::instance()); setXMLFile(locate("data","kritaplugins/perftest.rc"), true); - (void) new KAction(i18n("&Performance Test..."), 0, 0, this, SLOT(slotPerfTest()), actionCollection(), "perf_test"); + (void) new KAction(i18n("&Performance Test..."), 0, 0, this, TQT_SLOT(slotPerfTest()), actionCollection(), "perf_test"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; } } @@ -108,111 +108,111 @@ void PerfTest::slotPerfTest() dlgPerfTest->setCaption(i18n("Performance Test")); - QString report = QString(""); + TQString report = TQString(""); - if (dlgPerfTest->exec() == QDialog::Accepted) { + if (dlgPerfTest->exec() == TQDialog::Accepted) { - Q_INT32 testCount = (Q_INT32)qRound(dlgPerfTest->page()->intTestCount->value()); + TQ_INT32 testCount = (TQ_INT32)tqRound(dlgPerfTest->page()->intTestCount->value()); if (dlgPerfTest->page()->chkBitBlt->isChecked()) { kdDebug() << "bltTest:\n"; - QString s = bltTest(testCount); + TQString s = bltTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkFill->isChecked()) { kdDebug() << "Filltest\n"; - QString s= fillTest(testCount); + TQString s= fillTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkGradient->isChecked()) { kdDebug() << "Gradienttest\n"; - QString s = gradientTest(testCount); + TQString s = gradientTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkPixel->isChecked()) { kdDebug() << "Pixeltest\n"; - QString s = pixelTest(testCount); + TQString s = pixelTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkShape->isChecked()) { kdDebug() << "Shapetest\n"; - QString s = shapeTest(testCount); + TQString s = tqshapeTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkLayer->isChecked()) { kdDebug() << "LayerTest\n"; - QString s = layerTest(testCount); + TQString s = layerTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkScale->isChecked()) { kdDebug() << "Scaletest\n"; - QString s = scaleTest(testCount); + TQString s = scaleTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkRotate->isChecked()) { kdDebug() << "Rotatetest\n"; - QString s = rotateTest(testCount); + TQString s = rotateTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkRender->isChecked()) { kdDebug() << "Rendertest\n"; - QString s = renderTest(testCount); + TQString s = renderTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkSelection->isChecked()) { kdDebug() << "Selectiontest\n"; - QString s = selectionTest(testCount); + TQString s = selectionTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkColorConversion->isChecked()) { kdDebug() << "Colorconversiontest\n"; - QString s = colorConversionTest(testCount); + TQString s = colorConversionTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkFilter-> isChecked()) { kdDebug() << "filtertest\n"; - QString s = filterTest(testCount); + TQString s = filterTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkReadBytes->isChecked()) { kdDebug() << "Readbytes test\n"; - QString s = readBytesTest(testCount); + TQString s = readBytesTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkWriteBytes-> isChecked()) { kdDebug() << "Writebytes test\n"; - QString s = writeBytesTest(testCount); + TQString s = writeBytesTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkIterators->isChecked()) { kdDebug() << "Iterators test\n"; - QString s = iteratorTest(testCount); + TQString s = iteratorTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkPaintView->isChecked()) { kdDebug() << "paintview test\n"; - QString s = paintViewTest(testCount); + TQString s = paintViewTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkPaintViewFPS->isChecked()) { kdDebug() << "paint current view (fps) test\n"; - QString s = paintViewFPSTest(); + TQString s = paintViewFPSTest(); report = report.append(s); kdDebug() << s << "\n"; } @@ -220,7 +220,7 @@ void PerfTest::slotPerfTest() Q_CHECK_PTR(d); d->setCaption("Performance test results"); - QTextEdit * e = new QTextEdit(d); + TQTextEdit * e = new TQTextEdit(d); Q_CHECK_PTR(e); d->setMainWidget(e); e->setText(report); @@ -233,9 +233,9 @@ void PerfTest::slotPerfTest() delete dlgPerfTest; } -QString PerfTest::bltTest(Q_UINT32 testCount) +TQString PerfTest::bltTest(TQ_UINT32 testCount) { - QString report = QString("* bitBlt test\n"); + TQString report = TQString("* bitBlt test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -265,15 +265,15 @@ QString PerfTest::bltTest(Q_UINT32 testCount) } -QString PerfTest::doBlit(const KisCompositeOp& op, +TQString PerfTest::doBlit(const KisCompositeOp& op, KisID cspace, - Q_UINT8 opacity, - Q_UINT32 testCount, + TQ_UINT8 opacity, + TQ_UINT32 testCount, KisImageSP img) { - QTime t; - QString report; + TQTime t; + TQString report; // ------------------------------------------------------------------------------ // Small @@ -282,21 +282,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(small); KisFillPainter pf(small.data()) ; - pf.fillRect(0, 0, 32, 32, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 32, 32, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); KisPainter p(img->activeDevice()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, small.data(),0,0,32, 32); } p.end(); - report = report.append(QString(" %1 blits of rectangles < tilesize with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles < tilesize with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ @@ -305,21 +305,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(medium); pf.begin(medium.data()) ; - pf.fillRect(0, 0, 64 * 3, 64 * 3, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 64 * 3, 64 * 3, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, medium.data(),0,0,96, 96); } p.end(); - report = report.append(QString(" %1 blits of rectangles 3 * tilesize with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles 3 * tilesize with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ @@ -328,21 +328,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(big); pf.begin(big.data()) ; - pf.fillRect(0, 0, 800, 800, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 800, 800, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, big.data(),0,0,800,800); } p.end(); - report = report.append(QString(" %1 blits of rectangles 800 x 800 with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles 800 x 800 with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ @@ -351,21 +351,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, KisPaintDeviceSP outside = new KisPaintDevice(KisMetaRegistry::instance()->csRegistry()->getColorSpace(cspace,""), "outside blit"); Q_CHECK_PTR(outside); pf.begin(outside.data()) ; - pf.fillRect(0, 0, 500, 500, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 500, 500, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(600, 600, op, outside.data(),0,0,500,500); } p.end(); - report = report.append(QString(" %1 blits of rectangles 500 x 500 at 600,600 with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles 500 x 500 at 600,600 with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ // Small with varied source opacity @@ -374,31 +374,31 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(small_with_alpha); pf.begin(small_with_alpha.data()) ; - pf.fillRect(0, 0, 32, 32, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_TRANSPARENT); - pf.fillRect(4, 4, 24, 24, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); - pf.fillRect(8, 8, 16, 16, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE); + pf.fillRect(0, 0, 32, 32, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_TRANSPARENT); + pf.fillRect(4, 4, 24, 24, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + pf.fillRect(8, 8, 16, 16, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, small_with_alpha.data(), 0, 0, 32, 32); } p.end(); - report = report.append(QString(" %1 blits of rectangles < tilesize with source alpha, with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles < tilesize with source alpha, with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); return report; } -QString PerfTest::fillTest(Q_UINT32 testCount) +TQString PerfTest::fillTest(TQ_UINT32 testCount) { - QString report = QString("* Fill test\n"); + TQString report = TQString("* Fill test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -413,91 +413,91 @@ QString PerfTest::fillTest(Q_UINT32 testCount) // Rect fill KisFillPainter p(l.data()); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(0, 0, 1000, 1000); } - report = report.append(QString(" Erased 1000 x 1000 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Erased 1000 x 1000 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(50, 50, 500, 500); } - report = report.append(QString(" Erased 500 x 500 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Erased 500 x 500 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(-50, -50, 1100, 1100); } - report = report.append(QString(" Erased rect bigger than layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Erased rect bigger than layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Opaque Rect fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); } - report = report.append(QString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(50, 50, 500, 500, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(50, 50, 500, 500, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); } - report = report.append(QString(" Opaque fill 500 x 500 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 500 x 500 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(-50, -50, 1100, 1100, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(-50, -50, 1100, 1100, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); } - report = report.append(QString(" Opaque fill rect bigger than layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill rect bigger than layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Transparent rect fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); } - report = report.append(QString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(50, 50, 500, 500, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(50, 50, 500, 500, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); } - report = report.append(QString(" Opaque fill 500 x 500 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 500 x 500 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(-50, -50, 1100, 1100, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(-50, -50, 1100, 1100, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); } - report = report.append(QString(" Opaque fill rect bigger than layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill rect bigger than layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Colour fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(0, 0, 1000, 1000); // p.paintEllipse(500, 1000, 100, 0, 0); - p.setPaintColor(KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.setPaintColor(KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.setFillThreshold(15); p.setCompositeOp(COMPOSITE_OVER); p.fillColor(0,0); } - report = report.append(QString(" Opaque floodfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque floodfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Pattern fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(0, 0, 1000, 1000); // p.paintEllipse(500, 1000, 100, 0, 0); - p.setPaintColor(KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.setPaintColor(KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); KisResourceServerBase* r = KisResourceServerRegistry::instance()->get("PatternServer"); Q_CHECK_PTR(r); p.setPattern((KisPattern*)r->resources().first()); @@ -505,7 +505,7 @@ QString PerfTest::fillTest(Q_UINT32 testCount) p.setCompositeOp(COMPOSITE_OVER); p.fillPattern(0,0); } - report = report.append(QString(" Opaque patternfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque patternfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); @@ -517,14 +517,14 @@ QString PerfTest::fillTest(Q_UINT32 testCount) } -QString PerfTest::gradientTest(Q_UINT32 testCount) +TQString PerfTest::gradientTest(TQ_UINT32 testCount) { - return QString("Gradient test\n"); + return TQString("Gradient test\n"); } -QString PerfTest::pixelTest(Q_UINT32 testCount) +TQString PerfTest::pixelTest(TQ_UINT32 testCount) { - QString report = QString("* pixel/setpixel test\n"); + TQString report = TQString("* pixel/setpixel test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -537,30 +537,30 @@ QString PerfTest::pixelTest(Q_UINT32 testCount) KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - QColor c = Qt::black; - Q_UINT8 opacity = OPACITY_OPAQUE; - for (Q_UINT32 i = 0; i < testCount; ++i) { - for (Q_UINT32 x = 0; x < 1000; ++x) { - for (Q_UINT32 y = 0; y < 1000; ++y) { + TQColor c = TQt::black; + TQ_UINT8 opacity = OPACITY_OPAQUE; + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 x = 0; x < 1000; ++x) { + for (TQ_UINT32 y = 0; y < 1000; ++y) { l->pixel(x, y, &c, &opacity); } } } - report = report.append(QString(" read 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" read 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); - c= Qt::black; + c= TQt::black; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for (Q_UINT32 x = 0; x < 1000; ++x) { - for (Q_UINT32 y = 0; y < 1000; ++y) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 x = 0; x < 1000; ++x) { + for (TQ_UINT32 y = 0; y < 1000; ++y) { l->setPixel(x, y, c, 128); } } } - report = report.append(QString(" written 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" written 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } @@ -571,31 +571,31 @@ QString PerfTest::pixelTest(Q_UINT32 testCount) } -QString PerfTest::shapeTest(Q_UINT32 testCount) +TQString PerfTest::tqshapeTest(TQ_UINT32 testCount) { - return QString("Shape test\n"); + return TQString("Shape test\n"); } -QString PerfTest::layerTest(Q_UINT32 testCount) +TQString PerfTest::layerTest(TQ_UINT32 testCount) { - return QString("Layer test\n"); + return TQString("Layer test\n"); } -QString PerfTest::scaleTest(Q_UINT32 testCount) +TQString PerfTest::scaleTest(TQ_UINT32 testCount) { - return QString("Scale test\n"); + return TQString("Scale test\n"); } -QString PerfTest::rotateTest(Q_UINT32 testCount) +TQString PerfTest::rotateTest(TQ_UINT32 testCount) { - QString report = QString("* Rotate test\n"); + TQString report = TQString("* Rotate test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); for (KisIDList::Iterator it = l.begin(); it != l.end(); ++it) { doc->undoAdapter()->setUndo( false ); - QTime t; + TQTime t; for (uint i = 0; i < testCount; ++i) { for (double angle = 0; angle < 360; ++angle) { @@ -606,24 +606,24 @@ QString PerfTest::rotateTest(Q_UINT32 testCount) delete img; } } - report = report.append(QString(" rotated 1000 x 1000 pixels over 360 degrees, degree by degree, %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" rotated 1000 x 1000 pixels over 360 degrees, degree by degree, %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } return report; } -QString PerfTest::renderTest(Q_UINT32 restCount) +TQString PerfTest::renderTest(TQ_UINT32 restCount) { - return QString("Render test\n"); + return TQString("Render test\n"); } -QString PerfTest::selectionTest(Q_UINT32 testCount) +TQString PerfTest::selectionTest(TQ_UINT32 testCount) { - return QString("Selection test\n"); + return TQString("Selection test\n"); } -QString PerfTest::colorConversionTest(Q_UINT32 testCount) +TQString PerfTest::colorConversionTest(TQ_UINT32 testCount) { - QString report = QString("* Colorspace conversion test\n"); + TQString report = TQString("* Colorspace conversion test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -631,7 +631,7 @@ QString PerfTest::colorConversionTest(Q_UINT32 testCount) KisImage * img = doc->newImage("cs-" + (*it).name(), 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(*it,"")); - QTime t; + TQTime t; KisIDList l2 = KisMetaRegistry::instance()->csRegistry()->listKeys(); for (KisIDList::Iterator it2 = l2.begin(); it2 != l2.end(); ++it2) { @@ -643,7 +643,7 @@ QString PerfTest::colorConversionTest(Q_UINT32 testCount) img2->convertTo(KisMetaRegistry::instance()->csRegistry()->getColorSpace(*it2,"")); delete img2; } - report = report.append(QString(" converted from " + (*it).name() + " to " + (*it2).name() + " 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" converted from " + (*it).name() + " to " + (*it2).name() + " 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } @@ -654,10 +654,10 @@ QString PerfTest::colorConversionTest(Q_UINT32 testCount) } -QString PerfTest::filterTest(Q_UINT32 testCount) +TQString PerfTest::filterTest(TQ_UINT32 testCount) { - QString report = QString("* Filter test\n"); + TQString report = TQString("* Filter test\n"); KisIDList filters = KisFilterRegistry::instance()->listKeys(); KisDoc * doc = m_view->canvasSubject()->document(); @@ -669,19 +669,19 @@ QString PerfTest::filterTest(Q_UINT32 testCount) KisImageSP img = doc->newImage("filter-" + (*it).name(), 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(*it,"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; for (KisIDList::Iterator it = filters.begin(); it != filters.end(); ++it) { KisFilterSP f = KisFilterRegistry::instance()->get(*it); t.restart(); kdDebug() << "test filter " << f->id().name() << " on " << img->colorSpace()->id().name() << endl; - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { f->enableProgress(); - f->process(l.data(), l.data(), f->configuration(f->createConfigurationWidget(m_view, l.data())), QRect(0, 0, 1000, 1000)); + f->process(l.data(), l.data(), f->configuration(f->createConfigurationWidget(m_view, l.data())), TQRect(0, 0, 1000, 1000)); f->disableProgress(); } - report = report.append(QString(" filtered " + (*it).name() + "1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" filtered " + (*it).name() + "1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } @@ -690,72 +690,72 @@ QString PerfTest::filterTest(Q_UINT32 testCount) } -QString PerfTest::readBytesTest(Q_UINT32 testCount) +TQString PerfTest::readBytesTest(TQ_UINT32 testCount) { - QString report = QString("* Read bytes test\n\n"); + TQString report = TQString("* Read bytes test\n\n"); // On default tiles KisDoc * doc = m_view->canvasSubject()->document(); KisImageSP img = doc->newImage("Readbytes ", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - Q_UINT8 * newData = new Q_UINT8[1000 * 1000 * l->pixelSize()]; + for (TQ_UINT32 i = 0; i < testCount; ++i) { + TQ_UINT8 * newData = new TQ_UINT8[1000 * 1000 * l->pixelSize()]; Q_CHECK_PTR(newData); l->readBytes(newData, 0, 0, 1000, 1000); delete[] newData; } - report = report.append(QString(" read 1000 x 1000 pixels %1 times from empty image: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" read 1000 x 1000 pixels %1 times from empty image: %2\n").tqarg(testCount).tqarg(t.elapsed())); // On tiles with data KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - Q_UINT8 * newData = new Q_UINT8[1000 * 1000 * l->pixelSize()]; + for (TQ_UINT32 i = 0; i < testCount; ++i) { + TQ_UINT8 * newData = new TQ_UINT8[1000 * 1000 * l->pixelSize()]; Q_CHECK_PTR(newData); l->readBytes(newData, 0, 0, 1000, 1000); delete[] newData; } - report = report.append(QString(" read 1000 x 1000 pixels %1 times from filled image: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" read 1000 x 1000 pixels %1 times from filled image: %2\n").tqarg(testCount).tqarg(t.elapsed())); return report; } -QString PerfTest::writeBytesTest(Q_UINT32 testCount) +TQString PerfTest::writeBytesTest(TQ_UINT32 testCount) { - QString report = QString("* Write bytes test"); + TQString report = TQString("* Write bytes test"); // On default tiles KisDoc * doc = m_view->canvasSubject()->document(); KisImageSP img = doc->newImage("Writebytes ", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - Q_UINT8 * data = new Q_UINT8[1000 * 1000 * l->pixelSize()]; + TQ_UINT8 * data = new TQ_UINT8[1000 * 1000 * l->pixelSize()]; Q_CHECK_PTR(data); l->readBytes(data, 0, 0, 1000, 1000); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { l->writeBytes(data, 0, 0, 1000, 1000); } delete[] data; - report = report.append(QString(" written 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" written 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); return report; @@ -764,19 +764,19 @@ QString PerfTest::writeBytesTest(Q_UINT32 testCount) /////// Iterator tests -QString hlineRODefault(KisDoc * doc, Q_UINT32 testCount) +TQString hlineRODefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, false); while(! hiter.isDone()) @@ -788,27 +788,27 @@ QString hlineRODefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString hlineRO(KisDoc * doc, Q_UINT32 testCount) +TQString hlineRO(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, false); while(! hiter.isDone()) @@ -820,22 +820,22 @@ QString hlineRO(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString hlineWRDefault(KisDoc * doc, Q_UINT32 testCount) +TQString hlineWRDefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, true); while(! hiter.isDone()) @@ -847,26 +847,26 @@ QString hlineWRDefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString hlineWR(KisDoc * doc, Q_UINT32 testCount) +TQString hlineWR(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, true); while(! hiter.isDone()) @@ -878,21 +878,21 @@ QString hlineWR(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineRODefault(KisDoc * doc, Q_UINT32 testCount) +TQString vlineRODefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisVLineIterator hiter = l->createVLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -903,25 +903,25 @@ QString vlineRODefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineRO(KisDoc * doc, Q_UINT32 testCount) +TQString vlineRO(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisVLineIterator hiter = l->createVLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -932,21 +932,21 @@ QString vlineRO(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineWRDefault(KisDoc * doc, Q_UINT32 testCount) +TQString vlineWRDefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisVLineIterator hiter = l->createVLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -957,24 +957,24 @@ QString vlineWRDefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineWR(KisDoc * doc, Q_UINT32 testCount) +TQString vlineWR(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -985,19 +985,19 @@ QString vlineWR(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectRODefault(KisDoc * doc, Q_UINT32 testCount) +TQString rectRODefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); ; - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, false); while(! r.isDone()) { @@ -1005,24 +1005,24 @@ QString rectRODefault(KisDoc * doc, Q_UINT32 testCount) } } - return QString(" rect iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectRO(KisDoc * doc, Q_UINT32 testCount) +TQString rectRO(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, false); while(! r.isDone()) { @@ -1030,21 +1030,21 @@ QString rectRO(KisDoc * doc, Q_UINT32 testCount) } } - return QString(" rect iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectWRDefault(KisDoc * doc, Q_UINT32 testCount) +TQString rectWRDefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, true); while(! r.isDone()) { @@ -1052,25 +1052,25 @@ QString rectWRDefault(KisDoc * doc, Q_UINT32 testCount) } } - return QString(" rect iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectWR(KisDoc * doc, Q_UINT32 testCount) +TQString rectWR(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, true); while(! r.isDone()) { @@ -1079,13 +1079,13 @@ QString rectWR(KisDoc * doc, Q_UINT32 testCount) } - return QString(" rect iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString PerfTest::iteratorTest(Q_UINT32 testCount) +TQString PerfTest::iteratorTest(TQ_UINT32 testCount) { - QString report = "Iterator test"; + TQString report = "Iterator test"; KisDoc * doc = m_view->canvasSubject()->document(); @@ -1109,9 +1109,9 @@ QString PerfTest::iteratorTest(Q_UINT32 testCount) } -QString PerfTest::paintViewTest(Q_UINT32 testCount) +TQString PerfTest::paintViewTest(TQ_UINT32 testCount) { - QString report = QString("* paintView test\n\n"); + TQString report = TQString("* paintView test\n\n"); KisDoc * doc = m_view->canvasSubject()->document(); @@ -1122,56 +1122,56 @@ QString PerfTest::paintViewTest(Q_UINT32 testCount) KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 512, 512, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 512, 512, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); #if USE_CALLGRIND CALLGRIND_ZERO_STATS(); #endif - for (Q_UINT32 i = 0; i < testCount; ++i) { - m_view->getCanvasController()->updateCanvas(QRect(0, 0, 512, 512)); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + m_view->getCanvasController()->updateCanvas(TQRect(0, 0, 512, 512)); } #if USE_CALLGRIND CALLGRIND_DUMP_STATS(); #endif - report = report.append(QString(" painted a 512 x 512 image %1 times: %2 ms\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" painted a 512 x 512 image %1 times: %2 ms\n").tqarg(testCount).tqarg(t.elapsed())); img->newLayer("layer 2", OPACITY_OPAQUE); l = img->activeDevice(); p.begin(l.data()); - p.fillRect(0, 0, 512, 512, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 512, 512, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); img->newLayer("layer 3", OPACITY_OPAQUE); l = img->activeDevice(); p.begin(l.data()); - p.fillRect(0, 0, 512, 512, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 512, 512, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - m_view->getCanvasController()->updateCanvas(QRect(0, 0, 512, 512)); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + m_view->getCanvasController()->updateCanvas(TQRect(0, 0, 512, 512)); } - report = report.append(QString(" painted a 512 x 512 image with 3 layers %1 times: %2 ms\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" painted a 512 x 512 image with 3 layers %1 times: %2 ms\n").tqarg(testCount).tqarg(t.elapsed())); return report; } -QString PerfTest::paintViewFPSTest() +TQString PerfTest::paintViewFPSTest() { - QString report = QString("* paintView (fps) test\n\n"); + TQString report = TQString("* paintView (fps) test\n\n"); - QTime t; + TQTime t; t.restart(); #if USE_CALLGRIND @@ -1190,7 +1190,7 @@ QString PerfTest::paintViewFPSTest() CALLGRIND_DUMP_STATS(); #endif - report = report.append(QString(" painted current view at %1 frames per second\n").arg(numViewsPainted)); + report = report.append(TQString(" painted current view at %1 frames per second\n").tqarg(numViewsPainted)); return report; } diff --git a/krita/plugins/viewplugins/performancetest/perftest.h b/krita/plugins/viewplugins/performancetest/perftest.h index 6a3365c5..807c0aee 100644 --- a/krita/plugins/viewplugins/performancetest/perftest.h +++ b/krita/plugins/viewplugins/performancetest/perftest.h @@ -31,8 +31,9 @@ class KisID; class PerfTest : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - PerfTest(QObject *parent, const char *name, const QStringList &); + PerfTest(TQObject *tqparent, const char *name, const TQStringList &); virtual ~PerfTest(); private slots: @@ -41,28 +42,28 @@ private slots: private: - QString bltTest(Q_UINT32 testCount); - QString fillTest(Q_UINT32 testCount); - QString gradientTest(Q_UINT32 testCount); - QString pixelTest(Q_UINT32 testCount); - QString shapeTest(Q_UINT32 testCount); - QString layerTest(Q_UINT32 testCount); - QString scaleTest(Q_UINT32 testCount); - QString rotateTest(Q_UINT32 testCount); - QString renderTest(Q_UINT32 restCount); - QString selectionTest(Q_UINT32 testCount); - QString colorConversionTest(Q_UINT32 testCount); - QString filterTest(Q_UINT32 testCount); - QString readBytesTest(Q_UINT32 testCount); - QString writeBytesTest(Q_UINT32 testCount); - QString iteratorTest(Q_UINT32 testCount); - QString paintViewTest(Q_UINT32 testCount); - QString paintViewFPSTest(); + TQString bltTest(TQ_UINT32 testCount); + TQString fillTest(TQ_UINT32 testCount); + TQString gradientTest(TQ_UINT32 testCount); + TQString pixelTest(TQ_UINT32 testCount); + TQString tqshapeTest(TQ_UINT32 testCount); + TQString layerTest(TQ_UINT32 testCount); + TQString scaleTest(TQ_UINT32 testCount); + TQString rotateTest(TQ_UINT32 testCount); + TQString renderTest(TQ_UINT32 restCount); + TQString selectionTest(TQ_UINT32 testCount); + TQString colorConversionTest(TQ_UINT32 testCount); + TQString filterTest(TQ_UINT32 testCount); + TQString readBytesTest(TQ_UINT32 testCount); + TQString writeBytesTest(TQ_UINT32 testCount); + TQString iteratorTest(TQ_UINT32 testCount); + TQString paintViewTest(TQ_UINT32 testCount); + TQString paintViewFPSTest(); - QString doBlit(const KisCompositeOp& op, + TQString doBlit(const KisCompositeOp& op, KisID cspace, - Q_UINT8 opacity, - Q_UINT32 testCount, + TQ_UINT8 opacity, + TQ_UINT32 testCount, KisImageSP img); private: diff --git a/krita/plugins/viewplugins/performancetest/wdg_perftest.ui b/krita/plugins/viewplugins/performancetest/wdg_perftest.ui index 4f9ca4a0..7dc14f17 100644 --- a/krita/plugins/viewplugins/performancetest/wdg_perftest.ui +++ b/krita/plugins/viewplugins/performancetest/wdg_perftest.ui @@ -1,6 +1,6 @@ WdgPerfTest - + WdgPerfTest @@ -19,7 +19,7 @@ unnamed - + grpPerfTest @@ -30,7 +30,7 @@ unnamed - + lblTests @@ -41,7 +41,7 @@ intWidth - + chkBitBlt @@ -52,7 +52,7 @@ true - + chkFill @@ -63,7 +63,7 @@ true - + chkGradient @@ -74,7 +74,7 @@ true - + chkPixel @@ -85,7 +85,7 @@ true - + chkShape @@ -96,7 +96,7 @@ true - + chkLayer @@ -107,7 +107,7 @@ true - + chkScale @@ -118,7 +118,7 @@ true - + chkRotate @@ -129,7 +129,7 @@ true - + chkRender @@ -140,7 +140,7 @@ true - + chkSelection @@ -151,7 +151,7 @@ true - + chkColorConversion @@ -162,7 +162,7 @@ true - + chkFilter @@ -187,7 +187,7 @@ 1000000 - + chkReadBytes @@ -198,7 +198,7 @@ true - + chkWriteBytes @@ -209,7 +209,7 @@ true - + chkIterators @@ -220,7 +220,7 @@ true - + chkPaintView @@ -231,15 +231,15 @@ true - + - layout5 + tqlayout5 unnamed - + btnSelectAll @@ -247,7 +247,7 @@ &Select All - + btnDeselectAll @@ -257,7 +257,7 @@ - + chkPaintViewFPS @@ -275,7 +275,7 @@ intTestCount - + knuminput.h knuminput.h diff --git a/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.cc b/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.cc index 9bf20fec..28d60154 100644 --- a/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.cc +++ b/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.cc @@ -26,10 +26,10 @@ using namespace std; -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,9 +39,9 @@ using namespace std; #include "wdg_rotateimage.h" -DlgRotateImage::DlgRotateImage( QWidget * parent, +DlgRotateImage::DlgRotateImage( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Rotate Image"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Rotate Image"), Ok | Cancel, Ok) { m_lock = false; @@ -49,12 +49,12 @@ DlgRotateImage::DlgRotateImage( QWidget * parent, Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); - connect( m_page->doubleCustom, SIGNAL( valueChanged ( double ) ), - this, SLOT( slotAngleValueChanged( double ) ) ); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); + connect( m_page->doubleCustom, TQT_SIGNAL( valueChanged ( double ) ), + this, TQT_SLOT( slotAngleValueChanged( double ) ) ); } @@ -104,7 +104,7 @@ double DlgRotateImage::angle() angle = 270; } else { - angle = qRound(m_page->doubleCustom->value()); + angle = tqRound(m_page->doubleCustom->value()); } if (m_page->radioCW->isChecked()) { return angle; diff --git a/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.h b/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.h index c6eef135..8c00df81 100644 --- a/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.h +++ b/krita/plugins/viewplugins/rotateimage/dlg_rotateimage.h @@ -35,10 +35,11 @@ enum enumRotationDirection { class DlgRotateImage: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgRotateImage(QWidget * parent = 0, + DlgRotateImage(TQWidget * tqparent = 0, const char* name = 0); ~DlgRotateImage(); diff --git a/krita/plugins/viewplugins/rotateimage/rotateimage.cc b/krita/plugins/viewplugins/rotateimage/rotateimage.cc index 8b85ef3a..0b1b1a8c 100644 --- a/krita/plugins/viewplugins/rotateimage/rotateimage.cc +++ b/krita/plugins/viewplugins/rotateimage/rotateimage.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -51,24 +51,24 @@ typedef KGenericFactory RotateImageFactory; K_EXPORT_COMPONENT_FACTORY( kritarotateimage, RotateImageFactory( "krita" ) ) // XXX: this plugin could also provide layer scaling/resizing -RotateImage::RotateImage(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +RotateImage::RotateImage(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) { + if ( tqparent->inherits("KisView") ) { setInstance(RotateImageFactory::instance()); setXMLFile(locate("data","kritaplugins/rotateimage.rc"), true); - m_view = (KisView*) parent; - (void) new KAction(i18n("&Rotate Image..."), 0, 0, this, SLOT(slotRotateImage()), actionCollection(), "rotateimage"); - (void) new KAction(i18n("Rotate Image CW"), "rotate_cw", 0, this, SLOT(slotRotateImage90()), actionCollection(), "rotateImageCW90"); - (void) new KAction(i18n("Rotate Image 1&80"), 0, 0, this, SLOT(slotRotateImage180()), actionCollection(), "rotateImage180"); - (void) new KAction(i18n("Rotate Image CCW"), "rotate_ccw", 0, this, SLOT(slotRotateImage270()), actionCollection(), "rotateImageCCW90"); + m_view = (KisView*) tqparent; + (void) new KAction(i18n("&Rotate Image..."), 0, 0, this, TQT_SLOT(slotRotateImage()), actionCollection(), "rotateimage"); + (void) new KAction(i18n("Rotate Image CW"), "rotate_cw", 0, this, TQT_SLOT(slotRotateImage90()), actionCollection(), "rotateImageCW90"); + (void) new KAction(i18n("Rotate Image 1&80"), 0, 0, this, TQT_SLOT(slotRotateImage180()), actionCollection(), "rotateImage180"); + (void) new KAction(i18n("Rotate Image CCW"), "rotate_ccw", 0, this, TQT_SLOT(slotRotateImage270()), actionCollection(), "rotateImageCCW90"); - (void) new KAction(i18n("&Rotate Layer..."), 0, 0, this, SLOT(slotRotateLayer()), actionCollection(), "rotatelayer"); + (void) new KAction(i18n("&Rotate Layer..."), 0, 0, this, TQT_SLOT(slotRotateLayer()), actionCollection(), "rotatelayer"); - (void)new KAction(i18n("Rotate 1&80"), 0, m_view, SLOT(rotateLayer180()), actionCollection(), "rotateLayer180"); - (void)new KAction(i18n("Rotate CCW"), "rotate_ccw", 0, m_view, SLOT(rotateLayerLeft90()), actionCollection(), "rotateLayerCCW90"); - (void)new KAction(i18n("Rotate CW"), "rotate_cw", 0, m_view, SLOT(rotateLayerRight90()), actionCollection(), "rotateLayerCW90"); + (void)new KAction(i18n("Rotate 1&80"), 0, m_view, TQT_SLOT(rotateLayer180()), actionCollection(), "rotateLayer180"); + (void)new KAction(i18n("Rotate CCW"), "rotate_ccw", 0, m_view, TQT_SLOT(rotateLayerLeft90()), actionCollection(), "rotateLayerCCW90"); + (void)new KAction(i18n("Rotate CW"), "rotate_cw", 0, m_view, TQT_SLOT(rotateLayerRight90()), actionCollection(), "rotateLayerCW90"); } } @@ -88,7 +88,7 @@ void RotateImage::slotRotateImage() dlgRotateImage->setCaption(i18n("Rotate Image")); - if (dlgRotateImage->exec() == QDialog::Accepted) { + if (dlgRotateImage->exec() == TQDialog::Accepted) { double angle = dlgRotateImage->angle(); angle *= M_PI/180; m_view->rotateCurrentImage(angle); @@ -123,7 +123,7 @@ void RotateImage::slotRotateLayer() dlgRotateImage->setCaption(i18n("Rotate Layer")); - if (dlgRotateImage->exec() == QDialog::Accepted) { + if (dlgRotateImage->exec() == TQDialog::Accepted) { double angle = dlgRotateImage->angle(); angle *= M_PI/180; m_view->rotateLayer(angle); diff --git a/krita/plugins/viewplugins/rotateimage/rotateimage.h b/krita/plugins/viewplugins/rotateimage/rotateimage.h index 7c09179c..71223282 100644 --- a/krita/plugins/viewplugins/rotateimage/rotateimage.h +++ b/krita/plugins/viewplugins/rotateimage/rotateimage.h @@ -27,8 +27,9 @@ class KisView; class RotateImage : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - RotateImage(QObject *parent, const char *name, const QStringList &); + RotateImage(TQObject *tqparent, const char *name, const TQStringList &); virtual ~RotateImage(); private slots: diff --git a/krita/plugins/viewplugins/rotateimage/wdg_rotateimage.ui b/krita/plugins/viewplugins/rotateimage/wdg_rotateimage.ui index f672db7f..d58c458d 100644 --- a/krita/plugins/viewplugins/rotateimage/wdg_rotateimage.ui +++ b/krita/plugins/viewplugins/rotateimage/wdg_rotateimage.ui @@ -1,6 +1,6 @@ WdgRotateImage - + WdgRotateImage @@ -19,7 +19,7 @@ unnamed - + grpDirection @@ -30,9 +30,9 @@ unnamed - + - layout6 + tqlayout6 @@ -48,14 +48,14 @@ Expanding - + 20 20 - + pixmapLabel1 @@ -65,7 +65,7 @@ false - + AlignCenter @@ -79,14 +79,14 @@ Expanding - + 41 20 - + pixmapLabel2 @@ -96,7 +96,7 @@ false - + AlignCenter @@ -110,7 +110,7 @@ Expanding - + 31 20 @@ -119,7 +119,7 @@ - + radioCW @@ -130,7 +130,7 @@ true - + radioCCW @@ -140,7 +140,7 @@ - + grpAngle @@ -151,7 +151,7 @@ unnamed - + radio90 @@ -159,7 +159,7 @@ 90 &degrees - + radio180 @@ -167,7 +167,7 @@ 180 d&egrees - + radio270 @@ -175,15 +175,15 @@ 270 de&grees - + - layout1 + tqlayout1 unnamed - + radioCustom @@ -219,7 +219,7 @@ Expanding - + 20 91 @@ -238,7 +238,7 @@ 89504e470d0a1a0a0000000d494844520000002c0000002e0806000000534cfb0a00000132494441545885ed994b12032108449b54ee7f65b3cd5440f92a56a5f7326f5a11451a63608b8806c6a0689857068b5a446177f6020361e8fdc04008fa0c30e086a6b4a4f3ba664cc418704212013041fb80b340bfa5847e9b825680022687f549d70016d03aac815d7d988be1a87c6be015acb7dc3ac7cd8167b091734160acbc861bc2029e4a77101690f661c9dd840f46a577b8012cc00157edb749d239dcc45de0e4f1d2a927705235aad4e50e5fa03f70b56c0778ab227bba90ec7d1d167eb62f30c0423f81b9696856aa7b3bcc487fa7f3543ccb18e54cfe3adca914332ce7aff9c6d83cb0e47205b4f176634fba4c68472c1978b69633a09db7f2753330bb91128ca7eb5e56b5aaac316069b756573ce54cf5b8e65fd3d0769870e6c920305bfb1e659296541ef0265d77bcbc0ef803779f9c39421cd9b50000000049454e44ae426082 - + knuminput.h diff --git a/krita/plugins/viewplugins/screenshot/ksnapshot.cpp b/krita/plugins/viewplugins/screenshot/ksnapshot.cpp index 77b4da4b..09bdca48 100644 --- a/krita/plugins/viewplugins/screenshot/ksnapshot.cpp +++ b/krita/plugins/viewplugins/screenshot/ksnapshot.cpp @@ -22,11 +22,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -35,11 +35,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -58,10 +58,10 @@ #include -KSnapshot::KSnapshot(QWidget *parent, const char *name) - : super(parent, name, false, QString::null, Ok|Cancel) +KSnapshot::KSnapshot(TQWidget *tqparent, const char *name) + : super(tqparent, name, false, TQString(), Ok|Cancel) { - grabber = new QWidget( 0, 0, WStyle_Customize | WX11BypassWM ); + grabber = new TQWidget( 0, 0, WStyle_Customize | WX11BypassWM ); Q_CHECK_PTR(grabber); grabber->move( -1000, -1000 ); grabber->installEventFilter( this ); @@ -72,21 +72,21 @@ KSnapshot::KSnapshot(QWidget *parent, const char *name) haveXShape = XShapeQueryExtension( qt_xdisplay(), &tmp1, &tmp2 ); #endif - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); mainWidget = new KSnapshotWidget( vbox, "mainWidget" ); Q_CHECK_PTR(mainWidget); mainWidget->btnSave->hide(); mainWidget->btnPrint->hide(); - connect(mainWidget, SIGNAL(startImageDrag()), SLOT(slotDragSnapshot())); + connect(mainWidget, TQT_SIGNAL(startImageDrag()), TQT_SLOT(slotDragSnapshot())); - connect( mainWidget, SIGNAL( newClicked() ), SLOT( slotGrab() ) ); - connect( mainWidget, SIGNAL( printClicked() ), SLOT( slotPrint() ) ); + connect( mainWidget, TQT_SIGNAL( newClicked() ), TQT_SLOT( slotGrab() ) ); + connect( mainWidget, TQT_SIGNAL( printClicked() ), TQT_SLOT( slotPrint() ) ); grabber->show(); grabber->grabMouse( waitCursor ); - snapshot = QPixmap::grabWindow( qt_xrootwin() ); + snapshot = TQPixmap::grabWindow( qt_xrootwin() ); updatePreview(); grabber->releaseMouse(); grabber->hide(); @@ -97,16 +97,16 @@ KSnapshot::KSnapshot(QWidget *parent, const char *name) mainWidget->setMode( conf->readNumEntry( "mode", 0 ) ); mainWidget->setIncludeDecorations(conf->readBoolEntry("includeDecorations",true)); - connect( &grabTimer, SIGNAL( timeout() ), this, SLOT( grabTimerDone() ) ); + connect( &grabTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( grabTimerDone() ) ); KAccel* accel = new KAccel(this); Q_CHECK_PTR(accel); - accel->insert(KStdAccel::Print, this, SLOT(slotPrint())); - accel->insert(KStdAccel::New, this, SLOT(slotGrab())); + accel->insert(KStdAccel::Print, this, TQT_SLOT(slotPrint())); + accel->insert(KStdAccel::New, this, TQT_SLOT(slotGrab())); - accel->insert( "Print2", Qt::Key_P, this, SLOT(slotPrint())); - accel->insert( "New2", Qt::Key_N, this, SLOT(slotGrab())); - accel->insert( "New3", Qt::Key_Space, this, SLOT(slotGrab())); + accel->insert( "Print2", TQt::Key_P, this, TQT_SLOT(slotPrint())); + accel->insert( "New2", TQt::Key_N, this, TQT_SLOT(slotGrab())); + accel->insert( "New3", TQt::Key_Space, this, TQT_SLOT(slotGrab())); mainWidget->btnNew->setFocus(); @@ -116,14 +116,14 @@ KSnapshot::~KSnapshot() { } -bool KSnapshot::save( const QString &filename ) +bool KSnapshot::save( const TQString &filename ) { return save( KURL::fromPathOrURL( filename )); } bool KSnapshot::save( const KURL& url ) { - QString type( KImageIO::type(url.path()) ); + TQString type( KImageIO::type(url.path()) ); if ( type.isNull() ) type = "PNG"; @@ -147,13 +147,13 @@ bool KSnapshot::save( const KURL& url ) } } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if ( !ok ) { kdWarning() << "KSnapshot was unable to save the snapshot" << endl; - QString caption = i18n("Unable to Save Image"); - QString text = i18n("KSnapshot was unable to save the image to\n%1.") - .arg(url.prettyURL()); + TQString caption = i18n("Unable to Save Image"); + TQString text = i18n("KSnapshot was unable to save the image to\n%1.") + .tqarg(url.prettyURL()); KMessageBox::error(this, text, caption); } @@ -162,13 +162,13 @@ bool KSnapshot::save( const KURL& url ) void KSnapshot::slotCopy() { - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setPixmap( snapshot ); } void KSnapshot::slotDragSnapshot() { - QDragObject *drobj = new QImageDrag(snapshot.convertToImage(), this); + TQDragObject *drobj = new TQImageDrag(snapshot.convertToImage(), this); Q_CHECK_PTR(drobj); drobj->setPixmap(mainWidget->preview()); drobj->dragCopy(); @@ -181,8 +181,8 @@ void KSnapshot::slotGrab() { rgnGrab = new RegionGrabber(); Q_CHECK_PTR(rgnGrab); - connect( rgnGrab, SIGNAL( regionGrabbed( const QPixmap & ) ), - SLOT( slotRegionGrabbed( const QPixmap & ) ) ); + connect( rgnGrab, TQT_SIGNAL( regionGrabbed( const TQPixmap & ) ), + TQT_SLOT( slotRegionGrabbed( const TQPixmap & ) ) ); } else { @@ -203,14 +203,14 @@ void KSnapshot::slotPrint() else printer.setOrientation(KPrinter::Portrait); - qApp->processEvents(); + tqApp->processEvents(); if (printer.setup(this, i18n("Print Screenshot"))) { - qApp->processEvents(); + tqApp->processEvents(); - QPainter painter(&printer); - QPaintDeviceMetrics metrics(painter.device()); + TQPainter painter(&printer); + TQPaintDeviceMetrics metrics(painter.device()); float w = snapshot.width(); float dw = w - metrics.width(); @@ -223,8 +223,8 @@ void KSnapshot::slotPrint() if ( scale ) { - QImage img = snapshot.convertToImage(); - qApp->processEvents(); + TQImage img = snapshot.convertToImage(); + tqApp->processEvents(); float newh, neww; if ( dw > dh ) { @@ -236,8 +236,8 @@ void KSnapshot::slotPrint() neww = newh/h*w; } - img = img.smoothScale( int(neww), int(newh), QImage::ScaleMin ); - qApp->processEvents(); + img = img.smoothScale( int(neww), int(newh), TQ_ScaleMin ); + tqApp->processEvents(); int x = (metrics.width()-img.width())/2; int y = (metrics.height()-img.height())/2; @@ -251,10 +251,10 @@ void KSnapshot::slotPrint() } } - qApp->processEvents(); + tqApp->processEvents(); } -void KSnapshot::slotRegionGrabbed( const QPixmap &pix ) +void KSnapshot::slotRegionGrabbed( const TQPixmap &pix ) { if ( !pix.isNull() ) { @@ -264,15 +264,15 @@ void KSnapshot::slotRegionGrabbed( const QPixmap &pix ) } delete rgnGrab; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); show(); } -bool KSnapshot::eventFilter( QObject* o, QEvent* e) +bool KSnapshot::eventFilter( TQObject* o, TQEvent* e) { - if ( o == grabber && e->type() == QEvent::MouseButtonPress ) { - QMouseEvent* me = (QMouseEvent*) e; - if ( QWidget::mouseGrabber() != grabber ) + if ( o == grabber && e->type() == TQEvent::MouseButtonPress ) { + TQMouseEvent* me = (TQMouseEvent*) e; + if ( TQWidget::mouseGrabber() != grabber ) return false; if ( me->button() == LeftButton ) performGrab(); @@ -282,7 +282,7 @@ bool KSnapshot::eventFilter( QObject* o, QEvent* e) void KSnapshot::updatePreview() { - QImage img = snapshot.convertToImage(); + TQImage img = snapshot.convertToImage(); double r1 = ((double) snapshot.height() ) / snapshot.width(); if ( r1 * mainWidget->previewWidth() < mainWidget->previewHeight() ) img = img.smoothScale( mainWidget->previewWidth(), @@ -291,7 +291,7 @@ void KSnapshot::updatePreview() img = img.smoothScale( (int) (((double)mainWidget->previewHeight()) / r1), (mainWidget->previewHeight() ) ); - QPixmap pm; + TQPixmap pm; pm.convertFromImage( img ); mainWidget->setPreview( pm ); } @@ -319,17 +319,17 @@ Window findRealWindow( Window w, int depth = 0 ) if( type != None ) return w; } - Window root, parent; - Window* children; - unsigned int nchildren; + Window root, tqparent; + Window* tqchildren; + unsigned int ntqchildren; Window ret = None; - if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) { + if( XQueryTree( qt_xdisplay(), w, &root, &tqparent, &tqchildren, &ntqchildren ) != 0 ) { for( unsigned int i = 0; - i < nchildren && ret == None; + i < ntqchildren && ret == None; ++i ) - ret = findRealWindow( children[ i ], depth + 1 ); - if( children != NULL ) - XFree( children ); + ret = findRealWindow( tqchildren[ i ], depth + 1 ); + if( tqchildren != NULL ) + XFree( tqchildren ); } return ret; } @@ -343,11 +343,11 @@ void KSnapshot::performGrab() if ( mainWidget->mode() == WindowUnderCursor ) { Window root; Window child; - uint mask; + uint tqmask; int rootX, rootY, winX, winY; XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, &rootX, &rootY, &winX, &winY, - &mask); + &tqmask); if( child == None ) child = qt_xrootwin(); if( !mainWidget->includeDecorations()) { @@ -364,77 +364,77 @@ void KSnapshot::performGrab() w += 2 * border; h += 2 * border; - Window parent; - Window* children; - unsigned int nchildren; - if( XQueryTree( qt_xdisplay(), child, &root, &parent, - &children, &nchildren ) != 0 ) { - if( children != NULL ) - XFree( children ); + Window tqparent; + Window* tqchildren; + unsigned int ntqchildren; + if( XQueryTree( qt_xdisplay(), child, &root, &tqparent, + &tqchildren, &ntqchildren ) != 0 ) { + if( tqchildren != NULL ) + XFree( tqchildren ); int newx, newy; Window dummy; - if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(), + if( XTranslateCoordinates( qt_xdisplay(), tqparent, qt_xrootwin(), x, y, &newx, &newy, &dummy )) { x = newx; y = newy; } } - snapshot = QPixmap::grabWindow( qt_xrootwin(), x, y, w, h ); + snapshot = TQPixmap::grabWindow( qt_xrootwin(), x, y, w, h ); #ifdef HAVE_X11_EXTENSIONS_SHAPE_H //No XShape - no work. if (haveXShape) { - QBitmap mask(w, h); - //As the first step, get the mask from XShape. + TQBitmap tqmask(w, h); + //As the first step, get the tqmask from XShape. int count, order; XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child, ShapeBounding, &count, &order); - //The ShapeBounding region is the outermost shape of the window; + //The ShapeBounding region is the outermost tqshape of the window; //ShapeBounding - ShapeClipping is defined to be the border. //Since the border area is part of the window, we use bounding // to limit our work region if (rects) { - //Create a QRegion from the rectangles describing the bounding mask. - QRegion contents; + //Create a TQRegion from the rectangles describing the bounding tqmask. + TQRegion contents; for (int pos = 0; pos < count; pos++) - contents += QRegion(rects[pos].x, rects[pos].y, + contents += TQRegion(rects[pos].x, rects[pos].y, rects[pos].width, rects[pos].height); XFree(rects); //Create the bounding box. - QRegion bbox(0, 0, snapshot.width(), snapshot.height()); + TQRegion bbox(0, 0, snapshot.width(), snapshot.height()); if( border > 0 ) { contents.translate( border, border ); - contents += QRegion( 0, 0, border, h ); - contents += QRegion( 0, 0, w, border ); - contents += QRegion( 0, h - border, w, border ); - contents += QRegion( w - border, 0, border, h ); + contents += TQRegion( 0, 0, border, h ); + contents += TQRegion( 0, 0, w, border ); + contents += TQRegion( 0, h - border, w, border ); + contents += TQRegion( w - border, 0, border, h ); } - //Get the masked away area. - QRegion maskedAway = bbox - contents; - QMemArray maskedAwayRects = maskedAway.rects(); - - //Construct a bitmap mask from the rectangles - QPainter p(&mask); - p.fillRect(0, 0, w, h, Qt::color1); - for (uint pos = 0; pos < maskedAwayRects.count(); pos++) - p.fillRect(maskedAwayRects[pos], Qt::color0); + //Get the tqmasked away area. + TQRegion tqmaskedAway = bbox - contents; + TQMemArray tqmaskedAwayRects = tqmaskedAway.rects(); + + //Construct a bitmap tqmask from the rectangles + TQPainter p(&tqmask); + p.fillRect(0, 0, w, h, TQt::color1); + for (uint pos = 0; pos < tqmaskedAwayRects.count(); pos++) + p.fillRect(tqmaskedAwayRects[pos], TQt::color0); p.end(); - snapshot.setMask(mask); + snapshot.setMask(tqmask); } } #endif } else { - snapshot = QPixmap::grabWindow( qt_xrootwin() ); + snapshot = TQPixmap::grabWindow( qt_xrootwin() ); } XUngrabServer( qt_xdisplay()); updatePreview(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); modified = true; // show(); slotOk(); @@ -445,7 +445,7 @@ void KSnapshot::setTime(int newTime) mainWidget->setDelay(newTime); } -void KSnapshot::setURL( const QString &url ) +void KSnapshot::setURL( const TQString &url ) { KURL newURL = KURL::fromPathOrURL( url ); if ( newURL == filename ) @@ -461,7 +461,7 @@ void KSnapshot::setGrabMode( int m ) void KSnapshot::slotMovePointer(int x, int y) { - QCursor::setPos( x, y ); + TQCursor::setPos( x, y ); } void KSnapshot::exit() @@ -473,7 +473,7 @@ void KSnapshot::exit() conf->writeEntry("mode",mainWidget->mode()); conf->writeEntry("includeDecorations",mainWidget->includeDecorations()); KURL url = filename; - url.setPass( QString::null ); + url.setPass( TQString() ); conf->writePathEntry("filename",url.url()); reject(); @@ -488,7 +488,7 @@ void KSnapshot::slotOk() conf->writeEntry("mode",mainWidget->mode()); conf->writeEntry("includeDecorations",mainWidget->includeDecorations()); KURL url = filename; - url.setPass( QString::null ); + url.setPass( TQString() ); conf->writePathEntry("filename",url.url()); emit screenGrabbed(); diff --git a/krita/plugins/viewplugins/screenshot/ksnapshot.h b/krita/plugins/viewplugins/screenshot/ksnapshot.h index 7eeccb62..030cad12 100644 --- a/krita/plugins/viewplugins/screenshot/ksnapshot.h +++ b/krita/plugins/viewplugins/screenshot/ksnapshot.h @@ -23,9 +23,9 @@ #ifndef KSNAPSHOT_H #define KSNAPSHOT_H -#include -#include -#include +#include +#include +#include #include #include @@ -35,15 +35,16 @@ class RegionGrabber; class KSnapshotWidget; -class KSnapshotThumb : public QLabel +class KSnapshotThumb : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KSnapshotThumb(QWidget *parent, const char *name = 0) - : QLabel(parent, name) + KSnapshotThumb(TQWidget *tqparent, const char *name = 0) + : TQLabel(tqparent, name) { - setAlignment(AlignHCenter | AlignVCenter); + tqsetAlignment(AlignHCenter | AlignVCenter); } virtual ~KSnapshotThumb() {} @@ -51,44 +52,45 @@ signals: void startDrag(); protected: - void mousePressEvent(QMouseEvent * e) + void mousePressEvent(TQMouseEvent * e) { mClickPt = e->pos(); } - void mouseMoveEvent(QMouseEvent * e) + void mouseMoveEvent(TQMouseEvent * e) { - if (mClickPt != QPoint(0, 0) && + if (mClickPt != TQPoint(0, 0) && (e->pos() - mClickPt).manhattanLength() > KGlobalSettings::dndEventDelay()) { - mClickPt = QPoint(0, 0); + mClickPt = TQPoint(0, 0); emit startDrag(); } } - void mouseReleaseEvent(QMouseEvent * /*e*/) + void mouseReleaseEvent(TQMouseEvent * /*e*/) { - mClickPt = QPoint(0, 0); + mClickPt = TQPoint(0, 0); } - QPoint mClickPt; + TQPoint mClickPt; }; class KSnapshot : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - KSnapshot(QWidget *parent= 0, const char *name= 0); + KSnapshot(TQWidget *tqparent= 0, const char *name= 0); ~KSnapshot(); enum CaptureMode { FullScreen=0, WindowUnderCursor=1, Region=2 }; - bool save( const QString &filename ); + bool save( const TQString &filename ); bool save( const KURL& url ); - QString url() const { return filename.url(); } + TQString url() const { return filename.url(); } signals: void screenGrabbed(); @@ -100,7 +102,7 @@ protected slots: void slotMovePointer( int x, int y ); void setTime(int newTime); - void setURL(const QString &newURL); + void setURL(const TQString &newURL); void setGrabMode( int m ); void exit(); @@ -109,21 +111,21 @@ protected slots: protected: void reject() { close(); } - bool eventFilter( QObject*, QEvent* ); + bool eventFilter( TQObject*, TQEvent* ); private slots: void grabTimerDone(); void slotDragSnapshot(); - void slotRegionGrabbed( const QPixmap & ); + void slotRegionGrabbed( const TQPixmap & ); private: void updatePreview(); void performGrab(); void autoincFilename(); - QPixmap snapshot; - QTimer grabTimer; - QWidget* grabber; + TQPixmap snapshot; + TQTimer grabTimer; + TQWidget* grabber; KURL filename; KSnapshotWidget *mainWidget; RegionGrabber *rgnGrab; diff --git a/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui b/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui index bd24e6ef..33b64e81 100644 --- a/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui +++ b/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui @@ -1,6 +1,6 @@ KSnapshotWidget - + KSnapshotWidget @@ -23,7 +23,7 @@ lblImage - + 200 130 @@ -76,7 +76,7 @@ The image can be dragged to another application or document to copy the full scr Expanding - + 16 16 @@ -111,7 +111,7 @@ The image can be dragged to another application or document to copy the full scr Horizontal - + spinDelay @@ -135,7 +135,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b </qt> - + lblDelay @@ -146,7 +146,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b spinDelay - + textLabel1 @@ -167,14 +167,14 @@ If <i>no delay</i> is set, the program will wait for a mouse click b Expanding - + 156 16 - + cbIncludeDecorations @@ -188,7 +188,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b When enabled, snapshot of a window will also include the window decorations - + Full Screen @@ -225,7 +225,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b Expanding - + 20 31 @@ -304,13 +304,13 @@ If <i>no delay</i> is set, the program will wait for a mouse click b kglobalsettings.h ksnapshotwidget.ui.h - + newClicked() saveClicked() printClicked() startImageDrag() - - + + slotModeChanged( int mode ) slotNewClicked() slotSaveClicked() @@ -318,7 +318,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b slotStartDrag() previewWidth() previewHeight() - + setPreview( const QPixmap & pm ) setDelay( int i ) @@ -327,9 +327,9 @@ If <i>no delay</i> is set, the program will wait for a mouse click b delay() includeDecorations() mode() - preview() + preview() SmallIconSet - - + + diff --git a/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui.h b/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui.h index e61b0c6e..3c552868 100644 --- a/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui.h +++ b/krita/plugins/viewplugins/screenshot/ksnapshotwidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -32,7 +32,7 @@ void KSnapshotWidget::slotModeChanged( int mode ) } -void KSnapshotWidget::setPreview( const QPixmap &pm ) +void KSnapshotWidget::setPreview( const TQPixmap &pm ) { lblImage->setPixmap(pm); } @@ -99,7 +99,7 @@ void KSnapshotWidget::slotStartDrag() } -QPixmap KSnapshotWidget::preview() +TQPixmap KSnapshotWidget::preview() { return *lblImage->pixmap(); } diff --git a/krita/plugins/viewplugins/screenshot/regiongrabber.cpp b/krita/plugins/viewplugins/screenshot/regiongrabber.cpp index f42f6b94..570c9e3f 100644 --- a/krita/plugins/viewplugins/screenshot/regiongrabber.cpp +++ b/krita/plugins/viewplugins/screenshot/regiongrabber.cpp @@ -20,29 +20,29 @@ #include "regiongrabber.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -SizeTip::SizeTip( QWidget *parent, const char *name ) - : QLabel( parent, name, WStyle_Customize | WX11BypassWM | +SizeTip::SizeTip( TQWidget *tqparent, const char *name ) + : TQLabel( tqparent, name, WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WStyle_NoBorder | WStyle_Tool ) { setMargin( 2 ); setIndent( 0 ); - setFrameStyle( QFrame::Plain | QFrame::Box ); + setFrameStyle( TQFrame::Plain | TQFrame::Box ); - setPalette( QToolTip::palette() ); + setPalette( TQToolTip::palette() ); } -void SizeTip::setTip( const QRect &rect ) +void SizeTip::setTip( const TQRect &rect ) { - QString tip = QString( "%1x%2" ).arg( rect.width() ) - .arg( rect.height() ); + TQString tip = TQString( "%1x%2" ).tqarg( rect.width() ) + .tqarg( rect.height() ); setText( tip ); adjustSize(); @@ -50,34 +50,34 @@ void SizeTip::setTip( const QRect &rect ) positionTip( rect ); } -void SizeTip::positionTip( const QRect &rect ) +void SizeTip::positionTip( const TQRect &rect ) { - QRect tipRect = geometry(); - tipRect.moveTopLeft( QPoint( 0, 0 ) ); + TQRect tipRect = tqgeometry(); + tipRect.moveTopLeft( TQPoint( 0, 0 ) ); if ( rect.intersects( tipRect ) ) { - QRect deskR = KGlobalSettings::desktopGeometry( QPoint( 0, 0 ) ); + TQRect deskR = KGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) ); - tipRect.moveCenter( QPoint( deskR.width()/2, deskR.height()/2 ) ); - if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) - tipRect.moveBottomRight( geometry().bottomRight() ); + tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); + if ( !rect.tqcontains( tipRect, true ) && rect.intersects( tipRect ) ) + tipRect.moveBottomRight( tqgeometry().bottomRight() ); } move( tipRect.topLeft() ); } RegionGrabber::RegionGrabber() - : QWidget( 0, 0 ), + : TQWidget( 0, 0 ), mouseDown( false ), sizeTip( 0L ) { - sizeTip = new SizeTip( ( QWidget * )0L ); + sizeTip = new SizeTip( ( TQWidget * )0L ); - tipTimer = new QTimer( this ); + tipTimer = new TQTimer( this ); Q_CHECK_PTR(tipTimer); - connect( tipTimer, SIGNAL( timeout() ), SLOT( updateSizeTip() ) ); + connect( tipTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateSizeTip() ) ); - QTimer::singleShot( 200, this, SLOT( initGrabber() ) ); + TQTimer::singleShot( 200, this, TQT_SLOT( initGrabber() ) ); } RegionGrabber::~RegionGrabber() @@ -87,7 +87,7 @@ RegionGrabber::~RegionGrabber() void RegionGrabber::initGrabber() { - pixmap = QPixmap::grabWindow( qt_xrootwin() ); + pixmap = TQPixmap::grabWindow( qt_xrootwin() ); setPaletteBackgroundPixmap( pixmap ); showFullScreen(); @@ -95,16 +95,16 @@ void RegionGrabber::initGrabber() grabMouse( crossCursor ); } -void RegionGrabber::mousePressEvent( QMouseEvent *e ) +void RegionGrabber::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) { mouseDown = true; - grabRect = QRect( e->pos(), e->pos() ); + grabRect = TQRect( e->pos(), e->pos() ); } } -void RegionGrabber::mouseMoveEvent( QMouseEvent *e ) +void RegionGrabber::mouseMoveEvent( TQMouseEvent *e ) { if ( mouseDown ) { @@ -117,7 +117,7 @@ void RegionGrabber::mouseMoveEvent( QMouseEvent *e ) } } -void RegionGrabber::mouseReleaseEvent( QMouseEvent *e ) +void RegionGrabber::mouseReleaseEvent( TQMouseEvent *e ) { mouseDown = false; drawRubber(); @@ -126,7 +126,7 @@ void RegionGrabber::mouseReleaseEvent( QMouseEvent *e ) grabRect.setBottomRight( e->pos() ); grabRect = grabRect.normalize(); - QPixmap region = QPixmap::grabWindow( winId(), grabRect.x(), grabRect.y(), + TQPixmap region = TQPixmap::grabWindow( winId(), grabRect.x(), grabRect.y(), grabRect.width(), grabRect.height() ); releaseMouse(); @@ -134,12 +134,12 @@ void RegionGrabber::mouseReleaseEvent( QMouseEvent *e ) emit regionGrabbed( region ); } -void RegionGrabber::keyPressEvent( QKeyEvent *e ) +void RegionGrabber::keyPressEvent( TQKeyEvent *e ) { - if ( e->key() == Qt::Key_Escape ) + if ( e->key() == TQt::Key_Escape ) { releaseMouse(); - emit regionGrabbed( QPixmap() ); + emit regionGrabbed( TQPixmap() ); } else e->ignore(); @@ -147,7 +147,7 @@ void RegionGrabber::keyPressEvent( QKeyEvent *e ) void RegionGrabber::updateSizeTip() { - QRect rect = grabRect.normalize(); + TQRect rect = grabRect.normalize(); sizeTip->setTip( rect ); sizeTip->show(); @@ -155,14 +155,14 @@ void RegionGrabber::updateSizeTip() void RegionGrabber::drawRubber() { - QPainter p; + TQPainter p; p.begin( this ); p.setRasterOp( NotROP ); - p.setPen( QPen( color0, 1 ) ); + p.setPen( TQPen( color0, 1 ) ); p.setBrush( NoBrush ); - style().drawPrimitive( QStyle::PE_FocusRect, &p, grabRect, colorGroup(), - QStyle::Style_Default, QStyleOption( colorGroup().base() ) ); + style().drawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, tqcolorGroup(), + TQStyle::Style_Default, TQStyleOption( tqcolorGroup().base() ) ); p.end(); } diff --git a/krita/plugins/viewplugins/screenshot/regiongrabber.h b/krita/plugins/viewplugins/screenshot/regiongrabber.h index 74bf78c9..b1da1049 100644 --- a/krita/plugins/viewplugins/screenshot/regiongrabber.h +++ b/krita/plugins/viewplugins/screenshot/regiongrabber.h @@ -21,24 +21,25 @@ #ifndef REGIONGRABBER_H #define REGIONGRABBER_H -#include -#include +#include +#include -class QTimer; +class TQTimer; -class SizeTip : public QLabel +class SizeTip : public TQLabel { public: - SizeTip( QWidget *parent, const char *name=0 ); + SizeTip( TQWidget *tqparent, const char *name=0 ); ~SizeTip() {} - void setTip( const QRect &rect ); - void positionTip( const QRect &rect ); + void setTip( const TQRect &rect ); + void positionTip( const TQRect &rect ); }; -class RegionGrabber : public QWidget +class RegionGrabber : public TQWidget { Q_OBJECT + TQ_OBJECT public: RegionGrabber(); @@ -49,22 +50,22 @@ protected slots: void updateSizeTip(); signals: - void regionGrabbed( const QPixmap & ); + void regionGrabbed( const TQPixmap & ); protected: - void mousePressEvent( QMouseEvent *e ); - void mouseReleaseEvent( QMouseEvent *e ); - void mouseMoveEvent( QMouseEvent *e ); - void keyPressEvent( QKeyEvent *e ); + void mousePressEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); + void keyPressEvent( TQKeyEvent *e ); void drawRubber(); bool mouseDown; - QRect grabRect; - QPixmap pixmap; + TQRect grabRect; + TQPixmap pixmap; SizeTip *sizeTip; - QTimer *tipTimer; + TQTimer *tipTimer; }; #endif // REGIONGRABBER_H diff --git a/krita/plugins/viewplugins/screenshot/screenshot.cpp b/krita/plugins/viewplugins/screenshot/screenshot.cpp index c7508ae9..9133b002 100644 --- a/krita/plugins/viewplugins/screenshot/screenshot.cpp +++ b/krita/plugins/viewplugins/screenshot/screenshot.cpp @@ -41,8 +41,8 @@ K_EXPORT_COMPONENT_FACTORY( kritascreenshot, KGenericFactory( "krita" ) ) -Screenshot::Screenshot(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +Screenshot::Screenshot(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { KGlobal::locale()->insertCatalogue("kscreenshot_plugin"); setInstance(KGenericFactory::instance()); @@ -51,9 +51,9 @@ Screenshot::Screenshot(QObject *parent, const char *name, const QStringList &) snapshot = new KSnapshot(); Q_CHECK_PTR(snapshot); - connect( snapshot, SIGNAL( screenGrabbed() ), SLOT( slotScreenGrabbed() ) ); + connect( snapshot, TQT_SIGNAL( screenGrabbed() ), TQT_SLOT( slotScreenGrabbed() ) ); - (void) new KAction(i18n("&Screenshot..."), SmallIcon("tool_screenshot"), 0, this, SLOT(slotScreenshot()), actionCollection(), "screenshot"); + (void) new KAction(i18n("&Screenshot..."), SmallIcon("tool_screenshot"), 0, this, TQT_SLOT(slotScreenshot()), actionCollection(), "screenshot"); } @@ -72,7 +72,7 @@ void Screenshot::slotScreenGrabbed() KTempFile temp(locateLocal("tmp", "screenshot"), ".png"); snapshot->save(temp.name()); - KisView *view = dynamic_cast(parent()); + KisView *view = dynamic_cast(tqparent()); if(view) view->importImage(temp.name()); } diff --git a/krita/plugins/viewplugins/screenshot/screenshot.h b/krita/plugins/viewplugins/screenshot/screenshot.h index 5e4c7c5d..d1100836 100644 --- a/krita/plugins/viewplugins/screenshot/screenshot.h +++ b/krita/plugins/viewplugins/screenshot/screenshot.h @@ -27,8 +27,9 @@ class KSnapshot; class Screenshot : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - Screenshot(QObject *parent, const char *name, const QStringList &); + Screenshot(TQObject *tqparent, const char *name, const TQStringList &); virtual ~Screenshot(); private slots: diff --git a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp index 899291ce..d4eea16f 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp @@ -21,7 +21,7 @@ #include //#include -#include +#include #include
#include @@ -60,7 +60,7 @@ extern "C" using namespace Kross::KritaCore; -KritaCoreFactory::KritaCoreFactory(QString packagePath) : Kross::Api::Event("KritaCoreFactory"), m_packagePath(packagePath) +KritaCoreFactory::KritaCoreFactory(TQString packagePath) : Kross::Api::Event("KritaCoreFactory"), m_packagePath(packagePath) { addFunction("newRGBColor", &KritaCoreFactory::newRGBColor); addFunction("newHSVColor", &KritaCoreFactory::newHSVColor); @@ -77,22 +77,22 @@ KritaCoreFactory::KritaCoreFactory(QString packagePath) : Kross::Api::Eventitem(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), QColor::Rgb); + Color* c = new Color(Kross::Api::Variant::toUInt(args->item(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), TQColor::Rgb); return c; } Kross::Api::Object::Ptr KritaCoreFactory::newHSVColor(Kross::Api::List::Ptr args) { - return new Color(Kross::Api::Variant::toUInt(args->item(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), QColor::Hsv); + return new Color(Kross::Api::Variant::toUInt(args->item(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), TQColor::Hsv); } Kross::Api::Object::Ptr KritaCoreFactory::getPattern(Kross::Api::List::Ptr args) { KisResourceServerBase* rServer = KisResourceServerRegistry::instance()->get("PatternServer"); - QValueList resources = rServer->resources(); + TQValueList resources = rServer->resources(); - QString name = Kross::Api::Variant::toString(args->item(0)); + TQString name = Kross::Api::Variant::toString(args->item(0)); - for (QValueList::iterator it = resources.begin(); it != resources.end(); ++it ) + for (TQValueList::iterator it = resources.begin(); it != resources.end(); ++it ) { if((*it)->name() == name) { @@ -106,7 +106,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::getPattern(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr KritaCoreFactory::loadPattern(Kross::Api::List::Ptr args) { - QString filename = Kross::Api::Variant::toString(args->item(0)); + TQString filename = Kross::Api::Variant::toString(args->item(0)); KisPattern* pattern = new KisPattern(filename); if(pattern->load()) { @@ -121,11 +121,11 @@ Kross::Api::Object::Ptr KritaCoreFactory::loadPattern(Kross::Api::List::Ptr args Kross::Api::Object::Ptr KritaCoreFactory::getBrush(Kross::Api::List::Ptr args) { KisResourceServerBase* rServer = KisResourceServerRegistry::instance()->get("BrushServer"); - QValueList resources = rServer->resources(); + TQValueList resources = rServer->resources(); - QString name = Kross::Api::Variant::toString(args->item(0)); + TQString name = Kross::Api::Variant::toString(args->item(0)); - for (QValueList::iterator it = resources.begin(); it != resources.end(); ++it ) + for (TQValueList::iterator it = resources.begin(); it != resources.end(); ++it ) { if((*it)->name() == name) { @@ -138,7 +138,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::getBrush(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr KritaCoreFactory::loadBrush(Kross::Api::List::Ptr args) { - QString filename = Kross::Api::Variant::toString(args->item(0)); + TQString filename = Kross::Api::Variant::toString(args->item(0)); KisBrush* brush = new KisBrush(filename); if(brush->load()) { @@ -152,7 +152,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::loadBrush(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr KritaCoreFactory::getFilter(Kross::Api::List::Ptr args) { - QString name = Kross::Api::Variant::toString(args->item(0)); + TQString name = Kross::Api::Variant::toString(args->item(0)); KisFilter* filter = KisFilterRegistry::instance()->get(name); if(filter) { @@ -164,8 +164,8 @@ Kross::Api::Object::Ptr KritaCoreFactory::getFilter(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr KritaCoreFactory::newCircleBrush(Kross::Api::List::Ptr args) { - uint w = QMAX(1, Kross::Api::Variant::toUInt(args->item(0))); - uint h = QMAX(1, Kross::Api::Variant::toUInt(args->item(1))); + uint w = TQMAX(1, Kross::Api::Variant::toUInt(args->item(0))); + uint h = TQMAX(1, Kross::Api::Variant::toUInt(args->item(1))); uint hf = 0; uint vf = 0; if( args.count() > 2) @@ -174,14 +174,14 @@ Kross::Api::Object::Ptr KritaCoreFactory::newCircleBrush(Kross::Api::List::Ptr a vf = Kross::Api::Variant::toUInt(args->item(3)); } KisAutobrushShape* kas = new KisAutobrushCircleShape(w, h, hf, vf); - QImage* brsh = new QImage(); + TQImage* brsh = new TQImage(); kas->createBrush(brsh); return new Brush(new KisAutobrushResource(*brsh), false); } Kross::Api::Object::Ptr KritaCoreFactory::newRectBrush(Kross::Api::List::Ptr args) { - uint w = QMAX(1, Kross::Api::Variant::toUInt(args->item(0))); - uint h = QMAX(1, Kross::Api::Variant::toUInt(args->item(1))); + uint w = TQMAX(1, Kross::Api::Variant::toUInt(args->item(0))); + uint h = TQMAX(1, Kross::Api::Variant::toUInt(args->item(1))); uint hf = 0; uint vf = 0; if( args.count() > 2) @@ -190,7 +190,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::newRectBrush(Kross::Api::List::Ptr arg vf = Kross::Api::Variant::toUInt(args->item(3)); } KisAutobrushShape* kas = new KisAutobrushRectShape(w, h, hf, vf); - QImage* brsh = new QImage(); + TQImage* brsh = new TQImage(); kas->createBrush(brsh); return new Brush(new KisAutobrushResource(*brsh), false);; } @@ -199,8 +199,8 @@ Kross::Api::Object::Ptr KritaCoreFactory::newImage(Kross::Api::List::Ptr args) { int w = Kross::Api::Variant::toInt(args->item(0)); int h = Kross::Api::Variant::toInt(args->item(1)); - QString csname = Kross::Api::Variant::toString(args->item(2)); - QString name = Kross::Api::Variant::toString(args->item(3)); + TQString csname = Kross::Api::Variant::toString(args->item(2)); + TQString name = Kross::Api::Variant::toString(args->item(3)); if( w < 0 || h < 0) { throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Invalid image size") ) ); @@ -209,7 +209,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::newImage(Kross::Api::List::Ptr args) KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID(csname, ""), ""); if(!cs) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").arg(csname ) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").tqarg(csname ) ) ); return 0; } @@ -225,9 +225,9 @@ KritaCoreModule::KritaCoreModule(Kross::Api::Manager* manager) : Kross::Api::Module("kritacore") , m_manager(manager), m_factory(0) { - QMap children = manager->getChildren(); - kdDebug(41011) << " there are " << children.size() << endl; - for(QMap::const_iterator it = children.begin(); it != children.end(); it++) + TQMap tqchildren = manager->getChildren(); + kdDebug(41011) << " there are " << tqchildren.size() << endl; + for(TQMap::const_iterator it = tqchildren.begin(); it != tqchildren.end(); it++) { kdDebug(41011) << it.key() << " " << it.data() << endl; } @@ -235,7 +235,7 @@ KritaCoreModule::KritaCoreModule(Kross::Api::Manager* manager) // Wrap doc Kross::Api::Object::Ptr kritadocument = manager->getChild("KritaDocument"); if(kritadocument) { - Kross::Api::QtObject* kritadocumentqt = (Kross::Api::QtObject*)( kritadocument.data() ); + Kross::Api::TQtObject* kritadocumentqt = (Kross::Api::TQtObject*)( kritadocument.data() ); if(kritadocumentqt) { ::KisDoc* document = (::KisDoc*)( kritadocumentqt->getObject() ); if(document) { @@ -246,10 +246,10 @@ KritaCoreModule::KritaCoreModule(Kross::Api::Manager* manager) } } // Wrap KritaScriptProgress - QString packagePath; + TQString packagePath; Kross::Api::Object::Ptr kritascriptprogress = manager->getChild("KritaScriptProgress"); if(kritadocument) { - Kross::Api::QtObject* kritascriptprogressqt = (Kross::Api::QtObject*)( kritascriptprogress.data() ); + Kross::Api::TQtObject* kritascriptprogressqt = (Kross::Api::TQtObject*)( kritascriptprogress.data() ); if(kritascriptprogressqt) { ::KisScriptProgress* scriptprogress = (::KisScriptProgress*)( kritascriptprogressqt->getObject() ); scriptprogress->activateAsSubject(); @@ -271,12 +271,12 @@ KritaCoreModule::~KritaCoreModule() } -const QString KritaCoreModule::getClassName() const +const TQString KritaCoreModule::getClassName() const { return "Kross::KritaCore::KritaCoreModule"; } -Kross::Api::Object::Ptr KritaCoreModule::call(const QString& name, Kross::Api::List::Ptr arguments) +Kross::Api::Object::Ptr KritaCoreModule::call(const TQString& name, Kross::Api::List::Ptr arguments) { kdDebug(41011) << "KritaCoreModule::call = " << name << endl; if( m_factory->isAFunction(name)) diff --git a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h index 97abc8b9..f3cc28c9 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h +++ b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h @@ -19,8 +19,8 @@ #ifndef KRITA_KROSS_KRITACOREMODULE_H #define KRITA_KROSS_KRITACOREMODULE_H -#include -#include +#include +#include #define KROSS_MAIN_EXPORT KDE_EXPORT @@ -38,7 +38,7 @@ namespace Kross { namespace KritaCore { class KritaCoreFactory : public Kross::Api::Event { public: - KritaCoreFactory(QString packagePath); + KritaCoreFactory(TQString packagePath); private: /** * This function return a new Image. @@ -108,7 +108,7 @@ namespace Kross { namespace KritaCore { */ Kross::Api::Object::Ptr getBrush(Kross::Api::List::Ptr); /** - * This function return a Brush with a circular shape + * This function return a Brush with a circular tqshape * It takes at least two arguments : * - width * - height @@ -127,7 +127,7 @@ namespace Kross { namespace KritaCore { */ Kross::Api::Object::Ptr newCircleBrush(Kross::Api::List::Ptr); /** - * This function return a Brush with a rectangular shape + * This function return a Brush with a rectangular tqshape * It takes at least two arguments : * - width * - height @@ -172,7 +172,7 @@ namespace Kross { namespace KritaCore { */ Kross::Api::Object::Ptr getPackagePath(Kross::Api::List::Ptr); private: - QString m_packagePath; + TQString m_packagePath; }; /** * @@ -191,8 +191,8 @@ namespace Kross { namespace KritaCore { virtual ~KritaCoreModule(); /// \see Kross::Api::Object::getClassName - virtual const QString getClassName() const; - virtual Kross::Api::Object::Ptr call(const QString& name, Kross::Api::List::Ptr arguments); + virtual const TQString getClassName() const; + virtual Kross::Api::Object::Ptr call(const TQString& name, Kross::Api::List::Ptr arguments); private: Kross::Api::Manager* m_manager; KritaCoreFactory* m_factory; diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp index e459b1cd..cbea1890 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp @@ -22,7 +22,7 @@ namespace Kross { namespace KritaCore { -Color::Color ( int x, int y, int z, QColor::Spec colorSpec ) +Color::Color ( int x, int y, int z, TQColor::Spec colorSpec ) : Kross::Api::Class("KritaColor"), m_color(x,y,z,colorSpec) { } diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_color.h b/krita/plugins/viewplugins/scripting/kritacore/krs_color.h index 8d46760b..4c6283ee 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_color.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_color.h @@ -19,7 +19,7 @@ #ifndef KROSS_APIKRS_COLOR_H #define KROSS_APIKRS_COLOR_H -#include +#include #include @@ -30,16 +30,16 @@ namespace KritaCore { class Color : public Kross::Api::Class { public: - Color ( int x, int y, int z, QColor::Spec colorSpec ); + Color ( int x, int y, int z, TQColor::Spec colorSpec ); Color (); ~Color(); public: - inline const QString getClassName() const + inline const TQString getClassName() const { return "Kross::Krita::Color"; }; - inline QColor toQColor() { return m_color; }; + inline TQColor toTQColor() { return m_color; }; private: - QColor m_color; + TQColor m_color; }; } diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp index 23dffabb..4c4d029b 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp @@ -33,7 +33,7 @@ Doc::~Doc() { } -const QString Doc::getClassName() const { +const TQString Doc::getClassName() const { return "Kross::KritaCore::Doc"; } diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h index 16336f94..4ac72d3d 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h @@ -30,7 +30,7 @@ class Doc : public Kross::Api::Class public: explicit Doc(::KisDoc* doc); virtual ~Doc(); - virtual const QString getClassName() const; + virtual const TQString getClassName() const; private: /** * This function return the Image associated with this Doc. diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp index ee11d35d..4b382b65 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp @@ -39,7 +39,7 @@ Filter::~Filter() { } -const QString Filter::getClassName() const { +const TQString Filter::getClassName() const { return "Kross::KritaCore::Filter"; } @@ -53,19 +53,19 @@ Kross::Api::Object::Ptr Filter::process(Kross::Api::List::Ptr args) PaintLayer* src = (PaintLayer*)args->item(0).data(); if(!m_filter->workWith( src->paintLayer()->paintDevice()->colorSpace())) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("process") ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("process") ) ); } - QRect rect; + TQRect rect; if( args->count() >1) { uint x = Kross::Api::Variant::toVariant(args->item(1)).toUInt(); uint y = Kross::Api::Variant::toVariant(args->item(2)).toUInt(); uint w = Kross::Api::Variant::toVariant(args->item(3)).toUInt(); uint h = Kross::Api::Variant::toVariant(args->item(4)).toUInt(); - rect = QRect(x, y, w, h); + rect = TQRect(x, y, w, h); } else { - QRect r1 = src->paintLayer()->paintDevice()->extent(); - QRect r2 = src->paintLayer()->image()->bounds(); + TQRect r1 = src->paintLayer()->paintDevice()->extent(); + TQRect r2 = src->paintLayer()->image()->bounds(); rect = r1.intersect(r2); } m_filter->process( src->paintLayer()->paintDevice(), src->paintLayer()->paintDevice(), m_config->filterConfiguration(), rect ); diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h index 62554ef9..0788edbd 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h @@ -64,7 +64,7 @@ class Filter : public Kross::Api::Class */ Kross::Api::Object::Ptr process(Kross::Api::List::Ptr args); public: - virtual const QString getClassName() const; + virtual const TQString getClassName() const; private: KisFilter* m_filter; FilterConfiguration* m_config; diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp index 3479cf38..eaecb0bf 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp @@ -37,22 +37,22 @@ FilterConfiguration::~FilterConfiguration() { } -const QString FilterConfiguration::getClassName() const { +const TQString FilterConfiguration::getClassName() const { return "Kross::KritaCore::FilterConfiguration"; } Kross::Api::Object::Ptr FilterConfiguration::setProperty(Kross::Api::List::Ptr args) { - QString name = Kross::Api::Variant::toString(args->item(0)); - QVariant value = Kross::Api::Variant::toVariant(args->item(1)); + TQString name = Kross::Api::Variant::toString(args->item(0)); + TQVariant value = Kross::Api::Variant::toVariant(args->item(1)); m_fConfig->setProperty(name, value); return 0; } Kross::Api::Object::Ptr FilterConfiguration::getProperty(Kross::Api::List::Ptr args) { - QString name = Kross::Api::Variant::toString(args->item(0)); - QVariant value; + TQString name = Kross::Api::Variant::toString(args->item(0)); + TQVariant value; if(m_fConfig->getProperty( name, value)) { return new Kross::Api::Variant(value); @@ -63,7 +63,7 @@ Kross::Api::Object::Ptr FilterConfiguration::getProperty(Kross::Api::List::Ptr a Kross::Api::Object::Ptr FilterConfiguration::fromXML(Kross::Api::List::Ptr args) { - QString xml = Kross::Api::Variant::toString(args->item(0)); + TQString xml = Kross::Api::Variant::toString(args->item(0)); m_fConfig->fromXML( xml ); return 0; } diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h index 7c8c3020..466c91dc 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h @@ -35,7 +35,7 @@ class FilterConfiguration : public Kross::Api::Class FilterConfiguration(KisFilterConfiguration*); ~FilterConfiguration(); public: - virtual const QString getClassName() const; + virtual const TQString getClassName() const; inline KisFilterConfiguration* filterConfiguration() { return m_fConfig; }; private: /** diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp index 953eb868..83342070 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp @@ -47,7 +47,7 @@ Histogram::~Histogram() { } -const QString Histogram::getClassName() const { +const TQString Histogram::getClassName() const { return "Kross::KritaCore::Histogram"; } diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h index b238c5db..bb8af6fa 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h @@ -50,7 +50,7 @@ class Histogram : public Kross::Api::Class public: Histogram(KisPaintLayerSP layer, KisHistogramProducerSP producer, const enumHistogramType type); ~Histogram(); - virtual const QString getClassName() const; + virtual const TQString getClassName() const; private: /** * This function return the maximum bound of the histogram diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp index b274ad33..bf1c281f 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp @@ -52,7 +52,7 @@ Image::~Image() { } -const QString Image::getClassName() const { +const TQString Image::getClassName() const { return "Kross::KritaCore::Image"; } @@ -80,7 +80,7 @@ Kross::Api::Object::Ptr Image::convertToColorspace(Kross::Api::List::Ptr args) KisColorSpace * dstCS = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID(Kross::Api::Variant::toString(args->item(0)), ""), ""); if(!dstCS) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").arg(Kross::Api::Variant::toString(args->item(0))) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").tqarg(Kross::Api::Variant::toString(args->item(0))) ) ); return 0; } m_image->convertTo(dstCS); @@ -95,10 +95,10 @@ Kross::Api::Object::Ptr Image::colorSpaceId(Kross::Api::List::Ptr ) Kross::Api::Object::Ptr Image::createPaintLayer(Kross::Api::List::Ptr args) { - QString name = Kross::Api::Variant::toString(args->item(0)); + TQString name = Kross::Api::Variant::toString(args->item(0)); int opacity = Kross::Api::Variant::toInt(args->item(1)); opacity = CLAMP(opacity, 0, 255); - QString csname; + TQString csname; if(args->count() > 2) { csname = Kross::Api::Variant::toString(args->item(2)); diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_image.h b/krita/plugins/viewplugins/scripting/kritacore/krs_image.h index 0be2e46f..19e9ba6b 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_image.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_image.h @@ -34,7 +34,7 @@ class Image : public Kross::Api::Class public: Image(KisImageSP image, KisDoc* doc = 0); ~Image(); - virtual const QString getClassName() const; + virtual const TQString getClassName() const; private: /** * Return the active PaintLayer, if any. diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h b/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h index 9493f49a..acd9b061 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h @@ -19,7 +19,7 @@ #ifndef KROSS_KRITACOREKRS_ITERATOR_H #define KROSS_KRITACOREKRS_ITERATOR_H -#include +#include #include //#include //#include @@ -36,25 +36,26 @@ namespace Kross { namespace KritaCore { -// stupid Qt which doesn't support templated QObject +// stupid TQt which doesn't support templated TQObject class IteratorMemoryManaged { public: - virtual void invalidateIterator() = 0; + virtual void tqinvalidateIterator() = 0; }; -class IteratorMemoryManager : public QObject { +class IteratorMemoryManager : public TQObject { Q_OBJECT + TQ_OBJECT public: IteratorMemoryManager(IteratorMemoryManaged* it) : m_it(it) { // Connect the Monitor to know when the invalidating of iterator is needed - connect(KisScriptMonitor::instance(), SIGNAL(executionFinished(const Kross::Api::ScriptAction* )), this, SLOT(invalidateIterator())); + connect(KisScriptMonitor::instance(), TQT_SIGNAL(executionFinished(const Kross::Api::ScriptAction* )), this, TQT_SLOT(tqinvalidateIterator())); } public slots: - void invalidateIterator() + void tqinvalidateIterator() { - m_it->invalidateIterator(); + m_it->tqinvalidateIterator(); } private: IteratorMemoryManaged* m_it; @@ -97,9 +98,9 @@ class Iterator : public Kross::Api::Class >, private IteratorMem >(this, &Iterator<_T_It>::isDone)); // get/set value - QValueVector channels = layer->paintDevice()->colorSpace()->channels(); - QString initiales = ""; - for(QValueVector::iterator itC = channels.begin(); itC != channels.end(); itC++) + TQValueVector channels = layer->paintDevice()->colorSpace()->channels(); + TQString initiales = ""; + for(TQValueVector::iterator itC = channels.begin(); itC != channels.end(); itC++) { KisChannelInfo * ci = *itC; initiales += ci->name().left(1); @@ -146,10 +147,10 @@ class Iterator : public Kross::Api::Class >, private IteratorMem ~Iterator() { - invalidateIterator(); + tqinvalidateIterator(); delete m_itmm; } - virtual const QString getClassName() const { + virtual const TQString getClassName() const { return "Kross::KritaCore::KrsDoc"; }; private: @@ -163,7 +164,7 @@ class Iterator : public Kross::Api::Class >, private IteratorMem */ Kross::Api::Object::Ptr darken(Kross::Api::List::Ptr args) { - Q_INT32 shade = Kross::Api::Variant::toUInt( args->item(0) ); + TQ_INT32 shade = Kross::Api::Variant::toUInt( args->item(0) ); bool compensate = (args->count() == 2); double compensation = compensate ? Kross::Api::Variant::toDouble( args->item(2) ) : 0.; m_layer->paintDevice()->colorSpace()->darken(m_it->rawData(), m_it->rawData(), shade, compensate, compensation, 1); @@ -194,23 +195,23 @@ class Iterator : public Kross::Api::Class >, private IteratorMem } Kross::Api::Object::Ptr getChannelUINT8(Kross::Api::List::Ptr, uint channelpos) { - Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + channelpos); + TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + channelpos); return new Kross::Api::Variant( * data); } Kross::Api::Object::Ptr setChannelUINT8(Kross::Api::List::Ptr args, uint channelpos) { - Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + channelpos); //*(uint*)channelpos); + TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + channelpos); //*(uint*)channelpos); *data = Kross::Api::Variant::toUInt( args->item(0) ); return 0; } Kross::Api::Object::Ptr getChannelUINT16(Kross::Api::List::Ptr, uint channelpos) { - Q_UINT16* data = (Q_UINT16*)(m_it->rawData() + channelpos); + TQ_UINT16* data = (TQ_UINT16*)(m_it->rawData() + channelpos); return new Kross::Api::Variant( * data); } Kross::Api::Object::Ptr setChannelUINT16(Kross::Api::List::Ptr args, uint channelpos) { - Q_UINT16* data = (Q_UINT16*)(m_it->rawData() + channelpos); + TQ_UINT16* data = (TQ_UINT16*)(m_it->rawData() + channelpos); *data = Kross::Api::Variant::toUInt( args->item(0) ); return 0; } @@ -227,25 +228,25 @@ class Iterator : public Kross::Api::Class >, private IteratorMem } Kross::Api::Object::Ptr getPixel(Kross::Api::List::Ptr) { - QValueVector channels = m_layer->paintDevice()->colorSpace()->channels(); - QValueList pixel; - for(QValueVector::iterator itC = channels.begin(); itC != channels.end(); itC++) + TQValueVector channels = m_layer->paintDevice()->colorSpace()->channels(); + TQValueList pixel; + for(TQValueVector::iterator itC = channels.begin(); itC != channels.end(); itC++) { KisChannelInfo * ci = *itC; - Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + ci->pos()); + TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + ci->pos()); switch(ci->channelValueType()) { case KisChannelInfo::UINT8: pixel.push_back( *data); break; case KisChannelInfo::UINT16: - pixel.push_back( *((Q_UINT16*) data) ); + pixel.push_back( *((TQ_UINT16*) data) ); break; case KisChannelInfo::FLOAT32: pixel.push_back( *((float*) data) ); break; default: - kdDebug(41011) << i18n("An error has occurred in %1").arg("getPixel") << endl; + kdDebug(41011) << i18n("An error has occurred in %1").tqarg("getPixel") << endl; kdDebug(41011) << i18n("unsupported data format in scripts") << endl; break; } @@ -254,26 +255,26 @@ class Iterator : public Kross::Api::Class >, private IteratorMem } Kross::Api::Object::Ptr setPixel(Kross::Api::List::Ptr args) { - QValueList pixel = Kross::Api::Variant::toList( args->item(0) ); - QValueVector channels = m_layer->paintDevice()->colorSpace()->channels(); + TQValueList pixel = Kross::Api::Variant::toList( args->item(0) ); + TQValueVector channels = m_layer->paintDevice()->colorSpace()->channels(); uint i = 0; - for(QValueVector::iterator itC = channels.begin(); itC != channels.end(); itC++, i++) + for(TQValueVector::iterator itC = channels.begin(); itC != channels.end(); itC++, i++) { KisChannelInfo * ci = *itC; - Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + ci->pos()); + TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + ci->pos()); switch(ci->channelValueType()) { case KisChannelInfo::UINT8: *data = pixel[i].toUInt(); break; case KisChannelInfo::UINT16: - *((Q_UINT16*) data) = pixel[i].toUInt(); + *((TQ_UINT16*) data) = pixel[i].toUInt(); break; case KisChannelInfo::FLOAT32: *((float*) data) = pixel[i].toDouble(); break; default: - kdDebug(41011) << i18n("An error has occurred in %1").arg("setPixel") << endl; + kdDebug(41011) << i18n("An error has occurred in %1").tqarg("setPixel") << endl; kdDebug(41011) << i18n("unsupported data format in scripts") << endl; break; } @@ -281,7 +282,7 @@ class Iterator : public Kross::Api::Class >, private IteratorMem return 0; } private: - virtual void invalidateIterator() + virtual void tqinvalidateIterator() { kdDebug(41011) << "invalidating iterator" << endl; if(m_it) diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp index 1f79b22c..519a63d9 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp @@ -60,7 +60,7 @@ PaintLayer::~PaintLayer() { } -const QString PaintLayer::getClassName() const { +const TQString PaintLayer::getClassName() const { return "Kross::KritaCore::PaintLayer"; } @@ -91,22 +91,22 @@ Kross::Api::Object::Ptr PaintLayer::createVLineIterator(Kross::Api::List::Ptr ar } Kross::Api::Object::Ptr PaintLayer::getWidth(Kross::Api::List::Ptr) { - QRect r1 = paintLayer()->extent(); - QRect r2 = paintLayer()->image()->bounds(); - QRect rect = r1.intersect(r2); + TQRect r1 = paintLayer()->extent(); + TQRect r2 = paintLayer()->image()->bounds(); + TQRect rect = r1.intersect(r2); return new Kross::Api::Variant(rect.width()); } Kross::Api::Object::Ptr PaintLayer::getHeight(Kross::Api::List::Ptr) { - QRect r1 = paintLayer()->extent(); - QRect r2 = paintLayer()->image()->bounds(); - QRect rect = r1.intersect(r2); + TQRect r1 = paintLayer()->extent(); + TQRect r2 = paintLayer()->image()->bounds(); + TQRect rect = r1.intersect(r2); return new Kross::Api::Variant(rect.height()); } Kross::Api::Object::Ptr PaintLayer::createHistogram(Kross::Api::List::Ptr args) { - QString histoname = Kross::Api::Variant::toString(args->item(0)); + TQString histoname = Kross::Api::Variant::toString(args->item(0)); KisHistogramProducerFactory* factory = KisHistogramProducerFactoryRegistry::instance()->get(histoname); /* KisIDList listID = KisHistogramProducerFactoryRegistry::instance()->listKeys(); @@ -130,7 +130,7 @@ Kross::Api::Object::Ptr PaintLayer::createHistogram(Kross::Api::List::Ptr args) { return new Histogram( paintLayer().data(), factory->generate() , type); } else { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("createHistogram") + "\n" + i18n("The histogram %1 is not available").arg(histoname) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("createHistogram") + "\n" + i18n("The histogram %1 is not available").tqarg(histoname) ) ); } return 0; } @@ -142,7 +142,7 @@ Kross::Api::Object::Ptr PaintLayer::createPainter(Kross::Api::List::Ptr ) Kross::Api::Object::Ptr PaintLayer::beginPainting(Kross::Api::List::Ptr args) { - QString name = Kross::Api::Variant::toString(args->item(0)); + TQString name = Kross::Api::Variant::toString(args->item(0)); if(m_cmd != 0) { delete m_cmd; @@ -172,7 +172,7 @@ Kross::Api::Object::Ptr PaintLayer::convertToColorspace(Kross::Api::List::Ptr ar if(!dstCS) { // FIXME: inform user - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("convertToColorspace") + "\n" + i18n("Colorspace %1 is not available, please check your installation.").arg(Kross::Api::Variant::toString(args->item(0))) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("convertToColorspace") + "\n" + i18n("Colorspace %1 is not available, please check your installation.").tqarg(Kross::Api::Variant::toString(args->item(0))) ) ); return 0; } paintLayer()->paintDevice()->convertTo(dstCS); @@ -188,7 +188,7 @@ Kross::Api::Object::Ptr PaintLayer::colorSpaceId(Kross::Api::List::Ptr ) Kross::Api::Object::Ptr PaintLayer::fastWaveletTransformation(Kross::Api::List::Ptr ) { KisMathToolbox* mathToolbox = KisMetaRegistry::instance()->mtRegistry()->get( paintLayer()->paintDevice()->colorSpace()->mathToolboxID() ); - QRect rect = paintLayer()->exactBounds(); + TQRect rect = paintLayer()->exactBounds(); KisMathToolbox::KisWavelet* wav = mathToolbox->fastWaveletTransformation(paintLayer()->paintDevice(), rect); return new Wavelet(wav); } @@ -196,7 +196,7 @@ Kross::Api::Object::Ptr PaintLayer::fastWaveletUntransformation(Kross::Api::List { Wavelet* wav = (Wavelet*)args->item(0).data(); KisMathToolbox* mathToolbox = KisMetaRegistry::instance()->mtRegistry()->get( paintLayer()->paintDevice()->colorSpace()->mathToolboxID() ); - QRect rect = paintLayer()->exactBounds(); + TQRect rect = paintLayer()->exactBounds(); mathToolbox->fastWaveletUntransformation( paintLayer()->paintDevice(), rect, wav->wavelet() ); return 0; } diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h index 4ddfd4bd..9e00bf91 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h @@ -39,7 +39,7 @@ class PaintLayer : public Kross::Api::Class public: explicit PaintLayer(KisPaintLayerSP layer, KisDoc* doc = 0); virtual ~PaintLayer(); - virtual const QString getClassName() const; + virtual const TQString getClassName() const; private: /** * Create an iterator over a layer, it will iterate on a rectangle area. diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp index 621a173d..370f78c5 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp @@ -77,7 +77,7 @@ Painter::~Painter() Kross::Api::Object::Ptr Painter::convolve(Kross::Api::List::Ptr args) { KisConvolutionPainter* cp = new KisConvolutionPainter(m_painter->device()); - QRect rect; + TQRect rect; KisKernel kernel; kernel.factor = Kross::Api::Variant::toInt(args->item(1)); kernel.offset = Kross::Api::Variant::toInt(args->item(2)); @@ -98,43 +98,43 @@ Kross::Api::Object::Ptr Painter::convolve(Kross::Api::List::Ptr args) uint y = Kross::Api::Variant::toUInt(args->item(6)); uint w = Kross::Api::Variant::toUInt(args->item(7)); uint h = Kross::Api::Variant::toUInt(args->item(8)); - rect = QRect(x,y,w,h); + rect = TQRect(x,y,w,h); } else { - QRect r1 = paintLayer()->paintDevice()->extent(); - QRect r2 = paintLayer()->image()->bounds(); + TQRect r1 = paintLayer()->paintDevice()->extent(); + TQRect r2 = paintLayer()->image()->bounds(); rect = r1.intersect(r2); } - QValueList kernelH = Kross::Api::Variant::toList( args->item(0) ); + TQValueList kernelH = Kross::Api::Variant::toList( args->item(0) ); - QVariant firstlineVariant = *kernelH.begin(); - if(firstlineVariant.type() != QVariant::List) + TQVariant firstlineVariant = *kernelH.begin(); + if(firstlineVariant.type() != TQVariant::List) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").arg("applyConvolution")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").tqarg("applyConvolution")) ); } - QValueList firstline = firstlineVariant.toList(); + TQValueList firstline = firstlineVariant.toList(); kernel.height = kernelH.size(); kernel.width = firstline.size(); - kernel.data = new Q_INT32[kernel.height * kernel.width]; + kernel.data = new TQ_INT32[kernel.height * kernel.width]; uint i = 0; - for(QValueList::iterator itK = kernelH.begin(); itK != kernelH.end(); itK++, i ++ ) + for(TQValueList::iterator itK = kernelH.begin(); itK != kernelH.end(); itK++, i ++ ) { - QVariant lineVariant = *kernelH.begin(); - if(lineVariant.type() != QVariant::List) + TQVariant lineVariant = *kernelH.begin(); + if(lineVariant.type() != TQVariant::List) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").arg("applyConvolution")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").tqarg("applyConvolution")) ); } - QValueList line = firstlineVariant.toList(); + TQValueList line = firstlineVariant.toList(); if(line.size() != kernel.width) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").arg("applyConvolution")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").tqarg("applyConvolution")) ); } uint j = 0; - for(QValueList::iterator itLine = line.begin(); itLine != line.end(); itLine++, j ++ ) + for(TQValueList::iterator itLine = line.begin(); itLine != line.end(); itLine++, j ++ ) { kernel.data[ j + i * kernel.width ] = (*itLine).toInt(); } @@ -221,7 +221,7 @@ Kross::Api::Object::Ptr Painter::setFillStyle(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr Painter::setOpacity(Kross::Api::List::Ptr args) { - Q_UINT8 opacity = Kross::Api::Variant::toVariant(args->item(0)).toUInt(); + TQ_UINT8 opacity = Kross::Api::Variant::toVariant(args->item(0)).toUInt(); m_painter->setOpacity(opacity); return 0; } @@ -236,8 +236,8 @@ Kross::Api::Object::Ptr Painter::setDuplicateOffset(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr Painter::paintPolyline(Kross::Api::List::Ptr args) { - QValueList pointsX = Kross::Api::Variant::toList( args->item(0) ); - QValueList pointsY = Kross::Api::Variant::toList( args->item(1) ); + TQValueList pointsX = Kross::Api::Variant::toList( args->item(0) ); + TQValueList pointsY = Kross::Api::Variant::toList( args->item(1) ); if(pointsX.size() != pointsY.size()) { throw Kross::Api::Exception::Ptr( new Kross::Api::Exception("the two lists should have the same size.") ); @@ -287,8 +287,8 @@ Kross::Api::Object::Ptr Painter::paintEllipse(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr Painter::paintPolygon(Kross::Api::List::Ptr args) { - QValueList pointsX = Kross::Api::Variant::toList( args->item(0) ); - QValueList pointsY = Kross::Api::Variant::toList( args->item(1) ); + TQValueList pointsX = Kross::Api::Variant::toList( args->item(0) ); + TQValueList pointsY = Kross::Api::Variant::toList( args->item(1) ); if(pointsX.size() != pointsY.size()) { throw Kross::Api::Exception::Ptr( new Kross::Api::Exception("the two lists should have the same size.") ); @@ -320,14 +320,14 @@ Kross::Api::Object::Ptr Painter::paintAt(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr Painter::setBackgroundColor(Kross::Api::List::Ptr args) { Color* c = (Color*)args->item(0).data(); - m_painter->setBackgroundColor( KisColor(c->toQColor(), paintLayer()->paintDevice()->colorSpace() )); + m_painter->setBackgroundColor( KisColor(c->toTQColor(), paintLayer()->paintDevice()->colorSpace() )); return 0; } Kross::Api::Object::Ptr Painter::setPaintColor(Kross::Api::List::Ptr args) { Color* c = (Color*)args->item(0).data(); - m_painter->setPaintColor( KisColor(c->toQColor(), paintLayer()->paintDevice()->colorSpace() )); + m_painter->setPaintColor( KisColor(c->toTQColor(), paintLayer()->paintDevice()->colorSpace() )); return 0; } @@ -347,7 +347,7 @@ Kross::Api::Object::Ptr Painter::setBrush(Kross::Api::List::Ptr args) } Kross::Api::Object::Ptr Painter::setPaintOp(Kross::Api::List::Ptr args) { - QString id = Kross::Api::Variant::toString(args->item(0)); + TQString id = Kross::Api::Variant::toString(args->item(0)); KisPaintOp* op = KisPaintOpRegistry::instance()->paintOp( id, 0, m_painter ); m_painter->setPaintOp( op ); return 0; diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h index 37ae7993..64cf6940 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h @@ -217,11 +217,11 @@ class Painter : public Kross::Api::Class protected: inline KisPaintLayerSP paintLayer() { return m_layer; } private: - inline vKisPoint createPointsVector( QValueList xs, QValueList ys) + inline vKisPoint createPointsVector( TQValueList xs, TQValueList ys) { vKisPoint a; - QValueList::iterator itx = xs.begin(); - QValueList::iterator ity = ys.begin(); + TQValueList::iterator itx = xs.begin(); + TQValueList::iterator ity = ys.begin(); for(; itx != xs.end(); ++itx, ++ity) { a.push_back(KisPoint( (*itx).toDouble(), (*ity).toDouble())); diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp index d2786780..9c652a07 100644 --- a/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp +++ b/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp @@ -49,21 +49,21 @@ Wavelet::~Wavelet() Kross::Api::Object::Ptr Wavelet::getNCoeff(Kross::Api::List::Ptr args) { - Q_UINT32 n = Kross::Api::Variant::toUInt(args->item(0)); + TQ_UINT32 n = Kross::Api::Variant::toUInt(args->item(0)); if( n > m_numCoeff) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("getNCoeff") + "\n" + i18n("Index out of bound") ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("getNCoeff") + "\n" + i18n("Index out of bound") ) ); } return new Kross::Api::Variant(*(m_wavelet->coeffs + n )); } Kross::Api::Object::Ptr Wavelet::setNCoeff(Kross::Api::List::Ptr args) { - Q_UINT32 n = Kross::Api::Variant::toUInt(args->item(0)); + TQ_UINT32 n = Kross::Api::Variant::toUInt(args->item(0)); double v = Kross::Api::Variant::toDouble(args->item(1)); if( n > m_numCoeff) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("setNCoeff") + "\n" + i18n("Index out of bound") ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("setNCoeff") + "\n" + i18n("Index out of bound") ) ); } *(m_wavelet->coeffs + n ) = v; return 0; @@ -71,23 +71,23 @@ Kross::Api::Object::Ptr Wavelet::setNCoeff(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr Wavelet::getXYCoeff(Kross::Api::List::Ptr args) { - Q_UINT32 x = Kross::Api::Variant::toUInt(args->item(0)); - Q_UINT32 y = Kross::Api::Variant::toUInt(args->item(1)); + TQ_UINT32 x = Kross::Api::Variant::toUInt(args->item(0)); + TQ_UINT32 y = Kross::Api::Variant::toUInt(args->item(1)); if( x > m_wavelet->size && y > m_wavelet->size) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("getXYCoeff") + "\n" + i18n("Index out of bound") ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("getXYCoeff") + "\n" + i18n("Index out of bound") ) ); } return new Kross::Api::Variant(*(m_wavelet->coeffs + (x + y * m_wavelet->size ) * m_wavelet->depth )); } Kross::Api::Object::Ptr Wavelet::setXYCoeff(Kross::Api::List::Ptr args) { - Q_UINT32 x = Kross::Api::Variant::toUInt(args->item(0)); - Q_UINT32 y = Kross::Api::Variant::toUInt(args->item(1)); + TQ_UINT32 x = Kross::Api::Variant::toUInt(args->item(0)); + TQ_UINT32 y = Kross::Api::Variant::toUInt(args->item(1)); double v = Kross::Api::Variant::toDouble(args->item(2)); if( x > m_wavelet->size && y > m_wavelet->size) { - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("setXYCoeff") + "\n" + i18n("Index out of bound") )); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("setXYCoeff") + "\n" + i18n("Index out of bound") )); } *(m_wavelet->coeffs + (x + y * m_wavelet->size ) * m_wavelet->depth ) = v; return 0; diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp index 8bb12596..3967ffe7 100644 --- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp +++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp @@ -34,8 +34,8 @@ KisScriptMonitor::~KisScriptMonitor() void KisScriptMonitor::monitor(Kross::Api::ScriptGUIClient* guiClient) { - connect(guiClient, SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), SIGNAL(executionFinished( const Kross::Api::ScriptAction* ))); - connect(guiClient, SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), SIGNAL(executionStarted( const Kross::Api::ScriptAction* ))); + connect(guiClient, TQT_SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), TQT_SIGNAL(executionFinished( const Kross::Api::ScriptAction* ))); + connect(guiClient, TQT_SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), TQT_SIGNAL(executionStarted( const Kross::Api::ScriptAction* ))); } KisScriptMonitor* KisScriptMonitor::s_instance = 0; diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h index de1e0380..c1ee64c0 100644 --- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h +++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h @@ -19,7 +19,7 @@ #ifndef KIS_SCRIPT_MONITOR_H #define KIS_SCRIPT_MONITOR_H -#include +#include namespace Kross { namespace Api { @@ -31,8 +31,9 @@ namespace Kross { /** @author Cyrille Berger */ -class KisScriptMonitor : public QObject { +class KisScriptMonitor : public TQObject { Q_OBJECT + TQ_OBJECT private: KisScriptMonitor(); ~KisScriptMonitor(); diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp index c3629304..d7af4eb4 100644 --- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp +++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp @@ -26,7 +26,7 @@ void KisScriptProgress::activateAsSubject() m_view->canvasSubject()->progressDisplay()->setSubject( this, true, false /* TODO: how to cancel a script ? */ ); } -void KisScriptProgress::setProgressTotalSteps(Q_INT32 totalSteps) +void KisScriptProgress::setProgressTotalSteps(TQ_INT32 totalSteps) { m_progressTotalSteps = totalSteps; m_progressSteps = 0; @@ -34,10 +34,10 @@ void KisScriptProgress::setProgressTotalSteps(Q_INT32 totalSteps) emit notifyProgress(0); } -void KisScriptProgress::setProgress(Q_INT32 progress) +void KisScriptProgress::setProgress(TQ_INT32 progress) { m_progressSteps = progress; - Q_INT32 progressPerCent = (m_progressSteps * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1); + TQ_INT32 progressPerCent = (m_progressSteps * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1); if (progressPerCent != m_lastProgressPerCent) { @@ -51,9 +51,9 @@ void KisScriptProgress::incProgress() setProgress( ++m_progressSteps ); } -void KisScriptProgress::setProgressStage(const QString& stage, Q_INT32 progress) +void KisScriptProgress::setProgressStage(const TQString& stage, TQ_INT32 progress) { - Q_INT32 progressPerCent = (progress * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1); + TQ_INT32 progressPerCent = (progress * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1); m_lastProgressPerCent = progress; emit notifyProgressStage( stage, progressPerCent); } diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h index 864a6760..48af433c 100644 --- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h +++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h @@ -38,17 +38,17 @@ class KisScriptProgress : public KisProgressSubject void activateAsSubject(); virtual void cancel() {}; public: - void setProgressTotalSteps(Q_INT32 totalSteps); - void setProgress(Q_INT32 progress); + void setProgressTotalSteps(TQ_INT32 totalSteps); + void setProgress(TQ_INT32 progress); void incProgress(); - void setProgressStage(const QString& stage, Q_INT32 progress); + void setProgressStage(const TQString& stage, TQ_INT32 progress); void progressDone(); - inline void setPackagePath(QString path) { m_packagePath = path; }; - inline QString packagePath() { return m_packagePath; } + inline void setPackagePath(TQString path) { m_packagePath = path; }; + inline TQString packagePath() { return m_packagePath; } private: - Q_INT32 m_progressSteps, m_progressTotalSteps, m_lastProgressPerCent; + TQ_INT32 m_progressSteps, m_progressTotalSteps, m_lastProgressPerCent; KisView * m_view; - QString m_packagePath; + TQString m_packagePath; }; #endif diff --git a/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py b/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py index 4a79e68c..02371826 100644 --- a/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py +++ b/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py @@ -18,7 +18,7 @@ import math -# it's an experimental script to try to reshape histogram, while the results are far to be convincing yet +# it's an experimental script to try to reshape.histogram, while the results are far to be convincing yet # it is still an example on how to use histogram in a script def sign(a): diff --git a/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb b/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb index 9e2f504f..ab5f6205 100644 --- a/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb +++ b/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb @@ -60,11 +60,11 @@ for i in 1..100 painter.setBrush( Krosskritacore::newCircleBrush(rand*20,rand*20,rand*10,rand*10) ) end # paint a point - shape = rand * 7 + tqshape = rand * 7 painter.setStrokeStyle(1) - if( shape < 1 ) + if( tqshape < 1 ) painter.paintAt(rand * width , rand * height,1.1) - elsif(shape < 2 ) + elsif(tqshape < 2 ) xs = Array.new ys = Array.new for i in 0..6 @@ -72,14 +72,14 @@ for i in 1..100 ys[i] = rand*height end painter.paintPolyline(xs,ys) - elsif(shape < 3) + elsif(tqshape < 3) painter.paintLine(rand * width, rand * height, 1.1, rand * width, rand * height,1.1) - elsif(shape < 4) + elsif(tqshape < 4) painter.paintBezierCurve(rand * width, rand * height, 1.1, rand * width, rand * height, rand * width , rand * height, rand * width, rand * height, 1.1) - elsif(shape < 5) + elsif(tqshape < 5) randomizeStyle(painter) painter.paintEllipse(rand * width, rand * height, rand * width, rand * height, 1.1) - elsif(shape < 6) + elsif(tqshape < 6) xs = Array.new ys = Array.new for i in 0..6 @@ -88,7 +88,7 @@ for i in 1..100 end randomizeStyle(painter) painter.paintPolygon(xs, ys) - elsif(shape < 7) + elsif(tqshape < 7) randomizeStyle(painter) painter.paintRect(rand * width, rand * height, rand * width, rand * height, 1.1) end diff --git a/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb b/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb index 67042de2..47216761 100644 --- a/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb +++ b/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb @@ -91,11 +91,11 @@ class TorturePainting painter.setBrush( Krosskritacore::newCircleBrush(rand*20,rand*20,rand*10,rand*10) ) end # paint a point - shape = rand * 7 + tqshape = rand * 7 painter.setStrokeStyle(1) - if( shape < 1 ) + if( tqshape < 1 ) painter.paintAt(rand * @width , rand * @height,1.1) - elsif(shape < 2 ) + elsif(tqshape < 2 ) xs = Array.new ys = Array.new for i in 0..6 @@ -103,14 +103,14 @@ class TorturePainting ys[i] = rand*@height end painter.paintPolyline(xs,ys) - elsif(shape < 3) + elsif(tqshape < 3) painter.paintLine(rand * @width, rand * @height, 1.1, rand * @width, rand * @height,1.1) - elsif(shape < 4) + elsif(tqshape < 4) painter.paintBezierCurve(rand * @width, rand * @height, 1.1, rand * @width, rand * @height, rand * @width , rand * @height, rand * @width, rand * @height, 1.1) - elsif(shape < 5) + elsif(tqshape < 5) randomizeStyle(painter) painter.paintEllipse(rand * @width, rand * @height, rand * @width, rand * @height, 1.1) - elsif(shape < 6) + elsif(tqshape < 6) xs = Array.new ys = Array.new for i in 0..6 @@ -119,7 +119,7 @@ class TorturePainting end randomizeStyle(painter) painter.paintPolygon(xs, ys) - elsif(shape < 7) + elsif(tqshape < 7) randomizeStyle(painter) painter.paintRect(rand * @width, rand * @height, rand * @width, rand * @height, 1.1) end diff --git a/krita/plugins/viewplugins/scripting/scripting.cc b/krita/plugins/viewplugins/scripting/scripting.cc index d7f5fde7..210b8eff 100644 --- a/krita/plugins/viewplugins/scripting/scripting.cc +++ b/krita/plugins/viewplugins/scripting/scripting.cc @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -54,36 +54,36 @@ typedef KGenericFactory KritaScriptingFactory; K_EXPORT_COMPONENT_FACTORY( kritascripting, KritaScriptingFactory( "krita" ) ) -Scripting::Scripting(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +Scripting::Scripting(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(KritaScriptingFactory::instance()); - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(Scripting::instance()); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; m_scriptguiclient = new Kross::Api::ScriptGUIClient( m_view, m_view ); // m_scriptguiclient ->setXMLFile(locate("data","kritaplugins/scripting.rc"), true); //BEGIN TODO: understand why the ScriptGUIClient doesn't "link" its actions to the menu setXMLFile(locate("data","kritaplugins/scripting.rc"), true); - new KAction(i18n("Execute Script File..."), 0, 0, m_scriptguiclient, SLOT(executeScriptFile()), actionCollection(), "executescriptfile"); - new KAction(i18n("Script Manager..."), 0, 0, m_scriptguiclient, SLOT(showScriptManager()), actionCollection(), "configurescripts"); + new KAction(i18n("Execute Script File..."), 0, 0, m_scriptguiclient, TQT_SLOT(executeScriptFile()), actionCollection(), "executescriptfile"); + new KAction(i18n("Script Manager..."), 0, 0, m_scriptguiclient, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts"); //END TODO - QWidget * w = new Kross::Api::WdgScriptsManager(m_scriptguiclient, m_view); + TQWidget * w = new Kross::Api::WdgScriptsManager(m_scriptguiclient, m_view); m_view->canvasSubject()->paletteManager()->addWidget(w, "Scripts Manager", krita::LAYERBOX, 10, PALETTE_DOCKER, false); - connect(m_scriptguiclient, SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), this, SLOT(executionFinished(const Kross::Api::ScriptAction*))); - connect(m_scriptguiclient, SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), this, SLOT(executionStarted(const Kross::Api::ScriptAction*))); + connect(m_scriptguiclient, TQT_SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), this, TQT_SLOT(executionFinished(const Kross::Api::ScriptAction*))); + connect(m_scriptguiclient, TQT_SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), this, TQT_SLOT(executionStarted(const Kross::Api::ScriptAction*))); KisScriptMonitor::instance()->monitor( m_scriptguiclient ); - Kross::Api::Manager::scriptManager()->addQObject(m_view->canvasSubject()->document(), "KritaDocument"); - Kross::Api::Manager::scriptManager()->addQObject(m_view, "KritaView"); + Kross::Api::Manager::scriptManager()->addTQObject(m_view->canvasSubject()->document(), "KritaDocument"); + Kross::Api::Manager::scriptManager()->addTQObject(m_view, "KritaView"); m_scriptProgress = new KisScriptProgress(m_view); - Kross::Api::Manager::scriptManager()->addQObject(m_scriptProgress, "KritaScriptProgress"); + Kross::Api::Manager::scriptManager()->addTQObject(m_scriptProgress, "KritaScriptProgress"); } @@ -98,7 +98,7 @@ void Scripting::executionFinished(const Kross::Api::ScriptAction*) m_view->canvasSubject()->document()->setModified(true); m_view->canvasSubject()->document()->currentImage()->activeLayer()->setDirty(); m_scriptProgress->progressDone(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void Scripting::executionStarted(const Kross::Api::ScriptAction* act) diff --git a/krita/plugins/viewplugins/scripting/scripting.h b/krita/plugins/viewplugins/scripting/scripting.h index 238483c8..20675043 100644 --- a/krita/plugins/viewplugins/scripting/scripting.h +++ b/krita/plugins/viewplugins/scripting/scripting.h @@ -37,8 +37,9 @@ namespace Kross { class Scripting : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - Scripting(QObject *parent, const char *name, const QStringList &); + Scripting(TQObject *tqparent, const char *name, const TQStringList &); virtual ~Scripting(); private slots: void executionFinished(const Kross::Api::ScriptAction*); diff --git a/krita/plugins/viewplugins/selectopaque/selectopaque.cc b/krita/plugins/viewplugins/selectopaque/selectopaque.cc index cfbcb4e7..c83250ee 100644 --- a/krita/plugins/viewplugins/selectopaque/selectopaque.cc +++ b/krita/plugins/viewplugins/selectopaque/selectopaque.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -53,15 +53,15 @@ typedef KGenericFactory SelectOpaqueFactory; K_EXPORT_COMPONENT_FACTORY( kritaselectopaque, SelectOpaqueFactory( "krita" ) ) -SelectOpaque::SelectOpaque(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +SelectOpaque::SelectOpaque(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if (parent->inherits("KisView")) { + if (tqparent->inherits("KisView")) { setInstance(SelectOpaqueFactory::instance()); setXMLFile(locate("data","kritaplugins/selectopaque.rc"), true); - m_view = dynamic_cast(parent); - m_view->canvasSubject()->selectionManager()->addSelectionAction( new KAction(i18n("&Select All Opaque Pixels..."), 0, 0, this, SLOT(slotActivated()), actionCollection(), "selectopaque") ); + m_view = dynamic_cast(tqparent); + m_view->canvasSubject()->selectionManager()->addSelectionAction( new KAction(i18n("&Select All Opaque Pixels..."), 0, 0, this, TQT_SLOT(slotActivated()), actionCollection(), "selectopaque") ); } } @@ -76,11 +76,11 @@ void SelectOpaque::slotActivated() KisPaintDeviceSP layer = m_view->canvasSubject()->currentImg()->activeDevice(); if (!layer) return; - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); if (layer->image()->undo()) transaction = new KisSelectedTransaction(i18n("Select Opaque Pixels"), layer); // XXX: Multithread this! - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; layer->exactBounds(x, y, w, h); KisColorSpace * cs = layer->colorSpace(); @@ -104,7 +104,7 @@ void SelectOpaque::slotActivated() hiter.nextRow(); selIter.nextRow(); } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); layer->setDirty(); layer->emitSelectionChanged(); diff --git a/krita/plugins/viewplugins/selectopaque/selectopaque.h b/krita/plugins/viewplugins/selectopaque/selectopaque.h index 5215ecfe..86c66945 100644 --- a/krita/plugins/viewplugins/selectopaque/selectopaque.h +++ b/krita/plugins/viewplugins/selectopaque/selectopaque.h @@ -28,8 +28,9 @@ class KisView; class SelectOpaque : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - SelectOpaque(QObject *parent, const char *name, const QStringList &); + SelectOpaque(TQObject *tqparent, const char *name, const TQStringList &); virtual ~SelectOpaque(); private slots: diff --git a/krita/plugins/viewplugins/separate_channels/dlg_separate.cc b/krita/plugins/viewplugins/separate_channels/dlg_separate.cc index 760786ec..cb1d8322 100644 --- a/krita/plugins/viewplugins/separate_channels/dlg_separate.cc +++ b/krita/plugins/viewplugins/separate_channels/dlg_separate.cc @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -32,26 +32,26 @@ #include "dlg_separate.h" #include "wdg_separations.h" -DlgSeparate::DlgSeparate( const QString & imageCS, - const QString & layerCS, - QWidget * parent, +DlgSeparate::DlgSeparate( const TQString & imageCS, + const TQString & layerCS, + TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Separate Image"), Ok | Cancel, Ok), + : super (tqparent, name, true, i18n("Separate Image"), Ok | Cancel, Ok), m_imageCS(imageCS), m_layerCS(layerCS) { m_page = new WdgSeparations(this, "separate_image"); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); m_page->lblColormodel->setText(layerCS); m_page->grpOutput->hide(); - connect(m_page->grpSource, SIGNAL(clicked(int)), this, SLOT(slotSetColorSpaceLabel(int))); - connect(m_page->chkColors, SIGNAL(toggled(bool)), m_page->chkDownscale, SLOT(setDisabled(bool))); + connect(m_page->grpSource, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSetColorSpaceLabel(int))); + connect(m_page->chkColors, TQT_SIGNAL(toggled(bool)), m_page->chkDownscale, TQT_SLOT(setDisabled(bool))); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } DlgSeparate::~DlgSeparate() diff --git a/krita/plugins/viewplugins/separate_channels/dlg_separate.h b/krita/plugins/viewplugins/separate_channels/dlg_separate.h index 08432014..cf871566 100644 --- a/krita/plugins/viewplugins/separate_channels/dlg_separate.h +++ b/krita/plugins/viewplugins/separate_channels/dlg_separate.h @@ -32,10 +32,11 @@ class WdgSeparations; class DlgSeparate: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgSeparate(const QString & imageCS, const QString & layerCS, QWidget * parent = 0, + DlgSeparate(const TQString & imageCS, const TQString & layerCS, TQWidget * tqparent = 0, const char* name = 0); ~DlgSeparate(); @@ -59,8 +60,8 @@ private slots: private: WdgSeparations * m_page; - QString m_imageCS; - QString m_layerCS; + TQString m_imageCS; + TQString m_layerCS; }; diff --git a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc index 75622312..3747f485 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc +++ b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc @@ -83,9 +83,9 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS KisColorSpace * dstCs = 0; - Q_UINT32 numberOfChannels = src->nChannels(); + TQ_UINT32 numberOfChannels = src->nChannels(); KisColorSpace * srcCs = src->colorSpace(); - QValueVector channels = srcCs->channels(); + TQValueVector channels = srcCs->channels(); // Use the flattened image, if required switch(sourceOps) { @@ -99,15 +99,15 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS vKisPaintDeviceSP layers; - QValueVector::const_iterator begin = channels.begin(); - QValueVector::const_iterator end = channels.end(); + TQValueVector::const_iterator begin = channels.begin(); + TQValueVector::const_iterator end = channels.end(); - QRect rect = src->exactBounds(); + TQRect rect = src->exactBounds(); int i = 0; - Q_UINT32 channelIndex = 0; - for (QValueVector::const_iterator it = begin; it != end; ++it, ++channelIndex) + TQ_UINT32 channelIndex = 0; + for (TQValueVector::const_iterator it = begin; it != end; ++it, ++channelIndex) { KisChannelInfo * ch = (*it); @@ -116,9 +116,9 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS continue; } - Q_INT32 channelSize = ch->size(); - Q_INT32 channelPos = ch->pos(); - Q_INT32 destSize = 1; + TQ_INT32 channelSize = ch->size(); + TQ_INT32 channelPos = ch->pos(); + TQ_INT32 destSize = 1; KisPaintDeviceSP dev; if (toColor) { @@ -139,7 +139,7 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS layers.push_back(dev); - for (Q_INT32 row = 0; row < rect.height(); ++row) { + for (TQ_INT32 row = 0; row < rect.height(); ++row) { KisHLineIteratorPixel srcIt = src->createHLineIterator(rect.x(), rect.y() + row, rect.width(), false); KisHLineIteratorPixel dstIt = dev->createHLineIterator(rect.x(), rect.y() + row, rect.width(), true); @@ -238,7 +238,7 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS break; } - for (QValueVector::const_iterator it = begin; it != end; ++it) + for (TQValueVector::const_iterator it = begin; it != end; ++it) { KisChannelInfo * ch = (*it); @@ -253,10 +253,10 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS image->addLayer( dynamic_cast(l.data()), image->rootLayer(), 0); } else { - QStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); - QString mimelist = listMimeFilter.join(" "); + TQStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); + TQString mimelist = listMimeFilter.join(" "); - KFileDialog fd (QString::null, mimelist, m_view, "Export Layer", true); + KFileDialog fd (TQString(), mimelist, m_view, "Export Layer", true); fd.setCaption(i18n("Export Layer") + "(" + ch->name() + ")"); fd.setMimeFilter(listMimeFilter); fd.setOperationMode(KFileDialog::Saving); @@ -264,13 +264,13 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS if (!fd.exec()) return; KURL url = fd.selectedURL(); - QString mimefilter = fd.currentMimeFilter(); + TQString mimefilter = fd.currentMimeFilter(); if (url.isEmpty()) return; KisPaintLayerSP l = new KisPaintLayer( image, ch->name(), OPACITY_OPAQUE, *deviceIt); - QRect r = l->exactBounds(); + TQRect r = l->exactBounds(); KisDoc d; d.prepareForImport(); diff --git a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h index 0c0d80c9..d8bf777e 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h +++ b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h @@ -48,6 +48,7 @@ enum enumSepOutput { class KisChannelSeparator : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: diff --git a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc index 4f7134f8..2edc9b36 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc +++ b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc @@ -39,15 +39,15 @@ K_EXPORT_COMPONENT_FACTORY( kritaseparatechannels, KGenericFactory( "krita" ) ) -KisSeparateChannelsPlugin::KisSeparateChannelsPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KisSeparateChannelsPlugin::KisSeparateChannelsPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) { + if ( tqparent->inherits("KisView") ) { setInstance(KGenericFactory::instance()); setXMLFile(locate("data","kritaplugins/imageseparate.rc"), true); - m_view = (KisView*) parent; - (void) new KAction(i18n("Separate Image..."), 0, 0, this, SLOT(slotSeparate()), actionCollection(), "separate"); + m_view = (KisView*) tqparent; + (void) new KAction(i18n("Separate Image..."), 0, 0, this, TQT_SLOT(slotSeparate()), actionCollection(), "separate"); } } @@ -77,7 +77,7 @@ void KisSeparateChannelsPlugin::slotSeparate() dlgSeparate->enableDownscale(false); } - if (dlgSeparate->exec() == QDialog::Accepted) { + if (dlgSeparate->exec() == TQDialog::Accepted) { KisChannelSeparator separator(m_view); separator.separate(m_view->canvasSubject()->progressDisplay(), diff --git a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h index a4a4fd61..0c62dcaf 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h +++ b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h @@ -29,8 +29,9 @@ class KisView; class KisSeparateChannelsPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KisSeparateChannelsPlugin(QObject *parent, const char *name, const QStringList &); + KisSeparateChannelsPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisSeparateChannelsPlugin(); private slots: diff --git a/krita/plugins/viewplugins/separate_channels/wdg_separations.ui b/krita/plugins/viewplugins/separate_channels/wdg_separations.ui index 6c7a8cf7..0593258b 100644 --- a/krita/plugins/viewplugins/separate_channels/wdg_separations.ui +++ b/krita/plugins/viewplugins/separate_channels/wdg_separations.ui @@ -1,6 +1,6 @@ WdgSeparations - + WdgSeparations @@ -16,7 +16,7 @@ unnamed - + chkColors @@ -24,7 +24,7 @@ Output to color, not grayscale - + chkDownscale @@ -32,7 +32,7 @@ Downscale to 8-bit before separating - + grpAlpha @@ -43,7 +43,7 @@ unnamed - + radioCopyAlpha @@ -51,7 +51,7 @@ Copy alpha channel to each separated channel as an alpha channel - + radioDiscardAlpha @@ -62,7 +62,7 @@ true - + radioSeparateAlpha @@ -82,14 +82,14 @@ Expanding - + 20 16 - + grpSource @@ -100,7 +100,7 @@ unnamed - + radioCurrentLayer @@ -111,7 +111,7 @@ true - + radioAllLayers @@ -121,7 +121,7 @@ - + grpOutput @@ -132,7 +132,7 @@ unnamed - + radioLayers @@ -143,7 +143,7 @@ true - + radioImages @@ -153,7 +153,7 @@ - + lblColormodel @@ -161,7 +161,7 @@ - + textLabel1 @@ -178,5 +178,5 @@ chkDownscale chkColors - + diff --git a/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc b/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc index 9a6a2f66..896a947a 100644 --- a/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc +++ b/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc @@ -26,10 +26,10 @@ using namespace std; -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,21 +39,21 @@ using namespace std; #include "wdg_shearimage.h" -DlgShearImage::DlgShearImage( QWidget * parent, +DlgShearImage::DlgShearImage( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Shear Image"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Shear Image"), Ok | Cancel, Ok) { m_lock = false; m_page = new WdgShearImage(this, "shear_image"); - m_page->layout()->setMargin(0); + m_page->tqlayout()->setMargin(0); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } @@ -62,28 +62,28 @@ DlgShearImage::~DlgShearImage() delete m_page; } -void DlgShearImage::setAngleX(Q_UINT32 angle) +void DlgShearImage::setAngleX(TQ_UINT32 angle) { m_page->shearAngleX->setValue(angle); m_oldAngle = angle; } -void DlgShearImage::setAngleY(Q_UINT32 angle) +void DlgShearImage::setAngleY(TQ_UINT32 angle) { m_page->shearAngleY->setValue(angle); m_oldAngle = angle; } -Q_INT32 DlgShearImage::angleX() +TQ_INT32 DlgShearImage::angleX() { - return (Q_INT32)qRound(m_page->shearAngleX->value()); + return (TQ_INT32)tqRound(m_page->shearAngleX->value()); } -Q_INT32 DlgShearImage::angleY() +TQ_INT32 DlgShearImage::angleY() { - return (Q_INT32)qRound(m_page->shearAngleY->value()); + return (TQ_INT32)tqRound(m_page->shearAngleY->value()); } // SLOTS diff --git a/krita/plugins/viewplugins/shearimage/dlg_shearimage.h b/krita/plugins/viewplugins/shearimage/dlg_shearimage.h index 183f166a..b5ed0e7f 100644 --- a/krita/plugins/viewplugins/shearimage/dlg_shearimage.h +++ b/krita/plugins/viewplugins/shearimage/dlg_shearimage.h @@ -27,17 +27,18 @@ class WdgShearImage; class DlgShearImage: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgShearImage(QWidget * parent = 0, + DlgShearImage(TQWidget * tqparent = 0, const char* name = 0); ~DlgShearImage(); - void setAngleX(Q_UINT32 w); - void setAngleY(Q_UINT32 w); - Q_INT32 angleX(); - Q_INT32 angleY(); + void setAngleX(TQ_UINT32 w); + void setAngleY(TQ_UINT32 w); + TQ_INT32 angleX(); + TQ_INT32 angleY(); private slots: diff --git a/krita/plugins/viewplugins/shearimage/shearimage.cc b/krita/plugins/viewplugins/shearimage/shearimage.cc index d8c839ce..83792762 100644 --- a/krita/plugins/viewplugins/shearimage/shearimage.cc +++ b/krita/plugins/viewplugins/shearimage/shearimage.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -51,18 +51,18 @@ typedef KGenericFactory ShearImageFactory; K_EXPORT_COMPONENT_FACTORY( kritashearimage, ShearImageFactory( "krita" ) ) // XXX: this plugin could also provide layer scaling/resizing -ShearImage::ShearImage(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ShearImage::ShearImage(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(ShearImageFactory::instance()); setXMLFile(locate("data","kritaplugins/shearimage.rc"), true); - (void) new KAction(i18n("&Shear Image..."), 0, 0, this, SLOT(slotShearImage()), actionCollection(), "shearimage"); - (void) new KAction(i18n("&Shear Layer..."), 0, 0, this, SLOT(slotShearLayer()), actionCollection(), "shearlayer"); + (void) new KAction(i18n("&Shear Image..."), 0, 0, this, TQT_SLOT(slotShearImage()), actionCollection(), "shearimage"); + (void) new KAction(i18n("&Shear Layer..."), 0, 0, this, TQT_SLOT(slotShearLayer()), actionCollection(), "shearlayer"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; } } @@ -82,9 +82,9 @@ void ShearImage::slotShearImage() dlgShearImage->setCaption(i18n("Shear Image")); - if (dlgShearImage->exec() == QDialog::Accepted) { - Q_INT32 angleX = dlgShearImage->angleX(); - Q_INT32 angleY = dlgShearImage->angleY(); + if (dlgShearImage->exec() == TQDialog::Accepted) { + TQ_INT32 angleX = dlgShearImage->angleX(); + TQ_INT32 angleY = dlgShearImage->angleY(); m_view->shearCurrentImage(angleX, angleY); } delete dlgShearImage; @@ -101,9 +101,9 @@ void ShearImage::slotShearLayer() dlgShearImage->setCaption(i18n("Shear Layer")); - if (dlgShearImage->exec() == QDialog::Accepted) { - Q_INT32 angleX = dlgShearImage->angleX(); - Q_INT32 angleY = dlgShearImage->angleY(); + if (dlgShearImage->exec() == TQDialog::Accepted) { + TQ_INT32 angleX = dlgShearImage->angleX(); + TQ_INT32 angleY = dlgShearImage->angleY(); m_view->shearLayer(angleX, angleY); } diff --git a/krita/plugins/viewplugins/shearimage/shearimage.h b/krita/plugins/viewplugins/shearimage/shearimage.h index bfff2ac2..73ee8908 100644 --- a/krita/plugins/viewplugins/shearimage/shearimage.h +++ b/krita/plugins/viewplugins/shearimage/shearimage.h @@ -27,8 +27,9 @@ class KisView; class ShearImage : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ShearImage(QObject *parent, const char *name, const QStringList &); + ShearImage(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ShearImage(); private slots: diff --git a/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui b/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui index 20de0b6b..d63b58f5 100644 --- a/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui +++ b/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui @@ -1,6 +1,6 @@ WdgShearImage - + WdgShearImage @@ -19,7 +19,7 @@ unnamed - + grpPixelDimensions @@ -44,7 +44,7 @@ ° - + lblShearAngelY @@ -56,7 +56,7 @@ shearAngleY - + 32767 100 @@ -72,7 +72,7 @@ ° - + lblShearAngleX @@ -92,7 +92,7 @@ shearAngleX - + knuminput.h knuminput.h diff --git a/krita/plugins/viewplugins/substrate/dlg_substrate.cc b/krita/plugins/viewplugins/substrate/dlg_substrate.cc index d1bbe38f..51de887d 100644 --- a/krita/plugins/viewplugins/substrate/dlg_substrate.cc +++ b/krita/plugins/viewplugins/substrate/dlg_substrate.cc @@ -24,19 +24,19 @@ #include "wdgsubstrate.h" -DlgSubstrate::DlgSubstrate( QWidget * parent, +DlgSubstrate::DlgSubstrate( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Color Range"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Color Range"), Ok | Cancel, Ok) { - m_previewPix = QPixmap(); + m_previewPix = TQPixmap(); m_page = new WdgSubstrate(this, "substrate"); Q_CHECK_PTR(m_page); setCaption(i18n("Substrate")); setMainWidget(m_page); resize(m_page -> size()); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } DlgSubstrate::~DlgSubstrate() @@ -44,7 +44,7 @@ DlgSubstrate::~DlgSubstrate() delete m_page; } -void DlgSubstrate::setPixmap(QPixmap pix) +void DlgSubstrate::setPixmap(TQPixmap pix) { m_previewPix = pix; m_previewPix.detach(); diff --git a/krita/plugins/viewplugins/substrate/dlg_substrate.h b/krita/plugins/viewplugins/substrate/dlg_substrate.h index 0a566b11..869eaafa 100644 --- a/krita/plugins/viewplugins/substrate/dlg_substrate.h +++ b/krita/plugins/viewplugins/substrate/dlg_substrate.h @@ -20,7 +20,7 @@ #ifndef DLG_SUBSTRATE #define DLG_SUBSTRATE -#include +#include #include @@ -36,17 +36,18 @@ class DlgSubstrate: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgSubstrate(QWidget * parent = 0, + DlgSubstrate(TQWidget * tqparent = 0, const char* name = 0); ~DlgSubstrate(); /** * Set the initial preview pixmap */ - void setPixmap(QPixmap pix); + void setPixmap(TQPixmap pix); private slots: @@ -55,7 +56,7 @@ private slots: private: WdgSubstrate * m_page; - QPixmap m_previewPix; + TQPixmap m_previewPix; }; #endif // DLG_SUBSTRATE diff --git a/krita/plugins/viewplugins/substrate/kis_repeating_substrate.h b/krita/plugins/viewplugins/substrate/kis_repeating_substrate.h index 9dc512d1..1a229dc1 100644 --- a/krita/plugins/viewplugins/substrate/kis_repeating_substrate.h +++ b/krita/plugins/viewplugins/substrate/kis_repeating_substrate.h @@ -18,7 +18,7 @@ #ifndef KIS_SUBSTRATE_H #define KIS_SUBSTRATE_H -#include +#include #include class KisImage; @@ -55,7 +55,7 @@ public: * Copy the pixel values in the specified rect into an array of Substrate. * Make sure the array is big enough! */ - virtual void getPixels(KisSubstratePixel * /*substrate*/, const QRect & /*rc*/) = 0; + virtual void getPixels(KisSubstratePixel * /*substrate*/, const TQRect & /*rc*/) = 0; /** * Return a pointer to the substrate at the specified position. Note that diff --git a/krita/plugins/viewplugins/substrate/substrate.cc b/krita/plugins/viewplugins/substrate/substrate.cc index aac9ef94..996516e1 100644 --- a/krita/plugins/viewplugins/substrate/substrate.cc +++ b/krita/plugins/viewplugins/substrate/substrate.cc @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include #include #include @@ -44,18 +44,18 @@ typedef KGenericFactory SubstrateFactory; K_EXPORT_COMPONENT_FACTORY( kritasubstrate, SubstrateFactory( "krita" ) ) -SubstratePlugin::SubstratePlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +SubstratePlugin::SubstratePlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(SubstrateFactory::instance()); setXMLFile(locate("data","kritaplugins/substrate.rc"), true); - (void) new KAction(i18n("&Substrate..."), 0, 0, this, SLOT(slotSubstrateActivated()), actionCollection(), "substrate"); + (void) new KAction(i18n("&Substrate..."), 0, 0, this, TQT_SLOT(slotSubstrateActivated()), actionCollection(), "substrate"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; } } @@ -67,7 +67,7 @@ void SubstratePlugin::slotSubstrateActivated() { DlgSubstrate * dlgSubstrate = new DlgSubstrate(m_view, "Substrate"); Q_CHECK_PTR(dlgSubstrate); - if (dlgSubstrate -> exec() == QDialog::Accepted) { + if (dlgSubstrate -> exec() == TQDialog::Accepted) { // Retrieve changes made by dialog // Apply changes to layer (selection) } diff --git a/krita/plugins/viewplugins/substrate/substrate.h b/krita/plugins/viewplugins/substrate/substrate.h index ebb9e48e..2d00e234 100644 --- a/krita/plugins/viewplugins/substrate/substrate.h +++ b/krita/plugins/viewplugins/substrate/substrate.h @@ -28,8 +28,9 @@ class KisView; class SubstratePlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - SubstratePlugin(QObject *parent, const char *name, const QStringList &); + SubstratePlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~SubstratePlugin(); private slots: diff --git a/krita/plugins/viewplugins/substrate/wdgsubstrate.ui b/krita/plugins/viewplugins/substrate/wdgsubstrate.ui index 846b43a7..be0713ed 100644 --- a/krita/plugins/viewplugins/substrate/wdgsubstrate.ui +++ b/krita/plugins/viewplugins/substrate/wdgsubstrate.ui @@ -1,6 +1,6 @@ WdgSubstrate - + Form1 @@ -16,7 +16,7 @@ unnamed - + grpCustom @@ -27,15 +27,15 @@ unnamed - + - layout3 + tqlayout3 unnamed - + Custom @@ -53,7 +53,7 @@ - + textLabel1 @@ -61,7 +61,7 @@ Save custom substrate as: - + lblPredefined @@ -72,7 +72,7 @@ cmbPredefinedCanvases - + lblColor @@ -83,22 +83,22 @@ bnBackground - + lineEdit1 - + - layout2 + tqlayout2 unnamed - + slAbsorbency @@ -106,7 +106,7 @@ Horizontal - + slFiber @@ -114,7 +114,7 @@ Horizontal - + textLabel9 @@ -122,7 +122,7 @@ Grainy - + lblSmoothness @@ -133,7 +133,7 @@ slSlippery - + lblAbsorbency @@ -144,7 +144,7 @@ slAbsorbency - + slSlippery @@ -152,7 +152,7 @@ Horizontal - + lblHeight @@ -163,7 +163,7 @@ slHeight - + lblFiber @@ -174,7 +174,7 @@ slFiber - + lblRough @@ -182,7 +182,7 @@ Rough - + slHeight @@ -190,7 +190,7 @@ Horizontal - + textLabel11 @@ -198,7 +198,7 @@ Absorbent - + textLabel10 @@ -214,7 +214,7 @@ - + kcolorbutton.h diff --git a/krita/plugins/viewplugins/variations/dlg_variations.cc b/krita/plugins/viewplugins/variations/dlg_variations.cc index 7d81b078..c4c27275 100644 --- a/krita/plugins/viewplugins/variations/dlg_variations.cc +++ b/krita/plugins/viewplugins/variations/dlg_variations.cc @@ -24,19 +24,19 @@ #include "wdg_variations.h" -DlgVariations::DlgVariations( QWidget * parent, +DlgVariations::DlgVariations( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Color Range"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Color Range"), Ok | Cancel, Ok) { - m_previewPix = QPixmap(); + m_previewPix = TQPixmap(); m_page = new WdgVariations(this, "variations"); Q_CHECK_PTR(m_page); setCaption(i18n("Variations")); setMainWidget(m_page); resize(m_page -> size()); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } DlgVariations::~DlgVariations() @@ -44,7 +44,7 @@ DlgVariations::~DlgVariations() delete m_page; } -void DlgVariations::setPixmap(QPixmap pix) +void DlgVariations::setPixmap(TQPixmap pix) { m_previewPix = pix; m_previewPix.detach(); diff --git a/krita/plugins/viewplugins/variations/dlg_variations.h b/krita/plugins/viewplugins/variations/dlg_variations.h index 48538687..b3844dfd 100644 --- a/krita/plugins/viewplugins/variations/dlg_variations.h +++ b/krita/plugins/viewplugins/variations/dlg_variations.h @@ -20,7 +20,7 @@ #ifndef DLG_VARIATIONS #define DLG_VARIATIONS -#include +#include #include @@ -36,17 +36,18 @@ class DlgVariations: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgVariations(QWidget * parent = 0, + DlgVariations(TQWidget * tqparent = 0, const char* name = 0); ~DlgVariations(); /** * Set the initial preview pixmap */ - void setPixmap(QPixmap pix); + void setPixmap(TQPixmap pix); private slots: @@ -55,7 +56,7 @@ private slots: private: WdgVariations * m_page; - QPixmap m_previewPix; + TQPixmap m_previewPix; }; #endif // DLG_VARIATIONS diff --git a/krita/plugins/viewplugins/variations/variations.cc b/krita/plugins/viewplugins/variations/variations.cc index eef4d6e5..6f9fbf6f 100644 --- a/krita/plugins/viewplugins/variations/variations.cc +++ b/krita/plugins/viewplugins/variations/variations.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -48,18 +48,18 @@ typedef KGenericFactory VariationsFactory; K_EXPORT_COMPONENT_FACTORY( kritavariations, VariationsFactory( "krita" ) ) -Variations::Variations(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +Variations::Variations(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(VariationsFactory::instance()); setXMLFile(locate("data","kritaplugins/variations.rc"), true); - (void) new KAction(i18n("&Variations..."), 0, 0, this, SLOT(slotVariationsActivated()), actionCollection(), "variations"); + (void) new KAction(i18n("&Variations..."), 0, 0, this, TQT_SLOT(slotVariationsActivated()), actionCollection(), "variations"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; } } @@ -71,13 +71,13 @@ void Variations::slotVariationsActivated() { DlgVariations * dlgVariations = new DlgVariations(m_view, "Variations"); Q_CHECK_PTR(dlgVariations); - // Render layer to a QIMage -- keep in mind possibility of selection + // Render layer to a TQIMage -- keep in mind possibility of selection - // Scale QImage + // Scale TQImage - // Set original QImage in dialog + // Set original TQImage in dialog - if (dlgVariations -> exec() == QDialog::Accepted) { + if (dlgVariations -> exec() == TQDialog::Accepted) { // Retrieve changes made by dialog // Apply changes to layer (selection) } diff --git a/krita/plugins/viewplugins/variations/variations.h b/krita/plugins/viewplugins/variations/variations.h index 7aa40daf..d5ddc684 100644 --- a/krita/plugins/viewplugins/variations/variations.h +++ b/krita/plugins/viewplugins/variations/variations.h @@ -28,8 +28,9 @@ class KisView; class Variations : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - Variations(QObject *parent, const char *name, const QStringList &); + Variations(TQObject *tqparent, const char *name, const TQStringList &); virtual ~Variations(); private slots: diff --git a/krita/plugins/viewplugins/variations/wdg_variations.ui b/krita/plugins/viewplugins/variations/wdg_variations.ui index e6d8336d..191b84bb 100644 --- a/krita/plugins/viewplugins/variations/wdg_variations.ui +++ b/krita/plugins/viewplugins/variations/wdg_variations.ui @@ -1,6 +1,6 @@ WdgVariations - + WdgVariations @@ -23,7 +23,7 @@ Variations - + framePreview @@ -52,7 +52,7 @@ unnamed - + lblOriginal @@ -64,13 +64,13 @@ 0 - + 150 150 - + 150 150 @@ -83,7 +83,7 @@ true - + lblCurrentPick @@ -95,13 +95,13 @@ 0 - + 150 150 - + 150 150 @@ -114,31 +114,31 @@ true - + textLabel4 Current Pick - + AlignCenter - + textLabel3 Original - + AlignCenter - + grpOptions @@ -157,7 +157,7 @@ unnamed - + radioShadows @@ -165,7 +165,7 @@ &Shadows - + radioMidtones @@ -176,7 +176,7 @@ true - + radioHighlights @@ -184,7 +184,7 @@ &Highlights - + radioSaturation @@ -192,7 +192,7 @@ &Saturation - + chkClipping @@ -200,7 +200,7 @@ Show &clipping - + slider1 @@ -208,7 +208,7 @@ Horizontal - + lblFine @@ -216,7 +216,7 @@ Fine - + lblCoars @@ -226,9 +226,9 @@ - + - layout5 + tqlayout5 @@ -242,7 +242,7 @@ unnamed - + bnLoad @@ -250,7 +250,7 @@ &Load... - + bnSave @@ -268,14 +268,14 @@ Expanding - + 20 187 - + frameLight @@ -287,7 +287,7 @@ 0 - + 32767 556 @@ -310,7 +310,7 @@ unnamed - + lblLighter @@ -322,13 +322,13 @@ 0 - + 150 150 - + 150 150 @@ -341,18 +341,18 @@ true - + textLabel12 Lighter - + AlignCenter - + lblCurrentPick3 @@ -364,13 +364,13 @@ 0 - + 150 150 - + 150 150 @@ -383,18 +383,18 @@ true - + textLabel13 Current Pick - + AlignCenter - + lblDarker @@ -406,13 +406,13 @@ 0 - + 150 150 - + 150 150 @@ -425,14 +425,14 @@ true - + textLabel14 Darker - + AlignCenter @@ -440,7 +440,7 @@ - + frameColor @@ -460,13 +460,13 @@ 0 - + 540 556 - + 540 556 @@ -485,7 +485,7 @@ Plain - + lblMoreCyan @@ -497,13 +497,13 @@ 150 - + 150 150 - + 150 150 @@ -516,7 +516,7 @@ true - + textLabel9 @@ -531,11 +531,11 @@ More Red - + AlignCenter - + textLabel7 @@ -550,11 +550,11 @@ More Cyan - + AlignCenter - + lblMoreBlue @@ -574,13 +574,13 @@ 0 - + 150 150 - + 150 150 @@ -593,7 +593,7 @@ true - + textLabel5 @@ -608,11 +608,11 @@ More Green - + AlignCenter - + lblMoreRed @@ -632,13 +632,13 @@ 0 - + 150 150 - + 150 150 @@ -651,7 +651,7 @@ true - + lblMoreYellow @@ -671,13 +671,13 @@ 0 - + 150 150 - + 150 150 @@ -690,7 +690,7 @@ true - + lblMoreMagenta @@ -710,13 +710,13 @@ 0 - + 150 150 - + 150 150 @@ -729,7 +729,7 @@ true - + textLabel8 @@ -744,11 +744,11 @@ Current Pick - + AlignCenter - + textLabel6 @@ -763,11 +763,11 @@ More Yellow - + AlignCenter - + lblCurrentPick2 @@ -787,13 +787,13 @@ 0 - + 150 150 - + 150 150 @@ -809,7 +809,7 @@ true - + lblMoreGreen @@ -829,13 +829,13 @@ 0 - + 150 150 - + 150 150 @@ -848,7 +848,7 @@ true - + textLabel11 @@ -863,11 +863,11 @@ More Magenta - + AlignCenter - + textLabel10 @@ -882,7 +882,7 @@ More Blue - + AlignCenter @@ -893,5 +893,5 @@ 789cccbd47b7eb38b2ef397f9fa2d6e5ecae5e7cf266d0035266cb6da7ed77af1ed07b2f1aa9bf7c83883f704c56d5cd7c75bb5f95d6c9ca5f8a22114044202200f0fccffffcdbe7d3fddffef37ffe8fea625c02eb6f966f947ffb4fbb4e92ebfff57fff9fffcffff88fe160f0b7fecf68389bfe6df41fffc7fff80febf96fd6df9401ff5fcff64232ffde36244f7a762ac953fefd56f29cf35cf2a267f3072ff9f733c906e7836493f35eb2c59fd74ab6797b1f243bfcfb46b2cb7fef0a1e72799c5af2907f7f94cce5732cc963fefd483297cf3a8387d43f992999ffde0c25f3dfb79a64de5f662099dfcfe924cf386f24f3fe4a44ff0fd17e5b327f9e772799dfcfb8078fa87d662499cbebbb9249de6fc9bcbd9d2f99dab795ccc7b31a48e6e3b71a4ae6e315ed25f3f1b04f82a93f0dc1636a9ff32999daf32599f757a54ae6fde17e48e6fae23892b97e78a2bd63ea1f438cef849e97e892f9f7652b99b76f3d91cce53763f0947e6f08fd9c1137b664de5e43c83fc7f53bf0022cf475499c8be719c4f113d824de5cc01671fd0eb6895dbaff50d8ab174ae6f2ad3ac9a47f63c924df4832d73f732a99f777f324998fb73993ccfb5f7f96ccc7df3a49e6e3514592b9bd3aa664ae1fd6bd646eaf9a2b98f4ddf52573fdb58e60d89f6d49e6df9b13c97c3c1d45326fbf634826ffb2934cfee40086fdf88164de7ff65232d9eb9b646e1fa607867e9bbe641a8f816092cf14f2423f4d070c7d8b9f25f3e7bbaf60e89fb791ccfb3b15df43ffe22f30f42f13f240ffea1b18fab716bf877ee967b043dc92bf1f0ea16fdd9af3a8f740bc3dbe64f2f70bc9bcbfcd2fc9bcbfbd4432f90b4730f5cff55e3297bfc9c0187f732899f4772099c6e35b321f7f6b0fc6f8daa6649aff7692f9f3724d32d7f7cb4932ef6ffb4e32e9b302c6f86723c9dcdefc50326f9ff32e99f7975382a10fd75c32d7e795906742fdd3bd49e6df67a2bdd09ff20886beb89164fefcd54932ef9ffa2c98fca72bda0b7d6a9f25f3feb0c4f842bf9a07b0d02fd13fd0afe2090cffd6c660e85b24ae87be05a40f63e1df8277c9bc7debab643e5e575732efef6e2799cb1bfcf89ecbdbed2573fd5cfd781e1fcf952d98fa3b91cf277f74cd24f3fe0f3ec08807ba8d64ae9fc54232e98f27993faff9f13df787ae680ff4d57995cce57103c95c7fac3bc97c7c7c5f308d67b8028bf9f72299cbd3dc49e6f2981f92797fd69664de5f7e2499dbb33b92ccdb6f2dc1d067772099fca72e99b7ff6a49a6f946f437f4b9bd48267934b0d0ef77c9bc7dad68df9cee9fee25f3fe69447fcc31df88f1843eaf6e92f9f3da89649a0fee25f3f1cb85be41ff0331bed07f5f8ca7f0a7d43f13a1df9d2a99f777f32899dfffea80111faeae92b93cee41f090f7effa0c463ce77f48a6f9ee51321fafeb4930f547bb01433fecb164fe7cff5b321f2f2f92ccfb3f93d793bd745b30f421ae2593bfd94be6fd1b2692b93cde4e32b79fda164ced8ddec1d017e74332f9dbb564de5e772899e299140c7dcaa692b93db8df92797fe61d18fe3117e303fd59b792e979b164de3f8918ff05f5cf46f40ff4c715e301fdb9bd80e13f57f792797fad4a30fce906bf17f3f51ae331c4fc19a13d43f89780e693a9f0a7ed028cebfd4e321fafe6198c7cc00b2473f9bc77c95cdf4a4ff0908fc75a5c8f78bfb52553fcf02999ebbfdf08a6f10e5ec1c2bfdc49a6f97c2b99e6ff27c9642f3fbee7fab416f2407fc299643efe912f99ec692099cbd3b492b9bc9ab8ff94c63711fd0bfdb2a792c93e2ac9140f689229df5125f3feed5660e85ffd2a99fce34432efdfee00867e5e14c9941f8ec0d0bfcc904cf9572a99b7a76e25f3fe73c760a1afaa646ebf99e85fe86f2ec61bfaea0b79e11f0ba12f2eda8bfb4b7d267b98897c64dd81a1cfeb503297afbd934cf1d45e30fc93f81ef363b896ccefbf3a4a26793dc1149fae7d30f247ff2a99ea1d3fbee7fed68b05a31eb1924cf9c2083ca5f6076bc9542fd948e6fa900e2473fdbbbc09463d630246be1a6692f9f84481643edef95532b73f5df01cfd7993ccdb7be92453beb5924cf3c14432efbf5cfc7e01fffa2999e6bfb1646e5f9b022ce2cba364de3e37114cfec132c0d047f74d32f9e37b30f26b2f05431f5763c9bc7f42c1d04797e6cf99d0c71be41fc21fa52a18fe24207d9f0bfd5a1d04d3f8570fe009d573dca3642e7fbb054f697ca237c1246f3a944cf53a5b32c5a72f60f81bd796ccaf4f2bc994af2d2593be6f2453bea682e7345eed4e32d5ff14c9bcbf2f57c95cff7dd15ef8a35097ccdb93cd25537e2bfa6b3124fffd055ec2bfcc24537c548045fe518331decda7647ebd2eda6ba37fc478c01f6d44ffb8d43e1ded17e3af3960cc97f5022cf481e257a6dd149fd96bf08cc6ffe64aa6f92604c35eec4032b7efab2799e2375b30e94b2aae5f50ff58aa642e6fe148a67ce1065e927fb80d2553bd2494cc9fdf3e49a6fc45c863c07e1dc97cfcd3a3606a5f7d05633e887682497faf4bb08df8e2030cfb2bc9de17a2ff4bf49f886762f4cf10f666bd80618f3e8dff92f5177f5e914be6ed2f36e005c91b5f24533cf22598ecafeec04be467ae64f28757b041bfaf5f040f29fe68c0268d9726da63917e14a2bdd0c7f424998f5f44fdb314fd91bf83a18f8105467fdc4660e86783e789fee94a30e215e3118c78a3a0f9dc60fd45fa34072f491fc329d8a0f685a964aae7dfc0265d5f2f05537f568f60d86bb091ccfbe36248e6fad988dfbba85f8e24533e48f66f88fe892b30fa67634ba6f97508467f6d1cb0a827435ed11f35fa6388f9c9a7f8c814f157fd065e92fe5f6e6083e42f5cb0897ac417d8227dca3fc036f55fb305431fba77c1747f3b02bba4df3ad9ab29e42f669229df46fb647fe460d8d3aa0243fecd2758d4bbefc0a21eb403a33f2a8a772c263f6fff35055ba827d1f85aa2bf2f1a58f4f70a8cfb252a18febdf1c0f02701f58f2dda7f5d48a6fe9b8071fff21d2cfc83603caf51c1b87fb106433f4b1a1f87fd17eebf1b17ec903efbd43e46b0f71a0c79cb2d58c4e72d18cf2f1bb078be0dc6f3339abf5cd11f8906c6f5de1a8cf846e3f6c1cbe724df068cf6548964ae3f1b130c7f9096608c7f7603a3bde90e8ce7bb2f60b4d77e00c39f075c9f98f639e47fa34832d7e7f84c2c9eb7ba80216ffb08c6f3cc042cd64f1a30e42f9760d88fe382d19e1ced19c11e42aebf0cf17cd306435ecb04a33d610e16f20b16f1470a16ed3981457cf9443c82bdae2660e19f79bc341c8be7d70e18cfd71ec022df8ac178feaa05e379d72bf108e3df70ff369cc8fe1d8345bc9c81d1fe60452cfaeb7a03c3be74ba7e2adbd382f1fbcb3b18e3910dc1689f4df24e657fd4603cafb2c168bffb0cc6f32b1ebf0c67e2fe01e9d34cdcef1283e12faa6f30ee67f860e1ffe660a1efdc7f0ee7e2fed58c58b6e70cc6ef8d002cd6173db0a83f2dc0d0b78edbf77021e5bd078bf6aec1f87d41fabd14f2155bb0f8fd108cdfeb2330da93de83f1fc8ac6d310f2ac1a309ed772ff3734c5fdb48d64ee0fb72e58d4e75ec0f87d7202a33f0d713df4a5237bb7e4782a60b11ee681d15eed112cee1782a1cf158f4f86b6b8bf6581c5fa2af5a733823f762d30eed7d2efdd11f2efcd1d18d76bdc5e468311f2a3c007e379f5082cea75f760e8fbfa8d782cf49dfba3d150fcbebc030b7bdc83a17f099faf472371ffe64c2ceed73460e883cefb6b3416f7ab4fc463e10f2c30e46b8927e279b94b2cee6f6cc1d087ec092cec4930c6f342f24f85fc46442caef75660e8cf85fb93d18cfd9ec783f1162ceaa37cfe19cdc5fd3ceabfb990d79d80d13eeb152cd64fe9fa85f8de7c05a33df9188cf66cbec0d0c7f50d0c7df3b8ff1f2d85bcce002ce227078ceb1d0f2cfca54e3c41fb6f74bd21ef5780f17c5d058bf53beeaf46e618ebd77a2299c77f5bba9f25c6b7f4c1c2bfbd80d19eeb07f104fda1933cb678de2603e37eba01c6ef6f57b0a8ff71ff3d72c6a8b7e8d47faee88fb507c6effd188cdf3bdc1ec67d38c739e2e3c5a63393e21723269e60fde4f22c99d677b93e307577285eb7b8fd8f27ecfe9cf50e0c7d8a79ff8ca7ec7bfefb6b412cc627db81c57e823730ead9eb1158d43fb8bce399b8fe7a0716eb5d7330c663c3fb733c67eda1fa484d2cc6c39a83a11fed193ca57a651282b13e16f3f96ebc9860bdc8d880c5fe810c2cf21bae8fe3e544d4cb23c93c5ed30a30ea071b170cff92d0f81813d443d71730eaed9a07c6f53eb7b7b1c9bee7fa117c49a6f5024b30c5b3760cb6b19ec9e3adb13331e8face93ccfbaf3883f13c23013ba8a72e05d3fd0d1b8c7c734df23b53d8df86facf9da03e7e1b80f1fc82f7e76430813e6d63e229fa3be5e333194e4cd40b52b04ded31b8fe4e4653110ff2fa0a73a736f28d9a788afd67fa180cfd6a1db0588fe3fe7f32610accfb77c3f59721f2c77c493cc5fe0aaf00e37eb731788afa4e059ed1f8361f60d48f6dde1f93d914ebc7460a46bd2fe4fd37994fc7940f6cbec1e89f98cf5f93a578def5013c433d86da6f4c51bf09b9bd4dcce982f2b39cebcbc49a22fff6b83e4dec29ea15d95932adb704c433acffebf43c776ad1fd039d7886f5d315bf3f5356f09acf77d3d1d4a5fa65734f3cc3fe035d134cf7372c30ec355b824dc413dc3fb0e9906574dcdf79c4e2f74501c6fa5b74104cdfb73c3e9d4ea6d6887f7fdb10b3e791bef1f9940ddf1ceb078fe005f5b7c5e7e3e96c86f58f8d0246fd3a76c1f311f9b377b043e31bf07c693a9fa1de19df816dec07f804bb584fa3fe5accc47a86069e517b82002cd6f775b043f39bc6e3dde9923d8eeb7332035bd47f3705ec60ff824d3cc7fecf84ebefd498c19e2faf609bfa2be6f9f0d49c2d51cff5c016e5fb2b176c8f78fb8b15d8a5fa99c9e7d7a93543fdab1b831dfafde6287844f5d10e8cf1af49bfac39c63bff024f499e98ee6fb3fb937f7d023bd4fed407bb435aafb124d37e2d5d30b53f03cf87d43eeb0d8cf5dd7803c67cb7e1f63d75587f707df1e9fece7c30a2fd5d7b30f6b3469f9269fdc792cce5594dc1587fba52ffb84c1edebecd5e326f7f41faebceb19f2cda8271bfa6133ca2e727e0118d4fb2164cfa9c2892f978af4c30eca1f1c19321d7bf2bff7e3660e34ff5e53bb043cfaf5dc174bf6c0076a97fdb929805acfcfb6d0446bdbee4ed9f0d857eddd660f89b6e2298da5f05c4ac3f687e6bc0c311ad87e07a263f9f0fda77f094da537f8067245fc5f569369a1963d29f2b31eb5fdabfe20ba6e7a777e0d188ff3eb9815906c29fa78227d04f053ca3f6b65c3f6663260fd553a93d2cfca4fec91bc95cfeea041e517f5fb8fece2662fcdd023c86ff33c1d31167cd06cf21cf5c308d679d8017d41f0df72fb3e9cc1ef3ebab14ec8c69bfc05432ed47d38885fe5d4cc9b4fe37028fc8fecb37c9649f25784cf6ebbf82e7f47dbc042fe87e05f5cf4ce8936b82e7f4fb36113ca6f17a002fe8f986b8de80fe8bef4dd28fc292cce52fa68269fc4d1effb0db2f49decd0c0c7fdc92fe2ce6131a3f6d2d98fcb7bf02cf49bf370330d68fea5a30fdde38831dfabea3fe59b2fea178b0009bd41e4f03db23aeff37713decb5f00593fc2df5a7c1ee47eb6f2330eadd17156c8ea87ff7609bfc45590b267f78d5c02e714bfa6ab2f1207ff80136c87ef22918f34dfe06c67cd186c48b018dafcee3cd99c5ee47faa48217647f99609bf4c7a0f1b2160392afa3f6da6cfc68bcd69279ff949f6093daef4ec1f067f5817831a4e76de8f70ebb9ece177c806d6abfb3235ec0dfba2bc9b4df9bc6d7ed1376ae5f5c3fe703263f6f4f520a1e53fc99102f66d4be8cf7cf7cc8e4e3d7673e784c7cdd82a7d4de5a03c3fe751e9f3265c2fca09be009d94fc2e397394b87c99f186bf08cfa4fe3fd3b9fb0e7717dacc792e97c0b8f5f58f8bb20d6793d613e5f2cc7b49fc5005bd49e35b56fb1c4fcecf1fe9e2fd9f7743dfdde582ca83f8267b049ed59f3f9686eb2eb69fd782699d62fa83de67244f67de1fa3eb79643b237ef2698f4ab9e8347d4feb0008fc99e1c6a8fbd70d05f4762261e6f9f46e3e730a6f3160618fdbbe6f9c6dc5d0ea8bd0df5bf6b88f89aebdfa25f00a5f8ff4e32edd749c0636aff66019ee17939780e7de2f92a73f643e8bb031e537b7c133c237bf5dec073ba7f44f71f1a225ea3e78f447f79dfe011ddcfe3f22dc68c29feff06e379ba0e9ed2ef0b1effb1747d44f3b1fd0d5ed2f78d0236c65cdf367c7e5fb0009858bf07cfd15f7bf082f4a3492473f96f19d8257b6df8f82e66cb05f55fbe223630ff6f797cbc98b3f67079527afe82319d17e1f6b7581a03fafdc693ccc7d7a0fb194b97da7bbb111b63f2af1bae9f0bd31810eb7cbd61612d1dd2bf94da671943c8cfe7af856d8c69be6e0563be594f2573fdd7b8bd2c1c763ded0f53c01392c7bb4ae6fdd3717d5db8c684fa4bbb134cdfa767f094e28180fba3e5c080fff15fc0b309f5ef9764d24ff13dfc43cae7a3e5d0807d6cf8782d47acbdfcfeed0b783ea1fad50ebca0ef6f3ed82079a32f30f2c5644f6c627f5acce7df655fd0e1e3930460a662dc3f1cc14beaaf40133ca178a8069bf47cdf90ccc74ff3c10e8de78dfa676c8afd09b564daff5982b1ff36a6f64c58ffd2fed40b7836a1fac504bc9c50fd6101c6fc97abc426e2b3700fc67911f3018cf33ac99d643e1edd198cf3176e07463da4fa0063bf8826be47bd53e7fe773965e345fded806db217eb1d8c78f29612b3f6923ea9603cbffb0663bf4949d7b38083c663b3022f68fceb7bb043f6118682a9ff8c02ec92bfcbe9fe7dba49f5c30d18fb636c9e2f2ce7ecf7144f2a6097e4bbe5c4ecf7140fcdc0b0b734018bfde03a784af3c53504cfb15f47dc0ffb0bbb8160ecbffc002fa95e58edc1d8bf1a4dc1163d2f36c1a8575495609c5f1a4aa6f3a134febd83e2ed2f376093faafa3e72fcc01f1f50b3c217ddd5660ac37ad63f00cfe5407cf69beef5230ea35c6026c60bfe55532e55b39d8a4eb6f73b0d8df20ee6f637fe04a32cdff03b043fd757b904cf9d9168c7ae7ed2299ce7b3692697fc898d8c2f99ddb128cf3b317f49f85fa6348f75f1a06d9afb604c37ff817b04dfa1c0ec10ee9bb4ef22ecd015d7fdd8047345eb5079e907e598e60d2d7b40363ffe3762598e2d5750e16e703d692297ffc128cf35768af897afb36108cfaee5c32d56b0f9269fe2e24f3f61731d880ff5125d37ed80558ac974c25d37ec09d64de7fe64132f73fea27d8a2f15732c9b4bea008a6f655a23fb1dfb28c24d3fe470d8c7ae1ed5132e95b2099cf8fa6e82fd4e3c32fc9b4bee3125b38ef7723ff641816d99b7d03dbe48fc22bd8a1f9f95a825d9adf4af28706eb1ede5eaf060fe97aaf133ca1fc5605237e6d8ee009e5bbd5198cf58b4efc1efb6fb71730f67bae66e025c5df8a09c6fecae020998fafd248a6f3ba909fd93b6f4f71025bb0af52329ddf9849e6cf533fc036e993924ba6f96726993f2fcec00ef57ff12e99e2c34a32ed7f0cc1f017d5bb649aef7cc9bc3f22f13c97fa4fc3f859388f5a6d25f3f69443c1d86f3b06e37c4be54ae6edd354c9bc7dd791643aefdc4aa67acf2b18e7f134f13dced325a4ef26d3379affc95f9826e2cb952a99c6f7153ca57835fd0463ff691108267fb579028b78c2001b34dee14532bf7f62814df88b4832d52f2ab085f59d0118eba3752899ecff2699eae307c9b43fb405431f9454329d2fbb97ccdb938cc02ee95b2adaebd2f8b590dfc279e448974ce3f12998e67b4d30ce074713c934ff403e0be72d2dba9fc5e607defeca014fc85f5413f094e2313b954cfea0114cfe467901233fd41792a99e6a49a6f527c198afd71bc9549fb9822dea8fba944cf9502799dad782b17e6d7592c9be6782495fea42321fdff8c7f77cbcb477b043fa1deb9229ff4904e37cc697641a7f0decd27828aa647abfc45032ade7b982495f13b25fcbc2fb0c944032d9cb93606abf5949a6f314cf60bc4fc00a24f3f6b79960d29f5a914cf11dfa53d87bf82999d6df303e16ceb755a4cf369b3fc8ff7660ec3f57de04933ff0f760ac5f665bc114df2b67c1a44f57156c507f5f1cc9b49ff3198cfdc69bab60aac7ac4f601be7fd22c1781fc95132ddaf95ccdbabd492b93e794f60e883229e87fd9ef959326fbf3a964cf9e00318fe5d9d4be6fda192fed916ce83a92f92a93dbe64ca8fd11f229e4c6f92f9f3938164ca1f4f82b1fe994ae6df871f60acf79a6bc9bc7f62f49785f3b1b75230d95775914cf30bfacfc279b22df90f47c413a621995f9f7be011f99b6d2b98e2136d021e4f683d63059e4cb83e7ae2fa19dd4f3b83e734df943118f581f22099cba33c8397549f592dc026d69b8f9279fb6f9f60e453d6156c537f5a63c9644f8160aa47695330fc8dee0aa6e7c5b964f28791648a6fe692297e580aa6fa6628da8bf8c3bc974cf9642118fa38954cf58f89649acf1692e93c27e9936361ffbdd149e6df2b9e609c1f7d96ccf549ad24d37974e887d0676721998f8fba924cf1fa9364b247713df687754f92e9fc672399ea45a23d581f35af92f9f7b9f81eef13885ac1181f4b32d5dfa10f16f6a3044bc974dee9158cfd3f892399fcbb2d993fff26fa6786fd3ba23f711ef146d7bbcc7e283f7b944ce7995ec0639aafab25784af671db0a9e52feb200cfc9fe320f2cec650f5e52beae7d49a6f319e2fe4bd457766083f453bf80b11fa878154cf6b2adc1585f37c4fde0af235530f251717fc45b9e90d7c17ca848a67add5530ad1f74a160aa8f76e279c8e7c34630f97f3b174cf2379a645abf247fe35a781f90ff2818f3c1443297571d49a67cfd4930cd87da1b58e8ff5630ece74b32cd1fa564aaef7982697dc87900633f73694ae6faa0be4aa6fd789a648aa724637fd25a32ed3f79924ceb3d3330f6f325ad64de1fd98364927f2598facbd42553fd3594ccafcf311e16cecbdf22c95c5e652a99de7f267e8ff3c9e1bb641a6f4732bf3efb008bfd812f92297eb32473794b31bec87fa30a2ccea3ee0493ff30f79269bfe23718f53e6b2099ea0377609c7f34be2453fc7b914cf91c1f2f63c0e6478a0fb6e019d58be207c1538aff8fe039e503712b99e6eb5c3297a750c04b1afff22618fb1922c1347fc73bc9b47f4630f2f9eda360b2efab2e98fcd1ea158cfd83452598f47f6b48e6cf8feec1a8b7a40bc1f05f3bc9bcffb61918f596f85d32d5e3447fbaa48ff94030f6ffdc24737bf267c416f6a7ac3f2453fe580bc67e99122cceeb9c24533d6b2299f4ad108cfce30773fd500cc9341f7792a9fe6b0ba6f5da6b2399ce372ec1d85f1d9d25f3efd59b60f89f3bc9bc3fd4a364f22f6f60ec97543792797fa8a960d8c74d32f9932918f61ed49269ff832d99e44d24f3f61a23c1d43f96fc1ef1fe1c8cf763448e645a3f16cfc3fe3d632899e2955832cdafd01f0be7d5ad4a32ad9f3792b9fcc64030ced3d792b93e9723c9b41feb02c6fe67732b99f68b7c4aa6faa3180f9c17f6499ffa032dc46bf098ec5d8f24d3fe08133ca1f530ed049e527eb7f50593ffb83c48a6fd570a7846f7d36b30e6fff25b32d5ab73c1145f28ef82299ed1e660d473b64f92a9def92698fcdd5a3cdf46fd24914cfbcd74c9b43e21e445fda611f7437cb1fe124cf65edcc02edd3f7225d3fb001e05d3fc5ebd108b7879bb93ccfbc72f05937e66a9605abf538e92493f56e021d99f6249a6fa5b2b98fc9f72914cedc3785a789f52f12698e42943c964ef17c9e40fe792697e1849e6f2648e60ac470660bc9f243b4aa6fd3fa1647ebda20826f9d24c32ef0ff55e32d5d7447f60fe2f9f25933f5a4aa6f8e62c18f9502299f40ffa61e1fd4b4a2899f6279492495ed19e29e297028cf795048d64dedef05530e29137c9e47fe4efb19f740cc6fed152134ced0f55c9fcfb488c17dedf74b9934cf64dfa3c326754ffab0cc1643f510ac67a78ba04633e77466083ecb309c026cdffa921998f476582b19fa7ba0aa6f93e5e0ba6fca6188051bf4b447bb1bf4aff00237ff60f92e9fd41f792e9bc7d2599e6f717c1d8cf247e8f7a5d160ba6fecf23c1b4bf21a0f86264e13c72f82499f2fd57c1f06727c954bfcec098df755b30d9ef7a2e98ecdf78974cf54cb447d47b3d5330e2cb0fc9b4df47dc0ffbd12ea9647a9fec1e2cde07f92e99f60b1c05239e3e4ba6f9df974cf9d74932ed9ffff17b2e5f70014f90ef288261df8664b25f5332bd6f0ae36be1fc4ef92499f22d4b3297ff593c0fefb7525dc9e4df3c30de5fa53a9229feb12553bc2ec66f46f2565f92c97f37609ca7b4df25d37e825a32adff89fba39eaafb92293fea24f3ebb7627cb13ebbfd944cfbadbf2453fe37154cf287a664d257d15e715e80fa6fcce673f2af117846f94076075e503d2188c1d88f9a9b82c91f2457c954cf38832df2279ba9647adfe70a8cfaecf62098e2ef6e2699ce27ed04533cb2d5c0d8efaa3c09a6fa46f12199ec5d3c0feba51dcd9f63517f5dbd0886bd3f4be6d76f7f30d59b62c164afde5432d5271f2453bdf0118c7abd77124ced4f1ac914afae2553bd5edc0ff3b9f32498ec6d1308a6f66c55c9341fdd83313f9ba23da8ef46a564dabf664aa6fd21f27b8a37e291643abfe249a6f9ce174cfb13a2028cf78b25b9647a1fd4a364f20fdf92c97f0c25d37a512599d607a03f22bf375ac994ffa49229ff78944cf94a2618fe48fe1ef59e4632bd3f270163becf2ac994bf8beb71fe4b0d2453bd27964cf552d13fa807da2f9269ff612499e627d13ed40f424330b55f13d763bfc6ed4332c50f37c1f0f78a64daff3d964cfb43c578637daf7a138cfd39429f719e6745fa30314df21f590ec6fedd32134cfbb10c5d30f98bcb8b64da2f3c01dbd87fbc174cf5c92001e37c4d25eee760fff1b7605a0fc8b792e9fc81b8bf43f149740263ff68fe2a989eb722fb9c8878201849a6f75f9e25d3f37cc974fee15532bdaf752898ecdd0904d37a475080512faf7e30e9432e18e7f56e82914f5482c91e0bf13ce4ff7e2698c627fb924cebcfe2f7d8ff1b3e80719eaa934cfaee3992491e717ff80f6f2699f22ff13dcecfa753c9e4bf0e92293f394aa6fd139660b2cfc8904cf9df4230e68b4a32add78bf1c0feda740ec6fbebcab3648a8f2792c95fd492299e1848a67ccd164cf25b2d58f887ab64f2379d64de3fea4132bd6f4efc7e8e7827944cfb7f1e2553bd4f134cfa6c799269ffb6781eea8df14432b57f2718ebe591645a2f8b05231f15bfc77e0f652699e229f13cbc7faa9a4ba6f361427fb03f5013fa8cf5e2c495ccbfd73dc924af180fec0fd33e24737922f17c9c6f6cc91ea626f69b5e13f082fccfe64d32d547bfc0385f565ec0886fba1cecd07a663394ccfb237b05633d627b144cf6779949a6f75fd682c93f06349f4dc5fa433d154cfaace982697d721b4aa6f3c11918f585742299fce5bd64aa67958229be5ac560ac27ac12c178bfd79b64da0ff1e37b7adf95fc3dcef70592a95ebb174cfe3a10cf47fda01c08c67e1b5f32bdcfb0134cfde12a92493ed17f585fc81f25d378dc49a6f8e253308d57249e3f417c7a904cfbcd7e30c5d382b11e982592797f24df82b1de954ba67aa6907f4af69baec138af6c8d24533d692f99ea733bc1e4ff3c0b2cde37be944cfe712499f2b1b964b2675732c52bd0670bfb45d54832e58fba64da0fb301e3fd8d4a2499d67f857ee0fc72f82d99be5f81713e3e194aa6fd49e27e588fb89ec1884fae13c9d4ffa27fb0bff0229e67537fae481f66e612fb2d776083ec3debc026eaa53618f18a3b0323fe580f04d3f5c98b64da7f63825df217852e99ce77907c33113f6c4dc134df6f1f24d37c9982b17ee04f05537b9a77c9148f88dfa3deb07a92ccfb7f73168cf365778229be48bf25537d19f28bf501e55e309d4fc94f92c97fcec158cf2b12c1e41fbb4fc9b43e3d104cf3f7f6158cf87ebb170cffe448267942c1e47fba05187f1f455049a6f5614330f4ff0d8cf3b88ab83fde3770d94ba6fafc12bca0f6a557c1c80f6dc9644fb964aa7f1492a99eb1934cf3f718bc44fd632199f2ab67c914bfd782518f16e389f78346a23dd8bfa58c25d379ba4030c95b5f2453fc5c824deacfec2299f6eb6c25d37ae74630e2b94632ad170bf9b13fb87b964cf514713df61bd4aa643a9f0f7bb31cecbf10fa28f6e3f89269bd83e2adb9399f52bd33032fa6fcfef9086cd07e8d95f81eeb1b97a964b2bf0dd8a2f958ff02dbb41fbbbb825d9a3f2eb5608a3fe28560caafb6141fcd45fdb11a83b11e180f05d37e5c5f114cfe669d8051ef6f3dc1a40fab108cf3d9e55a30ce3b1a60d4d78bab649a5fe5f7645f978364dededbb360f247452899ea616730d6e7d6779269fdfb4330f9bbd4148cf8e7058cf5b8e44932bdffe25e30f6835c24d3f9d1b964b27f713decdd16ed9b937fd2f792a99ed2082679a247b0380f33964cf3ab18af05c52f57d1df381f5baf2453bcff0046fcacfe60daaf6a4aa6f9ed4b30ce7fce25d3fedd1918f65f8af1c37e6d4f954cf9cf5a32c927fa17fbede254326faf22aec77c1bd582a9fd971d58ecef3524d3fe5ea1bfd84f97d1f82ec47a83be124cf5c8ca07dba4efbab8de9df2dffba44f0b51afeb5cc1747d32154cf61eecc043ccf74f9269ffd3098cf7495c1e25d3f9c14a30ad9f281f92693de2001ee3bcf34430e94f71114cfe259883f17ef6b52599de2f36144cfaa23c4aa6fafd188cfa79d60a267de832c1345f1786649a3f7e30cd97a2bdc86ff55232c54fb9648a6fc4f367e44fbaa1649a5f669269ffb7f87e4ef6915f2453beaf4ba6f9443c1feb655a2c99e47b944cfb532493ff6bef25d3f86ec1e2bc532318ef1712fa82f3cdc55e32b5ff1b0c7b5acd25d3df9fa04ba67ac25e32bd0f44b4cfc0f95ad13f787f759c08c6fb8f34c9141f6e2453fee80b46fe22fac7c2fbafef24933f17fa8efdf9590dc6fb8d4a8a079626ceb3d513b04bfa5a527cb664f645eb65067848f359fd8369bfec063cc27ae45532d5e31f25f3f15c3d83315f5d12c9544f740553fe1e6592a93f3dc158bfb88127145ffb9560b2873a96cce5d75f25537ce90ba6fa62f283a95e2ae49bd2f82b0f82c93ef385645a6f17ed453d39984aa6fac04c32fdfd5607c1a42ff14a30cdb7b74232e5a76f60e483fe5132cdafb960c4fb5f60c4aba52218ebaf7b30d69fb6e27b9c1f0ceec1d82f962b92c95f1d24537da7148cf93d05239f534f92e9bc8bb81fcefb1547c9544fabc1383fe68af1c67e92f807d3fe43213ff6af7662fcb19fdaa37cc410f5ebfc5e30cd1f6b07ecd2f85a347e06332faa8f1cc0d0efdb17784cf6e91a82499ff44ff004eb318f92693fdebd649adf5f05937efa67c1347fe91618e7bb6e7782112faa60ac8736a1601a8fac00a31ee98c05e37d155bc1347ff8aa647a1fc009bca0f1f21682c99f9ae2fe0b6acf360763fd62bb168cfcb0148cf7790879f1be9ad4954cf53cd17fd8bfe49f24533db1164cfdbd7d07e33cd346fc1efb17b789643a4f300423bf303760bcdfec42f669b27885ee47f38169e1bc977e124cf18d3706e3fd11fa163c22fdda9482a7b43e7805c3ff058660ba9f2b9e87f364d14632d5fb4792e9ef37fe02e33cd926028bf364efe039c9b712f747fdd9ad24d3f58231fee58b601affdb9b648a6f7230dedfe12d25d3fa760a467d3817f218145fd99f9269bda1924cefdf93df23fe7e009b349f98623c2c1a5ffb2298ee97d8609c3f32e6609c3f8b2cc9646f0bc914cf3f4aa6786607c6fe958ee20f8bcdafb43f81e20b165e93fe5c3e25d37e30f13dea3ddd093cc27ede2d18f5983804e3fd1d9a25989ed7168269ff61fa089e223f9e8167d47f862699d6f39e25d3fe68152ce2b70318e7c9ec67c9f4fe12138cf70f252918f1932b9e67507caf08f9f1be9938069b648fc15e308dbf32108cf7df88e7637f627c150cff7a0163ff42f000c6f99c88ec9b4d37a867d1fc62b3f1a3fd3c743f5b8c5ff102463cb2da82117fb4df9269bde12498ec510f25d3fef01c8cfcb8b425d37eaa5232bd5f2506235ed85a9269bda4154ce31d89f6cef17ea8037841f76b447b17d84fb6012fa9fd6b211fea49978b608a4f0c156c423f3bc9b49f3602c31e6f7bc1d0bf4a32c50fe44f6c1bfb3be22918e7e93a6287d907adb70ec063eacfd51b784afdb3d1c0c85f8a5232cd97afe0398ddf652d99fcf75130e5879d09c67c961482c97eae7bb049f74b3ac9349e86649a4f2692b93cb978be8df749b88229be509660eca7f39f24d3f922713dd6afaedf8269bcd690c7c6f9d755001e52bc5b533ceb5a63d29fab2199ce63edc1139a9f82083c25f9f5068cf745dd2cf082c6238d25d3fb1d378229bf503ec178dfce6a0946fce9bd0aa6fe5ccf04e37d0af27aca77ac1bd8a2e747df9229fe2dc136f98ffc4530e9f34a934cf9f10fa6e78be739387f48fde9daa8f7273c3e310716f67b260f9269ffde1318efefb91e24537dcd06e3fd79f6156ca0deb1904cf6a080d1fe6a2199e67b5f303d4fbb801dd8fb0a8cf8f9a611db78ff5dac8211df745f60d413133e7e2c389be17ccc183c27ff97459279ffac4b30de27947e0826f94c4532bd7f5d032fa9fd6d2a784af58e21d8a0f9e1aa48a6f53f5b30d58ffd6730de5f94ad89ed01d9ef86eb2b0b2eb0feac6fc04b92af7525d3fbcd8f6093fccde64532d9cb4d30c57fe1128cfd33eb77c1a41feb028cf7355a1f82e9f9ee1cec62ffea9b60f227892918e785f0bd8dfdafe9b3601a4f270463fda81980f17ea59adbbf3966fd41ef472dc14bf2075b1b6c60fdec4132d50f0bc9944f1cc126c693dad7bf5e9ff2075c6f63bd6b45fd33b1e6549fb8adc0580fdc7682c97fdd5ab035a5f74309c67961e50bec523c1de2f736eaf7f11c3ca4feaba8bfa6d664467fffdc080c7f53b492a97e6f08a6f686776013fab4964cf69982717ed224ff30b5b15fe81608c6fbd3ce60c48b2d8dd78cdd8ff2eb5430c5839b5730f2dff60086be74a4af33d6ff148fdd8391ff6a74bf390b30693de808b6917f64c436ce8fdf1230f6bfb7345e0b6b3a27fbe9c0f319bdaf8bfcc782a5f7e43f0f60cc4705f99f256b3fedf71c826d92ef3625b627349f68dcdf9b2c9f9b927f237d3458ffd1fc5b8327f007241f530f1aaf6b00467cad51ffb2f8674efd41fed5b6711ed0e4fac192cf39b57733022fe97ecf977feda32abf7d8c9f3e26ffa7827fa74fcf0afb9da5daaac3fe58ff6a0be8f3df21cb2f72b9ecf3bb5c0afe9b90afff77f7df5116d62247f5d81ffad87ddba87590cbfd87bfb3f1f9779605f20899fa6be8cfffb79fff167b71e9f393743ffadc1663f4e33aa96fbdedf8eccf3f18b9ffff65e16dfbc90e6009240d1fa9bf2b3bc9439ee0df4d1661eb3f64f9313a3f24f3e4e717cbfa7791e5379fecfefa91d758f05a8e94457a8a7f2b590235542335561335553335570b364ea55aa917b5669f86e951ab76ec7365b2de544dd5d99f15ff9dc67eb1fe379365a3aed827652391a85bf6b963d2ecd43dfbec982c07464726dd91fdfb4e3da9f74cce7bf5817d0c76e53ff4daff5b6479e43dfdc446e699fddb597d515fb94ebda9efea87faa906ec9a9449f8c524f85607ea501da96375a24ed5993a67d2fc1bc9c25a7a5637ec9f91ba607f02d8fd92c9f2cafe6929aafaa4284cc7be15431d2ba662b18fad380af31a8aa7f8ff3d92fcf7cc954aa0844aa4c44aa2a44aa6e44ccf5ca63d2dfbf4b6622a059b45064aa954ca45a9954669954eb92a3745537465a5acffe8b5ff37cab251b6ca9db253cf8aa2ec95036bf1513929f7ca83f2a83c29cfca5979515e9537e55df9503e952ff6dfbf9581325446ca589928d37f23596c65a6cc9505d3b393b26413cd83f261288661b044c0b00dc7700dcff08dc0088dc8888dc4488dccc88dc2288dcab8a87746fddf23c99f9345b58ca6ff23a390df6677a3353ae36adc0ccdd08d95b13636c6d6b83376c69efd391847e364dcb3cf897d8e8c1fd8e7d178329e8db3f162bc1a6fc6bbf1c1b4b0cf02685e757f9b797f9aadfe999ff8af6561527c1a5feccfb7313086c6c818315fd4186363624c8d194b9916c6b2370ad3304dd3326de3683aa68b8fc73ebe19b04f684666c465eaa53a9a31936a6726666a66666e16666956e6c5accdc66ccdcebc9a375333757365aecdcd2f33b1f2eb1cfcd764311a736bde3169becd9db9e7b21ccc8379344fe6bdf9603e9a4fe6b379365fcc57f3cd7c373fcc4ff38b7dbecd8139c467648ed967c23e63736aceccb9b960992a3334e3de322cd3b22cdb722cd7f22cdf0aacd08aacd84aacd4caacdc2aac12b9dc2f91c5ffaa2c56655dac4b3f2e566d0cad5a3d5b8dd55a9d75b56e9666e9d6ca5a5b1bd6d3f7ccd96ead3bd6522689b5b3f61677bfd6019f2393666a9dac7beb817d1ead27ebd93ab351da592fd6abf566bd5b1fd6274b98bf5884b0601e3d61b3e9c0faeea3cf1fd1d1bfa2634cb31a8bfe82f001fff74a89aca135b2c6d6c49a5a336b6e2d7acdb196cc74fa4a9ed18f85b5b34d48f2439643bf4c614e6ddb766cd77ab03ddbb7033bb42326cfc178b4633bb1533bb37336abda766197ea935dd997de92fecce74fc932307756cdc6646055aa67d77663b776675fed9badd9ba71303fec95bdb6376c249ef9676fed9924625414662bcc5e602bf766681bf6d6beb377f6de3eb0cfde3eda27fb9e8debde7eb01fed27fbd93eb319d7b35fec57656fbfb1d1b07efffcafc9f27cb16a66274cb78cc6f8b4df992c1ff6a7fd657fdb037bc8faf3c47a7864bbe6dc1edb137b6a2db924bb7e64fab161ff9cb1f6ce85fd9b91bdb0972c485698ddcc1dc3311d662c8eed384cd2bde33a9ee33b8113b218f5dd89545df17fcdecfe155954d7183ab113333bb1edda499cd4c9ec2f27778a5e0ea7640ff0ed3d6b55653d3b17361acf4cc706cc6216dc6ed8ff3b356b6be3b44ca6b9d3998173756e8e66f7938feeac9cb5b3b1b7ecf78eb365d21c8d9d73e7ec9cbd73708ecec9b9771e7ec9107ecb7a7eb6a03f234b2f09f3c683fe7ecea3f3e43c3b67e7c58cadb33db1ced6b33d6656cc3ece2b6b5dc5dab5c0a7f765ec63cfe9e374f8bc39efbd24f6d20e9d0f66fd47e7d3f9ea7fe954ce379366dffff5f6cec8e9ff5acca933b3eb9fe4f8576599ab9db3b05f9c25fba1e21a6ce2b08c23f34accd3bab6ebb8aebd702a73e17ab66b1f5d9ff9a8931b981fccdacfaca5f76ec86c2ae673e6d18ddcd84d98bde0e3746e6a7acc73b02b594fbcd93336be67377373b7704bb7722f6e6d176e63356e6b358ae67656f3afe8987a70afaaeddeecd6d55cdd5db96b3626cfeec6dd9a43f7ceddb97b3622dbde86dd837bb4576e6031ed331df7e4debb0feea3fbe43e1b817b765fdc472195fbeabeb9efec5707f7c3f9703fdd2ff7db1db84377c474f1c0fe7dec4edca93b73e7eec25daabd2f6091b8a7aa81f70fbdda9f91c533d8f46d79b6e778ae937b9e71b2179eef055ec8e4601fdbf0222ff612e6030eb6d1eb8c977a99977b85577a9577f16aaff15aaff3aedecdd33cdd5b796b36e7c7c6c9db785befce7a70471ebb0b1b5d9dfd3ff36fde8e59cec1db7b07efe89dbc7bb5f01e58467af31ebcc71f5af5bb1ff853b23c79cfded97bf15ebd37a730637362dbde3bd32f2e099368cbe6f229b39ae7de76bd0fefd3fbf2bebd8137f446ded89b78536fe6cdbd85b76441d7a3aff8866ffa966ffb8e71f45ddfb31e7c9ff9e8ad6df8811ff663e547ee8069e4831ffb899ffa198bd6be51bffd523c9189fe75599e2f7eee177ee957fec5af0d6603e6d46f7a49fc967d3aff6acead27ffd6cf77bee6ebfeca5ffb1b7febdff93b7fef1ffca37f62f966a2bef8f78aea3ff88ffe93ffec9ffd17ffd57ff3df8da3bdf03ffc4fff8bf9f485bd30c74ee57ffb037fe88f8cbd3ff627fed49ff9737fa1382c27fd6679f70f597ea97dfc99d8d25f066aa004060b112da65f6aff97c0f7fae5b7811d38fe3570cd0fe31478811f04411844411c24411a64411e14411954c14509839a7d1afb3d68838ee59af3e06a3f07b7400bf460c5fc48ef0d9560ddeb99ad30d906f6c27a0e36ecaedbe02ed8057ba50e0e4a191c8353708f0af54f35ab3f2d8b1d3c048fc153f01c9ccdd829ad73f012bcf6da15bc05ef81137c049fccf38c83afe03b1804c360148c8309fb330d66c19c49b47016c1325443253442d3188416fbc39c71e8865ee88741188651c86cc73a8709f3cb4698f29881c50f61d6fbfc300f8bb00cabf012d661e32fd421d3b41fb2387f94e5e77af6cf63d25f1db661175ec39b19875aa8b3bbafac636f27e13a5c33795e8c7b2f0d37e136bc0b77e13e3c84c7f014de870fe163f8143e8767f52d7c095fc337ab08dfc38ff033fc62d2982c22f6d97ff90e07e1301c8563e3184ed82cb40dd6e1943d63e6ee99fd7c9b53f6dfe7e1225c466aa428456444e68fcacdaf5a46b288ff862c28f1d4c8525fd5d7c88e1c7f19b9e673e41987c8376751c02375a61351c8e2f7cf88e524511c25511a65c62dca8347ab65f369cafe3c4645f01895aa1255d125aaa3266a5910d345d7e8166966678ccc75d4467ab48ad6d126da4677c629da452c82f0039ef778d68ecdb40bf6bc7d74888ed129ba77d2e8217aecefcdabed866af4d1eeaff6f2932c068fb043b77516ca2e7a8a9ea373f4629ea357f6a437e6750d16a79ca37773c2e6e8aad7eae823fa8cbea2ef68a0ce153f1a2aea8f2a2c7f9e1b8da27134096d2b8ca6d1cc8aa379b48896b11a2b56111b319bac629b85166eccbc3d9f73962c7f93b29843e33ef6e3200ea3fb388ae3f081f554cadbcafc5a1f25fe2c0b7ff68f7131d4f8f9e22cd4f73889d3388bf3b888cbb86277bcb0f87111d7d6dedd5b4f7c2639b959dcc46ddcc557ff515dfdb4f662cb3bbaca5875e25bacc5ba3f8b57f13adec4dbf82edec57ba5890fea323ec6a7f83e7e881fe327e3143fb3d866c9bc7380b86e689de373fc120ce2d76011bfc5effd88736b3055a38fdeff992c0ad34726cb6b9cb8adba8a3f4c23fe649db7641ec6b09ee3da665ed3fc0c33f6dcaff83b1ec4c378a456eaca7e51ee94713c862c3c1eecff9dfdb7493c55f57816cfe345bc4c54e3c17e4894c448ccc44aecc449dcc44bfc24484263efde9b3e8bd8d887e7a42c3b65f3d6d17c4da2244e92244db2a84872b1baf07765b1c886f8155b36bbb2fe65914fa2b8499194e69b71f26fd69e8dc9d9b998dff6c13ad953e39054c925a99326d6d5f7beea9db4ccca52f40d55c1d97d95bb385332bb4abae49adc12cd38252ceb4956c93ad924dbe42eba26bb641f1c9243724cd82c657a8ec272014364d94c9b4b2f4dee9387e4d158264f09b34ab146d2e722ff4c96e499f5e198e50e2bf6efe7e4257935dfad3e3f3f276f56ff8afa7df26ece8dfb709c7c249fc957f29d0c143d192a8b64c4abe3bdc7b4fbac8dc9c264b2df93713231de9269324be6c63159d8c76469c6a99a2aa9919aa995daa9e3dfa76eeaa5bef1603a2cbfe1b2f45910cb54b769601cd3308dd2384dd294cbc2d76dfa7cc4180aaff6932c96b0fe3453466e6b97cc8e9d344f8bb4343fd22a4c98f75a5afdfe8687f4621becee75daa46ddaa5d7d451f4a04b6fa996ea91c9fd3f978549c3644957e93adda4dbf42eddb15fedd3837d4c8fe9c9d8a7f7e943fa18fae953642b7a344c9fd373fa92bed2c8902c2ca7db4681719fbea5efe947fa997ef5feb197a56f7f9f5bfd2acb8f91e17a78607dbb5412ff2139a7dfce9069eb673ae86da5f7c54ee5fa696f8f553a4ac7e9249da6b3a4b50b65c3f42c5177fe23ef31361a7d0edad724d379ba4897999a29c63163f971b4efb3e3ccecb3e2649559999d39ea57ea0475e6665ee66781e9fa81a3a06ab0eb675096e1c5599845599c25ce23b3172e8b6af5b9d52fb2889a9add3f99d14efd4a064ccf952c553eb2cc74cc2fe61b077dcecbf477613d982316e37efaeb2ccf8aaccc2a61e7e45b98b34db24b56678d5dc763f53b6bb32ebb662c62f343d6df6ff6c2fd66de9c652c99661ce3a74ccf56d93adb306bd3b36d76e74efa5999c53363a603cf76bfcd8445369691edb23d93e5901db313d31d85db7491ddff268bf28b2ca67a973d3032b24743c99eb82ccc37f67d642ebcc4661146f69c9db397ec357bcbde852c1855577d4bdaec23fb8c9e93419a655fd97736c8d8e866a36cec8eb24936355da7cc66d9bcf7ebacbf17d93257734509552b377233b7723b77d8377d3d6dc29edad74398b7cedddccbfdec900779a828ff4496be024a7dabf8bd36f63edacc23c330ee982cbd97efed70c024619219f7799c27fe364ff32c3c30597eac4172bf95e779919779a556f925aff3266f8d63dee5d75eb7dc613f1ef9cdfdeeb3e25cb316f153aee7ab7cad9eed32dfe4dbfcced67396c1b09879c8729a4bafd9feb7719f29f93e3fe4c73cc88e4c9b1392c52afe812cbd0f559209d332db2ed5263f1926f32baed05ca6678eed5877ecbfbce6f7fe5dfe104cf347a3fd690d92d97afe943f671725cecff94bfe9abfe5ef7dd4937ff49909af719cddaf6cca73628dcd8871fe997fe5dff9404d9cc833f3613ecac7f1579ff1997dbc4c51b4cfee30c9a7f92cc9988e1d59a699f47e377c0bdffe200bb75792259fab7b854d65ea77be302c63cfd2fb1dd5bc481673943bf9b2500b8545f5b3e8814547b6dcabc0575793b1fa919f0ba33059b7d9ac557d2cbfe8f312ebaeb7e4c2e96b1785cb62ad53e1157e111461112923d52ee22229d22233f67d5ec365611ac6aecdd98cb92f8aa22caa3c2459faf6b398f5f597f9e5375958c6b34f6fcc62be8b0b7be4ce74a97227646177ae8ba6688b2e288a6b714bf25f7684303d53fc645268855eac8ab5710835e7b597a5d8b06cabaf6a7ef4d5be60cd243916dbe2aed815fbe2a0d8c5317b284ec57df1503c16cc3efa1a279764614e0b268f7128cec54bf15abcfd248b1aaa7f57164fcab22bde59fe742a3ed894b5efa33c5420875c9645f1597c15dfc5a01806398ba2c90bffd8555114a3625c4c8a692f4931ebd72c989ea8c5bc8f467b5b6677e03163b12cd5ecbb544287c540d7d250c2d22cadd22e9dd2354ebc22c2ae36c7f6a1f498cdc6a55f06e1ae64290dd731f7efc822d654c40cf3adb665c472b053191b2ecbef852cfb5e16f3cb3a9749999659996749745f163f564a7824669465599597b22e9b5e92b2cd34661b565f3b6371dc985bb4e10ffaaca7ecca6b79b3be4acd0a4a9d8d67c4a45995eb72536e992cbabdeda326368e5bebbecf64cabb7257ee7b591425cd7a6d28b552fb45961fd13ef773ea8dcd103b75c56439183e1bebc81c5b7d3d2cb0674e63cfcb63792aefcb87f2b17c6271ce86e527a398c594ca9d5d97cfe5b97c295fcbb7f29d79d12eef32adafee9bb3bebec13f337b5f7eb079bc2c3fcbaff2bb1c985d392c47e5b89c94d3c42d67e5bc5c944be3c45c7d156a7c4c0f665f1939564a655466d06746a7e0d4ef2ab2aadf62fedefb3059d8b7663f36c8d834bbaa2c26cbbd19b2deec97483a264b6b06c6a1b22bc79bc5e3a00996e5c4dc562e538ba86236cfa29545e5574115329fca66bb3ea736471513d73a313946fd9a4515dbdb2aa9d22aabf2aaa84a2bacaaea52d55553b5556745c1b1ba062b362e5ba7a355b57ebda3aff254b74aabf42467b21c83a36ad9f51f641151a5cf6571d488e9e246bd315559556b264bc4662c268b193269f64c96a37bf65a6fae2e2387e9eb5bb5a9b6d55db5abf6cab53a54c7ea54f575e17be6c717d681c5d5233e26a3fe2ebd3d570f4c96c7eaa97af646d5b97ab1aaead5dc556fd57bf5517d565ff128afabef5e966ac07ac2e5f5cf678bddb11a56a36a9ce4ce23c6c5339adf627e4bca6270efba60d1ee539ac5a36a524db98e912c51af654c965335f33a8f656bca3c34ccae9a87af9eaac6ac3f17d5f2a26637f7f5a25cb81fb615f38349d17f26b406c3ee7570377d7e75312fd6c5be38e1cbc5bd78179f8d897f092e6134b8449798c9d2b91fccbadefb159cde673059946a7449823e47f6d9c7fea32ca859283c96225912f549bdbfa4ec9e593fc6fdfa9c6df523d4af3d18a774e75d2fb9925e8ad0c8eefbbcfd525eaacbe5525f9a4b6b9c2edde56a6fcdd1e5165f98bd93244764f10773e445d68e5da55df4cbeab2b6c2cbe6b2bddc5d7655a7b697fde57039ba2fbd2c173633b1d8cde27fd5d684fde2fef27079e4b2a0adfd5add3f95256071f24d29c2faf27479eeb585d61bfb95a07ecd81e9d8a377f35545b3df7975c88ca6feec72bebc5c5ecdc4383afae58daf136d8235f75dbd7e8db92c7c3d96f5f196c5dd5333bebc5f3e2e9f97afcb777cbcf06a13d388e16578195dc66c869ddb6c66cd466c967db5ee7adbbf4c2ed3cb8ccba2f0bcc2fe5d16392f4096545373b5cdcf97f9657159f6eb90bdcdb2d8b85fd50accc08d8c83a7298f8a1fb4c620fca8d55a49b6b5519bc98ac9f9565bb56def1cc38bfaf99ecd8d336ef74cc7b8341e9b3146e6dcdef82cdeac9ddaadbddaaf83484b46e9ad0eeba88eeb84e5ca9fcce3796c6e9db008f4c9dd32590e755a67756e325990875bfd0aeaeff9cbcfb2287eaa2b6e5dd4a5f25557c68149c0bc0fb3dfa8978569716cc69eee2b6aa9cc422bfc8caa9a4590ec7f0d6b5beb7eb84347cdaf2c63af9cd73063f67faa22f6ebdeaff7d27875c746f9cbfc626d5cd6d7fa566bb55eafea35d36ca77c8af27a536fcdd8b9b23cdceb6318d6239bdec2eabb7a57efcb3d932515759e3fe695d8112074cc55efd44370523ae5b13e184cb3597e7f6fdbbc12cfda581f599b4ff57dfde0b6a1556d13b77eac9fea67e3549feb17a65b8bfab59f159cd728b02d1691ceeb37bfb1b7fe376fd994b220ca89acbdfb5abfd71ff56738a8bfeaef7a500fcba01e992ed3c27db17077aec3f29881cb324b63578feb493de5b2507ef20f7264f6a797a59ffb13f6ff0d9bfda7f5ac9ed70b9657b2fc8bc52e5b7b592f9d779bcdc98dda288de13f5a35f3ca1f8dd958c64363db47f6d9374e3f438693be6ed3fbb2c665ff34a2d0def09a9af1cb1ae0d074eb5be3357e1334a1f3d4444ddc244dcafae291e54977eeaec9ac2dfb158b429bbc299ab2a9b8bdd09ca8f42b763fcb42732397c5e4b364aa8cd2cc99c77a7369eaa6316377c3eefb7039352d0b8359d6e186c6aee99a6b738badd0b48a466b74fbc18c9b557aecc7c57c6fd64cdfc76c2c3efa5cbdd9345bebdcdcb9dbbe8283d53fac9c9b5ebfb3a4d935fbe6604d9a63736aee9b0726c363f3d43c3799bbeb6be64c2fe3e6dcbc34afcd9b948559c51f65a1d95ecaa2f1959bb5faa138cd7bf3c1a22ac7ff609e89d973bfa6686f9b4fe3e0dbcd57f31dbae167ad3483669828d60b7bde283359ae356bc66c961b46611f41369366dacc9ab971b296eeb6e1e3815566167d9b9ed3354b63efad5bb5555aa3355bcbe8ebd581396efb15c45d9f2b87ba71689dd66dbdd6ef63181e7719aadfaf09ff365752a5cfa4bdc2fdfa937a8bc76de03dc65d1b1afd4afdb658703fbbed6dba8d8c531bb7499b865ef5de666d9e9fdaa22ddbcad8370fed85595585fce4beaddba66ddbaebd5e5876dfded8bcf3ddd70ee4eabfefed5aaddf1de36baddeaeda755bb35f6dda6df0dede056f5ec89eb7734a63d7eedb437b6c4f52163f38fd41161bd97abff39945bc2c951e313ddbe5b9a2b7f7ed43fbc8b4f7686ffa9d05b5d53ef55adf326fdf9edb97f6d518861f4e5c44ed5bb269df59ccb3cf3b7bc9645ef5f949fbd17eb65fed773b6887eda865b3068b697aed123b19f67e906bf6b69db0acf8d44edb593b6751cb397875ed76d12e3bb59fdbeace38754a67746667c571922779af472c8e39fe4116e75759d84c99a94967770e93e6dab99d67192cd770d89cb063be56ef7c7b5b9f7d3753baa00bbba8da767197746997b1b0b8e8ca7e6dc8db75157bfea5abbbc6df756dd775d7eed6699ddeadfaac8e723b5ec95b326b687b8fe2fb4e65dce75db7ee36eeaedb76776c02d875fbe6397aef0eddb13b75f7dd43f7f8ab2cbfc563b40fdae2fbb87b59fabdb76ef7d43de7cfddb97be95e6bc738b9ae7de8ff1a4166c38eb3eddeba77964f9cba8feeb3fbeabe9d85fad80dba6137eac6d19d195b0b33f6b56ed24dbb5937ef16ddf2aa5e95ab71358d9dfbca7763f9bd1ce6d00ffa99fd6ad97bc7bada4cbe73b7bb322bb18ee1cadd5d5deffdea3109dfaffe35b886d7280fa302b66ffe1d1d13eb0b72bf196a7fdcef5de36b52b2d65d53ebe19ab119ef6c9dddcf7eb5f79ab3ff5a5ccb6bc5e29897ebe55a5bfeb5b9b6d7ee7acd27d7db55bb321d5533b30bdf8da69c5c57d7f57573dde6937efe655aa8f4750ce623a2be06c6f7638dd87c74ecfd38d515ade7de5aaa8171bcde5d77d7bdda3847b5edab2c5993353c07367f9c07f8afd7f89ca7ebe17a8cd953afa7eb3d3dddbf998b6641d1eef5e1fa787dba3e5fcfd797eb6bad3069deaeefd78febe7f5ebfa5d75d74139bc0eafa3eb987d26d7e975769d7b6bd60b8bcccccceb92dba2f5f327f2dd7d73c7fc1c27ebcc52c3a79b7263f955348c4c36f3b9aa6dbf33591cbebef31764b99937eb66df1cd6379ecb66877edf8bad140b2fb9b139d0b8f7b51b0b346f8152ddc25b748bd5db2db9a5b7ec96df8a68d025e15755df4a7377ab6e97f0e3c626c65b5bac6e9db1ef772df0fd16d6af1f5eafb0d86cc4246aee7236b3dcaeb7db4d4bc6d133cb2d44fefb87ddf3ffb52ce6e34dbfad6eeb86c5860d1b0d663515f3f8ecff6d8fc5eecc9fe593dbe6b6bdddd5a5fa62d7cae2b65386b7fdeda0d4ea58dd869f55773bde4eb7fbcbddede1f6787bba3ddfce51623f180fb71733643e7af24759983454afa4fbbfdede54f7f67efb48068a226ac97f7d7d3f2a6e9fb7afdbf76dc02b565f2cb35c58776c86d89a73162f6d6e43e3741bddc6b7c96d9abab759eadce6f1241ef77bf56f8bc80a5fa2eab6d4d4a8d394a85202f5ac199aa9599aadb1b16e5acdedade4e78fbbef3396c82759cc58f3345f0bb4508bf242d1d20ce3f287d3597fc25e1eb5584bb454cbfad981dd7b617e7a119385f624cdedad96f733a75668a5566917ad564325615ed0b65fe289b25322add15aadd3aedacdf84c1dd573979aa6e9da4a5b6b1b7ba16da99af0ebc8b03f2a8bb1ad7667dada9db653bba0b9bddbef2c7f37642dcfa1f8f22fc8926a7beda01db59376af3db008efce9cfa1f2c3bda71eb6451633568f92e43ed517bd29eb5b3f6a2bd46b935d2de8c85f61e4fb40f36269f2c216e94246ccb2767e999da97f6ad0d3436a6edeeefd98bf5dcee2c35f2b59136d6260a8bd955d72eed525db37111f562ef2fcbf2a84db59936d716da52578d7da8318f79673d9993b86e6fecb363518056b6bac26c79a71bbad92a9dab5bc64db77527327457c97596ee844e7fe622ce597e32d4033dd4233dd6133dedc7e0d74f98f5b2447e2f95bbd7333dcfebb2d20bf6fbfe0c84266b797c86ff2b3a16157aa957fa45aff5466ff5aedf11c3f2de39af8f322fa45ffb798faffbfaa6ebbe66817ed3355dd757fa5adfe85bfdcef850bff59dbe77c6d5413fe847fda4dfeb0ffaa3fe14bd07aece722db28dde4ef86e0bf3e78fe9e8e764adbfe8af4aa36ead86cdca34abf4f6eff075c43fbd8724c9f537fdbdb8ea1ffaa7fea57febcc07588affed6ed3ca56a3f7beea637afd3a561f4733895c33d687fa888dd0589fe8537da6cff585be5ca92b6565accc95e5eddd3c7ded778d38d5ca5e39b6e1eec90f0b0ff68b2cae7170dc95bbf2567e3c535f56415f310a4e2cdeea57df6a5a7bfb73b2048fab701505b355bc4a56e92a5be5ed78555807166b6efa5ccb3afe248bc9b28265dee5ceed8565b4b755b9aa5697555dcd568d3e5ab5b1c7f7c23129dcddaaeb76abab395e752c5bbbe3f66e626ef955166f7533e3b261f9d270a5b1f178e335567efeafaf2afd9571311f57fa6ab55a6bb362b8daacb6abbbcbc76ad75767d2a05f79b0b67d0ecf64796372ec983c0adfc570cff7819ef85efea3d8cf6bdcbbdf76e87ff8cd6abf3aac8ead1d7cb84edffa7e9e679aa6b63b6627bfcae2af4eab7b9643ad570fcdfbea919fce727f3a052c4f69fca971795a3dafceab176db67ad5ebd5dbea7df5b1fa8cbff26ef595f615a31fbbddf98749f7c177bc0f9d57f6795b7daf06d17e35147b2cfbbdbccd9339ee7739b58bd5a8d72e173b9358e3acdf65b1ceab717d67ec5693d574355bcd51c3b7708ec1fdf3314c92af16abe55a5d2b6b439badcdb5b5b6d7ceda5d7bc69e45cffb1f7bdefb489eaffb32097a7b62b3105fc7e3fba9f9beea7e36627e6318266b7f1dacc3c0091cbecb91452c6431bd17f85d967e7473dbd8d7efeb681dab77e20c2d9745f9b16be9cff8b1f03198af933c5d5bc1789daeb375be2ed6e5ba5a5fd6b5b5b437741601fbf7fbd5b30fbe57a25f6bb15a16fc34ceba757416dfb3e83e9ce9d77ecd807df6ebceefd6cc62bc50c8d2eeb411f366bfd90bd7d26374b7beadb53573e4b2fee5fed5793f628aba5eaf37ebedfa6ebd5befd787f5717d5adfaf1fd68feba790c5fdd69eef5ac1b8b04fbf9ef76a7e704b3e584bbedb9f5950bffba8f7e2eb7e97fcb1df83b63eaf5f02d736cc28effa73246c8e1feb193f73d2e7373edfafe4b23c69bb7e5dbf35cafa7dfdc1e617c8f2f7f78ffdf38ff3283f69566595d196e7f5e7fa6bfdbd1eac87eb11d335bea38c568b980e4db0afbf8fa6c6acc7cffc04c6b2dfadd7cbe90f7a7bea77569a43967505d5e0a69a713e6171d79d36d1f3f5b8f776eb49bfa3b61f93cb389f38de7aba9eade7eabdd8d32b674be7afc8f2d3d9621ecf798f6a11dcaf179774bdcc5f36ea46d9181bb37faead164ebf368979c230a77db5439cb4602336661ab91436d3dc39174ba1fd0a2caa7f6511e4ae0f0b36569fdfacc6cce59f8ce3c6c9271b77e36dfc4d607da94f56f35b9bfed2b8fc7eb6381a2a9ee2da55972acd26dc449b78936cd24db6c9f9aa0bcb6eac27ffdbf68bbc782effdf76ae6549552488eee733a6f615fdba7dbb6356a899203e5a6db51f3b4444f0c14b1489987f9faa8202a4bd37b457331113b9d010943a661645669d93b6d9e37b5a6207f5ce54d90a7b630ee6244ed8f3c2d4532060d9afca32ad349d280e4d481246103617866ae8b10a11c3b2b36c86248e1fe983506f36cb7bd7f59cde1344592e9dd23decc91c0e90c0115250a0014d680104cf80a691efb672cf7c667bc1191af13a6a6c8d2ed758790ea8a041fba8a546ca6681e23a2c67047dffd9b4a1130fb9e20cbad0833e2ce34747a706bc2c0e85fef98baee722bfd4f4404187dc51957668dcd0c2d0b660004318c12b8c61025378f3347fb13bb0acbe5df0f8ab3a31cdd0e01d3ee0136ee036e9c2ddb1ed7437f7e95459c13d7169c0bcfd003fe0117eb2bb700a4ff08c94def1b9eef5e9337dca1557dfc052a8ea8aefae6ed98c216b9d45ef4ffa485524aebeeaa181333471eeaa5edbb7f71bff47100423b4421517519a70a1686ff7106f632dbe471b97ebe0a027b3a4874ec8a276354cdffc603e255ca59dee228325a4b8c2354b719e8d29bbca113774bcb961e319c8f15c1f6327bd3884873ca043ee1bdcda7dce35430f7d0c30740718e10e636fed2f7ddd7f0cc2861b3aa1161991827b3cecfa8d66ec6112bce2115354f693204dfadb96d559cd6ccab25f967cd21655d61b3627a2d61336b0892d72a03dc20e53978ef868d8fa229f5faee75a7fe935c07eb745b764495b08ec7d0311d5f514356ca3bffd70224ff774bfb3f1822818bb5ad8461d3bd8c5de6e837df6fe0507fb088787258ef015c7d68bd0fa1a7cc79ef3f0a8623d21573237714a0f6bb636061dba66de58d0211dac1b76bfe293ef6039b59ad281736c393795d713791dceebf80ee712f96e3009ddd07544a5d179e13613e6e4967d435ca3ec245389a0cad56bfd58aad7bf7aee9fc122ff178e852391e3f3ba9c7d9399eff23a234758aeb7d96b869def6fe7fb0f468e60216ac18678a2378b9890bd31a42ee18c42f1d27b720dcf09969c1fb0909d7904e76ec356026184f0baafc89d66956e3da5fecbf6f6f369d67545d6b5c5d924df135a7ec542cb5e26e49a7cbfc201afa191da8093df3604f79408ae9ab0ad576031ca9ca3caca1635c83935653d22cfb448ce3bcf6adc752c32e62a9eb9443352aa19aaaae7e288acea1ab4729f2cb50e052bf5d4871cf952b02732ae47d9db635ea9689b453c57bc2062244752ad5f5e84c592fcc3e1ee4c949995795bc152fdbea830d827ffc84c20e9088f91d2fb395e4b665b520152c3422492ebf27dce3a1163b10a2cc60916c11710bad85b6ed69a7320cdc09db863ceee0a1533e20c1ccef6c814cd995eb334f9fc9ecf4b7ebda988b5c23b67b1108e04dff03d63da7fc32f8b9a5f4caeec2fc7c9c7e6f5bc5e154b795ce2e596e3679fca7dd222b624e3bc58134fe3a1e0bbcd199677fcb81c4b3d6a7ea7d6aeb0fb7e71ceb9a3f5738b7cbeda2ba7de3ba79caf57e52fff15fb1fcbbfd3fefcfbaf3ffe0193cc32fd - + diff --git a/krita/sdk/kis_annotation.h b/krita/sdk/kis_annotation.h index 03287004..c29138d8 100644 --- a/krita/sdk/kis_annotation.h +++ b/krita/sdk/kis_annotation.h @@ -24,14 +24,14 @@ #include #include "kis_shared_ptr_vector.h" -#include -#include -#include +#include +#include +#include /** * An data extension mechanism for Krita. * - * An annotation can be of something like a QByteArray or a QString op a more specific + * An annotation can be of something like a TQByteArray or a TQString op a more specific * datatype that can be attached to an image (or maybe later, if needed, to a layer) * and contains data that must be associated with an image for purposes of import/export. * @@ -52,7 +52,7 @@ public: * @param description a localized string describing the annotation * @param data a binary blob containing the annotation data */ - KisAnnotation(const QString & type, const QString & description, const QByteArray & data) + KisAnnotation(const TQString & type, const TQString & description, const TQByteArray & data) : m_type(type), m_description(description), m_annotation(data) {}; @@ -60,24 +60,24 @@ public: /** * @return a non-localized string identifiying the type of the annotation */ - QString & type() {return m_type;}; + TQString & type() {return m_type;}; /** * @return a localized string describing the type of the annotations * for user interface purposes. */ - QString & description() {return m_description;}; + TQString & description() {return m_description;}; /** * @return a binary blob representation of this annotation */ - QByteArray & annotation() { return m_annotation;}; + TQByteArray & annotation() { return m_annotation;}; private: - QString m_type; - QString m_description; - QByteArray m_annotation; + TQString m_type; + TQString m_description; + TQByteArray m_annotation; }; diff --git a/krita/sdk/kis_canvas_controller.h b/krita/sdk/kis_canvas_controller.h index 99d43c38..6ed8f1b9 100644 --- a/krita/sdk/kis_canvas_controller.h +++ b/krita/sdk/kis_canvas_controller.h @@ -19,12 +19,12 @@ #ifndef KIS_CANVAS_CONTROLLER_H_ #define KIS_CANVAS_CONTROLLER_H_ -#include -#include -#include +#include +#include +#include #include "kis_types.h" -class QWidget; +class TQWidget; class KisTool; class KisRect; class KisPoint; @@ -52,12 +52,12 @@ public: /** * @return the value of the horizontal scrollbar. */ - virtual Q_INT32 horzValue() const = 0; + virtual TQ_INT32 horzValue() const = 0; /** * @return the value of the vertical scrollbar */ - virtual Q_INT32 vertValue() const = 0; + virtual TQ_INT32 vertValue() const = 0; /** * Sets the horizontal and vertical scrollbars to the specified values @@ -65,25 +65,25 @@ public: * @param x the value the horizontal scrollbar is set to * @param y the value the vertical scrollbar is set to */ - virtual void scrollTo(Q_INT32 x, Q_INT32 y) = 0; + virtual void scrollTo(TQ_INT32 x, TQ_INT32 y) = 0; /** - * Tell all of the canvas to repaint itself. + * Tell all of the canvas to tqrepaint itself. */ virtual void updateCanvas() = 0; /** - * Tell the canvas to repaint the rectangle defined by x, y, w and h. + * Tell the canvas to tqrepaint the rectangle defined by x, y, w and h. * The coordinates are image coordinates. */ - virtual void updateCanvas(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) = 0; + virtual void updateCanvas(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) = 0; /** - * Tell the canvas repaint the specified rectangle. The coordinates + * Tell the canvas tqrepaint the specified rectangle. The coordinates * are image coordinates, not view coordinates. */ - virtual void updateCanvas(const QRect& rc) = 0; + virtual void updateCanvas(const TQRect& rc) = 0; /** * Increase the zoomlevel one step @@ -96,7 +96,7 @@ public: * @param x The x coordinate of the visible point in image coordinates * @param y the y coordinate of the visible point in image coordinates */ - virtual void zoomIn(Q_INT32 x, Q_INT32 y) = 0; + virtual void zoomIn(TQ_INT32 x, TQ_INT32 y) = 0; /** * Decrease the zoomlevel one step @@ -110,7 +110,7 @@ public: * @param x the x coordinate of the visible point in image coordinates * @param y the y coordinate of the visible point in image coordinates */ - virtual void zoomOut(Q_INT32 x, Q_INT32 y) = 0; + virtual void zoomOut(TQ_INT32 x, TQ_INT32 y) = 0; /** * To centre the view on the given point with the given zoom factor. @@ -126,14 +126,14 @@ public: * out as necessary. The view will be centered around the center point * of the specified rect. */ - virtual void zoomTo(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) = 0; + virtual void zoomTo(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) = 0; /** * Make the rect defined by x, y, w and h visible, zooming in or * out as necessary. The view will be centered around the center point * of the specified rect. */ - virtual void zoomTo(const QRect& r) = 0; + virtual void zoomTo(const TQRect& r) = 0; /** * Make the rect defined by x, y, w and h visible, zooming in or @@ -147,25 +147,25 @@ public: * * You can get the rectangle of the image that's visible using the * viewToWindow() functions (KisCanvasController). E.g. - * viewToWindow(QRect(0, 0, canvasWidth, canvasHeight)). + * viewToWindow(TQRect(0, 0, canvasWidth, canvasHeight)). * * Here, the view is the canvas widget in the view widget, and the window * is the window on the image. */ - virtual QPoint viewToWindow(const QPoint& pt) = 0; + virtual TQPoint viewToWindow(const TQPoint& pt) = 0; virtual KisPoint viewToWindow(const KisPoint& pt) = 0; - virtual QRect viewToWindow(const QRect& rc) = 0; + virtual TQRect viewToWindow(const TQRect& rc) = 0; virtual KisRect viewToWindow(const KisRect& rc) = 0; - virtual void viewToWindow(Q_INT32 *x, Q_INT32 *y) = 0; + virtual void viewToWindow(TQ_INT32 *x, TQ_INT32 *y) = 0; /** * Conversion functions from image coordinates to view coordinates */ - virtual QPoint windowToView(const QPoint& pt) = 0; + virtual TQPoint windowToView(const TQPoint& pt) = 0; virtual KisPoint windowToView(const KisPoint& pt) = 0; - virtual QRect windowToView(const QRect& rc) = 0; + virtual TQRect windowToView(const TQRect& rc) = 0; virtual KisRect windowToView(const KisRect& rc) = 0; - virtual void windowToView(Q_INT32 *x, Q_INT32 *y) = 0; + virtual void windowToView(TQ_INT32 *x, TQ_INT32 *y) = 0; /** * Set the cursor shown when the pointer is over the canvas widget to @@ -174,7 +174,7 @@ public: * @param cursor the new cursor * @return the old cursor */ - virtual QCursor setCanvasCursor(const QCursor & cursor) = 0; + virtual TQCursor setCanvasCursor(const TQCursor & cursor) = 0; /** * Set the active input device to the specified input device, This diff --git a/krita/sdk/kis_canvas_subject.h b/krita/sdk/kis_canvas_subject.h index 7fcef988..07713576 100644 --- a/krita/sdk/kis_canvas_subject.h +++ b/krita/sdk/kis_canvas_subject.h @@ -33,8 +33,8 @@ class KisToolControllerInterface; class KisUndoAdapter; class KisProgressDisplayInterface; class KisSelectionManager; -class QWidget; -class QCursor; +class TQWidget; +class TQCursor; class KisColor; class KoPaletteManager; class KisProfile; diff --git a/krita/sdk/kis_generic_registry.h b/krita/sdk/kis_generic_registry.h index bb930d90..211ccef7 100644 --- a/krita/sdk/kis_generic_registry.h +++ b/krita/sdk/kis_generic_registry.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -68,7 +68,7 @@ public: _T remove(const KisID& name) { _T p = 0; - typename storageMap::iterator it = m_storage.find(name); + typename storageMap::iterator it = m_storage.tqfind(name); if (it != m_storage.end()) { m_storage.erase(it); p = it->second; @@ -80,7 +80,7 @@ public: * @param id the identifiant of the object * @return the object which have been remove from the registry and which can be safely delete */ - _T remove(const QString& id) + _T remove(const TQString& id) { return remove(KisID(id,"")); } @@ -92,7 +92,7 @@ public: _T get(const KisID& name) const { _T p = 0; - typename storageMap::const_iterator it = m_storage.find(name); + typename storageMap::const_iterator it = m_storage.tqfind(name); if (it != m_storage.end()) { p = it->second; } @@ -103,7 +103,7 @@ public: * Get a single entry based on the identifying part of KisID, not the * the descriptive part. */ - _T get(const QString& id) const + _T get(const TQString& id) const { return get(KisID(id, "")); } @@ -114,11 +114,11 @@ public: */ bool exists(const KisID& id) const { - typename storageMap::const_iterator it = m_storage.find(id); + typename storageMap::const_iterator it = m_storage.tqfind(id); return (it != m_storage.end()); } - bool exists(const QString& id) const + bool exists(const TQString& id) const { return exists(KisID(id, "")); } @@ -128,7 +128,7 @@ public: * @param result The result is filled in this variable * @return true if the search has been successfull, false otherwise */ - bool search(const QString& t, KisID& result) const + bool search(const TQString& t, KisID& result) const { for(typename storageMap::const_iterator it = m_storage.begin(); it != m_storage.end(); ++it) diff --git a/krita/sdk/kis_global.h b/krita/sdk/kis_global.h index 31a982da..7e00668a 100644 --- a/krita/sdk/kis_global.h +++ b/krita/sdk/kis_global.h @@ -22,23 +22,23 @@ #include #include LCMS_HEADER #include -#include +#include #include #define KRITA_VERSION VERSION -const Q_UINT8 Q_UINT8_MAX = UCHAR_MAX; -const Q_UINT16 Q_UINT16_MAX = 65535; +const TQ_UINT8 TQ_UINT8_MAX = UCHAR_MAX; +const TQ_UINT16 TQ_UINT16_MAX = 65535; -const Q_INT32 Q_INT32_MAX = (2147483647); -const Q_INT32 Q_INT32_MIN = (-2147483647-1); +const TQ_INT32 TQ_INT32_MAX = (2147483647); +const TQ_INT32 TQ_INT32_MIN = (-2147483647-1); -const Q_UINT8 OPACITY_TRANSPARENT = 0; -const Q_UINT8 OPACITY_OPAQUE = UCHAR_MAX; +const TQ_UINT8 OPACITY_TRANSPARENT = 0; +const TQ_UINT8 OPACITY_OPAQUE = UCHAR_MAX; -const Q_UINT8 MAX_SELECTED = UCHAR_MAX; -const Q_UINT8 MIN_SELECTED = 0; -const Q_UINT8 SELECTION_THRESHOLD = 1; +const TQ_UINT8 MAX_SELECTED = UCHAR_MAX; +const TQ_UINT8 MIN_SELECTED = 0; +const TQ_UINT8 SELECTION_THRESHOLD = 1; enum enumCursorStyle { CURSOR_STYLE_TOOLICON = 0, @@ -55,11 +55,11 @@ enum enumResourceTypes { }; /* - * Most wacom pads have 512 levels of pressure; Qt only supports 256, and even + * Most wacom pads have 512 levels of pressure; TQt only supports 256, and even * this is downscaled to 127 levels because the line would be too jittery, and - * the amount of masks take too much memory otherwise. + * the amount of tqmasks take too much memory otherwise. */ -const Q_INT32 PRESSURE_LEVELS= 127; +const TQ_INT32 PRESSURE_LEVELS= 127; const double PRESSURE_MIN = 0.0; const double PRESSURE_MAX = 1.0; const double PRESSURE_DEFAULT = (PRESSURE_MAX - PRESSURE_MIN) / 2; @@ -71,12 +71,12 @@ const double PRESSURE_THRESHOLD = 5.0 / 255.0; namespace krita { // String constants for palettes and palette widgets - const QString TOOL_OPTION_WIDGET ("tooloptions"); + const TQString TOOL_OPTION_WIDGET ("tooloptions"); - const QString CONTROL_PALETTE ("controlpalette"); - const QString PAINTBOX ("paintbox"); - const QString COLORBOX ("colorbox"); - const QString LAYERBOX ("layerbox"); + const TQString CONTROL_PALETTE ("controlpalette"); + const TQString PAINTBOX ("paintbox"); + const TQString COLORBOX ("colorbox"); + const TQString LAYERBOX ("layerbox"); } #endif // KISGLOBAL_H_ diff --git a/krita/sdk/kis_id.h b/krita/sdk/kis_id.h index b5651505..7f6f9685 100644 --- a/krita/sdk/kis_id.h +++ b/krita/sdk/kis_id.h @@ -21,8 +21,8 @@ #ifndef _KIS_ID_H_ #define _KIS_ID_H_ -#include -#include +#include +#include /** * Krita has a large number of extensible resources. Think: @@ -59,14 +59,14 @@ class KisID { public: - KisID() : m_id(QString::null), m_name(QString::null) {} + KisID() : m_id(TQString()), m_name(TQString()) {} - KisID(const QString & id, const QString & name = QString::null) + KisID(const TQString & id, const TQString & name = TQString()) : m_id(id), m_name(name) {}; - QString id() const { return m_id; }; - QString name() const { return m_name; }; + TQString id() const { return m_id; }; + TQString name() const { return m_name; }; friend inline bool operator==(const KisID &, const KisID &); friend inline bool operator!=(const KisID &, const KisID &); @@ -75,8 +75,8 @@ public: private: - QString m_id; - QString m_name; + TQString m_id; + TQString m_name; }; @@ -103,6 +103,6 @@ inline bool operator>(const KisID &v1, const KisID &v2) } -typedef QValueList KisIDList; +typedef TQValueList KisIDList; #endif // _KIS_ID_H_ diff --git a/krita/sdk/kis_progress_display_interface.h b/krita/sdk/kis_progress_display_interface.h index bf0dede3..2674c6ab 100644 --- a/krita/sdk/kis_progress_display_interface.h +++ b/krita/sdk/kis_progress_display_interface.h @@ -24,35 +24,35 @@ class KisProgressSubject; namespace KisProgress { - const int ProgressEventBase = QEvent::User + 42 + 42; + const int ProgressEventBase = TQEvent::User + 42 + 42; - class UpdateEvent : QCustomEvent { + class UpdateEvent : TQCustomEvent { public: - UpdateEvent(int percent) : QCustomEvent(ProgressEventBase + 1), m_percent(percent) {}; + UpdateEvent(int percent) : TQCustomEvent(ProgressEventBase + 1), m_percent(percent) {}; int m_percent; }; - class UpdateStageEvent : QCustomEvent { + class UpdateStageEvent : TQCustomEvent { public: - UpdateStageEvent(const QString & stage, int percent) : QCustomEvent(ProgressEventBase + 2 ), m_stage(stage), m_percent(percent) {}; - QString m_stage; + UpdateStageEvent(const TQString & stage, int percent) : TQCustomEvent(ProgressEventBase + 2 ), m_stage(stage), m_percent(percent) {}; + TQString m_stage; int m_percent; }; - class DoneEvent : QCustomEvent { - DoneEvent() : QCustomEvent(ProgressEventBase + 3){}; + class DoneEvent : TQCustomEvent { + DoneEvent() : TQCustomEvent(ProgressEventBase + 3){}; }; - class ErrorEvent : QCustomEvent { - ErrorEvent() : QCustomEvent(ProgressEventBase + 4){}; + class ErrorEvent : TQCustomEvent { + ErrorEvent() : TQCustomEvent(ProgressEventBase + 4){}; }; - class DestroyedEvent: QCustomEvent { - DestroyedEvent() : QCustomEvent(ProgressEventBase + 5){}; + class DestroyedEvent: TQCustomEvent { + DestroyedEvent() : TQCustomEvent(ProgressEventBase + 5){}; }; diff --git a/krita/sdk/kis_progress_subject.h b/krita/sdk/kis_progress_subject.h index d936c7b7..59a8acb1 100644 --- a/krita/sdk/kis_progress_subject.h +++ b/krita/sdk/kis_progress_subject.h @@ -19,15 +19,16 @@ #ifndef KIS_PROGRESS_SUBJECT_H_ #define KIS_PROGRESS_SUBJECT_H_ -#include +#include #include -class KRITAUI_EXPORT KisProgressSubject : public QObject { +class KRITAUI_EXPORT KisProgressSubject : public TQObject { Q_OBJECT + TQ_OBJECT protected: KisProgressSubject() {}; - KisProgressSubject(QObject * parent, const char * name) : QObject(parent, name) {}; + KisProgressSubject(TQObject * tqparent, const char * name) : TQObject(tqparent, name) {}; virtual ~KisProgressSubject(); public: @@ -35,7 +36,7 @@ public: signals: void notifyProgress(int percent); - void notifyProgressStage(const QString& stage, int percent); + void notifyProgressStage(const TQString& stage, int percent); void notifyProgressDone(); void notifyProgressError(); }; diff --git a/krita/sdk/kis_shared_ptr_vector.h b/krita/sdk/kis_shared_ptr_vector.h index 0a7695a1..679bdd9f 100644 --- a/krita/sdk/kis_shared_ptr_vector.h +++ b/krita/sdk/kis_shared_ptr_vector.h @@ -19,21 +19,21 @@ #ifndef KIS_SHARED_PTR_VECTOR_H #define KIS_SHARED_PTR_VECTOR_H -#include +#include #include /** - * QValueVector does not always destroy an element when it is erased. + * TQValueVector does not always destroy an element when it is erased. * If the items it is holding are KSharedPtr, this can result in hidden * references to objects that cannot be accounted for. This class * sets the KSharedPtr to 0 on erase, which dereferences the object as * expected. */ template -class KisSharedPtrVector : public QValueVector< KSharedPtr > +class KisSharedPtrVector : public TQValueVector< KSharedPtr > { - typedef QValueVector< KSharedPtr > super; + typedef TQValueVector< KSharedPtr > super; public: KisSharedPtrVector() {} @@ -53,11 +53,11 @@ public: typename super::iterator erase(typename super::iterator first, typename super::iterator last) { - qFill(first, last, 0); + tqFill(first, last, 0); return super::erase(first, last); } - bool contains(KSharedPtr ptr) const + bool tqcontains(KSharedPtr ptr) const { for (int i = 0, n = super::count(); i < n; ++i) if (super::at(i) == ptr) diff --git a/krita/sdk/kis_undo_adapter.h b/krita/sdk/kis_undo_adapter.h index 32cd655a..cb9172ee 100644 --- a/krita/sdk/kis_undo_adapter.h +++ b/krita/sdk/kis_undo_adapter.h @@ -19,9 +19,9 @@ #ifndef KIS_UNDO_ADAPTER_H_ #define KIS_UNDO_ADAPTER_H_ -#include +#include -class QString; +class TQString; class KCommand; /** @@ -54,7 +54,7 @@ public: virtual void addCommand(KCommand *cmd) = 0; virtual void setUndo(bool undo) = 0; virtual bool undo() const = 0; - virtual void beginMacro(const QString& macroName) = 0; + virtual void beginMacro(const TQString& macroName) = 0; virtual void endMacro() = 0; private: diff --git a/krita/ui/imageviewer.cc b/krita/ui/imageviewer.cc index 490f3451..52bc42b7 100644 --- a/krita/ui/imageviewer.cc +++ b/krita/ui/imageviewer.cc @@ -20,35 +20,35 @@ ***************************************************************************/ #include "imageviewer.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -ImageViewer::ImageViewer(QWidget *widget, const char * name) - : QScrollView(widget, name) +ImageViewer::ImageViewer(TQWidget *widget, const char * name) + : TQScrollView(widget, name) , m_isDragging(false) - , m_image(QPixmap()) + , m_image(TQPixmap()) { - m_label = new QLabel( viewport()); - setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + m_label = new TQLabel( viewport()); + tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); setCursor(KisCursor::handCursor()); addChild(m_label); } -void ImageViewer::setImage(QImage & image) +void ImageViewer::setImage(TQImage & image) { - m_image = QPixmap(image); + m_image = TQPixmap(image); m_label->setPixmap(m_image); resizeContents( m_image.width(), m_image.height() ); - repaintContents(false); + tqrepaintContents(false); } -void ImageViewer::contentsMousePressEvent(QMouseEvent *event) +void ImageViewer::contentsMousePressEvent(TQMouseEvent *event) { if(LeftButton == event->button()) { setCursor(KisCursor::closedHandCursor()); @@ -57,7 +57,7 @@ void ImageViewer::contentsMousePressEvent(QMouseEvent *event) } } -void ImageViewer::contentsMouseReleaseEvent(QMouseEvent *event) +void ImageViewer::contentsMouseReleaseEvent(TQMouseEvent *event) { if(LeftButton == event->button()) { setCursor(KisCursor::handCursor()); @@ -66,10 +66,10 @@ void ImageViewer::contentsMouseReleaseEvent(QMouseEvent *event) } } -void ImageViewer::contentsMouseMoveEvent(QMouseEvent *event) +void ImageViewer::contentsMouseMoveEvent(TQMouseEvent *event) { if(m_isDragging) { - QPoint delta = m_currentPos - event->globalPos(); + TQPoint delta = m_currentPos - event->globalPos(); scrollBy(delta.x(), delta.y()); m_currentPos = event->globalPos(); } diff --git a/krita/ui/imageviewer.h b/krita/ui/imageviewer.h index 17b482c6..1865e5d0 100644 --- a/krita/ui/imageviewer.h +++ b/krita/ui/imageviewer.h @@ -19,10 +19,10 @@ #ifndef PIXMAPVIEWER_H #define PIXMAPVIEWER_H -#include -#include +#include +#include -class QLabel; +class TQLabel; /** * A scrollable image view. @@ -30,23 +30,24 @@ class QLabel; * XXX: We should add a signal that emits newly eposed rects so the filters * don't have to filter everything, but just the the new bits. */ -class ImageViewer : public QScrollView { +class ImageViewer : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - ImageViewer(QWidget *widget, const char * name = 0); + ImageViewer(TQWidget *widget, const char * name = 0); - void setImage(QImage & image); + void setImage(TQImage & image); - void contentsMousePressEvent(QMouseEvent *event); - void contentsMouseReleaseEvent(QMouseEvent *event); - void contentsMouseMoveEvent(QMouseEvent *event); - void wheelEvent(QWheelEvent * event) { event->ignore(); }; + void contentsMousePressEvent(TQMouseEvent *event); + void contentsMouseReleaseEvent(TQMouseEvent *event); + void contentsMouseMoveEvent(TQMouseEvent *event); + void wheelEvent(TQWheelEvent * event) { event->ignore(); }; private: - QLabel* m_label; + TQLabel* m_label; bool m_isDragging; - QPoint m_currentPos; - QPixmap m_image; + TQPoint m_currentPos; + TQPixmap m_image; }; #endif diff --git a/krita/ui/kcurve.cc b/krita/ui/kcurve.cc index 8e50804f..59aa7efc 100644 --- a/krita/ui/kcurve.cc +++ b/krita/ui/kcurve.cc @@ -20,17 +20,17 @@ #include #include -// Qt includes. - -#include -#include -#include -#include -#include -#include -#include -#include -#include +// TQt includes. + +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE includes. @@ -42,8 +42,8 @@ #include "kcurve.h" -KCurve::KCurve(QWidget *parent, const char *name, WFlags f) - : QWidget(parent, name, f) +KCurve::KCurve(TQWidget *tqparent, const char *name, WFlags f) + : TQWidget(tqparent, name, f) { m_grab_point = NULL; m_readOnlyMode = false; @@ -52,16 +52,16 @@ KCurve::KCurve(QWidget *parent, const char *name, WFlags f) m_pix = NULL; setMouseTracking(true); - setPaletteBackgroundColor(Qt::NoBackground); + setPaletteBackgroundColor(TQt::NoBackground); setMinimumSize(150, 50); - QPair *p = new QPair; + TQPair *p = new TQPair; p->first = 0.0; p->second=0.0; m_points.append(p); - p = new QPair; + p = new TQPair; p->first = 1.0; p->second=1.0; m_points.append(p); m_points.setAutoDelete(true); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); } KCurve::~KCurve() @@ -73,32 +73,32 @@ void KCurve::reset(void) { m_grab_point = NULL; m_guideVisible = false; - repaint(false); + tqrepaint(false); } -void KCurve::setCurveGuide(QColor color) +void KCurve::setCurveGuide(TQColor color) { m_guideVisible = true; m_colorGuide = color; - repaint(false); + tqrepaint(false); } -void KCurve::setPixmap(QPixmap pix) +void KCurve::setPixmap(TQPixmap pix) { if (m_pix) delete m_pix; - m_pix = new QPixmap(pix); - repaint(false); + m_pix = new TQPixmap(pix); + tqrepaint(false); } -void KCurve::keyPressEvent(QKeyEvent *e) +void KCurve::keyPressEvent(TQKeyEvent *e) { - if(e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace) + if(e->key() == TQt::Key_Delete || e->key() == TQt::Key_Backspace) { - QPair *closest_point=NULL; + TQPair *closest_point=NULL; if(m_grab_point) { //first find closest point to get focus afterwards - QPair *p = m_points.first(); + TQPair *p = m_points.first(); double distance = 1000; // just a big number while(p) { @@ -113,13 +113,13 @@ void KCurve::keyPressEvent(QKeyEvent *e) m_points.remove(m_grab_point); } m_grab_point = closest_point; - repaint(false); + tqrepaint(false); } else - QWidget::keyPressEvent(e); + TQWidget::keyPressEvent(e); } -void KCurve::paintEvent(QPaintEvent *) +void KCurve::paintEvent(TQPaintEvent *) { int x, y; int wWidth = width(); @@ -129,10 +129,10 @@ void KCurve::paintEvent(QPaintEvent *) y = 0; // Drawing selection or all histogram values. - // A QPixmap is used for enable the double buffering. + // A TQPixmap is used for enable the double buffering. - QPixmap pm(size()); - QPainter p1; + TQPixmap pm(size()); + TQPainter p1; p1.begin(&pm, this); // draw background @@ -146,7 +146,7 @@ void KCurve::paintEvent(QPaintEvent *) pm.fill(); // Draw grid separators. - p1.setPen(QPen::QPen(Qt::gray, 1, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::gray, 1, TQt::SolidLine)); p1.drawLine(wWidth/3, 0, wWidth/3, wHeight); p1.drawLine(2*wWidth/3, 0, 2*wWidth/3, wHeight); p1.drawLine(0, wHeight/3, wWidth, wHeight/3); @@ -154,7 +154,7 @@ void KCurve::paintEvent(QPaintEvent *) // Draw curve. double curvePrevVal = getCurveValue(0.0); - p1.setPen(QPen::QPen(Qt::black, 1, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::black, 1, TQt::SolidLine)); for (x = 0 ; x < wWidth ; x++) { double curveX; @@ -175,7 +175,7 @@ void KCurve::paintEvent(QPaintEvent *) // Drawing curve handles. if ( !m_readOnlyMode ) { - QPair *p = m_points.first(); + TQPair *p = m_points.first(); while(p) { @@ -184,13 +184,13 @@ void KCurve::paintEvent(QPaintEvent *) if(p == m_grab_point) { - p1.setPen(QPen::QPen(Qt::red, 3, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::red, 3, TQt::SolidLine)); p1.drawEllipse( int(curveX * wWidth) - 2, wHeight - 2 - int(curveY * wHeight), 4, 4 ); } else { - p1.setPen(QPen::QPen(Qt::red, 1, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::red, 1, TQt::SolidLine)); p1.drawEllipse( int(curveX * wWidth) - 3, wHeight - 3 - int(curveY * wHeight), 6, 6 ); @@ -204,11 +204,11 @@ void KCurve::paintEvent(QPaintEvent *) bitBlt(this, 0, 0, &pm); } -void KCurve::mousePressEvent ( QMouseEvent * e ) +void KCurve::mousePressEvent ( TQMouseEvent * e ) { if (m_readOnlyMode) return; - QPair *closest_point=NULL; + TQPair *closest_point=NULL; double distance; if (e->button() != Qt::LeftButton) @@ -219,7 +219,7 @@ void KCurve::mousePressEvent ( QMouseEvent * e ) distance = 1000; // just a big number - QPair *p = m_points.first(); + TQPair *p = m_points.first(); int insert_pos,pos=0; while(p) { @@ -239,14 +239,14 @@ void KCurve::mousePressEvent ( QMouseEvent * e ) if(closest_point == NULL) { - closest_point = new QPair; + closest_point = new TQPair; closest_point->first = x; closest_point->second = y; m_points.append(closest_point); } else if(distance * width() > 5) { - closest_point = new QPair; + closest_point = new TQPair; closest_point->first = x; closest_point->second = y; m_points.insert(insert_pos, closest_point); @@ -281,10 +281,10 @@ void KCurve::mousePressEvent ( QMouseEvent * e ) } p = m_points.next(); } - repaint(false); + tqrepaint(false); } -void KCurve::mouseReleaseEvent ( QMouseEvent * e ) +void KCurve::mouseReleaseEvent ( TQMouseEvent * e ) { if (m_readOnlyMode) return; @@ -293,22 +293,22 @@ void KCurve::mouseReleaseEvent ( QMouseEvent * e ) setCursor( KCursor::arrowCursor() ); m_dragging = false; - repaint(false); + tqrepaint(false); emit modified(); } -void KCurve::mouseMoveEvent ( QMouseEvent * e ) +void KCurve::mouseMoveEvent ( TQMouseEvent * e ) { if (m_readOnlyMode) return; double x = e->pos().x() / (float)width(); double y = 1.0 - e->pos().y() / (float)height(); - if (m_dragging == false) // If no point is selected set the the cursor shape if on top + if (m_dragging == false) // If no point is selected set the the cursor tqshape if on top { double distance = 1000; double ydistance = 1000; - QPair *p = m_points.first(); + TQPair *p = m_points.first(); while(p) { if (fabs (x - p->first) < distance) @@ -349,7 +349,7 @@ void KCurve::mouseMoveEvent ( QMouseEvent * e ) emit modified(); } - repaint(false); + tqrepaint(false); } double KCurve::getCurveValue(double x) @@ -357,11 +357,11 @@ double KCurve::getCurveValue(double x) return getCurveValue(m_points, x); } -double KCurve::getCurveValue(QPtrList > &curve, double x) +double KCurve::getCurveValue(TQPtrList > &curve, double x) { double t; - QPair *p; - QPair *p0,*p1,*p2,*p3; + TQPair *p; + TQPair *p0,*p1,*p2,*p3; double c0,c1,c2,c3; double val; @@ -411,39 +411,39 @@ double KCurve::getCurveValue(QPtrList > &curve, double x) return val; } -QPtrList > KCurve::getCurve() +TQPtrList > KCurve::getCurve() { - QPtrList > outlist; - QPair *p; - QPair *outpoint; + TQPtrList > outlist; + TQPair *p; + TQPair *outpoint; p = m_points.first(); while(p) { - outpoint = new QPair(p->first, p->second); + outpoint = new TQPair(p->first, p->second); outlist.append(outpoint); p = m_points.next(); } return outlist; } -void KCurve::setCurve(QPtrList >inlist) +void KCurve::setCurve(TQPtrList >inlist) { - QPair *p; - QPair *inpoint; + TQPair *p; + TQPair *inpoint; m_points.clear(); inpoint = inlist.first(); while(inpoint) { - p = new QPair(inpoint->first, inpoint->second); + p = new TQPair(inpoint->first, inpoint->second); m_points.append(p); inpoint = inlist.next(); } } -void KCurve::leaveEvent( QEvent * ) +void KCurve::leaveEvent( TQEvent * ) { } diff --git a/krita/ui/kcurve.h b/krita/ui/kcurve.h index 412efe5b..820b5f5a 100644 --- a/krita/ui/kcurve.h +++ b/krita/ui/kcurve.h @@ -19,25 +19,26 @@ #ifndef KCURVE_H #define KCURVE_H -// Qt includes. +// TQt includes. -#include -#include -#include -#include +#include +#include +#include +#include #include -class KRITAUI_EXPORT KCurve : public QWidget +class KRITAUI_EXPORT KCurve : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KCurve(QWidget *parent = 0, const char *name = 0, WFlags f = 0); + KCurve(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); virtual ~KCurve(); void reset(void); - void setCurveGuide(QColor color); - void setPixmap(QPixmap pix); + void setCurveGuide(TQColor color); + void setPixmap(TQPixmap pix); signals: @@ -46,33 +47,33 @@ signals: protected: - void keyPressEvent(QKeyEvent *); - void paintEvent(QPaintEvent *); - void mousePressEvent (QMouseEvent * e); - void mouseReleaseEvent ( QMouseEvent * e ); - void mouseMoveEvent ( QMouseEvent * e ); - void leaveEvent ( QEvent * ); + void keyPressEvent(TQKeyEvent *); + void paintEvent(TQPaintEvent *); + void mousePressEvent (TQMouseEvent * e); + void mouseReleaseEvent ( TQMouseEvent * e ); + void mouseMoveEvent ( TQMouseEvent * e ); + void leaveEvent ( TQEvent * ); public: - static double getCurveValue(QPtrList > &curve, double x); + static double getCurveValue(TQPtrList > &curve, double x); double getCurveValue(double x); - QPtrList > getCurve(); - void setCurve(QPtrList >inlist); + TQPtrList > getCurve(); + void setCurve(TQPtrList >inlist); private: double m_leftmost; double m_rightmost; - QPair *m_grab_point; + TQPair *m_grab_point; bool m_dragging; double m_grabOffsetX; double m_grabOffsetY; bool m_readOnlyMode; bool m_guideVisible; - QColor m_colorGuide; - QPtrList > m_points; - QPixmap *m_pix; + TQColor m_colorGuide; + TQPtrList > m_points; + TQPixmap *m_pix; }; diff --git a/krita/ui/kis_autobrush.cc b/krita/ui/kis_autobrush.cc index d1f6dce2..3d081188 100644 --- a/krita/ui/kis_autobrush.cc +++ b/krita/ui/kis_autobrush.cc @@ -19,14 +19,14 @@ #include "kis_autobrush.h" #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -KisAutobrush::KisAutobrush(QWidget *parent, const char* name, const QString& caption) : KisWdgAutobrush(parent, name) +KisAutobrush::KisAutobrush(TQWidget *tqparent, const char* name, const TQString& caption) : KisWdgAutobrush(tqparent, name) { setCaption(caption); @@ -36,30 +36,30 @@ KisAutobrush::KisAutobrush(QWidget *parent, const char* name, const QString& cap linkFadeToggled(m_linkSize); linkSizeToggled(m_linkFade); - connect(bnLinkSize, SIGNAL(toggled(bool)), this, SLOT(linkSizeToggled( bool ))); - connect(bnLinkFade, SIGNAL(toggled(bool)), this, SLOT(linkFadeToggled( bool ))); + connect(bnLinkSize, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(linkSizeToggled( bool ))); + connect(bnLinkFade, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(linkFadeToggled( bool ))); - connect((QObject*)comboBoxShape, SIGNAL(activated(int)), this, SLOT(paramChanged())); + connect((TQObject*)comboBoxShape, TQT_SIGNAL(activated(int)), this, TQT_SLOT(paramChanged())); spinBoxWidth->setMinValue(1); - connect(spinBoxWidth,SIGNAL(valueChanged(int)),this,SLOT(spinBoxWidthChanged(int))); + connect(spinBoxWidth,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxWidthChanged(int))); spinBoxHeigth->setMinValue(1); - connect(spinBoxHeigth,SIGNAL(valueChanged(int)),this,SLOT(spinBoxHeigthChanged(int))); + connect(spinBoxHeigth,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHeigthChanged(int))); spinBoxHorizontal->setMinValue(0); - connect(spinBoxHorizontal,SIGNAL(valueChanged(int)),this,SLOT(spinBoxHorizontalChanged(int))); + connect(spinBoxHorizontal,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHorizontalChanged(int))); spinBoxVertical->setMinValue(0); - connect(spinBoxVertical,SIGNAL(valueChanged(int)),this,SLOT(spinBoxVerticalChanged(int))); + connect(spinBoxVertical,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxVerticalChanged(int))); - m_brsh = new QImage(1,1,32); + m_brsh = new TQImage(1,1,32); Q_CHECK_PTR(m_brsh); paramChanged(); - connect(brushPreview, SIGNAL(clicked()), SLOT(paramChanged())); + connect(brushPreview, TQT_SIGNAL(clicked()), TQT_SLOT(paramChanged())); } -void KisAutobrush::resizeEvent ( QResizeEvent * ) +void KisAutobrush::resizeEvent ( TQResizeEvent * ) { brushPreview->setMinimumHeight(brushPreview->width()); // dirty hack ! brushPreview->setMaximumHeight(brushPreview->width()); // dirty hack ! @@ -72,8 +72,8 @@ void KisAutobrush::activate() void KisAutobrush::paramChanged() { - Q_INT32 fh = QMIN( spinBoxWidth->value()/2, spinBoxHorizontal->value() ) ; - Q_INT32 fv = QMIN( spinBoxHeigth->value()/2, spinBoxVertical->value() ); + TQ_INT32 fh = TQMIN( spinBoxWidth->value()/2, spinBoxHorizontal->value() ) ; + TQ_INT32 fv = TQMIN( spinBoxHeigth->value()/2, spinBoxVertical->value() ); KisAutobrushShape* kas; if(comboBoxShape->currentItem() == 0) // use index compare instead of comparing a translatable string @@ -88,8 +88,8 @@ void KisAutobrush::paramChanged() } kas->createBrush(m_brsh); - QPixmap p; - QImage pi(*m_brsh); + TQPixmap p; + TQImage pi(*m_brsh); double coeff = 1.0; int bPw = brushPreview->width()-3; if(pi.width() > bPw) diff --git a/krita/ui/kis_autobrush.h b/krita/ui/kis_autobrush.h index 35392320..92b8509d 100644 --- a/krita/ui/kis_autobrush.h +++ b/krita/ui/kis_autobrush.h @@ -19,15 +19,16 @@ #ifndef _KIS_AUTOBRUSH_H_ #define _KIS_AUTOBRUSH_H_ -#include +#include #include "wdgautobrush.h" #include class KisAutobrush : public KisWdgAutobrush { Q_OBJECT + TQ_OBJECT public: - KisAutobrush(QWidget *parent, const char* name, const QString& caption); + KisAutobrush(TQWidget *tqparent, const char* name, const TQString& caption); void activate(); signals: @@ -43,10 +44,10 @@ private slots: void linkFadeToggled(bool); protected: - virtual void resizeEvent ( QResizeEvent * ); + virtual void resizeEvent ( TQResizeEvent * ); private: - QImage* m_brsh; + TQImage* m_brsh; bool m_linkSize; bool m_linkFade; }; diff --git a/krita/ui/kis_autogradient.cc b/krita/ui/kis_autogradient.cc index 79b6bb63..86b755f9 100644 --- a/krita/ui/kis_autogradient.cc +++ b/krita/ui/kis_autogradient.cc @@ -19,8 +19,8 @@ #include "kis_autogradient.h" -#include -#include +#include +#include #include #include @@ -32,23 +32,23 @@ /****************************** KisAutogradient ******************************/ -KisAutogradient::KisAutogradient(QWidget *parent, const char* name, const QString& caption) : KisWdgAutogradient(parent, name) +KisAutogradient::KisAutogradient(TQWidget *tqparent, const char* name, const TQString& caption) : KisWdgAutogradient(tqparent, name) { setCaption(caption); m_autogradientResource = new KisAutogradientResource(); - m_autogradientResource->createSegment( INTERP_LINEAR, COLOR_INTERP_RGB, 0.0, 1.0, 0.5, Qt::black, Qt::white ); - connect(gradientSlider, SIGNAL( sigSelectedSegment( KisGradientSegment* ) ), SLOT( slotSelectedSegment(KisGradientSegment*) )); - connect(gradientSlider, SIGNAL( sigChangedSegment(KisGradientSegment*) ), SLOT( slotChangedSegment(KisGradientSegment*) )); + m_autogradientResource->createSegment( INTERP_LINEAR, COLOR_INTERP_RGB, 0.0, 1.0, 0.5, TQt::black, TQt::white ); + connect(gradientSlider, TQT_SIGNAL( sigSelectedSegment( KisGradientSegment* ) ), TQT_SLOT( slotSelectedSegment(KisGradientSegment*) )); + connect(gradientSlider, TQT_SIGNAL( sigChangedSegment(KisGradientSegment*) ), TQT_SLOT( slotChangedSegment(KisGradientSegment*) )); gradientSlider->setGradientResource( m_autogradientResource ); - connect(comboBoxColorInterpolationType, SIGNAL( activated(int) ), SLOT( slotChangedColorInterpolation(int) )); - connect(comboBoxInterpolationType, SIGNAL( activated(int) ), SLOT( slotChangedInterpolation(int) )); - connect(leftColorButton, SIGNAL( changed(const QColor&) ), SLOT( slotChangedLeftColor(const QColor&) )); - connect(rightColorButton, SIGNAL( changed(const QColor&) ), SLOT( slotChangedRightColor(const QColor&) )); + connect(comboBoxColorInterpolationType, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotChangedColorInterpolation(int) )); + connect(comboBoxInterpolationType, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotChangedInterpolation(int) )); + connect(leftColorButton, TQT_SIGNAL( changed(const TQColor&) ), TQT_SLOT( slotChangedLeftColor(const TQColor&) )); + connect(rightColorButton, TQT_SIGNAL( changed(const TQColor&) ), TQT_SLOT( slotChangedRightColor(const TQColor&) )); // intNumInputLeftOpacity->setRange( 0, 100, false); - connect(intNumInputLeftOpacity, SIGNAL( valueChanged(int) ), SLOT( slotChangedLeftOpacity(int) )); + connect(intNumInputLeftOpacity, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotChangedLeftOpacity(int) )); // intNumInputRightOpacity->setRange( 0, 100, false); - connect(intNumInputRightOpacity, SIGNAL( valueChanged(int) ), SLOT( slotChangedRightOpacity(int) )); + connect(intNumInputRightOpacity, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotChangedRightOpacity(int) )); } @@ -64,10 +64,10 @@ void KisAutogradient::slotSelectedSegment(KisGradientSegment* segment) comboBoxColorInterpolationType->setCurrentItem( segment->colorInterpolation() ); comboBoxInterpolationType->setCurrentItem( segment->interpolation() ); - int leftOpacity = qRound(segment->startColor().alpha() * 100); + int leftOpacity = tqRound(segment->startColor().alpha() * 100); intNumInputLeftOpacity->setValue( leftOpacity ); - int rightOpacity = qRound(segment->endColor().alpha() * 100); + int rightOpacity = tqRound(segment->endColor().alpha() * 100); intNumInputRightOpacity->setValue( rightOpacity ); paramChanged(); @@ -98,7 +98,7 @@ void KisAutogradient::slotChangedColorInterpolation(int type) paramChanged(); } -void KisAutogradient::slotChangedLeftColor( const QColor& color) +void KisAutogradient::slotChangedLeftColor( const TQColor& color) { KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) @@ -108,12 +108,12 @@ void KisAutogradient::slotChangedLeftColor( const QColor& color) paramChanged(); } -void KisAutogradient::slotChangedRightColor( const QColor& color) +void KisAutogradient::slotChangedRightColor( const TQColor& color) { KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) segment->setEndColor( Color( color, segment->endColor().alpha() ) ); - gradientSlider->repaint(); + gradientSlider->tqrepaint(); paramChanged(); } @@ -123,7 +123,7 @@ void KisAutogradient::slotChangedLeftOpacity( int value ) KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) segment->setStartColor( Color( segment->startColor().color(), (double)value / 100 ) ); - gradientSlider->repaint(false); + gradientSlider->tqrepaint(false); paramChanged(); } @@ -133,7 +133,7 @@ void KisAutogradient::slotChangedRightOpacity( int value ) KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) segment->setEndColor( Color( segment->endColor().color(), (double)value / 100 ) ); - gradientSlider->repaint(false); + gradientSlider->tqrepaint(false); paramChanged(); } diff --git a/krita/ui/kis_autogradient.h b/krita/ui/kis_autogradient.h index a2865d5e..7399aa67 100644 --- a/krita/ui/kis_autogradient.h +++ b/krita/ui/kis_autogradient.h @@ -29,9 +29,10 @@ class KisAutogradientResource; class KisAutogradient : public KisWdgAutogradient { Q_OBJECT + TQ_OBJECT public: - KisAutogradient(QWidget *parent, const char* name, const QString& caption); + KisAutogradient(TQWidget *tqparent, const char* name, const TQString& caption); void activate(); signals: void activatedResource(KisResource *r); @@ -42,8 +43,8 @@ class KisAutogradient : public KisWdgAutogradient void slotChangedSegment(KisGradientSegment* segment); void slotChangedInterpolation(int type); void slotChangedColorInterpolation(int type); - void slotChangedLeftColor( const QColor& color); - void slotChangedRightColor( const QColor& color); + void slotChangedLeftColor( const TQColor& color); + void slotChangedRightColor( const TQColor& color); void slotChangedLeftOpacity( int value ); void slotChangedRightOpacity( int value ); void paramChanged(); diff --git a/krita/ui/kis_birdeye_box.cc b/krita/ui/kis_birdeye_box.cc index 54335f9c..1484563f 100644 --- a/krita/ui/kis_birdeye_box.cc +++ b/krita/ui/kis_birdeye_box.cc @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qlayout.h" -#include "qlabel.h" -#include "qpixmap.h" -#include "qpainter.h" -#include "qimage.h" +#include "tqlayout.h" +#include "tqlabel.h" +#include "tqpixmap.h" +#include "tqpainter.h" +#include "tqimage.h" #include "config.h" #include LCMS_HEADER #include "klocale.h" -#include "qtooltip.h" +#include "tqtooltip.h" #include "kis_view.h" #include "kis_doc.h" @@ -66,11 +66,11 @@ namespace { return m_canvasSubject->zoomFactor(); } - virtual QRect size() + virtual TQRect size() { - if (!m_canvasSubject->currentImg()) return QRect(0,0,0,0); + if (!m_canvasSubject->currentImg()) return TQRect(0,0,0,0); - return QRect(0, 0, m_canvasSubject->currentImg()->width(), m_canvasSubject->currentImg()->height()); + return TQRect(0, 0, m_canvasSubject->currentImg()->width(), m_canvasSubject->currentImg()->height()); } virtual void setViewCenterPoint(double x, double y) @@ -119,37 +119,37 @@ namespace { public: - virtual QSize pixelSize() + virtual TQSize pixelSize() { - if (!m_image) return QSize(0, 0); - return QSize(m_image->width(), m_image->height()); + if (!m_image) return TQSize(0, 0); + return TQSize(m_image->width(), m_image->height()); } - virtual QImage image(QRect r, QSize thumbnailSize) + virtual TQImage image(TQRect r, TQSize thumbnailSize) { if (!m_image || r.isEmpty() || thumbnailSize.width() == 0 || thumbnailSize.height() == 0) { - return QImage(); + return TQImage(); } KisPaintDevice thumbnailRect(m_image->colorSpace(), "thumbnailRect"); KisPaintDeviceSP mergedImage = m_image->projection(); - Q_INT32 imageWidth = m_image->width(); - Q_INT32 imageHeight = m_image->height(); - Q_UINT32 pixelSize = m_image->colorSpace()->pixelSize(); + TQ_INT32 imageWidth = m_image->width(); + TQ_INT32 imageHeight = m_image->height(); + TQ_UINT32 pixelSize = m_image->colorSpace()->pixelSize(); - for (Q_INT32 y = 0; y < r.height(); ++y) { + for (TQ_INT32 y = 0; y < r.height(); ++y) { KisHLineIteratorPixel it = thumbnailRect.createHLineIterator(0, y, r.width(), true); - Q_INT32 thumbnailY = r.y() + y; - Q_INT32 thumbnailX = r.x(); - Q_INT32 imageY = (thumbnailY * imageHeight) / thumbnailSize.height(); + TQ_INT32 thumbnailY = r.y() + y; + TQ_INT32 thumbnailX = r.x(); + TQ_INT32 imageY = (thumbnailY * imageHeight) / thumbnailSize.height(); KisHLineIteratorPixel srcIt = mergedImage -> createHLineIterator(0, imageY, imageWidth, false); while (!it.isDone()) { - Q_INT32 imageX = (thumbnailX * imageWidth) / thumbnailSize.width(); - Q_INT32 dx = imageX - srcIt.x(); + TQ_INT32 imageX = (thumbnailX * imageWidth) / thumbnailSize.width(); + TQ_INT32 dx = imageX - srcIt.x(); srcIt += dx; //KisColor pixelColor = mergedImage->colorAt(imageX, imageY); @@ -160,7 +160,7 @@ namespace { } } - return thumbnailRect.convertToQImage(m_canvasSubject->monitorProfile(), 0, 0, r.width(), r.height(), + return thumbnailRect.convertToTQImage(m_canvasSubject->monitorProfile(), 0, 0, r.width(), r.height(), m_canvasSubject->HDRExposure()); } @@ -177,12 +177,12 @@ namespace { } -KisBirdEyeBox::KisBirdEyeBox(KisView * view, QWidget* parent, const char* name) - : QWidget(parent, name) +KisBirdEyeBox::KisBirdEyeBox(KisView * view, TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name) , m_view(view) , m_subject(view->canvasSubject()) { - QVBoxLayout * l = new QVBoxLayout(this); + TQVBoxLayout * l = new TQVBoxLayout(this); m_image = m_subject->currentImg(); @@ -192,38 +192,38 @@ KisBirdEyeBox::KisBirdEyeBox(KisView * view, QWidget* parent, const char* name) m_birdEyePanel = new KoBirdEyePanel(m_zoomAdapter, ktp, kpc, this); - connect(view, SIGNAL(cursorPosition( Q_INT32, Q_INT32 )), m_birdEyePanel, SLOT(cursorPosChanged( Q_INT32, Q_INT32 ))); - connect(view, SIGNAL(viewTransformationsChanged()), m_birdEyePanel, SLOT(slotViewTransformationChanged())); + connect(view, TQT_SIGNAL(cursorPosition( TQ_INT32, TQ_INT32 )), m_birdEyePanel, TQT_SLOT(cursorPosChanged( TQ_INT32, TQ_INT32 ))); + connect(view, TQT_SIGNAL(viewTransformationsChanged()), m_birdEyePanel, TQT_SLOT(slotViewTransformationChanged())); l->addWidget(m_birdEyePanel); - QHBoxLayout * hl = new QHBoxLayout(l); + TQHBoxLayout * hl = new TQHBoxLayout(l); - m_exposureLabel = new QLabel(i18n("Exposure:"), this); + m_exposureLabel = new TQLabel(i18n("Exposure:"), this); hl->addWidget(m_exposureLabel); m_exposureDoubleWidget = new KisDoubleWidget(-10, 10, this); - m_exposureDoubleWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + m_exposureDoubleWidget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); hl->addWidget(m_exposureDoubleWidget); - QToolTip::add(m_exposureDoubleWidget, i18n("Select the exposure (stops) for HDR images")); - l->addItem(new QSpacerItem(0, 1, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding)); + TQToolTip::add(m_exposureDoubleWidget, i18n("Select the exposure (stops) for HDR images")); + l->addItem(new TQSpacerItem(0, 1, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding)); m_exposureDoubleWidget->setPrecision(1); m_exposureDoubleWidget->setValue(0); m_exposureDoubleWidget->setLineStep(0.1); m_exposureDoubleWidget->setPageStep(1); - connect(m_exposureDoubleWidget, SIGNAL(valueChanged(double)), SLOT(exposureValueChanged(double))); - connect(m_exposureDoubleWidget, SIGNAL(sliderPressed()), SLOT(exposureSliderPressed())); - connect(m_exposureDoubleWidget, SIGNAL(sliderReleased()), SLOT(exposureSliderReleased())); + connect(m_exposureDoubleWidget, TQT_SIGNAL(valueChanged(double)), TQT_SLOT(exposureValueChanged(double))); + connect(m_exposureDoubleWidget, TQT_SIGNAL(sliderPressed()), TQT_SLOT(exposureSliderPressed())); + connect(m_exposureDoubleWidget, TQT_SIGNAL(sliderReleased()), TQT_SLOT(exposureSliderReleased())); m_draggingExposureSlider = false; Q_ASSERT(m_subject->document() != 0); - connect(m_subject->document(), SIGNAL(sigCommandExecuted()), SLOT(slotDocCommandExecuted())); + connect(m_subject->document(), TQT_SIGNAL(sigCommandExecuted()), TQT_SLOT(slotDocCommandExecuted())); if (m_image) { - connect(m_image, SIGNAL(sigImageUpdated(QRect)), SLOT(slotImageUpdated(QRect))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(slotImageUpdated(TQRect))); } } @@ -245,9 +245,9 @@ void KisBirdEyeBox::setImage(KisImageSP image) m_birdEyePanel->setThumbnailProvider(ktp); if (m_image) { - connect(m_image, SIGNAL(sigImageUpdated(QRect)), SLOT(slotImageUpdated(QRect))); - connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); - connect(m_image, SIGNAL(sigColorSpaceChanged(KisColorSpace *)), SLOT(slotImageColorSpaceChanged(KisColorSpace *))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(slotImageUpdated(TQRect))); + connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); + connect(m_image, TQT_SIGNAL(sigColorSpaceChanged(KisColorSpace *)), TQT_SLOT(slotImageColorSpaceChanged(KisColorSpace *))); m_birdEyePanel->slotUpdate(m_image->bounds()); slotImageColorSpaceChanged(m_image->colorSpace()); } @@ -259,16 +259,16 @@ void KisBirdEyeBox::slotDocCommandExecuted() if (!m_dirtyRect.isEmpty()) { m_birdEyePanel->slotUpdate(m_dirtyRect); } - m_dirtyRect = QRect(); + m_dirtyRect = TQRect(); } } -void KisBirdEyeBox::slotImageUpdated(QRect r) +void KisBirdEyeBox::slotImageUpdated(TQRect r) { m_dirtyRect |= r; } -void KisBirdEyeBox::slotImageSizeChanged(Q_INT32 /*w*/, Q_INT32 /*h*/) +void KisBirdEyeBox::slotImageSizeChanged(TQ_INT32 /*w*/, TQ_INT32 /*h*/) { if (m_image) { m_birdEyePanel->slotUpdate(m_image->bounds()); diff --git a/krita/ui/kis_birdeye_box.h b/krita/ui/kis_birdeye_box.h index 46b6d72d..b9550474 100644 --- a/krita/ui/kis_birdeye_box.h +++ b/krita/ui/kis_birdeye_box.h @@ -20,7 +20,7 @@ #ifndef KIS_BIRDEYE_BOX_H #define KIS_BIRDEYE_BOX_H -#include "qwidget.h" +#include "tqwidget.h" #include "kis_types.h" @@ -31,21 +31,22 @@ class KisCanvasSubject; class KoZoomAdapter; class KisColorSpace; -class KisBirdEyeBox : public QWidget +class KisBirdEyeBox : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KisBirdEyeBox(KisView * view, QWidget * parent = 0, const char* name=0); + KisBirdEyeBox(KisView * view, TQWidget * tqparent = 0, const char* name=0); ~KisBirdEyeBox(); void setImage(KisImageSP image); public slots: void slotDocCommandExecuted(); - void slotImageUpdated(QRect r); - void slotImageSizeChanged(Q_INT32 w, Q_INT32 h); + void slotImageUpdated(TQRect r); + void slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h); void slotImageColorSpaceChanged(KisColorSpace *cs); protected slots: @@ -56,13 +57,13 @@ protected slots: private: KoBirdEyePanel * m_birdEyePanel; KisDoubleWidget * m_exposureDoubleWidget; - QLabel *m_exposureLabel; + TQLabel *m_exposureLabel; KisView * m_view; KisCanvasSubject * m_subject; bool m_draggingExposureSlider; KoZoomAdapter * m_zoomAdapter; KisImageSP m_image; - QRect m_dirtyRect; + TQRect m_dirtyRect; }; #endif // KIS_BIRDEYE_BOX_H diff --git a/krita/ui/kis_boundary_painter.cc b/krita/ui/kis_boundary_painter.cc index b8dfc761..f8918a9d 100644 --- a/krita/ui/kis_boundary_painter.cc +++ b/krita/ui/kis_boundary_painter.cc @@ -15,17 +15,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include "kis_boundary.h" #include "kis_boundary_painter.h" #include "kis_canvas.h" #include "kis_canvas_painter.h" -QPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h) +TQPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h) { - QPixmap target(w, h); + TQPixmap target(w, h); KisCanvasPainter painter(&target); painter.eraseRect(0, 0, w, h); @@ -41,7 +41,7 @@ void KisBoundaryPainter::paint(const KisBoundary& boundary, KisCanvasPainter& pa KisBoundary::PointPairListList::const_iterator it = boundary.m_horSegments.constBegin(); KisBoundary::PointPairListList::const_iterator end = boundary.m_horSegments.constEnd(); - // Horizontal + //Qt::Horizontal while (it != end) { KisBoundary::PointPairList::const_iterator lineIt = (*it).constBegin(); KisBoundary::PointPairList::const_iterator lineEnd = (*it).constEnd(); @@ -58,7 +58,7 @@ void KisBoundaryPainter::paint(const KisBoundary& boundary, KisCanvasPainter& pa ++it; } - // Vertical + //Qt::Vertical it = boundary.m_vertSegments.constBegin(); end = boundary.m_vertSegments.constEnd(); diff --git a/krita/ui/kis_boundary_painter.h b/krita/ui/kis_boundary_painter.h index 10665ee9..c8f18cd4 100644 --- a/krita/ui/kis_boundary_painter.h +++ b/krita/ui/kis_boundary_painter.h @@ -26,7 +26,7 @@ class KisCanvasPainter; class KRITACORE_EXPORT KisBoundaryPainter { public: static void paint(const KisBoundary& boundary, KisCanvasPainter& painter); - static QPixmap createPixmap(const KisBoundary& boundary, int w, int h); + static TQPixmap createPixmap(const KisBoundary& boundary, int w, int h); }; #endif // _KIS_BOUNDARY_PAINTER_H_ diff --git a/krita/ui/kis_brush_chooser.cc b/krita/ui/kis_brush_chooser.cc index 03f6c502..69aeafdf 100644 --- a/krita/ui/kis_brush_chooser.cc +++ b/krita/ui/kis_brush_chooser.cc @@ -15,9 +15,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -27,26 +27,26 @@ #include "kis_icon_item.h" #include "kis_brush.h" -KisBrushChooser::KisBrushChooser(QWidget *parent, const char *name) - : super(parent, name) +KisBrushChooser::KisBrushChooser(TQWidget *tqparent, const char *name) + : super(tqparent, name) { - m_lbSpacing = new QLabel(i18n("Spacing:"), this); + m_lbSpacing = new TQLabel(i18n("Spacing:"), this); m_slSpacing = new KisDoubleWidget(0.0, 10, this, "double_widget"); - m_slSpacing->setTickmarks(QSlider::Below); + m_slSpacing->setTickmarks(TQSlider::Below); m_slSpacing->setTickInterval(1); - QObject::connect(m_slSpacing, SIGNAL(valueChanged(double)), this, SLOT(slotSetItemSpacing(double))); + TQObject::connect(m_slSpacing, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotSetItemSpacing(double))); - m_chkColorMask = new QCheckBox(i18n("Use color as mask"), this); - QObject::connect(m_chkColorMask, SIGNAL(toggled(bool)), this, SLOT(slotSetItemUseColorAsMask(bool))); + m_chkColorMask = new TQCheckBox(i18n("Use color as tqmask"), this); + TQObject::connect(m_chkColorMask, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetItemUseColorAsMask(bool))); - m_lbName = new QLabel(this); + m_lbName = new TQLabel(this); - QVBoxLayout *mainLayout = new QVBoxLayout(this, 2, -1, "main layout"); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 2, -1, "main tqlayout"); mainLayout->addWidget(m_lbName); mainLayout->addWidget(chooserWidget(), 10); - QGridLayout *spacingLayout = new QGridLayout( 2, 2); + TQGridLayout *spacingLayout = new TQGridLayout( 2, 2); mainLayout->addLayout(spacingLayout, 1); @@ -89,7 +89,7 @@ void KisBrushChooser::update(KoIconItem *item) if (kisItem) { KisBrush *brush = static_cast(kisItem->resource()); - QString text = QString("%1 (%2 x %3)").arg(brush->name()).arg(brush->width()).arg(brush->height()); + TQString text = TQString("%1 (%2 x %3)").tqarg(brush->name()).tqarg(brush->width()).tqarg(brush->height()); m_lbName->setText(text); m_slSpacing->setValue(brush->spacing()); diff --git a/krita/ui/kis_brush_chooser.h b/krita/ui/kis_brush_chooser.h index 942742d1..99438e70 100644 --- a/krita/ui/kis_brush_chooser.h +++ b/krita/ui/kis_brush_chooser.h @@ -20,17 +20,18 @@ #include "kis_itemchooser.h" -class QLabel; -class QCheckBox; +class TQLabel; +class TQCheckBox; class KisDoubleWidget; class KisBrushChooser : public KisItemChooser { typedef KisItemChooser super; Q_OBJECT + TQ_OBJECT public: - KisBrushChooser(QWidget *parent = 0, const char *name = 0); + KisBrushChooser(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisBrushChooser(); protected: @@ -41,10 +42,10 @@ private slots: void slotSetItemUseColorAsMask(bool); private: - QLabel *m_lbName; - QLabel *m_lbSpacing; + TQLabel *m_lbName; + TQLabel *m_lbSpacing; KisDoubleWidget *m_slSpacing; - QCheckBox *m_chkColorMask; + TQCheckBox *m_chkColorMask; }; #endif // KIS_BRUSH_CHOOSER_H_ diff --git a/krita/ui/kis_button_event.h b/krita/ui/kis_button_event.h index e8b7fc2b..f9b6a385 100644 --- a/krita/ui/kis_button_event.h +++ b/krita/ui/kis_button_event.h @@ -23,7 +23,7 @@ class KisButtonEvent : public KisEvent { typedef KisEvent super; public: - Qt::ButtonState button() const { return m_button; } + TQt::ButtonState button() const { return m_button; } protected: KisButtonEvent() {} @@ -33,12 +33,12 @@ protected: const KisPoint& globalPos, double pressure, double xTilt, double yTilt, - Qt::ButtonState button, - Qt::ButtonState state) + TQt::ButtonState button, + TQt::ButtonState state) : super(type, device, pos, globalPos, pressure, xTilt, yTilt, state) , m_button(button) {} - Qt::ButtonState m_button; + TQt::ButtonState m_button; }; #endif // KIS_BUTTON_EVENT_H_ diff --git a/krita/ui/kis_button_press_event.h b/krita/ui/kis_button_press_event.h index 51ad0d66..20dfafc6 100644 --- a/krita/ui/kis_button_press_event.h +++ b/krita/ui/kis_button_press_event.h @@ -24,7 +24,7 @@ class KisButtonPressEvent : public KisButtonEvent { typedef KisButtonEvent super; public: KisButtonPressEvent() {} - KisButtonPressEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState button, Qt::ButtonState state) : super(ButtonPressEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} + KisButtonPressEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState button, TQt::ButtonState state) : super(ButtonPressEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} }; #endif // KIS_BUTTON_PRESS_EVENT_H_ diff --git a/krita/ui/kis_button_release_event.h b/krita/ui/kis_button_release_event.h index 3d9234f0..f6da4dfd 100644 --- a/krita/ui/kis_button_release_event.h +++ b/krita/ui/kis_button_release_event.h @@ -24,7 +24,7 @@ class KisButtonReleaseEvent : public KisButtonEvent { typedef KisButtonEvent super; public: KisButtonReleaseEvent() {} - KisButtonReleaseEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState button, Qt::ButtonState state) : super(ButtonReleaseEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} + KisButtonReleaseEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState button, TQt::ButtonState state) : super(ButtonReleaseEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} }; #endif // KIS_BUTTON_RELEASE_EVENT_H_ diff --git a/krita/ui/kis_canvas.cc b/krita/ui/kis_canvas.cc index 499f4c29..4335c197 100644 --- a/krita/ui/kis_canvas.cc +++ b/krita/ui/kis_canvas.cc @@ -18,7 +18,7 @@ * Some of the X11-specific event handling code is based upon code from - src/kernel/qapplication_x11.cpp from the Qt GUI Toolkit and is subject + src/kernel/qapplication_x11.cpp from the TQt GUI Toolkit and is subject to the following license and copyright: **************************************************************************** @@ -30,27 +30,27 @@ ** ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. ** -** This file is part of the kernel module of the Qt GUI Toolkit. +** This file is part of the kernel module of the TQt GUI Toolkit. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. +** LICENSE.TQPL included in the packaging of this file. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses for Unix/X11 may use this file in accordance with the Qt Commercial +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses for Unix/X11 may use this file in accordance with the TQt Commercial ** License Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. +** information about TQt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for TQPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are @@ -58,7 +58,7 @@ ** **********************************************************************/ -#include +#include #include "kis_canvas.h" #include "kis_cursor.h" @@ -73,10 +73,10 @@ #include "kis_input_device.h" #include "fixx11h.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 -#include -#include +#include +#include #include @@ -97,14 +97,14 @@ std::map KisCanvasWidget::X11TabletDevice #endif // EXTENDED_X11_TABLET_SUPPORT -#endif // Q_WS_X11 +#endif // TQ_WS_X11 KisCanvasWidget::KisCanvasWidget() { m_enableMoveEventCompressionHint = false; m_lastPressure = 0; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (!X11SupportInitialised) { initX11Support(); } @@ -118,74 +118,74 @@ KisCanvasWidget::~KisCanvasWidget() { } -void KisCanvasWidget::widgetGotPaintEvent(QPaintEvent *e) +void KisCanvasWidget::widgetGotPaintEvent(TQPaintEvent *e) { emit sigGotPaintEvent(e); } -void KisCanvasWidget::widgetGotMousePressEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMousePressEvent(TQMouseEvent *e) { KisButtonPressEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->button(), e->state()); buttonPressEvent(&ke); } -void KisCanvasWidget::widgetGotMouseReleaseEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMouseReleaseEvent(TQMouseEvent *e) { KisButtonReleaseEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->button(), e->state()); buttonReleaseEvent(&ke); } -void KisCanvasWidget::widgetGotMouseDoubleClickEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMouseDoubleClickEvent(TQMouseEvent *e) { KisDoubleClickEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->button(), e->state()); doubleClickEvent(&ke); } -void KisCanvasWidget::widgetGotMouseMoveEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMouseMoveEvent(TQMouseEvent *e) { KisMoveEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->state()); moveEvent(&ke); } -void KisCanvasWidget::widgetGotTabletEvent(QTabletEvent *e) +void KisCanvasWidget::widgetGotTabletEvent(TQTabletEvent *e) { KisInputDevice device; switch (e->device()) { default: - case QTabletEvent::NoDevice: - case QTabletEvent::Stylus: + case TQTabletEvent::NoDevice: + case TQTabletEvent::Stylus: device = KisInputDevice::stylus(); break; - case QTabletEvent::Puck: + case TQTabletEvent::Puck: device = KisInputDevice::puck(); break; - case QTabletEvent::Eraser: + case TQTabletEvent::Eraser: device = KisInputDevice::eraser(); break; } double pressure = e->pressure() / 255.0; - if (e->type() == QEvent::TabletPress) { + if (e->type() == TQEvent::TabletPress) { KisButtonPressEvent ke(device, e->pos(), e->globalPos(), pressure, e->xTilt(), e->yTilt(), Qt::LeftButton, Qt::NoButton); translateTabletEvent(&ke); } else - if (e->type() == QEvent::TabletRelease) { + if (e->type() == TQEvent::TabletRelease) { KisButtonReleaseEvent ke(device, e->pos(), e->globalPos(), pressure, e->xTilt(), e->yTilt(), Qt::LeftButton, Qt::NoButton); translateTabletEvent(&ke); } else { KisMoveEvent ke(device, e->pos(), e->globalPos(), pressure, e->xTilt(), e->yTilt(), Qt::NoButton); translateTabletEvent(&ke); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 // Fix the problem that when you change from using a tablet device to the mouse, // the first mouse button event is not recognised. This is because we handle - // X11 core mouse move events directly so Qt does not get to see them. This breaks - // the tablet event accept/ignore mechanism, causing Qt to consume the first + // X11 core mouse move events directly so TQt does not get to see them. This breaks + // the tablet event accept/ignore mechanism, causing TQt to consume the first // mouse button event it sees, instead of a mouse move. 'Ignoring' tablet move events - // stops Qt from stealing the next mouse button event. This does not affect the + // stops TQt from stealing the next mouse button event. This does not affect the // tablet aware tools as they do not care about mouse moves while the tablet device is // drawing. e->ignore(); @@ -193,37 +193,37 @@ void KisCanvasWidget::widgetGotTabletEvent(QTabletEvent *e) } } -void KisCanvasWidget::widgetGotEnterEvent(QEvent *e) +void KisCanvasWidget::widgetGotEnterEvent(TQEvent *e) { emit sigGotEnterEvent(e); } -void KisCanvasWidget::widgetGotLeaveEvent(QEvent *e) +void KisCanvasWidget::widgetGotLeaveEvent(TQEvent *e) { emit sigGotLeaveEvent(e); } -void KisCanvasWidget::widgetGotWheelEvent(QWheelEvent *e) +void KisCanvasWidget::widgetGotWheelEvent(TQWheelEvent *e) { emit sigGotMouseWheelEvent(e); } -void KisCanvasWidget::widgetGotKeyPressEvent(QKeyEvent *e) +void KisCanvasWidget::widgetGotKeyPressEvent(TQKeyEvent *e) { emit sigGotKeyPressEvent(e); } -void KisCanvasWidget::widgetGotKeyReleaseEvent(QKeyEvent *e) +void KisCanvasWidget::widgetGotKeyReleaseEvent(TQKeyEvent *e) { emit sigGotKeyReleaseEvent(e); } -void KisCanvasWidget::widgetGotDragEnterEvent(QDragEnterEvent *e) +void KisCanvasWidget::widgetGotDragEnterEvent(TQDragEnterEvent *e) { emit sigGotDragEnterEvent(e); } -void KisCanvasWidget::widgetGotDropEvent(QDropEvent *e) +void KisCanvasWidget::widgetGotDropEvent(TQDropEvent *e) { emit sigGotDropEvent(e); } @@ -235,7 +235,7 @@ void KisCanvasWidget::moveEvent(KisMoveEvent *e) void KisCanvasWidget::buttonPressEvent(KisButtonPressEvent *e) { - QWidget *widget = dynamic_cast(this); + TQWidget *widget = dynamic_cast(this); Q_ASSERT(widget != 0); if (widget) { @@ -291,7 +291,7 @@ void KisCanvasWidget::translateTabletEvent(KisEvent *e) m_lastPressure = e->pressure(); } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 void KisCanvasWidget::initX11Support() { @@ -302,25 +302,25 @@ void KisCanvasWidget::initX11Support() X11SupportInitialised = true; - Display *x11Display = QApplication::desktop()->x11Display(); + Display *x11Display = TQApplication::desktop()->x11Display(); - // Look at the modifier mapping and get the correct masks for alt/meta + // Look at the modifier mapping and get the correct tqmasks for alt/meta XModifierKeymap *map = XGetModifierMapping(x11Display); if (map) { int mapIndex = 0; - for (int maskIndex = 0; maskIndex < 8; maskIndex++) { + for (int tqmaskIndex = 0; tqmaskIndex < 8; tqmaskIndex++) { for (int i = 0; i < map->max_keypermod; i++) { if (map->modifiermap[mapIndex]) { KeySym sym = XKeycodeToKeysym(x11Display, map->modifiermap[mapIndex], 0); if (X11AltMask == 0 && (sym == XK_Alt_L || sym == XK_Alt_R)) { - X11AltMask = 1 << maskIndex; + X11AltMask = 1 << tqmaskIndex; } if (X11MetaMask == 0 && (sym == XK_Meta_L || sym == XK_Meta_R)) { - X11MetaMask = 1 << maskIndex; + X11MetaMask = 1 << tqmaskIndex; } } @@ -356,9 +356,9 @@ void KisCanvasWidget::initX11Support() tabletDevice.readSettingsFromConfig(); - QString lowerCaseName = tabletDevice.name().lower(); + TQString lowerCaseName = tabletDevice.name().lower(); - // Find the devices that Qt will use as its stylus and eraser devices. + // Find the devices that TQt will use as its stylus and eraser devices. if (!foundStylus || !foundEraser) { if (lowerCaseName.startsWith("stylus") || lowerCaseName.startsWith("pen")) { lastStylusSeen = device->id; @@ -411,7 +411,7 @@ void KisCanvasWidget::initX11Support() #endif // EXTENDED_X11_TABLET_SUPPORT } -Qt::ButtonState KisCanvasWidget::translateX11ButtonState(int state) +TQt::ButtonState KisCanvasWidget::translateX11ButtonState(int state) { int buttonState = 0; @@ -422,20 +422,20 @@ Qt::ButtonState KisCanvasWidget::translateX11ButtonState(int state) if (state & Button3Mask) buttonState |= Qt::RightButton; if (state & ShiftMask) - buttonState |= Qt::ShiftButton; + buttonState |= TQt::ShiftButton; if (state & ControlMask) - buttonState |= Qt::ControlButton; + buttonState |= TQt::ControlButton; if (state & X11AltMask) - buttonState |= Qt::AltButton; + buttonState |= TQt::AltButton; if (state & X11MetaMask) - buttonState |= Qt::MetaButton; + buttonState |= TQt::MetaButton; - return static_cast(buttonState); + return static_cast(buttonState); } -Qt::ButtonState KisCanvasWidget::translateX11Button(unsigned int X11Button) +TQt::ButtonState KisCanvasWidget::translateX11Button(unsigned int X11Button) { - Qt::ButtonState qtButton; + TQt::ButtonState qtButton; switch (X11Button) { case Button1: @@ -525,7 +525,7 @@ KisCanvasWidget::X11TabletDevice::X11TabletDevice(const XDeviceInfo *deviceInfo) m_proximityInEvent = -1; m_proximityOutEvent = -1; - m_XDevice = XOpenDevice(QApplication::desktop()->x11Display(), m_deviceId); + m_XDevice = XOpenDevice(TQApplication::desktop()->x11Display(), m_deviceId); if (m_XDevice != NULL) { for (int i = 0; i < m_XDevice->num_classes; i++) { @@ -554,7 +554,7 @@ KisCanvasWidget::X11TabletDevice::X11TabletDevice(const XDeviceInfo *deviceInfo) } } - // Note: We don't XCloseXDevice() since Qt will have already opened + // Note: We don't XCloseXDevice() since TQt will have already opened // it, and only one XCloseDevice() call closes it for all opens. } @@ -573,87 +573,87 @@ bool KisCanvasWidget::X11TabletDevice::enabled() const return m_enabled; } -Q_INT32 KisCanvasWidget::X11TabletDevice::numAxes() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::numAxes() const { return m_axisInfo.count(); } -void KisCanvasWidget::X11TabletDevice::setXAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setXAxis(TQ_INT32 axis) { m_xAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setYAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setYAxis(TQ_INT32 axis) { m_yAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setPressureAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setPressureAxis(TQ_INT32 axis) { m_pressureAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setXTiltAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setXTiltAxis(TQ_INT32 axis) { m_xTiltAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setYTiltAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setYTiltAxis(TQ_INT32 axis) { m_yTiltAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setWheelAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setWheelAxis(TQ_INT32 axis) { m_wheelAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setToolIDAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setToolIDAxis(TQ_INT32 axis) { m_toolIDAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setSerialNumberAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setSerialNumberAxis(TQ_INT32 axis) { m_serialNumberAxis = axis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::xAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::xAxis() const { return m_xAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::yAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::yAxis() const { return m_yAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::pressureAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::pressureAxis() const { return m_pressureAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::xTiltAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::xTiltAxis() const { return m_xTiltAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::yTiltAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::yTiltAxis() const { return m_yTiltAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::wheelAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::wheelAxis() const { return m_wheelAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::toolIDAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::toolIDAxis() const { return m_toolIDAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::serialNumberAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::serialNumberAxis() const { return m_serialNumberAxis; } @@ -731,7 +731,7 @@ void KisCanvasWidget::X11TabletDevice::writeSettingsToConfig() cfg.setTabletDeviceAxis(m_name, "SerialNumberAxis", m_serialNumberAxis); } -void KisCanvasWidget::X11TabletDevice::enableEvents(QWidget *widget) const +void KisCanvasWidget::X11TabletDevice::enableEvents(TQWidget *widget) const { if (!m_eventClassList.isEmpty()) { int result = XSelectExtensionEvent(widget->x11AppDisplay(), widget->handle(), @@ -760,7 +760,7 @@ double KisCanvasWidget::X11TabletDevice::translateAxisValue(int value, const XAx } KisCanvasWidget::X11TabletDevice::State::State(const KisPoint& pos, double pressure, const KisVector2D& tilt, double wheel, - Q_UINT32 toolID, Q_UINT32 serialNumber) + TQ_UINT32 toolID, TQ_UINT32 serialNumber) : m_pos(pos), m_pressure(pressure), m_tilt(tilt), @@ -786,21 +786,21 @@ KisCanvasWidget::X11TabletDevice::State KisCanvasWidget::X11TabletDevice::transl } KisVector2D tilt = KisVector2D(0, 0); - Q_UINT32 toolID = 0; - Q_UINT32 serialNumber = 0; + TQ_UINT32 toolID = 0; + TQ_UINT32 serialNumber = 0; if (m_xTiltAxis != NoAxis) { // Latest wacom driver returns the tool id and serial number in // the upper 16 bits of the x and y tilts and wheel. - int xTiltAxisValue = (Q_INT16)(axisData[m_xTiltAxis] & 0xffff); - toolID = ((Q_UINT32)axisData[m_xTiltAxis] >> 16) & 0xffff; + int xTiltAxisValue = (TQ_INT16)(axisData[m_xTiltAxis] & 0xffff); + toolID = ((TQ_UINT32)axisData[m_xTiltAxis] >> 16) & 0xffff; tilt.setX(translateAxisValue(xTiltAxisValue, m_axisInfo[m_xTiltAxis])); } if (m_yTiltAxis != NoAxis) { - int yTiltAxisValue = (Q_INT16)(axisData[m_yTiltAxis] & 0xffff); - serialNumber = (Q_UINT32)axisData[m_yTiltAxis] & 0xffff0000; + int yTiltAxisValue = (TQ_INT16)(axisData[m_yTiltAxis] & 0xffff); + serialNumber = (TQ_UINT32)axisData[m_yTiltAxis] & 0xffff0000; tilt.setY(translateAxisValue(yTiltAxisValue, m_axisInfo[m_yTiltAxis])); } @@ -808,13 +808,13 @@ KisCanvasWidget::X11TabletDevice::State KisCanvasWidget::X11TabletDevice::transl double wheel = 0; if (m_wheelAxis != NoAxis) { - int wheelAxisValue = (Q_INT16)(axisData[m_wheelAxis] & 0xffff); - serialNumber |= ((Q_UINT32)axisData[m_wheelAxis] >> 16) & 0xffff; + int wheelAxisValue = (TQ_INT16)(axisData[m_wheelAxis] & 0xffff); + serialNumber |= ((TQ_UINT32)axisData[m_wheelAxis] >> 16) & 0xffff; wheel = translateAxisValue(wheelAxisValue, m_axisInfo[m_wheelAxis]); } - //QString ids; + //TQString ids; //ids.sprintf("Tool ID: %8x Serial Number: %8x", toolID, serialNumber); return State(pos, pressure, tilt, wheel, toolID, serialNumber); @@ -825,7 +825,7 @@ KisCanvasWidget::X11XIDTabletDeviceMap& KisCanvasWidget::tabletDeviceMap() return X11TabletDeviceMap; } -void KisCanvasWidget::selectTabletDeviceEvents(QWidget *widget) +void KisCanvasWidget::selectTabletDeviceEvents(TQWidget *widget) { for (X11XIDTabletDeviceMap::const_iterator it = X11TabletDeviceMap.begin(); it != X11TabletDeviceMap.end(); ++it) { @@ -839,20 +839,20 @@ void KisCanvasWidget::selectTabletDeviceEvents(QWidget *widget) #endif // EXTENDED_X11_TABLET_SUPPORT -bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QPoint widgetOriginPos) +bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, TQPoint widgetOriginPos) { if (event->type == MotionNotify) { // Mouse move if (!m_enableMoveEventCompressionHint) { XMotionEvent motion = event->xmotion; - QPoint globalPos(motion.x_root, motion.y_root); + TQPoint globalPos(motion.x_root, motion.y_root); if (globalPos.x() != m_lastRootX || globalPos.y() != m_lastRootY) { int state = translateX11ButtonState(motion.state); - QPoint pos(motion.x, motion.y); - QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, state); + TQPoint pos(motion.x, motion.y); + TQMouseEvent e(TQEvent::MouseMove, pos, globalPos, Qt::NoButton, state); widgetGotMouseMoveEvent(&e); } @@ -872,8 +872,8 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP // Tablet event. int deviceId; const int *axisData; - Qt::ButtonState button; - Qt::ButtonState buttonState; + TQt::ButtonState button; + TQt::ButtonState buttonState; if (event->type == X11DeviceMotionNotifyEvent) { // Tablet move @@ -922,7 +922,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP button = translateX11Button(buttonPressed->button); buttonState = translateX11ButtonState(buttonPressed->state); - if (QApplication::activePopupWidget() == 0) { + if (TQApplication::activePopupWidget() == 0) { XEvent mouseEvent; // Look for and swallow an accompanying core event, but only if there's @@ -945,7 +945,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP button = translateX11Button(buttonReleased->button); buttonState = translateX11ButtonState(buttonReleased->state); - if (QApplication::activePopupWidget() == 0) { + if (TQApplication::activePopupWidget() == 0) { XEvent mouseEvent; // Look for and swallow an accompanying core event, but only if there's @@ -961,7 +961,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP } } - X11XIDTabletDeviceMap::const_iterator it = X11TabletDeviceMap.find(deviceId); + X11XIDTabletDeviceMap::const_iterator it = X11TabletDeviceMap.tqfind(deviceId); if (it != X11TabletDeviceMap.end()) { @@ -971,7 +971,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP X11TabletDevice::State deviceState = tabletDevice.translateAxisData(axisData); // Map normalised position coordinates to screen coordinates - QDesktopWidget *desktop = QApplication::desktop(); + TQDesktopWidget *desktop = TQApplication::desktop(); KisPoint globalPos(deviceState.pos().x() * desktop->width(), deviceState.pos().y() * desktop->height()); // Convert screen coordinates to widget coordinates KisPoint pos = globalPos - KoPoint( widgetOriginPos ); @@ -994,8 +994,8 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP } } - // Consume the event even if the device is disabled otherwise Qt will - // process it and send a QTabletEvent. + // Consume the event even if the device is disabled otherwise TQt will + // process it and send a TQTabletEvent. return true; } else { @@ -1018,7 +1018,7 @@ KisInputDevice KisCanvasWidget::findActiveInputDevice() for (it = X11TabletDeviceMap.begin(); it != X11TabletDeviceMap.end(); ++it) { const X11TabletDevice& tabletDevice = (*it).second; - XDeviceState *deviceState = XQueryDeviceState(QApplication::desktop()->x11Display(), + XDeviceState *deviceState = XQueryDeviceState(TQApplication::desktop()->x11Display(), tabletDevice.xDevice()); // If your the laptop sleeps, and you remove the mouse from the usb @@ -1057,21 +1057,21 @@ KisInputDevice KisCanvasWidget::findActiveInputDevice() #endif // EXTENDED_X11_TABLET_SUPPORT -#endif // Q_WS_X11 +#endif // TQ_WS_X11 /*************************************************************************/ -#define QPAINTDEVICE_CANVAS_WIDGET false +#define TQPAINTDEVICE_CANVAS_WIDGET false #define OPENGL_CANVAS_WIDGET true -KisCanvas::KisCanvas(QWidget *parent, const char *name) +KisCanvas::KisCanvas(TQWidget *tqparent, const char *name) { - m_parent = parent; + m_parent = tqparent; m_name = name; m_enableMoveEventCompressionHint = false; m_canvasWidget = 0; m_useOpenGL = false; - createCanvasWidget(QPAINTDEVICE_CANVAS_WIDGET); + createCanvasWidget(TQPAINTDEVICE_CANVAS_WIDGET); } KisCanvas::~KisCanvas() @@ -1080,7 +1080,7 @@ KisCanvas::~KisCanvas() } #ifdef HAVE_GL -void KisCanvas::createCanvasWidget(bool useOpenGL, QGLWidget *sharedContextWidget) +void KisCanvas::createCanvasWidget(bool useOpenGL, TQGLWidget *sharedContextWidget) #else void KisCanvas::createCanvasWidget(bool useOpenGL) #endif @@ -1090,7 +1090,7 @@ void KisCanvas::createCanvasWidget(bool useOpenGL) #ifndef HAVE_GL useOpenGL = false; #else - if (useOpenGL && !QGLFormat::hasOpenGL()) { + if (useOpenGL && !TQGLFormat::hasOpenGL()) { kdDebug(41001) << "Tried to create OpenGL widget when system doesn't have OpenGL\n"; useOpenGL = false; } @@ -1100,15 +1100,15 @@ void KisCanvas::createCanvasWidget(bool useOpenGL) } else #endif { - m_canvasWidget = new KisQPaintDeviceCanvasWidget(m_parent, m_name.latin1()); + m_canvasWidget = new KisTQPaintDeviceCanvasWidget(m_parent, m_name.latin1()); } m_useOpenGL = useOpenGL; Q_CHECK_PTR(m_canvasWidget); - QWidget *widget = dynamic_cast(m_canvasWidget); + TQWidget *widget = dynamic_cast(m_canvasWidget); - widget->setBackgroundMode(QWidget::NoBackground); + widget->setBackgroundMode(TQWidget::NoBackground); widget->setMouseTracking(true); widget->setAcceptDrops(true); m_canvasWidget->enableMoveEventCompressionHint(m_enableMoveEventCompressionHint); @@ -1117,27 +1117,27 @@ void KisCanvas::createCanvasWidget(bool useOpenGL) selectTabletDeviceEvents(); #endif - connect(m_canvasWidget, SIGNAL(sigGotPaintEvent(QPaintEvent *)), SIGNAL(sigGotPaintEvent(QPaintEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotEnterEvent(QEvent*)), SIGNAL(sigGotEnterEvent(QEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotLeaveEvent(QEvent*)), SIGNAL(sigGotLeaveEvent(QEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotMouseWheelEvent(QWheelEvent*)), SIGNAL(sigGotMouseWheelEvent(QWheelEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), SIGNAL(sigGotKeyPressEvent(QKeyEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotKeyReleaseEvent(QKeyEvent*)), SIGNAL(sigGotKeyReleaseEvent(QKeyEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotDragEnterEvent(QDragEnterEvent*)), SIGNAL(sigGotDragEnterEvent(QDragEnterEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotDropEvent(QDropEvent*)), SIGNAL(sigGotDropEvent(QDropEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotMoveEvent(KisMoveEvent *)), SIGNAL(sigGotMoveEvent(KisMoveEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *)), SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *)), SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *)), SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotPaintEvent(TQPaintEvent *)), TQT_SIGNAL(sigGotPaintEvent(TQPaintEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotEnterEvent(TQEvent*)), TQT_SIGNAL(sigGotEnterEvent(TQEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotLeaveEvent(TQEvent*)), TQT_SIGNAL(sigGotLeaveEvent(TQEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotMouseWheelEvent(TQWheelEvent*)), TQT_SIGNAL(sigGotMouseWheelEvent(TQWheelEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotKeyReleaseEvent(TQKeyEvent*)), TQT_SIGNAL(sigGotKeyReleaseEvent(TQKeyEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotDragEnterEvent(TQDragEnterEvent*)), TQT_SIGNAL(sigGotDragEnterEvent(TQDragEnterEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotDropEvent(TQDropEvent*)), TQT_SIGNAL(sigGotDropEvent(TQDropEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent *)), TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *)), TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *)), TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *)), TQT_SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *))); } -void KisCanvas::createQPaintDeviceCanvas() +void KisCanvas::createTQPaintDeviceCanvas() { - createCanvasWidget(QPAINTDEVICE_CANVAS_WIDGET); + createCanvasWidget(TQPAINTDEVICE_CANVAS_WIDGET); } #ifdef HAVE_GL -void KisCanvas::createOpenGLCanvas(QGLWidget *sharedContextWidget) +void KisCanvas::createOpenGLCanvas(TQGLWidget *sharedContextWidget) { createCanvasWidget(OPENGL_CANVAS_WIDGET, sharedContextWidget); } @@ -1156,20 +1156,20 @@ void KisCanvas::enableMoveEventCompressionHint(bool enableMoveCompression) } } -QWidget *KisCanvas::QPaintDeviceWidget() const +TQWidget *KisCanvas::TQPaintDeviceWidget() const { if (m_useOpenGL) { return 0; } else { - return dynamic_cast(m_canvasWidget); + return dynamic_cast(m_canvasWidget); } } #ifdef HAVE_GL -QGLWidget *KisCanvas::OpenGLWidget() const +TQGLWidget *KisCanvas::OpenGLWidget() const { if (m_useOpenGL) { - return dynamic_cast(m_canvasWidget); + return dynamic_cast(m_canvasWidget); } else { return 0; } @@ -1190,115 +1190,115 @@ KisCanvasWidget *KisCanvas::canvasWidget() const void KisCanvas::setGeometry(int x, int y, int width, int height) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->setGeometry(x, y, width, height); + dynamic_cast(m_canvasWidget)->setGeometry(x, y, width, height); } void KisCanvas::show() { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->show(); + dynamic_cast(m_canvasWidget)->show(); } void KisCanvas::hide() { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->hide(); + dynamic_cast(m_canvasWidget)->hide(); } int KisCanvas::width() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast(m_canvasWidget)->width(); + return dynamic_cast(m_canvasWidget)->width(); } int KisCanvas::height() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast(m_canvasWidget)->height(); + return dynamic_cast(m_canvasWidget)->height(); } void KisCanvas::update() { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->update(); + dynamic_cast(m_canvasWidget)->update(); } -void KisCanvas::update(const QRect& r) +void KisCanvas::update(const TQRect& r) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->update(r); + dynamic_cast(m_canvasWidget)->update(r); } void KisCanvas::update(int x, int y, int width, int height) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->update(x, y, width, height); + dynamic_cast(m_canvasWidget)->update(x, y, width, height); } -void KisCanvas::repaint() +void KisCanvas::tqrepaint() { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->repaint(); + dynamic_cast(m_canvasWidget)->tqrepaint(); } -void KisCanvas::repaint(bool erase) +void KisCanvas::tqrepaint(bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->repaint(erase); + dynamic_cast(m_canvasWidget)->tqrepaint(erase); } -void KisCanvas::repaint(int x, int y, int width, int height, bool erase) +void KisCanvas::tqrepaint(int x, int y, int width, int height, bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->repaint(x, y, width, height, erase); + dynamic_cast(m_canvasWidget)->tqrepaint(x, y, width, height, erase); } -void KisCanvas::repaint(const QRect& r, bool erase) +void KisCanvas::tqrepaint(const TQRect& r, bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->repaint(r, erase); + dynamic_cast(m_canvasWidget)->tqrepaint(r, erase); } -void KisCanvas::repaint(const QRegion& r, bool erase) +void KisCanvas::tqrepaint(const TQRegion& r, bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->repaint(r, erase); + dynamic_cast(m_canvasWidget)->tqrepaint(r, erase); } bool KisCanvas::isUpdatesEnabled() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast(m_canvasWidget)->isUpdatesEnabled(); + return dynamic_cast(m_canvasWidget)->isUpdatesEnabled(); } void KisCanvas::setUpdatesEnabled(bool updatesEnabled) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->setUpdatesEnabled(updatesEnabled); + dynamic_cast(m_canvasWidget)->setUpdatesEnabled(updatesEnabled); } void KisCanvas::updateGeometry() { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->updateGeometry(); + dynamic_cast(m_canvasWidget)->updateGeometry(); } -void KisCanvas::setFocusPolicy(QWidget::FocusPolicy focusPolicy) +void KisCanvas::setFocusPolicy(TQWidget::FocusPolicy focusPolicy) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->setFocusPolicy(focusPolicy); + dynamic_cast(m_canvasWidget)->setFocusPolicy(focusPolicy); } -const QCursor& KisCanvas::cursor() const +const TQCursor& KisCanvas::cursor() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast(m_canvasWidget)->cursor(); + return dynamic_cast(m_canvasWidget)->cursor(); } -void KisCanvas::setCursor(const QCursor& cursor) +void KisCanvas::setCursor(const TQCursor& cursor) { Q_ASSERT(m_canvasWidget); - dynamic_cast(m_canvasWidget)->setCursor(cursor); + dynamic_cast(m_canvasWidget)->setCursor(cursor); } #if defined(EXTENDED_X11_TABLET_SUPPORT) @@ -1311,38 +1311,38 @@ void KisCanvas::selectTabletDeviceEvents() bool KisCanvas::cursorIsOverCanvas() const { - if (QApplication::activePopupWidget() != 0) { + if (TQApplication::activePopupWidget() != 0) { return false; } - if (QApplication::activeModalWidget() != 0) { + if (TQApplication::activeModalWidget() != 0) { return false; } - QWidget *canvasWidget = dynamic_cast(m_canvasWidget); + TQWidget *canvasWidget = dynamic_cast(m_canvasWidget); Q_ASSERT(canvasWidget != 0); if (canvasWidget) { - if (QApplication::widgetAt(QCursor::pos(), true) == canvasWidget) { + if (TQApplication::widgetAt(TQCursor::pos(), true) == canvasWidget) { return true; } } return false; } -void KisCanvas::handleKeyEvent(QEvent *e) +void KisCanvas::handleKeyEvent(TQEvent *e) { - QKeyEvent *ke = dynamic_cast(e); + TQKeyEvent *ke = dynamic_cast(e); Q_ASSERT(ke != 0); if (ke) { - QWidget *canvasWidget = dynamic_cast(m_canvasWidget); + TQWidget *canvasWidget = dynamic_cast(m_canvasWidget); Q_ASSERT(canvasWidget != 0); if (canvasWidget) { canvasWidget->setFocus(); - if (e->type() == QEvent::KeyPress) { + if (e->type() == TQEvent::KeyPress) { emit sigGotKeyPressEvent(ke); } else { emit sigGotKeyReleaseEvent(ke); diff --git a/krita/ui/kis_canvas.h b/krita/ui/kis_canvas.h index b9e38738..aff09e65 100644 --- a/krita/ui/kis_canvas.h +++ b/krita/ui/kis_canvas.h @@ -24,21 +24,21 @@ #include #endif -#include +#include #ifdef HAVE_GL -#include +#include #endif -#include +#include #include "kis_global.h" #include "kis_point.h" #include "kis_vec.h" #include "kis_input_device.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 // Irix has a different (and better) XInput tablet driver to -// the XFree/xorg driver. Qt needs a separate code path for that +// the XFree/xorg driver. TQt needs a separate code path for that // and so would we. #if defined(HAVE_XINPUTEXT) && !defined(Q_OS_IRIX) #define EXTENDED_X11_TABLET_SUPPORT @@ -51,7 +51,7 @@ #include #endif -#endif // Q_WS_X11 +#endif // TQ_WS_X11 class KisEvent; class KisMoveEvent; @@ -60,8 +60,9 @@ class KisButtonReleaseEvent; class KisDoubleClickEvent; class KisCanvasWidgetPainter; -class KisCanvasWidget : public QObject { +class KisCanvasWidget : public TQObject { Q_OBJECT + TQ_OBJECT public: KisCanvasWidget(); @@ -78,41 +79,41 @@ public: static KisInputDevice findActiveInputDevice(); virtual void selectTabletDeviceEvents() = 0; - static void selectTabletDeviceEvents(QWidget *widget); + static void selectTabletDeviceEvents(TQWidget *widget); #endif -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 static void initX11Support(); #endif signals: - void sigGotPaintEvent(QPaintEvent*); - void sigGotEnterEvent(QEvent*); - void sigGotLeaveEvent(QEvent*); - void sigGotMouseWheelEvent(QWheelEvent*); - void sigGotKeyPressEvent(QKeyEvent*); - void sigGotKeyReleaseEvent(QKeyEvent*); - void sigGotDragEnterEvent(QDragEnterEvent*); - void sigGotDropEvent(QDropEvent*); + void sigGotPaintEvent(TQPaintEvent*); + void sigGotEnterEvent(TQEvent*); + void sigGotLeaveEvent(TQEvent*); + void sigGotMouseWheelEvent(TQWheelEvent*); + void sigGotKeyPressEvent(TQKeyEvent*); + void sigGotKeyReleaseEvent(TQKeyEvent*); + void sigGotDragEnterEvent(TQDragEnterEvent*); + void sigGotDropEvent(TQDropEvent*); void sigGotMoveEvent(KisMoveEvent *); void sigGotButtonPressEvent(KisButtonPressEvent *); void sigGotButtonReleaseEvent(KisButtonReleaseEvent *); void sigGotDoubleClickEvent(KisDoubleClickEvent *); protected: - void widgetGotPaintEvent(QPaintEvent *event); - void widgetGotMousePressEvent(QMouseEvent *event); - void widgetGotMouseReleaseEvent(QMouseEvent *event); - void widgetGotMouseDoubleClickEvent(QMouseEvent *event); - void widgetGotMouseMoveEvent(QMouseEvent *event); - void widgetGotTabletEvent(QTabletEvent *event); - void widgetGotEnterEvent(QEvent *event ); - void widgetGotLeaveEvent(QEvent *event); - void widgetGotWheelEvent(QWheelEvent *event); - void widgetGotKeyPressEvent(QKeyEvent *event); - void widgetGotKeyReleaseEvent(QKeyEvent *event); - void widgetGotDragEnterEvent(QDragEnterEvent *event); - void widgetGotDropEvent(QDropEvent *event); + void widgetGotPaintEvent(TQPaintEvent *event); + void widgetGotMousePressEvent(TQMouseEvent *event); + void widgetGotMouseReleaseEvent(TQMouseEvent *event); + void widgetGotMouseDoubleClickEvent(TQMouseEvent *event); + void widgetGotMouseMoveEvent(TQMouseEvent *event); + void widgetGotTabletEvent(TQTabletEvent *event); + void widgetGotEnterEvent(TQEvent *event ); + void widgetGotLeaveEvent(TQEvent *event); + void widgetGotWheelEvent(TQWheelEvent *event); + void widgetGotKeyPressEvent(TQKeyEvent *event); + void widgetGotKeyReleaseEvent(TQKeyEvent *event); + void widgetGotDragEnterEvent(TQDragEnterEvent *event); + void widgetGotDropEvent(TQDropEvent *event); void moveEvent(KisMoveEvent *event); void buttonPressEvent(KisButtonPressEvent *event); void buttonReleaseEvent(KisButtonReleaseEvent *event); @@ -124,18 +125,18 @@ protected: bool m_enableMoveEventCompressionHint; double m_lastPressure; -#ifdef Q_WS_X11 - // On X11 systems, Qt throws away mouse move events if the application +#ifdef TQ_WS_X11 + // On X11 systems, TQt throws away mouse move events if the application // is unable to keep up with them. We override this behaviour so that // we receive all move events, so that painting follows the mouse's motion // accurately. - bool x11Event(XEvent *event, Display *x11Display, WId winId, QPoint widgetOriginPos); - static Qt::ButtonState translateX11ButtonState(int state); - static Qt::ButtonState translateX11Button(unsigned int button); + bool x11Event(XEvent *event, Display *x11Display, WId winId, TQPoint widgetOriginPos); + static TQt::ButtonState translateX11ButtonState(int state); + static TQt::ButtonState translateX11Button(unsigned int button); static bool X11SupportInitialised; - // Modifier masks for alt/meta - detected at run-time + // Modifier tqmasks for alt/meta - detected at run-time static long X11AltMask; static long X11MetaMask; @@ -155,7 +156,7 @@ public: XID id() const { return m_deviceId; } XDevice *xDevice() const { return m_XDevice; } - QString name() const { return m_name; } + TQString name() const { return m_name; } KisInputDevice inputDevice() const { return m_inputDevice; } void setInputDevice(KisInputDevice inputDevice) { m_inputDevice = inputDevice; } @@ -163,28 +164,28 @@ public: void setEnabled(bool enabled); bool enabled() const; - Q_INT32 numAxes() const; - - void setXAxis(Q_INT32 axis); - void setYAxis(Q_INT32 axis); - void setPressureAxis(Q_INT32 axis); - void setXTiltAxis(Q_INT32 axis); - void setYTiltAxis(Q_INT32 axis); - void setWheelAxis(Q_INT32 axis); - void setToolIDAxis(Q_INT32 axis); - void setSerialNumberAxis(Q_INT32 axis); - - static const Q_INT32 NoAxis = -1; - static const Q_INT32 DefaultAxis = -2; - - Q_INT32 xAxis() const; - Q_INT32 yAxis() const; - Q_INT32 pressureAxis() const; - Q_INT32 xTiltAxis() const; - Q_INT32 yTiltAxis() const; - Q_INT32 wheelAxis() const; - Q_INT32 toolIDAxis() const; - Q_INT32 serialNumberAxis() const; + TQ_INT32 numAxes() const; + + void setXAxis(TQ_INT32 axis); + void setYAxis(TQ_INT32 axis); + void setPressureAxis(TQ_INT32 axis); + void setXTiltAxis(TQ_INT32 axis); + void setYTiltAxis(TQ_INT32 axis); + void setWheelAxis(TQ_INT32 axis); + void setToolIDAxis(TQ_INT32 axis); + void setSerialNumberAxis(TQ_INT32 axis); + + static const TQ_INT32 NoAxis = -1; + static const TQ_INT32 DefaultAxis = -2; + + TQ_INT32 xAxis() const; + TQ_INT32 yAxis() const; + TQ_INT32 pressureAxis() const; + TQ_INT32 xTiltAxis() const; + TQ_INT32 yTiltAxis() const; + TQ_INT32 wheelAxis() const; + TQ_INT32 toolIDAxis() const; + TQ_INT32 serialNumberAxis() const; void readSettingsFromConfig(); void writeSettingsToConfig(); @@ -196,14 +197,14 @@ public: int proximityInEvent() const { return m_proximityInEvent; } int proximityOutEvent() const { return m_proximityOutEvent; } - void enableEvents(QWidget *widget) const; + void enableEvents(TQWidget *widget) const; class State { public: State() {} State(const KisPoint& pos, double pressure, const KisVector2D& tilt, double wheel, - Q_UINT32 toolID, Q_UINT32 serialNumber); + TQ_UINT32 toolID, TQ_UINT32 serialNumber); // Position, pressure and wheel are normalised to 0 - 1 KisPoint pos() const { return m_pos; } @@ -212,16 +213,16 @@ public: KisVector2D tilt() const { return m_tilt; } double wheel() const { return m_wheel; } // Wacom tool id and serial number of device. - Q_UINT32 toolID() const { return m_toolID; } - Q_UINT32 serialNumber() const { return m_serialNumber; } + TQ_UINT32 toolID() const { return m_toolID; } + TQ_UINT32 serialNumber() const { return m_serialNumber; } private: KisPoint m_pos; double m_pressure; KisVector2D m_tilt; double m_wheel; - Q_UINT32 m_toolID; - Q_UINT32 m_serialNumber; + TQ_UINT32 m_toolID; + TQ_UINT32 m_serialNumber; }; State translateAxisData(const int *axisData) const; @@ -232,23 +233,23 @@ public: XID m_deviceId; XDevice *m_XDevice; - QString m_name; + TQString m_name; bool m_mightBeTabletDevice; KisInputDevice m_inputDevice; bool m_enabled; - Q_INT32 m_xAxis; - Q_INT32 m_yAxis; - Q_INT32 m_pressureAxis; - Q_INT32 m_xTiltAxis; - Q_INT32 m_yTiltAxis; - Q_INT32 m_wheelAxis; - Q_INT32 m_toolIDAxis; - Q_INT32 m_serialNumberAxis; + TQ_INT32 m_xAxis; + TQ_INT32 m_yAxis; + TQ_INT32 m_pressureAxis; + TQ_INT32 m_xTiltAxis; + TQ_INT32 m_yTiltAxis; + TQ_INT32 m_wheelAxis; + TQ_INT32 m_toolIDAxis; + TQ_INT32 m_serialNumberAxis; - QValueVector m_axisInfo; + TQValueVector m_axisInfo; int m_motionNotifyEvent; int m_buttonPressEvent; @@ -256,7 +257,7 @@ public: int m_proximityInEvent; int m_proximityOutEvent; - QValueVector m_eventClassList; + TQValueVector m_eventClassList; }; typedef std::map X11XIDTabletDeviceMap; @@ -273,14 +274,15 @@ protected: #endif // EXTENDED_X11_TABLET_SUPPORT -#endif // Q_WS_X11 +#endif // TQ_WS_X11 }; -class KisCanvas : public QObject { +class KisCanvas : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisCanvas(QWidget *parent, const char *name); + KisCanvas(TQWidget *tqparent, const char *name); virtual ~KisCanvas(); // When enabled, the canvas may throw away move events if the application @@ -299,19 +301,19 @@ public: * Handle the given event (which must be a key event) as if the canvas * had received it directly. */ - void handleKeyEvent(QEvent *e); + void handleKeyEvent(TQEvent *e); int width() const; int height() const; void update(); - void update(const QRect& r); + void update(const TQRect& r); void update(int x, int y, int width, int height); - void repaint(); - void repaint(bool erase); - void repaint(int x, int y, int width, int height, bool erase = true); - void repaint(const QRect& r, bool erase = true); - void repaint(const QRegion& r, bool erase = true); + void tqrepaint(); + void tqrepaint(bool erase); + void tqrepaint(int x, int y, int width, int height, bool erase = true); + void tqrepaint(const TQRect& r, bool erase = true); + void tqrepaint(const TQRegion& r, bool erase = true); void updateGeometry(); @@ -320,14 +322,14 @@ public: #endif signals: - void sigGotPaintEvent(QPaintEvent*); - void sigGotEnterEvent(QEvent*); - void sigGotLeaveEvent(QEvent*); - void sigGotMouseWheelEvent(QWheelEvent*); - void sigGotKeyPressEvent(QKeyEvent*); - void sigGotKeyReleaseEvent(QKeyEvent*); - void sigGotDragEnterEvent(QDragEnterEvent*); - void sigGotDropEvent(QDropEvent*); + void sigGotPaintEvent(TQPaintEvent*); + void sigGotEnterEvent(TQEvent*); + void sigGotLeaveEvent(TQEvent*); + void sigGotMouseWheelEvent(TQWheelEvent*); + void sigGotKeyPressEvent(TQKeyEvent*); + void sigGotKeyReleaseEvent(TQKeyEvent*); + void sigGotDragEnterEvent(TQDragEnterEvent*); + void sigGotDropEvent(TQDropEvent*); void sigGotMoveEvent(KisMoveEvent *); void sigGotButtonPressEvent(KisButtonPressEvent *); void sigGotButtonReleaseEvent(KisButtonReleaseEvent *); @@ -339,15 +341,15 @@ protected: friend class KisView; friend class KisCanvasPainter; - // One of these will be valid, the other null. In Qt3, using a QPainter on - // a QGLWidget is not reliable. - QWidget *QPaintDeviceWidget() const; + // One of these will be valid, the other null. In TQt3, using a TQPainter on + // a TQGLWidget is not reliable. + TQWidget *TQPaintDeviceWidget() const; #ifdef HAVE_GL - QGLWidget *OpenGLWidget() const; + TQGLWidget *OpenGLWidget() const; #endif - void createQPaintDeviceCanvas(); + void createTQPaintDeviceCanvas(); #ifdef HAVE_GL - void createOpenGLCanvas(QGLWidget *sharedContextWidget); + void createOpenGLCanvas(TQGLWidget *sharedContextWidget); #endif void show(); void hide(); @@ -356,22 +358,22 @@ protected: void setUpdatesEnabled(bool updatesEnabled); bool isUpdatesEnabled() const; - void setFocusPolicy(QWidget::FocusPolicy focusPolicy); + void setFocusPolicy(TQWidget::FocusPolicy focusPolicy); - const QCursor& cursor() const; - void setCursor(const QCursor& cursor); + const TQCursor& cursor() const; + void setCursor(const TQCursor& cursor); KisCanvasWidgetPainter *createPainter(); KisCanvasWidget *canvasWidget() const; protected: #ifdef HAVE_GL - void createCanvasWidget(bool useOpenGL, QGLWidget *sharedContextWidget = 0); + void createCanvasWidget(bool useOpenGL, TQGLWidget *sharedContextWidget = 0); #else void createCanvasWidget(bool useOpenGL); #endif - QWidget *m_parent; - QString m_name; + TQWidget *m_parent; + TQString m_name; KisCanvasWidget *m_canvasWidget; bool m_enableMoveEventCompressionHint; bool m_useOpenGL; diff --git a/krita/ui/kis_canvas_painter.cc b/krita/ui/kis_canvas_painter.cc index f9103e65..51338b42 100644 --- a/krita/ui/kis_canvas_painter.cc +++ b/krita/ui/kis_canvas_painter.cc @@ -41,31 +41,31 @@ void KisCanvasWidgetPainter::restore() { } -QFontMetrics KisCanvasWidgetPainter::fontMetrics() const +TQFontMetrics KisCanvasWidgetPainter::fontMetrics() const { - return QFontMetrics(QFont()); + return TQFontMetrics(TQFont()); } -QFontInfo KisCanvasWidgetPainter::fontInfo() const +TQFontInfo KisCanvasWidgetPainter::fontInfo() const { - return QFontInfo(QFont()); + return TQFontInfo(TQFont()); } -const QFont& KisCanvasWidgetPainter::font() const +const TQFont& KisCanvasWidgetPainter::font() const { return m_defaultFont; } -void KisCanvasWidgetPainter::setFont(const QFont& /*font*/) +void KisCanvasWidgetPainter::setFont(const TQFont& /*font*/) { } -const QPen& KisCanvasWidgetPainter::pen() const +const TQPen& KisCanvasWidgetPainter::pen() const { return m_defaultPen; } -void KisCanvasWidgetPainter::setPen(const QPen& /*pen*/) +void KisCanvasWidgetPainter::setPen(const TQPen& /*pen*/) { } @@ -73,60 +73,60 @@ void KisCanvasWidgetPainter::setPen(Qt::PenStyle /*penStyle*/) { } -void KisCanvasWidgetPainter::setPen(const QColor& /*color*/) +void KisCanvasWidgetPainter::setPen(const TQColor& /*color*/) { } -const QBrush& KisCanvasWidgetPainter::brush() const +const TQBrush& KisCanvasWidgetPainter::brush() const { return m_defaultBrush; } -void KisCanvasWidgetPainter::setBrush(const QBrush& /*brush*/) +void KisCanvasWidgetPainter::setBrush(const TQBrush& /*brush*/) { } -void KisCanvasWidgetPainter::setBrush(Qt::BrushStyle /*brushStyle*/) +void KisCanvasWidgetPainter::setBrush(TQt::BrushStyle /*brushStyle*/) { } -void KisCanvasWidgetPainter::setBrush(const QColor& /*color*/) +void KisCanvasWidgetPainter::setBrush(const TQColor& /*color*/) { } -QPoint KisCanvasWidgetPainter::pos() const +TQPoint KisCanvasWidgetPainter::pos() const { - return QPoint(); + return TQPoint(); } -const QColor& KisCanvasWidgetPainter::backgroundColor() const +const TQColor& KisCanvasWidgetPainter::backgroundColor() const { return m_defaultColor; } -void KisCanvasWidgetPainter::setBackgroundColor(const QColor& /*color*/) +void KisCanvasWidgetPainter::setBackgroundColor(const TQColor& /*color*/) { } -Qt::Qt::BGMode KisCanvasWidgetPainter::backgroundMode() const +TQt::Qt::BGMode KisCanvasWidgetPainter::backgroundMode() const { - return Qt::TransparentMode; + return TQt::TransparentMode; } -void KisCanvasWidgetPainter::setBackgroundMode(Qt::Qt::BGMode /*bgMode*/) +void KisCanvasWidgetPainter::setBackgroundMode(TQt::Qt::BGMode /*bgMode*/) { } -Qt::Qt::RasterOp KisCanvasWidgetPainter::rasterOp() const +TQt::TQt::RasterOp KisCanvasWidgetPainter::rasterOp() const { - return Qt::CopyROP; + return TQt::CopyROP; } -void KisCanvasWidgetPainter::setRasterOp(Qt::RasterOp /*rasterOp*/) +void KisCanvasWidgetPainter::setRasterOp(TQt::RasterOp /*rasterOp*/) { } -const QPoint& KisCanvasWidgetPainter::brushOrigin() const +const TQPoint& KisCanvasWidgetPainter::brushOrigin() const { return m_defaultBrushOrigin; } @@ -135,7 +135,7 @@ void KisCanvasWidgetPainter::setBrushOrigin(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::setBrushOrigin(const QPoint& /*origin*/) +void KisCanvasWidgetPainter::setBrushOrigin(const TQPoint& /*origin*/) { } @@ -153,12 +153,12 @@ void KisCanvasWidgetPainter::setViewXForm(bool /*enable*/) { } -QRect KisCanvasWidgetPainter::window() const +TQRect KisCanvasWidgetPainter::window() const { - return QRect(); + return TQRect(); } -void KisCanvasWidgetPainter::setWindow(const QRect& /*r*/) +void KisCanvasWidgetPainter::setWindow(const TQRect& /*r*/) { } @@ -166,12 +166,12 @@ void KisCanvasWidgetPainter::setWindow(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -QRect KisCanvasWidgetPainter::viewport() const +TQRect KisCanvasWidgetPainter::viewport() const { - return QRect(); + return TQRect(); } -void KisCanvasWidgetPainter::setViewport(const QRect& /*r*/) +void KisCanvasWidgetPainter::setViewport(const TQRect& /*r*/) { } @@ -184,12 +184,12 @@ void KisCanvasWidgetPainter::setWorldXForm(bool /*enable*/) { } -const QWMatrix& KisCanvasWidgetPainter::worldMatrix() const +const TQWMatrix& KisCanvasWidgetPainter::tqworldMatrix() const { return m_defaultWorldMatrix; } -void KisCanvasWidgetPainter::setWorldMatrix(const QWMatrix& /*matrix*/, bool /*combine*/) +void KisCanvasWidgetPainter::setWorldMatrix(const TQWMatrix& /*matrix*/, bool /*combine*/) { } @@ -231,42 +231,42 @@ double KisCanvasWidgetPainter::translationY() const return 0; } -QPoint KisCanvasWidgetPainter::xForm(const QPoint& point) const +TQPoint KisCanvasWidgetPainter::xForm(const TQPoint& point) const { return point; } -QRect KisCanvasWidgetPainter::xForm(const QRect& r) const +TQRect KisCanvasWidgetPainter::xForm(const TQRect& r) const { return r; } -QPointArray KisCanvasWidgetPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisCanvasWidgetPainter::xForm(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisCanvasWidgetPainter::xForm(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisCanvasWidgetPainter::xForm(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } -QPoint KisCanvasWidgetPainter::xFormDev(const QPoint& point) const +TQPoint KisCanvasWidgetPainter::xFormDev(const TQPoint& point) const { return point; } -QRect KisCanvasWidgetPainter::xFormDev(const QRect& r) const +TQRect KisCanvasWidgetPainter::xFormDev(const TQRect& r) const { return r; } -QPointArray KisCanvasWidgetPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisCanvasWidgetPainter::xFormDev(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisCanvasWidgetPainter::xFormDev(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisCanvasWidgetPainter::xFormDev(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } @@ -280,20 +280,20 @@ bool KisCanvasWidgetPainter::hasClipping() const return true; } -QRegion KisCanvasWidgetPainter::clipRegion(QPainter::CoordinateMode /*mode*/) const +TQRegion KisCanvasWidgetPainter::clipRegion(TQPainter::CoordinateMode /*mode*/) const { - return QRegion(); + return TQRegion(); } -void KisCanvasWidgetPainter::setClipRect(const QRect& /*r*/, QPainter::CoordinateMode /*mode*/) +void KisCanvasWidgetPainter::setClipRect(const TQRect& /*r*/, TQPainter::CoordinateMode /*mode*/) { } -void KisCanvasWidgetPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, QPainter::CoordinateMode /*mode*/) +void KisCanvasWidgetPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, TQPainter::CoordinateMode /*mode*/) { } -void KisCanvasWidgetPainter::setClipRegion(const QRegion& /*rgn*/, QPainter::CoordinateMode /*mode*/) +void KisCanvasWidgetPainter::setClipRegion(const TQRegion& /*rgn*/, TQPainter::CoordinateMode /*mode*/) { } @@ -301,11 +301,11 @@ void KisCanvasWidgetPainter::drawPoint(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::drawPoint(const QPoint& /*point*/) +void KisCanvasWidgetPainter::drawPoint(const TQPoint& /*point*/) { } -void KisCanvasWidgetPainter::drawPoints(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawPoints(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } @@ -313,7 +313,7 @@ void KisCanvasWidgetPainter::moveTo(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::moveTo(const QPoint& /*point*/) +void KisCanvasWidgetPainter::moveTo(const TQPoint& /*point*/) { } @@ -321,7 +321,7 @@ void KisCanvasWidgetPainter::lineTo(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::lineTo(const QPoint& /*point*/) +void KisCanvasWidgetPainter::lineTo(const TQPoint& /*point*/) { } @@ -329,7 +329,7 @@ void KisCanvasWidgetPainter::drawLine(int /*x1*/, int /*y1*/, int /*x2*/, int /* { } -void KisCanvasWidgetPainter::drawLine(const QPoint& /*start*/, const QPoint& /*end*/) +void KisCanvasWidgetPainter::drawLine(const TQPoint& /*start*/, const TQPoint& /*end*/) { } @@ -337,7 +337,7 @@ void KisCanvasWidgetPainter::drawRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/ { } -void KisCanvasWidgetPainter::drawRect(const QRect& /*r*/) +void KisCanvasWidgetPainter::drawRect(const TQRect& /*r*/) { } @@ -345,15 +345,15 @@ void KisCanvasWidgetPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, i { } -void KisCanvasWidgetPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QColor& /*bgColor*/) +void KisCanvasWidgetPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQColor& /*bgColor*/) { } -void KisCanvasWidgetPainter::drawWinFocusRect(const QRect& /*r*/) +void KisCanvasWidgetPainter::drawWinFocusRect(const TQRect& /*r*/) { } -void KisCanvasWidgetPainter::drawWinFocusRect(const QRect& /*r*/, const QColor& /*bgColor*/) +void KisCanvasWidgetPainter::drawWinFocusRect(const TQRect& /*r*/, const TQColor& /*bgColor*/) { } @@ -361,7 +361,7 @@ void KisCanvasWidgetPainter::drawRoundRect(int /*x*/, int /*y*/, int /*w*/, int { } -void KisCanvasWidgetPainter::drawRoundRect(const QRect& /*r*/, int /*xRnd*/, int /*yRnd*/) +void KisCanvasWidgetPainter::drawRoundRect(const TQRect& /*r*/, int /*xRnd*/, int /*yRnd*/) { } @@ -369,7 +369,7 @@ void KisCanvasWidgetPainter::drawEllipse(int /*x*/, int /*y*/, int /*w*/, int /* { } -void KisCanvasWidgetPainter::drawEllipse(const QRect& /*r*/) +void KisCanvasWidgetPainter::drawEllipse(const TQRect& /*r*/) { } @@ -377,7 +377,7 @@ void KisCanvasWidgetPainter::drawArc(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisCanvasWidgetPainter::drawArc(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisCanvasWidgetPainter::drawArc(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -385,7 +385,7 @@ void KisCanvasWidgetPainter::drawPie(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisCanvasWidgetPainter::drawPie(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisCanvasWidgetPainter::drawPie(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -393,79 +393,79 @@ void KisCanvasWidgetPainter::drawChord(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisCanvasWidgetPainter::drawChord(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisCanvasWidgetPainter::drawChord(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } -void KisCanvasWidgetPainter::drawLineSegments(const QPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) +void KisCanvasWidgetPainter::drawLineSegments(const TQPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) { } -void KisCanvasWidgetPainter::drawPolyline(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawPolyline(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } -void KisCanvasWidgetPainter::drawPolygon(const QPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawPolygon(const TQPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) { } -void KisCanvasWidgetPainter::drawConvexPolygon(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawConvexPolygon(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } -void KisCanvasWidgetPainter::drawCubicBezier(const QPointArray& /*pointArray*/, int /*index*/) +void KisCanvasWidgetPainter::drawCubicBezier(const TQPointArray& /*pointArray*/, int /*index*/) { } -void KisCanvasWidgetPainter::drawPixmap(int /*x*/, int /*y*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) +void KisCanvasWidgetPainter::drawPixmap(int /*x*/, int /*y*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) { } -void KisCanvasWidgetPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/, const QRect& /*sr*/) +void KisCanvasWidgetPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/, const TQRect& /*sr*/) { } -void KisCanvasWidgetPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/) +void KisCanvasWidgetPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/) { } -void KisCanvasWidgetPainter::drawPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisCanvasWidgetPainter::drawPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisCanvasWidgetPainter::drawImage(int /*x*/, int /*y*/, const QImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) +void KisCanvasWidgetPainter::drawImage(int /*x*/, int /*y*/, const TQImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) { } -void KisCanvasWidgetPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, const QRect& /*sr*/, int /*conversionFlags*/) +void KisCanvasWidgetPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, const TQRect& /*sr*/, int /*conversionFlags*/) { } -void KisCanvasWidgetPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, int /*conversion_flags*/) +void KisCanvasWidgetPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, int /*conversion_flags*/) { } -void KisCanvasWidgetPainter::drawImage(const QRect& /*r*/, const QImage& /*image*/) +void KisCanvasWidgetPainter::drawImage(const TQRect& /*r*/, const TQImage& /*image*/) { } -void KisCanvasWidgetPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) +void KisCanvasWidgetPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) { } -void KisCanvasWidgetPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/, const QPoint& /*point*/) +void KisCanvasWidgetPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/, const TQPoint& /*point*/) { } -void KisCanvasWidgetPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisCanvasWidgetPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisCanvasWidgetPainter::fillRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QBrush& /*brush*/) +void KisCanvasWidgetPainter::fillRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQBrush& /*brush*/) { } -void KisCanvasWidgetPainter::fillRect(const QRect& /*r*/, const QBrush& /*brush*/) +void KisCanvasWidgetPainter::fillRect(const TQRect& /*r*/, const TQBrush& /*brush*/) { } @@ -473,50 +473,50 @@ void KisCanvasWidgetPainter::eraseRect(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisCanvasWidgetPainter::eraseRect(const QRect& /*r*/) +void KisCanvasWidgetPainter::eraseRect(const TQRect& /*r*/) { } -void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisCanvasWidgetPainter::drawText(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisCanvasWidgetPainter::drawText(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisCanvasWidgetPainter::drawTextItem(int /*x*/, int /*y*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisCanvasWidgetPainter::tqdrawTextItem(int /*x*/, int /*y*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -void KisCanvasWidgetPainter::drawTextItem(const QPoint& /*p*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisCanvasWidgetPainter::tqdrawTextItem(const TQPoint& /*p*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -QRect KisCanvasWidgetPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisCanvasWidgetPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } -QRect KisCanvasWidgetPainter::boundingRect(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisCanvasWidgetPainter::boundingRect(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } int KisCanvasWidgetPainter::tabStops() const @@ -549,9 +549,9 @@ KisCanvasPainter::KisCanvasPainter(KisCanvas *canvas) m_canvasWidgetPainter = canvas->createPainter(); } -KisCanvasPainter::KisCanvasPainter(const QPaintDevice *paintDevice) +KisCanvasPainter::KisCanvasPainter(const TQPaintDevice *paintDevice) { - m_canvasWidgetPainter = new KisQPaintDeviceCanvasPainter(paintDevice); + m_canvasWidgetPainter = new KisTQPaintDeviceCanvasPainter(paintDevice); } KisCanvasPainter::~KisCanvasPainter() @@ -566,11 +566,11 @@ bool KisCanvasPainter::begin(KisCanvas *canvas, bool unclipped) return m_canvasWidgetPainter->begin(canvas->canvasWidget(), unclipped); } -bool KisCanvasPainter::begin(const QPaintDevice *paintDevice, bool unclipped) +bool KisCanvasPainter::begin(const TQPaintDevice *paintDevice, bool unclipped) { delete m_canvasWidgetPainter; - m_canvasWidgetPainter = new KisQPaintDeviceCanvasPainter(); - return static_cast(m_canvasWidgetPainter)->begin(paintDevice, unclipped); + m_canvasWidgetPainter = new KisTQPaintDeviceCanvasPainter(); + return static_cast(m_canvasWidgetPainter)->begin(paintDevice, unclipped); } bool KisCanvasPainter::end() @@ -595,23 +595,23 @@ void KisCanvasPainter::restore() } } -QFontMetrics KisCanvasPainter::fontMetrics() const +TQFontMetrics KisCanvasPainter::fontMetrics() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->fontMetrics(); } - return QFontMetrics(QFont()); + return TQFontMetrics(TQFont()); } -QFontInfo KisCanvasPainter::fontInfo() const +TQFontInfo KisCanvasPainter::fontInfo() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->fontInfo(); } - return QFontInfo(QFont()); + return TQFontInfo(TQFont()); } -const QFont& KisCanvasPainter::font() const +const TQFont& KisCanvasPainter::font() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->font(); @@ -619,14 +619,14 @@ const QFont& KisCanvasPainter::font() const return m_defaultFont; } -void KisCanvasPainter::setFont(const QFont& font) +void KisCanvasPainter::setFont(const TQFont& font) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setFont(font); } } -const QPen& KisCanvasPainter::pen() const +const TQPen& KisCanvasPainter::pen() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->pen(); @@ -634,7 +634,7 @@ const QPen& KisCanvasPainter::pen() const return m_defaultPen; } -void KisCanvasPainter::setPen(const QPen& pen) +void KisCanvasPainter::setPen(const TQPen& pen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setPen(pen); @@ -648,14 +648,14 @@ void KisCanvasPainter::setPen(Qt::PenStyle penStyle) } } -void KisCanvasPainter::setPen(const QColor& color) +void KisCanvasPainter::setPen(const TQColor& color) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setPen(color);; } } -const QBrush& KisCanvasPainter::brush() const +const TQBrush& KisCanvasPainter::brush() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->brush(); @@ -663,36 +663,36 @@ const QBrush& KisCanvasPainter::brush() const return m_defaultBrush; } -void KisCanvasPainter::setBrush(const QBrush& brush) +void KisCanvasPainter::setBrush(const TQBrush& brush) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrush(brush); } } -void KisCanvasPainter::setBrush(Qt::BrushStyle brushStyle) +void KisCanvasPainter::setBrush(TQt::BrushStyle brushStyle) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrush(brushStyle); } } -void KisCanvasPainter::setBrush(const QColor& color) +void KisCanvasPainter::setBrush(const TQColor& color) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrush(color); } } -QPoint KisCanvasPainter::pos() const +TQPoint KisCanvasPainter::pos() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->pos(); } - return QPoint(); + return TQPoint(); } -const QColor& KisCanvasPainter::backgroundColor() const +const TQColor& KisCanvasPainter::backgroundColor() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->backgroundColor(); @@ -700,7 +700,7 @@ const QColor& KisCanvasPainter::backgroundColor() const return m_defaultColor; } -void KisCanvasPainter::setBackgroundColor(const QColor& color) +void KisCanvasPainter::setBackgroundColor(const TQColor& color) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBackgroundColor(color); @@ -712,7 +712,7 @@ Qt::BGMode KisCanvasPainter::backgroundMode() const if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->backgroundMode(); } - return Qt::TransparentMode; + return TQt::TransparentMode; } void KisCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) @@ -722,22 +722,22 @@ void KisCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) } } -Qt::RasterOp KisCanvasPainter::rasterOp() const +TQt::RasterOp KisCanvasPainter::rasterOp() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->rasterOp(); } - return Qt::CopyROP; + return TQt::CopyROP; } -void KisCanvasPainter::setRasterOp(Qt::RasterOp rasterOp) +void KisCanvasPainter::setRasterOp(TQt::RasterOp rasterOp) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setRasterOp(rasterOp); } } -const QPoint& KisCanvasPainter::brushOrigin() const +const TQPoint& KisCanvasPainter::brushOrigin() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->brushOrigin(); @@ -752,7 +752,7 @@ void KisCanvasPainter::setBrushOrigin(int x, int y) } } -void KisCanvasPainter::setBrushOrigin(const QPoint& origin) +void KisCanvasPainter::setBrushOrigin(const TQPoint& origin) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrushOrigin(origin); @@ -782,15 +782,15 @@ void KisCanvasPainter::setViewXForm(bool enable) } } -QRect KisCanvasPainter::window() const +TQRect KisCanvasPainter::window() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->window(); } - return QRect(); + return TQRect(); } -void KisCanvasPainter::setWindow(const QRect& r) +void KisCanvasPainter::setWindow(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setWindow(r); @@ -804,15 +804,15 @@ void KisCanvasPainter::setWindow(int x, int y, int w, int h) } } -QRect KisCanvasPainter::viewport() const +TQRect KisCanvasPainter::viewport() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->viewport(); } - return QRect(); + return TQRect(); } -void KisCanvasPainter::setViewport(const QRect& r) +void KisCanvasPainter::setViewport(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setViewport(r); @@ -833,15 +833,15 @@ void KisCanvasPainter::setWorldXForm(bool enable) } } -const QWMatrix& KisCanvasPainter::worldMatrix() const +const TQWMatrix& KisCanvasPainter::tqworldMatrix() const { if (m_canvasWidgetPainter != 0) { - return m_canvasWidgetPainter->worldMatrix(); + return m_canvasWidgetPainter->tqworldMatrix(); } return m_defaultWorldMatrix; } -void KisCanvasPainter::setWorldMatrix(const QWMatrix& matrix, bool combine) +void KisCanvasPainter::setWorldMatrix(const TQWMatrix& matrix, bool combine) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setWorldMatrix(matrix, combine); @@ -913,7 +913,7 @@ double KisCanvasPainter::translationY() const return 0; } -QPoint KisCanvasPainter::xForm(const QPoint& point) const +TQPoint KisCanvasPainter::xForm(const TQPoint& point) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(point); @@ -921,7 +921,7 @@ QPoint KisCanvasPainter::xForm(const QPoint& point) const return point; } -QRect KisCanvasPainter::xForm(const QRect& r) const +TQRect KisCanvasPainter::xForm(const TQRect& r) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(r); @@ -929,7 +929,7 @@ QRect KisCanvasPainter::xForm(const QRect& r) const return r; } -QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisCanvasPainter::xForm(const TQPointArray& pointArray) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(pointArray); @@ -937,7 +937,7 @@ QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray) const return pointArray; } -QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisCanvasPainter::xForm(const TQPointArray& pointArray, int index, int npoints) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(pointArray, index, npoints); @@ -945,7 +945,7 @@ QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray, int index, in return pointArray; } -QPoint KisCanvasPainter::xFormDev(const QPoint& point) const +TQPoint KisCanvasPainter::xFormDev(const TQPoint& point) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(point); @@ -953,7 +953,7 @@ QPoint KisCanvasPainter::xFormDev(const QPoint& point) const return point; } -QRect KisCanvasPainter::xFormDev(const QRect& r) const +TQRect KisCanvasPainter::xFormDev(const TQRect& r) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(r); @@ -961,7 +961,7 @@ QRect KisCanvasPainter::xFormDev(const QRect& r) const return r; } -QPointArray KisCanvasPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisCanvasPainter::xFormDev(const TQPointArray& pointArray) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(pointArray); @@ -969,7 +969,7 @@ QPointArray KisCanvasPainter::xFormDev(const QPointArray& pointArray) const return pointArray; } -QPointArray KisCanvasPainter::xFormDev(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisCanvasPainter::xFormDev(const TQPointArray& pointArray, int index, int npoints) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(pointArray, index, npoints); @@ -992,29 +992,29 @@ bool KisCanvasPainter::hasClipping() const return true; } -QRegion KisCanvasPainter::clipRegion(QPainter::CoordinateMode mode) const +TQRegion KisCanvasPainter::clipRegion(TQPainter::CoordinateMode mode) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->clipRegion(mode); } - return QRegion(); + return TQRegion(); } -void KisCanvasPainter::setClipRect(const QRect& r, QPainter::CoordinateMode mode) +void KisCanvasPainter::setClipRect(const TQRect& r, TQPainter::CoordinateMode mode) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setClipRect(r, mode); } } -void KisCanvasPainter::setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode mode) +void KisCanvasPainter::setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode mode) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setClipRect(x, y, w, h, mode); } } -void KisCanvasPainter::setClipRegion(const QRegion& rgn, QPainter::CoordinateMode mode) +void KisCanvasPainter::setClipRegion(const TQRegion& rgn, TQPainter::CoordinateMode mode) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setClipRegion(rgn, mode); @@ -1028,14 +1028,14 @@ void KisCanvasPainter::drawPoint(int x, int y) } } -void KisCanvasPainter::drawPoint(const QPoint& point) +void KisCanvasPainter::drawPoint(const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPoint(point); } } -void KisCanvasPainter::drawPoints(const QPointArray& pointArray, int index, int npoints) +void KisCanvasPainter::drawPoints(const TQPointArray& pointArray, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPoints(pointArray, index, npoints); @@ -1049,7 +1049,7 @@ void KisCanvasPainter::moveTo(int x, int y) } } -void KisCanvasPainter::moveTo(const QPoint& point) +void KisCanvasPainter::moveTo(const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->moveTo(point); @@ -1063,7 +1063,7 @@ void KisCanvasPainter::lineTo(int x, int y) } } -void KisCanvasPainter::lineTo(const QPoint& point) +void KisCanvasPainter::lineTo(const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->lineTo(point); @@ -1077,7 +1077,7 @@ void KisCanvasPainter::drawLine(int x1, int y1, int x2, int y2) } } -void KisCanvasPainter::drawLine(const QPoint& start, const QPoint& end) +void KisCanvasPainter::drawLine(const TQPoint& start, const TQPoint& end) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawLine(start, end); @@ -1091,7 +1091,7 @@ void KisCanvasPainter::drawRect(int x, int y, int w, int h) } } -void KisCanvasPainter::drawRect(const QRect& r) +void KisCanvasPainter::drawRect(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawRect(r); @@ -1105,21 +1105,21 @@ void KisCanvasPainter::drawWinFocusRect(int x, int y, int w, int h) } } -void KisCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const QColor& bgColor) +void KisCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const TQColor& bgColor) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawWinFocusRect(x, y, w, h, bgColor); } } -void KisCanvasPainter::drawWinFocusRect(const QRect& r) +void KisCanvasPainter::drawWinFocusRect(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawWinFocusRect(r); } } -void KisCanvasPainter::drawWinFocusRect(const QRect& r, const QColor& bgColor) +void KisCanvasPainter::drawWinFocusRect(const TQRect& r, const TQColor& bgColor) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawWinFocusRect(r, bgColor); @@ -1133,7 +1133,7 @@ void KisCanvasPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int y } } -void KisCanvasPainter::drawRoundRect(const QRect& r, int xRnd, int yRnd) +void KisCanvasPainter::drawRoundRect(const TQRect& r, int xRnd, int yRnd) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawRoundRect(r, xRnd, yRnd); @@ -1147,7 +1147,7 @@ void KisCanvasPainter::drawEllipse(int x, int y, int w, int h) } } -void KisCanvasPainter::drawEllipse(const QRect& r) +void KisCanvasPainter::drawEllipse(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawEllipse(r); @@ -1161,7 +1161,7 @@ void KisCanvasPainter::drawArc(int x, int y, int w, int h, int a, int alen) } } -void KisCanvasPainter::drawArc(const QRect& r, int a, int alen) +void KisCanvasPainter::drawArc(const TQRect& r, int a, int alen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawArc(r, a, alen); @@ -1175,7 +1175,7 @@ void KisCanvasPainter::drawPie(int x, int y, int w, int h, int a, int alen) } } -void KisCanvasPainter::drawPie(const QRect& r, int a, int alen) +void KisCanvasPainter::drawPie(const TQRect& r, int a, int alen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPie(r, a, alen); @@ -1189,133 +1189,133 @@ void KisCanvasPainter::drawChord(int x, int y, int w, int h, int a, int alen) } } -void KisCanvasPainter::drawChord(const QRect& r, int a, int alen) +void KisCanvasPainter::drawChord(const TQRect& r, int a, int alen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawChord(r, a, alen); } } -void KisCanvasPainter::drawLineSegments(const QPointArray& pointArray, int index, int nlines) +void KisCanvasPainter::drawLineSegments(const TQPointArray& pointArray, int index, int nlines) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawLineSegments(pointArray, index, nlines); } } -void KisCanvasPainter::drawPolyline(const QPointArray& pointArray, int index, int npoints) +void KisCanvasPainter::drawPolyline(const TQPointArray& pointArray, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPolyline(pointArray, index, npoints); } } -void KisCanvasPainter::drawPolygon(const QPointArray& pointArray, bool winding, int index, int npoints) +void KisCanvasPainter::drawPolygon(const TQPointArray& pointArray, bool winding, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPolygon(pointArray, winding, index, npoints); } } -void KisCanvasPainter::drawConvexPolygon(const QPointArray& pointArray, int index, int npoints) +void KisCanvasPainter::drawConvexPolygon(const TQPointArray& pointArray, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawConvexPolygon(pointArray, index, npoints); } } -void KisCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int index) +void KisCanvasPainter::drawCubicBezier(const TQPointArray& pointArray, int index) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawCubicBezier(pointArray, index); } } -void KisCanvasPainter::drawPixmap(int x, int y, const QPixmap& pixmap, int sx, int sy, int sw, int sh) +void KisCanvasPainter::drawPixmap(int x, int y, const TQPixmap& pixmap, int sx, int sy, int sw, int sh) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(x, y, pixmap, sx, sy, sw, sh); } } -void KisCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap, const QRect& sr) +void KisCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap, const TQRect& sr) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(point, pixmap, sr); } } -void KisCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap) +void KisCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(point, pixmap); } } -void KisCanvasPainter::drawPixmap(const QRect& r, const QPixmap& pixmap) +void KisCanvasPainter::drawPixmap(const TQRect& r, const TQPixmap& pixmap) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(r, pixmap); } } -void KisCanvasPainter::drawImage(int x, int y, const QImage& image, int sx, int sy, int sw, int sh, int conversionFlags) +void KisCanvasPainter::drawImage(int x, int y, const TQImage& image, int sx, int sy, int sw, int sh, int conversionFlags) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(x, y, image, sx, sy, sw, sh, conversionFlags); } } -void KisCanvasPainter::drawImage(const QPoint& point, const QImage& image, const QRect& sr, int conversionFlags) +void KisCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, const TQRect& sr, int conversionFlags) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(point, image, sr, conversionFlags); } } -void KisCanvasPainter::drawImage(const QPoint& point, const QImage& image, int conversion_flags) +void KisCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, int conversion_flags) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(point, image, conversion_flags); } } -void KisCanvasPainter::drawImage(const QRect& r, const QImage& image) +void KisCanvasPainter::drawImage(const TQRect& r, const TQImage& image) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(r, image); } } -void KisCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const QPixmap& pixmap, int sx, int sy) +void KisCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const TQPixmap& pixmap, int sx, int sy) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawTiledPixmap(x, y, w, h, pixmap, sx, sy); } } -void KisCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap, const QPoint& point) +void KisCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap, const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawTiledPixmap(r, pixmap, point); } } -void KisCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap) +void KisCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawTiledPixmap(r, pixmap); } } -void KisCanvasPainter::fillRect(int x, int y, int w, int h, const QBrush& brush) +void KisCanvasPainter::fillRect(int x, int y, int w, int h, const TQBrush& brush) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->fillRect(x, y, w, h, brush); } } -void KisCanvasPainter::fillRect(const QRect& r, const QBrush& brush) +void KisCanvasPainter::fillRect(const TQRect& r, const TQBrush& brush) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->fillRect(r, brush); @@ -1329,83 +1329,83 @@ void KisCanvasPainter::eraseRect(int x, int y, int w, int h) } } -void KisCanvasPainter::eraseRect(const QRect& r) +void KisCanvasPainter::eraseRect(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->eraseRect(r); } } -void KisCanvasPainter::drawText(int x, int y, const QString& text, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(int x, int y, const TQString& text, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(x, y, text, len, dir); } } -void KisCanvasPainter::drawText(const QPoint& point, const QString& text, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(const TQPoint& point, const TQString& text, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(point, text, len, dir); } } -void KisCanvasPainter::drawText(int x, int y, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(int x, int y, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(x, y, text, pos, len, dir); } } -void KisCanvasPainter::drawText(const QPoint& point, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(const TQPoint& point, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(point, text, pos, len, dir); } } -void KisCanvasPainter::drawText(int x, int y, int w, int h, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisCanvasPainter::drawText(int x, int y, int w, int h, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(x, y, w, h, flags, text, len, br, intern); } } -void KisCanvasPainter::drawText(const QRect& r, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisCanvasPainter::drawText(const TQRect& r, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(r, flags, text, len, br, intern); } } -void KisCanvasPainter::drawTextItem(int x, int y, const QTextItem& ti, int textflags) +void KisCanvasPainter::tqdrawTextItem(int x, int y, const TQTextItem& ti, int textflags) { if (m_canvasWidgetPainter != 0) { - m_canvasWidgetPainter->drawTextItem(x, y, ti, textflags); + m_canvasWidgetPainter->tqdrawTextItem(x, y, ti, textflags); } } -void KisCanvasPainter::drawTextItem(const QPoint& p, const QTextItem& ti, int textflags) +void KisCanvasPainter::tqdrawTextItem(const TQPoint& p, const TQTextItem& ti, int textflags) { if (m_canvasWidgetPainter != 0) { - m_canvasWidgetPainter->drawTextItem(p, ti, textflags); + m_canvasWidgetPainter->tqdrawTextItem(p, ti, textflags); } } -QRect KisCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const TQString& text, int len, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->boundingRect(x, y, w, h, flags, text, len, intern); } - return QRect(); + return TQRect(); } -QRect KisCanvasPainter::boundingRect(const QRect& r, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisCanvasPainter::boundingRect(const TQRect& r, int flags, const TQString& text, int len, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->boundingRect(r, flags, text, len, intern); } - return QRect(); + return TQRect(); } int KisCanvasPainter::tabStops() const diff --git a/krita/ui/kis_canvas_painter.h b/krita/ui/kis_canvas_painter.h index 5559057d..9a719eea 100644 --- a/krita/ui/kis_canvas_painter.h +++ b/krita/ui/kis_canvas_painter.h @@ -23,7 +23,7 @@ #include #endif -#include +#include #include "kis_global.h" @@ -41,45 +41,45 @@ public: virtual void save(); virtual void restore(); - virtual QFontMetrics fontMetrics() const; - virtual QFontInfo fontInfo() const; + virtual TQFontMetrics fontMetrics() const; + virtual TQFontInfo fontInfo() const; - virtual const QFont& font() const; - virtual void setFont(const QFont&); - virtual const QPen& pen() const; - virtual void setPen(const QPen&); + virtual const TQFont& font() const; + virtual void setFont(const TQFont&); + virtual const TQPen& pen() const; + virtual void setPen(const TQPen&); virtual void setPen(Qt::PenStyle); - virtual void setPen(const QColor&); - virtual const QBrush&brush() const; - virtual void setBrush(const QBrush&); - virtual void setBrush(Qt::BrushStyle); - virtual void setBrush(const QColor&); - virtual QPoint pos() const; - - virtual const QColor&backgroundColor() const; - virtual void setBackgroundColor(const QColor&); + virtual void setPen(const TQColor&); + virtual const TQBrush&brush() const; + virtual void setBrush(const TQBrush&); + virtual void setBrush(TQt::BrushStyle); + virtual void setBrush(const TQColor&); + virtual TQPoint pos() const; + + virtual const TQColor&backgroundColor() const; + virtual void setBackgroundColor(const TQColor&); virtual Qt::BGMode backgroundMode() const; virtual void setBackgroundMode(Qt::BGMode); - virtual Qt::RasterOp rasterOp() const; - virtual void setRasterOp(Qt::RasterOp); - virtual const QPoint&brushOrigin() const; + virtual TQt::RasterOp rasterOp() const; + virtual void setRasterOp(TQt::RasterOp); + virtual const TQPoint&brushOrigin() const; virtual void setBrushOrigin(int x, int y); - virtual void setBrushOrigin(const QPoint&); + virtual void setBrushOrigin(const TQPoint&); virtual bool hasViewXForm() const; virtual bool hasWorldXForm() const; virtual void setViewXForm(bool); - virtual QRect window() const; - virtual void setWindow(const QRect&); + virtual TQRect window() const; + virtual void setWindow(const TQRect&); virtual void setWindow(int x, int y, int w, int h); - virtual QRect viewport() const; - virtual void setViewport(const QRect&); + virtual TQRect viewport() const; + virtual void setViewport(const TQRect&); virtual void setViewport(int x, int y, int w, int h); virtual void setWorldXForm(bool); - virtual const QWMatrix&worldMatrix() const; - virtual void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + virtual const TQWMatrix&tqworldMatrix() const; + virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void saveWorldMatrix(); virtual void restoreWorldMatrix(); @@ -93,86 +93,86 @@ public: virtual double translationX() const; virtual double translationY() const; - virtual QPoint xForm(const QPoint&) const; - virtual QRect xForm(const QRect&) const; - virtual QPointArray xForm(const QPointArray&) const; - virtual QPointArray xForm(const QPointArray&, int index, int npoints) const; - virtual QPoint xFormDev(const QPoint&) const; - virtual QRect xFormDev(const QRect&) const; - virtual QPointArray xFormDev(const QPointArray&) const; - virtual QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + virtual TQPoint xForm(const TQPoint&) const; + virtual TQRect xForm(const TQRect&) const; + virtual TQPointArray xForm(const TQPointArray&) const; + virtual TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + virtual TQPoint xFormDev(const TQPoint&) const; + virtual TQRect xFormDev(const TQRect&) const; + virtual TQPointArray xFormDev(const TQPointArray&) const; + virtual TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; virtual void setClipping(bool); virtual bool hasClipping() const; - virtual QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - virtual void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + virtual TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + virtual void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); virtual void drawPoint(int x, int y); - virtual void drawPoint(const QPoint&); - virtual void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + virtual void drawPoint(const TQPoint&); + virtual void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); virtual void moveTo(int x, int y); - virtual void moveTo(const QPoint&); + virtual void moveTo(const TQPoint&); virtual void lineTo(int x, int y); - virtual void lineTo(const QPoint&); + virtual void lineTo(const TQPoint&); virtual void drawLine(int x1, int y1, int x2, int y2); - virtual void drawLine(const QPoint&, const QPoint&); + virtual void drawLine(const TQPoint&, const TQPoint&); virtual void drawRect(int x, int y, int w, int h); - virtual void drawRect(const QRect&); + virtual void drawRect(const TQRect&); virtual void drawWinFocusRect(int x, int y, int w, int h); - virtual void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - virtual void drawWinFocusRect(const QRect&); - virtual void drawWinFocusRect(const QRect&, const QColor&bgColor); + virtual void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + virtual void drawWinFocusRect(const TQRect&); + virtual void drawWinFocusRect(const TQRect&, const TQColor&bgColor); virtual void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - virtual void drawRoundRect(const QRect&, int = 25, int = 25); + virtual void drawRoundRect(const TQRect&, int = 25, int = 25); virtual void drawEllipse(int x, int y, int w, int h); - virtual void drawEllipse(const QRect&); + virtual void drawEllipse(const TQRect&); virtual void drawArc(int x, int y, int w, int h, int a, int alen); - virtual void drawArc(const QRect&, int a, int alen); + virtual void drawArc(const TQRect&, int a, int alen); virtual void drawPie(int x, int y, int w, int h, int a, int alen); - virtual void drawPie(const QRect&, int a, int alen); + virtual void drawPie(const TQRect&, int a, int alen); virtual void drawChord(int x, int y, int w, int h, int a, int alen); - virtual void drawChord(const QRect&, int a, int alen); - virtual void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - virtual void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - virtual void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - virtual void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - virtual void drawCubicBezier(const QPointArray&, int index=0); - virtual void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - virtual void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - virtual void drawPixmap(const QPoint&, const QPixmap&); - virtual void drawPixmap(const QRect&, const QPixmap&); - virtual void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - virtual void drawImage(const QRect&, const QImage&); - virtual void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - virtual void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - virtual void drawTiledPixmap(const QRect&, const QPixmap&); - //virtual void drawPicture(const QPicture&); - //virtual void drawPicture(int x, int y, const QPicture&); - //virtual void drawPicture(const QPoint&, const QPicture&); - - virtual void fillRect(int x, int y, int w, int h, const QBrush&); - virtual void fillRect(const QRect&, const QBrush&); + virtual void drawChord(const TQRect&, int a, int alen); + virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawCubicBezier(const TQPointArray&, int index=0); + virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + virtual void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + virtual void drawPixmap(const TQPoint&, const TQPixmap&); + virtual void drawPixmap(const TQRect&, const TQPixmap&); + virtual void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + virtual void drawImage(const TQRect&, const TQImage&); + virtual void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&); + //virtual void drawPicture(const TQPicture&); + //virtual void drawPicture(int x, int y, const TQPicture&); + //virtual void drawPicture(const TQPoint&, const TQPicture&); + + virtual void fillRect(int x, int y, int w, int h, const TQBrush&); + virtual void fillRect(const TQRect&, const TQBrush&); virtual void eraseRect(int x, int y, int w, int h); - virtual void eraseRect(const QRect&); + virtual void eraseRect(const TQRect&); - virtual void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - virtual void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + virtual void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + virtual void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - virtual void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - virtual void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - virtual QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - virtual QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + virtual TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + virtual TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); virtual int tabStops() const; virtual void setTabStops(int); @@ -180,69 +180,69 @@ public: virtual void setTabArray(int *); protected: - QFont m_defaultFont; - QPen m_defaultPen; - QBrush m_defaultBrush; - QColor m_defaultColor; - QPoint m_defaultBrushOrigin; - QWMatrix m_defaultWorldMatrix; + TQFont m_defaultFont; + TQPen m_defaultPen; + TQBrush m_defaultBrush; + TQColor m_defaultColor; + TQPoint m_defaultBrushOrigin; + TQWMatrix m_defaultWorldMatrix; }; class KisCanvasPainter { public: KisCanvasPainter(); KisCanvasPainter(KisCanvas *canvas); - KisCanvasPainter(const QPaintDevice *paintDevice); + KisCanvasPainter(const TQPaintDevice *paintDevice); ~KisCanvasPainter(); bool begin(KisCanvas *canvas, bool unclipped = false); - bool begin(const QPaintDevice *paintDevice, bool unclipped = false); + bool begin(const TQPaintDevice *paintDevice, bool unclipped = false); bool end(); void save(); void restore(); - QFontMetrics fontMetrics() const; - QFontInfo fontInfo() const; + TQFontMetrics fontMetrics() const; + TQFontInfo fontInfo() const; - const QFont& font() const; - void setFont(const QFont&); - const QPen& pen() const; - void setPen(const QPen&); + const TQFont& font() const; + void setFont(const TQFont&); + const TQPen& pen() const; + void setPen(const TQPen&); void setPen(Qt::PenStyle); - void setPen(const QColor&); - const QBrush&brush() const; - void setBrush(const QBrush&); - void setBrush(Qt::BrushStyle); - void setBrush(const QColor&); - QPoint pos() const; - - const QColor&backgroundColor() const; - void setBackgroundColor(const QColor&); + void setPen(const TQColor&); + const TQBrush&brush() const; + void setBrush(const TQBrush&); + void setBrush(TQt::BrushStyle); + void setBrush(const TQColor&); + TQPoint pos() const; + + const TQColor&backgroundColor() const; + void setBackgroundColor(const TQColor&); Qt::BGMode backgroundMode() const; void setBackgroundMode(Qt::BGMode); - Qt::RasterOp rasterOp() const; - void setRasterOp(Qt::RasterOp); - const QPoint&brushOrigin() const; + TQt::RasterOp rasterOp() const; + void setRasterOp(TQt::RasterOp); + const TQPoint&brushOrigin() const; void setBrushOrigin(int x, int y); - void setBrushOrigin(const QPoint&); + void setBrushOrigin(const TQPoint&); bool hasViewXForm() const; bool hasWorldXForm() const; void setViewXForm(bool); - QRect window() const; - void setWindow(const QRect&); + TQRect window() const; + void setWindow(const TQRect&); void setWindow(int x, int y, int w, int h); - QRect viewport() const; - void setViewport(const QRect&); + TQRect viewport() const; + void setViewport(const TQRect&); void setViewport(int x, int y, int w, int h); void setWorldXForm(bool); - const QWMatrix&worldMatrix() const; - void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + const TQWMatrix&tqworldMatrix() const; + void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); void saveWorldMatrix(); void restoreWorldMatrix(); @@ -256,86 +256,86 @@ public: double translationX() const; double translationY() const; - QPoint xForm(const QPoint&) const; - QRect xForm(const QRect&) const; - QPointArray xForm(const QPointArray&) const; - QPointArray xForm(const QPointArray&, int index, int npoints) const; - QPoint xFormDev(const QPoint&) const; - QRect xFormDev(const QRect&) const; - QPointArray xFormDev(const QPointArray&) const; - QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + TQPoint xForm(const TQPoint&) const; + TQRect xForm(const TQRect&) const; + TQPointArray xForm(const TQPointArray&) const; + TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + TQPoint xFormDev(const TQPoint&) const; + TQRect xFormDev(const TQRect&) const; + TQPointArray xFormDev(const TQPointArray&) const; + TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; void setClipping(bool); bool hasClipping() const; - QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); void drawPoint(int x, int y); - void drawPoint(const QPoint&); - void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + void drawPoint(const TQPoint&); + void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); void moveTo(int x, int y); - void moveTo(const QPoint&); + void moveTo(const TQPoint&); void lineTo(int x, int y); - void lineTo(const QPoint&); + void lineTo(const TQPoint&); void drawLine(int x1, int y1, int x2, int y2); - void drawLine(const QPoint&, const QPoint&); + void drawLine(const TQPoint&, const TQPoint&); void drawRect(int x, int y, int w, int h); - void drawRect(const QRect&); + void drawRect(const TQRect&); void drawWinFocusRect(int x, int y, int w, int h); - void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - void drawWinFocusRect(const QRect&); - void drawWinFocusRect(const QRect&, const QColor&bgColor); + void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + void drawWinFocusRect(const TQRect&); + void drawWinFocusRect(const TQRect&, const TQColor&bgColor); void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - void drawRoundRect(const QRect&, int = 25, int = 25); + void drawRoundRect(const TQRect&, int = 25, int = 25); void drawEllipse(int x, int y, int w, int h); - void drawEllipse(const QRect&); + void drawEllipse(const TQRect&); void drawArc(int x, int y, int w, int h, int a, int alen); - void drawArc(const QRect&, int a, int alen); + void drawArc(const TQRect&, int a, int alen); void drawPie(int x, int y, int w, int h, int a, int alen); - void drawPie(const QRect&, int a, int alen); + void drawPie(const TQRect&, int a, int alen); void drawChord(int x, int y, int w, int h, int a, int alen); - void drawChord(const QRect&, int a, int alen); - void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - void drawCubicBezier(const QPointArray&, int index=0); - void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - void drawPixmap(const QPoint&, const QPixmap&); - void drawPixmap(const QRect&, const QPixmap&); - void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - void drawImage(const QRect&, const QImage&); - void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - void drawTiledPixmap(const QRect&, const QPixmap&); - //void drawPicture(const QPicture&); - //void drawPicture(int x, int y, const QPicture&); - //void drawPicture(const QPoint&, const QPicture&); - - void fillRect(int x, int y, int w, int h, const QBrush&); - void fillRect(const QRect&, const QBrush&); + void drawChord(const TQRect&, int a, int alen); + void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + void drawCubicBezier(const TQPointArray&, int index=0); + void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + void drawPixmap(const TQPoint&, const TQPixmap&); + void drawPixmap(const TQRect&, const TQPixmap&); + void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + void drawImage(const TQRect&, const TQImage&); + void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + void drawTiledPixmap(const TQRect&, const TQPixmap&); + //void drawPicture(const TQPicture&); + //void drawPicture(int x, int y, const TQPicture&); + //void drawPicture(const TQPoint&, const TQPicture&); + + void fillRect(int x, int y, int w, int h, const TQBrush&); + void fillRect(const TQRect&, const TQBrush&); void eraseRect(int x, int y, int w, int h); - void eraseRect(const QRect&); + void eraseRect(const TQRect&); - void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); int tabStops() const; void setTabStops(int); @@ -344,12 +344,12 @@ public: protected: KisCanvasWidgetPainter *m_canvasWidgetPainter; - QFont m_defaultFont; - QPen m_defaultPen; - QBrush m_defaultBrush; - QColor m_defaultColor; - QPoint m_defaultBrushOrigin; - QWMatrix m_defaultWorldMatrix; + TQFont m_defaultFont; + TQPen m_defaultPen; + TQBrush m_defaultBrush; + TQColor m_defaultColor; + TQPoint m_defaultBrushOrigin; + TQWMatrix m_defaultWorldMatrix; }; #endif // KIS_CANVAS_PAINTER_H_ diff --git a/krita/ui/kis_clipboard.cc b/krita/ui/kis_clipboard.cc index 8b6a6cd8..b6a273c9 100644 --- a/krita/ui/kis_clipboard.cc +++ b/krita/ui/kis_clipboard.cc @@ -15,12 +15,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -52,8 +52,8 @@ KisClipboard::KisClipboard() clipboardDataChanged(); // Make sure we are notified when clipboard changes - connect( QApplication::clipboard(), SIGNAL( dataChanged() ), - this, SLOT( clipboardDataChanged() ) ); + connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + this, TQT_SLOT( clipboardDataChanged() ) ); } KisClipboard::~KisClipboard() @@ -80,8 +80,8 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) m_hasClip = true; // We'll create a store (ZIP format) in memory - QBuffer buffer; - QCString mimeType("application/x-krita-selection"); + TQBuffer buffer; + TQCString mimeType("application/x-krita-selection"); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType ); Q_ASSERT( store ); Q_ASSERT( !store->bad() ); @@ -98,7 +98,7 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) // ColorSpace id of layer data if (store->open("colorspace")) { - QString csName = selection->colorSpace()->id().id(); + TQString csName = selection->colorSpace()->id().id(); store->write(csName.ascii(), strlen(csName.ascii())); store->close(); } @@ -116,14 +116,14 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) delete store; - // We also create a QImage so we can interchange with other applications - QImage qimg; + // We also create a TQImage so we can interchange with other applications + TQImage qimg; KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); KisProfile * monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); - qimg = selection->convertToQImage(monitorProfile); + qimg = selection->convertToTQImage(monitorProfile); - QImageDrag *qimgDrag = new QImageDrag(qimg); + TQImageDrag *qimgDrag = new TQImageDrag(qimg); KMultipleDrag *multiDrag = new KMultipleDrag(); if ( !qimg.isNull() ) multiDrag->addDragObject( qimgDrag ); @@ -132,36 +132,36 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) multiDrag->addDragObject( storeDrag ); - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setData(multiDrag); m_pushedClipboard = true; } KisPaintDeviceSP KisClipboard::clip() { - QClipboard *cb = QApplication::clipboard(); - QCString mimeType("application/x-krita-selection"); - QMimeSource *cbData = cb->data(); + TQClipboard *cb = TQApplication::tqclipboard(); + TQCString mimeType("application/x-krita-selection"); + TQMimeSource *cbData = cb->data(); if(cbData && cbData->provides(mimeType)) { - QBuffer buffer(cbData->encodedData(mimeType)); + TQBuffer buffer(cbData->tqencodedData(mimeType)); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { - QByteArray data; + TQByteArray data; store->open("profile.icc"); data = store->read(store->size()); store->close(); profile = new KisProfile(data); } - QString csName; + TQString csName; // ColorSpace id of layer data if (store->hasFile("colorspace")) { store->open("colorspace"); - csName = QString(store->read(store->size())); + csName = TQString(store->read(store->size())); store->close(); } @@ -178,30 +178,30 @@ KisPaintDeviceSP KisClipboard::clip() } else { - QImage qimg = cb->image(); + TQImage qimg = cb->image(); if (qimg.isNull()) return 0; KisConfig cfg; - Q_UINT32 behaviour = cfg.pasteBehaviour(); + TQ_UINT32 behaviour = cfg.pasteBehaviour(); if(behaviour==2) { // Ask user each time - behaviour = QMessageBox::question(0,i18n("Pasting data from simple source"),i18n("The image data you are trying to paste has no colour profile information.\n\nOn the web and in simple applications the data are supposed to be in sRGB color format.\nImporting as web will show it as it is supposed to look.\nMost monitors are not perfect though so if you made the image yourself\nyou might want to import it as it looked on you monitor.\n\nHow do you want to interpret these data?"),i18n("As &Web"),i18n("As on &Monitor")); + behaviour = TQMessageBox::question(0,i18n("Pasting data from simple source"),i18n("The image data you are trying to paste has no colour profile information.\n\nOn the web and in simple applications the data are supposed to be in sRGB color format.\nImporting as web will show it as it is supposed to look.\nMost monitors are not perfect though so if you made the image yourself\nyou might want to import it as it looked on you monitor.\n\nHow do you want to interpret these data?"),i18n("As &Web"),i18n("As on &Monitor")); } KisColorSpace * cs; - QString profileName(""); + TQString profileName(""); if(behaviour==1) profileName = cfg.monitorProfile(); cs = KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("RGBA",""), profileName); m_clip = new KisPaintDevice(cs, "from paste"); Q_CHECK_PTR(m_clip); - m_clip->convertFromQImage(qimg, profileName); + m_clip->convertFromTQImage(qimg, profileName); } return m_clip; @@ -211,10 +211,10 @@ void KisClipboard::clipboardDataChanged() { if (!m_pushedClipboard) { m_hasClip = false; - QClipboard *cb = QApplication::clipboard(); - QImage qimg = cb->image(); - QMimeSource *cbData = cb->data(); - QCString mimeType("application/x-krita-selection"); + TQClipboard *cb = TQApplication::tqclipboard(); + TQImage qimg = cb->image(); + TQMimeSource *cbData = cb->data(); + TQCString mimeType("application/x-krita-selection"); if(cbData && cbData->provides(mimeType)) m_hasClip = true; @@ -232,34 +232,34 @@ bool KisClipboard::hasClip() return m_hasClip; } -QSize KisClipboard::clipSize() +TQSize KisClipboard::clipSize() { - QClipboard *cb = QApplication::clipboard(); - QCString mimeType("application/x-krita-selection"); - QMimeSource *cbData = cb->data(); + TQClipboard *cb = TQApplication::tqclipboard(); + TQCString mimeType("application/x-krita-selection"); + TQMimeSource *cbData = cb->data(); KisPaintDeviceSP clip; if(cbData && cbData->provides(mimeType)) { - QBuffer buffer(cbData->encodedData(mimeType)); + TQBuffer buffer(cbData->tqencodedData(mimeType)); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { - QByteArray data; + TQByteArray data; store->open("profile.icc"); data = store->read(store->size()); store->close(); profile = new KisProfile(data); } - QString csName; + TQString csName; // ColorSpace id of layer data if (store->hasFile("colorspace")) { store->open("colorspace"); - csName = QString(store->read(store->size())); + csName = TQString(store->read(store->size())); store->close(); } @@ -277,7 +277,7 @@ QSize KisClipboard::clipSize() return clip->exactBounds().size(); } else { - QImage qimg = cb->image(); + TQImage qimg = cb->image(); return qimg.size(); } ; diff --git a/krita/ui/kis_clipboard.h b/krita/ui/kis_clipboard.h index 346cc742..783791a6 100644 --- a/krita/ui/kis_clipboard.h +++ b/krita/ui/kis_clipboard.h @@ -22,18 +22,19 @@ #define __KIS_CLIPBOARD_H_ -#include +#include #include "kis_types.h" -class QImage; +class TQImage; /** * The Krita clipboard is a clipboard that can store paint devices * instead of just qimage's. */ -class KisClipboard : public QObject { +class KisClipboard : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -43,7 +44,7 @@ public: /** * Sets the clipboard to the contents of the specified paint device; also - * set the system clipboard to a QImage representation of the specified + * set the system clipboard to a TQImage representation of the specified * paint device. */ void setClip(KisPaintDeviceSP layer); @@ -55,7 +56,7 @@ public: bool hasClip(); - QSize clipSize(); + TQSize clipSize(); private slots: diff --git a/krita/ui/kis_cmb_composite.cc b/krita/ui/kis_cmb_composite.cc index 03c846c1..4ede96ae 100644 --- a/krita/ui/kis_cmb_composite.cc +++ b/krita/ui/kis_cmb_composite.cc @@ -18,18 +18,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include #include "kis_cmb_composite.h" -KisCmbComposite::KisCmbComposite(QWidget * parent, const char * name) - : super( false, parent, name ) +KisCmbComposite::KisCmbComposite(TQWidget * tqparent, const char * name) + : super( false, tqparent, name ) { - connect(this, SIGNAL(activated(int)), this, SLOT(slotOpActivated(int))); - connect(this, SIGNAL(highlighted(int)), this, SLOT(slotOpHighlighted(int))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotOpActivated(int))); + connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotOpHighlighted(int))); } KisCmbComposite::~KisCmbComposite() @@ -47,7 +47,7 @@ void KisCmbComposite::setCompositeOpList(const KisCompositeOpList & list) KisCompositeOp KisCmbComposite::currentItem() const { - Q_UINT32 i = super::currentItem(); + TQ_UINT32 i = super::currentItem(); if (i > m_list.count()) return KisCompositeOp(); return m_list[i]; @@ -55,12 +55,12 @@ KisCompositeOp KisCmbComposite::currentItem() const void KisCmbComposite::setCurrentItem(const KisCompositeOp& op) { - if (m_list.find(op) != m_list.end()) { + if (m_list.tqfind(op) != m_list.end()) { super::setCurrentText(op.id().name()); } } -void KisCmbComposite::setCurrentText(const QString & s) +void KisCmbComposite::setCurrentText(const TQString & s) { KisCompositeOpList::iterator it; for( it = m_list.begin(); it != m_list.end(); ++it ) @@ -71,14 +71,14 @@ void KisCmbComposite::setCurrentText(const QString & s) void KisCmbComposite::slotOpActivated(int i) { - if ((Q_UINT32)i > m_list.count()) return; + if ((TQ_UINT32)i > m_list.count()) return; emit activated(m_list[i]); } void KisCmbComposite::slotOpHighlighted(int i) { - if ((Q_UINT32)i > m_list.count()) return; + if ((TQ_UINT32)i > m_list.count()) return; emit highlighted(m_list[i]); } diff --git a/krita/ui/kis_cmb_composite.h b/krita/ui/kis_cmb_composite.h index fa930301..cee803c4 100644 --- a/krita/ui/kis_cmb_composite.h +++ b/krita/ui/kis_cmb_composite.h @@ -22,7 +22,7 @@ #define KIS_CMB_COMPOSITE_H_ #include -#include "qcombobox.h" +#include "tqcombobox.h" #include "kis_composite_op.h" /** @@ -36,22 +36,23 @@ * But that's for later... */ -class KRITAUI_EXPORT KisCmbComposite : public QComboBox +class KRITAUI_EXPORT KisCmbComposite : public TQComboBox { - typedef QComboBox super; + typedef TQComboBox super; Q_OBJECT + TQ_OBJECT public: - KisCmbComposite(QWidget * parent = 0, const char * name = 0 ); + KisCmbComposite(TQWidget * tqparent = 0, const char * name = 0 ); virtual ~KisCmbComposite(); KisCompositeOp currentItem() const; void setCompositeOpList(const KisCompositeOpList& list); void setCurrentItem(const KisCompositeOp& op); - void setCurrentText(const QString & s); + void setCurrentText(const TQString & s); signals: diff --git a/krita/ui/kis_cmb_idlist.cc b/krita/ui/kis_cmb_idlist.cc index 570a1ac0..254b7f16 100644 --- a/krita/ui/kis_cmb_idlist.cc +++ b/krita/ui/kis_cmb_idlist.cc @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -26,11 +26,11 @@ #include "kis_id.h" #include "kis_cmb_idlist.h" -KisCmbIDList::KisCmbIDList(QWidget * parent, const char * name) - : super( false, parent, name ) +KisCmbIDList::KisCmbIDList(TQWidget * tqparent, const char * name) + : super( false, tqparent, name ) { - connect(this, SIGNAL(activated(int)), this, SLOT(slotIDActivated(int))); - connect(this, SIGNAL(highlighted(int)), this, SLOT(slotIDHighlighted(int))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotIDActivated(int))); + connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotIDHighlighted(int))); } KisCmbIDList::~KisCmbIDList() @@ -49,7 +49,7 @@ void KisCmbIDList::setIDList(const KisIDList & list) KisID KisCmbIDList::currentItem() const { - Q_UINT32 i = super::currentItem(); + TQ_UINT32 i = super::currentItem(); if (i > m_list.count()) return KisID(); return m_list[i]; @@ -57,7 +57,7 @@ KisID KisCmbIDList::currentItem() const void KisCmbIDList::setCurrent(const KisID id) { - if (m_list.find(id) != m_list.end()) + if (m_list.tqfind(id) != m_list.end()) super::setCurrentText(id.name()); else { m_list.push_back(id); @@ -66,7 +66,7 @@ void KisCmbIDList::setCurrent(const KisID id) } } -void KisCmbIDList::setCurrentText(const QString & s) +void KisCmbIDList::setCurrentText(const TQString & s) { KisIDList::iterator it; for( it = m_list.begin(); it != m_list.end(); ++it ) diff --git a/krita/ui/kis_cmb_idlist.h b/krita/ui/kis_cmb_idlist.h index 287797ea..fc088b3e 100644 --- a/krita/ui/kis_cmb_idlist.h +++ b/krita/ui/kis_cmb_idlist.h @@ -21,7 +21,7 @@ #ifndef KIS_CMB_IDLIST_H_ #define KIS_CMB_IDLIST_H_ -#include "qcombobox.h" +#include "tqcombobox.h" #include "kis_id.h" @@ -30,22 +30,23 @@ * descriptive (i18n'ed) text is displayed, but the various * signals return a KisID. */ -class KisCmbIDList : public QComboBox +class KisCmbIDList : public TQComboBox { - typedef QComboBox super; + typedef TQComboBox super; Q_OBJECT + TQ_OBJECT public: - KisCmbIDList(QWidget * parent = 0, const char * name = 0 ); + KisCmbIDList(TQWidget * tqparent = 0, const char * name = 0 ); virtual ~KisCmbIDList(); public: void setIDList(const KisIDList & list); void setCurrent(const KisID id); - void setCurrentText(const QString & s); + void setCurrentText(const TQString & s); KisID currentItem() const; diff --git a/krita/ui/kis_color_cup.cc b/krita/ui/kis_color_cup.cc index 3342305f..f5ac4bc5 100644 --- a/krita/ui/kis_color_cup.cc +++ b/krita/ui/kis_color_cup.cc @@ -19,20 +19,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#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 +#include #include #include @@ -43,13 +43,13 @@ #include #include -KisColorPopup::KisColorPopup(QColor c, QWidget * parent, const char * name) - : QFrame(parent, name, WType_Popup | WStyle_Customize | WStyle_NoBorder) +KisColorPopup::KisColorPopup(TQColor c, TQWidget * tqparent, const char * name) + : TQFrame(tqparent, name, WType_Popup | WStyle_Customize | WStyle_NoBorder) { m_color = c; setMargin(4); setFocusPolicy(StrongFocus); - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); l->add(m_khsSelector = new KHSSelector(this)); m_khsSelector->setMinimumSize(140, 7); l->add(m_valueSelector = new KValueSelector(this)); @@ -59,16 +59,16 @@ KisColorPopup::KisColorPopup(QColor c, QWidget * parent, const char * name) } -KisColorCup::KisColorCup(QWidget * parent, const char * name) - : QPushButton(parent, name) +KisColorCup::KisColorCup(TQWidget * tqparent, const char * name) + : TQPushButton(tqparent, name) { - m_color = Qt::black; + m_color = TQt::black; m_popup = new KisColorPopup(m_color, this, "colorpopup"); - connect(this, SIGNAL(clicked()), this, SLOT(slotClicked())); - connect(m_popup, SIGNAL(changed( const QColor &)), this, SLOT(setColor(const QColor &))); + connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked())); + connect(m_popup, TQT_SIGNAL(changed( const TQColor &)), this, TQT_SLOT(setColor(const TQColor &))); } -void KisColorCup::setColor(const QColor & c) +void KisColorCup::setColor(const TQColor & c) { m_color = c; emit changed(c); @@ -81,36 +81,36 @@ void KisColorCup::slotClicked() emit changed(m_color); } -QSize KisColorCup::sizeHint() const +TQSize KisColorCup::tqsizeHint() const { - return style().sizeFromContents(QStyle::CT_PushButton, this, QSize(24, 24)). - expandedTo(QApplication::globalStrut()); + return style().sizeFromContents(TQStyle::CT_PushButton, this, TQSize(24, 24)). + expandedTo(TQApplication::globalStrut()); } -void KisColorCup::drawButtonLabel( QPainter *painter ) +void KisColorCup::drawButtonLabel( TQPainter *painter ) { int x, y, w, h; - QRect r = style().subRect( QStyle::SR_PushButtonContents, this ); + TQRect r = style().subRect( TQStyle::SR_PushButtonContents, this ); r.rect(&x, &y, &w, &h); - int margin = 2; //style().pixelMetric( QStyle::PM_ButtonMargin, this ); + int margin = 2; //style().tqpixelMetric( TQStyle::PM_ButtonMargin, this ); x += margin; y += margin; w -= 2*margin; h -= 2*margin; if (isOn() || isDown()) { - x += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal, this ); - y += style().pixelMetric( QStyle::PM_ButtonShiftVertical, this ); + x += style().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); + y += style().tqpixelMetric( TQStyle::PM_ButtonShiftVertical, this ); } - qDrawShadePanel( painter, x, y, w, h, colorGroup(), true, 1, NULL); + qDrawShadePanel( painter, x, y, w, h, tqcolorGroup(), true, 1, NULL); if ( m_color.isValid() ) painter->fillRect( x+1, y+1, w-2, h-2, m_color ); if ( hasFocus() ) { - QRect focusRect = style().subRect( QStyle::SR_PushButtonFocusRect, this ); - style().drawPrimitive( QStyle::PE_FocusRect, painter, focusRect, colorGroup() ); + TQRect focusRect = style().subRect( TQStyle::SR_PushButtonFocusRect, this ); + style().drawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, tqcolorGroup() ); } } diff --git a/krita/ui/kis_color_cup.h b/krita/ui/kis_color_cup.h index eb98616f..7a59837a 100644 --- a/krita/ui/kis_color_cup.h +++ b/krita/ui/kis_color_cup.h @@ -19,62 +19,64 @@ #ifndef KIS_COLOR_CUP_H #define KIS_COLOR_CUP_H -#include -#include -#include +#include +#include +#include #include -class QSize; -class QPainter; -class QWidget; +class TQSize; +class TQPainter; +class TQWidget; class KHSSelector; class KValueSelector; -class KisColorPopup : public QFrame { +class KisColorPopup : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KisColorPopup(QColor color, QWidget * w, const char * name); + KisColorPopup(TQColor color, TQWidget * w, const char * name); virtual ~KisColorPopup() {}; signals: - void changed(const QColor &); + void changed(const TQColor &); private: KHSSelector * m_khsSelector; KValueSelector * m_valueSelector; - QColor m_color; + TQColor m_color; }; -class KRITAUI_EXPORT KisColorCup : public QPushButton { +class KRITAUI_EXPORT KisColorCup : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - KisColorCup(QWidget * parent, const char * name = 0); + KisColorCup(TQWidget * tqparent, const char * name = 0); virtual ~KisColorCup() {}; - QColor color() { return m_color; }; + TQColor color() { return m_color; }; signals: - void changed(const QColor &); + void changed(const TQColor &); public: - QSize sizeHint() const; + TQSize tqsizeHint() const; public slots: - void setColor(const QColor & c); + void setColor(const TQColor & c); private slots: @@ -83,12 +85,12 @@ private slots: protected: - virtual void drawButtonLabel( QPainter *p ); + virtual void drawButtonLabel( TQPainter *p ); private: KisColorPopup * m_popup; - QColor m_color; + TQColor m_color; }; #endif diff --git a/krita/ui/kis_config.cc b/krita/ui/kis_config.cc index b233a1eb..6d07790b 100644 --- a/krita/ui/kis_config.cc +++ b/krita/ui/kis_config.cc @@ -30,15 +30,15 @@ namespace { const double IMG_DEFAULT_RESOLUTION = 100.0; - const Q_INT32 IMG_DEFAULT_WIDTH = 512; - const Q_INT32 IMG_DEFAULT_HEIGHT = 512; + const TQ_INT32 IMG_DEFAULT_WIDTH = 512; + const TQ_INT32 IMG_DEFAULT_HEIGHT = 512; const enumCursorStyle DEFAULT_CURSOR_STYLE = CURSOR_STYLE_OUTLINE; - const Q_INT32 DEFAULT_MAX_THREADS = 4; - const Q_INT32 DEFAULT_MAX_TILES_MEM = 500; // 8192 kilobytes given 64x64 tiles with 32bpp - const Q_INT32 DEFAULT_SWAPPINESS = 100; - const Q_INT32 DEFAULT_PRESSURE_CORRECTION = 50; - const Q_INT32 DEFAULT_DOCKABILITY = 0; - const Q_INT32 DEFAULT_UNDO_LIMIT = 50; + const TQ_INT32 DEFAULT_MAX_THREADS = 4; + const TQ_INT32 DEFAULT_MAX_TILES_MEM = 500; // 8192 kilobytes given 64x64 tiles with 32bpp + const TQ_INT32 DEFAULT_SWAPPINESS = 100; + const TQ_INT32 DEFAULT_PRESSURE_CORRECTION = 50; + const TQ_INT32 DEFAULT_DOCKABILITY = 0; + const TQ_INT32 DEFAULT_UNDO_LIMIT = 50; } KisConfig::KisConfig() @@ -80,22 +80,22 @@ void KisConfig::setUndoEnabled(bool undo) } -Q_INT32 KisConfig::defUndoLimit() const +TQ_INT32 KisConfig::defUndoLimit() const { return m_cfg->readNumEntry("undolimit", DEFAULT_UNDO_LIMIT); } -void KisConfig::defUndoLimit(Q_INT32 limit) +void KisConfig::defUndoLimit(TQ_INT32 limit) { m_cfg->writeEntry("undolimit", limit); } -Q_INT32 KisConfig::defImgWidth() const +TQ_INT32 KisConfig::defImgWidth() const { return m_cfg->readNumEntry("imgWidthDef", IMG_DEFAULT_WIDTH); } -Q_INT32 KisConfig::defImgHeight() const +TQ_INT32 KisConfig::defImgHeight() const { return m_cfg->readNumEntry("imgHeightDef", IMG_DEFAULT_HEIGHT); } @@ -105,12 +105,12 @@ double KisConfig::defImgResolution() const return m_cfg->readDoubleNumEntry("imgResolutionDef", IMG_DEFAULT_RESOLUTION); } -void KisConfig::defImgWidth(Q_INT32 width) +void KisConfig::defImgWidth(TQ_INT32 width) { m_cfg->writeEntry("imgWidthDef", width); } -void KisConfig::defImgHeight(Q_INT32 height) +void KisConfig::defImgHeight(TQ_INT32 height) { m_cfg->writeEntry("imgHeightDef", height); } @@ -136,45 +136,45 @@ void KisConfig::setCursorStyle(enumCursorStyle style) } -QString KisConfig::monitorProfile() const +TQString KisConfig::monitorProfile() const { return m_cfg->readEntry("monitorProfile", ""); } -void KisConfig::setMonitorProfile(QString monitorProfile) +void KisConfig::setMonitorProfile(TQString monitorProfile) { m_cfg->writeEntry("monitorProfile", monitorProfile); } -QString KisConfig::workingColorSpace() const +TQString KisConfig::workingColorSpace() const { return m_cfg->readEntry("workingColorSpace", "RGBA"); } -void KisConfig::setWorkingColorSpace(QString workingColorSpace) +void KisConfig::setWorkingColorSpace(TQString workingColorSpace) { m_cfg->writeEntry(workingColorSpace, workingColorSpace); } -QString KisConfig::printerColorSpace() const +TQString KisConfig::printerColorSpace() const { return m_cfg->readEntry("printerColorSpace", "CMYK"); } -void KisConfig::setPrinterColorSpace(QString printerColorSpace) +void KisConfig::setPrinterColorSpace(TQString printerColorSpace) { m_cfg->writeEntry("printerColorSpace", printerColorSpace); } -QString KisConfig::printerProfile() const +TQString KisConfig::printerProfile() const { return m_cfg->readEntry("printerProfile", ""); } -void KisConfig::setPrinterProfile(QString printerProfile) +void KisConfig::setPrinterProfile(TQString printerProfile) { m_cfg->writeEntry("printerProfile", printerProfile); } @@ -202,23 +202,23 @@ void KisConfig::setShowRulers(bool rulers) } -Q_INT32 KisConfig::pasteBehaviour() const +TQ_INT32 KisConfig::pasteBehaviour() const { return m_cfg->readNumEntry("pasteBehaviour", 2); } -void KisConfig::setPasteBehaviour(Q_INT32 renderIntent) +void KisConfig::setPasteBehaviour(TQ_INT32 renderIntent) { m_cfg->writeEntry("pasteBehaviour", renderIntent); } -Q_INT32 KisConfig::renderIntent() const +TQ_INT32 KisConfig::renderIntent() const { return m_cfg->readNumEntry("renderIntent", INTENT_PERCEPTUAL); } -void KisConfig::setRenderIntent(Q_INT32 renderIntent) +void KisConfig::setRenderIntent(TQ_INT32 renderIntent) { m_cfg->writeEntry("renderIntent", renderIntent); } @@ -243,82 +243,82 @@ void KisConfig::setUseOpenGLShaders(bool useOpenGLShaders) m_cfg->writeEntry("useOpenGLShaders", useOpenGLShaders); } -Q_INT32 KisConfig::maxNumberOfThreads() +TQ_INT32 KisConfig::maxNumberOfThreads() { return m_cfg->readNumEntry("maxthreads", DEFAULT_MAX_THREADS); } -void KisConfig::setMaxNumberOfThreads(Q_INT32 maxThreads) +void KisConfig::setMaxNumberOfThreads(TQ_INT32 maxThreads) { m_cfg->writeEntry("maxthreads", maxThreads); } -Q_INT32 KisConfig::maxTilesInMem() const +TQ_INT32 KisConfig::maxTilesInMem() const { return m_cfg->readNumEntry("maxtilesinmem", DEFAULT_MAX_TILES_MEM); } -void KisConfig::setMaxTilesInMem(Q_INT32 tiles) +void KisConfig::setMaxTilesInMem(TQ_INT32 tiles) { m_cfg->writeEntry("maxtilesinmem", tiles); } -Q_INT32 KisConfig::swappiness() const +TQ_INT32 KisConfig::swappiness() const { return m_cfg->readNumEntry("swappiness", DEFAULT_SWAPPINESS); } -void KisConfig::setSwappiness(Q_INT32 swappiness) +void KisConfig::setSwappiness(TQ_INT32 swappiness) { m_cfg->writeEntry("swappiness", swappiness); } -Q_INT32 KisConfig::getPressureCorrection() +TQ_INT32 KisConfig::getPressureCorrection() { return m_cfg->readNumEntry( "pressurecorrection", DEFAULT_PRESSURE_CORRECTION ); } -void KisConfig::setPressureCorrection( Q_INT32 correction ) +void KisConfig::setPressureCorrection( TQ_INT32 correction ) { m_cfg->writeEntry( "pressurecorrection", correction ); } -Q_INT32 KisConfig::getDefaultPressureCorrection() +TQ_INT32 KisConfig::getDefaultPressureCorrection() { return DEFAULT_PRESSURE_CORRECTION; } -bool KisConfig::tabletDeviceEnabled(const QString& tabletDeviceName) const +bool KisConfig::tabletDeviceEnabled(const TQString& tabletDeviceName) const { return m_cfg->readBoolEntry("TabletDevice" + tabletDeviceName + "Enabled", false); } -void KisConfig::setTabletDeviceEnabled(const QString& tabletDeviceName, bool enabled) +void KisConfig::setTabletDeviceEnabled(const TQString& tabletDeviceName, bool enabled) { m_cfg->writeEntry("TabletDevice" + tabletDeviceName + "Enabled", enabled); } -Q_INT32 KisConfig::tabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 defaultAxis) const +TQ_INT32 KisConfig::tabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 defaultAxis) const { return m_cfg->readNumEntry("TabletDevice" + tabletDeviceName + axisName, defaultAxis); } -void KisConfig::setTabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 axis) const +void KisConfig::setTabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 axis) const { m_cfg->writeEntry("TabletDevice" + tabletDeviceName + axisName, axis); } -void KisConfig::setDockability( Q_INT32 dockability ) +void KisConfig::setDockability( TQ_INT32 dockability ) { m_cfg->writeEntry( "palettesdockability", dockability ); } -Q_INT32 KisConfig::dockability() +TQ_INT32 KisConfig::dockability() { return m_cfg->readNumEntry("palettesdockability", DEFAULT_DOCKABILITY); } -Q_INT32 KisConfig::getDefaultDockability() +TQ_INT32 KisConfig::getDefaultDockability() { return DEFAULT_DOCKABILITY; } @@ -330,7 +330,7 @@ float KisConfig::dockerFontSize() float KisConfig::getDefaultDockerFontSize() { - float ps = QMIN(9, KGlobalSettings::generalFont().pointSize() * 0.8); + float ps = TQMIN(9, KGlobalSettings::generalFont().pointSize() * 0.8); if (ps < 6) ps = 6; return ps; } @@ -340,102 +340,102 @@ void KisConfig::setDockerFontSize(float size) m_cfg->writeEntry("palettefontsize", size); } -Q_UINT32 KisConfig::getGridMainStyle() +TQ_UINT32 KisConfig::getGridMainStyle() { - Q_UINT32 v = m_cfg->readNumEntry("gridmainstyle", 0); + TQ_UINT32 v = m_cfg->readNumEntry("gridmainstyle", 0); if (v > 2) v = 2; return v; } -void KisConfig::setGridMainStyle(Q_UINT32 v) +void KisConfig::setGridMainStyle(TQ_UINT32 v) { m_cfg->writeEntry("gridmainstyle", v); } -Q_UINT32 KisConfig::getGridSubdivisionStyle() +TQ_UINT32 KisConfig::getGridSubdivisionStyle() { - Q_UINT32 v = m_cfg->readNumEntry("gridsubdivisionstyle", 1); + TQ_UINT32 v = m_cfg->readNumEntry("gridsubdivisionstyle", 1); if (v > 2) v = 2; return v; } -void KisConfig::setGridSubdivisionStyle(Q_UINT32 v) +void KisConfig::setGridSubdivisionStyle(TQ_UINT32 v) { m_cfg->writeEntry("gridsubdivisionstyle", v); } -QColor KisConfig::getGridMainColor() +TQColor KisConfig::getGridMainColor() { - return m_cfg->readColorEntry("gridmaincolor", new QColor(99,99,99)); + return m_cfg->readColorEntry("gridmaincolor", new TQColor(99,99,99)); } -void KisConfig::setGridMainColor(QColor v) +void KisConfig::setGridMainColor(TQColor v) { m_cfg->writeEntry("gridmaincolor", v); } -QColor KisConfig::getGridSubdivisionColor() +TQColor KisConfig::getGridSubdivisionColor() { - return m_cfg->readColorEntry("gridsubdivisioncolor", new QColor(150,150,150)); + return m_cfg->readColorEntry("gridsubdivisioncolor", new TQColor(150,150,150)); } -void KisConfig::setGridSubdivisionColor(QColor v) +void KisConfig::setGridSubdivisionColor(TQColor v) { m_cfg->writeEntry("gridsubdivisioncolor", v); } -Q_UINT32 KisConfig::getGridHSpacing() +TQ_UINT32 KisConfig::getGridHSpacing() { - Q_INT32 v = m_cfg->readNumEntry("gridhspacing", 10); - return (Q_UINT32)QMAX(1, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridhspacing", 10); + return (TQ_UINT32)TQMAX(1, v ); } -void KisConfig::setGridHSpacing(Q_UINT32 v) +void KisConfig::setGridHSpacing(TQ_UINT32 v) { m_cfg->writeEntry("gridhspacing", v); } -Q_UINT32 KisConfig::getGridVSpacing() +TQ_UINT32 KisConfig::getGridVSpacing() { - Q_INT32 v = m_cfg->readNumEntry("gridvspacing", 10); - return (Q_UINT32)QMAX(1, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridvspacing", 10); + return (TQ_UINT32)TQMAX(1, v ); } -void KisConfig::setGridVSpacing(Q_UINT32 v) +void KisConfig::setGridVSpacing(TQ_UINT32 v) { m_cfg->writeEntry("gridvspacing", v); } -Q_UINT32 KisConfig::getGridSubdivisions() +TQ_UINT32 KisConfig::getGridSubdivisions() { - Q_INT32 v = m_cfg->readNumEntry("gridsubsivisons", 2); - return (Q_UINT32)QMAX(1, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridsubsivisons", 2); + return (TQ_UINT32)TQMAX(1, v ); } -void KisConfig::setGridSubdivisions(Q_UINT32 v) +void KisConfig::setGridSubdivisions(TQ_UINT32 v) { return m_cfg->writeEntry("gridsubsivisons", v); } -Q_UINT32 KisConfig::getGridOffsetX() +TQ_UINT32 KisConfig::getGridOffsetX() { - Q_INT32 v = m_cfg->readNumEntry("gridoffsetx", 0); - return (Q_UINT32)QMAX(0, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridoffsetx", 0); + return (TQ_UINT32)TQMAX(0, v ); } -void KisConfig::setGridOffsetX(Q_UINT32 v) +void KisConfig::setGridOffsetX(TQ_UINT32 v) { m_cfg->writeEntry("gridoffsetx", v); } -Q_UINT32 KisConfig::getGridOffsetY() +TQ_UINT32 KisConfig::getGridOffsetY() { - Q_INT32 v = m_cfg->readNumEntry("gridoffsety", 0); - return (Q_UINT32)QMAX(0, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridoffsety", 0); + return (TQ_UINT32)TQMAX(0, v ); } -void KisConfig::setGridOffsetY(Q_UINT32 v) +void KisConfig::setGridOffsetY(TQ_UINT32 v) { m_cfg->writeEntry("gridoffsety", v); } diff --git a/krita/ui/kis_config.h b/krita/ui/kis_config.h index 66824007..4fe971df 100644 --- a/krita/ui/kis_config.h +++ b/krita/ui/kis_config.h @@ -32,14 +32,14 @@ public: bool undoEnabled() const; void setUndoEnabled(bool undo); - Q_INT32 defUndoLimit() const; - void defUndoLimit(Q_INT32 limit); + TQ_INT32 defUndoLimit() const; + void defUndoLimit(TQ_INT32 limit); - Q_INT32 defImgWidth() const; - void defImgWidth(Q_INT32 width); + TQ_INT32 defImgWidth() const; + void defImgWidth(TQ_INT32 width); - Q_INT32 defImgHeight() const; - void defImgHeight(Q_INT32 height); + TQ_INT32 defImgHeight() const; + void defImgHeight(TQ_INT32 height); double defImgResolution() const; void defImgResolution(double res); @@ -48,20 +48,20 @@ public: enumCursorStyle getDefaultCursorStyle() const; void setCursorStyle(enumCursorStyle style); - QString monitorProfile() const; - void setMonitorProfile(QString monitorProfile); + TQString monitorProfile() const; + void setMonitorProfile(TQString monitorProfile); - QString workingColorSpace() const; - void setWorkingColorSpace(QString workingColorSpace); + TQString workingColorSpace() const; + void setWorkingColorSpace(TQString workingColorSpace); - QString importProfile() const; - void setImportProfile(QString importProfile); + TQString importProfile() const; + void setImportProfile(TQString importProfile); - QString printerColorSpace() const; - void setPrinterColorSpace(QString printerColorSpace); + TQString printerColorSpace() const; + void setPrinterColorSpace(TQString printerColorSpace); - QString printerProfile() const; - void setPrinterProfile(QString printerProfile); + TQString printerProfile() const; + void setPrinterProfile(TQString printerProfile); bool useBlackPointCompensation() const; void setUseBlackPointCompensation(bool useBlackPointCompensation); @@ -69,11 +69,11 @@ public: bool showRulers() const; void setShowRulers(bool rulers); - Q_INT32 pasteBehaviour() const; - void setPasteBehaviour(Q_INT32 behaviour); + TQ_INT32 pasteBehaviour() const; + void setPasteBehaviour(TQ_INT32 behaviour); - Q_INT32 renderIntent() const; - void setRenderIntent(Q_INT32 renderIntent); + TQ_INT32 renderIntent() const; + void setRenderIntent(TQ_INT32 renderIntent); bool useOpenGL() const; void setUseOpenGL(bool useOpenGL); @@ -81,55 +81,55 @@ public: bool useOpenGLShaders() const; void setUseOpenGLShaders(bool useOpenGLShaders); - Q_INT32 maxNumberOfThreads(); - void setMaxNumberOfThreads(Q_INT32 numberOfThreads); + TQ_INT32 maxNumberOfThreads(); + void setMaxNumberOfThreads(TQ_INT32 numberOfThreads); /// Maximum tiles in memory (this is a guideline, not absolute) - Q_INT32 maxTilesInMem() const; - void setMaxTilesInMem(Q_INT32 tiles); + TQ_INT32 maxTilesInMem() const; + void setMaxTilesInMem(TQ_INT32 tiles); /// Number of tiles that will be swapped at once. The higher, the more swapped, but more /// chance that it will become slow - Q_INT32 swappiness() const; - void setSwappiness(Q_INT32 swappiness); + TQ_INT32 swappiness() const; + void setSwappiness(TQ_INT32 swappiness); - Q_INT32 getPressureCorrection(); - void setPressureCorrection( Q_INT32 correction); - Q_INT32 getDefaultPressureCorrection(); + TQ_INT32 getPressureCorrection(); + void setPressureCorrection( TQ_INT32 correction); + TQ_INT32 getDefaultPressureCorrection(); - bool tabletDeviceEnabled(const QString& tabletDeviceName) const; - void setTabletDeviceEnabled(const QString& tabletDeviceName, bool enabled); + bool tabletDeviceEnabled(const TQString& tabletDeviceName) const; + void setTabletDeviceEnabled(const TQString& tabletDeviceName, bool enabled); - Q_INT32 tabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 defaultAxis) const; - void setTabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 axis) const; + TQ_INT32 tabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 defaultAxis) const; + void setTabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 axis) const; - Q_INT32 dockability(); - Q_INT32 getDefaultDockability(); - void setDockability( Q_INT32 dockability); + TQ_INT32 dockability(); + TQ_INT32 getDefaultDockability(); + void setDockability( TQ_INT32 dockability); float dockerFontSize(); float getDefaultDockerFontSize(); void setDockerFontSize(float); - Q_UINT32 getGridMainStyle(); - void setGridMainStyle(Q_UINT32 v); - Q_UINT32 getGridSubdivisionStyle(); - void setGridSubdivisionStyle(Q_UINT32 v); - QColor getGridMainColor(); - void setGridMainColor(QColor v); - QColor getGridSubdivisionColor(); - void setGridSubdivisionColor(QColor v); - Q_UINT32 getGridHSpacing(); - void setGridHSpacing(Q_UINT32 v); - Q_UINT32 getGridVSpacing(); - void setGridVSpacing(Q_UINT32 v); - Q_UINT32 getGridSubdivisions(); - void setGridSubdivisions(Q_UINT32 v); - Q_UINT32 getGridOffsetX(); - void setGridOffsetX(Q_UINT32 v); - Q_UINT32 getGridOffsetY(); - void setGridOffsetY(Q_UINT32 v); + TQ_UINT32 getGridMainStyle(); + void setGridMainStyle(TQ_UINT32 v); + TQ_UINT32 getGridSubdivisionStyle(); + void setGridSubdivisionStyle(TQ_UINT32 v); + TQColor getGridMainColor(); + void setGridMainColor(TQColor v); + TQColor getGridSubdivisionColor(); + void setGridSubdivisionColor(TQColor v); + TQ_UINT32 getGridHSpacing(); + void setGridHSpacing(TQ_UINT32 v); + TQ_UINT32 getGridVSpacing(); + void setGridVSpacing(TQ_UINT32 v); + TQ_UINT32 getGridSubdivisions(); + void setGridSubdivisions(TQ_UINT32 v); + TQ_UINT32 getGridOffsetX(); + void setGridOffsetX(TQ_UINT32 v); + TQ_UINT32 getGridOffsetY(); + void setGridOffsetY(TQ_UINT32 v); private: diff --git a/krita/ui/kis_controlframe.cc b/krita/ui/kis_controlframe.cc index d2e5a432..08f0c4c3 100644 --- a/krita/ui/kis_controlframe.cc +++ b/krita/ui/kis_controlframe.cc @@ -22,12 +22,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -60,15 +60,15 @@ #ifdef HAVE_TEXT_BRUSH #include "kis_text_brush.h" #endif -KisPopupFrame::KisPopupFrame(QWidget * parent, const char* name) - : QPopupMenu(parent, name) +KisPopupFrame::KisPopupFrame(TQWidget * tqparent, const char* name) + : TQPopupMenu(tqparent, name) { setFocusPolicy(StrongFocus); } -void KisPopupFrame::keyPressEvent(QKeyEvent * e) +void KisPopupFrame::keyPressEvent(TQKeyEvent * e) { - if (e->key()== Qt::Key_Escape) + if (e->key()== TQt::Key_Escape) { hide(); e->accept(); @@ -80,8 +80,8 @@ void KisPopupFrame::keyPressEvent(QKeyEvent * e) KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, const char* name ) - : QObject(view, name) - //: KToolBar ( window, Qt::DockTop, false, name, true, true ) + : TQObject(view, name) + //: KToolBar ( window, TQt::DockTop, false, name, true, true ) , m_view(view) , m_brushWidget(0) , m_patternWidget(0) @@ -218,11 +218,11 @@ void KisControlFrame::createBrushesChooser(KisView * view) m_brushChooserPopup = new KisPopupFrame(m_brushWidget, "brush_chooser_popup"); - QHBoxLayout * l = new QHBoxLayout(m_brushChooserPopup, 2, 2, "brushpopuplayout"); + TQHBoxLayout * l = new TQHBoxLayout(m_brushChooserPopup, 2, 2, "brushpopuptqlayout"); - QTabWidget * m_brushesTab = new QTabWidget(m_brushChooserPopup, "brushestab"); - m_brushesTab->setTabShape(QTabWidget::Triangular); - m_brushesTab->setFocusPolicy(QWidget::NoFocus); + TQTabWidget * m_brushesTab = new TQTabWidget(m_brushChooserPopup, "brushestab"); + m_brushesTab->setTabShape(TQTabWidget::Triangular); + m_brushesTab->setFocusPolicy(TQ_NoFocus); m_brushesTab->setFont(m_font); m_brushesTab->setMargin(1); @@ -230,7 +230,7 @@ void KisControlFrame::createBrushesChooser(KisView * view) KisAutobrush * m_autobrush = new KisAutobrush(m_brushesTab, "autobrush", i18n("Autobrush")); m_brushesTab->addTab( m_autobrush, i18n("Autobrush")); - connect(m_autobrush, SIGNAL(activatedResource(KisResource*)), m_view, SLOT(brushActivated( KisResource* ))); + connect(m_autobrush, TQT_SIGNAL(activatedResource(KisResource*)), m_view, TQT_SLOT(brushActivated( KisResource* ))); KisBrushChooser * m_brushChooser = new KisBrushChooser(m_brushesTab, "brush_chooser"); m_brushesTab->addTab( m_brushChooser, i18n("Predefined Brushes")); @@ -238,19 +238,19 @@ void KisControlFrame::createBrushesChooser(KisView * view) KisCustomBrush* customBrushes = new KisCustomBrush(m_brushesTab, "custombrush", i18n("Custom Brush"), m_view); m_brushesTab->addTab( customBrushes, i18n("Custom Brush")); - connect(customBrushes, SIGNAL(activatedResource(KisResource*)), - m_view, SLOT(brushActivated(KisResource*))); + connect(customBrushes, TQT_SIGNAL(activatedResource(KisResource*)), + m_view, TQT_SLOT(brushActivated(KisResource*))); #ifdef HAVE_TEXT_BRUSH KisTextBrush* textBrushes = new KisTextBrush(m_brushesTab, "textbrush", i18n("Text Brush")/*, m_view*/); m_brushesTab->addTab( textBrushes, i18n("Text Brush")); - connect(textBrushes, SIGNAL(activatedResource(KisResource*)), - m_view, SLOT(brushActivated(KisResource*))); + connect(textBrushes, TQT_SIGNAL(activatedResource(KisResource*)), + m_view, TQT_SLOT(brushActivated(KisResource*))); #endif m_brushChooser->setFont(m_font); m_brushMediator = new KisResourceMediator( m_brushChooser, this); - connect(m_brushMediator, SIGNAL(activatedResource(KisResource*)), m_view, SLOT(brushActivated(KisResource*))); + connect(m_brushMediator, TQT_SIGNAL(activatedResource(KisResource*)), m_view, TQT_SLOT(brushActivated(KisResource*))); KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("ImagePipeBrushServer"); @@ -258,7 +258,7 @@ void KisControlFrame::createBrushesChooser(KisView * view) rServer = KisResourceServerRegistry::instance()->get("BrushServer"); m_brushMediator->connectServer(rServer); - KisControlFrame::connect(view, SIGNAL(brushChanged(KisBrush *)), this, SLOT(slotBrushChanged( KisBrush *))); + KisControlFrame::connect(view, TQT_SIGNAL(brushChanged(KisBrush *)), this, TQT_SLOT(slotBrushChanged( KisBrush *))); m_brushChooser->setCurrent( 0 ); m_brushMediator->setActiveItem( m_brushChooser->currentItem() ); customBrushes->setResourceServer(rServer); @@ -270,11 +270,11 @@ void KisControlFrame::createPatternsChooser(KisView * view) { m_patternChooserPopup = new KisPopupFrame(m_patternWidget, "pattern_chooser_popup"); - QHBoxLayout * l2 = new QHBoxLayout(m_patternChooserPopup, 2, 2, "patternpopuplayout"); + TQHBoxLayout * l2 = new TQHBoxLayout(m_patternChooserPopup, 2, 2, "patternpopuptqlayout"); - QTabWidget * m_patternsTab = new QTabWidget(m_patternChooserPopup, "patternstab"); - m_patternsTab->setTabShape(QTabWidget::Triangular); - m_patternsTab->setFocusPolicy(QWidget::NoFocus); + TQTabWidget * m_patternsTab = new TQTabWidget(m_patternChooserPopup, "patternstab"); + m_patternsTab->setTabShape(TQTabWidget::Triangular); + m_patternsTab->setFocusPolicy(TQ_NoFocus); m_patternsTab->setFont(m_font); m_patternsTab->setMargin(1); l2->add( m_patternsTab ); @@ -291,15 +291,15 @@ void KisControlFrame::createPatternsChooser(KisView * view) m_patternMediator = new KisResourceMediator( chooser, view); - connect( m_patternMediator, SIGNAL(activatedResource(KisResource*)), view, SLOT(patternActivated(KisResource*))); - connect(customPatterns, SIGNAL(activatedResource(KisResource*)), - view, SLOT(patternActivated(KisResource*))); + connect( m_patternMediator, TQT_SIGNAL(activatedResource(KisResource*)), view, TQT_SLOT(patternActivated(KisResource*))); + connect(customPatterns, TQT_SIGNAL(activatedResource(KisResource*)), + view, TQT_SLOT(patternActivated(KisResource*))); KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("PatternServer"); m_patternMediator->connectServer(rServer); - KisControlFrame::connect(view, SIGNAL(patternChanged(KisPattern *)), this, SLOT(slotPatternChanged( KisPattern *))); + KisControlFrame::connect(view, TQT_SIGNAL(patternChanged(KisPattern *)), this, TQT_SLOT(slotPatternChanged( KisPattern *))); chooser->setCurrent( 0 ); m_patternMediator->setActiveItem( chooser->currentItem() ); @@ -311,11 +311,11 @@ void KisControlFrame::createGradientsChooser(KisView * view) { m_gradientChooserPopup = new KisPopupFrame(m_gradientWidget, "gradient_chooser_popup"); - QHBoxLayout * l2 = new QHBoxLayout(m_gradientChooserPopup, 2, 2, "gradientpopuplayout"); + TQHBoxLayout * l2 = new TQHBoxLayout(m_gradientChooserPopup, 2, 2, "gradientpopuptqlayout"); - QTabWidget * m_gradientTab = new QTabWidget(m_gradientChooserPopup, "gradientstab"); - m_gradientTab->setTabShape(QTabWidget::Triangular); - m_gradientTab->setFocusPolicy(QWidget::NoFocus); + TQTabWidget * m_gradientTab = new TQTabWidget(m_gradientChooserPopup, "gradientstab"); + m_gradientTab->setTabShape(TQTabWidget::Triangular); + m_gradientTab->setFocusPolicy(TQ_NoFocus); m_gradientTab->setFont(m_font); m_gradientTab->setMargin(1); @@ -327,13 +327,13 @@ void KisControlFrame::createGradientsChooser(KisView * view) m_gradientTab->addTab( m_gradientChooser, i18n("Gradients")); m_gradientMediator = new KisResourceMediator( m_gradientChooser, view); - connect(m_gradientMediator, SIGNAL(activatedResource(KisResource*)), view, SLOT(gradientActivated(KisResource*))); + connect(m_gradientMediator, TQT_SIGNAL(activatedResource(KisResource*)), view, TQT_SLOT(gradientActivated(KisResource*))); KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("GradientServer"); m_gradientMediator->connectServer(rServer); - connect(view, SIGNAL(gradientChanged(KisGradient *)), this, SLOT(slotGradientChanged( KisGradient *))); + connect(view, TQT_SIGNAL(gradientChanged(KisGradient *)), this, TQT_SLOT(slotGradientChanged( KisGradient *))); m_gradientChooser->setCurrent( 0 ); m_gradientMediator->setActiveItem( m_gradientChooser->currentItem() ); } diff --git a/krita/ui/kis_controlframe.h b/krita/ui/kis_controlframe.h index 2007d5cc..f3058702 100644 --- a/krita/ui/kis_controlframe.h +++ b/krita/ui/kis_controlframe.h @@ -22,14 +22,14 @@ #ifndef __kis_controlframe_h__ #define __kis_controlframe_h__ -#include +#include #include #include -class QWidget; -class QTabWidget; +class TQWidget; +class TQTabWidget; class KToolBar; @@ -49,14 +49,15 @@ class KisResourceMediator; class KisPaintopBox; class KisView; -class KisPopupFrame : public QPopupMenu { +class KisPopupFrame : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KisPopupFrame(QWidget * parent, const char * name = 0); - virtual void keyPressEvent(QKeyEvent *); + KisPopupFrame(TQWidget * tqparent, const char * name = 0); + virtual void keyPressEvent(TQKeyEvent *); public: @@ -72,9 +73,10 @@ private: * Control Frame - status display with access to * color selector, brushes, patterns, and preview */ -class KisControlFrame : public QObject //: public KToolBar +class KisControlFrame : public TQObject //: public KToolBar { Q_OBJECT + TQ_OBJECT public: KisControlFrame(KMainWindow * window, KisView * view, const char *name = 0 ); @@ -98,11 +100,11 @@ private: private: - QFont m_font; + TQFont m_font; KisView * m_view; - QTabWidget * m_brushesTab; - QTabWidget * m_gradientTab; + TQTabWidget * m_brushesTab; + TQTabWidget * m_gradientTab; KisIconWidget *m_brushWidget; KisIconWidget *m_patternWidget; diff --git a/krita/ui/kis_cursor.cc b/krita/ui/kis_cursor.cc index 0b0b6ea5..33c6ae04 100644 --- a/krita/ui/kis_cursor.cc +++ b/krita/ui/kis_cursor.cc @@ -19,10 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -34,76 +34,76 @@ KisCursor::KisCursor() {} /* - * Predefined Qt cursors + * Predefined TQt cursors */ -QCursor KisCursor::arrowCursor() +TQCursor KisCursor::arrowCursor() { - return Qt::arrowCursor; + return TQt::arrowCursor; } -QCursor KisCursor::upArrowCursor() +TQCursor KisCursor::upArrowCursor() { - return Qt::upArrowCursor; + return TQt::upArrowCursor; } -QCursor KisCursor::crossCursor() +TQCursor KisCursor::crossCursor() { - return Qt::crossCursor; + return TQt::crossCursor; } -QCursor KisCursor::waitCursor() +TQCursor KisCursor::waitCursor() { - return Qt::waitCursor; + return TQt::waitCursor; } -QCursor KisCursor::ibeamCursor() +TQCursor KisCursor::ibeamCursor() { - return Qt::ibeamCursor; + return TQt::ibeamCursor; } -QCursor KisCursor::sizeVerCursor() +TQCursor KisCursor::sizeVerCursor() { - return Qt::sizeVerCursor; + return TQt::sizeVerCursor; } -QCursor KisCursor::sizeHorCursor() +TQCursor KisCursor::sizeHorCursor() { - return Qt::sizeHorCursor; + return TQt::sizeHorCursor; } -QCursor KisCursor::sizeBDiagCursor() +TQCursor KisCursor::sizeBDiagCursor() { - return Qt::sizeBDiagCursor; + return TQt::sizeBDiagCursor; } -QCursor KisCursor::sizeFDiagCursor() +TQCursor KisCursor::sizeFDiagCursor() { - return Qt::sizeFDiagCursor; + return TQt::sizeFDiagCursor; } -QCursor KisCursor::sizeAllCursor() +TQCursor KisCursor::sizeAllCursor() { - return Qt::sizeAllCursor; + return TQt::sizeAllCursor; } -QCursor KisCursor::blankCursor() +TQCursor KisCursor::blankCursor() { - return Qt::blankCursor; + return TQt::blankCursor; } -QCursor KisCursor::splitVCursor() +TQCursor KisCursor::splitVCursor() { - return Qt::splitVCursor; + return TQt::splitVCursor; } -QCursor KisCursor::splitHCursor() +TQCursor KisCursor::splitHCursor() { - return Qt::splitHCursor; + return TQt::splitHCursor; } -QCursor KisCursor::pointingHandCursor() +TQCursor KisCursor::pointingHandCursor() { - return Qt::pointingHandCursor; + return TQt::pointingHandCursor; } @@ -111,7 +111,7 @@ QCursor KisCursor::pointingHandCursor() * Existing custom KimageShop cursors. Use the 'load' function for all new cursors. */ -QCursor KisCursor::pickerCursor() +TQCursor KisCursor::pickerCursor() { static unsigned char picker_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x7a, @@ -121,14 +121,14 @@ QCursor KisCursor::pickerCursor() 0x20, 0x07, 0x00, 0x90, 0x03, 0x00, 0xc8, 0x01, 0x00, 0xe4, 0x00, 0x00, 0x74, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap picker_bitmap(24, 24, picker_bits, true); - QBitmap picker_mask = picker_bitmap.createHeuristicMask( false ); + TQBitmap picker_bitmap(24, 24, picker_bits, true); + TQBitmap picker_tqmask = picker_bitmap.createHeuristicMask( false ); - return QCursor( picker_bitmap, picker_mask, 1, 22 ); + return TQCursor( picker_bitmap, picker_tqmask, 1, 22 ); } -QCursor KisCursor::pickerPlusCursor() +TQCursor KisCursor::pickerPlusCursor() { static unsigned char pickerplus_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x7a, @@ -138,14 +138,14 @@ QCursor KisCursor::pickerPlusCursor() 0x20, 0x07, 0x0c, 0x90, 0x83, 0x7f, 0xc8, 0x81, 0x7f, 0xe4, 0x00, 0x0c, 0x74, 0x00, 0x0c, 0x32, 0x00, 0x0c, 0x0a, 0x00, 0x0c, 0x00, 0x00, 0x00}; - QBitmap picker_bitmap(24, 24, pickerplus_bits, true); - QBitmap picker_mask = picker_bitmap.createHeuristicMask( false ); + TQBitmap picker_bitmap(24, 24, pickerplus_bits, true); + TQBitmap picker_tqmask = picker_bitmap.createHeuristicMask( false ); - return QCursor( picker_bitmap, picker_mask, 1, 22 ); + return TQCursor( picker_bitmap, picker_tqmask, 1, 22 ); } -QCursor KisCursor::pickerMinusCursor() +TQCursor KisCursor::pickerMinusCursor() { static unsigned char pickerminus_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x7a, @@ -155,15 +155,15 @@ QCursor KisCursor::pickerMinusCursor() 0x20, 0x07, 0x00, 0x90, 0xc3, 0x7f, 0xc8, 0xc1, 0x7f, 0xe4, 0x00, 0x00, 0x74, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap picker_bitmap(24, 24, pickerminus_bits, true); - QBitmap picker_mask = picker_bitmap.createHeuristicMask( false ); + TQBitmap picker_bitmap(24, 24, pickerminus_bits, true); + TQBitmap picker_tqmask = picker_bitmap.createHeuristicMask( false ); - return QCursor( picker_bitmap, picker_mask, 1, 22 ); + return TQCursor( picker_bitmap, picker_tqmask, 1, 22 ); } -QCursor KisCursor::penCursor() +TQCursor KisCursor::penCursor() { static unsigned char pen_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x7d, @@ -173,13 +173,13 @@ QCursor KisCursor::penCursor() 0xd0, 0x0f, 0x00, 0x88, 0x07, 0x00, 0x88, 0x03, 0x00, 0xe4, 0x01, 0x00, 0x7c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap pen_bitmap( 24, 24, pen_bits, true ); - QBitmap pen_mask = pen_bitmap.createHeuristicMask( false ); + TQBitmap pen_bitmap( 24, 24, pen_bits, true ); + TQBitmap pen_tqmask = pen_bitmap.createHeuristicMask( false ); - return QCursor( pen_bitmap, pen_mask, 1, 22 ); + return TQCursor( pen_bitmap, pen_tqmask, 1, 22 ); } -QCursor KisCursor::brushCursor() +TQCursor KisCursor::brushCursor() { static unsigned char brush_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, @@ -191,13 +191,13 @@ QCursor KisCursor::brushCursor() 0xd0, 0x0f, 0x00, 0x00, 0xe8, 0x07, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap brush_bitmap( 25, 23, brush_bits, true ); - QBitmap brush_mask = brush_bitmap.createHeuristicMask( false ); + TQBitmap brush_bitmap( 25, 23, brush_bits, true ); + TQBitmap brush_tqmask = brush_bitmap.createHeuristicMask( false ); - return QCursor( brush_bitmap, brush_mask, 1, 21 ); + return TQCursor( brush_bitmap, brush_tqmask, 1, 21 ); } -QCursor KisCursor::airbrushCursor() +TQCursor KisCursor::airbrushCursor() { static unsigned char airbrush_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x68, 0x00, 0x00, 0x74, @@ -207,13 +207,13 @@ QCursor KisCursor::airbrushCursor() 0xd0, 0xff, 0x31, 0xe8, 0xf7, 0x30, 0xf4, 0x03, 0x18, 0xfc, 0x01, 0x0c, 0xf8, 0x00, 0x06, 0x76, 0x00, 0x03, 0x36, 0x00, 0x03, 0x00, 0x00, 0x00}; - QBitmap airbrush_bitmap( 24, 24, airbrush_bits, true ); - QBitmap airbrush_mask = airbrush_bitmap.createHeuristicMask( false ); + TQBitmap airbrush_bitmap( 24, 24, airbrush_bits, true ); + TQBitmap airbrush_tqmask = airbrush_bitmap.createHeuristicMask( false ); - return QCursor( airbrush_bitmap, airbrush_mask, 1, 22 ); + return TQCursor( airbrush_bitmap, airbrush_tqmask, 1, 22 ); } -QCursor KisCursor::eraserCursor() +TQCursor KisCursor::eraserCursor() { static unsigned char eraser_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1d, 0x00, @@ -225,13 +225,13 @@ QCursor KisCursor::eraserCursor() 0xe2, 0x0f, 0x00, 0x00, 0xc4, 0x07, 0x00, 0x00, 0x88, 0x03, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap eraser_bitmap( 25, 24, eraser_bits, true ); - QBitmap eraser_mask = eraser_bitmap.createHeuristicMask( false ); + TQBitmap eraser_bitmap( 25, 24, eraser_bits, true ); + TQBitmap eraser_tqmask = eraser_bitmap.createHeuristicMask( false ); - return QCursor( eraser_bitmap, eraser_mask, 7, 22 ); + return TQCursor( eraser_bitmap, eraser_tqmask, 7, 22 ); } -QCursor KisCursor::fillerCursor() +TQCursor KisCursor::fillerCursor() { static unsigned char filler_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x28, 0x00, @@ -241,13 +241,13 @@ QCursor KisCursor::fillerCursor() 0x9c, 0x01, 0x05, 0x1c, 0x82, 0x02, 0x18, 0x4c, 0x01, 0x18, 0xb0, 0x00, 0x08, 0x60, 0x00, 0x00, 0x00, 0x00}; - QBitmap filler_bitmap( 22, 22, filler_bits, true ); - QBitmap filler_mask = filler_bitmap.createHeuristicMask( false ); + TQBitmap filler_bitmap( 22, 22, filler_bits, true ); + TQBitmap filler_tqmask = filler_bitmap.createHeuristicMask( false ); - return QCursor( filler_bitmap, filler_mask, 3, 20 ); + return TQCursor( filler_bitmap, filler_tqmask, 3, 20 ); } -QCursor KisCursor::colorChangerCursor() +TQCursor KisCursor::colorChangerCursor() { static unsigned char colorChanger_bits[] = { 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x10, 0x01, 0x0e, 0x08, 0x02, 0x11, @@ -257,13 +257,13 @@ QCursor KisCursor::colorChangerCursor() 0xe8, 0x3d, 0x17, 0xd0, 0x3c, 0x10, 0x20, 0x38, 0x08, 0x40, 0x00, 0x06, 0x80, 0x81, 0x01, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00}; - QBitmap colorChanger_bitmap( 24, 23, colorChanger_bits, true ); - QBitmap colorChanger_mask = colorChanger_bitmap.createHeuristicMask( false ); + TQBitmap colorChanger_bitmap( 24, 23, colorChanger_bits, true ); + TQBitmap colorChanger_tqmask = colorChanger_bitmap.createHeuristicMask( false ); - return QCursor( colorChanger_bitmap, colorChanger_mask, 12, 10 ); + return TQCursor( colorChanger_bitmap, colorChanger_tqmask, 12, 10 ); } -QCursor KisCursor::zoomCursor() +TQCursor KisCursor::zoomCursor() { static unsigned char zoom_bits[] = { 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0xf0, 0x3f, 0x00, 0x38, 0x70, 0x00, @@ -273,13 +273,13 @@ QCursor KisCursor::zoomCursor() 0x00, 0xc0, 0x17, 0x00, 0x80, 0x2f, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00}; - QBitmap zoom_bitmap( 24, 23, zoom_bits, true ); - QBitmap zoom_mask = zoom_bitmap.createHeuristicMask( false ); + TQBitmap zoom_bitmap( 24, 23, zoom_bits, true ); + TQBitmap zoom_tqmask = zoom_bitmap.createHeuristicMask( false ); - return QCursor( zoom_bitmap, zoom_mask, 9, 8 ); + return TQCursor( zoom_bitmap, zoom_tqmask, 9, 8 ); } -QCursor KisCursor::moveCursor() +TQCursor KisCursor::moveCursor() { static unsigned char move_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x7e, 0x00, @@ -289,18 +289,18 @@ QCursor KisCursor::moveCursor() 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00}; - QBitmap move_bitmap( 24, 24, move_bits, true ); - QBitmap move_mask = move_bitmap.createHeuristicMask( false ); + TQBitmap move_bitmap( 24, 24, move_bits, true ); + TQBitmap move_tqmask = move_bitmap.createHeuristicMask( false ); - return QCursor( move_bitmap, move_mask, 12, 11 ); + return TQCursor( move_bitmap, move_tqmask, 12, 11 ); } -QCursor KisCursor::handCursor() +TQCursor KisCursor::handCursor() { return KCursor::handCursor(); } -QCursor KisCursor::selectCursor() +TQCursor KisCursor::selectCursor() { static unsigned char select_bits[] = { 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, @@ -310,65 +310,65 @@ QCursor KisCursor::selectCursor() 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00}; - QBitmap select_bitmap(23, 23, select_bits, true); - QBitmap select_mask = select_bitmap.createHeuristicMask( false ); + TQBitmap select_bitmap(23, 23, select_bits, true); + TQBitmap select_tqmask = select_bitmap.createHeuristicMask( false ); - return QCursor( select_bitmap, select_mask, 11, 11 ); + return TQCursor( select_bitmap, select_tqmask, 11, 11 ); } -QCursor KisCursor::openHandCursor() +TQCursor KisCursor::openHandCursor() { return load("openhand_cursor.xpm"); } -QCursor KisCursor::closedHandCursor() +TQCursor KisCursor::closedHandCursor() { return load("closedhand_cursor.xpm"); } -QCursor KisCursor::rotateCursor() +TQCursor KisCursor::rotateCursor() { return load("rotate_cursor.xpm"); } -QCursor KisCursor::load(const QString & iconName, int hotspotX, int hotspotY) +TQCursor KisCursor::load(const TQString & iconName, int hotspotX, int hotspotY) { - QString filename = KisFactory::instance()->dirs()->findResource("kis_pics", iconName); - QImage cursorImage; + TQString filename = KisFactory::instance()->dirs()->findResource("kis_pics", iconName); + TQImage cursorImage; cursorImage.load(filename); Q_ASSERT(!cursorImage.isNull()); Q_ASSERT(cursorImage.hasAlphaBuffer()); - QBitmap bitmap(cursorImage.width(), cursorImage.height()); - QBitmap mask(cursorImage.width(), cursorImage.height()); + TQBitmap bitmap(cursorImage.width(), cursorImage.height()); + TQBitmap tqmask(cursorImage.width(), cursorImage.height()); - QPainter bitmapPainter(&bitmap); - QPainter maskPainter(&mask); + TQPainter bitmapPainter(&bitmap); + TQPainter tqmaskPainter(&tqmask); - for (Q_INT32 x = 0; x < cursorImage.width(); ++x) { - for (Q_INT32 y = 0; y < cursorImage.height(); ++y) { + for (TQ_INT32 x = 0; x < cursorImage.width(); ++x) { + for (TQ_INT32 y = 0; y < cursorImage.height(); ++y) { - QRgb pixel = cursorImage.pixel(x, y); + TQRgb pixel = cursorImage.pixel(x, y); - if (qAlpha(pixel) < 128) { - bitmapPainter.setPen(Qt::color0); - maskPainter.setPen(Qt::color0); + if (tqAlpha(pixel) < 128) { + bitmapPainter.setPen(TQt::color0); + tqmaskPainter.setPen(TQt::color0); } else { - maskPainter.setPen(Qt::color1); + tqmaskPainter.setPen(TQt::color1); - if (qGray(pixel) < 128) { - bitmapPainter.setPen(Qt::color1); + if (tqGray(pixel) < 128) { + bitmapPainter.setPen(TQt::color1); } else { - bitmapPainter.setPen(Qt::color0); + bitmapPainter.setPen(TQt::color0); } } bitmapPainter.drawPoint(x, y); - maskPainter.drawPoint(x, y); + tqmaskPainter.drawPoint(x, y); } } - return QCursor(bitmap, mask, hotspotX, hotspotY); + return TQCursor(bitmap, tqmask, hotspotX, hotspotY); } diff --git a/krita/ui/kis_cursor.h b/krita/ui/kis_cursor.h index b4e7e344..69c5cbd5 100644 --- a/krita/ui/kis_cursor.h +++ b/krita/ui/kis_cursor.h @@ -22,7 +22,7 @@ #ifndef __kis_cursor_h__ #define __kis_cursor_h__ #include -class QCursor; +class TQCursor; class KRITACORE_EXPORT KisCursor { @@ -31,43 +31,43 @@ public: KisCursor(); - // Predefined Qt cursors. - static QCursor arrowCursor(); // standard arrow cursor - static QCursor upArrowCursor(); // upwards arrow - static QCursor crossCursor(); // crosshair - static QCursor waitCursor(); // hourglass/watch - static QCursor ibeamCursor(); // ibeam/text entry - static QCursor sizeVerCursor(); // vertical resize - static QCursor sizeHorCursor(); // horizontal resize - static QCursor sizeBDiagCursor(); // diagonal resize (/) - static QCursor sizeFDiagCursor(); // diagonal resize (\) - static QCursor sizeAllCursor(); // all directions resize - static QCursor blankCursor(); // blank/invisible cursor - static QCursor splitVCursor(); // vertical splitting - static QCursor splitHCursor(); // horziontal splitting - static QCursor pointingHandCursor(); // a pointing hand + // Predefined TQt cursors. + static TQCursor arrowCursor(); // standard arrow cursor + static TQCursor upArrowCursor(); // upwards arrow + static TQCursor crossCursor(); // crosshair + static TQCursor waitCursor(); // hourglass/watch + static TQCursor ibeamCursor(); // ibeam/text entry + static TQCursor sizeVerCursor(); // vertical resize + static TQCursor sizeHorCursor(); // horizontal resize + static TQCursor sizeBDiagCursor(); // diagonal resize (/) + static TQCursor sizeFDiagCursor(); // diagonal resize (\) + static TQCursor sizeAllCursor(); // all directions resize + static TQCursor blankCursor(); // blank/invisible cursor + static TQCursor splitVCursor(); // vertical splitting + static TQCursor splitHCursor(); // horziontal splitting + static TQCursor pointingHandCursor(); // a pointing hand // Existing custom KimageShop cursors. Use the 'load' function for all new cursors. - static QCursor moveCursor(); // move tool cursor - static QCursor penCursor(); // pen tool cursor - static QCursor brushCursor(); // brush tool cursor - static QCursor airbrushCursor(); // airbrush tool cursor - static QCursor eraserCursor(); // eraser tool cursor - static QCursor fillerCursor(); // filler tool cursor - static QCursor pickerCursor(); // color picker cursor - static QCursor pickerPlusCursor(); // color picker cursor - static QCursor pickerMinusCursor(); // color picker cursor - static QCursor colorChangerCursor(); // color changer tool cursor - static QCursor selectCursor(); // select cursor - static QCursor zoomCursor(); // zoom tool cursor - static QCursor handCursor(); // hand tool cursor - static QCursor openHandCursor(); // Pan tool cursor - static QCursor closedHandCursor(); // Pan tool cursor - static QCursor rotateCursor(); // Transform tool cursor + static TQCursor moveCursor(); // move tool cursor + static TQCursor penCursor(); // pen tool cursor + static TQCursor brushCursor(); // brush tool cursor + static TQCursor airbrushCursor(); // airbrush tool cursor + static TQCursor eraserCursor(); // eraser tool cursor + static TQCursor fillerCursor(); // filler tool cursor + static TQCursor pickerCursor(); // color picker cursor + static TQCursor pickerPlusCursor(); // color picker cursor + static TQCursor pickerMinusCursor(); // color picker cursor + static TQCursor colorChangerCursor(); // color changer tool cursor + static TQCursor selectCursor(); // select cursor + static TQCursor zoomCursor(); // zoom tool cursor + static TQCursor handCursor(); // hand tool cursor + static TQCursor openHandCursor(); // Pan tool cursor + static TQCursor closedHandCursor(); // Pan tool cursor + static TQCursor rotateCursor(); // Transform tool cursor // Load a cursor from an image file. The image should have an alpha channel // and will be converted to black and white on loading. Any format loadable by - // QImage can be used. - static QCursor load(const QString & imageFilename, int hotspotX = -1, int hotspotY = -1); + // TQImage can be used. + static TQCursor load(const TQString & imageFilename, int hotspotX = -1, int hotspotY = -1); }; #endif // __kis_cursor_h__ diff --git a/krita/ui/kis_custom_brush.cc b/krita/ui/kis_custom_brush.cc index 3e6046e7..492d2003 100644 --- a/krita/ui/kis_custom_brush.cc +++ b/krita/ui/kis_custom_brush.cc @@ -18,11 +18,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -39,8 +39,8 @@ #include "kis_paint_layer.h" #include "kis_group_layer.h" -KisCustomBrush::KisCustomBrush(QWidget *parent, const char* name, const QString& caption, KisView* view) - : KisWdgCustomBrush(parent, name), m_view(view) +KisCustomBrush::KisCustomBrush(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view) + : KisWdgCustomBrush(tqparent, name), m_view(view) { Q_ASSERT(m_view); m_mediator = 0; @@ -50,18 +50,18 @@ KisCustomBrush::KisCustomBrush(QWidget *parent, const char* name, const QString& preview->setScaledContents(true); - connect(addButton, SIGNAL(pressed()), this, SLOT(slotAddPredefined())); - connect(brushButton, SIGNAL(pressed()), this, SLOT(slotUseBrush())); -// connect(exportButton, SIGNAL(pressed()), this, SLOT(slotExport())); - connect(style, SIGNAL(activated(int)), this, SLOT(slotUpdateCurrentBrush(int))); - connect(colorAsMask, SIGNAL(stateChanged(int)), this, SLOT(slotUpdateCurrentBrush(int))); + connect(addButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPredefined())); + connect(brushButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUseBrush())); +// connect(exportButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotExport())); + connect(style, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateCurrentBrush(int))); + connect(colorAsMask, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotUpdateCurrentBrush(int))); } KisCustomBrush::~KisCustomBrush() { delete m_brush; } -void KisCustomBrush::showEvent(QShowEvent *) { +void KisCustomBrush::showEvent(TQShowEvent *) { slotUpdateCurrentBrush(0); } @@ -69,7 +69,7 @@ void KisCustomBrush::slotUpdateCurrentBrush(int) { delete m_brush; if (m_view->canvasSubject() && m_view->canvasSubject()->currentImg()) { createBrush(); - preview->setPixmap(QPixmap(m_brush->img())); + preview->setPixmap(TQPixmap(m_brush->img())); } else { m_brush = 0; } @@ -82,8 +82,8 @@ void KisCustomBrush::slotExport() { void KisCustomBrush::slotAddPredefined() { // Save in the directory that is likely to be: ~/.kde/share/apps/krita/brushes // a unique file with this brushname - QString dir = KGlobal::dirs()->saveLocation("data", "krita/brushes"); - QString extension; + TQString dir = KGlobal::dirs()->saveLocation("data", "krita/brushes"); + TQString extension; if (style->currentItem() == 0) { extension = ".gbr"; @@ -124,8 +124,8 @@ void KisCustomBrush::createBrush() { } // For each layer in the current image, create a new image, and add it to the list - QValueVector< QValueVector > devices; - devices.push_back(QValueVector()); + TQValueVector< TQValueVector > devices; + devices.push_back(TQValueVector()); int w = img->width(); int h = img->height(); @@ -138,7 +138,7 @@ void KisCustomBrush::createBrush() { devices.at(0).push_back(paint->paintDevice()); layer = layer->nextSibling(); } - QValueVector modes; + TQValueVector modes; switch(comboBox2->currentItem()) { case 0: modes.push_back(KisPipeBrushParasite::Constant); break; diff --git a/krita/ui/kis_custom_brush.h b/krita/ui/kis_custom_brush.h index 8beb52c2..56e90553 100644 --- a/krita/ui/kis_custom_brush.h +++ b/krita/ui/kis_custom_brush.h @@ -19,7 +19,7 @@ #ifndef KIS_CUSTOM_BRUSH_H_ #define KIS_CUSTOM_BRUSH_H_ -#include +#include #include "wdgcustombrush.h" @@ -31,8 +31,9 @@ class KisResourceServerBase; class KisCustomBrush : public KisWdgCustomBrush { Q_OBJECT + TQ_OBJECT public: - KisCustomBrush(QWidget *parent, const char* name, const QString& caption, KisView* view); + KisCustomBrush(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view); virtual ~KisCustomBrush(); void setResourceServer(KisResourceServerBase* server) { m_server = server; } @@ -43,7 +44,7 @@ signals: void activatedResource(KisResource *); protected: - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private slots: void slotExport(); diff --git a/krita/ui/kis_custom_image_widget.cc b/krita/ui/kis_custom_image_widget.cc index 79b9389f..0b77da9f 100644 --- a/krita/ui/kis_custom_image_widget.cc +++ b/krita/ui/kis_custom_image_widget.cc @@ -33,14 +33,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include -KisCustomImageWidget::KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 defWidth, Q_INT32 defHeight, double resolution, QString defColorSpaceName, QString imageName) - : WdgNewImage(parent) { +KisCustomImageWidget::KisCustomImageWidget(TQWidget *tqparent, KisDoc *doc, TQ_INT32 defWidth, TQ_INT32 defHeight, double resolution, TQString defColorSpaceName, TQString imageName) + : WdgNewImage(tqparent) { m_doc = doc; txtName->setText(imageName); @@ -52,9 +52,9 @@ KisCustomImageWidget::KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 cmbColorSpaces->setIDList(KisMetaRegistry::instance()->csRegistry()->listKeys()); cmbColorSpaces->setCurrentText(defColorSpaceName); - connect(cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbProfiles(const KisID &))); - connect (m_createButton, SIGNAL( clicked() ), this, SLOT (buttonClicked()) ); + connect(cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbProfiles(const KisID &))); + connect (m_createButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT (buttonClicked()) ); m_createButton -> setDefault(true); fillCmbProfiles(cmbColorSpaces->currentItem()); @@ -65,9 +65,9 @@ KisCustomImageWidget::KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 void KisCustomImageWidget::buttonClicked() { KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getColorSpace(cmbColorSpaces->currentItem(), cmbProfile->currentText()); - QColor qc(cmbColor->color()); + TQColor qc(cmbColor->color()); - m_doc->newImage(txtName->text(), (Q_INT32)intWidth->value(), (Q_INT32)intHeight->value(), cs, KisColor(qc, cs), txtDescription->text(), doubleResolution->value()); + m_doc->newImage(txtName->text(), (TQ_INT32)intWidth->value(), (TQ_INT32)intHeight->value(), cs, KisColor(qc, cs), txtDescription->text(), doubleResolution->value()); KisImageSP img = m_doc->currentImage(); if (img) { KisLayerSP layer = img->activeLayer(); @@ -78,9 +78,9 @@ void KisCustomImageWidget::buttonClicked() { emit documentSelected(); } -Q_UINT8 KisCustomImageWidget::backgroundOpacity() const +TQ_UINT8 KisCustomImageWidget::backgroundOpacity() const { - Q_INT32 opacity = sliderOpacity->value(); + TQ_INT32 opacity = sliderOpacity->value(); if (!opacity) return 0; @@ -99,8 +99,8 @@ void KisCustomImageWidget::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); if (csf == 0) return; - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { cmbProfile->insertItem((*it)->productName()); } diff --git a/krita/ui/kis_custom_image_widget.h b/krita/ui/kis_custom_image_widget.h index 31455f85..d951cb9e 100644 --- a/krita/ui/kis_custom_image_widget.h +++ b/krita/ui/kis_custom_image_widget.h @@ -32,13 +32,14 @@ class KisID; */ class KisCustomImageWidget : public WdgNewImage { Q_OBJECT + TQ_OBJECT public: /** * Constructor. Please note that this class is being used/created by KisDoc. - * @param parent the parent widget + * @param tqparent the tqparent widget * @param doc the document that wants to be altered */ - KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 defWidth, Q_INT32 defHeight, double resolution, QString defColorSpaceName, QString imageName); + KisCustomImageWidget(TQWidget *tqparent, KisDoc *doc, TQ_INT32 defWidth, TQ_INT32 defHeight, double resolution, TQString defColorSpaceName, TQString imageName); private slots: void buttonClicked(); @@ -49,7 +50,7 @@ signals: void documentSelected(); private: - Q_UINT8 backgroundOpacity() const; + TQ_UINT8 backgroundOpacity() const; KisDoc *m_doc; }; diff --git a/krita/ui/kis_custom_palette.cc b/krita/ui/kis_custom_palette.cc index 16631116..2a6c1489 100644 --- a/krita/ui/kis_custom_palette.cc +++ b/krita/ui/kis_custom_palette.cc @@ -18,11 +18,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,8 +39,8 @@ #include "kis_resource_mediator.h" #include "kis_resourceserver.h" -KisCustomPalette::KisCustomPalette(QWidget *parent, const char* name, const QString& caption, KisView* view) - : KisWdgCustomPalette(parent, name), m_view(view) +KisCustomPalette::KisCustomPalette(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view) + : KisWdgCustomPalette(tqparent, name), m_view(view) { Q_ASSERT(m_view); m_mediator = 0; @@ -52,9 +52,9 @@ KisCustomPalette::KisCustomPalette(QWidget *parent, const char* name, const QStr m_ownPalette = true; this->view->setPalette(m_palette); - connect(addColor, SIGNAL(pressed()), this, SLOT(slotAddNew())); - connect(removeColor, SIGNAL(pressed()), this, SLOT(slotRemoveCurrent())); - connect(addPalette, SIGNAL(pressed()), this, SLOT(slotAddPredefined())); + connect(addColor, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddNew())); + connect(removeColor, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotRemoveCurrent())); + connect(addPalette, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPredefined())); } KisCustomPalette::~KisCustomPalette() { @@ -85,16 +85,16 @@ void KisCustomPalette::slotAddNew() { // FIXME also let him add the current paint color to the palette // or even better, let the color picker have an option 'Add to palette'! - QColor color; + TQColor color; int result = KColorDialog::getColor(color); if (result != KColorDialog::Accepted) return; bool ok; - QRegExpValidator validator(QRegExp(".*"), this); - QString name = KInputDialog::getText(i18n("Add Color to Palette"), + TQRegExpValidator validator(TQRegExp(".*"), this); + TQString name = KInputDialog::getText(i18n("Add Color to Palette"), i18n("Color name (optional):"), - QString::null, &ok, + TQString(), &ok, 0, 0, &validator); if (!ok) return; @@ -121,8 +121,8 @@ void KisCustomPalette::slotAddPredefined() { if (!m_editMode) { // Save in the directory that is likely to be: ~/.kde/share/apps/krita/palettes // a unique file with this palettename - QString dir = KGlobal::dirs()->saveLocation("data", "krita/palettes"); - QString extension; + TQString dir = KGlobal::dirs()->saveLocation("data", "krita/palettes"); + TQString extension; extension = ".gpl"; KTempFile file(dir, extension); @@ -136,7 +136,7 @@ void KisCustomPalette::slotAddPredefined() { if (!m_palette->save()) { KMessageBox::error(0, i18n("Cannot write to palette file %1. Maybe it is read-only.") - .arg(m_palette->filename()), i18n("Palette")); + .tqarg(m_palette->filename()), i18n("Palette")); return; } diff --git a/krita/ui/kis_custom_palette.h b/krita/ui/kis_custom_palette.h index 1a2cfd95..7ff9c9d8 100644 --- a/krita/ui/kis_custom_palette.h +++ b/krita/ui/kis_custom_palette.h @@ -19,7 +19,7 @@ #ifndef KIS_CUSTOM_PALETTE_H_ #define KIS_CUSTOM_PALETTE_H_ -#include +#include #include "wdgcustompalette.h" @@ -32,8 +32,9 @@ class KisResourceServerBase; class KisCustomPalette : public KisWdgCustomPalette { Q_OBJECT + TQ_OBJECT public: - KisCustomPalette(QWidget *parent, const char* name, const QString& caption, KisView* view); + KisCustomPalette(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view); virtual ~KisCustomPalette(); void setResourceServer(KisResourceServerBase* server) { m_server = server; } void setEditMode(bool b); diff --git a/krita/ui/kis_custom_pattern.cc b/krita/ui/kis_custom_pattern.cc index 41ba73a7..275bfa57 100644 --- a/krita/ui/kis_custom_pattern.cc +++ b/krita/ui/kis_custom_pattern.cc @@ -18,10 +18,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -36,8 +36,8 @@ #include "kis_resourceserver.h" #include "kis_paint_layer.h" -KisCustomPattern::KisCustomPattern(QWidget *parent, const char* name, const QString& caption, KisView* view) - : KisWdgCustomPattern(parent, name), m_view(view) +KisCustomPattern::KisCustomPattern(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view) + : KisWdgCustomPattern(tqparent, name), m_view(view) { Q_ASSERT(m_view); m_mediator = 0; @@ -47,16 +47,16 @@ KisCustomPattern::KisCustomPattern(QWidget *parent, const char* name, const QStr preview->setScaledContents(true); - connect(addButton, SIGNAL(pressed()), this, SLOT(slotAddPredefined())); - connect(patternButton, SIGNAL(pressed()), this, SLOT(slotUsePattern())); - connect(exportButton, SIGNAL(pressed()), this, SLOT(slotExport())); + connect(addButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPredefined())); + connect(patternButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUsePattern())); + connect(exportButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotExport())); } KisCustomPattern::~KisCustomPattern() { delete m_pattern; } -void KisCustomPattern::showEvent(QShowEvent *) { +void KisCustomPattern::showEvent(TQShowEvent *) { slotUpdateCurrentPattern(0); } @@ -64,7 +64,7 @@ void KisCustomPattern::slotUpdateCurrentPattern(int) { delete m_pattern; if (m_view->canvasSubject() && m_view->canvasSubject()->currentImg()) { createPattern(); - preview->setPixmap(QPixmap(m_pattern->img())); + preview->setPixmap(TQPixmap(m_pattern->img())); } else { m_pattern = 0; } @@ -80,8 +80,8 @@ void KisCustomPattern::slotAddPredefined() { // Save in the directory that is likely to be: ~/.kde/share/apps/krita/patterns // a unique file with this pattern name - QString dir = KGlobal::dirs()->saveLocation("data", "krita/patterns"); - QString extension; + TQString dir = KGlobal::dirs()->saveLocation("data", "krita/patterns"); + TQString extension; KTempFile file(dir, ".pat"); file.close(); // If we don't, and pattern->save first, it might get truncated! diff --git a/krita/ui/kis_custom_pattern.h b/krita/ui/kis_custom_pattern.h index 0e45e556..993c9d10 100644 --- a/krita/ui/kis_custom_pattern.h +++ b/krita/ui/kis_custom_pattern.h @@ -19,7 +19,7 @@ #ifndef KIS_CUSTOM_PATTERN_H_ #define KIS_CUSTOM_PATTERN_H_ -#include +#include #include "wdgcustompattern.h" @@ -31,8 +31,9 @@ class KisResourceServerBase; class KisCustomPattern : public KisWdgCustomPattern { Q_OBJECT + TQ_OBJECT public: - KisCustomPattern(QWidget *parent, const char* name, const QString& caption, KisView* view); + KisCustomPattern(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view); virtual ~KisCustomPattern(); void setResourceServer(KisResourceServerBase* server) { m_server = server; } @@ -40,7 +41,7 @@ signals: void activatedResource(KisResource *); protected: - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private slots: void slotExport(); diff --git a/krita/ui/kis_dlg_adj_layer_props.cc b/krita/ui/kis_dlg_adj_layer_props.cc index b994ae5d..c955eba3 100644 --- a/krita/ui/kis_dlg_adj_layer_props.cc +++ b/krita/ui/kis_dlg_adj_layer_props.cc @@ -18,9 +18,9 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include @@ -42,11 +42,11 @@ #include "kis_filter_configuration.h" KisDlgAdjLayerProps::KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, - const QString & layerName, - const QString & caption, - QWidget *parent, + const TQString & layerName, + const TQString & caption, + TQWidget *tqparent, const char *name) - : KDialogBase(parent, name, true, "", Ok | Cancel) + : KDialogBase(tqparent, name, true, "", Ok | Cancel) { Q_ASSERT( layer ); m_layer = layer; @@ -84,27 +84,27 @@ KisDlgAdjLayerProps::KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, dev = new KisPaintDevice(m_layer->image()->colorSpace()); } setCaption(caption); - QWidget * page = new QWidget(this, "page widget"); - QHBoxLayout * layout = new QHBoxLayout(page, 0, 6); + TQWidget * page = new TQWidget(this, "page widget"); + TQHBoxLayout * tqlayout = new TQHBoxLayout(page, 0, 6); setMainWidget(page); m_preview = new KisPreviewWidget(page, "dlgadjustment.preview"); m_preview->slotSetDevice( dev ); - connect( m_preview, SIGNAL(updated()), this, SLOT(refreshPreview())); - layout->addWidget(m_preview, 1, 1); + connect( m_preview, TQT_SIGNAL(updated()), this, TQT_SLOT(refreshPreview())); + tqlayout->addWidget(m_preview, 1, 1); - QVBoxLayout *v1 = new QVBoxLayout( layout ); - QHBoxLayout *hl = new QHBoxLayout( v1 ); + TQVBoxLayout *v1 = new TQVBoxLayout( tqlayout ); + TQHBoxLayout *hl = new TQHBoxLayout( v1 ); - QLabel * lblName = new QLabel(i18n("Layer name:"), page, "lblName"); + TQLabel * lblName = new TQLabel(i18n("Layer name:"), page, "lblName"); hl->addWidget(lblName, 0, 0); m_layerName = new KLineEdit(page, "m_layerName"); m_layerName->setText(layerName); - m_layerName->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + m_layerName->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); hl->addWidget(m_layerName, 0, 1); - connect( m_layerName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_layerName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); if ( m_currentFilter ) { m_currentConfigWidget = m_currentFilter->createConfigurationWidget(page, dev); @@ -113,19 +113,19 @@ KisDlgAdjLayerProps::KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, } } if ( m_currentFilter == 0 || m_currentConfigWidget == 0 ) { - QLabel * labelNoConfigWidget = new QLabel( i18n("No configuration options are available for this filter"), page ); + TQLabel * labelNoConfigWidget = new TQLabel( i18n("No configuration options are available for this filter"), page ); v1->addWidget( labelNoConfigWidget ); } else { v1->addWidget( m_currentConfigWidget ); - connect(m_currentConfigWidget, SIGNAL(sigPleaseUpdatePreview()), this, SLOT(slotConfigChanged())); + connect(m_currentConfigWidget, TQT_SIGNAL(sigPleaseUpdatePreview()), this, TQT_SLOT(slotConfigChanged())); } refreshPreview(); enableButtonOK( !m_layerName->text().isEmpty() ); } -void KisDlgAdjLayerProps::slotNameChanged( const QString & text ) +void KisDlgAdjLayerProps::slotNameChanged( const TQString & text ) { enableButtonOK( !text.isEmpty() ); } @@ -135,7 +135,7 @@ KisFilterConfiguration * KisDlgAdjLayerProps::filterConfiguration() const return m_currentFilter->configuration(m_currentConfigWidget); } -QString KisDlgAdjLayerProps::layerName() const +TQString KisDlgAdjLayerProps::layerName() const { return m_layerName->text(); } diff --git a/krita/ui/kis_dlg_adj_layer_props.h b/krita/ui/kis_dlg_adj_layer_props.h index 783e65e5..de848002 100644 --- a/krita/ui/kis_dlg_adj_layer_props.h +++ b/krita/ui/kis_dlg_adj_layer_props.h @@ -22,14 +22,14 @@ #include class KisFilter; -class QIconViewItem; -class QLabel; -class QHBoxLayout; +class TQIconViewItem; +class TQLabel; +class TQHBoxLayout; class KisPreviewWidget; class KisFiltersListView; class KisFilterConfiguration; class KisImage; -class QGroupBox; +class TQGroupBox; /** * Create a new adjustment layer. @@ -38,6 +38,7 @@ class KisDlgAdjLayerProps : public KDialogBase { Q_OBJECT + TQ_OBJECT public: @@ -49,21 +50,21 @@ public: * @param caption the caption for the dialog -- create or properties * @param create if true, set the dialog up for creating a new adj. layer, if false, edit the * propeties of the current adj. layer - * @param parent the widget parent of this dialog - * @param name the QObject name, if any + * @param tqparent the widget tqparent of this dialog + * @param name the TQObject name, if any */ KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, - const QString & layerName, - const QString & caption, - QWidget *parent = 0, + const TQString & layerName, + const TQString & caption, + TQWidget *tqparent = 0, const char *name = 0); KisFilterConfiguration * filterConfiguration() const; - QString layerName() const; + TQString layerName() const; protected slots: - void slotNameChanged( const QString & ); + void slotNameChanged( const TQString & ); void slotConfigChanged(); void refreshPreview(); diff --git a/krita/ui/kis_dlg_adjustment_layer.cc b/krita/ui/kis_dlg_adjustment_layer.cc index 407340ac..22cb9c0d 100644 --- a/krita/ui/kis_dlg_adjustment_layer.cc +++ b/krita/ui/kis_dlg_adjustment_layer.cc @@ -18,9 +18,9 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include @@ -42,11 +42,11 @@ #include "kis_filter_configuration.h" KisDlgAdjustmentLayer::KisDlgAdjustmentLayer(KisImage * img, - const QString & /*layerName*/, - const QString & caption, - QWidget *parent, + const TQString & /*layerName*/, + const TQString & caption, + TQWidget *tqparent, const char *name) - : KDialogBase(parent, name, true, "", Ok | Cancel) + : KDialogBase(tqparent, name, true, "", Ok | Cancel) , m_image(img) , m_currentFilter(0) , m_customName(false) @@ -75,44 +75,44 @@ KisDlgAdjustmentLayer::KisDlgAdjustmentLayer(KisImage * img, } setCaption(caption); - QWidget * page = new QWidget(this, "page widget"); - QGridLayout * grid = new QGridLayout(page, 3, 2, 0, 6); + TQWidget * page = new TQWidget(this, "page widget"); + TQGridLayout * grid = new TQGridLayout(page, 3, 2, 0, 6); setMainWidget(page); - QLabel * lblName = new QLabel(i18n("Layer name:"), page, "lblName"); + TQLabel * lblName = new TQLabel(i18n("Layer name:"), page, "lblName"); grid->addWidget(lblName, 0, 0); m_layerName = new KLineEdit(page, "m_layerName"); grid->addWidget(m_layerName, 0, 1); - connect( m_layerName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_layerName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); m_filtersList = new KisFiltersListView(m_dev, page, true, "dlgadjustment.filtersList"); - connect(m_filtersList , SIGNAL(selectionChanged(QIconViewItem*)), this, SLOT(selectionHasChanged(QIconViewItem* ))); + connect(m_filtersList , TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(selectionHasChanged(TQIconViewItem* ))); grid->addMultiCellWidget(m_filtersList, 1, 2, 0, 0); m_preview = new KisPreviewWidget(page, "dlgadjustment.preview"); m_preview->slotSetDevice( m_dev ); - connect( m_preview, SIGNAL(updated()), this, SLOT(refreshPreview())); + connect( m_preview, TQT_SIGNAL(updated()), this, TQT_SLOT(refreshPreview())); grid->addWidget(m_preview, 1, 1); - m_configWidgetHolder = new QGroupBox(i18n("Configuration"), page, "currentConfigWidget"); + m_configWidgetHolder = new TQGroupBox(i18n("Configuration"), page, "currentConfigWidget"); m_configWidgetHolder->setColumnLayout(0, Qt::Horizontal); grid->addWidget(m_configWidgetHolder, 2, 1); - m_labelNoConfigWidget = new QLabel(i18n("No configuration options are available for this filter"), + m_labelNoConfigWidget = new TQLabel(i18n("No configuration options are available for this filter"), m_configWidgetHolder); - m_configWidgetHolder->layout()->add(m_labelNoConfigWidget); + m_configWidgetHolder->tqlayout()->add(m_labelNoConfigWidget); m_labelNoConfigWidget->hide(); - resize( QSize(600, 480).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 480).expandedTo(tqminimumSizeHint()) ); m_currentConfigWidget = 0; enableButtonOK(0); } -void KisDlgAdjustmentLayer::slotNameChanged( const QString & text ) +void KisDlgAdjustmentLayer::slotNameChanged( const TQString & text ) { if (m_freezeName) return; @@ -126,7 +126,7 @@ KisFilterConfiguration * KisDlgAdjustmentLayer::filterConfiguration() const return m_currentFilter->configuration(m_currentConfigWidget); } -QString KisDlgAdjustmentLayer::layerName() const +TQString KisDlgAdjustmentLayer::layerName() const { return m_layerName->text(); } @@ -148,7 +148,7 @@ void KisDlgAdjustmentLayer::refreshPreview() m_preview->runFilter(m_currentFilter, config); } -void KisDlgAdjustmentLayer::selectionHasChanged ( QIconViewItem * item ) +void KisDlgAdjustmentLayer::selectionHasChanged ( TQIconViewItem * item ) { KisFiltersIconViewItem* kisitem = (KisFiltersIconViewItem*) item; @@ -156,7 +156,7 @@ void KisDlgAdjustmentLayer::selectionHasChanged ( QIconViewItem * item ) if ( m_currentConfigWidget != 0 ) { - m_configWidgetHolder->layout()->remove(m_currentConfigWidget); + m_configWidgetHolder->tqlayout()->remove(m_currentConfigWidget); delete m_currentConfigWidget; m_currentConfigWidget = 0; @@ -173,9 +173,9 @@ void KisDlgAdjustmentLayer::selectionHasChanged ( QIconViewItem * item ) if (m_currentConfigWidget != 0) { - m_configWidgetHolder->layout()->add(m_currentConfigWidget); + m_configWidgetHolder->tqlayout()->add(m_currentConfigWidget); m_currentConfigWidget->show(); - connect(m_currentConfigWidget, SIGNAL(sigPleaseUpdatePreview()), this, SLOT(slotConfigChanged())); + connect(m_currentConfigWidget, TQT_SIGNAL(sigPleaseUpdatePreview()), this, TQT_SLOT(slotConfigChanged())); } else { m_labelNoConfigWidget->show(); } diff --git a/krita/ui/kis_dlg_adjustment_layer.h b/krita/ui/kis_dlg_adjustment_layer.h index 93b32fda..4e20b8fd 100644 --- a/krita/ui/kis_dlg_adjustment_layer.h +++ b/krita/ui/kis_dlg_adjustment_layer.h @@ -22,14 +22,14 @@ #include class KisFilter; -class QIconViewItem; -class QLabel; -class QHBoxLayout; +class TQIconViewItem; +class TQLabel; +class TQHBoxLayout; class KisPreviewWidget; class KisFiltersListView; class KisFilterConfiguration; class KisImage; -class QGroupBox; +class TQGroupBox; /** * Create a new adjustment layer. @@ -38,6 +38,7 @@ class KisDlgAdjustmentLayer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: @@ -49,35 +50,35 @@ public: * @param caption the caption for the dialog -- create or properties * @param create if true, set the dialog up for creating a new adj. layer, if false, edit the * propeties of the current adj. layer - * @param parent the widget parent of this dialog - * @param name the QObject name, if any + * @param tqparent the widget tqparent of this dialog + * @param name the TQObject name, if any */ KisDlgAdjustmentLayer(KisImage * img, - const QString & layerName, - const QString & caption, - QWidget *parent = 0, + const TQString & layerName, + const TQString & caption, + TQWidget *tqparent = 0, const char *name = 0); KisFilterConfiguration * filterConfiguration() const; - QString layerName() const; + TQString layerName() const; protected slots: - void slotNameChanged( const QString & ); + void slotNameChanged( const TQString & ); void slotConfigChanged(); void refreshPreview(); - void selectionHasChanged ( QIconViewItem * item ); + void selectionHasChanged ( TQIconViewItem * item ); private: KisImage * m_image; KisPaintDeviceSP m_dev; KisFiltersListView * m_filtersList; KisPreviewWidget * m_preview; - QGroupBox * m_configWidgetHolder; - QWidget * m_currentConfigWidget; + TQGroupBox * m_configWidgetHolder; + TQWidget * m_currentConfigWidget; KisFilter* m_currentFilter; KLineEdit * m_layerName; - QLabel* m_labelNoConfigWidget; + TQLabel* m_labelNoConfigWidget; bool m_customName; bool m_freezeName; }; diff --git a/krita/ui/kis_dlg_apply_profile.cc b/krita/ui/kis_dlg_apply_profile.cc index 5240a47d..12134aa0 100644 --- a/krita/ui/kis_dlg_apply_profile.cc +++ b/krita/ui/kis_dlg_apply_profile.cc @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include -#include +#include #include "kis_factory.h" #include "kis_colorspace_factory_registry.h" @@ -34,15 +34,15 @@ #include "wdgapplyprofile.h" // XXX: Hardcode RGBA name. This should be a constant, somewhere. -KisDlgApplyProfile::KisDlgApplyProfile(QWidget *parent, const char *name) - : super(parent, name, true, "", Ok | Cancel) +KisDlgApplyProfile::KisDlgApplyProfile(TQWidget *tqparent, const char *name) + : super(tqparent, name, true, "", Ok | Cancel) { setCaption(i18n("Apply Image Profile to Clipboard Data")); m_page = new WdgApplyProfile(this); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); // XXX: This is BAD! (bsar) fillCmbProfiles(KisID("RGBA", "")); @@ -59,7 +59,7 @@ KisDlgApplyProfile::~KisDlgApplyProfile() KisProfile * KisDlgApplyProfile::profile() const { - QString profileName; + TQString profileName; profileName = m_page->cmbProfile->currentText(); @@ -84,8 +84,8 @@ void KisDlgApplyProfile::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); if (csf == 0) return; - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page->cmbProfile->insertItem((*it)->productName()); } diff --git a/krita/ui/kis_dlg_apply_profile.h b/krita/ui/kis_dlg_apply_profile.h index 2e956629..18f56d0a 100644 --- a/krita/ui/kis_dlg_apply_profile.h +++ b/krita/ui/kis_dlg_apply_profile.h @@ -27,9 +27,10 @@ class KisDlgApplyProfile : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - KisDlgApplyProfile(QWidget *parent = 0, + KisDlgApplyProfile(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisDlgApplyProfile(); diff --git a/krita/ui/kis_dlg_image_properties.cc b/krita/ui/kis_dlg_image_properties.cc index 871fd9d6..72c26ec5 100644 --- a/krita/ui/kis_dlg_image_properties.cc +++ b/krita/ui/kis_dlg_image_properties.cc @@ -15,16 +15,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -44,8 +44,8 @@ #include "squeezedcombobox.h" #include "wdgnewimage.h" -KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, const char *name) - : super(parent, name, true, "", Ok | Cancel) +KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, TQWidget *tqparent, const char *name) + : super(tqparent, name, true, "", Ok | Cancel) { setCaption(i18n("Image Properties")); @@ -58,7 +58,7 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, m_image = image; setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); m_page->txtName->setText(image->name()); m_page->m_createButton->hide(); @@ -72,7 +72,7 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, //m_page->cmbColorSpaces->hide(); //m_page->lblColorSpaces->setText(image->colorSpace()->id().name()); KisIDList colorSpaces = KisMetaRegistry::instance()->csRegistry()->listKeys(); - KisIDList::iterator i = colorSpaces.find(KisID("WET","")); + KisIDList::iterator i = colorSpaces.tqfind(KisID("WET","")); if (i != colorSpaces.end()) { colorSpaces.remove(i); } @@ -96,8 +96,8 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, m_page->cmbColor->hide(); m_page->lblColor->hide(); - connect(m_page->cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbProfiles(const KisID &))); + connect(m_page->cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbProfiles(const KisID &))); } @@ -122,7 +122,7 @@ int KisDlgImageProperties::opacity() return m_page->sliderOpacity->value(); } -QString KisDlgImageProperties::imageName() +TQString KisDlgImageProperties::imageName() { return m_page->txtName->text(); } @@ -132,7 +132,7 @@ double KisDlgImageProperties::resolution() return m_page->doubleResolution->value(); } -QString KisDlgImageProperties::description() +TQString KisDlgImageProperties::description() { return m_page->txtDescription->text(); } @@ -144,8 +144,8 @@ KisColorSpace * KisDlgImageProperties::colorSpace() KisProfile * KisDlgImageProperties::profile() { - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( m_image->colorSpace()->id() ); - Q_UINT32 index = m_page->cmbProfile->currentItem(); + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( m_image->colorSpace()->id() ); + TQ_UINT32 index = m_page->cmbProfile->currentItem(); if (index < profileList.count()) { return profileList.at(index); @@ -160,8 +160,8 @@ void KisDlgImageProperties::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); m_page->cmbProfile->clear(); - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page->cmbProfile->insertItem((*it)->productName()); } diff --git a/krita/ui/kis_dlg_image_properties.h b/krita/ui/kis_dlg_image_properties.h index 2a4b84c9..934adc05 100644 --- a/krita/ui/kis_dlg_image_properties.h +++ b/krita/ui/kis_dlg_image_properties.h @@ -23,25 +23,26 @@ #include class WdgNewImage; -class QButtonGroup; +class TQButtonGroup; class KisID; class KisDlgImageProperties : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: KisDlgImageProperties(KisImageSP image, - QWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); virtual ~KisDlgImageProperties(); int imageWidth(); int imageHeight(); int opacity(); - QString imageName(); + TQString imageName(); double resolution(); - QString description(); + TQString description(); KisColorSpace * colorSpace(); KisProfile * profile(); diff --git a/krita/ui/kis_dlg_layer_properties.cc b/krita/ui/kis_dlg_layer_properties.cc index 442d2da1..68df970b 100644 --- a/krita/ui/kis_dlg_layer_properties.cc +++ b/krita/ui/kis_dlg_layer_properties.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -35,15 +35,15 @@ #include "kis_int_spinbox.h" #include "kis_colorspace.h" -KisDlgLayerProperties::KisDlgLayerProperties(const QString& deviceName, - Q_INT32 opacity, +KisDlgLayerProperties::KisDlgLayerProperties(const TQString& deviceName, + TQ_INT32 opacity, const KisCompositeOp& compositeOp, const KisColorSpace * colorSpace, - QWidget *parent, const char *name, WFlags f) - : super(parent, name, f, name, Ok | Cancel) + TQWidget *tqparent, const char *name, WFlags f) + : super(tqparent, name, f, name, Ok | Cancel) { m_page = new WdgLayerProperties(this); - m_page->layout()->setMargin(0); + m_page->tqlayout()->setMargin(0); opacity = int((opacity * 100.0) / 255 + 0.5); @@ -51,12 +51,12 @@ KisDlgLayerProperties::KisDlgLayerProperties(const QString& deviceName, setMainWidget(m_page); m_page->editName->setText(deviceName); - connect( m_page->editName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_page->editName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); m_page->cmbColorSpaces->setCurrent(colorSpace->id()); m_page->cmbColorSpaces->setEnabled(false); - QString profilename; + TQString profilename; if (KisProfile* profile = const_cast(colorSpace)->getProfile()) profilename = profile->productName(); m_page->cmbProfile->insertItem(profilename); @@ -75,19 +75,19 @@ KisDlgLayerProperties::~KisDlgLayerProperties() { } -void KisDlgLayerProperties::slotNameChanged( const QString &_text ) +void KisDlgLayerProperties::slotNameChanged( const TQString &_text ) { enableButtonOK( !_text.isEmpty() ); } -QString KisDlgLayerProperties::getName() const +TQString KisDlgLayerProperties::getName() const { return m_page->editName->text(); } int KisDlgLayerProperties::getOpacity() const { - Q_INT32 opacity = m_page->intOpacity->value(); + TQ_INT32 opacity = m_page->intOpacity->value(); if (!opacity) return 0; diff --git a/krita/ui/kis_dlg_layer_properties.h b/krita/ui/kis_dlg_layer_properties.h index 2dc823ce..c2b2a5e0 100644 --- a/krita/ui/kis_dlg_layer_properties.h +++ b/krita/ui/kis_dlg_layer_properties.h @@ -20,7 +20,7 @@ #include -class QWidget; +class TQWidget; class WdgLayerProperties; class KisCompositeOp; class KisColorSpace; @@ -28,22 +28,23 @@ class KisColorSpace; class KisDlgLayerProperties : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - KisDlgLayerProperties(const QString& deviceName, - Q_INT32 opacity, + KisDlgLayerProperties(const TQString& deviceName, + TQ_INT32 opacity, const KisCompositeOp& compositeOp, const KisColorSpace * colorSpace, - QWidget *parent = 0, const char *name = 0, WFlags f = 0); + TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); virtual ~KisDlgLayerProperties(); - QString getName() const; - Q_INT32 getOpacity() const; + TQString getName() const; + TQ_INT32 getOpacity() const; KisCompositeOp getCompositeOp() const; protected slots: - void slotNameChanged( const QString & ); + void slotNameChanged( const TQString & ); private: WdgLayerProperties * m_page; diff --git a/krita/ui/kis_dlg_new_layer.cc b/krita/ui/kis_dlg_new_layer.cc index 3cdd58d4..a0a97a7e 100644 --- a/krita/ui/kis_dlg_new_layer.cc +++ b/krita/ui/kis_dlg_new_layer.cc @@ -18,9 +18,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -41,14 +41,14 @@ #include "kis_int_spinbox.h" NewLayerDialog::NewLayerDialog(const KisID colorSpaceID, - const QString & profilename, - const QString & deviceName, - QWidget *parent, + const TQString & profilename, + const TQString & deviceName, + TQWidget *tqparent, const char *name) - : super(parent, name, true, "", Ok | Cancel) + : super(tqparent, name, true, "", Ok | Cancel) { m_page = new WdgLayerProperties(this); - m_page->layout()->setMargin(0); + m_page->tqlayout()->setMargin(0); setCaption(i18n("New Layer")); @@ -64,10 +64,10 @@ NewLayerDialog::NewLayerDialog(const KisID colorSpaceID, // ColorSpace m_page->cmbColorSpaces->setIDList(KisMetaRegistry::instance()->csRegistry()->listKeys()); m_page->cmbColorSpaces->setCurrentText(colorSpaceID.id()); - connect(m_page->cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbProfiles(const KisID &))); - connect(m_page->cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbComposite(const KisID &))); + connect(m_page->cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbProfiles(const KisID &))); + connect(m_page->cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbComposite(const KisID &))); // Init profiles fillCmbProfiles(m_page->cmbColorSpaces->currentItem()); @@ -77,7 +77,7 @@ NewLayerDialog::NewLayerDialog(const KisID colorSpaceID, fillCmbComposite(m_page->cmbColorSpaces->currentItem()); /* - connect( m_page->editName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_page->editName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); slotNameChanged( m_page->editName->text() ); */ @@ -100,8 +100,8 @@ void NewLayerDialog::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); if (csf == 0) return; - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page->cmbProfile->insertItem((*it)->productName()); } @@ -124,7 +124,7 @@ void NewLayerDialog::fillCmbComposite(const KisID & s) int NewLayerDialog::opacity() const { - Q_INT32 opacity = m_page->intOpacity->value(); + TQ_INT32 opacity = m_page->intOpacity->value(); if (!opacity) return 0; @@ -145,12 +145,12 @@ KisID NewLayerDialog::colorSpaceID() const return m_page->cmbColorSpaces->currentItem(); } -QString NewLayerDialog::layerName() const +TQString NewLayerDialog::layerName() const { return m_page->editName->text(); } -QString NewLayerDialog::profileName() const +TQString NewLayerDialog::profileName() const { return m_page->cmbProfile-> currentText(); } diff --git a/krita/ui/kis_dlg_new_layer.h b/krita/ui/kis_dlg_new_layer.h index e250185c..b484e1dc 100644 --- a/krita/ui/kis_dlg_new_layer.h +++ b/krita/ui/kis_dlg_new_layer.h @@ -25,26 +25,27 @@ #include "kis_composite_op.h" #include -class QWidget; +class TQWidget; class KisPaintDevice; class WdgLayerProperties; class NewLayerDialog : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: NewLayerDialog(const KisID colorSpace, - const QString & profilename, - const QString & deviceName, - QWidget *parent = 0, + const TQString & profilename, + const TQString & deviceName, + TQWidget *tqparent = 0, const char *name = 0); - QString layerName() const; + TQString layerName() const; KisCompositeOp compositeOp() const; - Q_INT32 opacity() const; + TQ_INT32 opacity() const; KisID colorSpaceID() const; - QString profileName() const; + TQString profileName() const; void setColorSpaceEnabled(bool enabled); diff --git a/krita/ui/kis_dlg_preferences.cc b/krita/ui/kis_dlg_preferences.cc index 5522bcdf..75ec0593 100644 --- a/krita/ui/kis_dlg_preferences.cc +++ b/krita/ui/kis_dlg_preferences.cc @@ -22,21 +22,21 @@ #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_GL -#include +#include #endif #include @@ -71,13 +71,13 @@ // for the performance update #include "tiles/kis_tilemanager.h" -GeneralTab::GeneralTab( QWidget *_parent, const char *_name ) +GeneralTab::GeneralTab( TQWidget *_parent, const char *_name ) : WdgGeneralSettings( _parent, _name ) { KisConfig cfg; - m_cmbCursorShape->setCurrentItem(cfg.cursorStyle()); + m_cmbtqCursorShape->setCurrentItem(cfg.cursorStyle()); grpDockability->setButton(cfg.dockability()); numDockerFontSize->setValue((int)cfg.dockerFontSize()); } @@ -86,14 +86,14 @@ void GeneralTab::setDefault() { KisConfig cfg; - m_cmbCursorShape->setCurrentItem( cfg.getDefaultCursorStyle()); + m_cmbtqCursorShape->setCurrentItem( cfg.getDefaultCursorStyle()); grpDockability->setButton(cfg.getDefaultDockability()); numDockerFontSize->setValue((int)(cfg.getDefaultDockerFontSize())); } enumCursorStyle GeneralTab::cursorStyle() { - return (enumCursorStyle)m_cmbCursorShape->currentItem(); + return (enumCursorStyle)m_cmbtqCursorShape->currentItem(); } enumKoDockability GeneralTab::dockability() @@ -108,13 +108,13 @@ float GeneralTab::dockerFontSize() //--------------------------------------------------------------------------------------------------- -ColorSettingsTab::ColorSettingsTab(QWidget *parent, const char *name ) - : QWidget(parent, name) +ColorSettingsTab::ColorSettingsTab(TQWidget *tqparent, const char *name ) + : TQWidget(tqparent, name) { // XXX: Make sure only profiles that fit the specified color model // are shown in the profile combos - QGridLayout * l = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout * l = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint()); l->setMargin(0); m_page = new WdgColorSettings(this); l->addWidget( m_page, 0, 0); @@ -130,16 +130,16 @@ ColorSettingsTab::ColorSettingsTab(QWidget *parent, const char *name ) refillMonitorProfiles(KisID("RGBA", "")); refillPrintProfiles(KisID(cfg.printerColorSpace(), "")); - if(m_page->cmbMonitorProfile->contains(cfg.monitorProfile())) + if(m_page->cmbMonitorProfile->tqcontains(cfg.monitorProfile())) m_page->cmbMonitorProfile->setCurrentText(cfg.monitorProfile()); - if(m_page->cmbPrintProfile->contains(cfg.printerProfile())) + if(m_page->cmbPrintProfile->tqcontains(cfg.printerProfile())) m_page->cmbPrintProfile->setCurrentText(cfg.printerProfile()); m_page->chkBlackpoint->setChecked(cfg.useBlackPointCompensation()); m_page->grpPasteBehaviour->setButton(cfg.pasteBehaviour()); m_page->cmbMonitorIntent->setCurrentItem(cfg.renderIntent()); - connect(m_page->cmbPrintingColorSpace, SIGNAL(activated(const KisID &)), - this, SLOT(refillPrintProfiles(const KisID &))); + connect(m_page->cmbPrintingColorSpace, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(refillPrintProfiles(const KisID &))); } void ColorSettingsTab::setDefault() @@ -164,8 +164,8 @@ void ColorSettingsTab::refillMonitorProfiles(const KisID & s) if ( !csf ) return; - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { if ((*it)->deviceClass() == icSigDisplayClass) m_page->cmbMonitorProfile->insertItem((*it)->productName()); @@ -183,8 +183,8 @@ void ColorSettingsTab::refillPrintProfiles(const KisID & s) if ( !csf ) return; - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { if ((*it)->deviceClass() == icSigOutputClass) m_page->cmbPrintProfile->insertItem((*it)->productName()); @@ -195,8 +195,8 @@ void ColorSettingsTab::refillPrintProfiles(const KisID & s) //--------------------------------------------------------------------------------------------------- -PerformanceTab::PerformanceTab(QWidget *parent, const char *name ) - : WdgPerformanceSettings(parent, name) +PerformanceTab::PerformanceTab(TQWidget *tqparent, const char *name ) + : WdgPerformanceSettings(tqparent, name) { // XXX: Make sure only profiles that fit the specified color model // are shown in the profile combos @@ -216,8 +216,8 @@ void PerformanceTab::setDefault() //--------------------------------------------------------------------------------------------------- -TabletSettingsTab::TabletSettingsTab( QWidget *parent, const char *name) - : WdgTabletSettings( parent, name ) +TabletSettingsTab::TabletSettingsTab( TQWidget *tqparent, const char *name) + : WdgTabletSettings( tqparent, name ) { #ifdef EXTENDED_X11_TABLET_SUPPORT initTabletDevices(); @@ -240,9 +240,9 @@ void TabletSettingsTab::applySettings() #ifdef EXTENDED_X11_TABLET_SUPPORT TabletSettingsTab::DeviceSettings::DeviceSettings(KisCanvasWidget::X11TabletDevice *tabletDevice, bool enabled, - Q_INT32 xAxis, Q_INT32 yAxis, Q_INT32 pressureAxis, - Q_INT32 xTiltAxis, Q_INT32 yTiltAxis, Q_INT32 wheelAxis, - Q_INT32 toolIDAxis, Q_INT32 serialNumberAxis) + TQ_INT32 xAxis, TQ_INT32 yAxis, TQ_INT32 pressureAxis, + TQ_INT32 xTiltAxis, TQ_INT32 yTiltAxis, TQ_INT32 wheelAxis, + TQ_INT32 toolIDAxis, TQ_INT32 serialNumberAxis) : m_tabletDevice(tabletDevice), m_enabled(enabled), m_xAxis(xAxis), @@ -294,104 +294,104 @@ bool TabletSettingsTab::DeviceSettings::enabled() const return m_enabled; } -Q_INT32 TabletSettingsTab::DeviceSettings::numAxes() const +TQ_INT32 TabletSettingsTab::DeviceSettings::numAxes() const { return m_tabletDevice->numAxes(); } -void TabletSettingsTab::DeviceSettings::setXAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setXAxis(TQ_INT32 axis) { m_xAxis = axis; } -void TabletSettingsTab::DeviceSettings::setYAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setYAxis(TQ_INT32 axis) { m_yAxis = axis; } -void TabletSettingsTab::DeviceSettings::setPressureAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setPressureAxis(TQ_INT32 axis) { m_pressureAxis = axis; } -void TabletSettingsTab::DeviceSettings::setXTiltAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setXTiltAxis(TQ_INT32 axis) { m_xTiltAxis = axis; } -void TabletSettingsTab::DeviceSettings::setYTiltAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setYTiltAxis(TQ_INT32 axis) { m_yTiltAxis = axis; } -void TabletSettingsTab::DeviceSettings::setWheelAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setWheelAxis(TQ_INT32 axis) { m_wheelAxis = axis; } -void TabletSettingsTab::DeviceSettings::setToolIDAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setToolIDAxis(TQ_INT32 axis) { m_toolIDAxis = axis; } -void TabletSettingsTab::DeviceSettings::setSerialNumberAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setSerialNumberAxis(TQ_INT32 axis) { m_serialNumberAxis = axis; } -Q_INT32 TabletSettingsTab::DeviceSettings::xAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::xAxis() const { return m_xAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::yAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::yAxis() const { return m_yAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::pressureAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::pressureAxis() const { return m_pressureAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::xTiltAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::xTiltAxis() const { return m_xTiltAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::yTiltAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::yTiltAxis() const { return m_yTiltAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::wheelAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::wheelAxis() const { return m_wheelAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::toolIDAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::toolIDAxis() const { return m_toolIDAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::serialNumberAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::serialNumberAxis() const { return m_serialNumberAxis; } -TabletSettingsTab::TabletDeviceSettingsDialog::TabletDeviceSettingsDialog(const QString& deviceName, DeviceSettings settings, - QWidget *parent, const char *name) - : super(parent, name, true, "", Ok | Cancel) +TabletSettingsTab::TabletDeviceSettingsDialog::TabletDeviceSettingsDialog(const TQString& deviceName, DeviceSettings settings, + TQWidget *tqparent, const char *name) + : super(tqparent, name, true, "", Ok | Cancel) { - setCaption(i18n("Configure %1").arg(deviceName)); + setCaption(i18n("Configure %1").tqarg(deviceName)); m_page = new WdgTabletDeviceSettings(this); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - for (Q_INT32 axis = 0; axis < settings.numAxes(); axis++) { - QString axisString; + for (TQ_INT32 axis = 0; axis < settings.numAxes(); axis++) { + TQString axisString; axisString.setNum(axis); @@ -472,7 +472,7 @@ TabletSettingsTab::TabletDeviceSettingsDialog::~TabletDeviceSettingsDialog() TabletSettingsTab::DeviceSettings TabletSettingsTab::TabletDeviceSettingsDialog::settings() { - const Q_INT32 noAxis = m_settings.numAxes(); + const TQ_INT32 noAxis = m_settings.numAxes(); if (m_page->cbX->currentItem() != noAxis ) { m_settings.setXAxis(m_page->cbX->currentItem()); @@ -527,9 +527,9 @@ TabletSettingsTab::DeviceSettings TabletSettingsTab::TabletDeviceSettingsDialog: void TabletSettingsTab::initTabletDevices() { - connect(cbTabletDevice, SIGNAL(activated(int)), SLOT(slotActivateDevice(int))); - connect(chkEnableTabletDevice, SIGNAL(toggled(bool)), SLOT(slotSetDeviceEnabled(bool))); - connect(btnConfigureTabletDevice, SIGNAL(clicked()), SLOT(slotConfigureDevice())); + connect(cbTabletDevice, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivateDevice(int))); + connect(chkEnableTabletDevice, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetDeviceEnabled(bool))); + connect(btnConfigureTabletDevice, TQT_SIGNAL(clicked()), TQT_SLOT(slotConfigureDevice())); KisCanvasWidget::X11XIDTabletDeviceMap& tabletDevices = KisCanvasWidget::tabletDeviceMap(); @@ -574,7 +574,7 @@ void TabletSettingsTab::slotConfigureDevice() TabletDeviceSettingsDialog dialog(cbTabletDevice->currentText(), m_deviceSettings[cbTabletDevice->currentItem()], this, "TabletDeviceSettings"); - if (dialog.exec() == QDialog::Accepted) + if (dialog.exec() == TQDialog::Accepted) { m_deviceSettings[cbTabletDevice->currentItem()] = dialog.settings(); } @@ -582,14 +582,14 @@ void TabletSettingsTab::slotConfigureDevice() void TabletSettingsTab::applyTabletDeviceSettings() { - for (Q_UINT32 deviceIndex = 0; deviceIndex < m_deviceSettings.count(); ++deviceIndex) { + for (TQ_UINT32 deviceIndex = 0; deviceIndex < m_deviceSettings.count(); ++deviceIndex) { m_deviceSettings[deviceIndex].applySettings(); } } #else // EXTENDED_X11_TABLET_SUPPORT -// Fix compilation. moc seems to not see the undefined symbol needed +// Fix compilation. tqmoc seems to not see the undefined symbol needed // for these slots to be declared. void TabletSettingsTab::slotActivateDevice(int /*deviceIndex*/) { @@ -611,13 +611,13 @@ void TabletSettingsTab::applyTabletDeviceSettings() //--------------------------------------------------------------------------------------------------- -DisplaySettingsTab::DisplaySettingsTab( QWidget *parent, const char *name) - : WdgDisplaySettings( parent, name ) +DisplaySettingsTab::DisplaySettingsTab( TQWidget *tqparent, const char *name) + : WdgDisplaySettings( tqparent, name ) { #ifdef HAVE_GL KisConfig cfg; - if (!QGLFormat::hasOpenGL()) { + if (!TQGLFormat::hasOpenGL()) { cbUseOpenGL->setEnabled(false); //cbUseOpenGLShaders->setEnabled(false); } else { @@ -630,7 +630,7 @@ DisplaySettingsTab::DisplaySettingsTab( QWidget *parent, const char *name) //cbUseOpenGLShaders->setEnabled(false); #endif - connect(cbUseOpenGL, SIGNAL(toggled(bool)), SLOT(slotUseOpenGLToggled(bool))); + connect(cbUseOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUseOpenGLToggled(bool))); } void DisplaySettingsTab::setDefault() @@ -646,15 +646,15 @@ void DisplaySettingsTab::slotUseOpenGLToggled(bool /*isChecked*/) } //--------------------------------------------------------------------------------------------------- -GridSettingsTab::GridSettingsTab(QWidget* parent) : WdgGridSettingsBase(parent) +GridSettingsTab::GridSettingsTab(TQWidget* tqparent) : WdgGridSettingsBase(tqparent) { KisConfig cfg; selectMainStyle->setCurrentItem(cfg.getGridMainStyle()); selectSubdivisionStyle->setCurrentItem(cfg.getGridSubdivisionStyle()); #if KDE_IS_VERSION(3,4,0) - colorMain->setDefaultColor( QColor( 99, 99, 99 ) ); - colorSubdivision->setDefaultColor( QColor( 200, 200, 200 ) ); + colorMain->setDefaultColor( TQColor( 99, 99, 99 ) ); + colorSubdivision->setDefaultColor( TQColor( 200, 200, 200 ) ); #endif colorMain->setColor(cfg.getGridMainColor()); colorSubdivision->setColor(cfg.getGridSubdivisionColor()); @@ -666,10 +666,10 @@ GridSettingsTab::GridSettingsTab(QWidget* parent) : WdgGridSettingsBase(parent) intOffsetY->setValue( cfg.getGridOffsetY()); linkSpacingToggled(true); - connect(bnLinkSpacing, SIGNAL(toggled(bool)), this, SLOT(linkSpacingToggled( bool ))); + connect(bnLinkSpacing, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(linkSpacingToggled( bool ))); - connect(intHSpacing, SIGNAL(valueChanged(int)),this,SLOT(spinBoxHSpacingChanged(int))); - connect(intVSpacing, SIGNAL(valueChanged(int)),this,SLOT(spinBoxVSpacingChanged(int))); + connect(intHSpacing, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHSpacingChanged(int))); + connect(intVSpacing, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxVSpacingChanged(int))); } @@ -680,8 +680,8 @@ void GridSettingsTab::setDefault() selectMainStyle->setCurrentItem(0); selectSubdivisionStyle->setCurrentItem(1); - colorMain->setColor(QColor(99,99,99)); - colorSubdivision->setColor(QColor(199,199,199)); + colorMain->setColor(TQColor(99,99,99)); + colorSubdivision->setColor(TQColor(199,199,199)); intHSpacing->setValue( 10 ); intVSpacing->setValue( 10 ); @@ -723,10 +723,10 @@ void GridSettingsTab::linkSpacingToggled(bool b) //--------------------------------------------------------------------------------------------------- -PreferencesDialog::PreferencesDialog( QWidget* parent, const char* name ) - : KDialogBase( IconList, i18n("Preferences"), Ok | Cancel | Help | Default /*| Apply*/, Ok, parent, name, true, true ) +PreferencesDialog::PreferencesDialog( TQWidget* tqparent, const char* name ) + : KDialogBase( IconList, i18n("Preferences"), Ok | Cancel | Help | Default /*| Apply*/, Ok, tqparent, name, true, true ) { - QVBox *vbox; + TQVBox *vbox; vbox = addVBoxPage( i18n( "General"), i18n( "General"), BarIcon( "misc", KIcon::SizeMedium )); m_general = new GeneralTab( vbox ); diff --git a/krita/ui/kis_dlg_preferences.h b/krita/ui/kis_dlg_preferences.h index 2d79826b..3869fe9e 100644 --- a/krita/ui/kis_dlg_preferences.h +++ b/krita/ui/kis_dlg_preferences.h @@ -21,7 +21,7 @@ #ifndef __preferencesdlg_h__ #define __preferencesdlg_h__ -#include +#include #include @@ -36,8 +36,8 @@ #include "wdgdisplaysettings.h" #include "wdggridsettings.h" -class QLineEdit; -class QCheckBox; +class TQLineEdit; +class TQCheckBox; class KURLRequester; class WdgColorSettings; class KisCmbIDList; @@ -49,10 +49,11 @@ class KisID; class GeneralTab : public WdgGeneralSettings { Q_OBJECT + TQ_OBJECT public: - GeneralTab( QWidget *parent = 0, const char *name = 0 ); + GeneralTab( TQWidget *tqparent = 0, const char *name = 0 ); enumCursorStyle cursorStyle(); enumKoDockability dockability(); @@ -64,13 +65,14 @@ public: //======================= -class ColorSettingsTab : public QWidget +class ColorSettingsTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ColorSettingsTab( QWidget *parent = 0, const char * name = 0 ); + ColorSettingsTab( TQWidget *tqparent = 0, const char * name = 0 ); private slots: @@ -89,9 +91,10 @@ public: class PerformanceTab : public WdgPerformanceSettings { Q_OBJECT + TQ_OBJECT public: - PerformanceTab( QWidget *parent = 0, const char *name = 0 ); + PerformanceTab( TQWidget *tqparent = 0, const char *name = 0 ); public: void setDefault(); @@ -106,9 +109,10 @@ public: class TabletSettingsTab : public WdgTabletSettings { Q_OBJECT + TQ_OBJECT public: - TabletSettingsTab( QWidget *parent = 0, const char *name = 0 ); + TabletSettingsTab( TQWidget *tqparent = 0, const char *name = 0 ); public: void setDefault(); @@ -126,9 +130,9 @@ private: class DeviceSettings { public: DeviceSettings(KisCanvasWidget::X11TabletDevice *tabletDevice, bool enabled, - Q_INT32 xAxis, Q_INT32 yAxis, Q_INT32 pressureAxis, - Q_INT32 xTiltAxis, Q_INT32 yTiltAxis, Q_INT32 wheelAxis, - Q_INT32 toolIDAxis, Q_INT32 serialNumberAxis); + TQ_INT32 xAxis, TQ_INT32 yAxis, TQ_INT32 pressureAxis, + TQ_INT32 xTiltAxis, TQ_INT32 yTiltAxis, TQ_INT32 wheelAxis, + TQ_INT32 toolIDAxis, TQ_INT32 serialNumberAxis); DeviceSettings(); void applySettings(); @@ -136,47 +140,47 @@ private: void setEnabled(bool enabled); bool enabled() const; - Q_INT32 numAxes() const; - - void setXAxis(Q_INT32 axis); - void setYAxis(Q_INT32 axis); - void setPressureAxis(Q_INT32 axis); - void setXTiltAxis(Q_INT32 axis); - void setYTiltAxis(Q_INT32 axis); - void setWheelAxis(Q_INT32 axis); - void setToolIDAxis(Q_INT32 axis); - void setSerialNumberAxis(Q_INT32 axis); + TQ_INT32 numAxes() const; + + void setXAxis(TQ_INT32 axis); + void setYAxis(TQ_INT32 axis); + void setPressureAxis(TQ_INT32 axis); + void setXTiltAxis(TQ_INT32 axis); + void setYTiltAxis(TQ_INT32 axis); + void setWheelAxis(TQ_INT32 axis); + void setToolIDAxis(TQ_INT32 axis); + void setSerialNumberAxis(TQ_INT32 axis); - Q_INT32 xAxis() const; - Q_INT32 yAxis() const; - Q_INT32 pressureAxis() const; - Q_INT32 xTiltAxis() const; - Q_INT32 yTiltAxis() const; - Q_INT32 wheelAxis() const; - Q_INT32 toolIDAxis() const; - Q_INT32 serialNumberAxis() const; + TQ_INT32 xAxis() const; + TQ_INT32 yAxis() const; + TQ_INT32 pressureAxis() const; + TQ_INT32 xTiltAxis() const; + TQ_INT32 yTiltAxis() const; + TQ_INT32 wheelAxis() const; + TQ_INT32 toolIDAxis() const; + TQ_INT32 serialNumberAxis() const; private: KisCanvasWidget::X11TabletDevice *m_tabletDevice; bool m_enabled; - Q_INT32 m_xAxis; - Q_INT32 m_yAxis; - Q_INT32 m_pressureAxis; - Q_INT32 m_xTiltAxis; - Q_INT32 m_yTiltAxis; - Q_INT32 m_wheelAxis; - Q_INT32 m_toolIDAxis; - Q_INT32 m_serialNumberAxis; + TQ_INT32 m_xAxis; + TQ_INT32 m_yAxis; + TQ_INT32 m_pressureAxis; + TQ_INT32 m_xTiltAxis; + TQ_INT32 m_yTiltAxis; + TQ_INT32 m_wheelAxis; + TQ_INT32 m_toolIDAxis; + TQ_INT32 m_serialNumberAxis; }; class TabletDeviceSettingsDialog : public KDialogBase { typedef KDialogBase super; public: - TabletDeviceSettingsDialog(const QString& deviceName, + TabletDeviceSettingsDialog(const TQString& deviceName, DeviceSettings settings, - QWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); virtual ~TabletDeviceSettingsDialog(); @@ -189,7 +193,7 @@ private: void initTabletDevices(); - QValueVector m_deviceSettings; + TQValueVector m_deviceSettings; #endif }; @@ -202,9 +206,10 @@ private: class DisplaySettingsTab : public WdgDisplaySettings { Q_OBJECT + TQ_OBJECT public: - DisplaySettingsTab( QWidget *parent = 0, const char *name = 0 ); + DisplaySettingsTab( TQWidget *tqparent = 0, const char *name = 0 ); public: void setDefault(); @@ -220,8 +225,9 @@ protected slots: */ class GridSettingsTab : public WdgGridSettingsBase { Q_OBJECT + TQ_OBJECT public: - GridSettingsTab(QWidget* parent); + GridSettingsTab(TQWidget* tqparent); public: void setDefault(); private slots: @@ -241,6 +247,7 @@ class GridSettingsTab : public WdgGridSettingsBase { class PreferencesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: @@ -249,7 +256,7 @@ public: protected: - PreferencesDialog( QWidget *parent = 0, const char *name = 0 ); + PreferencesDialog( TQWidget *tqparent = 0, const char *name = 0 ); ~PreferencesDialog(); protected: diff --git a/krita/ui/kis_doc.cc b/krita/ui/kis_doc.cc index 7ae27bde..2a7d1300 100644 --- a/krita/ui/kis_doc.cc +++ b/krita/ui/kis_doc.cc @@ -19,15 +19,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// Qt -#include -#include -#include -#include -#include -#include -#include -#include +// TQt +#include +#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -103,8 +103,8 @@ namespace { public: KisCommandImageMv(KisDoc *doc, KisUndoAdapter *adapter, - const QString& name, - const QString& oldName) : super(i18n("Rename Image"), adapter) + const TQString& name, + const TQString& oldName) : super(i18n("Rename Image"), adapter) { m_doc = doc; m_name = name; @@ -131,14 +131,14 @@ namespace { private: KisDoc *m_doc; - QString m_name; - QString m_oldName; + TQString m_name; + TQString m_oldName; }; } -KisDoc::KisDoc(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, bool singleViewMode) : - super(parentWidget, widgetName, parent, name, singleViewMode) +KisDoc::KisDoc(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, bool singleViewMode) : + super(tqparentWidget, widgetName, tqparent, name, singleViewMode) { m_undo = false; @@ -168,7 +168,7 @@ KisDoc::~KisDoc() delete m_dcop; } -QCString KisDoc::mimeType() const +TQCString KisDoc::mimeType() const { return APP_MIMETYPE; } @@ -182,14 +182,14 @@ DCOPObject *KisDoc::dcopObject() return m_dcop; } -bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) +bool KisDoc::initDoc(InitDocFlags flags, TQWidget* tqparentWidget) { if (!init()) return false; bool ok = false; - QString file; + TQString file; KoTemplateChooseDia::DialogType dlgtype; if (flags != KoDocument::InitDocFileNew) { @@ -203,7 +203,7 @@ bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) file, dlgtype, "krita_template", - parentWidget); + tqparentWidget); setUndo(false); if (ret == KoTemplateChooseDia::Template) { @@ -227,7 +227,7 @@ bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) return ok; } -void KisDoc::openExistingFile(const QString& file) +void KisDoc::openExistingFile(const TQString& file) { setUndo(false); @@ -236,7 +236,7 @@ void KisDoc::openExistingFile(const QString& file) setUndo(true); } -void KisDoc::openTemplate(const QString& file) +void KisDoc::openTemplate(const TQString& file) { setUndo(false); @@ -260,8 +260,8 @@ bool KisDoc::init() m_cmdHistory = new KoCommandHistory(actionCollection(), true); Q_CHECK_PTR(m_cmdHistory); - connect(m_cmdHistory, SIGNAL(documentRestored()), this, SLOT(slotDocumentRestored())); - connect(m_cmdHistory, SIGNAL(commandExecuted(KCommand *)), this, SLOT(slotCommandExecuted(KCommand *))); + connect(m_cmdHistory, TQT_SIGNAL(documentRestored()), this, TQT_SLOT(slotDocumentRestored())); + connect(m_cmdHistory, TQT_SIGNAL(commandExecuted(KCommand *)), this, TQT_SLOT(slotCommandExecuted(KCommand *))); setUndo(true); m_nserver = new KisNameServer(i18n("Image %1"), 1); @@ -277,13 +277,13 @@ bool KisDoc::init() return true; } -QDomDocument KisDoc::saveXML() +TQDomDocument KisDoc::saveXML() { - QDomDocument doc = createDomDocument("DOC", CURRENT_DTD_VERSION); - QDomElement root = doc.documentElement(); + TQDomDocument doc = createDomDocument("DOC", CURRENT_DTD_VERSION); + TQDomElement root = doc.documentElement(); root.setAttribute("editor", "Krita"); - root.setAttribute("depth", sizeof(Q_UINT8)); + root.setAttribute("depth", sizeof(TQ_UINT8)); root.setAttribute("syntaxVersion", "1"); root.appendChild(saveImage(doc, m_currentImage)); @@ -291,7 +291,7 @@ QDomDocument KisDoc::saveXML() return doc; } -bool KisDoc::loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* ) +bool KisDoc::loadOasis( const TQDomDocument&, KoOasisStyles&, const TQDomDocument&, KoStore* ) { //XXX: todo (and that includes defining an OASIS format for layered 2D raster data!) return false; @@ -304,11 +304,11 @@ bool KisDoc::saveOasis( KoStore*, KoXmlWriter* ) return false; } -bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) +bool KisDoc::loadXML(TQIODevice *, const TQDomDocument& doc) { - QDomElement root; - QString attr; - QDomNode node; + TQDomElement root; + TQString attr; + TQDomNode node; KisImageSP img; if (!init()) @@ -332,7 +332,7 @@ bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) for (node = root.firstChild(); !node.isNull(); node = node.nextSibling()) { if (node.isElement()) { if (node.nodeName() == "IMAGE") { - QDomElement elem = node.toElement(); + TQDomElement elem = node.toElement(); if (!(img = loadImage(elem))) return false; m_currentImage = img; @@ -347,7 +347,7 @@ bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) } bool KisDoc::loadChildren(KoStore* store) { - QPtrListIterator it(children()); + TQPtrListIterator it(tqchildren()); for( ; it.current(); ++it ) { if (!it.current()->loadDocument(store)) { return false; @@ -356,9 +356,9 @@ bool KisDoc::loadChildren(KoStore* store) { return true; } -QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) +TQDomElement KisDoc::saveImage(TQDomDocument& doc, KisImageSP img) { - QDomElement image = doc.createElement("IMAGE"); + TQDomElement image = doc.createElement("IMAGE"); Q_ASSERT(img); image.setAttribute("name", img->name()); @@ -373,7 +373,7 @@ QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) image.setAttribute("x-res", img->xRes()); image.setAttribute("y-res", img->yRes()); - Q_UINT32 count=0; + TQ_UINT32 count=0; KisSaveXmlVisitor visitor(doc, image, count, true); m_currentImage->rootLayer()->accept(visitor); @@ -381,22 +381,22 @@ QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) return image; } -KisImageSP KisDoc::loadImage(const QDomElement& element) +KisImageSP KisDoc::loadImage(const TQDomElement& element) { KisConfig cfg; - QString attr; - QDomNode node; - QDomNode child; + TQString attr; + TQDomNode node; + TQDomNode child; KisImageSP img; - QString name; - Q_INT32 width; - Q_INT32 height; - QString description; - QString profileProductName; + TQString name; + TQ_INT32 width; + TQ_INT32 height; + TQString description; + TQString profileProductName; double xres; double yres; - QString colorspacename; + TQString colorspacename; KisColorSpace * cs; if ((attr = element.attribute("mime")) == NATIVE_MIMETYPE) { @@ -447,7 +447,7 @@ KisImageSP KisDoc::loadImage(const QDomElement& element) img = new KisImage(this, width, height, cs, name); img->blockSignals(true); // Don't send out signals while we're building the image Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); img->setDescription(description); img->setResolution(xres, yres); @@ -460,10 +460,10 @@ KisImageSP KisDoc::loadImage(const QDomElement& element) return img; } -void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLayerSP parent) +void KisDoc::loadLayers(const TQDomElement& element, KisImageSP img, KisGroupLayerSP tqparent) { - QDomNode node = element.firstChild(); - QDomNode child; + TQDomNode node = element.firstChild(); + TQDomNode child; if(!node.isNull()) { @@ -477,7 +477,7 @@ void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLaye } else { img->nextLayerName(); // Make sure the nameserver is current with the number of layers. - img->addLayer(layer, parent, 0); + img->addLayer(layer, tqparent, 0); } } } @@ -485,17 +485,17 @@ void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLaye } } -KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) +KisLayerSP KisDoc::loadLayer(const TQDomElement& element, KisImageSP img) { // Nota bene: If you add new properties to layers, you should // ALWAYS define a default value in case the property is not // present in the layer definition: this helps a LOT with backward // compatibilty. - QString attr; - QString name; - Q_INT32 x; - Q_INT32 y; - Q_INT32 opacity; + TQString attr; + TQString name; + TQ_INT32 x; + TQ_INT32 y; + TQ_INT32 opacity; bool visible; bool locked; @@ -514,11 +514,11 @@ KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) if ((attr = element.attribute("opacity")).isNull()) return 0; - if ((opacity = attr.toInt()) < 0 || opacity > Q_UINT8_MAX) + if ((opacity = attr.toInt()) < 0 || opacity > TQ_UINT8_MAX) opacity = OPACITY_OPAQUE; - QString compositeOpName = element.attribute("compositeop"); + TQString compositeOpName = element.attribute("compositeop"); KisCompositeOp compositeOp; if (compositeOpName.isNull()) { @@ -562,16 +562,16 @@ KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) } -KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, - Q_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) +KisLayerSP KisDoc::loadPaintLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, + TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisPaintLayerSP layer; KisColorSpace * cs; - QString colorspacename; - QString profileProductName; + TQString colorspacename; + TQString profileProductName; if ((colorspacename = element.attribute("colorspacename")).isNull()) cs = img->colorSpace(); @@ -591,21 +591,21 @@ KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, if ((element.attribute("filename")).isNull()) m_layerFilenames[layer.data()] = name; else - m_layerFilenames[layer.data()] = QString(element.attribute("filename")); + m_layerFilenames[layer.data()] = TQString(element.attribute("filename")); - if ((attr = element.attribute("hasmask")).isNull()) + if ((attr = element.attribute("hastqmask")).isNull()) attr = "0"; if (attr == "1") { - // We add a mask, but we'll fill in the actual mask later in completeLoading with the visitor + // We add a tqmask, but we'll fill in the actual tqmask later in completeLoading with the visitor layer->createMask(); } // Load exif info - for( QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if ( !e.isNull() && e.tagName() == "ExifInfo" ) { layer->paintDevice()->exifInfo()->load(e); @@ -614,11 +614,11 @@ KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, return layer.data(); } -KisGroupLayerSP KisDoc::loadGroupLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, +KisGroupLayerSP KisDoc::loadGroupLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisGroupLayerSP layer; layer = new KisGroupLayer(img, name, opacity); @@ -635,13 +635,13 @@ KisGroupLayerSP KisDoc::loadGroupLayer(const QDomElement& element, KisImageSP im return layer; } -KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, +KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisAdjustmentLayerSP layer; - QString filtername; + TQString filtername; if ((filtername = element.attribute("filtername")).isNull()) { // XXX: Invalid adjustmentlayer! We should warn about it! @@ -671,18 +671,18 @@ KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const QDomElement& element, Kis if ((element.attribute("filename")).isNull()) m_layerFilenames[layer.data()] = name; else - m_layerFilenames[layer.data()] = QString(element.attribute("filename")); + m_layerFilenames[layer.data()] = TQString(element.attribute("filename")); return layer; } -KisPartLayerSP KisDoc::loadPartLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 /*x*/, Q_INT32 /*y*/, Q_INT32 opacity, +KisPartLayerSP KisDoc::loadPartLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 /*x*/, TQ_INT32 /*y*/, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { KisChildDoc* child = new KisChildDoc(this); - QString filename(element.attribute("filename")); - QDomElement partElement = element.namedItem("object").toElement(); + TQString filename(element.attribute("filename")); + TQDomElement partElement = element.namedItem("object").toElement(); if (partElement.isNull()) { kdWarning() << "loadPartLayer failed with partElement isNull" << endl; @@ -706,10 +706,10 @@ KisPartLayerSP KisDoc::loadPartLayer(const QDomElement& element, KisImageSP img, bool KisDoc::completeSaving(KoStore *store) { - QString uri = url().url(); - QString location; + TQString uri = url().url(); + TQString location; bool external = isStoredExtern(); - Q_INT32 totalSteps = 0; + TQ_INT32 totalSteps = 0; if (!m_currentImage) return false; @@ -719,7 +719,7 @@ bool KisDoc::completeSaving(KoStore *store) setIOSteps(totalSteps + 1); // Save the layers data - Q_UINT32 count=0; + TQ_UINT32 count=0; KisSaveVisitor visitor(m_currentImage, store, count); if(external) @@ -733,7 +733,7 @@ bool KisDoc::completeSaving(KoStore *store) // e.g. have tags or so. KisAnnotationSP annotation = (m_currentImage)->annotation("exif"); if (annotation) { - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/exif"; if (store->open(location)) { store->write(annotation->annotation()); @@ -744,7 +744,7 @@ bool KisDoc::completeSaving(KoStore *store) annotation = m_currentImage->getProfile()->annotation(); if (annotation) { - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += m_currentImage->name() + "/annotations/icc"; if (store->open(location)) { store->write(annotation->annotation()); @@ -759,10 +759,10 @@ bool KisDoc::completeSaving(KoStore *store) bool KisDoc::completeLoading(KoStore *store) { - QString uri = url().url(); - QString location; + TQString uri = url().url(); + TQString location; bool external = isStoredExtern(); - Q_INT32 totalSteps = 0; + TQ_INT32 totalSteps = 0; totalSteps = (m_currentImage)->nlayers(); @@ -778,20 +778,20 @@ bool KisDoc::completeLoading(KoStore *store) // annotations // exif - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/exif"; if (store->hasFile(location)) { - QByteArray data; + TQByteArray data; store->open(location); data = store->read(store->size()); store->close(); (m_currentImage)->addAnnotation(new KisAnnotation("exif", "", data)); } // icc profile - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/icc"; if (store->hasFile(location)) { - QByteArray data; + TQByteArray data; store->open(location); data = store->read(store->size()); store->close(); @@ -805,7 +805,7 @@ bool KisDoc::completeLoading(KoStore *store) return true; } -QWidget* KisDoc::createCustomDocumentWidget(QWidget *parent) +TQWidget* KisDoc::createCustomDocumentWidget(TQWidget *tqparent) { KisConfig cfg; @@ -813,16 +813,16 @@ QWidget* KisDoc::createCustomDocumentWidget(QWidget *parent) int w = cfg.defImgWidth(); int h = cfg.defImgHeight(); - QSize sz = KisClipboard::instance()->clipSize(); + TQSize sz = KisClipboard::instance()->clipSize(); if (sz.isValid() && sz.width() != 0 && sz.height() != 0) { w = sz.width(); h = sz.height(); } - return new KisCustomImageWidget(parent, this, w, h, cfg.defImgResolution(), cfg.workingColorSpace(),"unnamed"); + return new KisCustomImageWidget(tqparent, this, w, h, cfg.defImgResolution(), cfg.workingColorSpace(),"unnamed"); } -KoDocument* KisDoc::hitTest(const QPoint &pos, const QWMatrix& matrix) { +KoDocument* KisDoc::hitTest(const TQPoint &pos, const TQWMatrix& matrix) { KoDocument* doc = super::hitTest(pos, matrix); if (doc && doc != this) { // We hit a child document. We will only acknowledge we hit it, if the hit child @@ -841,7 +841,7 @@ KoDocument* KisDoc::hitTest(const QPoint &pos, const QWMatrix& matrix) { return doc; } -void KisDoc::renameImage(const QString& oldName, const QString& newName) +void KisDoc::renameImage(const TQString& oldName, const TQString& newName) { (m_currentImage)->setName(newName); @@ -850,7 +850,7 @@ void KisDoc::renameImage(const QString& oldName, const QString& newName) } -KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * colorstrategy) +KisImageSP KisDoc::newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorstrategy) { if (!init()) return 0; @@ -859,7 +859,7 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisImageSP img = new KisImage(this, width, height, colorstrategy, name); Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); KisPaintLayer *layer = new KisPaintLayer(img, img->nextLayerName(), OPACITY_OPAQUE,colorstrategy); Q_CHECK_PTR(layer); @@ -868,7 +868,7 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisFillPainter painter; painter.begin(layer->paintDevice()); - painter.fillRect(0, 0, width, height, KisColor(Qt::white, cs), OPACITY_OPAQUE); + painter.fillRect(0, 0, width, height, KisColor(TQt::white, cs), OPACITY_OPAQUE); painter.end(); img->addLayer(layer, img->rootLayer(), 0); @@ -881,14 +881,14 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, return img; } -bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const QString &imgDescription, const double imgResolution) +bool KisDoc::newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const TQString &imgDescription, const double imgResolution) { if (!init()) return false; KisConfig cfg; - Q_UINT8 opacity = OPACITY_OPAQUE;//bgColor.getAlpha(); + TQ_UINT8 opacity = OPACITY_OPAQUE;//bgColor.getAlpha(); KisImageSP img; KisPaintLayer *layer; @@ -898,7 +898,7 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol img = new KisImage(this, width, height, cs, name); Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); img->setResolution(imgResolution, imgResolution); img->setDescription(imgDescription); img->setProfile(cs->getProfile()); @@ -911,7 +911,7 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol painter.fillRect(0, 0, width, height, bgColor, opacity); painter.end(); - QValueVector actions = KisMetaRegistry::instance() -> + TQValueVector actions = KisMetaRegistry::instance() -> csRegistry()->paintDeviceActionsFor(cs); for (uint i = 0; i < actions.count(); i++) actions.at(i)->act(layer->paintDevice(), img->width(), img->height()); @@ -931,21 +931,21 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol return true; } -KoView* KisDoc::createViewInstance(QWidget* parent, const char *name) +KoView* KisDoc::createViewInstance(TQWidget* tqparent, const char *name) { - KisView * v = new KisView(this, this, parent, name); + KisView * v = new KisView(this, this, tqparent, name); Q_CHECK_PTR(v); return v; } -void KisDoc::paintContent(QPainter& painter, const QRect& rc, bool transparent, double zoomX, double zoomY) +void KisDoc::paintContent(TQPainter& painter, const TQRect& rc, bool transparent, double zoomX, double zoomY) { KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); KisProfile * profile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); painter.scale(zoomX, zoomY); - QRect rect = rc & m_currentImage->bounds(); + TQRect rect = rc & m_currentImage->bounds(); KisImage::PaintFlags paintFlags; if (transparent) { paintFlags = KisImage::PAINT_SELECTION; @@ -964,12 +964,12 @@ void KisDoc::slotImageUpdated() setModified(true); } -void KisDoc::slotImageUpdated(const QRect& rect) +void KisDoc::slotImageUpdated(const TQRect& rect) { emit docUpdated(rect); } -void KisDoc::beginMacro(const QString& macroName) +void KisDoc::beginMacro(const TQString& macroName) { if (m_undo) { if (m_macroNestDepth == 0) { @@ -1002,7 +1002,7 @@ void KisDoc::endMacro() void KisDoc::setCommandHistoryListener(const KisCommandHistoryListener * l) { - // Never have more than one instance of a listener around. Qt should prove a Set class for this... + // Never have more than one instance of a listener around. TQt should prove a Set class for this... m_undoListeners.removeRef(l); m_undoListeners.append(l); } @@ -1051,22 +1051,22 @@ void KisDoc::setUndo(bool undo) } } -Q_INT32 KisDoc::undoLimit() const +TQ_INT32 KisDoc::undoLimit() const { return m_cmdHistory->undoLimit(); } -void KisDoc::setUndoLimit(Q_INT32 limit) +void KisDoc::setUndoLimit(TQ_INT32 limit) { m_cmdHistory->setUndoLimit(limit); } -Q_INT32 KisDoc::redoLimit() const +TQ_INT32 KisDoc::redoLimit() const { return m_cmdHistory->redoLimit(); } -void KisDoc::setRedoLimit(Q_INT32 limit) +void KisDoc::setRedoLimit(TQ_INT32 limit) { m_cmdHistory->setRedoLimit(limit); } @@ -1089,9 +1089,9 @@ void KisDoc::slotCommandExecuted(KCommand *command) } -void KisDoc::slotUpdate(KisImageSP, Q_UINT32 x, Q_UINT32 y, Q_UINT32 w, Q_UINT32 h) +void KisDoc::slotUpdate(KisImageSP, TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 w, TQ_UINT32 h) { - QRect rc(x, y, w, h); + TQRect rc(x, y, w, h); emit docUpdated(rc); } @@ -1101,7 +1101,7 @@ bool KisDoc::undo() const return m_undo; } -void KisDoc::setIOSteps(Q_INT32 nsteps) +void KisDoc::setIOSteps(TQ_INT32 nsteps) { m_ioProgressTotalSteps = nsteps * 100; m_ioProgressBase = 0; @@ -1118,7 +1118,7 @@ void KisDoc::IODone() emitProgress(-1); } -void KisDoc::slotIOProgress(Q_INT8 percentage) +void KisDoc::slotIOProgress(TQ_INT8 percentage) { KApplication *app = KApplication::kApplication(); @@ -1132,7 +1132,7 @@ void KisDoc::slotIOProgress(Q_INT8 percentage) emitProgress(totalPercentage); } -KisChildDoc * KisDoc::createChildDoc( const QRect & rect, KoDocument* childDoc ) +KisChildDoc * KisDoc::createChildDoc( const TQRect & rect, KoDocument* childDoc ) { KisChildDoc * ch = new KisChildDoc( this, rect, childDoc ); insertChild( ch ); diff --git a/krita/ui/kis_doc.h b/krita/ui/kis_doc.h index 5d538cd7..55cbac90 100644 --- a/krita/ui/kis_doc.h +++ b/krita/ui/kis_doc.h @@ -29,8 +29,8 @@ #include -class QImage; -class QString; +class TQImage; +class TQString; class DCOPObject; class KCommand; @@ -50,9 +50,10 @@ class KRITACORE_EXPORT KisDoc : public KoDocument, private KisUndoAdapter { typedef KoDocument super; Q_OBJECT + TQ_OBJECT public: - KisDoc(QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false); + KisDoc(TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false); virtual ~KisDoc(); public: @@ -61,14 +62,14 @@ public: virtual bool completeLoading(KoStore *store); virtual bool completeSaving(KoStore*); virtual DCOPObject* dcopObject(); - virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0); - virtual bool loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* ); + virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0); + virtual bool loadOasis( const TQDomDocument&, KoOasisStyles&, const TQDomDocument&, KoStore* ); virtual bool saveOasis( KoStore*, KoXmlWriter* ); virtual bool loadChildren( KoStore* store); - virtual bool loadXML(QIODevice *, const QDomDocument& doc); - virtual QCString mimeType() const; - virtual QWidget* createCustomDocumentWidget(QWidget *parent); - virtual KoDocument* hitTest(const QPoint &pos, const QWMatrix& matrix = QWMatrix()); + virtual bool loadXML(TQIODevice *, const TQDomDocument& doc); + virtual TQCString mimeType() const; + virtual TQWidget* createCustomDocumentWidget(TQWidget *tqparent); + virtual KoDocument* hitTest(const TQPoint &pos, const TQWMatrix& matrix = TQWMatrix()); /** * Draw the image embedded in another KOffice document @@ -77,9 +78,9 @@ public: * by Krita because we appear to be doing our zooming * elsewhere. This may affect KOffice compatibility. */ - virtual void paintContent(QPainter& painter, const QRect& rect, bool /*transparent*/, double /*zoomX*/, double /*zoomY*/); + virtual void paintContent(TQPainter& painter, const TQRect& rect, bool /*transparent*/, double /*zoomX*/, double /*zoomY*/); - virtual QDomDocument saveXML(); + virtual TQDomDocument saveXML(); public slots: @@ -99,32 +100,32 @@ private: // Undo adapter virtual void addCommand(KCommand *cmd); virtual void setUndo(bool undo); virtual bool undo() const; - virtual void beginMacro(const QString& macroName); + virtual void beginMacro(const TQString& macroName); virtual void endMacro(); public: - Q_INT32 undoLimit() const; - void setUndoLimit(Q_INT32 limit); + TQ_INT32 undoLimit() const; + void setUndoLimit(TQ_INT32 limit); - Q_INT32 redoLimit() const; - void setRedoLimit(Q_INT32 limit); + TQ_INT32 redoLimit() const; + void setRedoLimit(TQ_INT32 limit); /** - * Create a new image that has this document as a parent and + * Create a new image that has this document as a tqparent and * replace the current image with this image. */ - bool newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const QString &imgDescription, const double imgResolution); + bool newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const TQString &imgDescription, const double imgResolution); /** - * Create a new image that has this document as a parent and + * Create a new image that has this document as a tqparent and * replace the current image with this image. */ - KisImageSP newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * colorstrategy); + KisImageSP newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorstrategy); - void renameImage(const QString& oldName, const QString& newName); + void renameImage(const TQString& oldName, const TQString& newName); /** @@ -132,7 +133,7 @@ public: * is not done with KoDocument::insertChild() because that * is protected and cannot be called from KisView. */ - KisChildDoc * createChildDoc( const QRect& rect, KoDocument* childDoc ); + KisChildDoc * createChildDoc( const TQRect& rect, KoDocument* childDoc ); /** * Makes an otherwise empty document ready for import/export @@ -150,13 +151,13 @@ public: public slots: void slotImageUpdated(); - void slotImageUpdated(const QRect& rect); + void slotImageUpdated(const TQRect& rect); void slotDocumentRestored(); void slotCommandExecuted(KCommand *command); signals: void docUpdated(); - void docUpdated(QRect rect); + void docUpdated(TQRect rect); void loadingFinished(); /* @@ -167,38 +168,38 @@ signals: protected: // Overide KoDocument - virtual KoView* createViewInstance(QWidget *parent, const char *name); + virtual KoView* createViewInstance(TQWidget *tqparent, const char *name); protected slots: // Overide KoDocument - virtual void openExistingFile(const QString& file); - virtual void openTemplate(const QString& file); + virtual void openExistingFile(const TQString& file); + virtual void openTemplate(const TQString& file); private slots: - void slotUpdate(KisImageSP img, Q_UINT32 x, Q_UINT32 y, Q_UINT32 w, Q_UINT32 h); - void slotIOProgress(Q_INT8 percentage); + void slotUpdate(KisImageSP img, TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 w, TQ_UINT32 h); + void slotIOProgress(TQ_INT8 percentage); private: - QDomElement saveImage(QDomDocument& doc, KisImageSP img); - KisImageSP loadImage(const QDomElement& elem); - void loadLayers(const QDomElement& element, KisImageSP img, KisGroupLayerSP parent); - KisLayerSP loadLayer(const QDomElement& elem, KisImageSP img); - KisLayerSP loadPaintLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, + TQDomElement saveImage(TQDomDocument& doc, KisImageSP img); + KisImageSP loadImage(const TQDomElement& elem); + void loadLayers(const TQDomElement& element, KisImageSP img, KisGroupLayerSP tqparent); + KisLayerSP loadLayer(const TQDomElement& elem, KisImageSP img); + KisLayerSP loadPaintLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); - KisGroupLayerSP loadGroupLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, + KisGroupLayerSP loadGroupLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); - KisAdjustmentLayerSP loadAdjustmentLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, + KisAdjustmentLayerSP loadAdjustmentLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); - KisPartLayerSP loadPartLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, + KisPartLayerSP loadPartLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); bool init(); - void setIOSteps(Q_INT32 nsteps); + void setIOSteps(TQ_INT32 nsteps); void IOCompletedStep(); void IODone(); @@ -206,16 +207,16 @@ private: bool m_undo; KoCommandHistory *m_cmdHistory; - QPtrList m_undoListeners; + TQPtrList m_undoListeners; KisImageSP m_currentImage; DCOPObject *m_dcop; KisNameServer *m_nserver; KMacroCommand *m_currentMacro; - Q_INT32 m_macroNestDepth; - Q_INT32 m_conversionDepth; + TQ_INT32 m_macroNestDepth; + TQ_INT32 m_conversionDepth; int m_ioProgressTotalSteps; int m_ioProgressBase; - QMap m_layerFilenames; // temp storage during load + TQMap m_layerFilenames; // temp storage during load }; diff --git a/krita/ui/kis_doc_iface.cc b/krita/ui/kis_doc_iface.cc index d7db6e5d..50af9898 100644 --- a/krita/ui/kis_doc_iface.cc +++ b/krita/ui/kis_doc_iface.cc @@ -61,7 +61,7 @@ void KisDocIface::setRedoLimit(int limit) m_doc->setRedoLimit(limit); } -void KisDocIface::renameImage(const QString& oldName, const QString& newName) +void KisDocIface::renameImage(const TQString& oldName, const TQString& newName) { m_doc->renameImage(oldName,newName); } diff --git a/krita/ui/kis_doc_iface.h b/krita/ui/kis_doc_iface.h index 204d8b77..36c71a5f 100644 --- a/krita/ui/kis_doc_iface.h +++ b/krita/ui/kis_doc_iface.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include class KisDoc; @@ -41,7 +41,7 @@ k_dcop: virtual int redoLimit() const; virtual void setRedoLimit(int limit); - virtual void renameImage(const QString& oldName, const QString& newName); + virtual void renameImage(const TQString& oldName, const TQString& newName); private: KisDoc *m_doc; diff --git a/krita/ui/kis_double_click_event.h b/krita/ui/kis_double_click_event.h index 0d6765aa..c3447602 100644 --- a/krita/ui/kis_double_click_event.h +++ b/krita/ui/kis_double_click_event.h @@ -24,7 +24,7 @@ class KisDoubleClickEvent : public KisButtonEvent { typedef KisButtonEvent super; public: KisDoubleClickEvent() {} - KisDoubleClickEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState button, Qt::ButtonState state) : super(DoubleClickEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} + KisDoubleClickEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState button, TQt::ButtonState state) : super(DoubleClickEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} }; #endif // KIS_DOUBLE_CLICK_EVENT_H_ diff --git a/krita/ui/kis_double_widget.cc b/krita/ui/kis_double_widget.cc index 935df9a2..d8c90187 100644 --- a/krita/ui/kis_double_widget.cc +++ b/krita/ui/kis_double_widget.cc @@ -19,22 +19,22 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include "kis_double_widget.h" -KisDoubleWidget::KisDoubleWidget(QWidget* parent, const char* name) - : super(parent, name) +KisDoubleWidget::KisDoubleWidget(TQWidget* tqparent, const char* name) + : super(tqparent, name) { init(0, 1); } -KisDoubleWidget::KisDoubleWidget(double min, double max, QWidget* parent, const char* name) - : super(parent, name) +KisDoubleWidget::KisDoubleWidget(double min, double max, TQWidget* tqparent, const char* name) + : super(tqparent, name) { init(min, max); } @@ -46,19 +46,19 @@ KisDoubleWidget::~KisDoubleWidget() void KisDoubleWidget::init(double min, double max) { m_spinBox = new KDoubleSpinBox(min, max, 0.05, 0, 2, this, "spinbox"); - connect(m_spinBox, SIGNAL(valueChanged(double)), this, SLOT(setSliderValue(double))); + connect(m_spinBox, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(setSliderValue(double))); - m_slider = new QSlider(static_cast(min * 100 + 0.5), static_cast(max * 100 + 0.5), 1, 0, QSlider::Horizontal, this, "sld"); - connect(m_slider, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged(int))); - connect(m_slider, SIGNAL(sliderPressed()), SIGNAL(sliderPressed())); - connect(m_slider, SIGNAL(sliderReleased()), SIGNAL(sliderReleased())); + m_slider = new TQSlider(static_cast(min * 100 + 0.5), static_cast(max * 100 + 0.5), 1, 0, TQSlider::Horizontal, this, "sld"); + connect(m_slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderValueChanged(int))); + connect(m_slider, TQT_SIGNAL(sliderPressed()), TQT_SIGNAL(sliderPressed())); + connect(m_slider, TQT_SIGNAL(sliderReleased()), TQT_SIGNAL(sliderReleased())); - m_layout = new QHBoxLayout(this, 0, -1, "hbox layout"); + m_layout = new TQHBoxLayout(this, 0, -1, "hbox tqlayout"); m_layout->addWidget(m_slider); m_layout->addSpacing(5); m_layout->addWidget(m_spinBox); - m_layout->addItem(new QSpacerItem(5,1,QSizePolicy::Expanding, QSizePolicy::Minimum)); + m_layout->addItem(new TQSpacerItem(5,1,TQSizePolicy::Expanding, TQSizePolicy::Minimum)); } double KisDoubleWidget::value() const @@ -84,7 +84,7 @@ void KisDoubleWidget::setRange(double min, double max) m_slider->setRange(static_cast(min * 100 + 0.5), static_cast(max * 100 + 0.5)); } -void KisDoubleWidget::setTickmarks(QSlider::TickSetting tickSetting) +void KisDoubleWidget::setTickmarks(TQSlider::TickSetting tickSetting) { m_slider->setTickmarks(tickSetting); } diff --git a/krita/ui/kis_double_widget.h b/krita/ui/kis_double_widget.h index bd6043e0..34bd2230 100644 --- a/krita/ui/kis_double_widget.h +++ b/krita/ui/kis_double_widget.h @@ -22,26 +22,27 @@ #ifndef KIS_DOUBLE_WIDGET_H #define KIS_DOUBLE_WIDGET_H -#include -#include +#include +#include -class QHBoxLayout; +class TQHBoxLayout; class KDoubleSpinBox; -class KisDoubleWidget : public QWidget +class KisDoubleWidget : public TQWidget { Q_OBJECT + TQ_OBJECT - typedef QWidget super; + typedef TQWidget super; public: - KisDoubleWidget(QWidget* parent = 0, const char* name = 0); - KisDoubleWidget(double min, double max, QWidget* parent = 0, const char* name = 0); + KisDoubleWidget(TQWidget* tqparent = 0, const char* name = 0); + KisDoubleWidget(double min, double max, TQWidget* tqparent = 0, const char* name = 0); ~KisDoubleWidget(); double value() const; void setRange(double min, double max); - void setTickmarks(QSlider::TickSetting tickMarks); + void setTickmarks(TQSlider::TickSetting tickMarks); void setTickInterval(double tickInterval); double tickInterval() const; @@ -68,8 +69,8 @@ private: void init(double min, double max); protected: - QHBoxLayout* m_layout; - QSlider* m_slider; + TQHBoxLayout* m_layout; + TQSlider* m_slider; KDoubleSpinBox *m_spinBox; }; diff --git a/krita/ui/kis_event.h b/krita/ui/kis_event.h index 3d4d21bc..417a9168 100644 --- a/krita/ui/kis_event.h +++ b/krita/ui/kis_event.h @@ -18,7 +18,7 @@ #ifndef KIS_EVENT_H_ #define KIS_EVENT_H_ -#include +#include #include "kis_point.h" #include "kis_input_device.h" @@ -34,7 +34,7 @@ public: }; KisEvent() : m_type(UnknownEvent), m_device(KisInputDevice::unknown()) {} - KisEvent(enumEventType type, KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState state) : m_type(type), m_device(device), m_pos(pos), m_globalPos(globalPos), m_pressure(pressure), m_xTilt(xTilt), m_yTilt(yTilt), m_state(state) {} + KisEvent(enumEventType type, KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState state) : m_type(type), m_device(device), m_pos(pos), m_globalPos(globalPos), m_pressure(pressure), m_xTilt(xTilt), m_yTilt(yTilt), m_state(state) {} enumEventType type() const { return m_type; } KisInputDevice device() const { return m_device; } @@ -45,7 +45,7 @@ public: double pressure() const { return m_pressure; } double xTilt() const { return m_xTilt; } double yTilt() const { return m_yTilt; } - Qt::ButtonState state() const { return m_state; } + TQt::ButtonState state() const { return m_state; } protected: enumEventType m_type; @@ -55,7 +55,7 @@ protected: double m_pressure; double m_xTilt; double m_yTilt; - Qt::ButtonState m_state; + TQt::ButtonState m_state; }; #endif // KIS_EVENT_H_ diff --git a/krita/ui/kis_factory.cc b/krita/ui/kis_factory.cc index 54a08da9..a4a5e2bf 100644 --- a/krita/ui/kis_factory.cc +++ b/krita/ui/kis_factory.cc @@ -20,8 +20,8 @@ #include #include LCMS_HEADER -#include -#include +#include +#include #include #include @@ -50,8 +50,8 @@ KInstance* KisFactory::s_instance = 0; -KisFactory::KisFactory( QObject* parent, const char* name ) - : KoFactory( parent, name ) +KisFactory::KisFactory( TQObject* tqparent, const char* name ) + : KoFactory( tqparent, name ) { s_aboutData = newKritaAboutData(); @@ -78,14 +78,14 @@ KisFactory::~KisFactory() /** * Create the document */ -KParts::Part* KisFactory::createPartObject( QWidget *parentWidget, - const char *widgetName, QObject* parent, - const char* name, const char* classname, const QStringList & ) +KParts::Part* KisFactory::createPartObject( TQWidget *tqparentWidget, + const char *widgetName, TQObject* tqparent, + const char* name, const char* classname, const TQStringList & ) { bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 ); - KisDoc *doc = new KisDoc( parentWidget, - widgetName, parent, name, !bWantKoDocument ); + KisDoc *doc = new KisDoc( tqparentWidget, + widgetName, tqparent, name, !bWantKoDocument ); Q_CHECK_PTR(doc); if ( !bWantKoDocument ) @@ -102,7 +102,7 @@ KAboutData* KisFactory::aboutData() KInstance* KisFactory::instance() { - QString homedir = getenv("HOME"); + TQString homedir = getenv("HOME"); if ( !s_instance ) { @@ -124,24 +124,24 @@ KInstance* KisFactory::instance() s_instance->dirs()->addResourceType("kis_brushes", KStandardDirs::kde_default("data") + "krita/brushes/"); s_instance->dirs()->addResourceDir("kis_brushes", "/usr/share/create/brushes/gimp"); - s_instance->dirs()->addResourceDir("kis_brushes", QDir::homeDirPath() + QString("/.create/brushes/gimp")); + s_instance->dirs()->addResourceDir("kis_brushes", TQDir::homeDirPath() + TQString("/.create/brushes/gimp")); s_instance->dirs()->addResourceType("kis_patterns", KStandardDirs::kde_default("data") + "krita/patterns/"); s_instance->dirs()->addResourceDir("kis_patterns", "/usr/share/create/patterns/gimp"); - s_instance->dirs()->addResourceDir("kis_patterns", QDir::homeDirPath() + QString("/.create/patterns/gimp")); + s_instance->dirs()->addResourceDir("kis_patterns", TQDir::homeDirPath() + TQString("/.create/patterns/gimp")); s_instance->dirs()->addResourceType("kis_gradients", KStandardDirs::kde_default("data") + "krita/gradients/"); s_instance->dirs()->addResourceDir("kis_gradients", "/usr/share/create/gradients/gimp"); - s_instance->dirs()->addResourceDir("kis_gradients", QDir::homeDirPath() + QString("/.create/gradients/gimp")); + s_instance->dirs()->addResourceDir("kis_gradients", TQDir::homeDirPath() + TQString("/.create/gradients/gimp")); s_instance->dirs()->addResourceType("kis_profiles", KStandardDirs::kde_default("data") + "krita/profiles/"); s_instance->dirs()->addResourceDir("kis_profiles", "/usr/share/color/icc"); - s_instance->dirs()->addResourceDir("kis_profiles", QDir::homeDirPath() + QString("/.icc")); - s_instance->dirs()->addResourceDir("kis_profiles", QDir::homeDirPath() + QString("/.color/icc")); + s_instance->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.icc")); + s_instance->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.color/icc")); s_instance->dirs()->addResourceType("kis_palettes", KStandardDirs::kde_default("data") + "krita/palettes/"); s_instance->dirs()->addResourceDir("kis_palettes", "/usr/share/create/swatches"); - s_instance->dirs()->addResourceDir("kis_palettes", QDir::homeDirPath() + QString("/.create/swatches")); + s_instance->dirs()->addResourceDir("kis_palettes", TQDir::homeDirPath() + TQString("/.create/swatches")); // Tell the iconloader about share/apps/koffice/icons s_instance->iconLoader()->addAppDir("koffice"); diff --git a/krita/ui/kis_factory.h b/krita/ui/kis_factory.h index c89b7a92..d20070c5 100644 --- a/krita/ui/kis_factory.h +++ b/krita/ui/kis_factory.h @@ -21,7 +21,7 @@ #ifndef __kis_factory_h__ #define __kis_factory_h__ -#include +#include #include @@ -35,17 +35,18 @@ class KAboutData; class KRITACORE_EXPORT KisFactory : public KoFactory { Q_OBJECT + TQ_OBJECT public: - KisFactory( QObject* parent = 0, const char* name = 0 ); + KisFactory( TQObject* tqparent = 0, const char* name = 0 ); ~KisFactory(); - virtual KParts::Part *createPartObject(QWidget *parentWidget = 0, + virtual KParts::Part *createPartObject(TQWidget *tqparentWidget = 0, const char *widgetName = 0, - QObject *parent = 0, + TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument", - const QStringList &args = QStringList() ); + const TQStringList &args = TQStringList() ); static KAboutData *aboutData(); static KInstance *instance(); diff --git a/krita/ui/kis_filter_manager.cc b/krita/ui/kis_filter_manager.cc index 550805ca..0d59636b 100644 --- a/krita/ui/kis_filter_manager.cc +++ b/krita/ui/kis_filter_manager.cc @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qsignalmapper.h" -#include -#include -#include -#include +#include "tqsignalmapper.h" +#include +#include +#include +#include #include #include @@ -64,9 +64,9 @@ KisFilterManager::KisFilterManager(KisView * view, KisDoc * doc) m_lastFilter = 0; m_lastWidget = 0; - m_filterMapper = new QSignalMapper(this); + m_filterMapper = new TQSignalMapper(this); - connect(m_filterMapper, SIGNAL(mapped(int)), this, SLOT(slotApplyFilter(int))); + connect(m_filterMapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotApplyFilter(int))); } @@ -94,58 +94,58 @@ void KisFilterManager::setup(KActionCollection * ac) f = KisFilterRegistry::instance()->get(*it); if (!f) break; - QString s = f->menuCategory(); - if (s == "adjust" && !m_filterActionMenus.find("adjust")) { + TQString s = f->menuCategory(); + if (s == "adjust" && !m_filterActionMenus.tqfind("adjust")) { am = new KActionMenu(i18n("Adjust"), ac, "adjust_filters"); m_filterActionMenus.insert("adjust", am); } - else if (s == "artistic" && !m_filterActionMenus.find("artistic")) { + else if (s == "artistic" && !m_filterActionMenus.tqfind("artistic")) { am = new KActionMenu(i18n("Artistic"), ac, "artistic_filters"); m_filterActionMenus.insert("artistic", am); } - else if (s == "blur" && !m_filterActionMenus.find("blur")) { + else if (s == "blur" && !m_filterActionMenus.tqfind("blur")) { am = new KActionMenu(i18n("Blur"), ac, "blur_filters"); m_filterActionMenus.insert("blur", am); } - else if (s == "colors" && !m_filterActionMenus.find("colors")) { + else if (s == "colors" && !m_filterActionMenus.tqfind("colors")) { am = new KActionMenu(i18n("Colors"), ac, "color_filters"); m_filterActionMenus.insert("colors", am); } - else if (s == "decor" && !m_filterActionMenus.find("decor")) { + else if (s == "decor" && !m_filterActionMenus.tqfind("decor")) { am = new KActionMenu(i18n("Decor"), ac, "decor_filters"); m_filterActionMenus.insert("decor", am); } - else if (s == "edge" && !m_filterActionMenus.find("edge")) { + else if (s == "edge" && !m_filterActionMenus.tqfind("edge")) { am = new KActionMenu(i18n("Edge Detection"), ac, "edge_filters"); m_filterActionMenus.insert("edge", am); } - else if (s == "emboss" && !m_filterActionMenus.find("emboss")) { + else if (s == "emboss" && !m_filterActionMenus.tqfind("emboss")) { am = new KActionMenu(i18n("Emboss"), ac, "emboss_filters"); m_filterActionMenus.insert("emboss", am); } - else if (s == "enhance" && !m_filterActionMenus.find("enhance")) { + else if (s == "enhance" && !m_filterActionMenus.tqfind("enhance")) { am = new KActionMenu(i18n("Enhance"), ac, "enhance_filters"); m_filterActionMenus.insert("enhance", am); } - else if (s == "map" && !m_filterActionMenus.find("map")) { + else if (s == "map" && !m_filterActionMenus.tqfind("map")) { am = new KActionMenu(i18n("Map"), ac, "map_filters"); m_filterActionMenus.insert("map", am); } - else if (s == "nonphotorealistic" && !m_filterActionMenus.find("nonphotorealistic")) { + else if (s == "nonphotorealistic" && !m_filterActionMenus.tqfind("nonphotorealistic")) { am = new KActionMenu(i18n("Non-photorealistic"), ac, "nonphotorealistic_filters"); m_filterActionMenus.insert("nonphotorealistic", am); } - else if (s == "other" && !m_filterActionMenus.find("other")) { + else if (s == "other" && !m_filterActionMenus.tqfind("other")) { other = new KActionMenu(i18n("Other"), ac, "misc_filters"); m_filterActionMenus.insert("other", other); } @@ -154,7 +154,7 @@ void KisFilterManager::setup(KActionCollection * ac) m_reapplyAction = new KAction(i18n("Apply Filter Again"), "Ctrl+Shift+F", - this, SLOT(slotApply()), + this, TQT_SLOT(slotApply()), ac, "filter_apply_again"); m_reapplyAction->setEnabled(false); @@ -167,11 +167,11 @@ void KisFilterManager::setup(KActionCollection * ac) if (!f) break; // Create action - KAction * a = new KAction(f->menuEntry(), 0, m_filterMapper, SLOT(map()), ac, - QString("krita_filter_%1").arg((*it) . id()).ascii()); + KAction * a = new KAction(f->menuEntry(), 0, m_filterMapper, TQT_SLOT(map()), ac, + TQString("krita_filter_%1").tqarg((*it) . id()).ascii()); // Add action to the right submenu - KActionMenu * m = m_filterActionMenus.find( f->menuCategory() ); + KActionMenu * m = m_filterActionMenus.tqfind( f->menuCategory() ); if (m) { m->insert(a); } @@ -243,19 +243,19 @@ bool KisFilterManager::apply() KisPaintDeviceSP dev = img->activeDevice(); if (!dev) return false; - QApplication::setOverrideCursor( KisCursor::waitCursor() ); + TQApplication::setOverrideCursor( KisCursor::waitCursor() ); //Apply the filter m_lastFilterConfig = m_lastFilter->configuration(m_lastWidget); - QRect r1 = dev->extent(); - QRect r2 = img->bounds(); + TQRect r1 = dev->extent(); + TQRect r2 = img->bounds(); // Filters should work only on the visible part of an image. - QRect rect = r1.intersect(r2); + TQRect rect = r1.intersect(r2); if (dev->hasSelection()) { - QRect r3 = dev->selection()->selectedExactRect(); + TQRect r3 = dev->selection()->selectedExactRect(); rect = rect.intersect(r3); } @@ -277,7 +277,7 @@ bool KisFilterManager::apply() m_reapplyAction->setText(i18n("Apply Filter Again")); m_lastFilter->disableProgress(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if (m_lastFilter->cancelRequested()) { @@ -289,7 +289,7 @@ bool KisFilterManager::apply() return false; } else { - if (dev->parentLayer()) dev->parentLayer()->setDirty(rect); + if (dev->tqparentLayer()) dev->tqparentLayer()->setDirty(rect); m_doc->setModified(true); if (img->undo() && cmd) img->undoAdapter()->addCommand(cmd); return true; @@ -320,8 +320,8 @@ void KisFilterManager::slotApplyFilter(int i) if (m_lastFilter->colorSpaceIndependence() == TO_LAB16) { if (KMessageBox::warningContinueCancel(m_view, i18n("The %1 filter will convert your %2 data to 16-bit L*a*b* and vice versa. ") - .arg(m_lastFilter->id().name()) - .arg(dev->colorSpace()->id().name()), + .tqarg(m_lastFilter->id().name()) + .tqarg(dev->colorSpace()->id().name()), i18n("Filter Will Convert Your Layer Data"), KGuiItem(i18n("Continue")), "lab16degradation") != KMessageBox::Continue) return; @@ -330,8 +330,8 @@ void KisFilterManager::slotApplyFilter(int i) else if (m_lastFilter->colorSpaceIndependence() == TO_RGBA8) { if (KMessageBox::warningContinueCancel(m_view, i18n("The %1 filter will convert your %2 data to 8-bit RGBA and vice versa. ") - .arg(m_lastFilter->id().name()) - .arg(dev->colorSpace()->id().name()), + .tqarg(m_lastFilter->id().name()) + .tqarg(dev->colorSpace()->id().name()), i18n("Filter Will Convert Your Layer Data"), KGuiItem(i18n("Continue")), "rgba8degradation") != KMessageBox::Continue) return; @@ -343,27 +343,27 @@ void KisFilterManager::slotApplyFilter(int i) // Create the config dialog m_lastDialog = new KisPreviewDialog(m_view, m_lastFilter->id().name().ascii(), true, m_lastFilter->id().name()); Q_CHECK_PTR(m_lastDialog); - m_lastWidget = m_lastFilter->createConfigurationWidget( (QWidget*)m_lastDialog->container(), dev ); + m_lastWidget = m_lastFilter->createConfigurationWidget( (TQWidget*)m_lastDialog->container(), dev ); bool accepted = true; if( m_lastWidget != 0) { - connect(m_lastWidget, SIGNAL(sigPleaseUpdatePreview()), this, SLOT(slotConfigChanged())); + connect(m_lastWidget, TQT_SIGNAL(sigPleaseUpdatePreview()), this, TQT_SLOT(slotConfigChanged())); m_lastDialog->previewWidget()->slotSetDevice( dev ); - connect(m_lastDialog->previewWidget(), SIGNAL(updated()), this, SLOT(refreshPreview())); + connect(m_lastDialog->previewWidget(), TQT_SIGNAL(updated()), this, TQT_SLOT(refreshPreview())); - QGridLayout *widgetLayout = new QGridLayout((QWidget *)m_lastDialog->container(), 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout((TQWidget *)m_lastDialog->container(), 1, 1); widgetLayout->addWidget(m_lastWidget, 0 , 0); - m_lastDialog->container()->setMinimumSize(m_lastWidget->minimumSize()); + m_lastDialog->container()->setMinimumSize(m_lastWidget->tqminimumSize()); refreshPreview(); - if(m_lastDialog->exec() == QDialog::Rejected ) + if(m_lastDialog->exec() == TQDialog::Rejected ) { accepted = false; } diff --git a/krita/ui/kis_filter_manager.h b/krita/ui/kis_filter_manager.h index 69c87565..beaf66a2 100644 --- a/krita/ui/kis_filter_manager.h +++ b/krita/ui/kis_filter_manager.h @@ -19,10 +19,10 @@ #ifndef _KIS_FILTER_MANAGER_ #define _KIS_FILTER_MANAGER_ -#include "qdict.h" -#include "qobject.h" -#include "qptrlist.h" -#include "qsignalmapper.h" +#include "tqdict.h" +#include "tqobject.h" +#include "tqptrlist.h" +#include "tqsignalmapper.h" #include "kactionclasses.h" #include "kis_image.h" #include "kis_selection.h" @@ -41,13 +41,14 @@ class KisPreviewDialog; /** * Create all the filter actions for the specified view and implement re-apply filter */ -class KRITACORE_EXPORT KisFilterManager : public QObject { +class KRITACORE_EXPORT KisFilterManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisFilterManager(KisView * parent, KisDoc * doc); + KisFilterManager(KisView * tqparent, KisDoc * doc); ~KisFilterManager(); void setup(KActionCollection * ac); @@ -70,7 +71,7 @@ private: KAction * m_reapplyAction; - QPtrList m_filterActions; + TQPtrList m_filterActions; KisFilterConfiguration * m_lastFilterConfig; KisFilter * m_lastFilter; @@ -78,9 +79,9 @@ private: KisFilterConfigWidget * m_lastWidget; KisIDList m_filterList; // Map the actions in the signalmapper to the filters - QSignalMapper * m_filterMapper; + TQSignalMapper * m_filterMapper; - QDict m_filterActionMenus; + TQDict m_filterActionMenus; }; #endif diff --git a/krita/ui/kis_filters_listview.cc b/krita/ui/kis_filters_listview.cc index 04039a3b..d77c4a7f 100644 --- a/krita/ui/kis_filters_listview.cc +++ b/krita/ui/kis_filters_listview.cc @@ -21,10 +21,10 @@ #include "kis_filters_listview.h" -#include -#include "qtimer.h" -#include "qpainter.h" -#include "qpixmap.h" +#include +#include "tqtimer.h" +#include "tqpainter.h" +#include "tqpixmap.h" #include @@ -40,8 +40,8 @@ // ------------------------------------------------ -KisFiltersThumbnailThread::KisFiltersThumbnailThread(QIconView * parent, KisFiltersIconViewItem * iconItem, KisFilterConfiguration * config, KisFilter * filter, KisPaintDeviceSP dev, const QRect & bounds, KisProfile * profile) - : m_parent(parent) +KisFiltersThumbnailThread::KisFiltersThumbnailThread(TQIconView * tqparent, KisFiltersIconViewItem * iconItem, KisFilterConfiguration * config, KisFilter * filter, KisPaintDeviceSP dev, const TQRect & bounds, KisProfile * profile) + : m_parent(tqparent) , m_iconItem(iconItem) , m_config(config) , m_filter(filter) @@ -65,14 +65,14 @@ void KisFiltersThumbnailThread::run() m_filter->process(thumbPreview, thumbPreview, m_config, m_bounds); if (!m_canceled) { - m_pixmap = thumbPreview->convertToQImage(m_profile); + m_pixmap = thumbPreview->convertToTQImage(m_profile); - qApp->postEvent(m_parent, new KisThumbnailDoneEvent (m_iconItem, m_pixmap)); + tqApp->postEvent(m_parent, new KisThumbnailDoneEvent (m_iconItem, m_pixmap)); } } -QPixmap KisFiltersThumbnailThread::pixmap() +TQPixmap KisFiltersThumbnailThread::pixmap() { return m_pixmap; } @@ -87,15 +87,15 @@ void KisFiltersThumbnailThread::cancel() // ------------------------------------------------ -KisFiltersIconViewItem::KisFiltersIconViewItem(QIconView * parent, const QString & text, const QPixmap & icon, +KisFiltersIconViewItem::KisFiltersIconViewItem(TQIconView * tqparent, const TQString & text, const TQPixmap & icon, KisID id, KisFilter* filter, KisFilterConfiguration* filterConfig, - KisPaintDeviceSP thumb, const QRect & bounds, KisProfile * profile) - : QIconViewItem(parent, text, icon) + KisPaintDeviceSP thumb, const TQRect & bounds, KisProfile * profile) + : TQIconViewItem(tqparent, text, icon) , m_id(id) , m_filter(filter) , m_filterconfig(filterConfig) { - m_thread = new KisFiltersThumbnailThread(parent, this, filterConfig, filter, thumb, bounds, profile); + m_thread = new KisFiltersThumbnailThread(tqparent, this, filterConfig, filter, thumb, bounds, profile); } KisFiltersIconViewItem::~KisFiltersIconViewItem() @@ -106,8 +106,8 @@ KisFiltersIconViewItem::~KisFiltersIconViewItem() // ------------------------------------------------ -KisFiltersListView::KisFiltersListView(QWidget* parent, bool filterForAdjustmentLayers, const char* name) - : KIconView(parent, name) +KisFiltersListView::KisFiltersListView(TQWidget* tqparent, bool filterForAdjustmentLayers, const char* name) + : KIconView(tqparent, name) , m_original(0) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -115,8 +115,8 @@ KisFiltersListView::KisFiltersListView(QWidget* parent, bool filterForAdjustment init(); } -KisFiltersListView::KisFiltersListView(QWidget * parent, const char * name, WFlags f, bool filterForAdjustmentLayers) - : KIconView(parent, name, f) +KisFiltersListView::KisFiltersListView(TQWidget * tqparent, const char * name, WFlags f, bool filterForAdjustmentLayers) + : KIconView(tqparent, name, f) , m_original(0) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -124,8 +124,8 @@ KisFiltersListView::KisFiltersListView(QWidget * parent, const char * name, WFla init(); } -KisFiltersListView::KisFiltersListView(KisLayerSP layer, QWidget* parent, bool filterForAdjustmentLayers, const char * name) - : KIconView(parent, name) +KisFiltersListView::KisFiltersListView(KisLayerSP layer, TQWidget* tqparent, bool filterForAdjustmentLayers, const char * name) + : KIconView(tqparent, name) , m_original(0) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -139,8 +139,8 @@ KisFiltersListView::KisFiltersListView(KisLayerSP layer, QWidget* parent, bool f init(); } -KisFiltersListView::KisFiltersListView(KisPaintDeviceSP device, QWidget* parent, bool filterForAdjustmentLayers, const char * name) - : KIconView(parent, name) +KisFiltersListView::KisFiltersListView(KisPaintDeviceSP device, TQWidget* tqparent, bool filterForAdjustmentLayers, const char * name) + : KIconView(tqparent, name) , m_original(device) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -153,8 +153,8 @@ void KisFiltersListView::init() { setCaption(i18n("Filters List")); setItemsMovable(false); - setSelectionMode(QIconView::Single); - setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding )); + setSelectionMode(TQIconView::Single); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding )); setMinimumWidth(160); } @@ -178,18 +178,18 @@ void KisFiltersListView::setCurrentFilter(KisID filter) void KisFiltersListView::buildPreview() { - QTime t; + TQTime t; if(m_original== 0) return; - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); t.start(); m_thumb = m_original->createThumbnailDevice(150, 150); t.start(); - QRect bounds = m_thumb->exactBounds(); - QPixmap pm(bounds.width(), bounds.height()); - QPainter gc(&pm); + TQRect bounds = m_thumb->exactBounds(); + TQPixmap pm(bounds.width(), bounds.height()); + TQPainter gc(&pm); gc.fillRect(0, 0, bounds.width(), bounds.height(), backgroundColor()); gc.end(); @@ -219,16 +219,16 @@ void KisFiltersListView::buildPreview() } } } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void KisFiltersListView::customEvent(QCustomEvent * e) +void KisFiltersListView::customEvent(TQCustomEvent * e) { KisThumbnailDoneEvent * ev = dynamic_cast(e); if (ev) { - QPixmap * p = ev->m_iconItem->pixmap(); - QImage img = ev->m_image; + TQPixmap * p = ev->m_iconItem->pixmap(); + TQImage img = ev->m_image; int x, y; if (p->width() > img.width()) @@ -240,11 +240,11 @@ void KisFiltersListView::customEvent(QCustomEvent * e) else y = 0; - QPainter gc(p); - gc.drawImage(QPoint(x,y), img); + TQPainter gc(p); + gc.drawImage(TQPoint(x,y), img); gc.end(); - //ev->m_iconItem->setPixmap(QPixmap(*p)); + //ev->m_iconItem->setPixmap(TQPixmap(*p)); arrangeItemsInGrid(); } } diff --git a/krita/ui/kis_filters_listview.h b/krita/ui/kis_filters_listview.h index 7a7e5e89..94bc9a66 100644 --- a/krita/ui/kis_filters_listview.h +++ b/krita/ui/kis_filters_listview.h @@ -21,7 +21,7 @@ #ifndef _KIS_FILTERS_LIST_VIEW_H_ #define _KIS_FILTERS_LIST_VIEW_H_ -#include +#include #include @@ -39,17 +39,17 @@ class KisFiltersIconViewItem; class KisFiltersListView; class KisThreadPool; -class KisThumbnailDoneEvent : public QCustomEvent +class KisThumbnailDoneEvent : public TQCustomEvent { public: - KisThumbnailDoneEvent(KisFiltersIconViewItem * iconItem, const QImage & img) - : QCustomEvent(QEvent::User + 1969) + KisThumbnailDoneEvent(KisFiltersIconViewItem * iconItem, const TQImage & img) + : TQCustomEvent(TQEvent::User + 1969) , m_iconItem(iconItem) , m_image(img) {}; KisFiltersIconViewItem * m_iconItem; - QImage m_image; + TQImage m_image; }; @@ -58,34 +58,34 @@ class KisFiltersThumbnailThread : public KisThread { public: - KisFiltersThumbnailThread(QIconView * parent, + KisFiltersThumbnailThread(TQIconView * tqparent, KisFiltersIconViewItem * iconItem, KisFilterConfiguration * config, KisFilter * filter, - KisPaintDeviceSP dev, const QRect & bounds, + KisPaintDeviceSP dev, const TQRect & bounds, KisProfile * profile); ~KisFiltersThumbnailThread(); virtual void run(); - QPixmap pixmap(); + TQPixmap pixmap(); void cancel(); private: - QIconView * m_parent; + TQIconView * m_parent; KisFiltersIconViewItem * m_iconItem; KisFilterConfiguration * m_config; KisFilter * m_filter; KisPaintDeviceSP m_dev; - const QRect m_bounds; + const TQRect m_bounds; KisProfile * m_profile; - QImage m_pixmap; + TQImage m_pixmap; }; -class KisFiltersIconViewItem : public QIconViewItem { +class KisFiltersIconViewItem : public TQIconViewItem { public: - KisFiltersIconViewItem( QIconView * parent, const QString & text, const QPixmap & icon, + KisFiltersIconViewItem( TQIconView * tqparent, const TQString & text, const TQPixmap & icon, KisID id, KisFilter* filter, KisFilterConfiguration* filterConfig, - KisPaintDeviceSP thumb, const QRect & bounds, KisProfile * profile); + KisPaintDeviceSP thumb, const TQRect & bounds, KisProfile * profile); virtual ~KisFiltersIconViewItem(); KisID id() { return m_id; } @@ -105,12 +105,12 @@ private: class KisFiltersListView : public KIconView { public: - explicit KisFiltersListView(QWidget * parent = 0, const char * name = 0, WFlags f = 0, bool filterForAdjustmentLayers = false); - KisFiltersListView(QWidget* parent, bool filterForAdjustmentLayers = false, const char* name = 0); - KisFiltersListView(KisLayerSP layer, QWidget* parent, bool filterForAdjustmentLayers = false, const char * name = 0) KDE_DEPRECATED; - KisFiltersListView(KisPaintDeviceSP layer, QWidget* parent, bool filterForAdjustmentLayers = false, const char * name = 0); + explicit KisFiltersListView(TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0, bool filterForAdjustmentLayers = false); + KisFiltersListView(TQWidget* tqparent, bool filterForAdjustmentLayers = false, const char* name = 0); + KisFiltersListView(KisLayerSP layer, TQWidget* tqparent, bool filterForAdjustmentLayers = false, const char * name = 0) KDE_DEPRECATED; + KisFiltersListView(KisPaintDeviceSP layer, TQWidget* tqparent, bool filterForAdjustmentLayers = false, const char * name = 0); - virtual void customEvent(QCustomEvent *); + virtual void customEvent(TQCustomEvent *); private: diff --git a/krita/ui/kis_gradient_chooser.cc b/krita/ui/kis_gradient_chooser.cc index ca0bfeb0..7e416ea1 100644 --- a/krita/ui/kis_gradient_chooser.cc +++ b/krita/ui/kis_gradient_chooser.cc @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include -#include -#include -#include +#include +#include +#include #include @@ -32,24 +32,24 @@ #include "kis_gradient_chooser.h" -KisCustomGradientDialog::KisCustomGradientDialog(KisView * view, QWidget * parent, const char *name) - : KDialogBase(parent, name, false, i18n("Custom Gradient"), Close) +KisCustomGradientDialog::KisCustomGradientDialog(KisView * view, TQWidget * tqparent, const char *name) + : KDialogBase(tqparent, name, false, i18n("Custom Gradient"), Close) { m_page = new KisAutogradient(this, "autogradient", i18n("Custom Gradient")); setMainWidget(m_page); - connect(m_page, SIGNAL(activatedResource(KisResource *)), view, SLOT(gradientActivated(KisResource*))); + connect(m_page, TQT_SIGNAL(activatedResource(KisResource *)), view, TQT_SLOT(gradientActivated(KisResource*))); } -KisGradientChooser::KisGradientChooser(KisView * view, QWidget *parent, const char *name) : super(parent, name) +KisGradientChooser::KisGradientChooser(KisView * view, TQWidget *tqparent, const char *name) : super(tqparent, name) { - m_lbName = new QLabel(this); + m_lbName = new TQLabel(this); - m_customGradient = new QPushButton(i18n("Custom Gradient..."), this, "custom gradient button"); + m_customGradient = new TQPushButton(i18n("Custom Gradient..."), this, "custom gradient button"); KisCustomGradientDialog * autogradient = new KisCustomGradientDialog(view, this, "autogradient"); - connect(m_customGradient, SIGNAL(clicked()), autogradient, SLOT(show())); + connect(m_customGradient, TQT_SIGNAL(clicked()), autogradient, TQT_SLOT(show())); - QVBoxLayout *mainLayout = new QVBoxLayout(this, 2, -1, "main layout"); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 2, -1, "main tqlayout"); mainLayout->addWidget(m_lbName); mainLayout->addWidget(chooserWidget(), 10); diff --git a/krita/ui/kis_gradient_chooser.h b/krita/ui/kis_gradient_chooser.h index 5b6d7226..fc154f3c 100644 --- a/krita/ui/kis_gradient_chooser.h +++ b/krita/ui/kis_gradient_chooser.h @@ -22,17 +22,18 @@ #include "kis_itemchooser.h" -class QLabel; -class QPushButton; +class TQLabel; +class TQPushButton; class KisView; class KisCustomGradientDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KisCustomGradientDialog(KisView * view, QWidget * parent, const char *name); + KisCustomGradientDialog(KisView * view, TQWidget * tqparent, const char *name); private: @@ -43,18 +44,19 @@ private: class KisGradientChooser : public KisItemChooser { typedef KisItemChooser super; Q_OBJECT + TQ_OBJECT public: // XXX: On library redesign, remove m_view parameter here, it's just a temporary hack for the autogradient dialog! - KisGradientChooser(KisView * view, QWidget *parent = 0, const char *name = 0); + KisGradientChooser(KisView * view, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisGradientChooser(); protected: virtual void update(KoIconItem *item); private: - QLabel *m_lbName; - QPushButton * m_customGradient; + TQLabel *m_lbName; + TQPushButton * m_customGradient; }; #endif // KIS_GRADIENT_CHOOSER_H_ diff --git a/krita/ui/kis_gradient_slider_widget.cc b/krita/ui/kis_gradient_slider_widget.cc index 05e724a3..8f282ba3 100644 --- a/krita/ui/kis_gradient_slider_widget.cc +++ b/krita/ui/kis_gradient_slider_widget.cc @@ -19,7 +19,7 @@ #include "kis_gradient_slider_widget.h" -#include +#include #include #include @@ -30,8 +30,8 @@ #define MARGIN 5 #define HANDLE_SIZE 10 -KisGradientSliderWidget::KisGradientSliderWidget(QWidget *parent, const char* name, WFlags f ) - : QWidget( parent, name, f), +KisGradientSliderWidget::KisGradientSliderWidget(TQWidget *tqparent, const char* name, WFlags f ) + : TQWidget( tqparent, name, f), m_currentSegment(0), m_selectedSegment(0), m_drag(0) @@ -43,7 +43,7 @@ KisGradientSliderWidget::KisGradientSliderWidget(QWidget *parent, const char* na m_segmentMenu->insertItem(i18n("Duplicate Segment"), DUPLICATE_SEGMENT); m_segmentMenu->insertItem(i18n("Mirror Segment"), MIRROR_SEGMENT); m_segmentMenu->insertItem(i18n("Remove Segment"), REMOVE_SEGMENT); - connect( m_segmentMenu, SIGNAL( activated(int) ), SLOT( slotMenuAction(int) ) ); + connect( m_segmentMenu, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotMenuAction(int) ) ); } void KisGradientSliderWidget::setGradientResource( KisAutogradientResource* agr) @@ -53,62 +53,62 @@ void KisGradientSliderWidget::setGradientResource( KisAutogradientResource* agr) emit sigSelectedSegment( m_selectedSegment ); } -void KisGradientSliderWidget::paintEvent ( QPaintEvent* pe ) +void KisGradientSliderWidget::paintEvent ( TQPaintEvent* pe ) { - QWidget::paintEvent( pe ); - QPixmap pixmap( width(), height() ); - pixmap.fill( colorGroup().background() ); - QPainter painter( &pixmap ); - painter.setPen( Qt::black ); + TQWidget::paintEvent( pe ); + TQPixmap pixmap( width(), height() ); + pixmap.fill( tqcolorGroup().background() ); + TQPainter painter( &pixmap ); + painter.setPen( TQt::black ); painter.drawRect( MARGIN, MARGIN, width() - 2 * MARGIN, height()- 2 * MARGIN - HANDLE_SIZE ); if(m_autogradientResource) { - QImage img = m_autogradientResource->generatePreview(width()- 2* MARGIN - 2, height()- 2* MARGIN - HANDLE_SIZE - 2); - QPixmap pixmap(img.width(), img.height()); + TQImage img = m_autogradientResource->generatePreview(width()- 2* MARGIN - 2, height()- 2* MARGIN - HANDLE_SIZE - 2); + TQPixmap pixmap(img.width(), img.height()); if (!img.isNull()) { m_pixmapIO.putImage(&pixmap, 0, 0, &img); painter.drawPixmap( MARGIN + 1, MARGIN + 1, pixmap, 0, 0, pixmap.width(), pixmap.height()); } - painter.fillRect( MARGIN + 1, height()- MARGIN - HANDLE_SIZE, width() - 2 * MARGIN, HANDLE_SIZE, QBrush( Qt::white ) ); + painter.fillRect( MARGIN + 1, height()- MARGIN - HANDLE_SIZE, width() - 2 * MARGIN, HANDLE_SIZE, TQBrush( TQt::white ) ); if( m_selectedSegment ) { - QRect selection( qRound( m_selectedSegment->startOffset()*(double)(width()- 2 * MARGIN - 2) ) + 6, + TQRect selection( tqRound( m_selectedSegment->startOffset()*(double)(width()- 2 * MARGIN - 2) ) + 6, height()- HANDLE_SIZE - MARGIN, - qRound( ( m_selectedSegment->endOffset() - m_selectedSegment->startOffset() )*(double)(width()-12) ), + tqRound( ( m_selectedSegment->endOffset() - m_selectedSegment->startOffset() )*(double)(width()-12) ), HANDLE_SIZE ); - painter.fillRect( selection, QBrush( colorGroup().highlight() ) ); + painter.fillRect( selection, TQBrush( tqcolorGroup().highlight() ) ); } - QPointArray triangle(3); - QValueVector handlePositions = m_autogradientResource->getHandlePositions(); + TQPointArray triangle(3); + TQValueVector handlePositions = m_autogradientResource->getHandlePositions(); int position; - painter.setBrush( QBrush( Qt::black) ); + painter.setBrush( TQBrush( TQt::black) ); for (uint i = 0; i < handlePositions.count(); i++) { - position = qRound( handlePositions[i] * (double)( width()-12) ) + 6; - triangle[0] = QPoint(position, height() - HANDLE_SIZE - MARGIN ); - triangle[1] = QPoint(position + (HANDLE_SIZE / 2 - 1), height() - MARGIN ); - triangle[2] = QPoint(position - (HANDLE_SIZE / 2 - 1), height() - MARGIN ); + position = tqRound( handlePositions[i] * (double)( width()-12) ) + 6; + triangle[0] = TQPoint(position, height() - HANDLE_SIZE - MARGIN ); + triangle[1] = TQPoint(position + (HANDLE_SIZE / 2 - 1), height() - MARGIN ); + triangle[2] = TQPoint(position - (HANDLE_SIZE / 2 - 1), height() - MARGIN ); painter.drawPolygon(triangle); } - painter.setBrush( QBrush( Qt::white ) ); - QValueVector middleHandlePositions = m_autogradientResource->getMiddleHandlePositions(); + painter.setBrush( TQBrush( TQt::white ) ); + TQValueVector middleHandlePositions = m_autogradientResource->getMiddleHandlePositions(); for (uint i = 0; i < middleHandlePositions.count(); i++) { - position = qRound( middleHandlePositions[i] * (double)(width()-12) ) + 6; - triangle[0] = QPoint(position, height()-HANDLE_SIZE - MARGIN); - triangle[1] = QPoint(position + (HANDLE_SIZE / 2 - 2), height() - MARGIN); - triangle[2] = QPoint(position - (HANDLE_SIZE / 2 - 2), height() - MARGIN); + position = tqRound( middleHandlePositions[i] * (double)(width()-12) ) + 6; + triangle[0] = TQPoint(position, height()-HANDLE_SIZE - MARGIN); + triangle[1] = TQPoint(position + (HANDLE_SIZE / 2 - 2), height() - MARGIN); + triangle[2] = TQPoint(position - (HANDLE_SIZE / 2 - 2), height() - MARGIN); painter.drawPolygon(triangle); } } - bitBlt( this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), Qt::CopyROP); + bitBlt( this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), TQt::CopyROP); } -void KisGradientSliderWidget::mousePressEvent( QMouseEvent * e ) +void KisGradientSliderWidget::mousePressEvent( TQMouseEvent * e ) { - QWidget::mousePressEvent( e ); + TQWidget::mousePressEvent( e ); if( ( e->y() < MARGIN || e->y() > height() - MARGIN ) || ( e->x() < MARGIN || e->x() > width() - MARGIN ) || e-> button() != LeftButton ) return; double t = (double)(e->x() - MARGIN) / (double)(width() - 2 * MARGIN); @@ -117,35 +117,35 @@ void KisGradientSliderWidget::mousePressEvent( QMouseEvent * e ) if(segment != 0) { m_currentSegment = segment; - QRect leftHandle( qRound(m_currentSegment->startOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), + TQRect leftHandle( tqRound(m_currentSegment->startOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), height() - HANDLE_SIZE, HANDLE_SIZE - 1, HANDLE_SIZE); - QRect middleHandle( qRound(m_currentSegment->middleOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 -2) ), + TQRect middleHandle( tqRound(m_currentSegment->middleOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 -2) ), height() - HANDLE_SIZE - MARGIN, HANDLE_SIZE - 1, HANDLE_SIZE); - QRect rightHandle( qRound(m_currentSegment->endOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), + TQRect rightHandle( tqRound(m_currentSegment->endOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), height() - HANDLE_SIZE, HANDLE_SIZE - 1, HANDLE_SIZE); // Change the activation order of the handles to avoid deadlocks if( t > 0.5 ) { - if( leftHandle.contains( e->pos() ) ) + if( leftHandle.tqcontains( e->pos() ) ) m_drag = LEFT_DRAG; - else if( middleHandle.contains( e->pos() ) ) + else if( middleHandle.tqcontains( e->pos() ) ) m_drag = MIDDLE_DRAG; - else if( rightHandle.contains( e->pos() ) ) + else if( rightHandle.tqcontains( e->pos() ) ) m_drag = RIGHT_DRAG; } else { - if( rightHandle.contains( e->pos() ) ) + if( rightHandle.tqcontains( e->pos() ) ) m_drag = RIGHT_DRAG; - else if( middleHandle.contains( e->pos() ) ) + else if( middleHandle.tqcontains( e->pos() ) ) m_drag = MIDDLE_DRAG; - else if( leftHandle.contains( e->pos() ) ) + else if( leftHandle.tqcontains( e->pos() ) ) m_drag = LEFT_DRAG; } @@ -155,18 +155,18 @@ void KisGradientSliderWidget::mousePressEvent( QMouseEvent * e ) emit sigSelectedSegment( m_selectedSegment ); } } - repaint(false); + tqrepaint(false); } -void KisGradientSliderWidget::mouseReleaseEvent ( QMouseEvent * e ) +void KisGradientSliderWidget::mouseReleaseEvent ( TQMouseEvent * e ) { - QWidget::mouseReleaseEvent( e ); + TQWidget::mouseReleaseEvent( e ); m_drag = NO_DRAG; } -void KisGradientSliderWidget::mouseMoveEvent( QMouseEvent * e ) +void KisGradientSliderWidget::mouseMoveEvent( TQMouseEvent * e ) { - QWidget::mouseMoveEvent( e ); + TQWidget::mouseMoveEvent( e ); if( ( e->y() < MARGIN || e->y() > height() - MARGIN ) || ( e->x() < MARGIN || e->x() > width() - MARGIN ) ) return; double t = (double)(e->x() - MARGIN) / (double)(width() - 2 * MARGIN); @@ -186,10 +186,10 @@ void KisGradientSliderWidget::mouseMoveEvent( QMouseEvent * e ) if ( m_drag != NO_DRAG) emit sigChangedSegment( m_currentSegment ); - repaint(false); + tqrepaint(false); } -void KisGradientSliderWidget::contextMenuEvent( QContextMenuEvent * e ) +void KisGradientSliderWidget::contextMenuEvent( TQContextMenuEvent * e ) { m_segmentMenu->setItemEnabled( REMOVE_SEGMENT, m_autogradientResource->removeSegmentPossible() ); m_segmentMenu->popup( e->globalPos()); @@ -213,7 +213,7 @@ void KisGradientSliderWidget::slotMenuAction( int id ) break; } emit sigSelectedSegment( m_selectedSegment ); - repaint(false); + tqrepaint(false); } #include "kis_gradient_slider_widget.moc" diff --git a/krita/ui/kis_gradient_slider_widget.h b/krita/ui/kis_gradient_slider_widget.h index 4bc00543..d15ac1c4 100644 --- a/krita/ui/kis_gradient_slider_widget.h +++ b/krita/ui/kis_gradient_slider_widget.h @@ -21,21 +21,22 @@ #define _KIS_WDG_GRADIENT_SLIDER_H_ #include -#include +#include class KPopupMenu; class KisAutogradientResource; class KisGradientSegment; -class KisGradientSliderWidget : public QWidget +class KisGradientSliderWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KisGradientSliderWidget(QWidget *parent = 0, const char* name = 0, WFlags f = 0); + KisGradientSliderWidget(TQWidget *tqparent = 0, const char* name = 0, WFlags f = 0); public: - virtual void paintEvent ( QPaintEvent * ); + virtual void paintEvent ( TQPaintEvent * ); void setGradientResource( KisAutogradientResource* agr); KisGradientSegment* selectedSegment() { return m_selectedSegment; }; @@ -44,10 +45,10 @@ signals: void sigChangedSegment(KisGradientSegment*); protected: - virtual void mousePressEvent( QMouseEvent * e ); - virtual void mouseReleaseEvent ( QMouseEvent * e ); - virtual void mouseMoveEvent( QMouseEvent * e ); - virtual void contextMenuEvent( QContextMenuEvent * e ); + virtual void mousePressEvent( TQMouseEvent * e ); + virtual void mouseReleaseEvent ( TQMouseEvent * e ); + virtual void mouseMoveEvent( TQMouseEvent * e ); + virtual void contextMenuEvent( TQContextMenuEvent * e ); private slots: void slotMenuAction(int id); diff --git a/krita/ui/kis_grid_drawer.cpp b/krita/ui/kis_grid_drawer.cpp index 3af8a92e..cd0963ab 100644 --- a/krita/ui/kis_grid_drawer.cpp +++ b/krita/ui/kis_grid_drawer.cpp @@ -25,7 +25,7 @@ #endif #ifdef HAVE_GL -#include +#include #endif #include "kis_config.h" @@ -33,29 +33,29 @@ #include "kis_perspective_grid.h" #include "kis_perspective_grid_manager.h" -Qt::PenStyle GridDrawer::gs2style(Q_UINT32 s) +Qt::PenStyle GridDrawer::gs2style(TQ_UINT32 s) { switch(s) { case 1: - return Qt::DashLine; + return TQt::DashLine; case 2: - return Qt::DotLine; + return TQt::DotLine; case 3: - return Qt::DashDotLine; + return TQt::DashDotLine; case 4: - return Qt::DashDotDotLine; + return TQt::DashDotDotLine; default: - return Qt::SolidLine; + return TQt::SolidLine; } } -void GridDrawer::drawPerspectiveGrid(KisImageSP image, const QRect& /*wr*/, const KisSubPerspectiveGrid* grid) +void GridDrawer::drawPerspectiveGrid(KisImageSP image, const TQRect& /*wr*/, const KisSubPerspectiveGrid* grid) { Q_UNUSED(image); KisConfig cfg; - QPen mainPen = QPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); - QPen subdivisionPen = QPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); + TQPen mainPen = TQPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); + TQPen subdivisionPen = TQPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); setPen(subdivisionPen ); // 1 -> top-left corner // 2 -> top-right corner @@ -80,12 +80,12 @@ void GridDrawer::drawPerspectiveGrid(KisImageSP image, const QRect& /*wr*/, cons KisPoint pol1 = *grid->topRight() + i * v12; KisPerspectiveMath::LineEquation d1 = KisPerspectiveMath::computeLineEquation( &pol1, &vertVanishingPoint ); KisPoint pol1b = KisPerspectiveMath::computeIntersection(d1,d34); - drawLine( pol1.roundQPoint(), pol1b.roundQPoint() ); + drawLine( pol1.roundTQPoint(), pol1b.roundTQPoint() ); KisPoint pol2 = *grid->bottomRight() + i * v23; KisPerspectiveMath::LineEquation d2 = KisPerspectiveMath::computeLineEquation( &pol2, &horizVanishingPoint ); KisPoint pol2b = KisPerspectiveMath::computeIntersection(d2,d41); - drawLine( pol2.roundQPoint(), pol2b.roundQPoint() ); + drawLine( pol2.roundTQPoint(), pol2b.roundTQPoint() ); } setPen(mainPen); drawLine( grid->topLeft(), grid->topRight() ); @@ -94,26 +94,26 @@ void GridDrawer::drawPerspectiveGrid(KisImageSP image, const QRect& /*wr*/, cons drawLine( grid->bottomLeft(), grid->topLeft() ); } -void GridDrawer::drawGrid(KisImageSP image, const QRect& wr) +void GridDrawer::drawGrid(KisImageSP image, const TQRect& wr) { KisConfig cfg; - Q_UINT32 offsetx = cfg.getGridOffsetX(); - Q_UINT32 offsety = cfg.getGridOffsetY(); - Q_UINT32 hspacing = cfg.getGridHSpacing(); - Q_UINT32 vspacing = cfg.getGridVSpacing(); - Q_UINT32 subdivision = cfg.getGridSubdivisions() - 1; + TQ_UINT32 offsetx = cfg.getGridOffsetX(); + TQ_UINT32 offsety = cfg.getGridOffsetY(); + TQ_UINT32 hspacing = cfg.getGridHSpacing(); + TQ_UINT32 vspacing = cfg.getGridVSpacing(); + TQ_UINT32 subdivision = cfg.getGridSubdivisions() - 1; //double ihspsub = hspacing / (double)subdivision; //double ivspsub = hspacing / (double)subdivision; - Q_INT32 imageWidth = image->width(); - Q_INT32 imageHeight = image->height(); + TQ_INT32 imageWidth = image->width(); + TQ_INT32 imageHeight = image->height(); // Draw vertical line - QPen mainPen = QPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); - QPen subdivisionPen = QPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); - Q_UINT32 i = 0; - for( Q_INT32 x = offsetx; x <= wr.right(); x +=hspacing) + TQPen mainPen = TQPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); + TQPen subdivisionPen = TQPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); + TQ_UINT32 i = 0; + for( TQ_INT32 x = offsetx; x <= wr.right(); x +=hspacing) { if( i == subdivision ) { @@ -132,7 +132,7 @@ void GridDrawer::drawGrid(KisImageSP image, const QRect& wr) } // Draw horizontal line i = 0; - for( Q_INT32 y = offsety; y <= wr.bottom(); y +=vspacing) + for( TQ_INT32 y = offsety; y <= wr.bottom(); y +=vspacing) { if( i == subdivision ) { @@ -163,34 +163,34 @@ OpenGLGridDrawer::~OpenGLGridDrawer() #endif } -void OpenGLGridDrawer::setPen(const QPen& pen) +void OpenGLGridDrawer::setPen(const TQPen& pen) { #ifdef HAVE_GL Qt::PenStyle penStyle = pen.style(); - if (penStyle == Qt::SolidLine) { + if (penStyle == TQt::SolidLine) { glDisable(GL_LINE_STIPPLE); } else { GLushort lineStipple; switch (penStyle) { - case Qt::NoPen: + case TQt::NoPen: lineStipple = 0; break; default: - case Qt::SolidLine: + case TQt::SolidLine: lineStipple = 0xffff; break; - case Qt::DashLine: + case TQt::DashLine: lineStipple = 0x3fff; break; - case Qt::DotLine: + case TQt::DotLine: lineStipple = 0x3333; break; - case Qt::DashDotLine: + case TQt::DashDotLine: lineStipple = 0x33ff; break; - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: lineStipple = 0x333f; break; } @@ -199,7 +199,7 @@ void OpenGLGridDrawer::setPen(const QPen& pen) glLineStipple(1, lineStipple); } - QColor penColor = pen.color(); + TQColor penColor = pen.color(); glColor3ub(penColor.red(), penColor.green(), penColor.blue()); #else @@ -207,7 +207,7 @@ void OpenGLGridDrawer::setPen(const QPen& pen) #endif } -void OpenGLGridDrawer::drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2) +void OpenGLGridDrawer::drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2) { #ifdef HAVE_GL glBegin(GL_LINES); diff --git a/krita/ui/kis_grid_drawer.h b/krita/ui/kis_grid_drawer.h index 1078883e..301f1e0a 100644 --- a/krita/ui/kis_grid_drawer.h +++ b/krita/ui/kis_grid_drawer.h @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include "kis_types.h" #include "kis_point.h" @@ -37,26 +37,26 @@ class GridDrawer { virtual ~GridDrawer() {} public: - void drawGrid(KisImageSP image, const QRect& wr); - void drawPerspectiveGrid(KisImageSP image, const QRect& wr, const KisSubPerspectiveGrid* grid); + void drawGrid(KisImageSP image, const TQRect& wr); + void drawPerspectiveGrid(KisImageSP image, const TQRect& wr, const KisSubPerspectiveGrid* grid); - virtual void setPen(const QPen& pen) = 0; - virtual void drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2) = 0; - inline void drawLine(const QPoint& p1, const QPoint& p2) { drawLine(p1.x(), p1.y(), p2.x(), p2.y() ); } - inline void drawLine(const KisPoint* p1, const KisPoint* p2) { drawLine( p1->roundQPoint(), p2->roundQPoint()); } + virtual void setPen(const TQPen& pen) = 0; + virtual void drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2) = 0; + inline void drawLine(const TQPoint& p1, const TQPoint& p2) { drawLine(p1.x(), p1.y(), p2.x(), p2.y() ); } + inline void drawLine(const KisPoint* p1, const KisPoint* p2) { drawLine( p1->roundTQPoint(), p2->roundTQPoint()); } private: - Qt::PenStyle gs2style(Q_UINT32 s); + Qt::PenStyle gs2style(TQ_UINT32 s); }; -class QPainterGridDrawer : public GridDrawer { +class TQPainterGridDrawer : public GridDrawer { public: - QPainterGridDrawer(QPainter *p) { m_painter = p; } + TQPainterGridDrawer(TQPainter *p) { m_painter = p; } - virtual void setPen(const QPen& pen) { m_painter->setPen(pen); } - virtual void drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2) { m_painter->drawLine(x1, y1, x2, y2); } + virtual void setPen(const TQPen& pen) { m_painter->setPen(pen); } + virtual void drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2) { m_painter->drawLine(x1, y1, x2, y2); } private: - QPainter *m_painter; + TQPainter *m_painter; }; class OpenGLGridDrawer : public GridDrawer { @@ -64,8 +64,8 @@ public: OpenGLGridDrawer(); virtual ~OpenGLGridDrawer(); - virtual void setPen(const QPen& pen); - virtual void drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2); + virtual void setPen(const TQPen& pen); + virtual void drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2); }; #endif diff --git a/krita/ui/kis_grid_manager.cpp b/krita/ui/kis_grid_manager.cpp index 0bbbcd88..b659a3b5 100644 --- a/krita/ui/kis_grid_manager.cpp +++ b/krita/ui/kis_grid_manager.cpp @@ -25,10 +25,10 @@ #endif #ifdef HAVE_GL -#include +#include #endif -#include +#include #include #include @@ -40,8 +40,8 @@ #include "kis_image.h" #include "kis_view.h" -KisGridManager::KisGridManager(KisView * parent) - : QObject(parent), m_view(parent) +KisGridManager::KisGridManager(KisView * tqparent) + : TQObject(tqparent), m_view(tqparent) { } @@ -53,17 +53,17 @@ KisGridManager::~KisGridManager() void KisGridManager::setup(KActionCollection * collection) { - m_toggleGrid = new KToggleAction(i18n("Show Grid"), "", this, SLOT(toggleGrid()), collection, "view_toggle_grid"); + m_toggleGrid = new KToggleAction(i18n("Show Grid"), "", this, TQT_SLOT(toggleGrid()), collection, "view_toggle_grid"); m_toggleGrid->setCheckedState(KGuiItem(i18n("Hide Grid"))); m_toggleGrid->setChecked(false); // Fast grid config - m_gridFastConfig1x1 = new KAction(i18n("1x1"), 0, "", this, SLOT(fastConfig1x1()), collection, "view_fast_grid_1x1"); - m_gridFastConfig2x2 = new KAction(i18n("2x2"), 0, "", this, SLOT(fastConfig2x2()), collection, "view_fast_grid_2x2"); - m_gridFastConfig5x5 = new KAction(i18n("5x5"), 0, "", this, SLOT(fastConfig5x5()), collection, "view_fast_grid_5x5"); - m_gridFastConfig10x10 = new KAction(i18n("10x10"), 0, "", this, SLOT(fastConfig10x10()), collection, "view_fast_grid_10x10"); - m_gridFastConfig20x20 = new KAction(i18n("20x20"), 0, "", this, SLOT(fastConfig20x20()), collection, "view_fast_grid_20x20"); - m_gridFastConfig40x40 = new KAction(i18n("40x40"), 0, "", this, SLOT(fastConfig40x40()), collection, "view_fast_grid_40x40"); + m_gridFastConfig1x1 = new KAction(i18n("1x1"), 0, "", this, TQT_SLOT(fastConfig1x1()), collection, "view_fast_grid_1x1"); + m_gridFastConfig2x2 = new KAction(i18n("2x2"), 0, "", this, TQT_SLOT(fastConfig2x2()), collection, "view_fast_grid_2x2"); + m_gridFastConfig5x5 = new KAction(i18n("5x5"), 0, "", this, TQT_SLOT(fastConfig5x5()), collection, "view_fast_grid_5x5"); + m_gridFastConfig10x10 = new KAction(i18n("10x10"), 0, "", this, TQT_SLOT(fastConfig10x10()), collection, "view_fast_grid_10x10"); + m_gridFastConfig20x20 = new KAction(i18n("20x20"), 0, "", this, TQT_SLOT(fastConfig20x20()), collection, "view_fast_grid_20x20"); + m_gridFastConfig40x40 = new KAction(i18n("40x40"), 0, "", this, TQT_SLOT(fastConfig40x40()), collection, "view_fast_grid_40x40"); } void KisGridManager::updateGUI() @@ -124,7 +124,7 @@ void KisGridManager::fastConfig40x40() m_view->updateCanvas(); } -void KisGridManager::drawGrid(QRect wr, QPainter *p, bool openGL) +void KisGridManager::drawGrid(TQRect wr, TQPainter *p, bool openGL) { KisImageSP image = m_view->canvasSubject()->currentImg(); @@ -139,7 +139,7 @@ void KisGridManager::drawGrid(QRect wr, QPainter *p, bool openGL) Q_ASSERT(p); if (p) { - gridDrawer = new QPainterGridDrawer(p); + gridDrawer = new TQPainterGridDrawer(p); } } diff --git a/krita/ui/kis_grid_manager.h b/krita/ui/kis_grid_manager.h index bd46b5bc..79eaffc8 100644 --- a/krita/ui/kis_grid_manager.h +++ b/krita/ui/kis_grid_manager.h @@ -21,7 +21,7 @@ #ifndef KIS_GRID_MANAGER_H #define KIS_GRID_MANAGER_H -#include +#include #include "kis_types.h" @@ -30,15 +30,16 @@ class KActionCollection; class KToggleAction; class KAction; -class KisGridManager : public QObject +class KisGridManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisGridManager(KisView * parent); + KisGridManager(KisView * tqparent); ~KisGridManager(); public: void setup(KActionCollection * collection); - void drawGrid(QRect wr, QPainter *p, bool openGL = false); + void drawGrid(TQRect wr, TQPainter *p, bool openGL = false); public slots: void updateGUI(); private slots: diff --git a/krita/ui/kis_histogram_view.cc b/krita/ui/kis_histogram_view.cc index 67c30889..cc4fe59c 100644 --- a/krita/ui/kis_histogram_view.cc +++ b/krita/ui/kis_histogram_view.cc @@ -18,13 +18,13 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include @@ -38,13 +38,13 @@ #include "kis_basic_histogram_producers.h" #include "kis_paint_device.h" -KisHistogramView::KisHistogramView(QWidget *parent, const char *name, WFlags f) - : QLabel(parent, name, f) +KisHistogramView::KisHistogramView(TQWidget *tqparent, const char *name, WFlags f) + : TQLabel(tqparent, name, f) { // This is needed until we can computationally scale it well. Until then, this is needed // And when we have it, it won't hurt to have it around setScaledContents(true); - setFrameShape(QFrame::Box); // Draw a box around ourselves + setFrameShape(TQFrame::Box); // Draw a box around ourselves } KisHistogramView::~KisHistogramView() @@ -108,7 +108,7 @@ KisHistogramProducerSP KisHistogramView::currentProducer() return m_currentProducer; } -QStringList KisHistogramView::channelStrings() +TQStringList KisHistogramView::channelStrings() { return m_channelStrings; } @@ -120,14 +120,14 @@ KisIDList KisHistogramView::listProducers() return KisIDList(); } -void KisHistogramView::setCurrentChannels(const KisID& producerID, QValueVector channels) +void KisHistogramView::setCurrentChannels(const KisID& producerID, TQValueVector channels) { setCurrentChannels( KisHistogramProducerFactoryRegistry::instance()->get(producerID)->generate(), channels); } -void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, QValueVector channels) +void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, TQValueVector channels) { m_currentProducer = producer; m_currentProducer->setView(m_from, m_width); @@ -143,7 +143,7 @@ void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, QValu return; } - QValueVector producerChannels = m_currentProducer->channels(); + TQValueVector producerChannels = m_currentProducer->channels(); for (uint i = 0; i < channels.count(); i++) { // Also makes sure the channel is actually in the producer's list @@ -197,7 +197,7 @@ void KisHistogramView::setActiveChannel(int channel) m_histogram->setChannel(0); // Set a default channel, just being nice } else { m_color = false; - QValueVector channels = m_currentProducer->channels(); + TQValueVector channels = m_currentProducer->channels(); for (uint i = 0; i < channels.count(); i++) { KisChannelInfo* channel = channels.at(i); if (channel->name() == info.channel->name()) { @@ -249,7 +249,7 @@ void KisHistogramView::addProducerChannels(KisHistogramProducerSP producer) { info.isProducer = true; info.producer = producer; // channel not used for a producer - QValueVector channels = info.producer->channels(); + TQValueVector channels = info.producer->channels(); int count = channels.count(); m_comboInfo.append(info); m_channelStrings.append(producer->id() . name()); @@ -257,24 +257,24 @@ void KisHistogramView::addProducerChannels(KisHistogramProducerSP producer) { info.isProducer = false; info.channel = channels.at(j); m_comboInfo.append(info); - m_channelStrings.append(QString(" ").append(info.channel->name())); + m_channelStrings.append(TQString(" ").append(info.channel->name())); } } void KisHistogramView::updateHistogram() { - Q_UINT32 height = this->height(); + TQ_UINT32 height = this->height(); int selFrom, selTo; // from - to in bins if (!m_currentProducer) { // Something's very wrong: no producer for this colorspace to update histogram with! return; } - Q_INT32 bins = m_histogram->producer()->numberOfBins(); - m_pix = QPixmap(bins, height); + TQ_INT32 bins = m_histogram->producer()->numberOfBins(); + m_pix = TQPixmap(bins, height); m_pix.fill(); - QPainter p(&m_pix); - p.setBrush(Qt::black); + TQPainter p(&m_pix); + p.setBrush(TQt::black); // Draw the box of the selection, if any if (m_histogram->hasSelection()) { @@ -289,7 +289,7 @@ void KisHistogramView::updateHistogram() selTo = 2; } - Q_INT32 i = 0; + TQ_INT32 i = 0; double highest = 0; bool blackOnBlack = false; @@ -302,16 +302,16 @@ void KisHistogramView::updateHistogram() } for (uint chan = 0; chan < m_channels.count(); chan++) { - QColor color; + TQColor color; m_histogram->setChannel(m_channelToOffset.at(chan)); if (m_color) { color = m_channels.at(chan)->color(); p.setPen(color); } else { - color = Qt::black; + color = TQt::black; } - blackOnBlack = (color == Qt::black); + blackOnBlack = (color == TQt::black); if (m_histogram->getHistogramType() == LINEAR) { double factor = (double)height / highest; @@ -319,7 +319,7 @@ void KisHistogramView::updateHistogram() // So that we get a good view even with a selection box with // black colors on background of black selection if (i >= selFrom && i < selTo && blackOnBlack) { - p.setPen(Qt::white); + p.setPen(TQt::white); } else { p.setPen(color); } @@ -330,7 +330,7 @@ void KisHistogramView::updateHistogram() for( i = 0; i < bins; ++i ) { // Same as above if (i >= selFrom && i < selTo && blackOnBlack) { - p.setPen(Qt::white); + p.setPen(TQt::white); } else { p.setPen(color); } @@ -343,11 +343,11 @@ void KisHistogramView::updateHistogram() setPixmap(m_pix); } -void KisHistogramView::mousePressEvent(QMouseEvent * e) { +void KisHistogramView::mousePressEvent(TQMouseEvent * e) { if (e->button() == Qt::RightButton) emit rightClicked(e->globalPos()); else - QLabel::mousePressEvent(e); + TQLabel::mousePressEvent(e); } diff --git a/krita/ui/kis_histogram_view.h b/krita/ui/kis_histogram_view.h index b44ee79d..6b4524a8 100644 --- a/krita/ui/kis_histogram_view.h +++ b/krita/ui/kis_histogram_view.h @@ -19,10 +19,10 @@ #ifndef _KIS_HISTOGRAM_VIEW_ #define _KIS_HISTOGRAM_VIEW_ -#include -#include -#include -#include +#include +#include +#include +#include #include "kis_types.h" #include "kis_histogram_producer.h" @@ -45,23 +45,24 @@ class KisChannelInfo; * some functionality will disappear, like listProducers(). Setting a histogram will discard * info on the layer, and setting a layer will discard info on the histogram. **/ -class KisHistogramView : public QLabel { +class KisHistogramView : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KisHistogramView(QWidget *parent = 0, const char *name = 0, WFlags f = 0); + KisHistogramView(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); virtual ~KisHistogramView(); void setPaintDevice(KisPaintDeviceSP dev); void setHistogram(KisHistogramSP histogram); void setView(double from, double size); KisHistogramProducerSP currentProducer(); - QStringList channelStrings(); + TQStringList channelStrings(); /** Lists all producers currently available */ KisIDList listProducers(); /** Sets the currently displayed channels to channels of the producer with producerID as ID*/ - void setCurrentChannels(const KisID& producerID, QValueVector channels); + void setCurrentChannels(const KisID& producerID, TQValueVector channels); /** Be careful, producer will be modified */ - void setCurrentChannels(KisHistogramProducerSP producer, QValueVector channels); + void setCurrentChannels(KisHistogramProducerSP producer, TQValueVector channels); bool hasColor(); void setColor(bool set); @@ -71,10 +72,10 @@ public slots: void updateHistogram(); signals: - void rightClicked(const QPoint& pos); + void rightClicked(const TQPoint& pos); protected: - virtual void mousePressEvent(QMouseEvent * e); + virtual void mousePressEvent(TQMouseEvent * e); private: void setChannels(); @@ -86,15 +87,15 @@ private: KisChannelInfo * channel; } ComboboxInfo; - QValueVector m_comboInfo; - QPixmap m_pix; + TQValueVector m_comboInfo; + TQPixmap m_pix; KisHistogramSP m_histogram; KisColorSpace* m_cs; KisHistogramProducerSP m_currentProducer; - QValueVector m_channels; + TQValueVector m_channels; // Maps the channels in m_channels to a real channel offset in the producer->channels() - QValueVector m_channelToOffset; - QStringList m_channelStrings; + TQValueVector m_channelToOffset; + TQStringList m_channelStrings; bool m_color; double m_from; double m_width; diff --git a/krita/ui/kis_icon_item.cc b/krita/ui/kis_icon_item.cc index 443416cc..339017fc 100644 --- a/krita/ui/kis_icon_item.cc +++ b/krita/ui/kis_icon_item.cc @@ -43,7 +43,7 @@ void KisIconItem::updatePixmaps() validThumb = false; if (m_resource && m_resource->valid()) { - QImage img = m_resource->img(); + TQImage img = m_resource->img(); if (img.isNull()) { m_resource->setValid(false); @@ -52,23 +52,23 @@ void KisIconItem::updatePixmaps() } if (img.width() > THUMB_SIZE || img.height() > THUMB_SIZE) { - QImage thumb = img; - Q_INT32 xsize = THUMB_SIZE; - Q_INT32 ysize = THUMB_SIZE; - Q_INT32 picW = thumb.width(); - Q_INT32 picH = thumb.height(); + TQImage thumb = img; + TQ_INT32 xsize = THUMB_SIZE; + TQ_INT32 ysize = THUMB_SIZE; + TQ_INT32 picW = thumb.width(); + TQ_INT32 picH = thumb.height(); if (picW > picH) { float yFactor = (float)((float)(float)picH / (float)picW); - ysize = (Q_INT32)(yFactor * (float)THUMB_SIZE); + ysize = (TQ_INT32)(yFactor * (float)THUMB_SIZE); if (ysize > THUMB_SIZE) ysize = THUMB_SIZE; } else if (picW < picH) { float xFactor = (float)((float)picW / (float)picH); - xsize = (Q_INT32)(xFactor * (float)THUMB_SIZE); + xsize = (TQ_INT32)(xFactor * (float)THUMB_SIZE); if (xsize > THUMB_SIZE) xsize = THUMB_SIZE; @@ -77,25 +77,25 @@ void KisIconItem::updatePixmaps() thumb = thumb.smoothScale(xsize, ysize); if (!thumb.isNull()) { - m_thumb = QPixmap(thumb); + m_thumb = TQPixmap(thumb); validThumb = !m_thumb.isNull(); } } img = img.convertDepth(32); - m_pixmap = QPixmap(img); + m_pixmap = TQPixmap(img); validPixmap = true; } } -QPixmap& KisIconItem::pixmap() const +TQPixmap& KisIconItem::pixmap() const { - return const_cast(m_pixmap); + return const_cast(m_pixmap); } -QPixmap& KisIconItem::thumbPixmap() const +TQPixmap& KisIconItem::thumbPixmap() const { - return const_cast(m_thumb); + return const_cast(m_thumb); } KisResource *KisIconItem::resource() const diff --git a/krita/ui/kis_icon_item.h b/krita/ui/kis_icon_item.h index 7d76f05c..9e8f1b09 100644 --- a/krita/ui/kis_icon_item.h +++ b/krita/ui/kis_icon_item.h @@ -29,8 +29,8 @@ public: KisIconItem(KisResource *resource); virtual ~KisIconItem(); - virtual QPixmap& pixmap() const; - virtual QPixmap& thumbPixmap() const; + virtual TQPixmap& pixmap() const; + virtual TQPixmap& thumbPixmap() const; KisResource *resource() const; @@ -40,8 +40,8 @@ public: private: KisResource *m_resource; - QPixmap m_pixmap; - QPixmap m_thumb; + TQPixmap m_pixmap; + TQPixmap m_thumb; }; #endif // KIS_ICON_ITEM_H_ diff --git a/krita/ui/kis_iconwidget.cc b/krita/ui/kis_iconwidget.cc index 20f8838d..3e9ce4f1 100644 --- a/krita/ui/kis_iconwidget.cc +++ b/krita/ui/kis_iconwidget.cc @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include "kis_iconwidget.h" -KisIconWidget::KisIconWidget(QWidget *parent, const char *name) : super(parent, name) +KisIconWidget::KisIconWidget(TQWidget *tqparent, const char *name) : super(tqparent, name) { m_item = 0; } @@ -32,18 +32,18 @@ void KisIconWidget::slotSetItem(KoIconItem& item) update(); } -void KisIconWidget::drawButtonLabel(QPainter *p) +void KisIconWidget::drawButtonLabel(TQPainter *p) { if (m_item) { - const QPixmap& pix = m_item->pixmap(); - Q_INT32 x = 2; - Q_INT32 y = 2; - Q_INT32 pw = pix.width(); - Q_INT32 ph = pix.height(); - Q_INT32 cw = width(); - Q_INT32 ch = height(); - Q_INT32 itemWidth = 24; - Q_INT32 itemHeight = 24; + const TQPixmap& pix = m_item->pixmap(); + TQ_INT32 x = 2; + TQ_INT32 y = 2; + TQ_INT32 pw = pix.width(); + TQ_INT32 ph = pix.height(); + TQ_INT32 cw = width(); + TQ_INT32 ch = height(); + TQ_INT32 itemWidth = 24; + TQ_INT32 itemHeight = 24; if (pw < itemWidth) x = (cw - pw) / 2; @@ -53,7 +53,7 @@ void KisIconWidget::drawButtonLabel(QPainter *p) if (!m_item->hasValidThumb() || (pw <= itemWidth && ph <= itemHeight)) { p->drawPixmap(x, y, pix, 0, 0, itemWidth, itemHeight); } else { - const QPixmap& thumbpix = m_item->thumbPixmap(); + const TQPixmap& thumbpix = m_item->thumbPixmap(); x = 2; y = 2; diff --git a/krita/ui/kis_iconwidget.h b/krita/ui/kis_iconwidget.h index e595dbe2..d65cbcbd 100644 --- a/krita/ui/kis_iconwidget.h +++ b/krita/ui/kis_iconwidget.h @@ -20,26 +20,27 @@ #ifndef KIS_ICONWIDGET_H_ #define KIS_ICONWIDGET_H_ -#include +#include class KoIconItem; -class KisIconWidget : public QToolButton { - typedef QToolButton super; +class KisIconWidget : public TQToolButton { + typedef TQToolButton super; Q_OBJECT + TQ_OBJECT /** * The icon widget is used in the control box where the current color and brush * are shown. */ public: - KisIconWidget(QWidget *parent = 0, const char *name = 0); + KisIconWidget(TQWidget *tqparent = 0, const char *name = 0); public slots: void slotSetItem(KoIconItem& item); protected: - virtual void drawButtonLabel(QPainter *gc); + virtual void drawButtonLabel(TQPainter *gc); private: KoIconItem *m_item; diff --git a/krita/ui/kis_import_catcher.cc b/krita/ui/kis_import_catcher.cc index 656ab969..b2d04cab 100644 --- a/krita/ui/kis_import_catcher.cc +++ b/krita/ui/kis_import_catcher.cc @@ -27,7 +27,7 @@ #include "kis_group_layer.h" KisImportCatcher::KisImportCatcher(KURL url, KisImageSP image) - : QObject() + : TQObject() , m_doc( new KisDoc() ) , m_image( image ) , m_url( url ) @@ -37,7 +37,7 @@ KisImportCatcher::KisImportCatcher(KURL url, KisImageSP image) slotLoadingFinished(); } else { - connect(m_doc, SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + connect(m_doc, TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); } } @@ -54,23 +54,23 @@ void KisImportCatcher::slotLoadingFinished() // Don't import the root if this is not a layered image (1 group layer // plus 1 other). importedImageLayer = importedImageLayer->firstChild(); - importedImageLayer->parent()->removeLayer(importedImageLayer); + importedImageLayer->tqparent()->removeLayer(importedImageLayer); } importedImageLayer->setName(m_url.prettyURL()); - KisGroupLayerSP parent = 0; + KisGroupLayerSP tqparent = 0; KisLayerSP currentActiveLayer = m_image->activeLayer(); if (currentActiveLayer) { - parent = currentActiveLayer->parent(); + tqparent = currentActiveLayer->tqparent(); } - if (parent == 0) { - parent = m_image->rootLayer(); + if (tqparent == 0) { + tqparent = m_image->rootLayer(); } - m_image->addLayer(importedImageLayer.data(), parent, currentActiveLayer); + m_image->addLayer(importedImageLayer.data(), tqparent, currentActiveLayer); } } m_doc->deleteLater(); diff --git a/krita/ui/kis_import_catcher.h b/krita/ui/kis_import_catcher.h index 8e7777ac..6f6923e1 100644 --- a/krita/ui/kis_import_catcher.h +++ b/krita/ui/kis_import_catcher.h @@ -19,7 +19,7 @@ #ifndef KIS_IMPORT_CATCHER_H_ #define KIS_IMPORT_CATCHER_H_ -#include +#include #include @@ -36,9 +36,10 @@ class KisDoc; * Caveat: this class calls "delete this", which means that you new * it and then never touch it again. Thanks you very much. */ -class KisImportCatcher : QObject { +class KisImportCatcher : TQObject { Q_OBJECT + TQ_OBJECT public: diff --git a/krita/ui/kis_input_device.cc b/krita/ui/kis_input_device.cc index 3f63e156..0923c727 100644 --- a/krita/ui/kis_input_device.cc +++ b/krita/ui/kis_input_device.cc @@ -21,7 +21,7 @@ #define UNKNOWN_INPUT_DEVICE_ID -1 #define FIRST_INPUT_DEVICE_ID 0 -Q_INT32 KisInputDevice::NextInputDeviceID = FIRST_INPUT_DEVICE_ID; +TQ_INT32 KisInputDevice::NextInputDeviceID = FIRST_INPUT_DEVICE_ID; KisInputDevice KisInputDevice::Mouse; KisInputDevice KisInputDevice::Stylus; @@ -29,7 +29,7 @@ KisInputDevice KisInputDevice::Eraser; KisInputDevice KisInputDevice::Puck; KisInputDevice KisInputDevice::Unknown(UNKNOWN_INPUT_DEVICE_ID); -QValueVector KisInputDevice::InputDevices; +TQValueVector KisInputDevice::InputDevices; KisInputDevice::KisInputDevice() { @@ -62,7 +62,7 @@ void KisInputDevice::allocateDefaultDevicesIfNeeded() } } -QValueVector KisInputDevice::inputDevices() +TQValueVector KisInputDevice::inputDevices() { allocateDefaultDevicesIfNeeded(); diff --git a/krita/ui/kis_input_device.h b/krita/ui/kis_input_device.h index 91c5ff4f..d85d4e3f 100644 --- a/krita/ui/kis_input_device.h +++ b/krita/ui/kis_input_device.h @@ -19,14 +19,14 @@ #ifndef KIS_INPUT_DEVICE_H_ #define KIS_INPUT_DEVICE_H_ -#include +#include class KisInputDevice { public: KisInputDevice(); static KisInputDevice allocateInputDevice(); - static QValueVector inputDevices(); + static TQValueVector inputDevices(); friend inline bool operator==(const KisInputDevice&, const KisInputDevice&); friend inline bool operator!=(const KisInputDevice&, const KisInputDevice&); @@ -35,24 +35,24 @@ public: friend inline bool operator>(const KisInputDevice &, const KisInputDevice &); static KisInputDevice mouse(); // Standard mouse - static KisInputDevice stylus(); // Wacom stylus via QTabletEvent - static KisInputDevice eraser(); // Wacom eraser via QTabletEvent - static KisInputDevice puck(); // Wacom puck via QTabletEvent + static KisInputDevice stylus(); // Wacom stylus via TQTabletEvent + static KisInputDevice eraser(); // Wacom eraser via TQTabletEvent + static KisInputDevice puck(); // Wacom puck via TQTabletEvent static KisInputDevice unknown(); private: - KisInputDevice(Q_INT32 id) : m_id(id) {} + KisInputDevice(TQ_INT32 id) : m_id(id) {} - Q_INT32 id() const { return m_id; } + TQ_INT32 id() const { return m_id; } static void allocateDefaultDevicesIfNeeded(); static KisInputDevice allocateNextDevice(); private: - Q_INT32 m_id; + TQ_INT32 m_id; - static Q_INT32 NextInputDeviceID; - static QValueVector InputDevices; + static TQ_INT32 NextInputDeviceID; + static TQValueVector InputDevices; static KisInputDevice Mouse; static KisInputDevice Stylus; diff --git a/krita/ui/kis_int_spinbox.cc b/krita/ui/kis_int_spinbox.cc index 0d5d8c75..2512a78b 100644 --- a/krita/ui/kis_int_spinbox.cc +++ b/krita/ui/kis_int_spinbox.cc @@ -2,7 +2,7 @@ * Copyright (c) 2006 Boudewijn Rempt * Copyright (c) 2006 Casper Boemann * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This library is free software; you can redistribute it and/or @@ -28,16 +28,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -56,19 +56,19 @@ public: KisPopupSlider *m_slider; KArrowButton *m_arrow; int m_prevValue; - QValidator *m_validator; - QTimer m_timer; + TQValidator *m_validator; + TQTimer m_timer; }; -KisIntSpinbox::KisIntSpinbox(QWidget *parent, const char *name) - : QWidget(parent, name) +KisIntSpinbox::KisIntSpinbox(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { init(0); } -KisIntSpinbox::KisIntSpinbox(const QString & /*label*/, int val, QWidget *parent, const char *name) - : QWidget(parent, name) +KisIntSpinbox::KisIntSpinbox(const TQString & /*label*/, int val, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { init(val); } @@ -76,19 +76,19 @@ KisIntSpinbox::KisIntSpinbox(const QString & /*label*/, int val, QWidget *parent void KisIntSpinbox::init(int val) { d = new KisIntSpinboxPrivate( ); - QBoxLayout * l = new QHBoxLayout( this ); + TQBoxLayout * l = new TQHBoxLayout( this ); l->insertStretch(0, 1); d->m_numinput = new KIntSpinBox(0, 100, 1, val, 10, this, "KisIntSpinbox::KIntSpinBox"); - d->m_numinput->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + d->m_numinput->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); d->m_numinput->setSuffix("%"); l->addWidget( d->m_numinput ); - d->m_slider = new KisPopupSlider(0, 100, 10, val, QSlider::Horizontal, this); - d->m_slider->setFrameStyle(QFrame::Panel|QFrame::Raised); + d->m_slider = new KisPopupSlider(0, 100, 10, val, TQSlider::Horizontal, this); + d->m_slider->setFrameStyle(TQFrame::Panel|TQFrame::Raised); - d->m_arrow = new KArrowButton(this, Qt::DownArrow); + d->m_arrow = new KArrowButton(this, TQt::DownArrow); d->m_arrow->setPopup(d->m_slider); d->m_arrow->setMaximumHeight( fontMetrics().height() + 4); d->m_arrow->setEnabled(true); // Why is the arrow still gray? @@ -98,14 +98,14 @@ void KisIntSpinbox::init(int val) d->m_prevValue = val; setValue(val); setFocusProxy(d->m_numinput); - layout(); + tqlayout(); - connect(d->m_numinput, SIGNAL(valueChanged(int)), SLOT(spinboxValueChanged(int))); - connect(d->m_slider, SIGNAL(valueChanged(int)), SLOT(sliderValueChanged(int))); - connect(d->m_slider, SIGNAL(aboutToShow()), SLOT(slotAboutToShow())); - connect(d->m_slider, SIGNAL(aboutToHide()), SLOT(slotAboutToHide())); + connect(d->m_numinput, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinboxValueChanged(int))); + connect(d->m_slider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderValueChanged(int))); + connect(d->m_slider, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); + connect(d->m_slider, TQT_SIGNAL(aboutToHide()), TQT_SLOT(slotAboutToHide())); - connect(&(d->m_timer), SIGNAL(timeout()), this, SLOT(slotTimeout())); + connect(&(d->m_timer), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } void KisIntSpinbox::spinboxValueChanged(int val) @@ -128,7 +128,7 @@ void KisIntSpinbox::setRange(int lower, int upper, int /*step*/) lower = kMin(upper, lower); d->m_slider->setRange(lower, upper); - layout(); + tqlayout(); } void KisIntSpinbox::setMinValue(int min) @@ -172,7 +172,7 @@ int KisIntSpinbox::value() const return d->m_numinput->value(); // From the numinput: that one isn't in steps of ten } -void KisIntSpinbox::setLabel(const QString & /*label*/) +void KisIntSpinbox::setLabel(const TQString & /*label*/) { } diff --git a/krita/ui/kis_int_spinbox.h b/krita/ui/kis_int_spinbox.h index 873a2f39..a5c4602e 100644 --- a/krita/ui/kis_int_spinbox.h +++ b/krita/ui/kis_int_spinbox.h @@ -20,40 +20,41 @@ #ifndef KIS_INT_SPINBOX_H_ #define KIS_INT_SPINBOX_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include -class QLabel; -class QLineEdit; -class QLayout; -class QValidator; +class TQLabel; +class TQLineEdit; +class TQLayout; +class TQValidator; -class KisPopupSlider : public QPopupMenu { +class KisPopupSlider : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KisPopupSlider(int minValue, int maxValue, int pageStep, int value, Orientation orientation, QWidget * parent, const char * name = 0) - : QPopupMenu(parent, name) + KisPopupSlider(int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, TQWidget * tqparent, const char * name = 0) + : TQPopupMenu(tqparent, name) { - m_slider = new QSlider(minValue, maxValue, pageStep, value, orientation, this, name); + m_slider = new TQSlider(minValue, maxValue, pageStep, value, orientation, this, name); //m_slider->setTracking(false); insertItem(m_slider); - connect(m_slider, SIGNAL(valueChanged(int)), SIGNAL(valueChanged(int))); + connect(m_slider, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(valueChanged(int))); } void setTickInterval(int i) { m_slider->setTickInterval(i); } void setRange(int minValue, int maxValue) { m_slider->setRange(minValue, maxValue); } void setValue(int val) { m_slider->setValue(val); } - void setTickmarks(QSlider::TickSetting t) { m_slider->setTickmarks(t); } + void setTickmarks(TQSlider::TickSetting t) { m_slider->setTickmarks(t); } int lineStep () const{ return m_slider->lineStep(); } int minValue () const{ return m_slider->minValue(); } int maxValue () const{ return m_slider->maxValue(); } int value () const{ return m_slider->value(); } - QSlider *m_slider; + TQSlider *m_slider; signals: void valueChanged(int); @@ -64,19 +65,20 @@ signals: * @short An input widget for integer numbers, consisting of a spinbox and * a dropdown slider. * - * KisIntSpinbox combines a QSpinBox and a dropdown QSlider + * KisIntSpinbox combines a TQSpinBox and a dropdown TQSlider * to make an easy to use control for setting some integer * parameter. * * */ -class KisIntSpinbox : public QWidget +class KisIntSpinbox : public TQWidget { Q_OBJECT - Q_PROPERTY( int value READ value WRITE setValue ) - Q_PROPERTY( int minValue READ minValue WRITE setMinValue ) - Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue ) + TQ_OBJECT + TQ_PROPERTY( int value READ value WRITE setValue ) + TQ_PROPERTY( int minValue READ minValue WRITE setMinValue ) + TQ_PROPERTY( int maxValue READ maxValue WRITE setMaxValue ) public: @@ -84,22 +86,22 @@ public: * Constructs an input control for integer values * with base 10 and initial value 0. * - * @param parent parent QWidget + * @param tqparent tqparent TQWidget * @param name internal name for this widget */ - KisIntSpinbox(QWidget *parent=0, const char *name=0); + KisIntSpinbox(TQWidget *tqparent=0, const char *name=0); /** * Constructor - * It constructs a QSpinBox that allows the input of integer numbers + * It constructs a TQSpinBox that allows the input of integer numbers * in the range of -INT_MAX to +INT_MAX. * To enforce the value being in a range, use setRange(). * * @param label the tabel (may contain &, and my be empty) * @param value initial value for the control - * @param parent parent QWidget + * @param tqparent tqparent TQWidget * @param name internal name for this widget */ - KisIntSpinbox(const QString & label, int value, QWidget* parent=0, const char *name=0); + KisIntSpinbox(const TQString & label, int value, TQWidget* tqparent=0, const char *name=0); /** * Destructor @@ -116,7 +118,7 @@ public: /** * @param min minimum value * @param max maximum value - * @param step step size for the QSlider + * @param step step size for the TQSlider */ void setRange(int min, int max, int step=1); /** @@ -144,7 +146,7 @@ public: */ void setSteps(int minor, int major); - void setLabel(const QString & label); + void setLabel(const TQString & label); public slots: /** diff --git a/krita/ui/kis_itemchooser.cc b/krita/ui/kis_itemchooser.cc index b5dc03e0..d418bd2f 100644 --- a/krita/ui/kis_itemchooser.cc +++ b/krita/ui/kis_itemchooser.cc @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include #include @@ -25,12 +25,12 @@ #include "kis_global.h" #include "kis_icon_item.h" -KisItemChooser::KisItemChooser(QWidget *parent, const char *name) : super(parent, name) +KisItemChooser::KisItemChooser(TQWidget *tqparent, const char *name) : super(tqparent, name) { -/* m_frame = new QVBox(this); - m_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken);*/ - m_chooser = new KoIconChooser(QSize(30,30), this, "icon_chooser", true); - QObject::connect(m_chooser, SIGNAL(selected(KoIconItem*)), this, SLOT(slotItemSelected(KoIconItem*))); +/* m_frame = new TQVBox(this); + m_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);*/ + m_chooser = new KoIconChooser(TQSize(30,30), this, "icon_chooser", true); + TQObject::connect(m_chooser, TQT_SIGNAL(selected(KoIconItem*)), this, TQT_SLOT(slotItemSelected(KoIconItem*))); } KisItemChooser::~KisItemChooser() @@ -66,13 +66,13 @@ void KisItemChooser::addItem(KoIconItem *item) void KisItemChooser::addItems(const vKoIconItem& items) { - QPtrListIterator itr(items); + TQPtrListIterator itr(items); for (itr.toFirst(); itr.current(); ++itr) m_chooser->addItem(itr.current()); } -QWidget *KisItemChooser::chooserWidget() const +TQWidget *KisItemChooser::chooserWidget() const { return m_chooser; } diff --git a/krita/ui/kis_itemchooser.h b/krita/ui/kis_itemchooser.h index b9eb5913..d29aa28d 100644 --- a/krita/ui/kis_itemchooser.h +++ b/krita/ui/kis_itemchooser.h @@ -18,22 +18,23 @@ #ifndef KIS_ITEM_CHOOSER_H_ #define KIS_ITEM_CHOOSER_H_ -#include -#include +#include +#include -class QHBox; +class TQHBox; class KoIconChooser; class KoIconItem; -typedef QPtrList vKoIconItem; +typedef TQPtrList vKoIconItem; -class KisItemChooser : public QWidget { - typedef QWidget super; +class KisItemChooser : public TQWidget { + typedef TQWidget super; Q_OBJECT + TQ_OBJECT public: - KisItemChooser(QWidget *parent = 0, + KisItemChooser(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisItemChooser(); @@ -50,13 +51,13 @@ signals: protected: virtual void update(KoIconItem *item) = 0; - QWidget *chooserWidget() const; + TQWidget *chooserWidget() const; private slots: void slotItemSelected(KoIconItem *item); private: - QHBox *m_frame; + TQHBox *m_frame; KoIconChooser *m_chooser; }; diff --git a/krita/ui/kis_label_cursor_pos.cc b/krita/ui/kis_label_cursor_pos.cc index 40d2b99c..984df6dd 100644 --- a/krita/ui/kis_label_cursor_pos.cc +++ b/krita/ui/kis_label_cursor_pos.cc @@ -18,22 +18,22 @@ #include "kis_label_cursor_pos.h" #include "kis_label_cursor_pos.moc" -KisLabelCursorPos::KisLabelCursorPos(QWidget *parent, const char *name, WFlags f) : super(parent, name, f) +KisLabelCursorPos::KisLabelCursorPos(TQWidget *tqparent, const char *name, WFlags f) : super(tqparent, name, f) { setText("0:0"); m_doUpdates = true; - //setMinimumSize( 200, parent->height() - 4); + //setMinimumSize( 200, tqparent->height() - 4); } KisLabelCursorPos::~KisLabelCursorPos() { } -void KisLabelCursorPos::updatePos(Q_INT32 xpos, Q_INT32 ypos) +void KisLabelCursorPos::updatePos(TQ_INT32 xpos, TQ_INT32 ypos) { if (m_doUpdates) { - QString s; + TQString s; s.sprintf("%d:%d", xpos, ypos); setText(s); @@ -48,6 +48,6 @@ void KisLabelCursorPos::enter() void KisLabelCursorPos::leave() { m_doUpdates = false; - setText(QString::null); + setText(TQString()); } diff --git a/krita/ui/kis_label_cursor_pos.h b/krita/ui/kis_label_cursor_pos.h index 3923c61d..392a0b68 100644 --- a/krita/ui/kis_label_cursor_pos.h +++ b/krita/ui/kis_label_cursor_pos.h @@ -18,24 +18,25 @@ #ifndef KIS_LABEL_CURSOR_POS_H_ #define KIS_LABEL_CURSOR_POS_H_ -#include +#include -class KisLabelCursorPos : public QLabel { +class KisLabelCursorPos : public TQLabel { Q_OBJECT - typedef QLabel super; + TQ_OBJECT + typedef TQLabel super; public: - KisLabelCursorPos(QWidget *parent, const char *name = 0, WFlags f = 0); + KisLabelCursorPos(TQWidget *tqparent, const char *name = 0, WFlags f = 0); virtual ~KisLabelCursorPos(); public slots: - void updatePos(Q_INT32 xpos, Q_INT32 ypos); + void updatePos(TQ_INT32 xpos, TQ_INT32 ypos); void enter(); void leave(); private: bool m_doUpdates; - Q_INT32 m_ypos; + TQ_INT32 m_ypos; }; #endif // KIS_LABEL_CURSOR_POS_H_ diff --git a/krita/ui/kis_label_progress.cc b/krita/ui/kis_label_progress.cc index e08a7fcf..c04452f4 100644 --- a/krita/ui/kis_label_progress.cc +++ b/krita/ui/kis_label_progress.cc @@ -16,11 +16,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -32,33 +32,33 @@ #include "kis_label_progress.h" #include "kis_cursor.h" -class EscapeButton : public QToolButton { +class EscapeButton : public TQToolButton { public: - EscapeButton(QWidget * parent, const char * name) : QToolButton(parent, name) {}; + EscapeButton(TQWidget * tqparent, const char * name) : TQToolButton(tqparent, name) {}; - void keyReleaseEvent(QKeyEvent *e) + void keyReleaseEvent(TQKeyEvent *e) { - if (e->key()==Qt::Key_Escape) + if (e->key()==TQt::Key_Escape) emit clicked(); } }; -KisLabelProgress::KisLabelProgress(QWidget *parent, const char *name, WFlags f) : super(parent, name, f) +KisLabelProgress::KisLabelProgress(TQWidget *tqparent, const char *name, WFlags f) : super(tqparent, name, f) { m_subject = 0; m_modal = false; - QHBoxLayout *box = new QHBoxLayout(this); + TQHBoxLayout *box = new TQHBoxLayout(this); box->setAutoAdd(true); - QIconSet cancelIconSet = SmallIconSet("stop"); + TQIconSet cancelIconSet = SmallIconSet("stop"); m_cancelButton = new EscapeButton(this, "cancel_button"); m_cancelButton->setIconSet(cancelIconSet); - QToolTip::add(m_cancelButton, i18n("Cancel")); - connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); + TQToolTip::add(m_cancelButton, i18n("Cancel")); + connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(cancelPressed())); m_bar = new KProgress(100, this); } @@ -75,11 +75,11 @@ void KisLabelProgress::setSubject(KisProgressSubject *subject, bool modal, bool m_subject = subject; m_modal = modal; - connect(subject, SIGNAL(notifyProgress(int)), this, SLOT(update(int))); - connect(subject, SIGNAL(notifyProgressStage(const QString&, int)), this, SLOT(updateStage(const QString&, int))); - connect(subject, SIGNAL(notifyProgressDone()), this, SLOT(done())); - connect(subject, SIGNAL(notifyProgressError()), this, SLOT(error())); - connect(subject, SIGNAL(destroyed()), this, SLOT(subjectDestroyed())); + connect(subject, TQT_SIGNAL(notifyProgress(int)), this, TQT_SLOT(update(int))); + connect(subject, TQT_SIGNAL(notifyProgressStage(const TQString&, int)), this, TQT_SLOT(updateStage(const TQString&, int))); + connect(subject, TQT_SIGNAL(notifyProgressDone()), this, TQT_SLOT(done())); + connect(subject, TQT_SIGNAL(notifyProgressError()), this, TQT_SLOT(error())); + connect(subject, TQT_SIGNAL(destroyed()), this, TQT_SLOT(subjectDestroyed())); show(); @@ -102,14 +102,14 @@ void KisLabelProgress::setSubject(KisProgressSubject *subject, bool modal, bool } if (modal) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); } m_bar->setValue(0); } } -bool KisLabelProgress::event(QEvent * e) +bool KisLabelProgress::event(TQEvent * e) { if (!e) return false; @@ -139,7 +139,7 @@ bool KisLabelProgress::event(QEvent * e) subjectDestroyed(); break; default: - return QLabel::event(e); + return TQLabel::event(e); }; return true; @@ -152,7 +152,7 @@ void KisLabelProgress::reset() m_subject = 0; if (m_modal) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } m_modal = false; @@ -173,11 +173,11 @@ void KisLabelProgress::update(int percent) app->processEvents(); // The following is safer, but makes cancel impossible: - //QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | - // QEventLoop::ExcludeSocketNotifiers); + //TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | + // TQEventLoop::ExcludeSocketNotifiers); } -void KisLabelProgress::updateStage(const QString&, int percent) +void KisLabelProgress::updateStage(const TQString&, int percent) { m_bar->setValue(percent); diff --git a/krita/ui/kis_label_progress.h b/krita/ui/kis_label_progress.h index f5385121..a2c42fd9 100644 --- a/krita/ui/kis_label_progress.h +++ b/krita/ui/kis_label_progress.h @@ -19,32 +19,33 @@ #ifndef KIS_LABEL_PROGRESS_H_ #define KIS_LABEL_PROGRESS_H_ -#include -#include +#include +#include #include "kis_progress_display_interface.h" -class QToolButton; +class TQToolButton; class KProgress; -class KisLabelProgress : public QLabel, public KisProgressDisplayInterface { +class KisLabelProgress : public TQLabel, public KisProgressDisplayInterface { Q_OBJECT - typedef QLabel super; + TQ_OBJECT + typedef TQLabel super; public: - KisLabelProgress(QWidget *parent, const char *name = 0, WFlags f = 0); + KisLabelProgress(TQWidget *tqparent, const char *name = 0, WFlags f = 0); virtual ~KisLabelProgress(); public: // Implements KisProgressDisplayInterface void setSubject(KisProgressSubject *subject, bool modal, bool canCancel); - // Overrides QLabel::event() - bool event(QEvent * ev); + // Overrides TQLabel::event() + bool event(TQEvent * ev); private slots: virtual void update(int percent); - virtual void updateStage(const QString& stage, int percent); + virtual void updateStage(const TQString& stage, int percent); virtual void done(); virtual void error(); virtual void subjectDestroyed(); @@ -57,7 +58,7 @@ private: KisProgressSubject *m_subject; KProgress *m_bar; - QToolButton *m_cancelButton; + TQToolButton *m_cancelButton; bool m_modal; }; diff --git a/krita/ui/kis_label_zoom.h b/krita/ui/kis_label_zoom.h index 29588368..e7fad08a 100644 --- a/krita/ui/kis_label_zoom.h +++ b/krita/ui/kis_label_zoom.h @@ -18,13 +18,14 @@ #ifndef KIS_LABEL_ZOOM_H_ #define KIS_LABEL_ZOOM_H_ -#include +#include -class KisLabelZoom : public QLabel { +class KisLabelZoom : public TQLabel { Q_OBJECT + TQ_OBJECT - KisLabelZoom( QWidget *parent, const char *name = 0, WFlags f = 0 ) : - QLabel( parent, name, f ) {} + KisLabelZoom( TQWidget *tqparent, const char *name = 0, WFlags f = 0 ) : + TQLabel( tqparent, name, f ) {} virtual ~KisLabelZoom() {} }; diff --git a/krita/ui/kis_layerbox.cc b/krita/ui/kis_layerbox.cc index ef30e331..37dbd27e 100644 --- a/krita/ui/kis_layerbox.cc +++ b/krita/ui/kis_layerbox.cc @@ -19,22 +19,22 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#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 +#include +#include +#include +#include +#include #include #include @@ -61,26 +61,26 @@ #include "kis_layerbox.h" -KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char *name) - : super(parent, name), m_image(0) +KisLayerBox::KisLayerBox(KisCanvasSubject *subject, TQWidget *tqparent, const char *name) + : super(tqparent, name), m_image(0) { - QVBoxLayout *vbox = new QVBoxLayout(this); + TQVBoxLayout *vbox = new TQVBoxLayout(this); vbox->setAutoAdd(true); m_lst = new WdgLayerBox(this); - setMinimumSize(m_lst->minimumSizeHint()); + setMinimumSize(m_lst->tqminimumSizeHint()); - QToolTip::add(m_lst->bnAdd, i18n("Create new layer")); + TQToolTip::add(m_lst->bnAdd, i18n("Create new layer")); - QToolTip::add(m_lst->bnDelete, i18n("Remove current layer")); + TQToolTip::add(m_lst->bnDelete, i18n("Remove current layer")); - QToolTip::add(m_lst->bnRaise, i18n("Raise current layer")); + TQToolTip::add(m_lst->bnRaise, i18n("Raise current layer")); m_lst->bnRaise->setEnabled(false); m_lst->bnLower->setEnabled(false); - QToolTip::add(m_lst->bnLower, i18n("Lower current layer")); + TQToolTip::add(m_lst->bnLower, i18n("Lower current layer")); - QToolTip::add(m_lst->bnProperties, i18n("Properties for layer")); + TQToolTip::add(m_lst->bnProperties, i18n("Properties for layer")); KIconLoader il( "krita" ); @@ -95,27 +95,27 @@ KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char loadPixmap("unlocked.png", il, KIcon::SizeSmallMedium)); - connect(list()->contextMenu(), SIGNAL(aboutToShow()), SLOT(slotAboutToShow())); - connect(list(), SIGNAL(activated(LayerItem*)), - SLOT(slotLayerActivated(LayerItem*))); - connect(list(), SIGNAL(displayNameChanged(LayerItem*, const QString&)), - SLOT(slotLayerDisplayNameChanged(LayerItem*, const QString&))); - connect(list(), SIGNAL(propertyChanged(LayerItem*, const QString&, bool)), - SLOT(slotLayerPropertyChanged(LayerItem*, const QString&, bool))); - connect(list(), SIGNAL(layerMoved(LayerItem*, LayerItem*, LayerItem*)), - SLOT(slotLayerMoved(LayerItem*, LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewLayer(LayerItem*, LayerItem*)), - SLOT(slotRequestNewLayer(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewFolder(LayerItem*, LayerItem*)), - SLOT(slotRequestNewFolder(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewAdjustmentLayer(LayerItem*, LayerItem*)), - SLOT(slotRequestNewAdjustmentLayer(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&)), - SLOT(slotRequestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&))); - connect(list(), SIGNAL(requestRemoveLayer(LayerItem*)), - SLOT(slotRequestRemoveLayer(LayerItem*))); - connect(list(), SIGNAL(requestLayerProperties(LayerItem*)), - SLOT(slotRequestLayerProperties(LayerItem*))); + connect(list()->contextMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); + connect(list(), TQT_SIGNAL(activated(LayerItem*)), + TQT_SLOT(slotLayerActivated(LayerItem*))); + connect(list(), TQT_SIGNAL(displayNameChanged(LayerItem*, const TQString&)), + TQT_SLOT(slotLayerDisplayNameChanged(LayerItem*, const TQString&))); + connect(list(), TQT_SIGNAL(propertyChanged(LayerItem*, const TQString&, bool)), + TQT_SLOT(slotLayerPropertyChanged(LayerItem*, const TQString&, bool))); + connect(list(), TQT_SIGNAL(layerMoved(LayerItem*, LayerItem*, LayerItem*)), + TQT_SLOT(slotLayerMoved(LayerItem*, LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewLayer(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewLayer(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewFolder(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewFolder(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewAdjustmentLayer(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewAdjustmentLayer(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&)), + TQT_SLOT(slotRequestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&))); + connect(list(), TQT_SIGNAL(requestRemoveLayer(LayerItem*)), + TQT_SLOT(slotRequestRemoveLayer(LayerItem*))); + connect(list(), TQT_SIGNAL(requestLayerProperties(LayerItem*)), + TQT_SLOT(slotRequestLayerProperties(LayerItem*))); m_newLayerMenu = new KPopupMenu(this); m_lst->bnAdd->setPopup(m_newLayerMenu); @@ -125,22 +125,22 @@ KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char m_newLayerMenu->insertItem( SmallIconSet( "tool_filter" ), i18n( "New &Adjustment Layer..." ), ADJUSTMENT_LAYER ); m_partLayerAction = new KoPartSelectAction( i18n( "New &Object Layer" ), "gear", this ); m_partLayerAction->plug( m_newLayerMenu ); - connect(m_partLayerAction, SIGNAL(activated()), this, SLOT(slotAddMenuActivated())); - connect(m_newLayerMenu, SIGNAL(activated(int)), this, SLOT(slotAddMenuActivated(int))); + connect(m_partLayerAction, TQT_SIGNAL(activated()), this, TQT_SLOT(slotAddMenuActivated())); + connect(m_newLayerMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotAddMenuActivated(int))); - connect(m_lst->bnDelete, SIGNAL(clicked()), SLOT(slotRmClicked())); - connect(m_lst->bnRaise, SIGNAL(clicked()), SLOT(slotRaiseClicked())); - connect(m_lst->bnLower, SIGNAL(clicked()), SLOT(slotLowerClicked())); - connect(m_lst->bnProperties, SIGNAL(clicked()), SLOT(slotPropertiesClicked())); - connect(m_lst->intOpacity, SIGNAL(valueChanged(int, bool)), SIGNAL(sigOpacityChanged(int, bool))); - connect(m_lst->intOpacity, SIGNAL(finishedChanging(int, int)), SIGNAL(sigOpacityFinishedChanging(int, int))); - connect(m_lst->cmbComposite, SIGNAL(activated(const KisCompositeOp&)), SIGNAL(sigItemComposite(const KisCompositeOp&))); + connect(m_lst->bnDelete, TQT_SIGNAL(clicked()), TQT_SLOT(slotRmClicked())); + connect(m_lst->bnRaise, TQT_SIGNAL(clicked()), TQT_SLOT(slotRaiseClicked())); + connect(m_lst->bnLower, TQT_SIGNAL(clicked()), TQT_SLOT(slotLowerClicked())); + connect(m_lst->bnProperties, TQT_SIGNAL(clicked()), TQT_SLOT(slotPropertiesClicked())); + connect(m_lst->intOpacity, TQT_SIGNAL(valueChanged(int, bool)), TQT_SIGNAL(sigOpacityChanged(int, bool))); + connect(m_lst->intOpacity, TQT_SIGNAL(finishedChanging(int, int)), TQT_SIGNAL(sigOpacityFinishedChanging(int, int))); + connect(m_lst->cmbComposite, TQT_SIGNAL(activated(const KisCompositeOp&)), TQT_SIGNAL(sigItemComposite(const KisCompositeOp&))); Q_ASSERT(subject->document() != 0); if (subject->document()) { - connect(subject->document(), SIGNAL(sigCommandExecuted()), SLOT(updateThumbnails())); + connect(subject->document(), TQT_SIGNAL(sigCommandExecuted()), TQT_SLOT(updateThumbnails())); } } @@ -165,16 +165,16 @@ void KisLayerBox::setImage(KisImageSP img) if (img) { - connect(img, SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); - connect(img, SIGNAL(sigLayerAdded(KisLayerSP)), this, SLOT(slotLayerAdded(KisLayerSP))); - connect(img, SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); - connect(img, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), - this, SLOT(slotLayerPropertiesChanged(KisLayerSP))); - connect(img, SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); - connect(img, SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, SLOT(slotLayersChanged(KisGroupLayerSP))); - connect(img, SIGNAL(sigLayerUpdated(KisLayerSP, QRect)), this, SLOT(slotLayerUpdated(KisLayerSP, QRect))); + connect(img, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), this, TQT_SLOT(slotLayerAdded(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), + this, TQT_SLOT(slotLayerPropertiesChanged(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, TQT_SLOT(slotLayersChanged(KisGroupLayerSP))); + connect(img, TQT_SIGNAL(sigLayerUpdated(KisLayerSP, TQRect)), this, TQT_SLOT(slotLayerUpdated(KisLayerSP, TQRect))); slotLayersChanged(img->rootLayer()); updateThumbnails(); } @@ -200,7 +200,7 @@ void KisLayerBox::slotLayerAdded(KisLayerSP layer) vKisLayerSP layersAdded; - if (layer->parent() == m_image->rootLayer()) + if (layer->tqparent() == m_image->rootLayer()) { KisPopulateVisitor visitor(list()); layer->accept(visitor); @@ -208,7 +208,7 @@ void KisLayerBox::slotLayerAdded(KisLayerSP layer) } else { - KisPopulateVisitor visitor(static_cast(list()->layer(layer->parent()->id()))); + KisPopulateVisitor visitor(static_cast(list()->layer(layer->tqparent()->id()))); layer->accept(visitor); layersAdded = visitor.layersAdded(); } @@ -229,17 +229,17 @@ void KisLayerBox::slotLayerRemoved(KisLayerSP layer, KisGroupLayerSP wasParent, void KisLayerBox::slotLayerMoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP) { - int parentID = layer->parent()->id(); - if (layer->parent() == m_image->rootLayer()) - parentID = -1; + int tqparentID = layer->tqparent()->id(); + if (layer->tqparent() == m_image->rootLayer()) + tqparentID = -1; int siblingID = -1; if (layer->prevSibling()) siblingID = layer->prevSibling()->id(); - list()->moveLayer(layer->id(), parentID, siblingID); + list()->moveLayer(layer->id(), tqparentID, siblingID); - markModified(layer->parent()); + markModified(layer->tqparent()); markModified(wasParent); updateUI(); } @@ -262,12 +262,12 @@ void KisLayerBox::slotLayersChanged(KisGroupLayerSP rootLayer) for (KisLayerSP layer = rootLayer->firstChild(); layer; layer = layer->nextSibling()) layer->accept(visitor); m_modified.clear(); - for (QListViewItemIterator it(list()->lastItem()); *it; --it) + for (TQListViewItemIterator it(list()->lastItem()); *it; --it) m_modified.append(static_cast(*it)->id()); updateUI(); } -void KisLayerBox::slotLayerUpdated(KisLayerSP layer, QRect) +void KisLayerBox::slotLayerUpdated(KisLayerSP layer, TQRect) { markModified(layer); } @@ -281,14 +281,14 @@ void KisLayerBox::slotLayerActivated(LayerItem* item) updateUI(); } -void KisLayerBox::slotLayerDisplayNameChanged(LayerItem* item, const QString& displayName) +void KisLayerBox::slotLayerDisplayNameChanged(LayerItem* item, const TQString& displayName) { if(KisLayerSP layer = m_image->findLayer(item->id())) layer->setName(displayName); updateUI(); } -void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const QString& name, bool on) +void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const TQString& name, bool on) { if (KisLayerSP layer = m_image->findLayer(item->id())) { @@ -302,16 +302,16 @@ void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const QString& name, void KisLayerBox::slotLayerMoved(LayerItem* item, LayerItem*, LayerItem*) { KisLayerSP layer = m_image->findLayer(item->id()); - KisGroupLayerSP parent; - if( item->parent() ) - parent = dynamic_cast(m_image->findLayer(item->parent()->id()).data()); - if( !parent ) - parent = m_image->rootLayer(); + KisGroupLayerSP tqparent; + if( item->tqparent() ) + tqparent = dynamic_cast(m_image->findLayer(item->tqparent()->id()).data()); + if( !tqparent ) + tqparent = m_image->rootLayer(); KisLayerSP above = 0; if (item->nextSibling()) above = m_image->findLayer(item->nextSibling()->id()); if (layer) - m_image->moveLayer(layer, parent.data(), above); + m_image->moveLayer(layer, tqparent.data(), above); updateUI(); } @@ -320,7 +320,7 @@ void KisLayerBox::slotRequestNewLayer(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast(l); + KisGroupLayerSP tqparent = dynamic_cast(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -328,10 +328,10 @@ void KisLayerBox::slotRequestNewLayer(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestLayer(parent, above); + emit sigRequestLayer(tqparent, above); } void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) @@ -339,7 +339,7 @@ void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); //FIXME I hate copy-pasting like this. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast(l); + KisGroupLayerSP tqparent = dynamic_cast(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -347,10 +347,10 @@ void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestGroupLayer(parent, above); + emit sigRequestGroupLayer(tqparent, above); } void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) @@ -358,7 +358,7 @@ void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); //FIXME here too. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast(l); + KisGroupLayerSP tqparent = dynamic_cast(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -366,10 +366,10 @@ void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestAdjustmentLayer(parent, above); + emit sigRequestAdjustmentLayer(tqparent, above); } void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, const KoDocumentEntry& entry) @@ -377,7 +377,7 @@ void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, cons KisLayer* l = m_image->rootLayer().data(); //FIXME and here. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast(l); + KisGroupLayerSP tqparent = dynamic_cast(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -385,10 +385,10 @@ void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, cons else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestPartLayer(parent, above, entry); + emit sigRequestPartLayer(tqparent, above, entry); } void KisLayerBox::slotRequestRemoveLayer(LayerItem* item) @@ -410,7 +410,7 @@ void KisLayerBox::slotRequestLayerProperties(LayerItem* item) void KisLayerBox::updateUI() { m_lst->bnDelete->setEnabled(list()->activeLayer()); - m_lst->bnRaise->setEnabled(list()->activeLayer() && (list()->activeLayer()->prevSibling() || list()->activeLayer()->parent())); + m_lst->bnRaise->setEnabled(list()->activeLayer() && (list()->activeLayer()->prevSibling() || list()->activeLayer()->tqparent())); m_lst->bnLower->setEnabled(list()->activeLayer() && list()->activeLayer()->nextSibling()); m_lst->intOpacity->setEnabled(list()->activeLayer()); m_lst->cmbComposite->setEnabled(list()->activeLayer()); @@ -464,42 +464,42 @@ void KisLayerBox::slotAddMenuActivated(int type) return; KisGroupLayerSP root = m_image->rootLayer(); - KisGroupLayerSP parent; + KisGroupLayerSP tqparent; KisLayerSP above; if (KisLayerSP active = m_image->activeLayer()) { - parent = root; + tqparent = root; above = active; - if (active->parent()) - parent = active->parent(); + if (active->tqparent()) + tqparent = active->tqparent(); } else { - parent = root; + tqparent = root; above = m_image->rootLayer()->firstChild(); } switch (type) { case PAINT_LAYER: - emit sigRequestLayer(parent, above); + emit sigRequestLayer(tqparent, above); break; case GROUP_LAYER: - emit sigRequestGroupLayer(parent, above); + emit sigRequestGroupLayer(tqparent, above); break; case ADJUSTMENT_LAYER: - emit sigRequestAdjustmentLayer(parent, above); + emit sigRequestAdjustmentLayer(tqparent, above); break; case OBJECT_LAYER: - default: //goddamned Qt doesn't emit activated for default-assigned IDs, so this does nothing - emit sigRequestPartLayer(parent, above, m_partLayerAction->documentEntry()); + default: //goddamned TQt doesn't emit activated for default-assigned IDs, so this does nothing + emit sigRequestPartLayer(tqparent, above, m_partLayerAction->documentEntry()); } } void KisLayerBox::slotRmClicked() { - QValueList l = list()->selectedLayerIDs(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer()->id())) + TQValueList l = list()->selectedLayerIDs(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer()->id())) { l.clear(); l.append(list()->activeLayer()->id()); @@ -514,25 +514,25 @@ void KisLayerBox::slotRmClicked() void KisLayerBox::slotRaiseClicked() { - QValueList l = list()->selectedLayerIDs(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer()->id())) + TQValueList l = list()->selectedLayerIDs(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer()->id())) { l.clear(); l.append(list()->activeLayer()->id()); } KisLayerSP layer = m_image->findLayer(l.first()); - if( l.count() == 1 && layer == layer->parent()->firstChild() && layer->parent() != m_image->rootLayer()) + if( l.count() == 1 && layer == layer->tqparent()->firstChild() && layer->tqparent() != m_image->rootLayer()) { - if (KisGroupLayerSP grandparent = layer->parent()->parent()) - m_image->moveLayer(layer, grandparent, layer->parent().data()); + if (KisGroupLayerSP grandtqparent = layer->tqparent()->tqparent()) + m_image->moveLayer(layer, grandtqparent, layer->tqparent().data()); } else { for (int i = 0, n = l.count(); i < n; ++i) if (KisLayerSP li = m_image->findLayer(l[i])) if (li->prevSibling()) - m_image->moveLayer(li, li->parent(), li->prevSibling()); + m_image->moveLayer(li, li->tqparent(), li->prevSibling()); } if( !l.isEmpty() ) @@ -541,8 +541,8 @@ void KisLayerBox::slotRaiseClicked() void KisLayerBox::slotLowerClicked() { - QValueList l = list()->selectedLayers(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer())) + TQValueList l = list()->selectedLayers(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer())) { l.clear(); l.append(list()->activeLayer()); @@ -551,7 +551,7 @@ void KisLayerBox::slotLowerClicked() for (int i = l.count() - 1; i >= 0; --i) if (LayerItem *layer = l[i]) if (layer->nextSibling()) - list()->moveLayer(layer, layer->parent(), layer->nextSibling()); + list()->moveLayer(layer, layer->tqparent(), layer->nextSibling()); if( !l.isEmpty() ) list()->ensureItemVisible( l.last() ); @@ -588,13 +588,13 @@ void KisLayerBox::setUpdatesAndSignalsEnabled(bool enable) } -QPixmap KisLayerBox::loadPixmap(const QString& filename, const KIconLoader& +TQPixmap KisLayerBox::loadPixmap(const TQString& filename, const KIconLoader& il, int size) { - QPixmap pixmap = il.loadIcon(filename, KIcon::NoGroup, size); + TQPixmap pixmap = il.loadIcon(filename, KIcon::NoGroup, size); if (pixmap.isNull()) - KMessageBox::error(0, i18n("Cannot find %1").arg(filename), + KMessageBox::error(0, i18n("Cannot tqfind %1").tqarg(filename), i18n("Canvas")); return pixmap; @@ -605,14 +605,14 @@ void KisLayerBox::markModified(KisLayer* layer) if( !layer ) return; - QValueList v; + TQValueList v; while (layer && layer != m_image->rootLayer().data()) { v.append(layer->id()); - layer = layer->parent(); + layer = layer->tqparent(); } for (int i = v.count() - 1; i >= 0; --i) - if (!m_modified.contains(v[i])) + if (!m_modified.tqcontains(v[i])) m_modified.append(v[i]); } @@ -624,19 +624,19 @@ void KisLayerBox::printKritaLayers() const root = m_image->rootLayer(); if( !root ) return; - QString s = root->name(); + TQString s = root->name(); if( dynamic_cast( root ) ) - s = QString("[%1]").arg( s ); + s = TQString("[%1]").tqarg( s ); if( m_image->activeLayer().data() == root ) s.prepend("*"); - kdDebug() << (QString().fill(' ', indent) + s) << endl; + kdDebug() << (TQString().fill(' ', indent) + s) << endl; for (KisLayer* layer = root->firstChild(); layer; layer = layer->nextSibling()) { indent += 2; root = layer; printKritaLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } } @@ -652,23 +652,23 @@ void KisLayerBox::printLayerboxLayers() const root = layer; printLayerboxLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } return; } - QString s = root->displayName(); + TQString s = root->displayName(); if( root->isFolder() ) - s = QString("[%1]").arg( s ); + s = TQString("[%1]").tqarg( s ); if( list()->activeLayer() == root ) s.prepend("*"); - kdDebug() << (QString().fill(' ', indent) + s) << endl; + kdDebug() << (TQString().fill(' ', indent) + s) << endl; for (LayerItem* layer = root->firstChild(); layer; layer = layer->nextSibling()) { indent += 2; root = layer; printLayerboxLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } } diff --git a/krita/ui/kis_layerbox.h b/krita/ui/kis_layerbox.h index dab83d63..e5440e42 100644 --- a/krita/ui/kis_layerbox.h +++ b/krita/ui/kis_layerbox.h @@ -22,17 +22,17 @@ #ifndef KIS_LAYERBOX_H #define KIS_LAYERBOX_H -#include +#include #include -#include +#include #include "kis_types.h" #include "kis_colorspace.h" class WdgLayerBox; -class QButton; -class QPainter; -class QWidget; +class TQButton; +class TQPainter; +class TQWidget; class KIconLoader; class KPopupMenu; class KoDocumentEntry; @@ -41,12 +41,13 @@ class KisLayerList; class LayerItem; class KisCanvasSubject; -class KisLayerBox : public QFrame { - typedef QFrame super; +class KisLayerBox : public TQFrame { + typedef TQFrame super; Q_OBJECT + TQ_OBJECT public: - KisLayerBox(KisCanvasSubject *subject, QWidget *parent = 0, const char *name = 0); + KisLayerBox(KisCanvasSubject *subject, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisLayerBox(); void clear(); @@ -61,17 +62,17 @@ public slots: void slotLayerMoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP wasAboveThis); void slotLayerPropertiesChanged(KisLayerSP layer); void slotLayersChanged(KisGroupLayerSP rootLayer); - void slotLayerUpdated(KisLayerSP layer, QRect rc); + void slotLayerUpdated(KisLayerSP layer, TQRect rc); void slotSetCompositeOp(const KisCompositeOp& compositeOp); void slotSetOpacity(int opacity); void slotSetColorSpace(const KisColorSpace * colorSpace); signals: - void sigRequestLayer(KisGroupLayerSP parent, KisLayerSP above); - void sigRequestGroupLayer(KisGroupLayerSP parent, KisLayerSP above); - void sigRequestAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above); - void sigRequestPartLayer(KisGroupLayerSP parent, KisLayerSP above, const KoDocumentEntry& entry); + void sigRequestLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void sigRequestGroupLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void sigRequestAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void sigRequestPartLayer(KisGroupLayerSP tqparent, KisLayerSP above, const KoDocumentEntry& entry); void sigRequestLayerProperties(KisLayerSP layer); void sigOpacityChanged(int opacity, bool withSlider); @@ -84,13 +85,13 @@ private: private slots: // connect to LayerList signals void slotLayerActivated(LayerItem* layer); - void slotLayerDisplayNameChanged(LayerItem* layer, const QString& displayName); - void slotLayerPropertyChanged(LayerItem* layer, const QString& name, bool on); - void slotLayerMoved(LayerItem* layer, LayerItem* parent, LayerItem* after); - void slotRequestNewLayer(LayerItem* parent, LayerItem* after); - void slotRequestNewFolder(LayerItem* parent, LayerItem* after); - void slotRequestNewAdjustmentLayer(LayerItem* parent, LayerItem* after); - void slotRequestNewObjectLayer(LayerItem* parent, LayerItem* item, const KoDocumentEntry& entry); + void slotLayerDisplayNameChanged(LayerItem* layer, const TQString& displayName); + void slotLayerPropertyChanged(LayerItem* layer, const TQString& name, bool on); + void slotLayerMoved(LayerItem* layer, LayerItem* tqparent, LayerItem* after); + void slotRequestNewLayer(LayerItem* tqparent, LayerItem* after); + void slotRequestNewFolder(LayerItem* tqparent, LayerItem* after); + void slotRequestNewAdjustmentLayer(LayerItem* tqparent, LayerItem* after); + void slotRequestNewObjectLayer(LayerItem* tqparent, LayerItem* item, const KoDocumentEntry& entry); void slotRequestRemoveLayer(LayerItem* layer); void slotRequestLayerProperties(LayerItem* layer); @@ -105,14 +106,14 @@ private slots: private: void updateUI(); - QPixmap loadPixmap(const QString& filename, const KIconLoader& il, int size); + TQPixmap loadPixmap(const TQString& filename, const KIconLoader& il, int size); KisLayerList* list() const; void markModified(KisLayer *layer); KPopupMenu *m_newLayerMenu; KoPartSelectAction *m_partLayerAction; KisImageSP m_image; - QValueList m_modified; + TQValueList m_modified; WdgLayerBox *m_lst; void printKritaLayers() const; diff --git a/krita/ui/kis_layerlist.cc b/krita/ui/kis_layerlist.cc index 356d7e39..5c57c5ab 100644 --- a/krita/ui/kis_layerlist.cc +++ b/krita/ui/kis_layerlist.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "kis_layer.h" #include "kis_paint_layer.h" @@ -35,8 +35,8 @@ #include "kis_layerlist.h" -KisLayerList::KisLayerList( QWidget *parent, const char *name ) - : super( parent, name ) +KisLayerList::KisLayerList( TQWidget *tqparent, const char *name ) + : super( tqparent, name ) { m_partLayerAction = new KoPartSelectAction( i18n( "New &Object Layer" ), "gear", this ); } @@ -75,31 +75,31 @@ void KisLayerList::constructMenu( LayerItem *layer ) void KisLayerList::menuActivated( int id, LayerItem *layer ) { - const QValueList selected = selectedLayers(); - LayerItem *parent = ( layer && layer->isFolder() ) ? layer : 0; + const TQValueList selected = selectedLayers(); + LayerItem *tqparent = ( layer && layer->isFolder() ) ? layer : 0; LayerItem *after = 0; - if( layer && !parent ) + if( layer && !tqparent ) { - parent = layer->parent(); + tqparent = layer->tqparent(); after = layer->prevSibling(); } switch( id ) { case MenuItems::NewLayer: - emit requestNewLayer( parent, after ); - emit requestNewLayer( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewLayer( tqparent, after ); + emit requestNewLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::NewFolder: - emit requestNewFolder( parent, after ); - emit requestNewFolder( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewFolder( tqparent, after ); + emit requestNewFolder( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case ADJUSTMENT_LAYER: - emit requestNewAdjustmentLayer( parent, after ); - emit requestNewAdjustmentLayer( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewAdjustmentLayer( tqparent, after ); + emit requestNewAdjustmentLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::RemoveLayer: { - QValueList ids; + TQValueList ids; for( int i = 0, n = selected.count(); i < n; ++i ) { ids.append( selected[i]->id() ); @@ -123,26 +123,26 @@ void KisLayerList::menuActivated( int id, LayerItem *layer ) super::menuActivated( id, layer ); else if( id != -1 ) //object layer was selected { - emit requestNewObjectLayer( parent, after, m_partLayerAction->documentEntry() ); - emit requestNewObjectLayer( parent ? parent->id() : -1, after ? after->id() : -1, m_partLayerAction->documentEntry() ); + emit requestNewObjectLayer( tqparent, after, m_partLayerAction->documentEntry() ); + emit requestNewObjectLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1, m_partLayerAction->documentEntry() ); } } } -KisLayerItem::KisLayerItem( LayerList* parent, KisLayer* layer ) +KisLayerItem::KisLayerItem( LayerList* tqparent, KisLayer* layer ) : super( layer->name(), - parent, - layer->prevSibling() ? parent->layer( layer->prevSibling()->id() ) : 0, + tqparent, + layer->prevSibling() ? tqparent->layer( layer->prevSibling()->id() ) : 0, layer->id() ) , m_layer( layer ) { init(); } -KisLayerItem::KisLayerItem( LayerItem* parent, KisLayer* layer ) +KisLayerItem::KisLayerItem( LayerItem* tqparent, KisLayer* layer ) : super( layer->name(), - parent, - layer->prevSibling() ? parent->listView()->layer( layer->prevSibling()->id() ) : 0, + tqparent, + layer->prevSibling() ? tqparent->listView()->layer( layer->prevSibling()->id() ) : 0, layer->id() ) , m_layer( layer ) { @@ -176,45 +176,45 @@ bool KisLayerItem::updatePreview() return !m_preview.isNull(); } -QString KisLayerItem::tooltip() const +TQString KisLayerItem::tooltip() const { - QString text = super::tooltip(); + TQString text = super::tooltip(); text = text.left( text.length() - 8 ); //HACK -- strip the - QString row = "%1%2"; - text += row.arg( i18n( "Opacity:" ) ).arg( "%1%" ).arg( int( float( m_layer->opacity() * 100 ) / 255 + 0.5 ) ); - text += row.arg( i18n( "Composite mode:" ) ).arg( m_layer->compositeOp().id().name() ); + TQString row = "%1%2"; + text += row.tqarg( i18n( "Opacity:" ) ).tqarg( "%1%" ).tqarg( int( float( m_layer->opacity() * 100 ) / 255 + 0.5 ) ); + text += row.tqarg( i18n( "Composite mode:" ) ).tqarg( m_layer->compositeOp().id().name() ); if( KisPaintLayer *player = dynamic_cast( m_layer ) ) { - text += row.arg( i18n( "Colorspace:" ) ).arg( player->paintDevice()->colorSpace()->id().name() ); + text += row.tqarg( i18n( "Colorspace:" ) ).tqarg( player->paintDevice()->colorSpace()->id().name() ); if( KisProfile *profile = player->paintDevice()->colorSpace()->getProfile() ) - text += row.arg( i18n( "Profile:" ) ).arg( profile->productName() ); + text += row.tqarg( i18n( "Profile:" ) ).tqarg( profile->productName() ); } if( KisAdjustmentLayer *alayer = dynamic_cast( m_layer ) ) - text += row.arg( i18n( "Filter: " ) ).arg( KisFilterRegistry::instance()->get( alayer->filter()->name() )->id().name() ); + text += row.tqarg( i18n( "Filter: " ) ).tqarg( KisFilterRegistry::instance()->get( alayer->filter()->name() )->id().name() ); if( KisPartLayerImpl *player = dynamic_cast( m_layer ) ) { - QString type = player->docType(); + TQString type = player->docType(); if( type.isEmpty() ) { type = player->childDoc()->document()->instance()->aboutData()->programName(); } - text += row.arg( i18n( "Document type: " ) ).arg( type ); + text += row.tqarg( i18n( "Document type: " ) ).tqarg( type ); } text += ""; return text; } -QImage KisLayerItem::tooltipPreview() const +TQImage KisLayerItem::tooltipPreview() const { - QImage img = m_layer->createThumbnail( 400, 400 ); + TQImage img = m_layer->createThumbnail( 400, 400 ); if( img.isNull() ) - return img; //so Qt doesn't complain + return img; //so TQt doesn't complain img.setAlphaBuffer( true ); const int size = kMin( 200, kMax( img.width(), img.height() ) ); - return img.smoothScale( size, size, QImage::ScaleMin ); + return img.smoothScale( size, size, TQ_ScaleMin ); } -//void KisLayerItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); +//void KisLayerItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); #include "kis_layerlist.moc" diff --git a/krita/ui/kis_layerlist.h b/krita/ui/kis_layerlist.h index e3bacdfd..f0c587dd 100644 --- a/krita/ui/kis_layerlist.h +++ b/krita/ui/kis_layerlist.h @@ -20,7 +20,7 @@ #ifndef KIS_LAYERLIST_H #define KIS_LAYERLIST_H -#include +#include #include "layerlist.h" class KoPartSelectAction; @@ -30,16 +30,17 @@ class KisLayer; class KisLayerList: public LayerList { Q_OBJECT + TQ_OBJECT typedef LayerList super; signals: - void requestNewObjectLayer( LayerItem *parent, LayerItem *after, const KoDocumentEntry &entry ); - void requestNewObjectLayer( int parentID, int afterID, const KoDocumentEntry &entry ); - void requestNewAdjustmentLayer( LayerItem *parent, LayerItem *after ); - void requestNewAdjustmentLayer( int parentID, int afterID ); + void requestNewObjectLayer( LayerItem *tqparent, LayerItem *after, const KoDocumentEntry &entry ); + void requestNewObjectLayer( int tqparentID, int afterID, const KoDocumentEntry &entry ); + void requestNewAdjustmentLayer( LayerItem *tqparent, LayerItem *after ); + void requestNewAdjustmentLayer( int tqparentID, int afterID ); public: - KisLayerList( QWidget *parent = 0, const char *name = 0 ); + KisLayerList( TQWidget *tqparent = 0, const char *name = 0 ); virtual void constructMenu( LayerItem *layer ); virtual void menuActivated( int id, LayerItem *layer ); @@ -55,8 +56,8 @@ class KisLayerItem: public LayerItem typedef LayerItem super; public: - KisLayerItem( LayerList* parent, KisLayer* layer ); - KisLayerItem( LayerItem* parent, KisLayer* layer ); + KisLayerItem( LayerList* tqparent, KisLayer* layer ); + KisLayerItem( LayerItem* tqparent, KisLayer* layer ); KisLayer* layer() const; @@ -65,14 +66,14 @@ public: /// returns whether any preview was retrieved bool updatePreview(); - virtual QString tooltip() const; - virtual QImage tooltipPreview() const; + virtual TQString tooltip() const; + virtual TQImage tooltipPreview() const; - //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 ); private: void init(); - QImage m_preview; + TQImage m_preview; KisLayer *m_layer; }; diff --git a/krita/ui/kis_load_visitor.h b/krita/ui/kis_load_visitor.h index ff1c1cf8..f8116be1 100644 --- a/krita/ui/kis_load_visitor.h +++ b/krita/ui/kis_load_visitor.h @@ -19,7 +19,7 @@ #ifndef KIS_LOAD_VISITOR_H_ #define KIS_LOAD_VISITOR_H_ -#include +#include #include "kis_types.h" #include "kis_layer_visitor.h" #include "kis_image.h" @@ -34,7 +34,7 @@ class KisLoadVisitor : public KisLayerVisitor { public: - KisLoadVisitor(KisImageSP img, KoStore *store, QMap &layerFilenames) : + KisLoadVisitor(KisImageSP img, KoStore *store, TQMap &layerFilenames) : KisLayerVisitor(), m_layerFilenames(layerFilenames) { @@ -44,16 +44,16 @@ public: } public: - void setExternalUri(QString &uri) + void setExternalUri(TQString &uri) { m_external = true; m_uri = uri; } virtual bool visit(KisPaintLayer *layer) - { //connect(*layer->paintDevice(), SIGNAL(ioProgress(Q_INT8)), m_img, SLOT(slotIOProgress(Q_INT8))); + { //connect(*layer->paintDevice(), TQT_SIGNAL(ioProgress(TQ_INT8)), m_img, TQT_SLOT(slotIOProgress(TQ_INT8))); - QString location = m_external ? QString::null : m_uri; + TQString location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer]; // Layer data @@ -69,11 +69,11 @@ public: } // icc profile - location = m_external ? QString::null : m_uri; + location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".icc"; if (m_store->hasFile(location)) { - QByteArray data; + TQByteArray data; m_store->open(location); data = m_store->read(m_store->size()); m_store->close(); @@ -82,22 +82,22 @@ public: new KisProfile(data)); // replace the old colorspace layer->paintDevice()->setData(layer->paintDevice()->dataManager(), cs); - QRect rc = layer->paintDevice()->extent(); + TQRect rc = layer->paintDevice()->extent(); kdDebug() << "After loading " << layer->name() << " extent is: " << rc.x() << ", " << rc.y() << ", " << rc.width() << ", " << rc.height() << endl; layer->setDirty(rc); kdDebug(DBG_AREA_FILE) << "Opened icc information, size is " << data.size() << endl; } - // mask + // tqmask if (layer->hasMask()) { // We set this in KisDoc::loadPaintLayer - KisPaintDeviceSP mask = layer->getMask(); - location = m_external ? QString::null : m_uri; - location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".mask"; + KisPaintDeviceSP tqmask = layer->getMask(); + location = m_external ? TQString() : m_uri; + location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".tqmask"; // Layer data if (m_store->open(location)) { - if (!mask->read(m_store)) { - mask->disconnect(); + if (!tqmask->read(m_store)) { + tqmask->disconnect(); m_store->close(); //IODone(); return false; @@ -138,10 +138,10 @@ public: virtual bool visit(KisAdjustmentLayer* layer) { - //connect(*layer->paintDevice(), SIGNAL(ioProgress(Q_INT8)), m_img, SLOT(slotIOProgress(Q_INT8))); + //connect(*layer->paintDevice(), TQT_SIGNAL(ioProgress(TQ_INT8)), m_img, TQT_SLOT(slotIOProgress(TQ_INT8))); // The selection -- if present. If not, we simply cannot open the dratted thing. - QString location = m_external ? QString::null : m_uri; + TQString location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".selection"; if (m_store->hasFile(location)) { m_store->open(location); @@ -157,17 +157,17 @@ public: } // filter configuration - location = m_external ? QString::null : m_uri; + location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".filterconfig"; if (m_store->hasFile(location) && layer->filter()) { - QByteArray data; + TQByteArray data; m_store->open(location); data = m_store->read(m_store->size()); m_store->close(); if (data) { KisFilterConfiguration * kfc = layer->filter(); - kfc->fromXML(QString(data)); + kfc->fromXML(TQString(data)); } } @@ -179,8 +179,8 @@ private: KisImageSP m_img; KoStore *m_store; bool m_external; - QString m_uri; - QMap m_layerFilenames; + TQString m_uri; + TQMap m_layerFilenames; }; #endif // KIS_LOAD_VISITOR_H_ diff --git a/krita/ui/kis_matrix_widget.ui b/krita/ui/kis_matrix_widget.ui index dda7d63c..b989df12 100644 --- a/krita/ui/kis_matrix_widget.ui +++ b/krita/ui/kis_matrix_widget.ui @@ -1,6 +1,6 @@ KisMatrixWidget - + KisMatrixWidget @@ -19,7 +19,7 @@ unnamed - + m11 @@ -27,7 +27,7 @@ -99 - + m13 @@ -35,7 +35,7 @@ -99 - + m12 @@ -43,7 +43,7 @@ -99 - + m23 @@ -51,7 +51,7 @@ -99 - + m21 @@ -59,7 +59,7 @@ -99 - + m22 @@ -70,7 +70,7 @@ 1 - + m31 @@ -78,7 +78,7 @@ -99 - + m32 @@ -86,7 +86,7 @@ -99 - + m33 @@ -104,7 +104,7 @@ Expanding - + 20 41 @@ -121,7 +121,7 @@ Expanding - + 21 20 @@ -200,11 +200,11 @@ kis_matrix_widget.ui.h - + valueChanged() - - + + spinboxValueChanged() - - + + diff --git a/krita/ui/kis_matrix_widget.ui.h b/krita/ui/kis_matrix_widget.ui.h index a0b06224..f5217af5 100644 --- a/krita/ui/kis_matrix_widget.ui.h +++ b/krita/ui/kis_matrix_widget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/krita/ui/kis_move_event.h b/krita/ui/kis_move_event.h index 5a7b0ca9..8c99cd10 100644 --- a/krita/ui/kis_move_event.h +++ b/krita/ui/kis_move_event.h @@ -24,7 +24,7 @@ class KisMoveEvent : public KisEvent { typedef KisEvent super; public: KisMoveEvent() {} - KisMoveEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState state) : super(MoveEvent, device, pos, globalPos, pressure, xTilt, yTilt, state) {} + KisMoveEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState state) : super(MoveEvent, device, pos, globalPos, pressure, xTilt, yTilt, state) {} }; #endif // KIS_MOVE_EVENT_H_ diff --git a/krita/ui/kis_multi_bool_filter_widget.cc b/krita/ui/kis_multi_bool_filter_widget.cc index d5904287..2507f1fb 100644 --- a/krita/ui/kis_multi_bool_filter_widget.cc +++ b/krita/ui/kis_multi_bool_filter_widget.cc @@ -18,13 +18,13 @@ #include "kis_multi_bool_filter_widget.h" -#include -#include -#include +#include +#include +#include #include -KisBoolWidgetParam::KisBoolWidgetParam( bool ninitvalue, QString nlabel, QString nname) : +KisBoolWidgetParam::KisBoolWidgetParam( bool ninitvalue, TQString nlabel, TQString nname) : initvalue(ninitvalue), label(nlabel), name(nname) @@ -32,26 +32,26 @@ KisBoolWidgetParam::KisBoolWidgetParam( bool ninitvalue, QString nlabel, QStrin } -KisMultiBoolFilterWidget::KisMultiBoolFilterWidget(QWidget * parent, const char * name, const char * caption, vKisBoolWidgetParam iwparam) : - KisFilterConfigWidget( parent, name ) +KisMultiBoolFilterWidget::KisMultiBoolFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisBoolWidgetParam iwparam) : + KisFilterConfigWidget( tqparent, name ) { - Q_INT32 m_nbboolWidgets = iwparam.size(); + TQ_INT32 m_nbboolWidgets = iwparam.size(); this->setCaption(caption); - QVBoxLayout *widgetLayout = new QVBoxLayout(this, m_nbboolWidgets + 1); + TQVBoxLayout *widgetLayout = new TQVBoxLayout(this, m_nbboolWidgets + 1); - m_boolWidgets = new QCheckBox*[ m_nbboolWidgets ]; + m_boolWidgets = new TQCheckBox*[ m_nbboolWidgets ]; - for( Q_INT32 i = 0; i < m_nbboolWidgets; ++i) + for( TQ_INT32 i = 0; i < m_nbboolWidgets; ++i) { - m_boolWidgets[i] = new QCheckBox( this, iwparam[i].name.ascii()); + m_boolWidgets[i] = new TQCheckBox( this, iwparam[i].name.ascii()); m_boolWidgets[i]->setChecked( iwparam[i].initvalue ); m_boolWidgets[i]->setText( iwparam[i].label ); - connect(m_boolWidgets[i], SIGNAL(toggled( bool ) ), SIGNAL(sigPleaseUpdatePreview())); + connect(m_boolWidgets[i], TQT_SIGNAL(toggled( bool ) ), TQT_SIGNAL(sigPleaseUpdatePreview())); widgetLayout->add( m_boolWidgets[i]); } -// QSpacerItem * sp = new QSpacerItem(1, 1); +// TQSpacerItem * sp = new TQSpacerItem(1, 1); widgetLayout->addStretch(); } diff --git a/krita/ui/kis_multi_bool_filter_widget.h b/krita/ui/kis_multi_bool_filter_widget.h index b9b4b2d7..0e719bee 100644 --- a/krita/ui/kis_multi_bool_filter_widget.h +++ b/krita/ui/kis_multi_bool_filter_widget.h @@ -21,7 +21,7 @@ #include -#include +#include #include "koffice_export.h" #include @@ -29,10 +29,10 @@ class KIntNumInput; struct KisBoolWidgetParam { - KRITA_EXPORT KisBoolWidgetParam( bool ninitvalue, QString label, QString name); + KRITA_EXPORT KisBoolWidgetParam( bool ninitvalue, TQString label, TQString name); bool initvalue; - QString label; - QString name; + TQString label; + TQString name; }; @@ -41,15 +41,16 @@ typedef std::vector vKisBoolWidgetParam; class KRITA_EXPORT KisMultiBoolFilterWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisMultiBoolFilterWidget(QWidget * parent, const char * name, const char *caption, vKisBoolWidgetParam iwparam); + KisMultiBoolFilterWidget(TQWidget * tqparent, const char * name, const char *caption, vKisBoolWidgetParam iwparam); virtual void setConfiguration(KisFilterConfiguration * cfg); public: - inline Q_INT32 nbValues() { return m_nbboolWidgets; }; - inline Q_INT32 valueAt( Q_INT32 i ) { return m_boolWidgets[i]->isChecked(); }; + inline TQ_INT32 nbValues() { return m_nbboolWidgets; }; + inline TQ_INT32 valueAt( TQ_INT32 i ) { return m_boolWidgets[i]->isChecked(); }; private: - QCheckBox** m_boolWidgets; - Q_INT32 m_nbboolWidgets; + TQCheckBox** m_boolWidgets; + TQ_INT32 m_nbboolWidgets; }; #endif diff --git a/krita/ui/kis_multi_double_filter_widget.cc b/krita/ui/kis_multi_double_filter_widget.cc index 024b0368..9b5d453b 100644 --- a/krita/ui/kis_multi_double_filter_widget.cc +++ b/krita/ui/kis_multi_double_filter_widget.cc @@ -18,20 +18,20 @@ #include "kis_multi_double_filter_widget.h" -#include -#include -#include +#include +#include +#include #include #include #include -KisDelayedActionDoubleInput::KisDelayedActionDoubleInput(QWidget * parent, const char * name) - : KDoubleNumInput(parent, name) +KisDelayedActionDoubleInput::KisDelayedActionDoubleInput(TQWidget * tqparent, const char * name) + : KDoubleNumInput(tqparent, name) { - m_timer = new QTimer(this, name); - connect(m_timer, SIGNAL(timeout()), SLOT(slotValueChanged())); - connect(this, SIGNAL(valueChanged( double )), SLOT(slotTimeToUpdate())); + m_timer = new TQTimer(this, name); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(slotTimeToUpdate())); } void KisDelayedActionDoubleInput::slotTimeToUpdate() @@ -49,7 +49,7 @@ void KisDelayedActionDoubleInput::cancelDelayedSignal() m_timer->stop(); } -KisDoubleWidgetParam::KisDoubleWidgetParam(double nmin, double nmax, double ninitvalue, QString nlabel, QString nname) : +KisDoubleWidgetParam::KisDoubleWidgetParam(double nmin, double nmax, double ninitvalue, TQString nlabel, TQString nname) : min(nmin), max(nmax), initvalue(ninitvalue), @@ -59,33 +59,33 @@ KisDoubleWidgetParam::KisDoubleWidgetParam(double nmin, double nmax, double nini } -KisMultiDoubleFilterWidget::KisMultiDoubleFilterWidget(QWidget * parent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam) - : KisFilterConfigWidget( parent, name ) +KisMultiDoubleFilterWidget::KisMultiDoubleFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam) + : KisFilterConfigWidget( tqparent, name ) { - Q_INT32 m_nbdoubleWidgets = dwparam.size(); + TQ_INT32 m_nbdoubleWidgets = dwparam.size(); this->setCaption(caption); - QGridLayout *widgetLayout = new QGridLayout(this, m_nbdoubleWidgets + 1, 3); + TQGridLayout *widgetLayout = new TQGridLayout(this, m_nbdoubleWidgets + 1, 3); widgetLayout->setColStretch ( 1, 1 ); m_doubleWidgets = new KisDelayedActionDoubleInput*[ m_nbdoubleWidgets ]; - for( Q_INT32 i = 0; i < m_nbdoubleWidgets; ++i) + for( TQ_INT32 i = 0; i < m_nbdoubleWidgets; ++i) { m_doubleWidgets[i] = new KisDelayedActionDoubleInput(this, dwparam[i].name.ascii()); m_doubleWidgets[i]->setRange( dwparam[i].min, dwparam[i].max ); m_doubleWidgets[i]->setValue( dwparam[i].initvalue ); m_doubleWidgets[i]->cancelDelayedSignal(); - connect(m_doubleWidgets[i], SIGNAL(valueChangedDelayed(double)), SIGNAL(sigPleaseUpdatePreview())); + connect(m_doubleWidgets[i], TQT_SIGNAL(valueChangedDelayed(double)), TQT_SIGNAL(sigPleaseUpdatePreview())); - QLabel* lbl = new QLabel(dwparam[i].label+":", this); + TQLabel* lbl = new TQLabel(dwparam[i].label+":", this); widgetLayout->addWidget( lbl, i , 0); widgetLayout->addWidget( m_doubleWidgets[i], i , 1); } - QSpacerItem * sp = new QSpacerItem(1, 1); + TQSpacerItem * sp = new TQSpacerItem(1, 1); widgetLayout->addItem(sp, m_nbdoubleWidgets, 0); } diff --git a/krita/ui/kis_multi_double_filter_widget.h b/krita/ui/kis_multi_double_filter_widget.h index bd1cf235..5351745e 100644 --- a/krita/ui/kis_multi_double_filter_widget.h +++ b/krita/ui/kis_multi_double_filter_widget.h @@ -28,10 +28,11 @@ class KisDelayedActionDoubleInput : public KDoubleNumInput { Q_OBJECT + TQ_OBJECT public: - KisDelayedActionDoubleInput(QWidget * parent, const char * name); + KisDelayedActionDoubleInput(TQWidget * tqparent, const char * name); void cancelDelayedSignal(); @@ -45,17 +46,17 @@ class KisDelayedActionDoubleInput : public KDoubleNumInput private: - QTimer * m_timer; + TQTimer * m_timer; }; struct KRITA_EXPORT KisDoubleWidgetParam { - KisDoubleWidgetParam( double nmin, double nmax, double ninitvalue, QString label, QString nname); + KisDoubleWidgetParam( double nmin, double nmax, double ninitvalue, TQString label, TQString nname); double min; double max; double initvalue; - QString label; - QString name; + TQString label; + TQString name; }; typedef std::vector vKisDoubleWidgetParam; @@ -63,15 +64,16 @@ typedef std::vector vKisDoubleWidgetParam; class KRITA_EXPORT KisMultiDoubleFilterWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisMultiDoubleFilterWidget(QWidget * parent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam); + KisMultiDoubleFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam); virtual void setConfiguration(KisFilterConfiguration * cfg); public: - inline Q_INT32 nbValues() { return m_nbdoubleWidgets; }; - inline double valueAt( Q_INT32 i ) { return m_doubleWidgets[i]->value(); }; + inline TQ_INT32 nbValues() { return m_nbdoubleWidgets; }; + inline double valueAt( TQ_INT32 i ) { return m_doubleWidgets[i]->value(); }; private: KisDelayedActionDoubleInput** m_doubleWidgets; - Q_INT32 m_nbdoubleWidgets; + TQ_INT32 m_nbdoubleWidgets; }; #endif diff --git a/krita/ui/kis_multi_integer_filter_widget.cc b/krita/ui/kis_multi_integer_filter_widget.cc index be50022d..07bfbe2a 100644 --- a/krita/ui/kis_multi_integer_filter_widget.cc +++ b/krita/ui/kis_multi_integer_filter_widget.cc @@ -18,19 +18,19 @@ #include "kis_multi_integer_filter_widget.h" -#include -#include -#include +#include +#include +#include #include #include -KisDelayedActionIntegerInput::KisDelayedActionIntegerInput(QWidget * parent, const char * name) - : KIntNumInput(parent, name) +KisDelayedActionIntegerInput::KisDelayedActionIntegerInput(TQWidget * tqparent, const char * name) + : KIntNumInput(tqparent, name) { - m_timer = new QTimer(this, name); - connect(m_timer, SIGNAL(timeout()), SLOT(slotValueChanged())); - connect(this, SIGNAL(valueChanged( int )), SLOT(slotTimeToUpdate())); + m_timer = new TQTimer(this, name); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( int )), TQT_SLOT(slotTimeToUpdate())); } void KisDelayedActionIntegerInput::slotTimeToUpdate() @@ -48,7 +48,7 @@ void KisDelayedActionIntegerInput::cancelDelayedSignal() m_timer->stop(); } -KisIntegerWidgetParam::KisIntegerWidgetParam( Q_INT32 nmin, Q_INT32 nmax, Q_INT32 ninitvalue, QString label, QString nname) : +KisIntegerWidgetParam::KisIntegerWidgetParam( TQ_INT32 nmin, TQ_INT32 nmax, TQ_INT32 ninitvalue, TQString label, TQString nname) : min(nmin), max(nmax), initvalue(ninitvalue), @@ -57,35 +57,35 @@ KisIntegerWidgetParam::KisIntegerWidgetParam( Q_INT32 nmin, Q_INT32 nmax, Q_INT { } -KisMultiIntegerFilterWidget::KisMultiIntegerFilterWidget(QWidget * parent, +KisMultiIntegerFilterWidget::KisMultiIntegerFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisIntegerWidgetParam iwparam) - : KisFilterConfigWidget( parent, name ) + : KisFilterConfigWidget( tqparent, name ) { m_nbintegerWidgets = iwparam.size(); this->setCaption(caption); - QGridLayout *widgetLayout = new QGridLayout(this, m_nbintegerWidgets + 1, 3); + TQGridLayout *widgetLayout = new TQGridLayout(this, m_nbintegerWidgets + 1, 3); widgetLayout->setColStretch ( 1, 1 ); m_integerWidgets = new KisDelayedActionIntegerInput*[ m_nbintegerWidgets ]; - for( Q_INT32 i = 0; i < m_nbintegerWidgets; ++i) + for( TQ_INT32 i = 0; i < m_nbintegerWidgets; ++i) { m_integerWidgets[i] = new KisDelayedActionIntegerInput( this, iwparam[i].name.ascii()); m_integerWidgets[i]->setRange( iwparam[i].min, iwparam[i].max); m_integerWidgets[i]->setValue( iwparam[i].initvalue ); m_integerWidgets[i]->cancelDelayedSignal(); - connect(m_integerWidgets[i], SIGNAL(valueChangedDelayed( int )), SIGNAL(sigPleaseUpdatePreview())); + connect(m_integerWidgets[i], TQT_SIGNAL(valueChangedDelayed( int )), TQT_SIGNAL(sigPleaseUpdatePreview())); - QLabel* lbl = new QLabel(iwparam[i].label+":", this); + TQLabel* lbl = new TQLabel(iwparam[i].label+":", this); widgetLayout->addWidget( lbl, i , 0); widgetLayout->addWidget( m_integerWidgets[i], i , 1); } - QSpacerItem * sp = new QSpacerItem(1, 1); + TQSpacerItem * sp = new TQSpacerItem(1, 1); widgetLayout->addItem(sp, m_nbintegerWidgets, 0); } diff --git a/krita/ui/kis_multi_integer_filter_widget.h b/krita/ui/kis_multi_integer_filter_widget.h index fe0ececf..a08f4cad 100644 --- a/krita/ui/kis_multi_integer_filter_widget.h +++ b/krita/ui/kis_multi_integer_filter_widget.h @@ -29,10 +29,11 @@ class KisDelayedActionIntegerInput : public KIntNumInput { Q_OBJECT + TQ_OBJECT public: - KisDelayedActionIntegerInput(QWidget * parent, const char * name); + KisDelayedActionIntegerInput(TQWidget * tqparent, const char * name); void cancelDelayedSignal(); @@ -46,17 +47,17 @@ signals: private: - QTimer * m_timer; + TQTimer * m_timer; }; struct KisIntegerWidgetParam { - KRITA_EXPORT KisIntegerWidgetParam( Q_INT32 nmin, Q_INT32 nmax, Q_INT32 ninitvalue, QString label, QString nname); - Q_INT32 min; - Q_INT32 max; - Q_INT32 initvalue; - QString label; - QString name; + KRITA_EXPORT KisIntegerWidgetParam( TQ_INT32 nmin, TQ_INT32 nmax, TQ_INT32 ninitvalue, TQString label, TQString nname); + TQ_INT32 min; + TQ_INT32 max; + TQ_INT32 initvalue; + TQString label; + TQString name; }; typedef std::vector vKisIntegerWidgetParam; @@ -64,17 +65,18 @@ typedef std::vector vKisIntegerWidgetParam; class KRITA_EXPORT KisMultiIntegerFilterWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisMultiIntegerFilterWidget(QWidget * parent, const char * name, const char *caption, vKisIntegerWidgetParam iwparam); + KisMultiIntegerFilterWidget(TQWidget * tqparent, const char * name, const char *caption, vKisIntegerWidgetParam iwparam); virtual void setConfiguration(KisFilterConfiguration * config); public: - inline Q_INT32 nbValues() { return m_nbintegerWidgets; }; - inline Q_INT32 valueAt( Q_INT32 i ) { return m_integerWidgets[i]->value(); }; + inline TQ_INT32 nbValues() { return m_nbintegerWidgets; }; + inline TQ_INT32 valueAt( TQ_INT32 i ) { return m_integerWidgets[i]->value(); }; private: - Q_INT32 m_nbintegerWidgets; + TQ_INT32 m_nbintegerWidgets; KisDelayedActionIntegerInput** m_integerWidgets; }; diff --git a/krita/ui/kis_opengl_canvas.cc b/krita/ui/kis_opengl_canvas.cc index 0ec9ec72..d5f8dce4 100644 --- a/krita/ui/kis_opengl_canvas.cc +++ b/krita/ui/kis_opengl_canvas.cc @@ -21,13 +21,13 @@ #include "kis_opengl_canvas_painter.h" #ifdef HAVE_GL -KisOpenGLCanvasWidget::KisOpenGLCanvasWidget(QWidget *parent, const char *name, QGLWidget *sharedContextWidget) - : QGLWidget(KisOpenGLCanvasFormat, parent, name, sharedContextWidget) +KisOpenGLCanvasWidget::KisOpenGLCanvasWidget(TQWidget *tqparent, const char *name, TQGLWidget *sharedContextWidget) + : TQGLWidget(KisOpenGLCanvasFormat, tqparent, name, sharedContextWidget) { if (isSharing()) { - kdDebug(41001) << "Created QGLWidget with sharing\n"; + kdDebug(41001) << "Created TQGLWidget with sharing\n"; } else { - kdDebug(41001) << "Created QGLWidget with no sharing\n"; + kdDebug(41001) << "Created TQGLWidget with no sharing\n"; } } @@ -35,81 +35,81 @@ KisOpenGLCanvasWidget::~KisOpenGLCanvasWidget() { } -void KisOpenGLCanvasWidget::paintEvent(QPaintEvent *e) +void KisOpenGLCanvasWidget::paintEvent(TQPaintEvent *e) { - QGLWidget::paintEvent(e); + TQGLWidget::paintEvent(e); widgetGotPaintEvent(e); } -void KisOpenGLCanvasWidget::mousePressEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mousePressEvent(TQMouseEvent *e) { widgetGotMousePressEvent(e); } -void KisOpenGLCanvasWidget::mouseReleaseEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mouseReleaseEvent(TQMouseEvent *e) { widgetGotMouseReleaseEvent(e); } -void KisOpenGLCanvasWidget::mouseDoubleClickEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mouseDoubleClickEvent(TQMouseEvent *e) { widgetGotMouseDoubleClickEvent(e); } -void KisOpenGLCanvasWidget::mouseMoveEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mouseMoveEvent(TQMouseEvent *e) { widgetGotMouseMoveEvent(e); } -void KisOpenGLCanvasWidget::tabletEvent(QTabletEvent *e) +void KisOpenGLCanvasWidget::tabletEvent(TQTabletEvent *e) { widgetGotTabletEvent(e); } -void KisOpenGLCanvasWidget::enterEvent(QEvent *e) +void KisOpenGLCanvasWidget::enterEvent(TQEvent *e) { widgetGotEnterEvent(e); } -void KisOpenGLCanvasWidget::leaveEvent(QEvent *e) +void KisOpenGLCanvasWidget::leaveEvent(TQEvent *e) { widgetGotLeaveEvent(e); } -void KisOpenGLCanvasWidget::wheelEvent(QWheelEvent *e) +void KisOpenGLCanvasWidget::wheelEvent(TQWheelEvent *e) { widgetGotWheelEvent(e); } -void KisOpenGLCanvasWidget::keyPressEvent(QKeyEvent *e) +void KisOpenGLCanvasWidget::keyPressEvent(TQKeyEvent *e) { widgetGotKeyPressEvent(e); } -void KisOpenGLCanvasWidget::keyReleaseEvent(QKeyEvent *e) +void KisOpenGLCanvasWidget::keyReleaseEvent(TQKeyEvent *e) { widgetGotKeyReleaseEvent(e); } -void KisOpenGLCanvasWidget::dragEnterEvent(QDragEnterEvent *e) +void KisOpenGLCanvasWidget::dragEnterEvent(TQDragEnterEvent *e) { widgetGotDragEnterEvent(e); } -void KisOpenGLCanvasWidget::dropEvent(QDropEvent *e) +void KisOpenGLCanvasWidget::dropEvent(TQDropEvent *e) { widgetGotDropEvent(e); } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 bool KisOpenGLCanvasWidget::x11Event(XEvent *event) { - return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(QPoint(0, 0))); + return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0))); } -#endif // Q_WS_X11 +#endif // TQ_WS_X11 KisCanvasWidgetPainter *KisOpenGLCanvasWidget::createPainter() { diff --git a/krita/ui/kis_opengl_canvas.h b/krita/ui/kis_opengl_canvas.h index 3e7231d7..79ddff09 100644 --- a/krita/ui/kis_opengl_canvas.h +++ b/krita/ui/kis_opengl_canvas.h @@ -25,21 +25,21 @@ #ifdef HAVE_GL -#include -#include +#include +#include #include "kis_global.h" #include "kis_canvas.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include -#endif // Q_WS_X11 +#endif // TQ_WS_X11 -#define KisOpenGLCanvasFormat (QGL::DoubleBuffer|QGL::Rgba|QGL::DirectRendering|QGL::NoDepthBuffer) +#define KisOpenGLCanvasFormat (TQGL::DoubleBuffer|TQGL::Rgba|TQGL::DirectRendering|TQGL::NoDepthBuffer) -class KisOpenGLCanvasWidget : public virtual QGLWidget, public virtual KisCanvasWidget { +class KisOpenGLCanvasWidget : public virtual TQGLWidget, public virtual KisCanvasWidget { public: - KisOpenGLCanvasWidget(QWidget *parent, const char *name, QGLWidget *sharedContextWidget); + KisOpenGLCanvasWidget(TQWidget *tqparent, const char *name, TQGLWidget *sharedContextWidget); ~KisOpenGLCanvasWidget(); virtual KisCanvasWidgetPainter *createPainter(); @@ -49,22 +49,22 @@ public: #endif protected: - virtual void paintEvent(QPaintEvent *event); - virtual void mousePressEvent(QMouseEvent *event); - virtual void mouseReleaseEvent(QMouseEvent *event); - virtual void mouseDoubleClickEvent(QMouseEvent *event); - virtual void mouseMoveEvent(QMouseEvent *event); - virtual void tabletEvent(QTabletEvent *event); - virtual void enterEvent(QEvent *event ); - virtual void leaveEvent(QEvent *event); - virtual void wheelEvent(QWheelEvent *event); - virtual void keyPressEvent(QKeyEvent *event); - virtual void keyReleaseEvent(QKeyEvent *event); - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); -#ifdef Q_WS_X11 + virtual void paintEvent(TQPaintEvent *event); + virtual void mousePressEvent(TQMouseEvent *event); + virtual void mouseReleaseEvent(TQMouseEvent *event); + virtual void mouseDoubleClickEvent(TQMouseEvent *event); + virtual void mouseMoveEvent(TQMouseEvent *event); + virtual void tabletEvent(TQTabletEvent *event); + virtual void enterEvent(TQEvent *event ); + virtual void leaveEvent(TQEvent *event); + virtual void wheelEvent(TQWheelEvent *event); + virtual void keyPressEvent(TQKeyEvent *event); + virtual void keyReleaseEvent(TQKeyEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); +#ifdef TQ_WS_X11 bool x11Event(XEvent *event); -#endif // Q_WS_X11 +#endif // TQ_WS_X11 }; #endif // HAVE_GL diff --git a/krita/ui/kis_opengl_canvas_painter.cc b/krita/ui/kis_opengl_canvas_painter.cc index 06e38997..f40ebf53 100644 --- a/krita/ui/kis_opengl_canvas_painter.cc +++ b/krita/ui/kis_opengl_canvas_painter.cc @@ -33,7 +33,7 @@ KisOpenGLCanvasPainter::KisOpenGLCanvasPainter() { } -KisOpenGLCanvasPainter::KisOpenGLCanvasPainter(QGLWidget *widget) +KisOpenGLCanvasPainter::KisOpenGLCanvasPainter(TQGLWidget *widget) : m_active(true), m_widget(widget) { prepareForDrawing(); @@ -51,7 +51,7 @@ KisOpenGLCanvasPainter::~KisOpenGLCanvasPainter() bool KisOpenGLCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool /*unclipped*/) { - m_widget = dynamic_cast(canvasWidget); + m_widget = dynamic_cast(canvasWidget); if (m_widget != 0) { prepareForDrawing(); @@ -75,7 +75,7 @@ void KisOpenGLCanvasPainter::prepareForDrawing() glMatrixMode(GL_TEXTURE); glLoadIdentity(); - m_window = QRect(0, 0, m_widget->width(), m_widget->height()); + m_window = TQRect(0, 0, m_widget->width(), m_widget->height()); m_viewport = m_window; updateViewTransformation(); @@ -91,7 +91,7 @@ void KisOpenGLCanvasPainter::updateViewTransformation() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - // We don't set the GL viewport directly from the Qt one as the GL + // We don't set the GL viewport directly from the TQt one as the GL // has a limited size. Instead we fold it into the projection matrix. glViewport(0, 0, m_widget->width(), m_widget->height()); glOrtho(0, m_widget->width(), m_widget->height(), 0, -1, 1); @@ -138,26 +138,26 @@ void KisOpenGLCanvasPainter::restore() void KisOpenGLCanvasPainter::setPenStyle(Qt::PenStyle penStyle) { - if (penStyle == Qt::SolidLine) { + if (penStyle == TQt::SolidLine) { glDisable(GL_LINE_STIPPLE); } else { GLushort lineStipple; switch (penStyle) { - case Qt::NoPen: + case TQt::NoPen: lineStipple = 0; break; default: - case Qt::DashLine: + case TQt::DashLine: lineStipple = 0x3fff; break; - case Qt::DotLine: + case TQt::DotLine: lineStipple = 0x3333; break; - case Qt::DashDotLine: + case TQt::DashDotLine: lineStipple = 0x33ff; break; - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: lineStipple = 0x333f; break; } @@ -167,31 +167,31 @@ void KisOpenGLCanvasPainter::setPenStyle(Qt::PenStyle penStyle) } } -QFontMetrics KisOpenGLCanvasPainter::fontMetrics() const +TQFontMetrics KisOpenGLCanvasPainter::fontMetrics() const { - return QFontMetrics(QFont()); + return TQFontMetrics(TQFont()); } -QFontInfo KisOpenGLCanvasPainter::fontInfo() const +TQFontInfo KisOpenGLCanvasPainter::fontInfo() const { - return QFontInfo(QFont()); + return TQFontInfo(TQFont()); } -const QFont& KisOpenGLCanvasPainter::font() const +const TQFont& KisOpenGLCanvasPainter::font() const { return m_defaultFont; } -void KisOpenGLCanvasPainter::setFont(const QFont& /*font*/) +void KisOpenGLCanvasPainter::setFont(const TQFont& /*font*/) { } -const QPen& KisOpenGLCanvasPainter::pen() const +const TQPen& KisOpenGLCanvasPainter::pen() const { return m_defaultPen; } -void KisOpenGLCanvasPainter::setPen(const QPen& pen) +void KisOpenGLCanvasPainter::setPen(const TQPen& pen) { setPenStyle(pen.style()); } @@ -201,60 +201,60 @@ void KisOpenGLCanvasPainter::setPen(Qt::PenStyle penStyle) setPenStyle(penStyle); } -void KisOpenGLCanvasPainter::setPen(const QColor& /*color*/) +void KisOpenGLCanvasPainter::setPen(const TQColor& /*color*/) { } -const QBrush& KisOpenGLCanvasPainter::brush() const +const TQBrush& KisOpenGLCanvasPainter::brush() const { return m_defaultBrush; } -void KisOpenGLCanvasPainter::setBrush(const QBrush& /*brush*/) +void KisOpenGLCanvasPainter::setBrush(const TQBrush& /*brush*/) { } -void KisOpenGLCanvasPainter::setBrush(Qt::BrushStyle /*brushStyle*/) +void KisOpenGLCanvasPainter::setBrush(TQt::BrushStyle /*brushStyle*/) { } -void KisOpenGLCanvasPainter::setBrush(const QColor& /*color*/) +void KisOpenGLCanvasPainter::setBrush(const TQColor& /*color*/) { } -QPoint KisOpenGLCanvasPainter::pos() const +TQPoint KisOpenGLCanvasPainter::pos() const { - return QPoint(); + return TQPoint(); } -const QColor& KisOpenGLCanvasPainter::backgroundColor() const +const TQColor& KisOpenGLCanvasPainter::backgroundColor() const { return m_defaultColor; } -void KisOpenGLCanvasPainter::setBackgroundColor(const QColor& /*color*/) +void KisOpenGLCanvasPainter::setBackgroundColor(const TQColor& /*color*/) { } -Qt::Qt::BGMode KisOpenGLCanvasPainter::backgroundMode() const +TQt::Qt::BGMode KisOpenGLCanvasPainter::backgroundMode() const { - return Qt::TransparentMode; + return TQt::TransparentMode; } -void KisOpenGLCanvasPainter::setBackgroundMode(Qt::Qt::BGMode /*bgMode*/) +void KisOpenGLCanvasPainter::setBackgroundMode(TQt::Qt::BGMode /*bgMode*/) { } -Qt::Qt::RasterOp KisOpenGLCanvasPainter::rasterOp() const +TQt::TQt::RasterOp KisOpenGLCanvasPainter::rasterOp() const { - return Qt::CopyROP; + return TQt::CopyROP; } -void KisOpenGLCanvasPainter::setRasterOp(Qt::RasterOp /*rasterOp*/) +void KisOpenGLCanvasPainter::setRasterOp(TQt::RasterOp /*rasterOp*/) { } -const QPoint& KisOpenGLCanvasPainter::brushOrigin() const +const TQPoint& KisOpenGLCanvasPainter::brushOrigin() const { return m_defaultBrushOrigin; } @@ -263,7 +263,7 @@ void KisOpenGLCanvasPainter::setBrushOrigin(int /*x*/, int /*y*/) { } -void KisOpenGLCanvasPainter::setBrushOrigin(const QPoint& /*origin*/) +void KisOpenGLCanvasPainter::setBrushOrigin(const TQPoint& /*origin*/) { } @@ -281,12 +281,12 @@ void KisOpenGLCanvasPainter::setViewXForm(bool /*enable*/) { } -QRect KisOpenGLCanvasPainter::window() const +TQRect KisOpenGLCanvasPainter::window() const { return m_window; } -void KisOpenGLCanvasPainter::setWindow(const QRect& r) +void KisOpenGLCanvasPainter::setWindow(const TQRect& r) { m_window = r; updateViewTransformation(); @@ -294,15 +294,15 @@ void KisOpenGLCanvasPainter::setWindow(const QRect& r) void KisOpenGLCanvasPainter::setWindow(int x, int y, int w, int h) { - setWindow(QRect(x, y, w, h)); + setWindow(TQRect(x, y, w, h)); } -QRect KisOpenGLCanvasPainter::viewport() const +TQRect KisOpenGLCanvasPainter::viewport() const { return m_viewport; } -void KisOpenGLCanvasPainter::setViewport(const QRect& r) +void KisOpenGLCanvasPainter::setViewport(const TQRect& r) { m_viewport = r; updateViewTransformation(); @@ -310,19 +310,19 @@ void KisOpenGLCanvasPainter::setViewport(const QRect& r) void KisOpenGLCanvasPainter::setViewport(int x, int y, int w, int h) { - setViewport(QRect(x, y, w, h)); + setViewport(TQRect(x, y, w, h)); } void KisOpenGLCanvasPainter::setWorldXForm(bool /*enable*/) { } -const QWMatrix& KisOpenGLCanvasPainter::worldMatrix() const +const TQWMatrix& KisOpenGLCanvasPainter::tqworldMatrix() const { return m_defaultWorldMatrix; } -void KisOpenGLCanvasPainter::setWorldMatrix(const QWMatrix& /*matrix*/, bool /*combine*/) +void KisOpenGLCanvasPainter::setWorldMatrix(const TQWMatrix& /*matrix*/, bool /*combine*/) { } @@ -366,42 +366,42 @@ double KisOpenGLCanvasPainter::translationY() const return 0; } -QPoint KisOpenGLCanvasPainter::xForm(const QPoint& point) const +TQPoint KisOpenGLCanvasPainter::xForm(const TQPoint& point) const { return point; } -QRect KisOpenGLCanvasPainter::xForm(const QRect& r) const +TQRect KisOpenGLCanvasPainter::xForm(const TQRect& r) const { return r; } -QPointArray KisOpenGLCanvasPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisOpenGLCanvasPainter::xForm(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisOpenGLCanvasPainter::xForm(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisOpenGLCanvasPainter::xForm(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } -QPoint KisOpenGLCanvasPainter::xFormDev(const QPoint& point) const +TQPoint KisOpenGLCanvasPainter::xFormDev(const TQPoint& point) const { return point; } -QRect KisOpenGLCanvasPainter::xFormDev(const QRect& r) const +TQRect KisOpenGLCanvasPainter::xFormDev(const TQRect& r) const { return r; } -QPointArray KisOpenGLCanvasPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisOpenGLCanvasPainter::xFormDev(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisOpenGLCanvasPainter::xFormDev(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisOpenGLCanvasPainter::xFormDev(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } @@ -415,20 +415,20 @@ bool KisOpenGLCanvasPainter::hasClipping() const return true; } -QRegion KisOpenGLCanvasPainter::clipRegion(QPainter::CoordinateMode /*mode*/) const +TQRegion KisOpenGLCanvasPainter::clipRegion(TQPainter::CoordinateMode /*mode*/) const { - return QRegion(); + return TQRegion(); } -void KisOpenGLCanvasPainter::setClipRect(const QRect& /*r*/, QPainter::CoordinateMode /*mode*/) +void KisOpenGLCanvasPainter::setClipRect(const TQRect& /*r*/, TQPainter::CoordinateMode /*mode*/) { } -void KisOpenGLCanvasPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, QPainter::CoordinateMode /*mode*/) +void KisOpenGLCanvasPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, TQPainter::CoordinateMode /*mode*/) { } -void KisOpenGLCanvasPainter::setClipRegion(const QRegion& /*rgn*/, QPainter::CoordinateMode /*mode*/) +void KisOpenGLCanvasPainter::setClipRegion(const TQRegion& /*rgn*/, TQPainter::CoordinateMode /*mode*/) { } @@ -439,12 +439,12 @@ void KisOpenGLCanvasPainter::drawPoint(int x, int y) glEnd(); } -void KisOpenGLCanvasPainter::drawPoint(const QPoint& point) +void KisOpenGLCanvasPainter::drawPoint(const TQPoint& point) { drawPoint(point.x(), point.y()); } -void KisOpenGLCanvasPainter::drawPoints(const QPointArray& pointArray, int index, int npoints) +void KisOpenGLCanvasPainter::drawPoints(const TQPointArray& pointArray, int index, int npoints) { int firstPointIndex = index; @@ -469,7 +469,7 @@ void KisOpenGLCanvasPainter::drawPoints(const QPointArray& pointArray, int index glBegin(GL_POINTS); for (int pointIndex = firstPointIndex; pointIndex <= lastPointIndex; pointIndex++) { - QPoint point = pointArray.point(pointIndex); + TQPoint point = pointArray.point(pointIndex); glVertex2i(point.x(), point.y()); } @@ -480,7 +480,7 @@ void KisOpenGLCanvasPainter::moveTo(int /*x*/, int /*y*/) { } -void KisOpenGLCanvasPainter::moveTo(const QPoint& /*point*/) +void KisOpenGLCanvasPainter::moveTo(const TQPoint& /*point*/) { } @@ -488,7 +488,7 @@ void KisOpenGLCanvasPainter::lineTo(int /*x*/, int /*y*/) { } -void KisOpenGLCanvasPainter::lineTo(const QPoint& /*point*/) +void KisOpenGLCanvasPainter::lineTo(const TQPoint& /*point*/) { } @@ -500,7 +500,7 @@ void KisOpenGLCanvasPainter::drawLine(int x1, int y1, int x2, int y2) glEnd(); } -void KisOpenGLCanvasPainter::drawLine(const QPoint& start, const QPoint& end) +void KisOpenGLCanvasPainter::drawLine(const TQPoint& start, const TQPoint& end) { drawLine(start.x(), start.y(), end.x(), end.y()); } @@ -524,7 +524,7 @@ void KisOpenGLCanvasPainter::drawRect(int x, int y, int w, int h) glEnd(); } -void KisOpenGLCanvasPainter::drawRect(const QRect& r) +void KisOpenGLCanvasPainter::drawRect(const TQRect& r) { drawRect(r.x(), r.y(), r.width(), r.height()); } @@ -533,15 +533,15 @@ void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, i { } -void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QColor& /*bgColor*/) +void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQColor& /*bgColor*/) { } -void KisOpenGLCanvasPainter::drawWinFocusRect(const QRect& /*r*/) +void KisOpenGLCanvasPainter::drawWinFocusRect(const TQRect& /*r*/) { } -void KisOpenGLCanvasPainter::drawWinFocusRect(const QRect& /*r*/, const QColor& /*bgColor*/) +void KisOpenGLCanvasPainter::drawWinFocusRect(const TQRect& /*r*/, const TQColor& /*bgColor*/) { } @@ -564,7 +564,7 @@ void KisOpenGLCanvasPainter::drawRoundRect(int x, int y, int w, int h, int /*xRn glEnd(); } -void KisOpenGLCanvasPainter::drawRoundRect(const QRect& r, int /*xRnd*/, int /*yRnd*/) +void KisOpenGLCanvasPainter::drawRoundRect(const TQRect& r, int /*xRnd*/, int /*yRnd*/) { drawRoundRect(r.x(), r.y(), r.width(), r.height()); } @@ -573,22 +573,22 @@ void KisOpenGLCanvasPainter::drawRoundRect(const QRect& r, int /*xRnd*/, int /*y // { // } // -// void KisOpenGLCanvasPainter::drawRoundRect(const QRect& /*r*/, int /*xRnd*/, int /*yRnd*/) +// void KisOpenGLCanvasPainter::drawRoundRect(const TQRect& /*r*/, int /*xRnd*/, int /*yRnd*/) // { // } void KisOpenGLCanvasPainter::drawEllipse(int x, int y, int w, int h) { - QRect r(x, y, w, h); + TQRect r(x, y, w, h); r = r.normalize(); - QPointArray points; + TQPointArray points; points.makeEllipse(r.x(), r.y(), r.width(), r.height()); drawPoints(points); } -void KisOpenGLCanvasPainter::drawEllipse(const QRect& r) +void KisOpenGLCanvasPainter::drawEllipse(const TQRect& r) { drawEllipse(r.x(), r.y(), r.width(), r.height()); } @@ -597,7 +597,7 @@ void KisOpenGLCanvasPainter::drawArc(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisOpenGLCanvasPainter::drawArc(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisOpenGLCanvasPainter::drawArc(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -605,7 +605,7 @@ void KisOpenGLCanvasPainter::drawPie(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisOpenGLCanvasPainter::drawPie(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisOpenGLCanvasPainter::drawPie(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -613,15 +613,15 @@ void KisOpenGLCanvasPainter::drawChord(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisOpenGLCanvasPainter::drawChord(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisOpenGLCanvasPainter::drawChord(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } -void KisOpenGLCanvasPainter::drawLineSegments(const QPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) +void KisOpenGLCanvasPainter::drawLineSegments(const TQPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) { } -void KisOpenGLCanvasPainter::drawPolyline(const QPointArray& pointArray, int index, int npoints) +void KisOpenGLCanvasPainter::drawPolyline(const TQPointArray& pointArray, int index, int npoints) { int firstPointIndex = index; @@ -650,24 +650,24 @@ void KisOpenGLCanvasPainter::drawPolyline(const QPointArray& pointArray, int ind glBegin(GL_LINES); for (int pointIndex = firstPointIndex; pointIndex <= lastPointIndex; pointIndex++) { - QPoint point = pointArray.point(pointIndex); + TQPoint point = pointArray.point(pointIndex); glVertex2i(point.x(), point.y()); } glEnd(); } -void KisOpenGLCanvasPainter::drawPolygon(const QPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) +void KisOpenGLCanvasPainter::drawPolygon(const TQPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) { } -void KisOpenGLCanvasPainter::drawConvexPolygon(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisOpenGLCanvasPainter::drawConvexPolygon(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } -QPoint midpoint (const QPoint& P1, const QPoint& P2) +TQPoint midpoint (const TQPoint& P1, const TQPoint& P2) { - QPoint temp; + TQPoint temp; temp.setX((P1.x()+P2.x())/2); temp.setY((P1.y()+P2.y())/2); return temp; @@ -675,16 +675,16 @@ QPoint midpoint (const QPoint& P1, const QPoint& P2) #define MAX_LEVEL 5 -void recursiveCurve (const QPoint& P1, const QPoint& P2, const QPoint& P3, - const QPoint& P4, int level, QValueList& dest) +void recursiveCurve (const TQPoint& P1, const TQPoint& P2, const TQPoint& P3, + const TQPoint& P4, int level, TQValueList& dest) { if (level > MAX_LEVEL) { dest.append(midpoint(P1,P4)); return; } - QPoint L1, L2, L3, L4; - QPoint H, R1, R2, R3, R4; + TQPoint L1, L2, L3, L4; + TQPoint H, R1, R2, R3, R4; L1 = P1; L2 = midpoint(P1, P2); @@ -699,10 +699,10 @@ void recursiveCurve (const QPoint& P1, const QPoint& P2, const QPoint& P3, recursiveCurve(R1, R2, R3, R4, level + 1, dest); } -void KisOpenGLCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int index) +void KisOpenGLCanvasPainter::drawCubicBezier(const TQPointArray& pointArray, int index) { - QPoint P1, P2, P3, P4; - QValueList dest; + TQPoint P1, P2, P3, P4; + TQValueList dest; P1 = pointArray[index++]; P2 = pointArray[index++]; P3 = pointArray[index++]; @@ -713,8 +713,8 @@ void KisOpenGLCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int glBegin(GL_LINE_STRIP); glVertex2i(P1.x(), P1.y()); - for (QValueList::iterator it = dest.begin(); it != dest.end(); it++) { - QPoint point = (*it); + for (TQValueList::iterator it = dest.begin(); it != dest.end(); it++) { + TQPoint point = (*it); glVertex2i(point.x(), point.y()); } glVertex2i(P4.x(), P4.y()); @@ -722,57 +722,57 @@ void KisOpenGLCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int glEnd(); } -void KisOpenGLCanvasPainter::drawPixmap(int /*x*/, int /*y*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) +void KisOpenGLCanvasPainter::drawPixmap(int /*x*/, int /*y*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) { } -void KisOpenGLCanvasPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/, const QRect& /*sr*/) +void KisOpenGLCanvasPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/, const TQRect& /*sr*/) { } -void KisOpenGLCanvasPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/) +void KisOpenGLCanvasPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/) { } -void KisOpenGLCanvasPainter::drawPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisOpenGLCanvasPainter::drawPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisOpenGLCanvasPainter::drawImage(int /*x*/, int /*y*/, const QImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) +void KisOpenGLCanvasPainter::drawImage(int /*x*/, int /*y*/, const TQImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) { } -void KisOpenGLCanvasPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, const QRect& /*sr*/, int /*conversionFlags*/) +void KisOpenGLCanvasPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, const TQRect& /*sr*/, int /*conversionFlags*/) { } -void KisOpenGLCanvasPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, int /*conversion_flags*/) +void KisOpenGLCanvasPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, int /*conversion_flags*/) { } -void KisOpenGLCanvasPainter::drawImage(const QRect& /*r*/, const QImage& /*image*/) +void KisOpenGLCanvasPainter::drawImage(const TQRect& /*r*/, const TQImage& /*image*/) { } -void KisOpenGLCanvasPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) +void KisOpenGLCanvasPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) { } -void KisOpenGLCanvasPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/, const QPoint& /*point*/) +void KisOpenGLCanvasPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/, const TQPoint& /*point*/) { } -void KisOpenGLCanvasPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisOpenGLCanvasPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisOpenGLCanvasPainter::fillRect(int x, int y, int w, int h, const QBrush& /*brush*/) +void KisOpenGLCanvasPainter::fillRect(int x, int y, int w, int h, const TQBrush& /*brush*/) { // XXX: Set brush glRecti(x, y, x + w, y + h); } -void KisOpenGLCanvasPainter::fillRect(const QRect& r, const QBrush& brush) +void KisOpenGLCanvasPainter::fillRect(const TQRect& r, const TQBrush& brush) { fillRect(r.x(), r.y(), r.width(), r.height(), brush); } @@ -781,50 +781,50 @@ void KisOpenGLCanvasPainter::eraseRect(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisOpenGLCanvasPainter::eraseRect(const QRect& /*r*/) +void KisOpenGLCanvasPainter::eraseRect(const TQRect& /*r*/) { } -void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisOpenGLCanvasPainter::drawText(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisOpenGLCanvasPainter::drawText(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisOpenGLCanvasPainter::drawTextItem(int /*x*/, int /*y*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisOpenGLCanvasPainter::tqdrawTextItem(int /*x*/, int /*y*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -void KisOpenGLCanvasPainter::drawTextItem(const QPoint& /*p*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisOpenGLCanvasPainter::tqdrawTextItem(const TQPoint& /*p*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -QRect KisOpenGLCanvasPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisOpenGLCanvasPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } -QRect KisOpenGLCanvasPainter::boundingRect(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisOpenGLCanvasPainter::boundingRect(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } int KisOpenGLCanvasPainter::tabStops() const diff --git a/krita/ui/kis_opengl_canvas_painter.h b/krita/ui/kis_opengl_canvas_painter.h index 7f129947..47983ce2 100644 --- a/krita/ui/kis_opengl_canvas_painter.h +++ b/krita/ui/kis_opengl_canvas_painter.h @@ -25,9 +25,9 @@ #ifdef HAVE_GL -#include -#include -#include +#include +#include +#include #include "kis_global.h" #include "kis_canvas_painter.h" @@ -35,7 +35,7 @@ class KisOpenGLCanvasPainter : public KisCanvasWidgetPainter { public: KisOpenGLCanvasPainter(); - KisOpenGLCanvasPainter(QGLWidget *widget); + KisOpenGLCanvasPainter(TQGLWidget *widget); virtual ~KisOpenGLCanvasPainter(); @@ -48,45 +48,45 @@ public: virtual void save(); virtual void restore(); - virtual QFontMetrics fontMetrics() const; - virtual QFontInfo fontInfo() const; + virtual TQFontMetrics fontMetrics() const; + virtual TQFontInfo fontInfo() const; - virtual const QFont& font() const; - virtual void setFont(const QFont&); - virtual const QPen& pen() const; - virtual void setPen(const QPen&); + virtual const TQFont& font() const; + virtual void setFont(const TQFont&); + virtual const TQPen& pen() const; + virtual void setPen(const TQPen&); virtual void setPen(Qt::PenStyle); - virtual void setPen(const QColor&); - virtual const QBrush&brush() const; - virtual void setBrush(const QBrush&); - virtual void setBrush(Qt::BrushStyle); - virtual void setBrush(const QColor&); - virtual QPoint pos() const; - - virtual const QColor& backgroundColor() const; - virtual void setBackgroundColor(const QColor&); + virtual void setPen(const TQColor&); + virtual const TQBrush&brush() const; + virtual void setBrush(const TQBrush&); + virtual void setBrush(TQt::BrushStyle); + virtual void setBrush(const TQColor&); + virtual TQPoint pos() const; + + virtual const TQColor& backgroundColor() const; + virtual void setBackgroundColor(const TQColor&); virtual Qt::BGMode backgroundMode() const; virtual void setBackgroundMode(Qt::BGMode); - virtual Qt::RasterOp rasterOp() const; - virtual void setRasterOp(Qt::RasterOp); - virtual const QPoint& brushOrigin() const; + virtual TQt::RasterOp rasterOp() const; + virtual void setRasterOp(TQt::RasterOp); + virtual const TQPoint& brushOrigin() const; virtual void setBrushOrigin(int x, int y); - virtual void setBrushOrigin(const QPoint&); + virtual void setBrushOrigin(const TQPoint&); virtual bool hasViewXForm() const; virtual bool hasWorldXForm() const; virtual void setViewXForm(bool); - virtual QRect window() const; - virtual void setWindow(const QRect&); + virtual TQRect window() const; + virtual void setWindow(const TQRect&); virtual void setWindow(int x, int y, int w, int h); - virtual QRect viewport() const; - virtual void setViewport(const QRect&); + virtual TQRect viewport() const; + virtual void setViewport(const TQRect&); virtual void setViewport(int x, int y, int w, int h); virtual void setWorldXForm(bool); - virtual const QWMatrix&worldMatrix() const; - virtual void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + virtual const TQWMatrix&tqworldMatrix() const; + virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void saveWorldMatrix(); virtual void restoreWorldMatrix(); @@ -100,86 +100,86 @@ public: virtual double translationX() const; virtual double translationY() const; - virtual QPoint xForm(const QPoint&) const; - virtual QRect xForm(const QRect&) const; - virtual QPointArray xForm(const QPointArray&) const; - virtual QPointArray xForm(const QPointArray&, int index, int npoints) const; - virtual QPoint xFormDev(const QPoint&) const; - virtual QRect xFormDev(const QRect&) const; - virtual QPointArray xFormDev(const QPointArray&) const; - virtual QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + virtual TQPoint xForm(const TQPoint&) const; + virtual TQRect xForm(const TQRect&) const; + virtual TQPointArray xForm(const TQPointArray&) const; + virtual TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + virtual TQPoint xFormDev(const TQPoint&) const; + virtual TQRect xFormDev(const TQRect&) const; + virtual TQPointArray xFormDev(const TQPointArray&) const; + virtual TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; virtual void setClipping(bool); virtual bool hasClipping() const; - virtual QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - virtual void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + virtual TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + virtual void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); virtual void drawPoint(int x, int y); - virtual void drawPoint(const QPoint&); - virtual void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + virtual void drawPoint(const TQPoint&); + virtual void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); virtual void moveTo(int x, int y); - virtual void moveTo(const QPoint&); + virtual void moveTo(const TQPoint&); virtual void lineTo(int x, int y); - virtual void lineTo(const QPoint&); + virtual void lineTo(const TQPoint&); virtual void drawLine(int x1, int y1, int x2, int y2); - virtual void drawLine(const QPoint&, const QPoint&); + virtual void drawLine(const TQPoint&, const TQPoint&); virtual void drawRect(int x, int y, int w, int h); - virtual void drawRect(const QRect&); + virtual void drawRect(const TQRect&); virtual void drawWinFocusRect(int x, int y, int w, int h); - virtual void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - virtual void drawWinFocusRect(const QRect&); - virtual void drawWinFocusRect(const QRect&, const QColor&bgColor); + virtual void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + virtual void drawWinFocusRect(const TQRect&); + virtual void drawWinFocusRect(const TQRect&, const TQColor&bgColor); virtual void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - virtual void drawRoundRect(const QRect&, int = 25, int = 25); + virtual void drawRoundRect(const TQRect&, int = 25, int = 25); virtual void drawEllipse(int x, int y, int w, int h); - virtual void drawEllipse(const QRect&); + virtual void drawEllipse(const TQRect&); virtual void drawArc(int x, int y, int w, int h, int a, int alen); - virtual void drawArc(const QRect&, int a, int alen); + virtual void drawArc(const TQRect&, int a, int alen); virtual void drawPie(int x, int y, int w, int h, int a, int alen); - virtual void drawPie(const QRect&, int a, int alen); + virtual void drawPie(const TQRect&, int a, int alen); virtual void drawChord(int x, int y, int w, int h, int a, int alen); - virtual void drawChord(const QRect&, int a, int alen); - virtual void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - virtual void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - virtual void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - virtual void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - virtual void drawCubicBezier(const QPointArray&, int index=0); - virtual void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - virtual void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - virtual void drawPixmap(const QPoint&, const QPixmap&); - virtual void drawPixmap(const QRect&, const QPixmap&); - virtual void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - virtual void drawImage(const QRect&, const QImage&); - virtual void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - virtual void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - virtual void drawTiledPixmap(const QRect&, const QPixmap&); - //virtual void drawPicture(const QPicture&); - //virtual void drawPicture(int x, int y, const QPicture&); - //virtual void drawPicture(const QPoint&, const QPicture&); - - virtual void fillRect(int x, int y, int w, int h, const QBrush&); - virtual void fillRect(const QRect&, const QBrush&); + virtual void drawChord(const TQRect&, int a, int alen); + virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawCubicBezier(const TQPointArray&, int index=0); + virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + virtual void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + virtual void drawPixmap(const TQPoint&, const TQPixmap&); + virtual void drawPixmap(const TQRect&, const TQPixmap&); + virtual void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + virtual void drawImage(const TQRect&, const TQImage&); + virtual void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&); + //virtual void drawPicture(const TQPicture&); + //virtual void drawPicture(int x, int y, const TQPicture&); + //virtual void drawPicture(const TQPoint&, const TQPicture&); + + virtual void fillRect(int x, int y, int w, int h, const TQBrush&); + virtual void fillRect(const TQRect&, const TQBrush&); virtual void eraseRect(int x, int y, int w, int h); - virtual void eraseRect(const QRect&); + virtual void eraseRect(const TQRect&); - virtual void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - virtual void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + virtual void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + virtual void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - virtual void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - virtual void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - virtual QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - virtual QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + virtual TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + virtual TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); virtual int tabStops() const; virtual void setTabStops(int); @@ -192,18 +192,18 @@ protected: void setPenStyle(Qt::PenStyle penStyle); protected: - QFont m_defaultFont; - QPen m_defaultPen; - QBrush m_defaultBrush; - QColor m_defaultColor; - QPoint m_defaultBrushOrigin; - QWMatrix m_defaultWorldMatrix; - QRect m_window; - QRect m_viewport; + TQFont m_defaultFont; + TQPen m_defaultPen; + TQBrush m_defaultBrush; + TQColor m_defaultColor; + TQPoint m_defaultBrushOrigin; + TQWMatrix m_defaultWorldMatrix; + TQRect m_window; + TQRect m_viewport; bool m_active; protected: - QGLWidget *m_widget; + TQGLWidget *m_widget; }; #endif // HAVE_GL diff --git a/krita/ui/kis_opengl_image_context.cc b/krita/ui/kis_opengl_image_context.cc index f3ad4341..f60b7965 100644 --- a/krita/ui/kis_opengl_image_context.cc +++ b/krita/ui/kis_opengl_image_context.cc @@ -37,7 +37,7 @@ using namespace std; -QGLWidget *KisOpenGLImageContext::SharedContextWidget = 0; +TQGLWidget *KisOpenGLImageContext::SharedContextWidget = 0; int KisOpenGLImageContext::SharedContextWidgetRefCount = 0; KisOpenGLImageContext::ImageContextMap KisOpenGLImageContext::imageContextMap; @@ -78,7 +78,7 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit if (SharedContextWidget == 0) { kdDebug(41001) << "Creating shared context widget\n"; - SharedContextWidget = new QGLWidget(KisOpenGLCanvasFormat); + SharedContextWidget = new TQGLWidget(KisOpenGLCanvasFormat); } ++SharedContextWidgetRefCount; @@ -93,15 +93,15 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size); - m_imageTextureTileWidth = QMIN(PREFERRED_IMAGE_TEXTURE_WIDTH, max_texture_size); - m_imageTextureTileHeight = QMIN(PREFERRED_IMAGE_TEXTURE_HEIGHT, max_texture_size); + m_imageTextureTileWidth = TQMIN(PREFERRED_IMAGE_TEXTURE_WIDTH, max_texture_size); + m_imageTextureTileHeight = TQMIN(PREFERRED_IMAGE_TEXTURE_HEIGHT, max_texture_size); createImageTextureTiles(); - connect(m_image, SIGNAL(sigImageUpdated(QRect)), - SLOT(slotImageUpdated(QRect))); - connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), - SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), + TQT_SLOT(slotImageUpdated(TQRect))); + connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), + TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); updateImageTextureTiles(m_image->bounds()); } @@ -109,7 +109,7 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit KisOpenGLImageContextSP KisOpenGLImageContext::getImageContext(KisImageSP image, KisProfile *monitorProfile) { if (imageCanShareImageContext(image)) { - ImageContextMap::iterator it = imageContextMap.find(image); + ImageContextMap::iterator it = imageContextMap.tqfind(image); if (it != imageContextMap.end()) { @@ -144,16 +144,16 @@ bool KisOpenGLImageContext::imageCanShareImageContext(KisImageSP image) } } -QGLWidget *KisOpenGLImageContext::sharedContextWidget() const +TQGLWidget *KisOpenGLImageContext::sharedContextWidget() const { return SharedContextWidget; } -void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect) +void KisOpenGLImageContext::updateImageTextureTiles(const TQRect& rect) { //kdDebug() << "updateImageTextureTiles " << rect << endl; - QRect updateRect = rect & m_image->bounds(); + TQRect updateRect = rect & m_image->bounds(); if (!updateRect.isEmpty()) { @@ -167,10 +167,10 @@ void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect) for (int column = firstColumn; column <= lastColumn; column++) { for (int row = firstRow; row <= lastRow; row++) { - QRect tileRect(column * m_imageTextureTileWidth, row * m_imageTextureTileHeight, + TQRect tileRect(column * m_imageTextureTileWidth, row * m_imageTextureTileHeight, m_imageTextureTileWidth, m_imageTextureTileHeight); - QRect tileUpdateRect = tileRect & updateRect; + TQRect tileUpdateRect = tileRect & updateRect; glBindTexture(GL_TEXTURE_2D, imageTextureTile(tileRect.x(), tileRect.y())); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -180,7 +180,7 @@ void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect) glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - QImage tileUpdateImage = m_image->convertToQImage(tileUpdateRect.left(), tileUpdateRect.top(), + TQImage tileUpdateImage = m_image->convertToTQImage(tileUpdateRect.left(), tileUpdateRect.top(), tileUpdateRect.right(), tileUpdateRect.bottom(), m_monitorProfile, m_exposure); @@ -254,7 +254,7 @@ void KisOpenGLImageContext::generateBackgroundTexture() glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - QImage backgroundImage = m_image->background()->patternTile(); + TQImage backgroundImage = m_image->background()->patternTile(); // XXX: temp. Q_ASSERT(backgroundImage.width() == BACKGROUND_TEXTURE_WIDTH); @@ -279,9 +279,9 @@ int KisOpenGLImageContext::imageTextureTileIndex(int x, int y) const GLuint KisOpenGLImageContext::imageTextureTile(int pixelX, int pixelY) const { - Q_INT32 textureTileIndex = imageTextureTileIndex(pixelX, pixelY); + TQ_INT32 textureTileIndex = imageTextureTileIndex(pixelX, pixelY); - textureTileIndex = CLAMP(textureTileIndex, 0, ((Q_INT32)m_imageTextureTiles.count()) - 1); + textureTileIndex = CLAMP(textureTileIndex, 0, ((TQ_INT32)m_imageTextureTiles.count()) - 1); return m_imageTextureTiles[textureTileIndex]; } @@ -312,7 +312,7 @@ void KisOpenGLImageContext::createImageTextureTiles() //XXX: will be float/half with shaders #define RGBA_BYTES_PER_PIXEL 4 - QByteArray emptyTilePixelData(m_imageTextureTileWidth * m_imageTextureTileHeight * RGBA_BYTES_PER_PIXEL); + TQByteArray emptyTilePixelData(m_imageTextureTileWidth * m_imageTextureTileHeight * RGBA_BYTES_PER_PIXEL); emptyTilePixelData.fill(0); for (int tileIndex = 0; tileIndex < numImageTextureTiles; ++tileIndex) { @@ -339,7 +339,7 @@ void KisOpenGLImageContext::destroyImageTextureTiles() } } -void KisOpenGLImageContext::update(const QRect& imageRect) +void KisOpenGLImageContext::update(const TQRect& imageRect) { updateImageTextureTiles(imageRect); } @@ -349,15 +349,15 @@ void KisOpenGLImageContext::setSelectionDisplayEnabled(bool enable) m_displaySelection = enable; } -void KisOpenGLImageContext::slotImageUpdated(QRect rc) +void KisOpenGLImageContext::slotImageUpdated(TQRect rc) { - QRect r = rc & m_image->bounds(); + TQRect r = rc & m_image->bounds(); updateImageTextureTiles(r); emit sigImageUpdated(r); } -void KisOpenGLImageContext::slotImageSizeChanged(Q_INT32 w, Q_INT32 h) +void KisOpenGLImageContext::slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h) { createImageTextureTiles(); updateImageTextureTiles(m_image->bounds()); diff --git a/krita/ui/kis_opengl_image_context.h b/krita/ui/kis_opengl_image_context.h index d1ba6278..03833cd2 100644 --- a/krita/ui/kis_opengl_image_context.h +++ b/krita/ui/kis_opengl_image_context.h @@ -26,23 +26,24 @@ #include -#include -#include -#include +#include +#include +#include #include #include "kis_types.h" -class QRegion; +class TQRegion; class KisOpenGLImageContext; typedef KSharedPtr KisOpenGLImageContextSP; class KisColorSpace; -class KRITACORE_EXPORT KisOpenGLImageContext : public QObject , public KShared { +class KRITACORE_EXPORT KisOpenGLImageContext : public TQObject , public KShared { Q_OBJECT + TQ_OBJECT public: static KisOpenGLImageContextSP getImageContext(KisImageSP image, KisProfile *monitorProfile); @@ -53,8 +54,8 @@ public: public: // In order to use the image textures, the caller must pass // the sharedContextWidget() as the shareWidget argument to the - // QGLWidget constructor. - QGLWidget *sharedContextWidget() const; + // TQGLWidget constructor. + TQGLWidget *sharedContextWidget() const; void setMonitorProfile(KisProfile *profile); void setHDRExposure(float exposure); @@ -82,7 +83,7 @@ public: * * @param imageRect The rectangle to update in image coordinates. */ - void update(const QRect& imageRect); + void update(const TQRect& imageRect); signals: /** @@ -97,7 +98,7 @@ signals: * * @param rc The rect that has been recomposited. */ - void sigImageUpdated(QRect rc); + void sigImageUpdated(TQRect rc); /** * Emitted whenever the image size changes. @@ -105,7 +106,7 @@ signals: * @param width New image width * @param height New image height */ - void sigSizeChanged(Q_INT32 width, Q_INT32 height); + void sigSizeChanged(TQ_INT32 width, TQ_INT32 height); protected: KisOpenGLImageContext(KisImageSP image, KisProfile *monitorProfile); @@ -114,14 +115,14 @@ protected: void createImageTextureTiles(); void destroyImageTextureTiles(); int imageTextureTileIndex(int x, int y) const; - void updateImageTextureTiles(const QRect& rect); + void updateImageTextureTiles(const TQRect& rect); static KisColorSpace* textureColorSpaceForImageColorSpace(KisColorSpace *imageColorSpace); static bool imageCanShareImageContext(KisImageSP image); protected slots: - void slotImageUpdated(QRect r); - void slotImageSizeChanged(Q_INT32 w, Q_INT32 h); + void slotImageUpdated(TQRect r); + void slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h); private: KisImageSP m_image; @@ -134,15 +135,15 @@ private: static const int PREFERRED_IMAGE_TEXTURE_WIDTH = 256; static const int PREFERRED_IMAGE_TEXTURE_HEIGHT = 256; - QValueVector m_imageTextureTiles; + TQValueVector m_imageTextureTiles; int m_imageTextureTileWidth; int m_imageTextureTileHeight; int m_numImageTextureTileColumns; // We create a single OpenGL context and share it between all views - // in the process. Apparently with some OpenGL implementations, only + // in the process. Aptqparently with some OpenGL implementations, only // one context will be hardware accelerated. - static QGLWidget *SharedContextWidget; + static TQGLWidget *SharedContextWidget; static int SharedContextWidgetRefCount; typedef std::map ImageContextMap; diff --git a/krita/ui/kis_paintop_box.cc b/krita/ui/kis_paintop_box.cc index 3479075d..b29077fd 100644 --- a/krita/ui/kis_paintop_box.cc +++ b/krita/ui/kis_paintop_box.cc @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,8 +43,8 @@ #include "kis_paintop_box.h" -KisPaintopBox::KisPaintopBox (KisView * view, QWidget *parent, const char * name) - : super (parent, name), +KisPaintopBox::KisPaintopBox (KisView * view, TQWidget *tqparent, const char * name) + : super (tqparent, name), m_canvasController(view->getCanvasController()) { #if KDE_VERSION >= KDE_MAKE_VERSION(3,3,90) @@ -55,17 +55,17 @@ KisPaintopBox::KisPaintopBox (KisView * view, QWidget *parent, const char * name setCaption(i18n("Painter's Toolchest")); m_optionWidget = 0; - m_paintops = new QValueList(); - m_displayedOps = new QValueList(); + m_paintops = new TQValueList(); + m_displayedOps = new TQValueList(); - m_cmbPaintops = new QComboBox(this, "KisPaintopBox::m_cmbPaintops"); + m_cmbPaintops = new TQComboBox(this, "KisPaintopBox::m_cmbPaintops"); m_cmbPaintops->setMinimumWidth(150); - QToolTip::add(m_cmbPaintops, i18n("Styles of painting for the painting tools")); - m_layout = new QHBoxLayout(this, 1, 1); + TQToolTip::add(m_cmbPaintops, i18n("Styles of painting for the painting tools")); + m_layout = new TQHBoxLayout(this, 1, 1); m_layout->addWidget(m_cmbPaintops); - connect(this, SIGNAL(selected(const KisID &, const KisPaintOpSettings *)), view, SLOT(paintopActivated(const KisID &, const KisPaintOpSettings *))); - connect(m_cmbPaintops, SIGNAL(activated(int)), this, SLOT(slotItemSelected(int))); + connect(this, TQT_SIGNAL(selected(const KisID &, const KisPaintOpSettings *)), view, TQT_SLOT(paintopActivated(const KisID &, const KisPaintOpSettings *))); + connect(m_cmbPaintops, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotItemSelected(int))); // XXX: Let's see... Are all paintops loaded and ready? KisIDList keys = KisPaintOpRegistry::instance()->listKeys(); @@ -74,10 +74,10 @@ KisPaintopBox::KisPaintopBox (KisView * view, QWidget *parent, const char * name addItem(*it); } - connect(view, SIGNAL(currentColorSpaceChanged(KisColorSpace*)), - this, SLOT(colorSpaceChanged(KisColorSpace*))); - connect(view, SIGNAL(sigInputDeviceChanged(const KisInputDevice&)), - this, SLOT(slotInputDeviceChanged(const KisInputDevice&))); + connect(view, TQT_SIGNAL(currentColorSpaceChanged(KisColorSpace*)), + this, TQT_SLOT(colorSpaceChanged(KisColorSpace*))); + connect(view, TQT_SIGNAL(sigInputDeviceChanged(const KisInputDevice&)), + this, TQT_SLOT(slotInputDeviceChanged(const KisInputDevice&))); setCurrentPaintop(defaultPaintop(m_canvasController->currentInputDevice())); } @@ -88,7 +88,7 @@ KisPaintopBox::~KisPaintopBox() delete m_displayedOps; } -void KisPaintopBox::addItem(const KisID & paintop, const QString & /*category*/) +void KisPaintopBox::addItem(const KisID & paintop, const TQString & /*category*/) { m_paintops->append(paintop); } @@ -106,16 +106,16 @@ void KisPaintopBox::slotItemSelected(int index) void KisPaintopBox::colorSpaceChanged(KisColorSpace *cs) { - QValueList::iterator it = m_paintops->begin(); - QValueList::iterator end = m_paintops->end(); + TQValueList::iterator it = m_paintops->begin(); + TQValueList::iterator end = m_paintops->end(); m_displayedOps->clear(); m_cmbPaintops->clear(); for ( ; it != end; ++it ) { if (KisPaintOpRegistry::instance()->userVisible(*it, cs)) { - QPixmap pm = paintopPixmap(*it); + TQPixmap pm = paintopPixmap(*it); if (pm.isNull()) { - QPixmap p = QPixmap( 16, 16 ); + TQPixmap p = TQPixmap( 16, 16 ); p.fill(); m_cmbPaintops->insertItem(p, (*it).name()); } @@ -138,23 +138,23 @@ void KisPaintopBox::colorSpaceChanged(KisColorSpace *cs) slotItemSelected( index ); } -QPixmap KisPaintopBox::paintopPixmap(const KisID & paintop) +TQPixmap KisPaintopBox::paintopPixmap(const KisID & paintop) { - QString pixmapName = KisPaintOpRegistry::instance()->pixmap(paintop); + TQString pixmapName = KisPaintOpRegistry::instance()->pixmap(paintop); if (pixmapName.isEmpty()) { - return QPixmap(); + return TQPixmap(); } - QString fname = KisFactory::instance()->dirs()->findResource("kis_images", pixmapName); + TQString fname = KisFactory::instance()->dirs()->findResource("kis_images", pixmapName); - return QPixmap(fname); + return TQPixmap(fname); } void KisPaintopBox::slotInputDeviceChanged(const KisInputDevice & inputDevice) { KisID paintop; - InputDevicePaintopMap::iterator it = m_currentID.find(inputDevice); + InputDevicePaintopMap::iterator it = m_currentID.tqfind(inputDevice); if (it == m_currentID.end()) { paintop = defaultPaintop(inputDevice); @@ -180,7 +180,7 @@ void KisPaintopBox::updateOptionWidget() if (m_optionWidget != 0) { m_layout->remove(m_optionWidget); m_optionWidget->hide(); - m_layout->invalidate(); + m_layout->tqinvalidate(); } const KisPaintOpSettings *settings = paintopSettings(currentPaintop(), m_canvasController->currentInputDevice()); @@ -220,13 +220,13 @@ KisID KisPaintopBox::defaultPaintop(const KisInputDevice& inputDevice) const KisPaintOpSettings *KisPaintopBox::paintopSettings(const KisID & paintop, const KisInputDevice & inputDevice) { - QValueVector settingsArray; - InputDevicePaintopSettingsMap::iterator it = m_inputDevicePaintopSettings.find(inputDevice); + TQValueVector settingsArray; + InputDevicePaintopSettingsMap::iterator it = m_inputDevicePaintopSettings.tqfind(inputDevice); if (it == m_inputDevicePaintopSettings.end()) { // Create settings for each paintop. - for (QValueList::const_iterator pit = m_paintops->begin(); pit != m_paintops->end(); ++pit) { + for (TQValueList::const_iterator pit = m_paintops->begin(); pit != m_paintops->end(); ++pit) { KisPaintOpSettings *settings = KisPaintOpRegistry::instance()->settings(*pit, this, inputDevice); settingsArray.append(settings); if (settings && settings->widget()) { diff --git a/krita/ui/kis_paintop_box.h b/krita/ui/kis_paintop_box.h index da158194..38b88ddb 100644 --- a/krita/ui/kis_paintop_box.h +++ b/krita/ui/kis_paintop_box.h @@ -23,13 +23,13 @@ #include -#include -#include -#include +#include +#include +#include #include "kis_input_device.h" -class QString; +class TQString; class KWidgetAction; class KisView; @@ -47,14 +47,15 @@ class KisColorSpace; * * XXX: instead of text, use pretty pictures. */ -class KisPaintopBox : public QWidget { +class KisPaintopBox : public TQWidget { Q_OBJECT + TQ_OBJECT - typedef QWidget super; + typedef TQWidget super; public: - KisPaintopBox (KisView * view, QWidget * parent, const char * name = 0); + KisPaintopBox (KisView * view, TQWidget * tqparent, const char * name = 0); ~KisPaintopBox(); @@ -65,7 +66,7 @@ signals: private slots: - void addItem(const KisID & paintop, const QString & category = ""); + void addItem(const KisID & paintop, const TQString & category = ""); private slots: @@ -74,7 +75,7 @@ private slots: void slotInputDeviceChanged(const KisInputDevice & inputDevice); private: - QPixmap paintopPixmap(const KisID & paintop); + TQPixmap paintopPixmap(const KisID & paintop); void updateOptionWidget(); const KisID & currentPaintop(); void setCurrentPaintop(const KisID & paintop); @@ -83,17 +84,17 @@ private: private: KisCanvasController *m_canvasController; - QComboBox * m_cmbPaintops; - QHBoxLayout * m_layout; - QWidget * m_optionWidget; + TQComboBox * m_cmbPaintops; + TQHBoxLayout * m_layout; + TQWidget * m_optionWidget; - QValueList * m_paintops; - QValueList * m_displayedOps; + TQValueList * m_paintops; + TQValueList * m_displayedOps; typedef std::map InputDevicePaintopMap; InputDevicePaintopMap m_currentID; - typedef std::map > InputDevicePaintopSettingsMap; + typedef std::map > InputDevicePaintopSettingsMap; InputDevicePaintopSettingsMap m_inputDevicePaintopSettings; }; diff --git a/krita/ui/kis_palette_view.cc b/krita/ui/kis_palette_view.cc index 2fe3f6e9..dfc75eb4 100644 --- a/krita/ui/kis_palette_view.cc +++ b/krita/ui/kis_palette_view.cc @@ -22,20 +22,20 @@ #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 +#include +#include +#include #include #include @@ -62,23 +62,23 @@ #include "kis_resource.h" #include "kis_palette.h" -KisPaletteView::KisPaletteView(QWidget *parent, const char* name, int minWidth, int cols) - : QScrollView( parent, name ), mMinWidth(minWidth), mCols(cols) +KisPaletteView::KisPaletteView(TQWidget *tqparent, const char* name, int minWidth, int cols) + : TQScrollView( tqparent, name ), mMinWidth(minWidth), mCols(cols) { m_cells = 0; m_currentPalette = 0; - QSize cellSize = QSize( mMinWidth, 50); + TQSize cellSize = TQSize( mMinWidth, 50); - setHScrollBarMode(QScrollView::AlwaysOff); - setVScrollBarMode(QScrollView::AlwaysOn); + setHScrollBarMode(TQScrollView::AlwaysOff); + setVScrollBarMode(TQScrollView::AlwaysOn); - QSize minSize = QSize(verticalScrollBar()->width(), 0); - minSize += QSize(frameWidth(), 0); - minSize += QSize(cellSize); + TQSize minSize = TQSize(verticalScrollBar()->width(), 0); + minSize += TQSize(frameWidth(), 0); + minSize += TQSize(cellSize); setMinimumSize(minSize); - setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored)); } KisPaletteView::~KisPaletteView() @@ -105,20 +105,20 @@ void KisPaletteView::setPalette(KisPalette* palette) m_cells->setShading(false); m_cells->setAcceptDrags(false); - QSize cellSize = QSize( mMinWidth, mMinWidth * rows / mCols); + TQSize cellSize = TQSize( mMinWidth, mMinWidth * rows / mCols); m_cells->setFixedSize( cellSize ); for( int i = 0; i < m_currentPalette->nColors(); i++) { - QColor c = m_currentPalette->getColor(i).color; + TQColor c = m_currentPalette->getColor(i).color; m_cells->setColor( i, c ); } - connect(m_cells, SIGNAL(colorSelected(int)), - SLOT(slotColorCellSelected(int))); + connect(m_cells, TQT_SIGNAL(colorSelected(int)), + TQT_SLOT(slotColorCellSelected(int))); - connect(m_cells, SIGNAL(colorDoubleClicked(int)), - SLOT(slotColorCellDoubleClicked(int)) ); + connect(m_cells, TQT_SIGNAL(colorDoubleClicked(int)), + TQT_SLOT(slotColorCellDoubleClicked(int)) ); addChild( m_cells ); m_cells->show(); diff --git a/krita/ui/kis_palette_view.h b/krita/ui/kis_palette_view.h index 8812acdb..79b3e0b0 100644 --- a/krita/ui/kis_palette_view.h +++ b/krita/ui/kis_palette_view.h @@ -20,7 +20,7 @@ #ifndef __KIS_PALETTE_VIEW_H__ #define __KIS_PALETTE_VIEW_H__ -#include +#include #include "kis_palette.h" class KListBox; @@ -32,11 +32,12 @@ class KisColor; /** * A scrolling view that lists a single KisPalette */ -class KisPaletteView : public QScrollView +class KisPaletteView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - KisPaletteView(QWidget *parent, const char* name = 0, int minWidth=210, int cols = 16); + KisPaletteView(TQWidget *tqparent, const char* name = 0, int minWidth=210, int cols = 16); virtual ~KisPaletteView(); KisPalette* palette() const; @@ -48,8 +49,8 @@ public slots: signals: void colorSelected(const KisColor &); - void colorSelected(const QColor &); - void colorDoubleClicked(const KisColor &, const QString &); + void colorSelected(const TQColor &); + void colorDoubleClicked(const KisColor &, const TQString &); protected slots: void slotColorCellSelected( int ); diff --git a/krita/ui/kis_palette_widget.cc b/krita/ui/kis_palette_widget.cc index 507ccc15..a8305337 100644 --- a/krita/ui/kis_palette_widget.cc +++ b/krita/ui/kis_palette_widget.cc @@ -19,20 +19,20 @@ #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 +#include +#include +#include #include #include @@ -60,39 +60,39 @@ #include "kis_palette.h" #include "kis_palette_view.h" -KisPaletteWidget::KisPaletteWidget( QWidget *parent, int minWidth, int cols) - : QWidget( parent ), mMinWidth(minWidth), mCols(cols) +KisPaletteWidget::KisPaletteWidget( TQWidget *tqparent, int minWidth, int cols) + : TQWidget( tqparent ), mMinWidth(minWidth), mCols(cols) { init = false; m_currentPalette = 0; - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); - combo = new QComboBox( false, this ); - combo->setFocusPolicy( QWidget::ClickFocus ); - layout->addWidget(combo); + combo = new TQComboBox( false, this ); + combo->setFocusPolicy( TQ_ClickFocus ); + tqlayout->addWidget(combo); m_view = new KisPaletteView(this, 0, minWidth, cols); - layout->addWidget( m_view ); - - //setFixedSize(sizeHint()); - - connect(combo, SIGNAL(activated(const QString &)), - this, SLOT(slotSetPalette(const QString &))); - connect(m_view, SIGNAL(colorSelected(const KisColor &)), - this, SIGNAL(colorSelected(const KisColor &))); - connect(m_view, SIGNAL(colorSelected(const QColor &)), - this, SIGNAL(colorSelected(const QColor &))); - connect(m_view, SIGNAL(colorDoubleClicked(const KisColor &, const QString &)), - this, SIGNAL(colorDoubleClicked(const KisColor &, const QString &))); + tqlayout->addWidget( m_view ); + + //setFixedSize(tqsizeHint()); + + connect(combo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotSetPalette(const TQString &))); + connect(m_view, TQT_SIGNAL(colorSelected(const KisColor &)), + this, TQT_SIGNAL(colorSelected(const KisColor &))); + connect(m_view, TQT_SIGNAL(colorSelected(const TQColor &)), + this, TQT_SIGNAL(colorSelected(const TQColor &))); + connect(m_view, TQT_SIGNAL(colorDoubleClicked(const KisColor &, const TQString &)), + this, TQT_SIGNAL(colorDoubleClicked(const KisColor &, const TQString &))); } KisPaletteWidget::~KisPaletteWidget() { } -QString KisPaletteWidget::palette() const +TQString KisPaletteWidget::palette() const { return combo->currentText(); } @@ -107,16 +107,16 @@ QString KisPaletteWidget::palette() const // set the palette and then use the information to emit a signal with the // new color setting. It is only used by the combobox widget. // -void KisPaletteWidget::slotSetPalette( const QString &_paletteName ) +void KisPaletteWidget::slotSetPalette( const TQString &_paletteName ) { setPalette( _paletteName ); m_view->slotColorCellSelected(0); // FIXME: We need to save the current value!! } -void KisPaletteWidget::setPalette( const QString &_paletteName ) +void KisPaletteWidget::setPalette( const TQString &_paletteName ) { - QString paletteName( _paletteName); + TQString paletteName( _paletteName); m_currentPalette = m_namedPaletteMap[paletteName]; diff --git a/krita/ui/kis_palette_widget.h b/krita/ui/kis_palette_widget.h index bdfa8cdf..6323b0a7 100644 --- a/krita/ui/kis_palette_widget.h +++ b/krita/ui/kis_palette_widget.h @@ -19,11 +19,11 @@ #ifndef __KIS_PALETTE_WIDGET_H__ #define __KIS_PALETTE_WIDGET_H__ -#include +#include #include "kis_palette_view.h" -class QComboBox; -class QLineEdit; +class TQComboBox; +class TQLineEdit; class KListBox; class KisPalette; class KisResource; @@ -36,26 +36,27 @@ class KisColor; * @author was Waldo Bastian -- much has changed, though, * to work with KisPalettes and the resource server. */ -class KisPaletteWidget : public QWidget +class KisPaletteWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KisPaletteWidget( QWidget *parent, int minWidth=210, int cols = 16); + KisPaletteWidget( TQWidget *tqparent, int minWidth=210, int cols = 16); virtual ~KisPaletteWidget(); - QString palette() const; + TQString palette() const; KisPaletteEntry currentEntry() const { return m_view->currentEntry(); } public slots: - void setPalette(const QString &paletteName); + void setPalette(const TQString &paletteName); signals: void colorSelected(const KisColor &); - void colorSelected(const QColor&); - void colorDoubleClicked( const KisColor &, const QString &); + void colorSelected(const TQColor&); + void colorDoubleClicked( const KisColor &, const TQString &); protected slots: - void slotSetPalette( const QString &_paletteName ); + void slotSetPalette( const TQString &_paletteName ); public slots: // Called by the resource server whenever a palette is loaded. @@ -66,10 +67,10 @@ protected: protected: KisPaletteView* m_view; - QDict m_namedPaletteMap; + TQDict m_namedPaletteMap; KisPalette * m_currentPalette; - QComboBox *combo; - QScrollView *sv; + TQComboBox *combo; + TQScrollView *sv; int mMinWidth; int mCols; bool init; diff --git a/krita/ui/kis_part_layer.cc b/krita/ui/kis_part_layer.cc index f34f6ebc..233841e3 100644 --- a/krita/ui/kis_part_layer.cc +++ b/krita/ui/kis_part_layer.cc @@ -16,10 +16,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qpaintdevice.h" -#include "qpixmap.h" -#include "qimage.h" -#include "qpainter.h" +#include "tqpaintdevice.h" +#include "tqpixmap.h" +#include "tqimage.h" +#include "tqpainter.h" #include @@ -37,7 +37,7 @@ #include "kis_paint_device.h" #include -KisChildDoc::KisChildDoc ( KisDoc * kisDoc, const QRect & rect, KoDocument * childDoc ) +KisChildDoc::KisChildDoc ( KisDoc * kisDoc, const TQRect & rect, KoDocument * childDoc ) : KoDocumentChild( kisDoc, childDoc, rect ) , m_doc(kisDoc) , m_partLayer(0) @@ -54,7 +54,7 @@ KisChildDoc::KisChildDoc ( KisDoc * kisDoc ) KisChildDoc::~KisChildDoc () { // XXX doesn't this get deleted by itself or by anything else? Certainly looks so - // (otherwise I get a double deletion of a QObject, and krita crashes) + // (otherwise I get a double deletion of a TQObject, and krita crashes) //delete m_doc; } @@ -80,33 +80,33 @@ void KisPartLayerImpl::childActivated(KoDocumentChild* child) { // Clear the image, so that if we move the part while activated, no ghosts show up if (!m_activated && child == m_doc) { - QRect rect = extent(); + TQRect rect = extent(); m_activated = true; setDirty(rect); - QPtrList views = child->parentDocument()->views(); + TQPtrList views = child->tqparentDocument()->views(); Q_ASSERT(views.count()); // XXX iterate over views - connect(views.at(0), SIGNAL(activated(bool)), - this, SLOT(childDeactivated(bool))); + connect(views.at(0), TQT_SIGNAL(activated(bool)), + this, TQT_SLOT(childDeactivated(bool))); } } // Called when another layer is made inactive void KisPartLayerImpl::childDeactivated(bool activated) { - // We probably changed, notify the image that it needs to repaint where we currently updated - // We use the original geometry + // We probably changed, notify the image that it needs to tqrepaint where we currently updated + // We use the original tqgeometry if (m_activated && !activated /* no clue, but debugging suggests it is false here */) { - QPtrList views = m_doc->parentDocument()->views(); + TQPtrList views = m_doc->tqparentDocument()->views(); Q_ASSERT(views.count()); - views.at(0)->disconnect(SIGNAL(activated(bool))); + views.at(0)->disconnect(TQT_SIGNAL(activated(bool))); m_activated = false; - setDirty(m_doc->geometry()); + setDirty(m_doc->tqgeometry()); } } -void KisPartLayerImpl::setX(Q_INT32 x) { - QRect rect = m_doc->geometry(); +void KisPartLayerImpl::setX(TQ_INT32 x) { + TQRect rect = m_doc->tqgeometry(); // KisPaintDevice::move moves to absolute coordinates, not relative. Work around that here, // since the part is not necesarily started at (0,0) @@ -114,8 +114,8 @@ void KisPartLayerImpl::setX(Q_INT32 x) { m_doc->setGeometry(rect); } -void KisPartLayerImpl::setY(Q_INT32 y) { - QRect rect = m_doc->geometry(); +void KisPartLayerImpl::setY(TQ_INT32 y) { + TQRect rect = m_doc->tqgeometry(); // KisPaintDevice::move moves to absolute coordinates, not relative. Work around that here, // since the part is not necesarily started at (0,0) @@ -123,14 +123,14 @@ void KisPartLayerImpl::setY(Q_INT32 y) { m_doc->setGeometry(rect); } -void KisPartLayerImpl::paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) { +void KisPartLayerImpl::paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { uchar *j = img.bits(); - QRect rect = m_doc->geometry(); + TQRect rect = m_doc->tqgeometry(); for (int y2 = y; y2 < h + y; ++y2) { for (int x2 = x; x2 < w + x; ++x2) { - if (!rect.contains(x2, y2)) { - Q_UINT8 g = (*(j + 0) + *(j + 1 ) + *(j + 2 )) / 9; + if (!rect.tqcontains(x2, y2)) { + TQ_UINT8 g = (*(j + 0) + *(j + 1 ) + *(j + 2 )) / 9; *(j+0) = 165+g; *(j+1) = 128+g; *(j+2) = 128+g; @@ -141,31 +141,31 @@ void KisPartLayerImpl::paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 } -KisPaintDeviceSP KisPartLayerImpl::prepareProjection(KisPaintDeviceSP projection, const QRect& r) +KisPaintDeviceSP KisPartLayerImpl::prepareProjection(KisPaintDeviceSP projection, const TQRect& r) { if (!m_doc || !m_doc->document() || m_activated) return 0; m_cache->clear(); - QRect intersection(r.intersect(exactBounds())); + TQRect intersection(r.intersect(exactBounds())); if (intersection.isEmpty()) return m_cache; // XXX: have a look at the comments and see if they still truthfully represent the code :/ // We know the embedded part's size through the ChildDoc // We move it to (0,0), since that is what we will start painting from in paintEverything. - QRect embedRect(intersection); + TQRect embedRect(intersection); embedRect.moveBy(- exactBounds().x(), - exactBounds().y()); - QRect paintRect(exactBounds()); + TQRect paintRect(exactBounds()); paintRect.moveBy(- exactBounds().x(), - exactBounds().y()); - QPixmap pm1(projection->convertToQImage(0 /*srgb XXX*/, + TQPixmap pm1(projection->convertToTQImage(0 /*srgb XXX*/, intersection.x(), intersection.y(), intersection.width(), intersection.height())); - QPixmap pm2(extent().width(), extent().height()); + TQPixmap pm2(extent().width(), extent().height()); copyBlt(&pm2, embedRect.x(), embedRect.y(), &pm1, 0, 0, embedRect.width(), embedRect.height()); - QPainter painter(&pm2); + TQPainter painter(&pm2); painter.setClipRect(embedRect); // KWord's KWPartFrameSet::drawFrameContents has some interesting remarks concerning @@ -177,32 +177,32 @@ KisPaintDeviceSP KisPartLayerImpl::prepareProjection(KisPaintDeviceSP projection copyBlt(&pm1, 0, 0, &pm2, embedRect.x(), embedRect.y(), embedRect.width(), embedRect.height()); - QImage qimg = pm1.convertToImage(); + TQImage qimg = pm1.convertToImage(); //assume the part is sRGB for now, and that "" is sRGB // And we need to paint offsetted - m_cache->convertFromQImage(qimg, "", intersection.left(), intersection.top()); + m_cache->convertFromTQImage(qimg, "", intersection.left(), intersection.top()); return m_cache; } -QImage KisPartLayerImpl::createThumbnail(Q_INT32 w, Q_INT32 h) { - QRect bounds(exactBounds()); - QPixmap pm(w, h); - QPainter painter(&pm); +TQImage KisPartLayerImpl::createThumbnail(TQ_INT32 w, TQ_INT32 h) { + TQRect bounds(exactBounds()); + TQPixmap pm(w, h); + TQPainter painter(&pm); - painter.fillRect(0, 0, w, h, Qt::white); + painter.fillRect(0, 0, w, h, TQt::white); painter.scale(w / bounds.width(), h / bounds.height()); m_doc->document()->paintEverything(painter, bounds); - QImage qimg = pm.convertToImage(); + TQImage qimg = pm.convertToImage(); return qimg; } -bool KisPartLayerImpl::saveToXML(QDomDocument doc, QDomElement elem) +bool KisPartLayerImpl::saveToXML(TQDomDocument doc, TQDomElement elem) { - QDomElement embeddedElement = doc.createElement("layer"); + TQDomElement embeddedElement = doc.createElement("layer"); embeddedElement.setAttribute("name", name()); // x and y are loaded from the rect element in the embedded object tag @@ -216,7 +216,7 @@ bool KisPartLayerImpl::saveToXML(QDomDocument doc, QDomElement elem) embeddedElement.setAttribute("layertype", "partlayer"); elem.appendChild(embeddedElement); - QDomElement objectElem = childDoc()->save(doc); + TQDomElement objectElem = childDoc()->save(doc); embeddedElement.appendChild(objectElem); return true; @@ -240,10 +240,10 @@ bool KisConnectPartLayerVisitor::visit(KisGroupLayer *layer) { bool KisConnectPartLayerVisitor::visit(KisPartLayer *layer) { if (m_connect) { - QObject::connect(m_view, SIGNAL(childActivated(KoDocumentChild*)), - layer, SLOT(childActivated(KoDocumentChild*))); + TQObject::connect(m_view, TQT_SIGNAL(childActivated(KoDocumentChild*)), + layer, TQT_SLOT(childActivated(KoDocumentChild*))); } else { - QObject::disconnect(m_view, SIGNAL(childActivated(KoDocumentChild*)), layer, 0 ); + TQObject::disconnect(m_view, TQT_SIGNAL(childActivated(KoDocumentChild*)), layer, 0 ); } return true; diff --git a/krita/ui/kis_part_layer.h b/krita/ui/kis_part_layer.h index efe57c28..8980daea 100644 --- a/krita/ui/kis_part_layer.h +++ b/krita/ui/kis_part_layer.h @@ -18,7 +18,7 @@ #ifndef _KIS_PART_LAYER_ #define _KIS_PART_LAYER_ -#include +#include #include #include @@ -41,12 +41,12 @@ class KisChildDoc : public KoDocumentChild { public: - KisChildDoc ( KisDoc * kisDoc, const QRect& rect, KoDocument * childDoc ); + KisChildDoc ( KisDoc * kisDoc, const TQRect& rect, KoDocument * childDoc ); KisChildDoc ( KisDoc * kisDdoc ); virtual ~KisChildDoc(); - KisDoc * parent() const { return m_doc; } + KisDoc * tqparent() const { return m_doc; } void setPartLayer (KisPartLayerSP layer) { m_partLayer = layer; } @@ -73,6 +73,7 @@ protected: */ class KisPartLayerImpl : public KisPartLayer { Q_OBJECT + TQ_OBJECT typedef KisPartLayer super; public: KisPartLayerImpl(KisImageSP img, KisChildDoc * doc); @@ -89,30 +90,30 @@ public: /// Returns the childDoc so that we can access the doc from other places, if need be (KisDoc) virtual KisChildDoc* childDoc() const { return m_doc; } - void setDocType(const QString& type) { m_docType = type; } - QString docType() const { return m_docType; } + void setDocType(const TQString& type) { m_docType = type; } + TQString docType() const { return m_docType; } - virtual void setX(Q_INT32 x); - virtual void setY(Q_INT32 y); - virtual Q_INT32 x() const { return m_doc->geometry() . x(); } - virtual Q_INT32 y() const { return m_doc->geometry() . y(); } //m_paintLayer->y(); } - virtual QRect extent() const { return m_doc->geometry(); } - virtual QRect exactBounds() const { return m_doc->geometry(); } + virtual void setX(TQ_INT32 x); + virtual void setY(TQ_INT32 y); + virtual TQ_INT32 x() const { return m_doc->tqgeometry() . x(); } + virtual TQ_INT32 y() const { return m_doc->tqgeometry() . y(); } //m_paintLayer->y(); } + virtual TQRect extent() const { return m_doc->tqgeometry(); } + virtual TQRect exactBounds() const { return m_doc->tqgeometry(); } - virtual QImage createThumbnail(Q_INT32 w, Q_INT32 h); + virtual TQImage createThumbnail(TQ_INT32 w, TQ_INT32 h); virtual bool accept(KisLayerVisitor& visitor) { return visitor.visit(this); } - virtual KisPaintDeviceSP prepareProjection(KisPaintDeviceSP projection, const QRect& r); + virtual KisPaintDeviceSP prepareProjection(KisPaintDeviceSP projection, const TQRect& r); - virtual void paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + virtual void paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); - virtual bool saveToXML(QDomDocument doc, QDomElement elem); + virtual bool saveToXML(TQDomDocument doc, TQDomElement elem); private slots: /// Repaints our device with the data from the embedded part - //void repaint(); + //void tqrepaint(); /// When we activate the embedding, we clear ourselves void childActivated(KoDocumentChild* child); void childDeactivated(bool activated); @@ -123,7 +124,7 @@ private: KisPaintDeviceSP m_cache; KoFrame * m_frame; // The widget that holds the editable view of the embedded part KisChildDoc * m_doc; // The sub-document - QString m_docType; + TQString m_docType; bool m_activated; }; diff --git a/krita/ui/kis_part_layer_handler.cc b/krita/ui/kis_part_layer_handler.cc index 787de872..f062e4a1 100644 --- a/krita/ui/kis_part_layer_handler.cc +++ b/krita/ui/kis_part_layer_handler.cc @@ -19,8 +19,8 @@ #include "kis_canvas.h" #include // kis_canvas.h does X11 stuff -#include -#include +#include +#include #include "kis_cursor.h" #include "kis_canvas_painter.h" @@ -31,8 +31,8 @@ #include "kis_part_layer_handler.h" KisPartLayerHandler::KisPartLayerHandler(KisView* view, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above) - : m_parent(parent), m_above(above), m_view(view), m_entry(entry) { + KisGroupLayerSP tqparent, KisLayerSP above) + : m_parent(tqparent), m_above(above), m_view(view), m_entry(entry) { m_started = false; view->getCanvasController()->setCanvasCursor( KisCursor::selectCursor() ); } @@ -51,20 +51,20 @@ void KisPartLayerHandler::gotMoveEvent(KisMoveEvent* event) { painter.setRasterOp( NotROP ); // erase old lines - QRect r(m_start, m_end); + TQRect r(m_start, m_end); r = r.normalize(); if (!r.isEmpty()) painter.drawRect(r); - m_end = event->pos().roundQPoint(); - r = QRect(m_start, m_end).normalize(); + m_end = event->pos().roundTQPoint(); + r = TQRect(m_start, m_end).normalize(); painter.drawRect(r); painter.end(); } void KisPartLayerHandler::gotButtonPressEvent(KisButtonPressEvent* event) { - m_start = event->pos().roundQPoint(); + m_start = event->pos().roundTQPoint(); m_end = m_start; m_started = true; } @@ -75,15 +75,15 @@ void KisPartLayerHandler::gotButtonReleaseEvent(KisButtonReleaseEvent* event) { return; } - m_end = event->pos().roundQPoint(); + m_end = event->pos().roundTQPoint(); - QRect r(m_start, m_end); + TQRect r(m_start, m_end); m_view->insertPart(r.normalize(), m_entry, m_parent, m_above); // We will get deleted by the view through the above } -void KisPartLayerHandler::gotKeyPressEvent(QKeyEvent* event) { +void KisPartLayerHandler::gotKeyPressEvent(TQKeyEvent* event) { if (event->key() == Key_Escape) { done(); } else { diff --git a/krita/ui/kis_part_layer_handler.h b/krita/ui/kis_part_layer_handler.h index 7b6d3f0b..746b23d9 100644 --- a/krita/ui/kis_part_layer_handler.h +++ b/krita/ui/kis_part_layer_handler.h @@ -18,23 +18,24 @@ #ifndef KIS_PART_LAYER_HANDLER_ #define KIS_PART_LAYER_HANDLER_ -#include +#include #include // KoDocumentEntry #include "kis_types.h" #include "kis_doc.h" #include "kis_view.h" -class QKeyEvent; +class TQKeyEvent; -class KisPartLayerHandler : public QObject { +class KisPartLayerHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: KisPartLayerHandler(KisView* view, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above); + KisGroupLayerSP tqparent, KisLayerSP above); signals: void sigGotMoveEvent(KisMoveEvent* event); - void sigGotKeyPressEvent(QKeyEvent* event); + void sigGotKeyPressEvent(TQKeyEvent* event); void handlerDone(); protected slots: @@ -42,15 +43,15 @@ protected slots: void gotMoveEvent(KisMoveEvent* event); void gotButtonPressEvent(KisButtonPressEvent* event); void gotButtonReleaseEvent(KisButtonReleaseEvent* event); - void gotKeyPressEvent(QKeyEvent* event); + void gotKeyPressEvent(TQKeyEvent* event); protected: void done(); KisGroupLayerSP m_parent; KisLayerSP m_above; KisView* m_view; KoDocumentEntry m_entry; - QPoint m_start; - QPoint m_end; + TQPoint m_start; + TQPoint m_end; bool m_started; }; diff --git a/krita/ui/kis_pattern_chooser.cc b/krita/ui/kis_pattern_chooser.cc index 8a9d08b0..f19200bf 100644 --- a/krita/ui/kis_pattern_chooser.cc +++ b/krita/ui/kis_pattern_chooser.cc @@ -15,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -26,11 +26,11 @@ #include "kis_icon_item.h" #include "kis_pattern.h" -KisPatternChooser::KisPatternChooser(QWidget *parent, const char *name) : super(parent, name) +KisPatternChooser::KisPatternChooser(TQWidget *tqparent, const char *name) : super(tqparent, name) { - m_lbName = new QLabel(this); + m_lbName = new TQLabel(this); - QVBoxLayout *mainLayout = new QVBoxLayout(this, 2, -1, "main layout"); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 2, -1, "main tqlayout"); mainLayout->addWidget(m_lbName); mainLayout->addWidget(chooserWidget(), 10); @@ -47,7 +47,7 @@ void KisPatternChooser::update(KoIconItem *item) if (item) { KisPattern *pattern = static_cast(kisItem->resource()); - QString text = QString("%1 (%2 x %3)").arg(pattern->name()).arg(pattern->width()).arg(pattern->height()); + TQString text = TQString("%1 (%2 x %3)").tqarg(pattern->name()).tqarg(pattern->width()).tqarg(pattern->height()); m_lbName->setText(text); } diff --git a/krita/ui/kis_pattern_chooser.h b/krita/ui/kis_pattern_chooser.h index 76514f71..b7a61080 100644 --- a/krita/ui/kis_pattern_chooser.h +++ b/krita/ui/kis_pattern_chooser.h @@ -20,21 +20,22 @@ #include "kis_itemchooser.h" -class QLabel; +class TQLabel; class KisPatternChooser : public KisItemChooser { typedef KisItemChooser super; Q_OBJECT + TQ_OBJECT public: - KisPatternChooser(QWidget *parent = 0, const char *name = 0); + KisPatternChooser(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisPatternChooser(); protected: virtual void update(KoIconItem *item); private: - QLabel *m_lbName; + TQLabel *m_lbName; }; #endif // KIS_PATTERN_CHOOSER_H_ diff --git a/krita/ui/kis_perspective_grid_manager.cpp b/krita/ui/kis_perspective_grid_manager.cpp index 13c5cb13..8935eb7f 100644 --- a/krita/ui/kis_perspective_grid_manager.cpp +++ b/krita/ui/kis_perspective_grid_manager.cpp @@ -29,10 +29,10 @@ #include "kis_perspective_grid.h" #include "kis_view.h" -KisPerspectiveGridManager::KisPerspectiveGridManager(KisView * parent) - : QObject() +KisPerspectiveGridManager::KisPerspectiveGridManager(KisView * tqparent) + : TQObject() , m_toggleEdition(false) - , m_view(parent) + , m_view(tqparent) { } @@ -57,10 +57,10 @@ void KisPerspectiveGridManager::updateGUI() void KisPerspectiveGridManager::setup(KActionCollection * collection) { kdDebug() << "KisPerspectiveGridManager::setup(KActionCollection * collection)" << endl; - m_toggleGrid = new KToggleAction(i18n("Show Perspective Grid"), "", this, SLOT(toggleGrid()), collection, "view_toggle_perspective_grid"); + m_toggleGrid = new KToggleAction(i18n("Show Perspective Grid"), "", this, TQT_SLOT(toggleGrid()), collection, "view_toggle_perspective_grid"); m_toggleGrid->setCheckedState(KGuiItem(i18n("Hide Perspective Grid"))); m_toggleGrid->setChecked(false); - m_gridClear = new KAction(i18n("Clear Perspective Grid"), 0, "", this, SLOT(clearPerspectiveGrid()), collection, "view_clear_perspective_grid"); + m_gridClear = new KAction(i18n("Clear Perspective Grid"), 0, "", this, TQT_SLOT(clearPerspectiveGrid()), collection, "view_clear_perspective_grid"); } void KisPerspectiveGridManager::setGridVisible(bool t) @@ -125,7 +125,7 @@ void KisPerspectiveGridManager::stopEdition() m_view->updateCanvas(); } -void KisPerspectiveGridManager::drawGrid(QRect wr, QPainter *p, bool openGL ) +void KisPerspectiveGridManager::drawGrid(TQRect wr, TQPainter *p, bool openGL ) { KisImageSP image = m_view->canvasSubject()->currentImg(); @@ -141,13 +141,13 @@ void KisPerspectiveGridManager::drawGrid(QRect wr, QPainter *p, bool openGL ) Q_ASSERT(p); if (p) { - gridDrawer = new QPainterGridDrawer(p); + gridDrawer = new TQPainterGridDrawer(p); } } Q_ASSERT(gridDrawer != 0); - for( QValueList::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) + for( TQValueList::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) { gridDrawer->drawPerspectiveGrid(image, wr, *it ); } diff --git a/krita/ui/kis_perspective_grid_manager.h b/krita/ui/kis_perspective_grid_manager.h index a23abef3..55c7d836 100644 --- a/krita/ui/kis_perspective_grid_manager.h +++ b/krita/ui/kis_perspective_grid_manager.h @@ -21,21 +21,22 @@ #ifndef KIS_PERSPECTIVE_GRID_MANAGER_H #define KIS_PERSPECTIVE_GRID_MANAGER_H -#include +#include class KAction; class KActionCollection; class KToggleAction; class KisView; -class KisPerspectiveGridManager : public QObject +class KisPerspectiveGridManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisPerspectiveGridManager(KisView * parent); + KisPerspectiveGridManager(KisView * tqparent); ~KisPerspectiveGridManager(); void setup(KActionCollection * collection); - void drawGrid(QRect wr, QPainter *p, bool openGL = false); + void drawGrid(TQRect wr, TQPainter *p, bool openGL = false); void startEdition(); void stopEdition(); void setGridVisible(bool t); diff --git a/krita/ui/kis_populate_visitor.h b/krita/ui/kis_populate_visitor.h index ee43e825..d228137a 100644 --- a/krita/ui/kis_populate_visitor.h +++ b/krita/ui/kis_populate_visitor.h @@ -41,9 +41,9 @@ class KisPopulateVisitor: public KisLayerVisitor , m_parent(0) { } - KisPopulateVisitor(KisLayerItem* parent) - : m_widget(parent->listView()) - , m_parent(parent) + KisPopulateVisitor(KisLayerItem* tqparent) + : m_widget(tqparent->listView()) + , m_parent(tqparent) { } virtual bool visit(KisPaintLayer* layer) diff --git a/krita/ui/kis_previewdialog.cc b/krita/ui/kis_previewdialog.cc index 6b746776..53005142 100644 --- a/krita/ui/kis_previewdialog.cc +++ b/krita/ui/kis_previewdialog.cc @@ -17,25 +17,25 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include "kis_previewwidget.h" #include "kis_previewdialog.h" -KisPreviewDialog::KisPreviewDialog( QWidget * parent, const char * name, bool modal, const QString &caption) - : super (parent, name, modal, caption, Ok | Cancel, Ok) +KisPreviewDialog::KisPreviewDialog( TQWidget * tqparent, const char * name, bool modal, const TQString &caption) + : super (tqparent, name, modal, caption, Ok | Cancel, Ok) { - QHBox* layout = new QHBox(this); - layout->setSpacing( 6 ); + TQHBox* tqlayout = new TQHBox(this); + tqlayout->setSpacing( 6 ); - m_containerFrame = new QFrame( layout, "container" ); + m_containerFrame = new TQFrame( tqlayout, "container" ); - m_preview = new KisPreviewWidget( layout, "previewWidget" ); + m_preview = new KisPreviewWidget( tqlayout, "previewWidget" ); - setMainWidget(layout); + setMainWidget(tqlayout); } KisPreviewDialog::~KisPreviewDialog() diff --git a/krita/ui/kis_previewdialog.h b/krita/ui/kis_previewdialog.h index ef46b066..7cbaa1cd 100644 --- a/krita/ui/kis_previewdialog.h +++ b/krita/ui/kis_previewdialog.h @@ -24,21 +24,22 @@ #include class KisPreviewWidget; -class QFrame; +class TQFrame; class KisPreviewDialog: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - KisPreviewDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, const QString &caption=QString::null); + KisPreviewDialog( TQWidget* tqparent = 0, const char* name = 0, bool modal = false, const TQString &caption=TQString()); ~KisPreviewDialog(); KisPreviewWidget* previewWidget() { return m_preview; } - QFrame* container() { return m_containerFrame; } + TQFrame* container() { return m_containerFrame; } private: KisPreviewWidget* m_preview; - QFrame* m_containerFrame; + TQFrame* m_containerFrame; }; #endif diff --git a/krita/ui/kis_previewwidget.cc b/krita/ui/kis_previewwidget.cc index 363302f7..a8e2a78e 100644 --- a/krita/ui/kis_previewwidget.cc +++ b/krita/ui/kis_previewwidget.cc @@ -21,18 +21,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#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 @@ -65,8 +65,8 @@ static const int ZOOM_PAUSE = 100; static const int FILTER_PAUSE = 500; static const double ZOOM_FACTOR = 1.1; -KisPreviewWidget::KisPreviewWidget( QWidget* parent, const char* name ) - : PreviewWidgetBase( parent, name ) +KisPreviewWidget::KisPreviewWidget( TQWidget* tqparent, const char* name ) + : PreviewWidgetBase( tqparent, name ) , m_autoupdate(true) , m_previewIsDisplayed(true) , m_scaledOriginal() @@ -80,42 +80,42 @@ KisPreviewWidget::KisPreviewWidget( QWidget* parent, const char* name ) , m_zoom(-1.0) , m_profile(NULL) , m_progress( 0 ) - , m_zoomTimer(new QTimer(this)) - , m_filterTimer(new QTimer(this)) + , m_zoomTimer(new TQTimer(this)) + , m_filterTimer(new TQTimer(this)) , m_firstFilter(true) , m_firstZoom(true) { btnZoomIn->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag+", KIcon::MainToolbar, 16 )); - connect(btnZoomIn, SIGNAL(clicked()), this, SLOT(zoomIn())); + connect(btnZoomIn, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomIn())); btnZoomOut->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag-", KIcon::MainToolbar, 16 )); - connect(btnZoomOut, SIGNAL(clicked()), this, SLOT(zoomOut())); + connect(btnZoomOut, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOut())); btnUpdate->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "reload", KIcon::MainToolbar, 16 )); - connect(btnUpdate, SIGNAL(clicked()), this, SLOT(forceUpdate())); + connect(btnUpdate, TQT_SIGNAL(clicked()), this, TQT_SLOT(forceUpdate())); - connect(radioBtnPreview, SIGNAL(toggled(bool)), this, SLOT(setPreviewDisplayed(bool))); + connect(radioBtnPreview, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setPreviewDisplayed(bool))); - connect(checkBoxAutoUpdate, SIGNAL(toggled(bool)), this, SLOT(slotSetAutoUpdate(bool))); + connect(checkBoxAutoUpdate, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetAutoUpdate(bool))); btnZoomOneToOne->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag1", KIcon::MainToolbar, 16 )); - connect(btnZoomOneToOne, SIGNAL(clicked()), this, SLOT(zoomOneToOne())); + connect(btnZoomOneToOne, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOneToOne())); m_progress = new KisLabelProgress(frmProgress); m_progress->setMaximumHeight(fontMetrics().height() ); - QVBoxLayout *vbox = new QVBoxLayout( frmProgress ); + TQVBoxLayout *vbox = new TQVBoxLayout( frmProgress ); vbox->addWidget(m_progress); m_progress->hide(); - connect(m_zoomTimer, SIGNAL(timeout()), this, SLOT(updateZoom())); - connect(m_filterTimer, SIGNAL(timeout()), this, SLOT(runFilterHelper())); + connect(m_zoomTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateZoom())); + connect(m_filterTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(runFilterHelper())); /* kToolBar1->insertLineSeparator(); kToolBar1->insertButton("reload",2, true, i18n("Update")); - connect(kToolBar1->getButton(2),SIGNAL(clicked()),this,SLOT(forceUpdate())); + connect(kToolBar1->getButton(2),TQT_SIGNAL(clicked()),this,TQT_SLOT(forceUpdate())); kToolBar1->insertButton("",3, true, i18n("Auto Update")); - connect(kToolBar1->getButton(3),SIGNAL(clicked()),this,SLOT(toggleAutoUpdate())); + connect(kToolBar1->getButton(3),TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleAutoUpdate())); kToolBar1->insertButton("",4, true, i18n("Switch")); - connect(kToolBar1->getButton(4),SIGNAL(clicked()),this,SLOT(toggleImageDisplayed()));*/ + connect(kToolBar1->getButton(4),TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleImageDisplayed()));*/ // these currently don't yet work, reenable when they do work :) (TZ-12-2005) // TODO reenable these // kToolBar1->insertButton("",5, true, i18n("Popup Original and Preview")); @@ -143,10 +143,10 @@ void KisPreviewWidget::slotSetDevice(KisPaintDeviceSP dev) m_filterZoom = 1.0; KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); m_profile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); - QRect r = dev->exactBounds(); + TQRect r = dev->exactBounds(); m_groupBox->setTitle(i18n("Preview: ") + dev->name()); m_previewIsDisplayed = true; @@ -157,44 +157,44 @@ void KisPreviewWidget::slotSetDevice(KisPaintDeviceSP dev) void KisPreviewWidget::updateZoom() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); if(m_previewIsDisplayed) { if(m_dirtyPreview) { - QSize r = m_previewDevice->extent().size(); + TQSize r = m_previewDevice->extent().size(); int w = r.width(), h = r.height(); int sw = int(ceil(m_zoom * w / m_filterZoom)); int sh = int(ceil(m_zoom * h / m_filterZoom)); m_dirtyPreview = false; - m_scaledPreview = m_previewDevice->convertToQImage(m_profile, 0, 0, w, h); - m_scaledPreview = m_scaledPreview.scale(sw,sh, QImage::ScaleMax); // Use scale instead of smoothScale for speed up + m_scaledPreview = m_previewDevice->convertToTQImage(m_profile, 0, 0, w, h); + m_scaledPreview = m_scaledPreview.scale(sw,sh, TQ_ScaleMax); // Use scale instead of smoothScale for speed up } m_preview->setImage(m_scaledPreview); } else { if(m_dirtyOriginal) { - QSize r = m_origDevice->extent().size(); + TQSize r = m_origDevice->extent().size(); int w = r.width(), h = r.height(); int sw = int(ceil(m_zoom * w)); int sh = int(ceil(m_zoom * h)); m_dirtyOriginal = false; - m_scaledOriginal = m_origDevice->convertToQImage(m_profile, 0, 0, w, h); - m_scaledOriginal = m_scaledOriginal.scale(sw,sh, QImage::ScaleMax); // Use scale instead of smoothScale for speed up + m_scaledOriginal = m_origDevice->convertToTQImage(m_profile, 0, 0, w, h); + m_scaledOriginal = m_scaledOriginal.scale(sw,sh, TQ_ScaleMax); // Use scale instead of smoothScale for speed up } m_preview->setImage(m_scaledOriginal); } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void KisPreviewWidget::slotSetAutoUpdate(bool set) { m_autoupdate = set; } -void KisPreviewWidget::wheelEvent(QWheelEvent * e) +void KisPreviewWidget::wheelEvent(TQWheelEvent * e) { if (e->delta() > 0) { zoomIn(); @@ -264,7 +264,7 @@ void KisPreviewWidget::zoomOneToOne() { } static inline void cropDevice(KisPaintDevice * device, const double & zoom) { - QRect r = device->exactBounds(); + TQRect r = device->exactBounds(); r.setX(int(zoom * r.x()) ); r.setY(int(zoom * r.y()) ); r.setWidth(int(zoom * r.width()) ); @@ -333,9 +333,9 @@ void KisPreviewWidget::runFilterHelper() { if (m_origDevice->image()) { m_scaledImage = new KisImage(*m_origDevice->image()); - if(!m_origDevice->parentLayer()) return; - QString layerName = m_origDevice->parentLayer()->name(); - KisPaintLayerSP pl = ::qt_cast(m_scaledImage->findLayer(layerName)); + if(!m_origDevice->tqparentLayer()) return; + TQString layerName = m_origDevice->tqparentLayer()->name(); + KisPaintLayerSP pl = ::tqqt_cast(m_scaledImage->findLayer(layerName)); if(!pl) return; scaledDevice = pl->paintDevice(); @@ -356,7 +356,7 @@ void KisPreviewWidget::runFilterHelper() { 0.0, 0.0, 0.0, 0, 0, NULL, &strategy); tw.run(); scaledDevice->setSelection(select); - select->setParentLayer(scaledDevice->parentLayer()); + select->setParentLayer(scaledDevice->tqparentLayer()); } // Crop by the zoom value instead of cropping by rectangle. It gives better results diff --git a/krita/ui/kis_previewwidget.h b/krita/ui/kis_previewwidget.h index f3b38e98..e507ea60 100644 --- a/krita/ui/kis_previewwidget.h +++ b/krita/ui/kis_previewwidget.h @@ -23,18 +23,18 @@ #ifndef __kis_previewwidget_h__ #define __kis_previewwidget_h__ -#include -#include +#include +#include #include "kis_types.h" #include "kis_previewwidgetbase.h" -class QWidget; +class TQWidget; class KisProfile; class KisFilter; class KisFilterConfiguration; -class QTimer; +class TQTimer; class KisLabelProgress; /** @@ -48,16 +48,17 @@ class KisLabelProgress; class KisPreviewWidget : public PreviewWidgetBase { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ - KisPreviewWidget( QWidget* parent = 0, const char* name = 0 ); + KisPreviewWidget( TQWidget* tqparent = 0, const char* name = 0 ); virtual ~KisPreviewWidget(); /** returns if the preview is automatically updated */ bool getAutoUpdate() const; - void wheelEvent(QWheelEvent * e); + void wheelEvent(TQWheelEvent * e); /** Instructs the KisPreviewWidget to eventually update the preview. * KisPreviewWidget delays the actual running of the filter for 500ms @@ -114,23 +115,23 @@ private: bool m_autoupdate; /// Flag indicating that the widget should auto update whenever a setting is changed bool m_previewIsDisplayed; /// Flag indicating whether the filtered or original image is displayed - QImage m_scaledOriginal; /// QImage copy of the original image + TQImage m_scaledOriginal; /// TQImage copy of the original image bool m_dirtyOriginal; /// flag indicating that the original image is dirty KisPaintDeviceSP m_origDevice; /// Pointer to the original image - QImage m_scaledPreview; /// QImage copy of the filtered image + TQImage m_scaledPreview; /// TQImage copy of the filtered image bool m_dirtyPreview; /// flag indicating that the preview image is dirty KisPaintDeviceSP m_previewDevice; /// Pointer to the preview image KisImageSP m_scaledImage; /// Scaled image copied from the original double m_filterZoom; /// Zoom amount when the filtering occurred double m_zoom; /// Current zoom amount - KisProfile * m_profile; /// the color profile to use when converting to QImage + KisProfile * m_profile; /// the color profile to use when converting to TQImage KisLabelProgress *m_progress; /// Progress bar of the preview. - QTimer * m_zoomTimer; /// Timer used to update the view whenever the zoom changes - QTimer * m_filterTimer; /// Timer used to update the view whenever the filter changes + TQTimer * m_zoomTimer; /// Timer used to update the view whenever the zoom changes + TQTimer * m_filterTimer; /// Timer used to update the view whenever the filter changes KisFilter * m_filter; /// Filter used KisFilterConfiguration * m_config; /// Configuration used bool m_firstFilter; /// Flag to determine if we should delay the first filter or not diff --git a/krita/ui/kis_previewwidgetbase.ui b/krita/ui/kis_previewwidgetbase.ui index f50fba6a..6ee64019 100644 --- a/krita/ui/kis_previewwidgetbase.ui +++ b/krita/ui/kis_previewwidgetbase.ui @@ -1,6 +1,6 @@ PreviewWidgetBase - + PreviewWidgetBase @@ -20,7 +20,7 @@ 0 - + 0 0 @@ -33,7 +33,7 @@ 0 - + m_groupBox @@ -56,13 +56,13 @@ 0 - + 200 150 - + 1000 1000 @@ -71,15 +71,15 @@ - + - layout4 + tqlayout4 unnamed - + buttonGroup1 @@ -93,7 +93,7 @@ unnamed - + radioBtnPreview @@ -107,7 +107,7 @@ Preview modified layer - + radioBtnOriginal @@ -120,17 +120,17 @@ - + - layout5 + tqlayout5 unnamed - + - layout4 + tqlayout4 @@ -194,7 +194,7 @@ - + checkBoxAutoUpdate @@ -210,7 +210,7 @@ - + frmProgress @@ -260,7 +260,7 @@ 789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f - + imageviewer.h kpushbutton.h diff --git a/krita/ui/kis_qpaintdevice_canvas.cc b/krita/ui/kis_qpaintdevice_canvas.cc index 675b7138..da1132e6 100644 --- a/krita/ui/kis_qpaintdevice_canvas.cc +++ b/krita/ui/kis_qpaintdevice_canvas.cc @@ -23,96 +23,96 @@ #include "kis_qpaintdevice_canvas_painter.h" #include -KisQPaintDeviceCanvasWidget::KisQPaintDeviceCanvasWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KisTQPaintDeviceCanvasWidget::KisTQPaintDeviceCanvasWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { } -KisQPaintDeviceCanvasWidget::~KisQPaintDeviceCanvasWidget() +KisTQPaintDeviceCanvasWidget::~KisTQPaintDeviceCanvasWidget() { } -void KisQPaintDeviceCanvasWidget::paintEvent(QPaintEvent *e) +void KisTQPaintDeviceCanvasWidget::paintEvent(TQPaintEvent *e) { widgetGotPaintEvent(e); } -void KisQPaintDeviceCanvasWidget::mousePressEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mousePressEvent(TQMouseEvent *e) { widgetGotMousePressEvent(e); } -void KisQPaintDeviceCanvasWidget::mouseReleaseEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mouseReleaseEvent(TQMouseEvent *e) { widgetGotMouseReleaseEvent(e); } -void KisQPaintDeviceCanvasWidget::mouseDoubleClickEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mouseDoubleClickEvent(TQMouseEvent *e) { widgetGotMouseDoubleClickEvent(e); } -void KisQPaintDeviceCanvasWidget::mouseMoveEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mouseMoveEvent(TQMouseEvent *e) { widgetGotMouseMoveEvent(e); } -void KisQPaintDeviceCanvasWidget::tabletEvent(QTabletEvent *e) +void KisTQPaintDeviceCanvasWidget::tabletEvent(TQTabletEvent *e) { widgetGotTabletEvent(e); } -void KisQPaintDeviceCanvasWidget::enterEvent(QEvent *e) +void KisTQPaintDeviceCanvasWidget::enterEvent(TQEvent *e) { widgetGotEnterEvent(e); } -void KisQPaintDeviceCanvasWidget::leaveEvent(QEvent *e) +void KisTQPaintDeviceCanvasWidget::leaveEvent(TQEvent *e) { widgetGotLeaveEvent(e); } -void KisQPaintDeviceCanvasWidget::wheelEvent(QWheelEvent *e) +void KisTQPaintDeviceCanvasWidget::wheelEvent(TQWheelEvent *e) { widgetGotWheelEvent(e); } -void KisQPaintDeviceCanvasWidget::keyPressEvent(QKeyEvent *e) +void KisTQPaintDeviceCanvasWidget::keyPressEvent(TQKeyEvent *e) { widgetGotKeyPressEvent(e); } -void KisQPaintDeviceCanvasWidget::keyReleaseEvent(QKeyEvent *e) +void KisTQPaintDeviceCanvasWidget::keyReleaseEvent(TQKeyEvent *e) { widgetGotKeyReleaseEvent(e); } -void KisQPaintDeviceCanvasWidget::dragEnterEvent(QDragEnterEvent *e) +void KisTQPaintDeviceCanvasWidget::dragEnterEvent(TQDragEnterEvent *e) { widgetGotDragEnterEvent(e); } -void KisQPaintDeviceCanvasWidget::dropEvent(QDropEvent *e) +void KisTQPaintDeviceCanvasWidget::dropEvent(TQDropEvent *e) { widgetGotDropEvent(e); } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 -bool KisQPaintDeviceCanvasWidget::x11Event(XEvent *event) +bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event) { - return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(QPoint(0, 0))); + return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0))); } -#endif // Q_WS_X11 +#endif // TQ_WS_X11 -KisCanvasWidgetPainter *KisQPaintDeviceCanvasWidget::createPainter() +KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter() { - return new KisQPaintDeviceCanvasPainter(this); + return new KisTQPaintDeviceCanvasPainter(this); } #if defined(EXTENDED_X11_TABLET_SUPPORT) -void KisQPaintDeviceCanvasWidget::selectTabletDeviceEvents() +void KisTQPaintDeviceCanvasWidget::selectTabletDeviceEvents() { KisCanvasWidget::selectTabletDeviceEvents(this); } diff --git a/krita/ui/kis_qpaintdevice_canvas.h b/krita/ui/kis_qpaintdevice_canvas.h index 1046337a..a74e2650 100644 --- a/krita/ui/kis_qpaintdevice_canvas.h +++ b/krita/ui/kis_qpaintdevice_canvas.h @@ -17,26 +17,26 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_QPAINTDEVICE_CANVAS_H_ -#define KIS_QPAINTDEVICE_CANVAS_H_ +#ifndef KIS_TQPAINTDEVICE_CANVAS_H_ +#define KIS_TQPAINTDEVICE_CANVAS_H_ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "kis_global.h" #include "kis_canvas.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include -#endif // Q_WS_X11 +#endif // TQ_WS_X11 -class KisQPaintDeviceCanvasWidget : public virtual QWidget, public virtual KisCanvasWidget { +class KisTQPaintDeviceCanvasWidget : public virtual TQWidget, public virtual KisCanvasWidget { public: - KisQPaintDeviceCanvasWidget(QWidget *parent = 0, const char *name = 0); - ~KisQPaintDeviceCanvasWidget(); + KisTQPaintDeviceCanvasWidget(TQWidget *tqparent = 0, const char *name = 0); + ~KisTQPaintDeviceCanvasWidget(); virtual KisCanvasWidgetPainter *createPainter(); @@ -45,23 +45,23 @@ public: #endif protected: - virtual void paintEvent(QPaintEvent *event); - virtual void mousePressEvent(QMouseEvent *event); - virtual void mouseReleaseEvent(QMouseEvent *event); - virtual void mouseDoubleClickEvent(QMouseEvent *event); - virtual void mouseMoveEvent(QMouseEvent *event); - virtual void tabletEvent(QTabletEvent *event); - virtual void enterEvent(QEvent *event ); - virtual void leaveEvent(QEvent *event); - virtual void wheelEvent(QWheelEvent *event); - virtual void keyPressEvent(QKeyEvent *event); - virtual void keyReleaseEvent(QKeyEvent *event); - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); -#ifdef Q_WS_X11 + virtual void paintEvent(TQPaintEvent *event); + virtual void mousePressEvent(TQMouseEvent *event); + virtual void mouseReleaseEvent(TQMouseEvent *event); + virtual void mouseDoubleClickEvent(TQMouseEvent *event); + virtual void mouseMoveEvent(TQMouseEvent *event); + virtual void tabletEvent(TQTabletEvent *event); + virtual void enterEvent(TQEvent *event ); + virtual void leaveEvent(TQEvent *event); + virtual void wheelEvent(TQWheelEvent *event); + virtual void keyPressEvent(TQKeyEvent *event); + virtual void keyReleaseEvent(TQKeyEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); +#ifdef TQ_WS_X11 bool x11Event(XEvent *event); -#endif // Q_WS_X11 +#endif // TQ_WS_X11 }; -#endif // KIS_QPAINTDEVICE_CANVAS_H_ +#endif // KIS_TQPAINTDEVICE_CANVAS_H_ diff --git a/krita/ui/kis_qpaintdevice_canvas_painter.cc b/krita/ui/kis_qpaintdevice_canvas_painter.cc index eb68117d..e8a8e696 100644 --- a/krita/ui/kis_qpaintdevice_canvas_painter.cc +++ b/krita/ui/kis_qpaintdevice_canvas_painter.cc @@ -20,22 +20,22 @@ #include "kis_canvas_painter.h" #include "kis_qpaintdevice_canvas_painter.h" -KisQPaintDeviceCanvasPainter::KisQPaintDeviceCanvasPainter() +KisTQPaintDeviceCanvasPainter::KisTQPaintDeviceCanvasPainter() { } -KisQPaintDeviceCanvasPainter::KisQPaintDeviceCanvasPainter(const QPaintDevice *paintDevice) +KisTQPaintDeviceCanvasPainter::KisTQPaintDeviceCanvasPainter(const TQPaintDevice *paintDevice) : m_painter(paintDevice) { } -KisQPaintDeviceCanvasPainter::~KisQPaintDeviceCanvasPainter() +KisTQPaintDeviceCanvasPainter::~KisTQPaintDeviceCanvasPainter() { } -bool KisQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool unclipped) +bool KisTQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool unclipped) { - QWidget *widget = dynamic_cast(canvasWidget); + TQWidget *widget = dynamic_cast(canvasWidget); if (widget != 0) { return m_painter.begin(widget, unclipped); @@ -44,602 +44,602 @@ bool KisQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool unc } } -bool KisQPaintDeviceCanvasPainter::begin(const QPaintDevice* paintDevice, bool unclipped) +bool KisTQPaintDeviceCanvasPainter::begin(const TQPaintDevice* paintDevice, bool unclipped) { return m_painter.begin(paintDevice, unclipped); } -bool KisQPaintDeviceCanvasPainter::end() +bool KisTQPaintDeviceCanvasPainter::end() { return m_painter.end(); } -void KisQPaintDeviceCanvasPainter::save() +void KisTQPaintDeviceCanvasPainter::save() { m_painter.save(); } -void KisQPaintDeviceCanvasPainter::restore() +void KisTQPaintDeviceCanvasPainter::restore() { m_painter.restore(); } -QFontMetrics KisQPaintDeviceCanvasPainter::fontMetrics() const +TQFontMetrics KisTQPaintDeviceCanvasPainter::fontMetrics() const { return m_painter.fontMetrics(); } -QFontInfo KisQPaintDeviceCanvasPainter::fontInfo() const +TQFontInfo KisTQPaintDeviceCanvasPainter::fontInfo() const { return m_painter.fontInfo(); } -const QFont& KisQPaintDeviceCanvasPainter::font() const +const TQFont& KisTQPaintDeviceCanvasPainter::font() const { return m_painter.font(); } -void KisQPaintDeviceCanvasPainter::setFont(const QFont& font) +void KisTQPaintDeviceCanvasPainter::setFont(const TQFont& font) { m_painter.setFont(font); } -const QPen& KisQPaintDeviceCanvasPainter::pen() const +const TQPen& KisTQPaintDeviceCanvasPainter::pen() const { return m_painter.pen(); } -void KisQPaintDeviceCanvasPainter::setPen(const QPen& pen) +void KisTQPaintDeviceCanvasPainter::setPen(const TQPen& pen) { m_painter.setPen(pen); } -void KisQPaintDeviceCanvasPainter::setPen(Qt::PenStyle penStyle) +void KisTQPaintDeviceCanvasPainter::setPen(Qt::PenStyle penStyle) { m_painter.setPen(penStyle); } -void KisQPaintDeviceCanvasPainter::setPen(const QColor& color) +void KisTQPaintDeviceCanvasPainter::setPen(const TQColor& color) { m_painter.setPen(color);; } -const QBrush& KisQPaintDeviceCanvasPainter::brush() const +const TQBrush& KisTQPaintDeviceCanvasPainter::brush() const { return m_painter.brush(); } -void KisQPaintDeviceCanvasPainter::setBrush(const QBrush& brush) +void KisTQPaintDeviceCanvasPainter::setBrush(const TQBrush& brush) { m_painter.setBrush(brush); } -void KisQPaintDeviceCanvasPainter::setBrush(Qt::BrushStyle brushStyle) +void KisTQPaintDeviceCanvasPainter::setBrush(TQt::BrushStyle brushStyle) { m_painter.setBrush(brushStyle); } -void KisQPaintDeviceCanvasPainter::setBrush(const QColor& color) +void KisTQPaintDeviceCanvasPainter::setBrush(const TQColor& color) { m_painter.setBrush(color); } -QPoint KisQPaintDeviceCanvasPainter::pos() const +TQPoint KisTQPaintDeviceCanvasPainter::pos() const { return m_painter.pos(); } -const QColor& KisQPaintDeviceCanvasPainter::backgroundColor() const +const TQColor& KisTQPaintDeviceCanvasPainter::backgroundColor() const { return m_painter.backgroundColor(); } -void KisQPaintDeviceCanvasPainter::setBackgroundColor(const QColor& color) +void KisTQPaintDeviceCanvasPainter::setBackgroundColor(const TQColor& color) { m_painter.setBackgroundColor(color); } -Qt::Qt::BGMode KisQPaintDeviceCanvasPainter::backgroundMode() const +TQt::Qt::BGMode KisTQPaintDeviceCanvasPainter::backgroundMode() const { return m_painter.backgroundMode(); } -void KisQPaintDeviceCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) +void KisTQPaintDeviceCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) { m_painter.setBackgroundMode(bgMode); } -Qt::RasterOp KisQPaintDeviceCanvasPainter::rasterOp() const +TQt::RasterOp KisTQPaintDeviceCanvasPainter::rasterOp() const { return m_painter.rasterOp(); } -void KisQPaintDeviceCanvasPainter::setRasterOp(Qt::RasterOp rasterOp) +void KisTQPaintDeviceCanvasPainter::setRasterOp(TQt::RasterOp rasterOp) { m_painter.setRasterOp(rasterOp); } -const QPoint& KisQPaintDeviceCanvasPainter::brushOrigin() const +const TQPoint& KisTQPaintDeviceCanvasPainter::brushOrigin() const { return m_painter.brushOrigin(); } -void KisQPaintDeviceCanvasPainter::setBrushOrigin(int x, int y) +void KisTQPaintDeviceCanvasPainter::setBrushOrigin(int x, int y) { m_painter.setBrushOrigin(x, y); } -void KisQPaintDeviceCanvasPainter::setBrushOrigin(const QPoint& origin) +void KisTQPaintDeviceCanvasPainter::setBrushOrigin(const TQPoint& origin) { m_painter.setBrushOrigin(origin); } -bool KisQPaintDeviceCanvasPainter::hasViewXForm() const +bool KisTQPaintDeviceCanvasPainter::hasViewXForm() const { return m_painter.hasViewXForm(); } -bool KisQPaintDeviceCanvasPainter::hasWorldXForm() const +bool KisTQPaintDeviceCanvasPainter::hasWorldXForm() const { return m_painter.hasWorldXForm(); } -void KisQPaintDeviceCanvasPainter::setViewXForm(bool enable) +void KisTQPaintDeviceCanvasPainter::setViewXForm(bool enable) { m_painter.setViewXForm(enable); } -QRect KisQPaintDeviceCanvasPainter::window() const +TQRect KisTQPaintDeviceCanvasPainter::window() const { return m_painter.window(); } -void KisQPaintDeviceCanvasPainter::setWindow(const QRect& r) +void KisTQPaintDeviceCanvasPainter::setWindow(const TQRect& r) { m_painter.setWindow(r); } -void KisQPaintDeviceCanvasPainter::setWindow(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::setWindow(int x, int y, int w, int h) { m_painter.setWindow(x, y, w, h); } -QRect KisQPaintDeviceCanvasPainter::viewport() const +TQRect KisTQPaintDeviceCanvasPainter::viewport() const { return m_painter.viewport(); } -void KisQPaintDeviceCanvasPainter::setViewport(const QRect& r) +void KisTQPaintDeviceCanvasPainter::setViewport(const TQRect& r) { m_painter.setViewport(r); } -void KisQPaintDeviceCanvasPainter::setViewport(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::setViewport(int x, int y, int w, int h) { m_painter.setViewport(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::setWorldXForm(bool enable) +void KisTQPaintDeviceCanvasPainter::setWorldXForm(bool enable) { m_painter.setWorldXForm(enable); } -const QWMatrix& KisQPaintDeviceCanvasPainter::worldMatrix() const +const TQWMatrix& KisTQPaintDeviceCanvasPainter::tqworldMatrix() const { - return m_painter.worldMatrix(); + return m_painter.tqworldMatrix(); } -void KisQPaintDeviceCanvasPainter::setWorldMatrix(const QWMatrix& matrix, bool combine) +void KisTQPaintDeviceCanvasPainter::setWorldMatrix(const TQWMatrix& matrix, bool combine) { m_painter.setWorldMatrix(matrix, combine); } -void KisQPaintDeviceCanvasPainter::saveWorldMatrix() +void KisTQPaintDeviceCanvasPainter::saveWorldMatrix() { m_painter.saveWorldMatrix(); } -void KisQPaintDeviceCanvasPainter::restoreWorldMatrix() +void KisTQPaintDeviceCanvasPainter::restoreWorldMatrix() { m_painter.restoreWorldMatrix(); } -void KisQPaintDeviceCanvasPainter::scale(double sx, double sy) +void KisTQPaintDeviceCanvasPainter::scale(double sx, double sy) { m_painter.scale(sx, sy); } -void KisQPaintDeviceCanvasPainter::shear(double sh, double sv) +void KisTQPaintDeviceCanvasPainter::shear(double sh, double sv) { m_painter.shear(sh, sv); } -void KisQPaintDeviceCanvasPainter::rotate(double a) +void KisTQPaintDeviceCanvasPainter::rotate(double a) { m_painter.rotate(a); } -void KisQPaintDeviceCanvasPainter::translate(double dx, double dy) +void KisTQPaintDeviceCanvasPainter::translate(double dx, double dy) { m_painter.translate(dx, dy); } -void KisQPaintDeviceCanvasPainter::resetXForm() +void KisTQPaintDeviceCanvasPainter::resetXForm() { m_painter.resetXForm(); } -double KisQPaintDeviceCanvasPainter::translationX() const +double KisTQPaintDeviceCanvasPainter::translationX() const { return m_painter.translationX(); } -double KisQPaintDeviceCanvasPainter::translationY() const +double KisTQPaintDeviceCanvasPainter::translationY() const { return m_painter.translationY(); } -QPoint KisQPaintDeviceCanvasPainter::xForm(const QPoint& point) const +TQPoint KisTQPaintDeviceCanvasPainter::xForm(const TQPoint& point) const { return m_painter.xForm(point); } -QRect KisQPaintDeviceCanvasPainter::xForm(const QRect& r) const +TQRect KisTQPaintDeviceCanvasPainter::xForm(const TQRect& r) const { return m_painter.xForm(r); } -QPointArray KisQPaintDeviceCanvasPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisTQPaintDeviceCanvasPainter::xForm(const TQPointArray& pointArray) const { return m_painter.xForm(pointArray); } -QPointArray KisQPaintDeviceCanvasPainter::xForm(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisTQPaintDeviceCanvasPainter::xForm(const TQPointArray& pointArray, int index, int npoints) const { return m_painter.xForm(pointArray, index, npoints); } -QPoint KisQPaintDeviceCanvasPainter::xFormDev(const QPoint& point) const +TQPoint KisTQPaintDeviceCanvasPainter::xFormDev(const TQPoint& point) const { return m_painter.xFormDev(point); } -QRect KisQPaintDeviceCanvasPainter::xFormDev(const QRect& r) const +TQRect KisTQPaintDeviceCanvasPainter::xFormDev(const TQRect& r) const { return m_painter.xFormDev(r); } -QPointArray KisQPaintDeviceCanvasPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisTQPaintDeviceCanvasPainter::xFormDev(const TQPointArray& pointArray) const { return m_painter.xFormDev(pointArray); } -QPointArray KisQPaintDeviceCanvasPainter::xFormDev(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisTQPaintDeviceCanvasPainter::xFormDev(const TQPointArray& pointArray, int index, int npoints) const { return m_painter.xFormDev(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::setClipping(bool enable) +void KisTQPaintDeviceCanvasPainter::setClipping(bool enable) { m_painter.setClipping(enable); } -bool KisQPaintDeviceCanvasPainter::hasClipping() const +bool KisTQPaintDeviceCanvasPainter::hasClipping() const { return m_painter.hasClipping(); } -QRegion KisQPaintDeviceCanvasPainter::clipRegion(QPainter::CoordinateMode mode) const +TQRegion KisTQPaintDeviceCanvasPainter::clipRegion(TQPainter::CoordinateMode mode) const { return m_painter.clipRegion(mode); } -void KisQPaintDeviceCanvasPainter::setClipRect(const QRect& r, QPainter::CoordinateMode mode) +void KisTQPaintDeviceCanvasPainter::setClipRect(const TQRect& r, TQPainter::CoordinateMode mode) { m_painter.setClipRect(r, mode); } -void KisQPaintDeviceCanvasPainter::setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode mode) +void KisTQPaintDeviceCanvasPainter::setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode mode) { m_painter.setClipRect(x, y, w, h, mode); } -void KisQPaintDeviceCanvasPainter::setClipRegion(const QRegion& rgn, QPainter::CoordinateMode mode) +void KisTQPaintDeviceCanvasPainter::setClipRegion(const TQRegion& rgn, TQPainter::CoordinateMode mode) { m_painter.setClipRegion(rgn, mode); } -void KisQPaintDeviceCanvasPainter::drawPoint(int x, int y) +void KisTQPaintDeviceCanvasPainter::drawPoint(int x, int y) { m_painter.drawPoint(x, y); } -void KisQPaintDeviceCanvasPainter::drawPoint(const QPoint& point) +void KisTQPaintDeviceCanvasPainter::drawPoint(const TQPoint& point) { m_painter.drawPoint(point); } -void KisQPaintDeviceCanvasPainter::drawPoints(const QPointArray& pointArray, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawPoints(const TQPointArray& pointArray, int index, int npoints) { m_painter.drawPoints(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::moveTo(int x, int y) +void KisTQPaintDeviceCanvasPainter::moveTo(int x, int y) { m_painter.moveTo(x, y); } -void KisQPaintDeviceCanvasPainter::moveTo(const QPoint& point) +void KisTQPaintDeviceCanvasPainter::moveTo(const TQPoint& point) { m_painter.moveTo(point); } -void KisQPaintDeviceCanvasPainter::lineTo(int x, int y) +void KisTQPaintDeviceCanvasPainter::lineTo(int x, int y) { m_painter.lineTo(x, y); } -void KisQPaintDeviceCanvasPainter::lineTo(const QPoint& point) +void KisTQPaintDeviceCanvasPainter::lineTo(const TQPoint& point) { m_painter.lineTo(point); } -void KisQPaintDeviceCanvasPainter::drawLine(int x1, int y1, int x2, int y2) +void KisTQPaintDeviceCanvasPainter::drawLine(int x1, int y1, int x2, int y2) { m_painter.drawLine(x1, y1, x2, y2); } -void KisQPaintDeviceCanvasPainter::drawLine(const QPoint& start, const QPoint& end) +void KisTQPaintDeviceCanvasPainter::drawLine(const TQPoint& start, const TQPoint& end) { m_painter.drawLine(start, end); } -void KisQPaintDeviceCanvasPainter::drawRect(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::drawRect(int x, int y, int w, int h) { m_painter.drawRect(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::drawRect(const QRect& r) +void KisTQPaintDeviceCanvasPainter::drawRect(const TQRect& r) { m_painter.drawRect(r); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h) { m_painter.drawWinFocusRect(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const QColor& bgColor) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const TQColor& bgColor) { m_painter.drawWinFocusRect(x, y, w, h, bgColor); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(const QRect& r) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(const TQRect& r) { m_painter.drawWinFocusRect(r); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(const QRect& r, const QColor& bgColor) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(const TQRect& r, const TQColor& bgColor) { m_painter.drawWinFocusRect(r, bgColor); } -void KisQPaintDeviceCanvasPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int yRnd) +void KisTQPaintDeviceCanvasPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int yRnd) { m_painter.drawRoundRect(x, y, w, h, xRnd, yRnd); } -void KisQPaintDeviceCanvasPainter::drawRoundRect(const QRect& r, int xRnd, int yRnd) +void KisTQPaintDeviceCanvasPainter::drawRoundRect(const TQRect& r, int xRnd, int yRnd) { m_painter.drawRoundRect(r, xRnd, yRnd); } -void KisQPaintDeviceCanvasPainter::drawEllipse(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::drawEllipse(int x, int y, int w, int h) { m_painter.drawEllipse(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::drawEllipse(const QRect& r) +void KisTQPaintDeviceCanvasPainter::drawEllipse(const TQRect& r) { m_painter.drawEllipse(r); } -void KisQPaintDeviceCanvasPainter::drawArc(int x, int y, int w, int h, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawArc(int x, int y, int w, int h, int a, int alen) { m_painter.drawArc(x, y, w, h, a, alen); } -void KisQPaintDeviceCanvasPainter::drawArc(const QRect& r, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawArc(const TQRect& r, int a, int alen) { m_painter.drawArc(r, a, alen); } -void KisQPaintDeviceCanvasPainter::drawPie(int x, int y, int w, int h, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawPie(int x, int y, int w, int h, int a, int alen) { m_painter.drawPie(x, y, w, h, a, alen); } -void KisQPaintDeviceCanvasPainter::drawPie(const QRect& r, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawPie(const TQRect& r, int a, int alen) { m_painter.drawPie(r, a, alen); } -void KisQPaintDeviceCanvasPainter::drawChord(int x, int y, int w, int h, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawChord(int x, int y, int w, int h, int a, int alen) { m_painter.drawChord(x, y, w, h, a, alen); } -void KisQPaintDeviceCanvasPainter::drawChord(const QRect& r, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawChord(const TQRect& r, int a, int alen) { m_painter.drawChord(r, a, alen); } -void KisQPaintDeviceCanvasPainter::drawLineSegments(const QPointArray& pointArray, int index, int nlines) +void KisTQPaintDeviceCanvasPainter::drawLineSegments(const TQPointArray& pointArray, int index, int nlines) { m_painter.drawLineSegments(pointArray, index, nlines); } -void KisQPaintDeviceCanvasPainter::drawPolyline(const QPointArray& pointArray, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawPolyline(const TQPointArray& pointArray, int index, int npoints) { m_painter.drawPolyline(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::drawPolygon(const QPointArray& pointArray, bool winding, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawPolygon(const TQPointArray& pointArray, bool winding, int index, int npoints) { m_painter.drawPolygon(pointArray, winding, index, npoints); } -void KisQPaintDeviceCanvasPainter::drawConvexPolygon(const QPointArray& pointArray, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawConvexPolygon(const TQPointArray& pointArray, int index, int npoints) { m_painter.drawConvexPolygon(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int index) +void KisTQPaintDeviceCanvasPainter::drawCubicBezier(const TQPointArray& pointArray, int index) { m_painter.drawCubicBezier(pointArray, index); } -void KisQPaintDeviceCanvasPainter::drawPixmap(int x, int y, const QPixmap& pixmap, int sx, int sy, int sw, int sh) +void KisTQPaintDeviceCanvasPainter::drawPixmap(int x, int y, const TQPixmap& pixmap, int sx, int sy, int sw, int sh) { m_painter.drawPixmap(x, y, pixmap, sx, sy, sw, sh); } -void KisQPaintDeviceCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap, const QRect& sr) +void KisTQPaintDeviceCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap, const TQRect& sr) { m_painter.drawPixmap(point, pixmap, sr); } -void KisQPaintDeviceCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap) +void KisTQPaintDeviceCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap) { m_painter.drawPixmap(point, pixmap); } -void KisQPaintDeviceCanvasPainter::drawPixmap(const QRect& r, const QPixmap& pixmap) +void KisTQPaintDeviceCanvasPainter::drawPixmap(const TQRect& r, const TQPixmap& pixmap) { m_painter.drawPixmap(r, pixmap); } -void KisQPaintDeviceCanvasPainter::drawImage(int x, int y, const QImage& image, int sx, int sy, int sw, int sh, int conversionFlags) +void KisTQPaintDeviceCanvasPainter::drawImage(int x, int y, const TQImage& image, int sx, int sy, int sw, int sh, int conversionFlags) { m_painter.drawImage(x, y, image, sx, sy, sw, sh, conversionFlags); } -void KisQPaintDeviceCanvasPainter::drawImage(const QPoint& point, const QImage& image, const QRect& sr, int conversionFlags) +void KisTQPaintDeviceCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, const TQRect& sr, int conversionFlags) { m_painter.drawImage(point, image, sr, conversionFlags); } -void KisQPaintDeviceCanvasPainter::drawImage(const QPoint& point, const QImage& image, int conversion_flags) +void KisTQPaintDeviceCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, int conversion_flags) { m_painter.drawImage(point, image, conversion_flags); } -void KisQPaintDeviceCanvasPainter::drawImage(const QRect& r, const QImage& image) +void KisTQPaintDeviceCanvasPainter::drawImage(const TQRect& r, const TQImage& image) { m_painter.drawImage(r, image); } -void KisQPaintDeviceCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const QPixmap& pixmap, int sx, int sy) +void KisTQPaintDeviceCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const TQPixmap& pixmap, int sx, int sy) { m_painter.drawTiledPixmap(x, y, w, h, pixmap, sx, sy); } -void KisQPaintDeviceCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap, const QPoint& point) +void KisTQPaintDeviceCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap, const TQPoint& point) { m_painter.drawTiledPixmap(r, pixmap, point); } -void KisQPaintDeviceCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap) +void KisTQPaintDeviceCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap) { m_painter.drawTiledPixmap(r, pixmap); } -void KisQPaintDeviceCanvasPainter::fillRect(int x, int y, int w, int h, const QBrush& brush) +void KisTQPaintDeviceCanvasPainter::fillRect(int x, int y, int w, int h, const TQBrush& brush) { m_painter.fillRect(x, y, w, h, brush); } -void KisQPaintDeviceCanvasPainter::fillRect(const QRect& r, const QBrush& brush) +void KisTQPaintDeviceCanvasPainter::fillRect(const TQRect& r, const TQBrush& brush) { m_painter.fillRect(r, brush); } -void KisQPaintDeviceCanvasPainter::eraseRect(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::eraseRect(int x, int y, int w, int h) { m_painter.eraseRect(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::eraseRect(const QRect& r) +void KisTQPaintDeviceCanvasPainter::eraseRect(const TQRect& r) { m_painter.eraseRect(r); } -void KisQPaintDeviceCanvasPainter::drawText(int x, int y, const QString& text, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(int x, int y, const TQString& text, int len, TQPainter::TextDirection dir) { m_painter.drawText(x, y, text, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(const QPoint& point, const QString& text, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(const TQPoint& point, const TQString& text, int len, TQPainter::TextDirection dir) { m_painter.drawText(point, text, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(int x, int y, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(int x, int y, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { m_painter.drawText(x, y, text, pos, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(const QPoint& point, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(const TQPoint& point, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { m_painter.drawText(point, text, pos, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(int x, int y, int w, int h, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisTQPaintDeviceCanvasPainter::drawText(int x, int y, int w, int h, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { m_painter.drawText(x, y, w, h, flags, text, len, br, intern); } -void KisQPaintDeviceCanvasPainter::drawText(const QRect& r, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisTQPaintDeviceCanvasPainter::drawText(const TQRect& r, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { m_painter.drawText(r, flags, text, len, br, intern); } -void KisQPaintDeviceCanvasPainter::drawTextItem(int x, int y, const QTextItem& ti, int textflags) +void KisTQPaintDeviceCanvasPainter::tqdrawTextItem(int x, int y, const TQTextItem& ti, int textflags) { - m_painter.drawTextItem(x, y, ti, textflags); + m_painter.tqdrawTextItem(x, y, ti, textflags); } -void KisQPaintDeviceCanvasPainter::drawTextItem(const QPoint& p, const QTextItem& ti, int textflags) +void KisTQPaintDeviceCanvasPainter::tqdrawTextItem(const TQPoint& p, const TQTextItem& ti, int textflags) { - m_painter.drawTextItem(p, ti, textflags); + m_painter.tqdrawTextItem(p, ti, textflags); } -QRect KisQPaintDeviceCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisTQPaintDeviceCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const TQString& text, int len, TQTextParag **intern) { return m_painter.boundingRect(x, y, w, h, flags, text, len, intern); } -QRect KisQPaintDeviceCanvasPainter::boundingRect(const QRect& r, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisTQPaintDeviceCanvasPainter::boundingRect(const TQRect& r, int flags, const TQString& text, int len, TQTextParag **intern) { return m_painter.boundingRect(r, flags, text, len, intern); } -int KisQPaintDeviceCanvasPainter::tabStops() const +int KisTQPaintDeviceCanvasPainter::tabStops() const { return m_painter.tabStops(); } -void KisQPaintDeviceCanvasPainter::setTabStops(int ts) +void KisTQPaintDeviceCanvasPainter::setTabStops(int ts) { m_painter.setTabStops(ts); } -int *KisQPaintDeviceCanvasPainter::tabArray() const +int *KisTQPaintDeviceCanvasPainter::tabArray() const { return m_painter.tabArray(); } -void KisQPaintDeviceCanvasPainter::setTabArray(int *ts) +void KisTQPaintDeviceCanvasPainter::setTabArray(int *ts) { m_painter.setTabArray(ts); } diff --git a/krita/ui/kis_qpaintdevice_canvas_painter.h b/krita/ui/kis_qpaintdevice_canvas_painter.h index ddc306f1..0dca7322 100644 --- a/krita/ui/kis_qpaintdevice_canvas_painter.h +++ b/krita/ui/kis_qpaintdevice_canvas_painter.h @@ -16,26 +16,26 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_QPAINTDEVICE_CANVAS_PAINTER_H_ -#define KIS_QPAINTDEVICE_CANVAS_PAINTER_H_ +#ifndef KIS_TQPAINTDEVICE_CANVAS_PAINTER_H_ +#define KIS_TQPAINTDEVICE_CANVAS_PAINTER_H_ #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "kis_global.h" #include "kis_canvas_painter.h" -class KisQPaintDeviceCanvasPainter : public KisCanvasWidgetPainter { +class KisTQPaintDeviceCanvasPainter : public KisCanvasWidgetPainter { public: - KisQPaintDeviceCanvasPainter(); - KisQPaintDeviceCanvasPainter(const QPaintDevice *paintDevice); - virtual ~KisQPaintDeviceCanvasPainter(); + KisTQPaintDeviceCanvasPainter(); + KisTQPaintDeviceCanvasPainter(const TQPaintDevice *paintDevice); + virtual ~KisTQPaintDeviceCanvasPainter(); - bool begin(const QPaintDevice* paintDevice, bool unclipped = false); + bool begin(const TQPaintDevice* paintDevice, bool unclipped = false); virtual bool begin(KisCanvasWidget *canvasWidget, bool unclipped = false); virtual bool end(); @@ -43,45 +43,45 @@ public: virtual void save(); virtual void restore(); - virtual QFontMetrics fontMetrics() const; - virtual QFontInfo fontInfo() const; + virtual TQFontMetrics fontMetrics() const; + virtual TQFontInfo fontInfo() const; - virtual const QFont& font() const; - virtual void setFont(const QFont&); - virtual const QPen& pen() const; - virtual void setPen(const QPen&); + virtual const TQFont& font() const; + virtual void setFont(const TQFont&); + virtual const TQPen& pen() const; + virtual void setPen(const TQPen&); virtual void setPen(Qt::PenStyle); - virtual void setPen(const QColor&); - virtual const QBrush&brush() const; - virtual void setBrush(const QBrush&); - virtual void setBrush(Qt::BrushStyle); - virtual void setBrush(const QColor&); - virtual QPoint pos() const; - - virtual const QColor&backgroundColor() const; - virtual void setBackgroundColor(const QColor&); + virtual void setPen(const TQColor&); + virtual const TQBrush&brush() const; + virtual void setBrush(const TQBrush&); + virtual void setBrush(TQt::BrushStyle); + virtual void setBrush(const TQColor&); + virtual TQPoint pos() const; + + virtual const TQColor&backgroundColor() const; + virtual void setBackgroundColor(const TQColor&); virtual Qt::BGMode backgroundMode() const; virtual void setBackgroundMode(Qt::BGMode); - virtual Qt::RasterOp rasterOp() const; - virtual void setRasterOp(Qt::RasterOp); - virtual const QPoint&brushOrigin() const; + virtual TQt::RasterOp rasterOp() const; + virtual void setRasterOp(TQt::RasterOp); + virtual const TQPoint&brushOrigin() const; virtual void setBrushOrigin(int x, int y); - virtual void setBrushOrigin(const QPoint&); + virtual void setBrushOrigin(const TQPoint&); virtual bool hasViewXForm() const; virtual bool hasWorldXForm() const; virtual void setViewXForm(bool); - virtual QRect window() const; - virtual void setWindow(const QRect&); + virtual TQRect window() const; + virtual void setWindow(const TQRect&); virtual void setWindow(int x, int y, int w, int h); - virtual QRect viewport() const; - virtual void setViewport(const QRect&); + virtual TQRect viewport() const; + virtual void setViewport(const TQRect&); virtual void setViewport(int x, int y, int w, int h); virtual void setWorldXForm(bool); - virtual const QWMatrix&worldMatrix() const; - virtual void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + virtual const TQWMatrix&tqworldMatrix() const; + virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void saveWorldMatrix(); virtual void restoreWorldMatrix(); @@ -95,86 +95,86 @@ public: virtual double translationX() const; virtual double translationY() const; - virtual QPoint xForm(const QPoint&) const; - virtual QRect xForm(const QRect&) const; - virtual QPointArray xForm(const QPointArray&) const; - virtual QPointArray xForm(const QPointArray&, int index, int npoints) const; - virtual QPoint xFormDev(const QPoint&) const; - virtual QRect xFormDev(const QRect&) const; - virtual QPointArray xFormDev(const QPointArray&) const; - virtual QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + virtual TQPoint xForm(const TQPoint&) const; + virtual TQRect xForm(const TQRect&) const; + virtual TQPointArray xForm(const TQPointArray&) const; + virtual TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + virtual TQPoint xFormDev(const TQPoint&) const; + virtual TQRect xFormDev(const TQRect&) const; + virtual TQPointArray xFormDev(const TQPointArray&) const; + virtual TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; virtual void setClipping(bool); virtual bool hasClipping() const; - virtual QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - virtual void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + virtual TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + virtual void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); virtual void drawPoint(int x, int y); - virtual void drawPoint(const QPoint&); - virtual void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + virtual void drawPoint(const TQPoint&); + virtual void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); virtual void moveTo(int x, int y); - virtual void moveTo(const QPoint&); + virtual void moveTo(const TQPoint&); virtual void lineTo(int x, int y); - virtual void lineTo(const QPoint&); + virtual void lineTo(const TQPoint&); virtual void drawLine(int x1, int y1, int x2, int y2); - virtual void drawLine(const QPoint&, const QPoint&); + virtual void drawLine(const TQPoint&, const TQPoint&); virtual void drawRect(int x, int y, int w, int h); - virtual void drawRect(const QRect&); + virtual void drawRect(const TQRect&); virtual void drawWinFocusRect(int x, int y, int w, int h); - virtual void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - virtual void drawWinFocusRect(const QRect&); - virtual void drawWinFocusRect(const QRect&, const QColor&bgColor); + virtual void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + virtual void drawWinFocusRect(const TQRect&); + virtual void drawWinFocusRect(const TQRect&, const TQColor&bgColor); virtual void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - virtual void drawRoundRect(const QRect&, int = 25, int = 25); + virtual void drawRoundRect(const TQRect&, int = 25, int = 25); virtual void drawEllipse(int x, int y, int w, int h); - virtual void drawEllipse(const QRect&); + virtual void drawEllipse(const TQRect&); virtual void drawArc(int x, int y, int w, int h, int a, int alen); - virtual void drawArc(const QRect&, int a, int alen); + virtual void drawArc(const TQRect&, int a, int alen); virtual void drawPie(int x, int y, int w, int h, int a, int alen); - virtual void drawPie(const QRect&, int a, int alen); + virtual void drawPie(const TQRect&, int a, int alen); virtual void drawChord(int x, int y, int w, int h, int a, int alen); - virtual void drawChord(const QRect&, int a, int alen); - virtual void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - virtual void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - virtual void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - virtual void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - virtual void drawCubicBezier(const QPointArray&, int index=0); - virtual void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - virtual void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - virtual void drawPixmap(const QPoint&, const QPixmap&); - virtual void drawPixmap(const QRect&, const QPixmap&); - virtual void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - virtual void drawImage(const QRect&, const QImage&); - virtual void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - virtual void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - virtual void drawTiledPixmap(const QRect&, const QPixmap&); - //virtual void drawPicture(const QPicture&); - //virtual void drawPicture(int x, int y, const QPicture&); - //virtual void drawPicture(const QPoint&, const QPicture&); - - virtual void fillRect(int x, int y, int w, int h, const QBrush&); - virtual void fillRect(const QRect&, const QBrush&); + virtual void drawChord(const TQRect&, int a, int alen); + virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawCubicBezier(const TQPointArray&, int index=0); + virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + virtual void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + virtual void drawPixmap(const TQPoint&, const TQPixmap&); + virtual void drawPixmap(const TQRect&, const TQPixmap&); + virtual void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + virtual void drawImage(const TQRect&, const TQImage&); + virtual void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&); + //virtual void drawPicture(const TQPicture&); + //virtual void drawPicture(int x, int y, const TQPicture&); + //virtual void drawPicture(const TQPoint&, const TQPicture&); + + virtual void fillRect(int x, int y, int w, int h, const TQBrush&); + virtual void fillRect(const TQRect&, const TQBrush&); virtual void eraseRect(int x, int y, int w, int h); - virtual void eraseRect(const QRect&); + virtual void eraseRect(const TQRect&); - virtual void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - virtual void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + virtual void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + virtual void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - virtual void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - virtual void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - virtual QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - virtual QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + virtual TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + virtual TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); virtual int tabStops() const; virtual void setTabStops(int); @@ -182,8 +182,8 @@ public: virtual void setTabArray(int *); protected: - QPainter m_painter; + TQPainter m_painter; }; -#endif // KIS_QPAINTDEVICE_CANVAS_PAINTER_H_ +#endif // KIS_TQPAINTDEVICE_CANVAS_PAINTER_H_ diff --git a/krita/ui/kis_resource_mediator.cc b/krita/ui/kis_resource_mediator.cc index e4040cd2..204a1033 100644 --- a/krita/ui/kis_resource_mediator.cc +++ b/krita/ui/kis_resource_mediator.cc @@ -26,13 +26,13 @@ #include "kis_resource_mediator.h" KisResourceMediator::KisResourceMediator(KisItemChooser *chooser, - QObject *parent, - const char *name) : super(parent, name), m_chooser(chooser) + TQObject *tqparent, + const char *name) : super(tqparent, name), m_chooser(chooser) { Q_ASSERT(chooser); m_activeItem = 0; - connect(m_chooser, SIGNAL(selected(KoIconItem*)), SLOT(setActiveItem(KoIconItem*))); + connect(m_chooser, TQT_SIGNAL(selected(KoIconItem*)), TQT_SLOT(setActiveItem(KoIconItem*))); } KisResourceMediator::~KisResourceMediator() @@ -42,14 +42,14 @@ KisResourceMediator::~KisResourceMediator() void KisResourceMediator::connectServer(KisResourceServerBase* rServer) { // Add the initially loaded items - QValueList resources = rServer->resources(); - QValueList::iterator it; + TQValueList resources = rServer->resources(); + TQValueList::iterator it; for ( it = resources.begin(); it != resources.end(); ++it ) rServerAddedResource( *it ); // And connect to the server permanently, so that we may recieve updates afterwards - connect(rServer, SIGNAL(resourceAdded(KisResource*)), - this, SLOT(rServerAddedResource(KisResource*))); + connect(rServer, TQT_SIGNAL(resourceAdded(KisResource*)), + this, TQT_SLOT(rServerAddedResource(KisResource*))); } KisResource *KisResourceMediator::currentResource() const @@ -64,7 +64,7 @@ KisResource *KisResourceMediator::currentResource() const KisIconItem *KisResourceMediator::itemFor(KisResource *r) const { - if(m_items.contains(r)) + if(m_items.tqcontains(r)) { return m_items[r]; } @@ -83,7 +83,7 @@ KisResource *KisResourceMediator::resourceFor(KisIconItem *item) const return item ? item->resource() : 0; } -QWidget *KisResourceMediator::chooserWidget() const +TQWidget *KisResourceMediator::chooserWidget() const { return m_chooser; } diff --git a/krita/ui/kis_resource_mediator.h b/krita/ui/kis_resource_mediator.h index 55623a6e..b224d25c 100644 --- a/krita/ui/kis_resource_mediator.h +++ b/krita/ui/kis_resource_mediator.h @@ -18,9 +18,9 @@ #ifndef KIS_RESOURCE_MEDIATOR_H_ #define KIS_RESOURCE_MEDIATOR_H_ -#include -#include -#include +#include +#include +#include class KoIconItem; class KisItemChooser; @@ -34,13 +34,14 @@ class KisResourceServerBase; * For every view, a new resource mediator is created for every * resource type. */ -class KisResourceMediator : public QObject { +class KisResourceMediator : public TQObject { Q_OBJECT - typedef QObject super; + TQ_OBJECT + typedef TQObject super; public: KisResourceMediator(KisItemChooser *chooser, - QObject *parent = 0, + TQObject *tqparent = 0, const char *name = 0); virtual ~KisResourceMediator(); @@ -50,7 +51,7 @@ public: KisIconItem *itemFor(KisResource *r) const; KisResource *resourceFor(KoIconItem *item) const; KisResource *resourceFor(KisIconItem *item) const; - QWidget *chooserWidget() const; + TQWidget *chooserWidget() const; public slots: @@ -64,7 +65,7 @@ private slots: private: KisItemChooser *m_chooser; - QMap m_items; + TQMap m_items; KoIconItem *m_activeItem; }; diff --git a/krita/ui/kis_resourceserver.cc b/krita/ui/kis_resourceserver.cc index c72f9b80..d464e1bc 100644 --- a/krita/ui/kis_resourceserver.cc +++ b/krita/ui/kis_resourceserver.cc @@ -19,10 +19,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,7 +40,7 @@ #include "kis_palette.h" #include -KisResourceServerBase::KisResourceServerBase(QString type) +KisResourceServerBase::KisResourceServerBase(TQString type) : m_type(type), m_loaded(false) { } @@ -49,22 +49,22 @@ KisResourceServerBase::~KisResourceServerBase() { } -void KisResourceServerBase::loadResources(QStringList filenames) +void KisResourceServerBase::loadResources(TQStringList filenames) { - QStringList uniqueFiles; + TQStringList uniqueFiles; while( !filenames.empty() ) { - QString front = *filenames.begin(); + TQString front = *filenames.begin(); filenames.pop_front(); - QString fname = QFileInfo(front).fileName(); + TQString fname = TQFileInfo(front).fileName(); //ebug() << "Loading " << fname << "\n"; // XXX: Don't load resources with the same filename. Actually, we should look inside // the resource to find out whether they are really the same, but for now this // will prevent the same brush etc. showing up twice. - if (uniqueFiles.empty() || uniqueFiles.find(fname) == uniqueFiles.end()) { + if (uniqueFiles.empty() || uniqueFiles.tqfind(fname) == uniqueFiles.end()) { uniqueFiles.append(fname); KisResource *resource; resource = createResource(front); @@ -82,10 +82,10 @@ void KisResourceServerBase::loadResources(QStringList filenames) m_loaded = true; } -QValueList KisResourceServerBase::resources() +TQValueList KisResourceServerBase::resources() { if(!m_loaded) { - return QValueList(); + return TQValueList(); } return m_resources; @@ -103,12 +103,12 @@ void KisResourceServerBase::addResource(KisResource* resource) } -class ResourceLoaderThread : public QThread { +class ResourceLoaderThread : public TQThread { public: - ResourceLoaderThread(KisResourceServerBase * server, QStringList files) - : QThread() + ResourceLoaderThread(KisResourceServerBase * server, TQStringList files) + : TQThread() , m_server(server) , m_fileNames( files ) { @@ -123,18 +123,18 @@ public: private: KisResourceServerBase * m_server; - QStringList m_fileNames; + TQStringList m_fileNames; }; -QStringList getFileNames( QString extensions, QString type ) +TQStringList getFileNames( TQString extensions, TQString type ) { - QStringList extensionList = QStringList::split(":", extensions); - QStringList fileNames; + TQStringList extensionList = TQStringList::split(":", extensions); + TQStringList fileNames; - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = extensionList.begin(); it != extensionList.end(); ++it ) { - QString s = (*it); + TQString s = (*it); fileNames += KisFactory::instance()->dirs()->findAllResources(type.ascii(), (*it)); } return fileNames; diff --git a/krita/ui/kis_resourceserver.h b/krita/ui/kis_resourceserver.h index aa15f72e..ab3de04e 100644 --- a/krita/ui/kis_resourceserver.h +++ b/krita/ui/kis_resourceserver.h @@ -22,34 +22,35 @@ #ifndef KIS_RESOURCESERVER_H_ #define KIS_RESOURCESERVER_H_ -#include -#include +#include +#include #include "kis_generic_registry.h" class KisResource; -class KisResourceServerBase : public QObject { +class KisResourceServerBase : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisResourceServerBase(QString type); + KisResourceServerBase(TQString type); virtual ~KisResourceServerBase(); - void loadResources(QStringList filenames); + void loadResources(TQStringList filenames); /// Adds an already loaded resource to the server void addResource(KisResource* resource); - QValueList resources(); - QString type() { return m_type; }; + TQValueList resources(); + TQString type() { return m_type; }; signals: void resourceAdded(KisResource*); protected: - virtual KisResource* createResource( QString filename ) = 0; + virtual KisResource* createResource( TQString filename ) = 0; private: - QValueList m_resources; - QString m_type; + TQValueList m_resources; + TQString m_type; bool m_loaded; @@ -60,11 +61,11 @@ template class KisResourceServer : public KisResourceServerBase { typedef KisResourceServerBase super; public: - KisResourceServer(QString type) :super( type ) {} + KisResourceServer(TQString type) :super( type ) {} virtual ~KisResourceServer(){} private: - KisResource* createResource( QString filename ){return new T(filename);} + KisResource* createResource( TQString filename ){return new T(filename);} }; diff --git a/krita/ui/kis_ruler.cc b/krita/ui/kis_ruler.cc index 1da94b15..6b0eea80 100644 --- a/krita/ui/kis_ruler.cc +++ b/krita/ui/kis_ruler.cc @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include "kdebug.h" @@ -40,7 +40,7 @@ const char *KisRuler::m_nums[] = { "XX XXXXXX XXX XXX XXXXXX XXX XXXX XXXXX XXXXX XXXX XXX" }; -KisRuler::KisRuler(Qt::Orientation o, QWidget *parent, const char *name) : super(parent, name, WRepaintNoErase | WResizeNoErase), m_pixmapNums(m_nums) +KisRuler::KisRuler(Qt::Orientation o, TQWidget *tqparent, const char *name) : super(tqparent, name, WRepaintNoErase | WResizeNoErase), m_pixmapNums(m_nums) { setBackgroundMode(NoBackground); setFrameStyle(Box | Sunken); @@ -67,9 +67,9 @@ KisRuler::~KisRuler() delete m_pixmapBuffer; } -void KisRuler::initMarker(Q_INT32 w, Q_INT32 h) +void KisRuler::initMarker(TQ_INT32 w, TQ_INT32 h) { - QPainter p; + TQPainter p; m_pixmapMarker.resize(w, h); p.begin(&m_pixmapMarker); @@ -81,8 +81,8 @@ void KisRuler::initMarker(Q_INT32 w, Q_INT32 h) void KisRuler::recalculateSize() { - Q_INT32 w; - Q_INT32 h; + TQ_INT32 w; + TQ_INT32 h; if (m_pixmapBuffer) { delete m_pixmapBuffer; @@ -97,7 +97,7 @@ void KisRuler::recalculateSize() h = height(); } - m_pixmapBuffer = new QPixmap(w, h); + m_pixmapBuffer = new TQPixmap(w, h); Q_CHECK_PTR(m_pixmapBuffer); drawRuler(); @@ -126,12 +126,12 @@ void KisRuler::setZoom(double zoom) update(); } -void KisRuler::updatePointer(Q_INT32 x, Q_INT32 y) +void KisRuler::updatePointer(TQ_INT32 x, TQ_INT32 y) { if (m_pixmapBuffer) { if (m_orientation == Qt::Horizontal) { if (m_currentPosition != -1) - repaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT); + tqrepaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT); if (x != -1) { bitBlt(this, x, 1, &m_pixmapMarker, 0, 0, MARKER_WIDTH, MARKER_HEIGHT); @@ -139,7 +139,7 @@ void KisRuler::updatePointer(Q_INT32 x, Q_INT32 y) } } else { if (m_currentPosition != -1) - repaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH); + tqrepaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH); if (y != -1) { bitBlt(this, 1, y, &m_pixmapMarker, 0, 0, MARKER_HEIGHT, MARKER_WIDTH); @@ -149,7 +149,7 @@ void KisRuler::updatePointer(Q_INT32 x, Q_INT32 y) } } -void KisRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos) +void KisRuler::updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos) { if (m_orientation == Qt::Horizontal) m_firstVisible = xpos; @@ -161,10 +161,10 @@ void KisRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos) updatePointer(m_currentPosition, m_currentPosition); } -void KisRuler::paintEvent(QPaintEvent *e) +void KisRuler::paintEvent(TQPaintEvent *e) { if (m_pixmapBuffer) { - const QRect& rect = e->rect(); + const TQRect& rect = e->rect(); bitBlt(this, rect.topLeft(), m_pixmapBuffer, rect); super::paintEvent(e); @@ -173,19 +173,19 @@ void KisRuler::paintEvent(QPaintEvent *e) void KisRuler::drawRuler() { - QPainter p; - QString buf; - Q_INT32 st1 = 0; - Q_INT32 st2 = 0; - Q_INT32 st3 = 0; - Q_INT32 st4 = 0; + TQPainter p; + TQString buf; + TQ_INT32 st1 = 0; + TQ_INT32 st2 = 0; + TQ_INT32 st3 = 0; + TQ_INT32 st4 = 0; if (!m_pixmapBuffer) return; p.begin(m_pixmapBuffer); - p.setPen(colorGroup().text()); - p.setBackgroundColor(colorGroup().base()); + p.setPen(tqcolorGroup().text()); + p.setBackgroundColor(tqcolorGroup().base()); p.eraseRect(0, 0, m_pixmapBuffer->width(), m_pixmapBuffer->height()); switch (m_unit) { @@ -214,7 +214,7 @@ void KisRuler::drawRuler() bool s4 = KoUnit::fromUserValue(st4, m_unit) * m_zoom > 3.0; float cx = KoUnit::fromUserValue(100, m_unit) / m_zoom; - Q_INT32 step = qRound(cx); + TQ_INT32 step = tqRound(cx); if (step < 5) { step = 1; @@ -248,12 +248,12 @@ void KisRuler::drawRuler() step = 100000; } - Q_INT32 start = (Q_INT32)(KoUnit::fromUserValue(m_firstVisible, m_unit) / m_zoom); - Q_INT32 pos = 0; + TQ_INT32 start = (TQ_INT32)(KoUnit::fromUserValue(m_firstVisible, m_unit) / m_zoom); + TQ_INT32 pos = 0; if (m_orientation == Qt::Horizontal) { do { - pos = (Q_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible); + pos = (TQ_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible); if (!s3 && s4 && start % st4 == 0) p.drawLine(pos, RULER_THICKNESS - 9, pos, RULER_THICKNESS); @@ -268,7 +268,7 @@ void KisRuler::drawRuler() p.drawLine(pos, RULER_THICKNESS - 5, pos, RULER_THICKNESS); if (start % step == 0) { - buf.setNum(QABS(start)); + buf.setNum(TQABS(start)); drawNums(&p, pos, 4, buf, true); } @@ -276,7 +276,7 @@ void KisRuler::drawRuler() } while (pos < m_pixmapBuffer->width()); } else { do { - pos = (Q_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible); + pos = (TQ_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible); if (!s3 && s4 && start % st4 == 0) p.drawLine(RULER_THICKNESS - 9, pos, RULER_THICKNESS, pos); @@ -291,7 +291,7 @@ void KisRuler::drawRuler() p.drawLine(RULER_THICKNESS - 5, pos, RULER_THICKNESS, pos); if (start % step == 0) { - buf.setNum(QABS(start)); + buf.setNum(TQABS(start)); drawNums(&p, 4, pos, buf, false); } @@ -302,19 +302,19 @@ void KisRuler::drawRuler() p.end(); } -void KisRuler::resizeEvent(QResizeEvent *) +void KisRuler::resizeEvent(TQResizeEvent *) { recalculateSize(); } -void KisRuler::styleChange(QStyle& oldStyle) +void KisRuler::styleChange(TQStyle& oldStyle) { Q_UNUSED(oldStyle); updateGeometry(); drawRuler(); } -void KisRuler::paletteChange(const QPalette& oldPalette) +void KisRuler::paletteChange(const TQPalette& oldPalette) { Q_UNUSED(oldPalette); drawRuler(); @@ -344,15 +344,15 @@ void KisRuler::hide() super::hide(); } -void KisRuler::drawNums(QPainter *p, Q_INT32 x, Q_INT32 y, QString& num, bool orientationHoriz) +void KisRuler::drawNums(TQPainter *p, TQ_INT32 x, TQ_INT32 y, TQString& num, bool orientationHoriz) { if (orientationHoriz) x -= 7; else y -= 8; - for (Q_UINT32 k = 0; k < num.length(); k++) { - Q_INT32 st = num.at(k).digitValue() * 7; + for (TQ_UINT32 k = 0; k < num.length(); k++) { + TQ_INT32 st = num.at(k).digitValue() * 7; p->drawPixmap(x, y, m_pixmapNums, st, 0, 7, 7); diff --git a/krita/ui/kis_ruler.h b/krita/ui/kis_ruler.h index 51153912..e93f2783 100644 --- a/krita/ui/kis_ruler.h +++ b/krita/ui/kis_ruler.h @@ -20,8 +20,8 @@ #ifndef KIS_RULER_H_ #define KIS_RULER_H_ -#include -#include +#include +#include #include // XXX: Make this look more like the KOffice ruler -- the KOffice @@ -30,14 +30,15 @@ #define RULER_THICKNESS 20 -class QPainter; +class TQPainter; -class KisRuler : public QFrame { +class KisRuler : public TQFrame { Q_OBJECT - typedef QFrame super; + TQ_OBJECT + typedef TQFrame super; public: - KisRuler(Qt::Orientation, QWidget *parent = 0, const char *name = 0); + KisRuler(Qt::Orientation, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisRuler(); public: @@ -45,31 +46,31 @@ public: public slots: void setZoom(double zoom); - void updatePointer(Q_INT32 x, Q_INT32 y); - void updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos); + void updatePointer(TQ_INT32 x, TQ_INT32 y); + void updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos); void setUnit(KoUnit::Unit u); void hide(); void show(); protected: - virtual void paintEvent(QPaintEvent *e); - virtual void resizeEvent(QResizeEvent *e); - virtual void styleChange(QStyle& oldStyle); - virtual void paletteChange(const QPalette& oldPalette); + virtual void paintEvent(TQPaintEvent *e); + virtual void resizeEvent(TQResizeEvent *e); + virtual void styleChange(TQStyle& oldStyle); + virtual void paletteChange(const TQPalette& oldPalette); void recalculateSize(); void drawRuler(); - void initMarker(Q_INT32 w, Q_INT32 h); - void drawNums(QPainter *gc, Q_INT32 x, Q_INT32 y, QString& num, bool orientationHoriz); + void initMarker(TQ_INT32 w, TQ_INT32 h); + void drawNums(TQPainter *gc, TQ_INT32 x, TQ_INT32 y, TQString& num, bool orientationHoriz); private: KoUnit::Unit m_unit; Qt::Orientation m_orientation; - Q_INT32 m_firstVisible; - Q_INT32 m_currentPosition; - QPixmap *m_pixmapBuffer; - QPixmap m_pixmapMarker; - QPixmap m_pixmapNums; + TQ_INT32 m_firstVisible; + TQ_INT32 m_currentPosition; + TQPixmap *m_pixmapBuffer; + TQPixmap m_pixmapMarker; + TQPixmap m_pixmapNums; double m_zoom; private: diff --git a/krita/ui/kis_save_visitor.h b/krita/ui/kis_save_visitor.h index ceb07eb7..ce668a53 100644 --- a/krita/ui/kis_save_visitor.h +++ b/krita/ui/kis_save_visitor.h @@ -19,7 +19,7 @@ #ifndef KIS_SAVE_VISITOR_H_ #define KIS_SAVE_VISITOR_H_ -#include +#include #include "kis_types.h" #include "kis_layer_visitor.h" #include "kis_image.h" @@ -29,7 +29,7 @@ class KisSaveVisitor : public KisLayerVisitor { public: - KisSaveVisitor(KisImageSP img, KoStore *store, Q_UINT32 &count) : + KisSaveVisitor(KisImageSP img, KoStore *store, TQ_UINT32 &count) : KisLayerVisitor(), m_count(count) { @@ -39,7 +39,7 @@ public: } public: - void setExternalUri(QString &uri) + void setExternalUri(TQString &uri) { m_external = true; m_uri = uri; @@ -47,10 +47,10 @@ public: virtual bool visit(KisPaintLayer *layer) { - //connect(*layer->paintDevice(), SIGNAL(ioProgress(Q_INT8)), m_img, SLOT(slotIOProgress(Q_INT8))); + //connect(*layer->paintDevice(), TQT_SIGNAL(ioProgress(TQ_INT8)), m_img, TQT_SLOT(slotIOProgress(TQ_INT8))); - QString location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count); + TQString location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count); // Layer data if (m_store->open(location)) { @@ -69,8 +69,8 @@ public: if (annotation) { // save layer profile - location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".icc"; + location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".icc"; if (m_store->open(location)) { m_store->write(annotation->annotation()); @@ -80,16 +80,16 @@ public: } if (layer->hasMask()) { - KisPaintDeviceSP mask = layer->getMask(); + KisPaintDeviceSP tqmask = layer->getMask(); - if (mask) { + if (tqmask) { // save layer profile - location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".mask"; + location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".tqmask"; if (m_store->open(location)) { - if (!mask->write(m_store)) { - mask->disconnect(); + if (!tqmask->write(m_store)) { + tqmask->disconnect(); m_store->close(); return false; } @@ -129,8 +129,8 @@ public: { if (layer->selection()) { - QString location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".selection"; + TQString location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".selection"; // Layer data if (m_store->open(location)) { @@ -145,13 +145,13 @@ public: } if (layer->filter()) { - QString location = m_external ? QString::null : m_uri; - location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".filterconfig"; + TQString location = m_external ? TQString() : m_uri; + location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".filterconfig"; if (m_store->open(location)) { - QString s = layer->filter()->toString(); - m_store->write(s.utf8(), qstrlen(s.utf8())); + TQString s = layer->filter()->toString(); + m_store->write(s.utf8(), tqstrlen(s.utf8())); m_store->close(); } } @@ -163,8 +163,8 @@ private: KisImageSP m_img; KoStore *m_store; bool m_external; - QString m_uri; - Q_UINT32 &m_count; + TQString m_uri; + TQ_UINT32 &m_count; }; #endif // KIS_SAVE_VISITOR_H_ diff --git a/krita/ui/kis_savexml_visitor.h b/krita/ui/kis_savexml_visitor.h index f45466cd..52c0dc80 100644 --- a/krita/ui/kis_savexml_visitor.h +++ b/krita/ui/kis_savexml_visitor.h @@ -19,7 +19,7 @@ #ifndef KIS_SAVEXML_VISITOR_H_ #define KIS_SAVEXML_VISITOR_H_ -#include +#include #include "kis_adjustment_layer.h" #include "kis_exif_info.h" @@ -32,7 +32,7 @@ class KisSaveXmlVisitor : public KisLayerVisitor { public: - KisSaveXmlVisitor(QDomDocument doc, QDomElement element, Q_UINT32 &count, bool root=false) : + KisSaveXmlVisitor(TQDomDocument doc, TQDomElement element, TQ_UINT32 &count, bool root=false) : KisLayerVisitor(), m_doc(doc), m_count(count), @@ -44,7 +44,7 @@ public: public: virtual bool visit(KisPaintLayer *layer) { - QDomElement layerElement = m_doc.createElement("layer"); + TQDomElement layerElement = m_doc.createElement("layer"); layerElement.setAttribute("name", layer->name()); layerElement.setAttribute("x", layer->x()); @@ -54,14 +54,14 @@ public: layerElement.setAttribute("visible", layer->visible()); layerElement.setAttribute("locked", layer->locked()); layerElement.setAttribute("layertype", "paintlayer"); - layerElement.setAttribute("filename", QString("layer%1").arg(m_count)); + layerElement.setAttribute("filename", TQString("layer%1").tqarg(m_count)); layerElement.setAttribute("colorspacename", layer->paintDevice()->colorSpace()->id().id()); - layerElement.setAttribute("hasmask", layer->hasMask()); + layerElement.setAttribute("hastqmask", layer->hasMask()); m_elem.appendChild(layerElement); if(layer->paintDevice()->hasExifInfo()) { - QDomElement exifElmt = layer->paintDevice()->exifInfo()->save(m_doc); + TQDomElement exifElmt = layer->paintDevice()->exifInfo()->save(m_doc); layerElement.appendChild(exifElmt); } m_count++; @@ -70,7 +70,7 @@ public: virtual bool visit(KisGroupLayer *layer) { - QDomElement layerElement; + TQDomElement layerElement; if(m_root) // if this is the root we fake so not to save it layerElement = m_elem; @@ -90,7 +90,7 @@ public: m_elem.appendChild(layerElement); } - QDomElement elem = m_doc.createElement("LAYERS"); + TQDomElement elem = m_doc.createElement("LAYERS"); layerElement.appendChild(elem); @@ -114,7 +114,7 @@ public: virtual bool visit(KisAdjustmentLayer* layer) { - QDomElement layerElement = m_doc.createElement("layer"); + TQDomElement layerElement = m_doc.createElement("layer"); layerElement.setAttribute("name", layer->name()); layerElement.setAttribute("filtername", layer->filter()->name()); @@ -124,7 +124,7 @@ public: layerElement.setAttribute("visible", layer->visible()); layerElement.setAttribute("locked", layer->locked()); layerElement.setAttribute("layertype", "adjustmentlayer"); - layerElement.setAttribute("filename", QString("layer%1").arg(m_count)); + layerElement.setAttribute("filename", TQString("layer%1").tqarg(m_count)); layerElement.setAttribute("x", layer->x()); layerElement.setAttribute("y", layer->y()); m_elem.appendChild(layerElement); @@ -134,9 +134,9 @@ public: } private: - QDomDocument m_doc; - QDomElement m_elem; - Q_UINT32 &m_count; + TQDomDocument m_doc; + TQDomElement m_elem; + TQ_UINT32 &m_count; bool m_root; }; diff --git a/krita/ui/kis_selection_manager.cc b/krita/ui/kis_selection_manager.cc index d97fca0c..3caba5e7 100644 --- a/krita/ui/kis_selection_manager.cc +++ b/krita/ui/kis_selection_manager.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -60,8 +60,8 @@ #include "kis_fill_painter.h" #include "kis_canvas.h" -KisSelectionManager::KisSelectionManager(KisView * parent, KisDoc * doc) - : m_parent(parent), +KisSelectionManager::KisSelectionManager(KisView * tqparent, KisDoc * doc) + : m_parent(tqparent), m_doc(doc), m_copy(0), m_cut(0), @@ -102,142 +102,142 @@ void KisSelectionManager::setup(KActionCollection * collection) // XXX: setup shortcuts! m_cut = KStdAction::cut(this, - SLOT(cut()), + TQT_SLOT(cut()), collection, "cut"); m_copy = KStdAction::copy(this, - SLOT(copy()), + TQT_SLOT(copy()), collection, "copy"); m_paste = KStdAction::paste(this, - SLOT(paste()), + TQT_SLOT(paste()), collection, "paste"); m_pasteNew = new KAction(i18n("Paste into &New Image"), 0, 0, - this, SLOT(pasteNew()), + this, TQT_SLOT(pasteNew()), collection, "paste_new"); m_selectAll = KStdAction::selectAll(this, - SLOT(selectAll()), + TQT_SLOT(selectAll()), collection, "select_all"); m_deselect = KStdAction::deselect(this, - SLOT(deselect()), + TQT_SLOT(deselect()), collection, "deselect"); m_clear = KStdAction::clear(this, - SLOT(clear()), + TQT_SLOT(clear()), collection, "clear"); m_reselect = new KAction(i18n("&Reselect"), 0, "Ctrl+Shift+D", - this, SLOT(reselect()), + this, TQT_SLOT(reselect()), collection, "reselect"); m_invert = new KAction(i18n("&Invert"), 0, "Ctrl+I", - this, SLOT(invert()), + this, TQT_SLOT(invert()), collection, "invert"); m_toNewLayer = new KAction(i18n("Copy Selection to New Layer"), 0, "Ctrl+J", - this, SLOT(copySelectionToNewLayer()), + this, TQT_SLOT(copySelectionToNewLayer()), collection, "copy_selection_to_new_layer"); m_cutToNewLayer = new KAction(i18n("Cut Selection to New Layer"), 0, "Ctrl+Shift+J", - this, SLOT(cutToNewLayer()), + this, TQT_SLOT(cutToNewLayer()), collection, "cut_selection_to_new_layer"); m_feather = new KAction(i18n("Feather"), 0, "Ctrl+Alt+D", - this, SLOT(feather()), + this, TQT_SLOT(feather()), collection, "feather"); m_fillForegroundColor = new KAction(i18n("Fill with Foreground Color"), "Alt+backspace", this, - SLOT(fillForegroundColor()), + TQT_SLOT(fillForegroundColor()), collection, "fill_selection_foreground_color"); m_fillBackgroundColor = new KAction(i18n("Fill with Background Color"), "backspace", this, - SLOT(fillBackgroundColor()), + TQT_SLOT(fillBackgroundColor()), collection, "fill_selection_background_color"); m_fillPattern = new KAction(i18n("Fill with Pattern"), 0, this, - SLOT(fillPattern()), + TQT_SLOT(fillPattern()), collection, "fill_selection_pattern"); - m_toggleDisplaySelection = new KToggleAction(i18n("Display Selection"), "Ctrl+h", this, SLOT(toggleDisplaySelection()), collection, "toggle_display_selection"); + m_toggleDisplaySelection = new KToggleAction(i18n("Display Selection"), "Ctrl+h", this, TQT_SLOT(toggleDisplaySelection()), collection, "toggle_display_selection"); m_toggleDisplaySelection->setCheckedState(KGuiItem(i18n("Hide Selection"))); m_toggleDisplaySelection->setChecked(true); m_border = new KAction(i18n("Border..."), 0, 0, - this, SLOT(border()), + this, TQT_SLOT(border()), collection, "border"); m_expand = new KAction(i18n("Expand..."), 0, 0, - this, SLOT(expand()), + this, TQT_SLOT(expand()), collection, "expand"); m_smooth = new KAction(i18n("Smooth..."), 0, 0, - this, SLOT(smooth()), + this, TQT_SLOT(smooth()), collection, "smooth"); m_contract = new KAction(i18n("Contract..."), 0, 0, - this, SLOT(contract()), + this, TQT_SLOT(contract()), collection, "contract"); m_similar = new KAction(i18n("Similar"), 0, 0, - this, SLOT(similar()), + this, TQT_SLOT(similar()), collection, "similar"); m_transform = new KAction(i18n("Transform..."), 0, 0, - this, SLOT(transform()), + this, TQT_SLOT(transform()), collection, "transform_selection"); // m_load // = new KAction(i18n("Load..."), // 0, 0, -// this, SLOT(load()), +// this, TQT_SLOT(load()), // collection, "load_selection"); // // // m_save // = new KAction(i18n("Save As..."), // 0, 0, -// this, SLOT(save()), +// this, TQT_SLOT(save()), // collection, "save_selection"); - QClipboard *cb = QApplication::clipboard(); - connect(cb, SIGNAL(dataChanged()), SLOT(clipboardDataChanged())); + TQClipboard *cb = TQApplication::tqclipboard(); + connect(cb, TQT_SIGNAL(dataChanged()), TQT_SLOT(clipboardDataChanged())); } void KisSelectionManager::clipboardDataChanged() @@ -258,7 +258,7 @@ void KisSelectionManager::updateGUI() Q_ASSERT(m_clipboard); if (m_parent == 0) { - // "Eek, no parent! + // "Eek, no tqparent! return; } @@ -378,7 +378,7 @@ void KisSelectionManager::copy() KisSelectionSP selection = dev->selection(); - QRect r = selection->selectedExactRect(); + TQRect r = selection->selectedExactRect(); KisPaintDeviceSP clip = new KisPaintDevice(dev->colorSpace(), "clip"); Q_CHECK_PTR(clip); @@ -393,9 +393,9 @@ void KisSelectionManager::copy() gc.bitBlt(0, 0, COMPOSITE_COPY, dev, r.x(), r.y(), r.width(), r.height()); gc.end(); - // Apply selection mask. + // Apply selection tqmask. - for (Q_INT32 y = 0; y < r.height(); y++) { + for (TQ_INT32 y = 0; y < r.height(); y++) { KisHLineIteratorPixel layerIt = clip->createHLineIterator(0, y, r.width(), true); KisHLineIteratorPixel selectionIt = selection->createHLineIterator(r.x(), r.y() + y, r.width(), false); @@ -422,11 +422,11 @@ KisLayerSP KisSelectionManager::paste() KisPaintDeviceSP clip = m_clipboard->clip(); if (clip) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintLayer *layer = new KisPaintLayer(img, img->nextLayerName() + i18n("(pasted)"), OPACITY_OPAQUE); Q_CHECK_PTR(layer); - QRect r = clip->exactBounds(); + TQRect r = clip->exactBounds(); KisPainter gc; gc.begin(layer->paintDevice()); gc.bitBlt(0, 0, COMPOSITE_COPY, clip, r.x(), r.y(), r.width(), r.height()); @@ -434,24 +434,24 @@ KisLayerSP KisSelectionManager::paste() //figure out where to position the clip KisCanvasController *cc = m_parent->getCanvasController(); - QPoint center = cc->viewToWindow(QPoint(cc->kiscanvas()->width()/2, cc->kiscanvas()->height()/2)); - QPoint bottomright = cc->viewToWindow(QPoint(cc->kiscanvas()->width(), cc->kiscanvas()->height())); + TQPoint center = cc->viewToWindow(TQPoint(cc->kiscanvas()->width()/2, cc->kiscanvas()->height()/2)); + TQPoint bottomright = cc->viewToWindow(TQPoint(cc->kiscanvas()->width(), cc->kiscanvas()->height())); if(bottomright.x() > img->width()) center.setX(img->width()/2); if(bottomright.y() > img->height()) center.setY(img->height()/2); - center -= QPoint(r.width()/2, r.height()/2); + center -= TQPoint(r.width()/2, r.height()/2); layer->setX(center.x()); layer->setY(center.y()); /*XXX CBR have an idea of asking the user if he is about to paste a clip ion another cs than that of the image if that is what he want rather than silently converting if (clip->colorSpace != img ->colorSpace()) - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) layer->convertTo(img->colorSpace()); */ - QApplication::restoreOverrideCursor(); - if(img->addLayer(layer, img->activeLayer()->parent(), img->activeLayer())) + TQApplication::restoreOverrideCursor(); + if(img->addLayer(layer, img->activeLayer()->tqparent(), img->activeLayer())) { return layer; } else { @@ -466,13 +466,13 @@ void KisSelectionManager::pasteNew() KisPaintDeviceSP clip = m_clipboard->clip(); if (!clip) return; - QRect r = clip->exactBounds(); + TQRect r = clip->exactBounds(); if (r.width() < 1 && r.height() < 1) { // Don't paste empty clips return; } - const QCString mimetype = KoDocument::readNativeFormatMimeType(); + const TQCString mimetype = KoDocument::readNativeFormatMimeType(); KoDocumentEntry entry = KoDocumentEntry::queryByMimeType( mimetype ); KisDoc * doc = (KisDoc*) entry.createDoc(); @@ -573,7 +573,7 @@ void KisSelectionManager::clear() if (img->undo()) img->undoAdapter()->addCommand(t); } -void KisSelectionManager::fill(const KisColor& color, bool fillWithPattern, const QString& transactionText) +void KisSelectionManager::fill(const KisColor& color, bool fillWithPattern, const TQString& transactionText) { KisImageSP img = m_parent->currentImg(); if (!img) return; @@ -729,7 +729,7 @@ void KisSelectionManager::feather() k->height = 3; k->factor = 16; k->offset = 0; - k->data = new Q_INT32[9]; + k->data = new TQ_INT32[9]; k->data[0] = 1; k->data[1] = 2; k->data[2] = 1; @@ -740,10 +740,10 @@ void KisSelectionManager::feather() k->data[7] = 2; k->data[8] = 1; - QRect rect = selection->selectedRect(); + TQRect rect = selection->selectedRect(); // Make sure we've got enough space around the edges. - rect = QRect(rect.x() - 3, rect.y() - 3, rect.width() + 6, rect.height() + 6); - rect &= QRect(0, 0, img->width(), img->height()); + rect = TQRect(rect.x() - 3, rect.y() - 3, rect.width() + 6, rect.height() + 6); + rect &= TQRect(0, 0, img->width(), img->height()); painter.applyMatrix(k, rect.x(), rect.y(), rect.width(), rect.height(), BORDER_AVOID, KisChannelInfo::FLAG_ALPHA); painter.end(); @@ -777,7 +777,7 @@ void KisSelectionManager::save() {} #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) -void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) +void KisSelectionManager::grow (TQ_INT32 xradius, TQ_INT32 yradius) { KisImageSP img = m_parent->currentImg(); if (!img) return; @@ -789,14 +789,14 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); /* Any bugs in this fuction are probably also in thin_region Blame all bugs in this function on jaycox@gimp.org */ - Q_UINT8 **buf; // caches the region's pixel data - Q_UINT8 **max; // caches the largest values for each column + TQ_UINT8 **buf; // caches the region's pixel data + TQ_UINT8 **max; // caches the largest values for each column if (xradius <= 0 || yradius <= 0) return; @@ -808,14 +808,14 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) Q_CHECK_PTR(t); } - max = new Q_UINT8* [layerSize.width() + 2 * xradius]; - buf = new Q_UINT8* [yradius + 1]; - for (Q_INT32 i = 0; i < yradius + 1; i++) + max = new TQ_UINT8* [layerSize.width() + 2 * xradius]; + buf = new TQ_UINT8* [yradius + 1]; + for (TQ_INT32 i = 0; i < yradius + 1; i++) { - buf[i] = new Q_UINT8[layerSize.width()]; + buf[i] = new TQ_UINT8[layerSize.width()]; } - Q_UINT8* buffer = new Q_UINT8[ ( layerSize.width() + 2 * xradius ) * ( yradius + 1 ) ]; - for (Q_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) + TQ_UINT8* buffer = new TQ_UINT8[ ( layerSize.width() + 2 * xradius ) * ( yradius + 1 ) ]; + for (TQ_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) { if (i < xradius) max[i] = buffer; @@ -824,16 +824,16 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) else max[i] = &buffer[(yradius + 1) * (layerSize.width() + xradius - 1)]; - for (Q_INT32 j = 0; j < xradius + 1; j++) + for (TQ_INT32 j = 0; j < xradius + 1; j++) max[i][j] = 0; } /* offset the max pointer by xradius so the range of the array is [-xradius] to [region->w + xradius] */ max += xradius; - Q_UINT8* out = new Q_UINT8[ layerSize.width() ]; // holds the new scan line we are computing + TQ_UINT8* out = new TQ_UINT8[ layerSize.width() ]; // holds the new scan line we are computing - Q_INT32* circ = new Q_INT32[ 2 * xradius + 1 ]; // holds the y coords of the filter's mask + TQ_INT32* circ = new TQ_INT32[ 2 * xradius + 1 ]; // holds the y coords of the filter's tqmask computeBorder (circ, xradius, yradius); /* offset the circ pointer by xradius so the range of the array @@ -841,39 +841,39 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) circ += xradius; memset (buf[0], 0, layerSize.width()); - for (Q_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image + for (TQ_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image { selection->readBytes(buf[i + 1], layerSize.x(), layerSize.y() + i, layerSize.width(), 1); } - for (Q_INT32 x = 0; x < layerSize.width() ; x++) // set up max for top of image + for (TQ_INT32 x = 0; x < layerSize.width() ; x++) // set up max for top of image { max[x][0] = 0; // buf[0][x] is always 0 max[x][1] = buf[1][x]; // MAX (buf[1][x], max[x][0]) always = buf[1][x] - for (Q_INT32 j = 2; j < yradius + 1; j++) + for (TQ_INT32 j = 2; j < yradius + 1; j++) { max[x][j] = MAX(buf[j][x], max[x][j-1]); } } - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { rotatePointers (buf, yradius + 1); if (y < layerSize.height() - (yradius)) selection->readBytes(buf[yradius], layerSize.x(), layerSize.y() + y + yradius, layerSize.width(), 1); else memset (buf[yradius], 0, layerSize.width()); - for (Q_INT32 x = 0; x < layerSize.width(); x++) /* update max array */ + for (TQ_INT32 x = 0; x < layerSize.width(); x++) /* update max array */ { - for (Q_INT32 i = yradius; i > 0; i--) + for (TQ_INT32 i = yradius; i > 0; i--) { max[x][i] = MAX (MAX (max[x][i - 1], buf[i - 1][x]), buf[i][x]); } max[x][0] = buf[0][x]; } - Q_INT32 last_max = max[0][circ[-1]]; - Q_INT32 last_index = 1; - for (Q_INT32 x = 0; x < layerSize.width(); x++) /* render scan line */ + TQ_INT32 last_max = max[0][circ[-1]]; + TQ_INT32 last_index = 1; + for (TQ_INT32 x = 0; x < layerSize.width(); x++) /* render scan line */ { last_index--; if (last_index >= 0) @@ -883,7 +883,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) else { last_max = 0; - for (Q_INT32 i = xradius; i >= 0; i--) + for (TQ_INT32 i = xradius; i >= 0; i--) if (last_max < max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -896,7 +896,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) { last_index = xradius; last_max = max[x + xradius][circ[xradius]]; - for (Q_INT32 i = xradius - 1; i >= -xradius; i--) + for (TQ_INT32 i = xradius - 1; i >= -xradius; i--) if (last_max < max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -914,7 +914,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) delete[] circ; delete[] buffer; delete[] max; - for (Q_INT32 i = 0; i < yradius + 1; i++) + for (TQ_INT32 i = 0; i < yradius + 1; i++) delete[] buf[i]; delete[] buf; delete[] out; @@ -927,7 +927,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) } } -void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lock) +void KisSelectionManager::shrink (TQ_INT32 xradius, TQ_INT32 yradius, bool edge_lock) { KisImageSP img = m_parent->currentImg(); @@ -940,7 +940,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); /* pretty much the same as fatten_region only different blame all bugs in this function on jaycox@gimp.org @@ -949,29 +949,29 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo we are passed are identical to the edge pixels. If edge_lock is false, we assume that pixels outside the region are 0 */ - Q_UINT8 **buf; // caches the the region's pixels - Q_UINT8 **max; // caches the smallest values for each column - Q_INT32 last_max, last_index; + TQ_UINT8 **buf; // caches the the region's pixels + TQ_UINT8 **max; // caches the smallest values for each column + TQ_INT32 last_max, last_index; if (xradius <= 0 || yradius <= 0) return; - max = new Q_UINT8* [layerSize.width() + 2 * xradius]; - buf = new Q_UINT8* [yradius + 1]; - for (Q_INT32 i = 0; i < yradius + 1; i++) + max = new TQ_UINT8* [layerSize.width() + 2 * xradius]; + buf = new TQ_UINT8* [yradius + 1]; + for (TQ_INT32 i = 0; i < yradius + 1; i++) { - buf[i] = new Q_UINT8[layerSize.width()]; + buf[i] = new TQ_UINT8[layerSize.width()]; } - Q_INT32 buffer_size = (layerSize.width() + 2 * xradius + 1) * (yradius + 1); - Q_UINT8* buffer = new Q_UINT8[buffer_size]; + TQ_INT32 buffer_size = (layerSize.width() + 2 * xradius + 1) * (yradius + 1); + TQ_UINT8* buffer = new TQ_UINT8[buffer_size]; if (edge_lock) memset(buffer, 255, buffer_size); else memset(buffer, 0, buffer_size); - for (Q_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) + for (TQ_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) { if (i < xradius) if (edge_lock) @@ -987,21 +987,21 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo max[i] = &buffer[(yradius + 1) * (layerSize.width() + xradius)]; } if (!edge_lock) - for (Q_INT32 j = 0 ; j < xradius + 1; j++) max[0][j] = 0; + for (TQ_INT32 j = 0 ; j < xradius + 1; j++) max[0][j] = 0; // offset the max pointer by xradius so the range of the array is [-xradius] to [region->w + xradius] max += xradius; - Q_UINT8* out = new Q_UINT8[layerSize.width()]; // holds the new scan line we are computing + TQ_UINT8* out = new TQ_UINT8[layerSize.width()]; // holds the new scan line we are computing - Q_INT32* circ = new Q_INT32[2 * xradius + 1]; // holds the y coords of the filter's mask + TQ_INT32* circ = new TQ_INT32[2 * xradius + 1]; // holds the y coords of the filter's tqmask computeBorder (circ, xradius, yradius); // offset the circ pointer by xradius so the range of the array is [-xradius] to [xradius] circ += xradius; - for (Q_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image + for (TQ_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image selection->readBytes(buf[i + 1], layerSize.x(), layerSize.y() + i, layerSize.width(), 1); if (edge_lock) @@ -1010,14 +1010,14 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo memset (buf[0], 0, layerSize.width()); - for (Q_INT32 x = 0; x < layerSize.width(); x++) // set up max for top of image + for (TQ_INT32 x = 0; x < layerSize.width(); x++) // set up max for top of image { max[x][0] = buf[0][x]; - for (Q_INT32 j = 1; j < yradius + 1; j++) + for (TQ_INT32 j = 1; j < yradius + 1; j++) max[x][j] = MIN(buf[j][x], max[x][j-1]); } - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { rotatePointers (buf, yradius + 1); if (y < layerSize.height() - yradius) @@ -1027,9 +1027,9 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo else memset (buf[yradius], 0, layerSize.width()); - for (Q_INT32 x = 0 ; x < layerSize.width(); x++) // update max array + for (TQ_INT32 x = 0 ; x < layerSize.width(); x++) // update max array { - for (Q_INT32 i = yradius; i > 0; i--) + for (TQ_INT32 i = yradius; i > 0; i--) { max[x][i] = MIN (MIN (max[x][i - 1], buf[i - 1][x]), buf[i][x]); } @@ -1038,7 +1038,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo last_max = max[0][circ[-1]]; last_index = 0; - for (Q_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line + for (TQ_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line { last_index--; if (last_index >= 0) @@ -1048,7 +1048,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo else { last_max = 255; - for (Q_INT32 i = xradius; i >= 0; i--) + for (TQ_INT32 i = xradius; i >= 0; i--) if (last_max > max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -1061,7 +1061,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo { last_index = xradius; last_max = max[x + xradius][circ[xradius]]; - for (Q_INT32 i = xradius - 1; i >= -xradius; i--) + for (TQ_INT32 i = xradius - 1; i >= -xradius; i--) if (last_max > max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -1081,7 +1081,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo delete[] circ; delete[] buffer; delete[] max; - for (Q_INT32 i = 0; i < yradius + 1; i++) + for (TQ_INT32 i = 0; i < yradius + 1; i++) delete buf[i]; delete[] buf; delete[] out; @@ -1090,7 +1090,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo dev->emitSelectionChanged(); } -//Simple convolution filter to smooth a mask (1bpp) +//Simple convolution filter to smooth a tqmask (1bpp) void KisSelectionManager::smooth() { @@ -1104,15 +1104,15 @@ void KisSelectionManager::smooth() KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); - Q_UINT8 *buf[3]; + TQ_UINT8 *buf[3]; - Q_INT32 width = layerSize.width(); + TQ_INT32 width = layerSize.width(); - for (Q_INT32 i = 0; i < 3; i++) buf[i] = new Q_UINT8[width + 2]; + for (TQ_INT32 i = 0; i < 3; i++) buf[i] = new TQ_UINT8[width + 2]; - Q_UINT8* out = new Q_UINT8[width]; + TQ_UINT8* out = new TQ_UINT8[width]; // load top of image selection->readBytes(buf[0] + 1, layerSize.x(), layerSize.y(), width, 1); @@ -1122,7 +1122,7 @@ void KisSelectionManager::smooth() memcpy (buf[1], buf[0], width + 2); - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { if (y + 1 < layerSize.height()) { @@ -1136,9 +1136,9 @@ void KisSelectionManager::smooth() memcpy (buf[2], buf[1], width + 2); } - for (Q_INT32 x = 0 ; x < width; x++) + for (TQ_INT32 x = 0 ; x < width; x++) { - Q_INT32 value = (buf[0][x] + buf[0][x+1] + buf[0][x+2] + + TQ_INT32 value = (buf[0][x] + buf[0][x+1] + buf[0][x+2] + buf[1][x] + buf[2][x+1] + buf[1][x+2] + buf[2][x] + buf[1][x+1] + buf[2][x+2]); @@ -1150,7 +1150,7 @@ void KisSelectionManager::smooth() rotatePointers (buf, 3); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] buf[i]; delete[] out; @@ -1159,7 +1159,7 @@ void KisSelectionManager::smooth() dev->emitSelectionChanged(); } -// Erode (radius 1 pixel) a mask (1bpp) +// Erode (radius 1 pixel) a tqmask (1bpp) void KisSelectionManager::erode() { @@ -1173,17 +1173,17 @@ void KisSelectionManager::erode() KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); - Q_UINT8* buf[3]; + TQ_UINT8* buf[3]; - Q_INT32 width = layerSize.width(); + TQ_INT32 width = layerSize.width(); - for (Q_INT32 i = 0; i < 3; i++) - buf[i] = new Q_UINT8[width + 2]; + for (TQ_INT32 i = 0; i < 3; i++) + buf[i] = new TQ_UINT8[width + 2]; - Q_UINT8* out = new Q_UINT8[width]; + TQ_UINT8* out = new TQ_UINT8[width]; // load top of image selection->readBytes(buf[0] + 1, layerSize.x(), layerSize.y(), width, 1); @@ -1193,7 +1193,7 @@ void KisSelectionManager::erode() memcpy (buf[1], buf[0], width + 2); - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { if (y + 1 < layerSize.height()) { @@ -1207,9 +1207,9 @@ void KisSelectionManager::erode() memcpy (buf[2], buf[1], width + 2); } - for (Q_INT32 x = 0 ; x < width; x++) + for (TQ_INT32 x = 0 ; x < width; x++) { - Q_INT32 min = 255; + TQ_INT32 min = 255; if (buf[0][x+1] < min) min = buf[0][x+1]; if (buf[1][x] < min) min = buf[1][x]; @@ -1225,7 +1225,7 @@ void KisSelectionManager::erode() rotatePointers (buf, 3); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] buf[i]; delete[] out; @@ -1234,7 +1234,7 @@ void KisSelectionManager::erode() dev->emitSelectionChanged(); } -// dilate (radius 1 pixel) a mask (1bpp) +// dilate (radius 1 pixel) a tqmask (1bpp) void KisSelectionManager::dilate() { @@ -1248,16 +1248,16 @@ void KisSelectionManager::dilate() KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); - Q_UINT8* buf[3]; + TQ_UINT8* buf[3]; - Q_INT32 width = layerSize.width(); + TQ_INT32 width = layerSize.width(); - for (Q_INT32 i = 0; i < 3; i++) - buf[i] = new Q_UINT8[width + 2]; + for (TQ_INT32 i = 0; i < 3; i++) + buf[i] = new TQ_UINT8[width + 2]; - Q_UINT8* out = new Q_UINT8[width]; + TQ_UINT8* out = new TQ_UINT8[width]; // load top of image selection->readBytes(buf[0] + 1, layerSize.x(), layerSize.y(), width, 1); @@ -1267,7 +1267,7 @@ void KisSelectionManager::dilate() memcpy (buf[1], buf[0], width + 2); - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { if (y + 1 < layerSize.height()) { @@ -1281,9 +1281,9 @@ void KisSelectionManager::dilate() memcpy (buf[2], buf[1], width + 2); } - for (Q_INT32 x = 0 ; x < width; x++) + for (TQ_INT32 x = 0 ; x < width; x++) { - Q_INT32 max = 0; + TQ_INT32 max = 0; if (buf[0][x+1] > max) max = buf[0][x+1]; if (buf[1][x] > max) max = buf[1][x]; @@ -1299,7 +1299,7 @@ void KisSelectionManager::dilate() rotatePointers (buf, 3); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] buf[i]; delete[] out; @@ -1308,7 +1308,7 @@ void KisSelectionManager::dilate() dev->emitSelectionChanged(); } -void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) +void KisSelectionManager::border(TQ_INT32 xradius, TQ_INT32 yradius) { KisImageSP img = m_parent->currentImg(); if (!img) return; @@ -1320,24 +1320,24 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); /* This function has no bugs, but if you imagine some you can blame them on jaycox@gimp.org */ - Q_UINT8 *buf[3]; - Q_UINT8 **density; - Q_UINT8 **transition; + TQ_UINT8 *buf[3]; + TQ_UINT8 **density; + TQ_UINT8 **transition; if (xradius == 1 && yradius == 1) // optimize this case specifically { - Q_UINT8* source[3]; + TQ_UINT8* source[3]; - for (Q_INT32 i = 0; i < 3; i++) - source[i] = new Q_UINT8[layerSize.width()]; + for (TQ_INT32 i = 0; i < 3; i++) + source[i] = new TQ_UINT8[layerSize.width()]; - Q_UINT8* transition = new Q_UINT8[layerSize.width()]; + TQ_UINT8* transition = new TQ_UINT8[layerSize.width()]; selection->readBytes(source[0], layerSize.x(), layerSize.y(), layerSize.width(), 1); memcpy (source[1], source[0], layerSize.width()); @@ -1349,7 +1349,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) computeTransition (transition, source, layerSize.width()); selection->writeBytes(transition, layerSize.x(), layerSize.y(), layerSize.width(), 1); - for (Q_INT32 y = 1; y < layerSize.height(); y++) + for (TQ_INT32 y = 1; y < layerSize.height(); y++) { rotatePointers (source, 3); if (y + 1 < layerSize.height()) @@ -1360,41 +1360,41 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) selection->writeBytes(transition, layerSize.x(), layerSize.y() + y, layerSize.width(), 1); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] source[i]; delete[] transition; return; } - Q_INT32* max = new Q_INT32[layerSize.width() + 2 * xradius]; - for (Q_INT32 i = 0; i < (layerSize.width() + 2 * xradius); i++) + TQ_INT32* max = new TQ_INT32[layerSize.width() + 2 * xradius]; + for (TQ_INT32 i = 0; i < (layerSize.width() + 2 * xradius); i++) max[i] = yradius + 2; max += xradius; - for (Q_INT32 i = 0; i < 3; i++) - buf[i] = new Q_UINT8[layerSize.width()]; + for (TQ_INT32 i = 0; i < 3; i++) + buf[i] = new TQ_UINT8[layerSize.width()]; - transition = new Q_UINT8*[yradius + 1]; - for (Q_INT32 i = 0; i < yradius + 1; i++) + transition = new TQ_UINT8*[yradius + 1]; + for (TQ_INT32 i = 0; i < yradius + 1; i++) { - transition[i] = new Q_UINT8[layerSize.width() + 2 * xradius]; + transition[i] = new TQ_UINT8[layerSize.width() + 2 * xradius]; memset(transition[i], 0, layerSize.width() + 2 * xradius); transition[i] += xradius; } - Q_UINT8* out = new Q_UINT8[layerSize.width()]; - density = new Q_UINT8*[2 * xradius + 1]; + TQ_UINT8* out = new TQ_UINT8[layerSize.width()]; + density = new TQ_UINT8*[2 * xradius + 1]; density += xradius; - for (Q_INT32 x = 0; x < (xradius + 1); x++) // allocate density[][] + for (TQ_INT32 x = 0; x < (xradius + 1); x++) // allocate density[][] { - density[ x] = new Q_UINT8[2 * yradius + 1]; + density[ x] = new TQ_UINT8[2 * yradius + 1]; density[ x] += yradius; density[-x] = density[x]; } - for (Q_INT32 x = 0; x < (xradius + 1); x++) // compute density[][] + for (TQ_INT32 x = 0; x < (xradius + 1); x++) // compute density[][] { double tmpx, tmpy, dist; - Q_UINT8 a; + TQ_UINT8 a; if (x > 0) tmpx = x - 0.5; @@ -1403,7 +1403,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) else tmpx = 0.0; - for (Q_INT32 y = 0; y < (yradius + 1); y++) + for (TQ_INT32 y = 0; y < (yradius + 1); y++) { if (y > 0) tmpy = y - 0.5; @@ -1414,7 +1414,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) dist = ((tmpy * tmpy) / (yradius * yradius) + (tmpx * tmpx) / (xradius * xradius)); if (dist < 1.0) - a = 255 * (Q_UINT8)(1.0 - sqrt (dist)); + a = 255 * (TQ_UINT8)(1.0 - sqrt (dist)); else a = 0; density[ x][ y] = a; @@ -1431,23 +1431,23 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) memcpy (buf[2], buf[1], layerSize.width()); computeTransition (transition[1], buf, layerSize.width()); - for (Q_INT32 y = 1; y < yradius && y + 1 < layerSize.height(); y++) // set up top of image + for (TQ_INT32 y = 1; y < yradius && y + 1 < layerSize.height(); y++) // set up top of image { rotatePointers (buf, 3); selection->readBytes(buf[2], layerSize.x(), layerSize.y() + y + 1, layerSize.width(), 1); computeTransition (transition[y + 1], buf, layerSize.width()); } - for (Q_INT32 x = 0; x < layerSize.width(); x++) // set up max[] for top of image + for (TQ_INT32 x = 0; x < layerSize.width(); x++) // set up max[] for top of image { max[x] = -(yradius + 7); - for (Q_INT32 j = 1; j < yradius + 1; j++) + for (TQ_INT32 j = 1; j < yradius + 1; j++) if (transition[j][x]) { max[x] = j; break; } } - for (Q_INT32 y = 0; y < layerSize.height(); y++) // main calculation loop + for (TQ_INT32 y = 0; y < layerSize.height(); y++) // main calculation loop { rotatePointers (buf, 3); rotatePointers (transition, yradius + 1); @@ -1459,7 +1459,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) else memcpy (transition[yradius], transition[yradius - 1], layerSize.width()); - for (Q_INT32 x = 0; x < layerSize.width(); x++) // update max array + for (TQ_INT32 x = 0; x < layerSize.width(); x++) // update max array { if (max[x] < 1) { @@ -1483,15 +1483,15 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) if (max[x] < -yradius - 1) max[x] = -yradius - 1; } - Q_UINT8 last_max = max[0][density[-1]]; - Q_INT32 last_index = 1; - for (Q_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line + TQ_UINT8 last_max = max[0][density[-1]]; + TQ_INT32 last_index = 1; + for (TQ_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line { last_index--; if (last_index >= 0) { last_max = 0; - for (Q_INT32 i = xradius; i >= 0; i--) + for (TQ_INT32 i = xradius; i >= 0; i--) if (max[x + i] <= yradius && max[x + i] >= -yradius && density[i][max[x+i]] > last_max) { last_max = density[i][max[x + i]]; @@ -1502,7 +1502,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) else { last_max = 0; - for (Q_INT32 i = xradius; i >= -xradius; i--) + for (TQ_INT32 i = xradius; i >= -xradius; i--) if (max[x + i] <= yradius && max[x + i] >= -yradius && density[i][max[x + i]] > last_max) { last_max = density[i][max[x + i]]; @@ -1512,7 +1512,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) } if (last_max == 0) { - Q_INT32 i; + TQ_INT32 i; for (i = x + 1; i < layerSize.width(); i++) { if (max[i] >= -yradius) @@ -1531,20 +1531,20 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) } delete [] out; - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete buf[i]; max -= xradius; delete[] max; - for (Q_INT32 i = 0; i < yradius + 1; i++) + for (TQ_INT32 i = 0; i < yradius + 1; i++) { transition[i] -= xradius; delete transition[i]; } delete[] transition; - for (Q_INT32 i = 0; i < xradius + 1 ; i++) + for (TQ_INT32 i = 0; i < xradius + 1 ; i++) { density[i] -= yradius; delete density[i]; @@ -1558,11 +1558,11 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) #define RINT(x) floor ((x) + 0.5) -void KisSelectionManager::computeBorder (Q_INT32 *circ, Q_INT32 xradius, Q_INT32 yradius) +void KisSelectionManager::computeBorder (TQ_INT32 *circ, TQ_INT32 xradius, TQ_INT32 yradius) { Q_ASSERT(xradius != 0); - Q_INT32 i; - Q_INT32 diameter = xradius * 2 + 1; + TQ_INT32 i; + TQ_INT32 diameter = xradius * 2 + 1; double tmp; for (i = 0; i < diameter; i++) @@ -1574,14 +1574,14 @@ void KisSelectionManager::computeBorder (Q_INT32 *circ, Q_INT32 xradius, Q_INT else tmp = 0.0; - circ[i] = (Q_INT32) RINT (yradius / (double) xradius * sqrt (xradius * xradius - tmp * tmp)); + circ[i] = (TQ_INT32) RINT (yradius / (double) xradius * sqrt (xradius * xradius - tmp * tmp)); } } -void KisSelectionManager::rotatePointers (Q_UINT8 **p, Q_UINT32 n) +void KisSelectionManager::rotatePointers (TQ_UINT8 **p, TQ_UINT32 n) { - Q_UINT32 i; - Q_UINT8 *tmp; + TQ_UINT32 i; + TQ_UINT8 *tmp; tmp = p[0]; @@ -1590,9 +1590,9 @@ void KisSelectionManager::rotatePointers (Q_UINT8 **p, Q_UINT32 n) p[i] = tmp; } -void KisSelectionManager::computeTransition (Q_UINT8* transition, Q_UINT8** buf, Q_INT32 width) +void KisSelectionManager::computeTransition (TQ_UINT8* transition, TQ_UINT8** buf, TQ_INT32 width) { - Q_INT32 x = 0; + TQ_INT32 x = 0; if (width == 1) { @@ -1613,7 +1613,7 @@ void KisSelectionManager::computeTransition (Q_UINT8* transition, Q_UINT8** buf, } else transition[x] = 0; - for (Q_INT32 x = 1; x < width - 1; x++) + for (TQ_INT32 x = 1; x < width - 1; x++) { if (buf[1][x] >= 128) { diff --git a/krita/ui/kis_selection_manager.h b/krita/ui/kis_selection_manager.h index 7e18a0d9..fb33218e 100644 --- a/krita/ui/kis_selection_manager.h +++ b/krita/ui/kis_selection_manager.h @@ -18,8 +18,8 @@ #ifndef KIS_SELECTION_MANAGER_ #define KIS_SELECTION_MANAGER_ -#include "qobject.h" -#include "qptrlist.h" +#include "tqobject.h" +#include "tqptrlist.h" #include "kis_image.h" #include @@ -33,13 +33,14 @@ class KisClipboard; * The selection manager is responsible selections * and the clipboard. */ -class KRITACORE_EXPORT KisSelectionManager : public QObject { +class KRITACORE_EXPORT KisSelectionManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisSelectionManager(KisView * parent, KisDoc * doc); + KisSelectionManager(KisView * tqparent, KisDoc * doc); virtual ~KisSelectionManager(); void setup(KActionCollection * collection); @@ -84,20 +85,20 @@ public slots: void toggleDisplaySelection(); public: - void grow (Q_INT32 xradius, Q_INT32 yradius); - void shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lock); - void border(Q_INT32 xradius, Q_INT32 yradius); + void grow (TQ_INT32 xradius, TQ_INT32 yradius); + void shrink (TQ_INT32 xradius, TQ_INT32 yradius, bool edge_lock); + void border(TQ_INT32 xradius, TQ_INT32 yradius); // the following functions are needed for the siox tool // they might be also usefull on its own void erode(); void dilate(); private: - void fill(const KisColor& color, bool fillWithPattern, const QString& transactionText); + void fill(const KisColor& color, bool fillWithPattern, const TQString& transactionText); - void computeBorder (Q_INT32 *circ, Q_INT32 xradius, Q_INT32 yradius); - inline void rotatePointers (Q_UINT8 **p, Q_UINT32 n); - void computeTransition (Q_UINT8* transition, Q_UINT8** buf, Q_INT32 width); + void computeBorder (TQ_INT32 *circ, TQ_INT32 xradius, TQ_INT32 yradius); + inline void rotatePointers (TQ_UINT8 **p, TQ_UINT32 n); + void computeTransition (TQ_UINT8* transition, TQ_UINT8** buf, TQ_INT32 width); KisView * m_parent; KisDoc * m_doc; @@ -129,7 +130,7 @@ private: KAction *m_fillPattern; KToggleAction *m_toggleDisplaySelection; - QPtrList m_pluginActions; + TQPtrList m_pluginActions; }; diff --git a/krita/ui/kis_selection_options.cc b/krita/ui/kis_selection_options.cc index 7d8e62cb..f94ff17f 100644 --- a/krita/ui/kis_selection_options.cc +++ b/krita/ui/kis_selection_options.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include -#include +#include #include "kis_canvas_controller.h" #include "kis_canvas_subject.h" @@ -32,17 +32,17 @@ #include "kis_selection.h" #include "kis_paint_device.h" -KisSelectionOptions::KisSelectionOptions(QWidget *parent, KisCanvasSubject * subject) - : super(parent), +KisSelectionOptions::KisSelectionOptions(TQWidget *tqparent, KisCanvasSubject * subject) + : super(tqparent), m_subject(subject) { m_page = new WdgSelectionOptions(this); Q_CHECK_PTR(m_page); - QVBoxLayout * l = new QVBoxLayout(this); + TQVBoxLayout * l = new TQVBoxLayout(this); l->addWidget(m_page); - connect(m_page->cmbAction, SIGNAL(activated(int)), this, SIGNAL(actionChanged(int))); + connect(m_page->cmbAction, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(actionChanged(int))); } KisSelectionOptions::~KisSelectionOptions() diff --git a/krita/ui/kis_selection_options.h b/krita/ui/kis_selection_options.h index 7b613410..e8168d04 100644 --- a/krita/ui/kis_selection_options.h +++ b/krita/ui/kis_selection_options.h @@ -19,7 +19,7 @@ #ifndef __KIS_SELECTION_OPTIONS_H__ #define __KIS_SELECTION_OPTIONS_H__ -#include +#include #include "koffice_export.h" @@ -28,15 +28,16 @@ class WdgSelectionOptions; /** */ -class KRITAUI_EXPORT KisSelectionOptions : public QWidget +class KRITAUI_EXPORT KisSelectionOptions : public TQWidget { Q_OBJECT + TQ_OBJECT - typedef QWidget super; + typedef TQWidget super; public: - KisSelectionOptions( QWidget *parent, KisCanvasSubject * subject); + KisSelectionOptions( TQWidget *tqparent, KisCanvasSubject * subject); virtual ~KisSelectionOptions(); int action(); diff --git a/krita/ui/kis_text_brush.cc b/krita/ui/kis_text_brush.cc index 6285e503..ef376373 100644 --- a/krita/ui/kis_text_brush.cc +++ b/krita/ui/kis_text_brush.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -29,27 +29,27 @@ void KisTextBrushResource::updateBrush() { - QFontMetrics metric(m_font); + TQFontMetrics metric(m_font); int w = metric.width(m_txt); int h = metric.height(); - QPixmap px(w,h); - QPainter p; + TQPixmap px(w,h); + TQPainter p; p.begin(&px); p.setFont( m_font ); - p.fillRect(0,0, w, h, Qt::white); - p.setPen(Qt::black); + p.fillRect(0,0, w, h, TQt::white); + p.setPen(TQt::black); p.drawText(0, metric.ascent(), m_txt ); p.end(); setImage(px.convertToImage ()); } -KisTextBrush::KisTextBrush(QWidget *parent, const char* name, const QString& caption) - : KisWdgTextBrush(parent, name), +KisTextBrush::KisTextBrush(TQWidget *tqparent, const char* name, const TQString& caption) + : KisWdgTextBrush(tqparent, name), m_textBrushResource(new KisTextBrushResource()) { setCaption(caption); - connect((QObject*)lineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(rebuildTextBrush())); - connect((QObject*)bnFont, SIGNAL(clicked()), this, SLOT(getFont())); + connect((TQObject*)lineEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(rebuildTextBrush())); + connect((TQObject*)bnFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(getFont())); m_font = font(); rebuildTextBrush(); } @@ -57,13 +57,13 @@ KisTextBrush::KisTextBrush(QWidget *parent, const char* name, const QString& cap void KisTextBrush::getFont() { - KFontDialog::getFont( m_font, false/*, QWidget* parent! */ ); + KFontDialog::getFont( m_font, false/*, TQWidget* tqparent! */ ); rebuildTextBrush(); } void KisTextBrush::rebuildTextBrush() { - lblFont->setText(QString(m_font.family() + ", %1").arg(m_font.pointSize())); + lblFont->setText(TQString(m_font.family() + ", %1").tqarg(m_font.pointSize())); lblFont->setFont(m_font); m_textBrushResource->setFont(m_font); m_textBrushResource->setText(lineEdit->text()); diff --git a/krita/ui/kis_text_brush.h b/krita/ui/kis_text_brush.h index c1cb07c6..3c8835de 100644 --- a/krita/ui/kis_text_brush.h +++ b/krita/ui/kis_text_brush.h @@ -29,7 +29,7 @@ class KisTextBrushResource : public KisBrush { setBrushType(MASK); } - KisTextBrushResource(const QString& txt, const QFont& font) : KisBrush("") + KisTextBrushResource(const TQString& txt, const TQFont& font) : KisBrush("") { setFont(font); setText(txt); @@ -38,19 +38,20 @@ class KisTextBrushResource : public KisBrush }; public: virtual bool load() { return false; }; - void setText(const QString& txt) { m_txt = txt; }; - void setFont(const QFont& font) { m_font = font; }; + void setText(const TQString& txt) { m_txt = txt; }; + void setFont(const TQFont& font) { m_font = font; }; void updateBrush(); private: - QFont m_font; - QString m_txt; + TQFont m_font; + TQString m_txt; }; class KisTextBrush : public KisWdgTextBrush { Q_OBJECT + TQ_OBJECT public: - KisTextBrush(QWidget *parent, const char* name, const QString& caption); + KisTextBrush(TQWidget *tqparent, const char* name, const TQString& caption); signals: void activatedResource(KisResource *r); @@ -61,7 +62,7 @@ private slots: private: KisTextBrushResource* m_textBrushResource; - QFont m_font; + TQFont m_font; }; diff --git a/krita/ui/kis_tool.cc b/krita/ui/kis_tool.cc index 7ea39e3c..5aee554b 100644 --- a/krita/ui/kis_tool.cc +++ b/krita/ui/kis_tool.cc @@ -16,10 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include -#include +#include #include #include @@ -31,11 +31,11 @@ class KisTool::KisToolPrivate { public: - QString uiname; - QLabel * optionWidget; + TQString uiname; + TQLabel * optionWidget; }; -KisTool::KisTool(const QString & name) +KisTool::KisTool(const TQString & name) { m_action = 0; m_ownAction = false; @@ -53,16 +53,16 @@ KisTool::~KisTool() delete d; } -QWidget* KisTool::createOptionWidget(QWidget* parent) +TQWidget* KisTool::createOptionWidget(TQWidget* tqparent) { - d->optionWidget = new QLabel(i18n("No options for %1.").arg(d->uiname), parent); + d->optionWidget = new TQLabel(i18n("No options for %1.").tqarg(d->uiname), tqparent); d->optionWidget->setCaption(d->uiname); - d->optionWidget->setAlignment(Qt::AlignCenter); + d->optionWidget->tqsetAlignment(TQt::AlignCenter); return d->optionWidget; } -QWidget* KisTool::optionWidget() +TQWidget* KisTool::optionWidget() { return d->optionWidget; } diff --git a/krita/ui/kis_tool.h b/krita/ui/kis_tool.h index 570ec343..c8f2d349 100644 --- a/krita/ui/kis_tool.h +++ b/krita/ui/kis_tool.h @@ -20,8 +20,8 @@ #ifndef KIS_TOOL_H_ #define KIS_TOOL_H_ -#include -#include +#include +#include #include #include @@ -29,11 +29,11 @@ #include "kis_shared_ptr_vector.h" #include "kis_canvas_observer.h" -class QCursor; -class QEvent; -class QKeyEvent; -class QRect; -class QWidget; +class TQCursor; +class TQEvent; +class TQKeyEvent; +class TQRect; +class TQWidget; class KActionCollection; class KRadioAction; class KDialog; @@ -47,7 +47,7 @@ class KisMoveEvent; class KisCanvasPainter; enum enumToolType { - TOOL_SHAPE = 0, // Geometric shapes like ellipses and lines + TOOL_SHAPE = 0, // Geometric tqshapes like ellipses and lines TOOL_FREEHAND = 1, // Freehand drawing tools TOOL_TRANSFORM = 2, // Tools that transform the layer TOOL_FILL = 3, // Tools that fill parts of the canvas @@ -56,19 +56,20 @@ enum enumToolType { }; -const Q_UINT8 NUMBER_OF_TOOLTYPES = 6; +const TQ_UINT8 NUMBER_OF_TOOLTYPES = 6; -class KisTool : public QObject, public KisCanvasObserver, public KShared { +class KisTool : public TQObject, public KisCanvasObserver, public KShared { Q_OBJECT + TQ_OBJECT public: - KisTool(const QString & name); + KisTool(const TQString & name); virtual ~KisTool(); public: virtual void paint(KisCanvasPainter& gc) = 0; - virtual void paint(KisCanvasPainter& gc, const QRect& rc) = 0; + virtual void paint(KisCanvasPainter& gc, const TQRect& rc) = 0; /** * This function is called after the creation of a tool to create the KAction corresponding @@ -85,20 +86,20 @@ public: virtual void move(KisMoveEvent *e) = 0; virtual void buttonRelease(KisButtonReleaseEvent *e) = 0; virtual void doubleClick(KisDoubleClickEvent *e) = 0; - virtual void keyPress(QKeyEvent *e) = 0; - virtual void keyRelease(QKeyEvent *e) = 0; + virtual void keyPress(TQKeyEvent *e) = 0; + virtual void keyRelease(TQKeyEvent *e) = 0; - virtual QCursor cursor() = 0; - virtual void setCursor(const QCursor& cursor) = 0; + virtual TQCursor cursor() = 0; + virtual void setCursor(const TQCursor& cursor) = 0; /** * This function is called to create the configuration widget of the tool. - * @param parent the parent of the widget + * @param tqparent the tqparent of the widget */ - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); /** * @return the current configuration widget. */ - virtual QWidget* optionWidget(); + virtual TQWidget* optionWidget(); KRadioAction *action() const { return m_action; } /** @@ -108,10 +109,10 @@ public: virtual bool wantsAutoScroll() const { return true; } // Methods for integration with karbon-style toolbox - virtual Q_UINT32 priority() { return 0; } + virtual TQ_UINT32 priority() { return 0; } virtual enumToolType toolType() { return TOOL_FREEHAND; } - virtual QString icon() { return m_action->icon(); } - virtual QString quickHelp() const { return ""; } + virtual TQString icon() { return m_action->icon(); } + virtual TQString quickHelp() const { return ""; } public slots: /** diff --git a/krita/ui/kis_tool_dummy.cc b/krita/ui/kis_tool_dummy.cc index 8cb12695..d8ac04e5 100644 --- a/krita/ui/kis_tool_dummy.cc +++ b/krita/ui/kis_tool_dummy.cc @@ -16,10 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include -#include +#include #include #include @@ -39,7 +39,7 @@ KisToolDummy::KisToolDummy() m_subject = 0; m_dragging = false; m_optionWidget = 0; - setCursor(QCursor::forbiddenCursor); + setCursor(TQCursor::forbiddenCursor); } KisToolDummy::~KisToolDummy() @@ -87,22 +87,22 @@ void KisToolDummy::setup(KActionCollection *collection) m_action = static_cast(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Dummy"), "tool_dummy", Qt::SHIFT+Qt::Key_H, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Dummy"), "tool_dummy", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT(activate()), collection, name()); m_action->setExclusiveGroup("tools"); m_ownAction = true; } } -QWidget* KisToolDummy::createOptionWidget(QWidget* parent) +TQWidget* KisToolDummy::createOptionWidget(TQWidget* tqparent) { - m_optionWidget = new QLabel(i18n("Layer is locked or invisible."), parent); + m_optionWidget = new TQLabel(i18n("Layer is locked or invisible."), tqparent); m_optionWidget->setCaption(i18n("No Active Tool")); - m_optionWidget->setAlignment(Qt::AlignCenter); + m_optionWidget->tqsetAlignment(TQt::AlignCenter); return m_optionWidget; } -QWidget* KisToolDummy::optionWidget() +TQWidget* KisToolDummy::optionWidget() { return m_optionWidget; } diff --git a/krita/ui/kis_tool_dummy.h b/krita/ui/kis_tool_dummy.h index 3eb57ac4..d10850e8 100644 --- a/krita/ui/kis_tool_dummy.h +++ b/krita/ui/kis_tool_dummy.h @@ -25,7 +25,7 @@ #include "kis_point.h" -class QLabel; +class TQLabel; class KisCanvasSubject; /** @@ -40,6 +40,7 @@ class KRITATOOL_EXPORT KisToolDummy : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolDummy(); @@ -52,15 +53,15 @@ public: virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); private: - QLabel * m_optionWidget; + TQLabel * m_optionWidget; KisCanvasSubject *m_subject; KisPoint m_dragPos; - Q_INT32 m_origScrollX; - Q_INT32 m_origScrollY; + TQ_INT32 m_origScrollX; + TQ_INT32 m_origScrollY; bool m_dragging; }; diff --git a/krita/ui/kis_tool_freehand.cc b/krita/ui/kis_tool_freehand.cc index 0909ad9b..d0d1e0fa 100644 --- a/krita/ui/kis_tool_freehand.cc +++ b/krita/ui/kis_tool_freehand.cc @@ -18,11 +18,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -47,7 +47,7 @@ #include "kis_boundary_painter.h" #include "kis_brush.h" -KisToolFreehand::KisToolFreehand(QString transactionText) +KisToolFreehand::KisToolFreehand(TQString transactionText) : super(transactionText), m_dragDist ( 0 ), m_transactionText(transactionText), @@ -79,7 +79,7 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) if (!m_currentImage || !m_currentImage->activeDevice()) return; - if (e->button() == QMouseEvent::LeftButton) { + if (e->button() == TQMouseEvent::LeftButton) { m_currentImage->activeDevice()->lock( true ); kdDebug() << ">>>>>>>>>>>>>>>>>>>Locking paint device\n"; @@ -87,7 +87,7 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) // People complain that they can't start brush strokes outside of the image boundaries. // This makes sense, especially when combined with BUG:132759, so commenting out the // next line makes sense. - //if (!m_currentImage->bounds().contains(e->pos().floorQPoint())) return; + //if (!m_currentImage->bounds().tqcontains(e->pos().floorTQPoint())) return; initPaint(e); paintAt(e->pos(), e->pressure(), e->xTilt(), e->yTilt()); @@ -97,11 +97,11 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) m_prevXTilt = e->xTilt(); m_prevYTilt = e->yTilt(); - QRect r = m_painter->dirtyRect(); + TQRect r = m_painter->dirtyRect(); if ( r.isValid() ) { m_dirtyRect = r; - r = QRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization + r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization if (!m_paintOnSelection) { m_currentImage->activeLayer()->setDirty(r); } @@ -116,7 +116,7 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) void KisToolFreehand::buttonRelease(KisButtonReleaseEvent* e) { - if (e->button() == QMouseEvent::LeftButton && m_mode == PAINT) { + if (e->button() == TQMouseEvent::LeftButton && m_mode == PAINT) { endPaint(); m_currentImage->activeDevice()->lock( false ); kdDebug() << ">>>>>>>>>>>>>>>>>>>UNLocking paint device\n"; @@ -136,7 +136,7 @@ void KisToolFreehand::move(KisMoveEvent *e) m_prevXTilt = e->xTilt(); m_prevYTilt = e->yTilt(); - QRect r = m_painter->dirtyRect(); + TQRect r = m_painter->dirtyRect(); if (r.isValid()) { m_dirtyRect |= r; @@ -146,7 +146,7 @@ void KisToolFreehand::move(KisMoveEvent *e) } else { // Just update the canvas - r = QRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization + r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization m_target->setDirty(r); m_subject->canvasController()->updateCanvas( r ); } @@ -182,12 +182,12 @@ void KisToolFreehand::initPaint(KisEvent *) // projection). KisLayer* l = layer->layer(); KisPaintLayer* pl = dynamic_cast(l); - if (l->parent() && (l->parent()->parent() == 0) - && (l->parent()->childCount() == 1) - && l->parent()->paintLayerInducesProjectionOptimization(pl)) { - // If there's a mask, device could've been the mask. The induce function + if (l->tqparent() && (l->tqparent()->tqparent() == 0) + && (l->tqparent()->childCount() == 1) + && l->tqparent()->paintLayerInducesProjectionOptimization(pl)) { + // If there's a tqmask, device could've been the tqmask. The induce function // should catch this, but better safe than sorry - l->parent()->resetProjection(pl->paintDevice()); + l->tqparent()->resetProjection(pl->paintDevice()); } m_target = new KisPaintDevice(m_currentImage->activeLayer(), @@ -255,9 +255,9 @@ void KisToolFreehand::endPaint() m_dirtyRect.width(), m_dirtyRect.height()); KisLayerSupportsIndirectPainting* layer = - dynamic_cast(m_source->parentLayer()); + dynamic_cast(m_source->tqparentLayer()); layer->setTemporaryTarget(0); - m_source->parentLayer()->setDirty(m_dirtyRect); + m_source->tqparentLayer()->setDirty(m_dirtyRect); if (m_currentImage->undo()) { m_currentImage->undoAdapter()->addCommand(painter.endTransaction()); @@ -309,7 +309,7 @@ void KisToolFreehand::paintOutline(const KisPoint& point) { KisCanvasController *controller = m_subject->canvasController(); - if (currentImage() && !currentImage()->bounds().contains(point.floorQPoint())) { + if (currentImage() && !currentImage()->bounds().tqcontains(point.floorTQPoint())) { if (m_paintedOutline) { controller->kiscanvas()->update(); m_paintedOutline = false; @@ -318,20 +318,20 @@ void KisToolFreehand::paintOutline(const KisPoint& point) { } KisCanvas *canvas = controller->kiscanvas(); - canvas->repaint(); + canvas->tqrepaint(); KisBrush *brush = m_subject->currentBrush(); // There may not be a brush present, and we shouldn't crash in that case if (brush) { KisCanvasPainter gc(canvas); - QPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); KisPoint hotSpot = brush->hotSpot(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.setViewport(0, 0, static_cast(canvas->width() * m_subject->zoomFactor()), - static_cast(canvas->height() * m_subject->zoomFactor())); + gc.setViewport(0, 0, static_cast(canvas->width() * m_subject->zoomFactor()), + static_cast(canvas->height() * m_subject->zoomFactor())); gc.translate((- controller->horzValue()) / m_subject->zoomFactor(), (- controller->vertValue()) / m_subject->zoomFactor()); @@ -339,7 +339,7 @@ void KisToolFreehand::paintOutline(const KisPoint& point) { if (m_subject->currentPaintop().id() == "pen") { // Pen paints on whole pixels only. - topLeft = topLeft.roundQPoint(); + topLeft = topLeft.roundTQPoint(); } gc.translate(topLeft.x(), topLeft.y()); diff --git a/krita/ui/kis_tool_freehand.h b/krita/ui/kis_tool_freehand.h index 1d29a9b7..5480ab1e 100644 --- a/krita/ui/kis_tool_freehand.h +++ b/krita/ui/kis_tool_freehand.h @@ -34,10 +34,11 @@ class KisPaintLayer; class KRITACORE_EXPORT KisToolFreehand : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: - KisToolFreehand(const QString transactionText); + KisToolFreehand(const TQString transactionText); virtual ~KisToolFreehand(); virtual void update(KisCanvasSubject *subject); @@ -87,7 +88,7 @@ protected: KisLayerSP m_tempLayer; KisPaintDeviceSP m_source; - QString m_transactionText; + TQString m_transactionText; enumBrushMode m_mode; KisPainter *m_painter; diff --git a/krita/ui/kis_tool_manager.cc b/krita/ui/kis_tool_manager.cc index 66390740..21143472 100644 --- a/krita/ui/kis_tool_manager.cc +++ b/krita/ui/kis_tool_manager.cc @@ -32,8 +32,8 @@ #include "kis_input_device.h" -KisToolManager::KisToolManager(KisCanvasSubject * parent, KisCanvasController * controller) - : m_subject(parent), +KisToolManager::KisToolManager(KisCanvasSubject * tqparent, KisCanvasController * controller) + : m_subject(tqparent), m_controller(controller) { m_toolBox = 0; @@ -65,9 +65,9 @@ void KisToolManager::setUp(KoToolBox * toolbox, KoPaletteManager * paletteManage if (!m_dummyTool) m_dummyTool = KisToolDummyFactory().createTool(actionCollection); - QValueVector inputDevices = KisInputDevice::inputDevices(); + TQValueVector inputDevices = KisInputDevice::inputDevices(); - for (Q_UINT32 inputDevice = 0; inputDevice < inputDevices.count(); inputDevice++) { + for (TQ_UINT32 inputDevice = 0; inputDevice < inputDevices.count(); inputDevice++) { m_inputDeviceToolSetMap[inputDevices[inputDevice]] = KisToolRegistry::instance()->createTools(actionCollection, m_subject); } @@ -126,7 +126,7 @@ void KisToolManager::updateGUI() { Q_ASSERT(m_subject); if (m_subject == 0) { - // "Eek, no parent! + // "Eek, no tqparent! return; } @@ -194,7 +194,7 @@ void KisToolManager::setCurrentTool(KisTool *tool) if (!tool->optionWidget()) { tool->createOptionWidget(0); } - QWidget * w = tool->optionWidget(); + TQWidget * w = tool->optionWidget(); if (w) m_paletteManager->addWidget(w, krita::TOOL_OPTION_WIDGET, krita::CONTROL_PALETTE ); @@ -216,14 +216,14 @@ void KisToolManager::setCurrentTool(KisTool *tool) } -void KisToolManager::setCurrentTool( const QString & toolName ) +void KisToolManager::setCurrentTool( const TQString & toolName ) { setCurrentTool(findTool(toolName)); } KisTool * KisToolManager::currentTool() const { - InputDeviceToolMap::const_iterator it = m_inputDeviceToolMap.find(m_controller->currentInputDevice()); + InputDeviceToolMap::const_iterator it = m_inputDeviceToolMap.tqfind(m_controller->currentInputDevice()); if (it != m_inputDeviceToolMap.end()) { return (*it).second; @@ -235,14 +235,14 @@ KisTool * KisToolManager::currentTool() const void KisToolManager::setToolForInputDevice(KisInputDevice oldDevice, KisInputDevice newDevice) { - InputDeviceToolSetMap::iterator vit = m_inputDeviceToolSetMap.find(oldDevice); + InputDeviceToolSetMap::iterator vit = m_inputDeviceToolSetMap.tqfind(oldDevice); if (vit != m_inputDeviceToolSetMap.end()) { vKisTool& oldTools = (*vit).second; for (vKisTool::iterator it = oldTools.begin(); it != oldTools.end(); ++it) { KisTool *tool = *it; KAction *toolAction = tool->action(); - toolAction->disconnect(SIGNAL(activated()), tool, SLOT(activate())); + toolAction->disconnect(TQT_SIGNAL(activated()), tool, TQT_SLOT(activate())); } } KisTool *oldTool = currentTool(); @@ -253,7 +253,7 @@ void KisToolManager::setToolForInputDevice(KisInputDevice oldDevice, KisInputDev } - vit = m_inputDeviceToolSetMap.find(newDevice); + vit = m_inputDeviceToolSetMap.tqfind(newDevice); Q_ASSERT(vit != m_inputDeviceToolSetMap.end()); @@ -262,7 +262,7 @@ void KisToolManager::setToolForInputDevice(KisInputDevice oldDevice, KisInputDev for (vKisTool::iterator it = tools.begin(); it != tools.end(); ++it) { KisTool *tool = *it; KAction *toolAction = tool->action(); - connect(toolAction, SIGNAL(activated()), tool, SLOT(activate())); + connect(toolAction, TQT_SIGNAL(activated()), tool, TQT_SLOT(activate())); } } @@ -274,7 +274,7 @@ void KisToolManager::activateCurrentTool() } } -KisTool * KisToolManager::findTool(const QString &toolName, KisInputDevice inputDevice) const +KisTool * KisToolManager::findTool(const TQString &toolName, KisInputDevice inputDevice) const { if (inputDevice == KisInputDevice::unknown()) { inputDevice = m_controller->currentInputDevice(); @@ -282,7 +282,7 @@ KisTool * KisToolManager::findTool(const QString &toolName, KisInputDevice input KisTool *tool = 0; - InputDeviceToolSetMap::const_iterator vit = m_inputDeviceToolSetMap.find(inputDevice); + InputDeviceToolSetMap::const_iterator vit = m_inputDeviceToolSetMap.tqfind(inputDevice); Q_ASSERT(vit != m_inputDeviceToolSetMap.end()); diff --git a/krita/ui/kis_tool_manager.h b/krita/ui/kis_tool_manager.h index d56b16f9..8f04f680 100644 --- a/krita/ui/kis_tool_manager.h +++ b/krita/ui/kis_tool_manager.h @@ -20,7 +20,7 @@ #include -#include +#include #include "kis_tool_controller.h" #include "kis_global.h" @@ -40,13 +40,14 @@ class KoToolBox; * This class manages the activation and deactivation of tools for * each input device. */ -class KisToolManager : public QObject, public KisToolControllerInterface { +class KisToolManager : public TQObject, public KisToolControllerInterface { Q_OBJECT + TQ_OBJECT public: - KisToolManager(KisCanvasSubject * parent, KisCanvasController * controller); + KisToolManager(KisCanvasSubject * tqparent, KisCanvasController * controller); ~KisToolManager(); public: @@ -59,13 +60,13 @@ public: void updateGUI(); virtual void setCurrentTool(KisTool *tool); - virtual void setCurrentTool(const QString & toolName); + virtual void setCurrentTool(const TQString & toolName); virtual KisTool *currentTool() const; void setToolForInputDevice(KisInputDevice oldDevice, KisInputDevice newDevice); - KisTool *findTool(const QString &toolName, KisInputDevice inputDevice = KisInputDevice::unknown()) const; + KisTool *findTool(const TQString &toolName, KisInputDevice inputDevice = KisInputDevice::unknown()) const; void activateCurrentTool(); diff --git a/krita/ui/kis_tool_non_paint.cc b/krita/ui/kis_tool_non_paint.cc index efba4950..4adccc60 100644 --- a/krita/ui/kis_tool_non_paint.cc +++ b/krita/ui/kis_tool_non_paint.cc @@ -25,7 +25,7 @@ #include "kis_tool_controller.h" #include "kis_tool_non_paint.h" -KisToolNonPaint::KisToolNonPaint(const QString & UIName) +KisToolNonPaint::KisToolNonPaint(const TQString & UIName) : super(UIName) { m_subject = 0; @@ -44,7 +44,7 @@ void KisToolNonPaint::paint(KisCanvasPainter&) { } -void KisToolNonPaint::paint(KisCanvasPainter&, const QRect&) +void KisToolNonPaint::paint(KisCanvasPainter&, const TQRect&) { } @@ -68,20 +68,20 @@ void KisToolNonPaint::doubleClick(KisDoubleClickEvent *) { } -void KisToolNonPaint::keyPress(QKeyEvent *) +void KisToolNonPaint::keyPress(TQKeyEvent *) { } -void KisToolNonPaint::keyRelease(QKeyEvent *) +void KisToolNonPaint::keyRelease(TQKeyEvent *) { } -QCursor KisToolNonPaint::cursor() +TQCursor KisToolNonPaint::cursor() { return m_cursor; } -void KisToolNonPaint::setCursor(const QCursor& cursor) +void KisToolNonPaint::setCursor(const TQCursor& cursor) { m_cursor = cursor; diff --git a/krita/ui/kis_tool_non_paint.h b/krita/ui/kis_tool_non_paint.h index 21726627..0b618109 100644 --- a/krita/ui/kis_tool_non_paint.h +++ b/krita/ui/kis_tool_non_paint.h @@ -19,19 +19,19 @@ #ifndef KIS_TOOL_NON_PAINT_H_ #define KIS_TOOL_NON_PAINT_H_ -#include -#include -#include +#include +#include +#include #include "kis_global.h" #include "kis_types.h" #include "kis_tool.h" #include -class QEvent; -class QKeyEvent; -class QPaintEvent; -class QRect; +class TQEvent; +class TQKeyEvent; +class TQPaintEvent; +class TQRect; class KDialog; class KisCanvasSubject; @@ -39,10 +39,11 @@ class KisCanvasSubject; class KRITACORE_EXPORT KisToolNonPaint : public KisTool { Q_OBJECT + TQ_OBJECT typedef KisTool super; public: - KisToolNonPaint(const QString & UIName); + KisToolNonPaint(const TQString & UIName); virtual ~KisToolNonPaint(); // CanvasObserver @@ -52,17 +53,17 @@ public: // KisTool public: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); virtual void doubleClick(KisDoubleClickEvent *e); - virtual void keyPress(QKeyEvent *e); - virtual void keyRelease(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); + virtual void keyRelease(TQKeyEvent *e); - virtual QCursor cursor(); - virtual void setCursor(const QCursor& cursor); + virtual TQCursor cursor(); + virtual void setCursor(const TQCursor& cursor); virtual enumToolType toolType() { return TOOL_VIEW; } @@ -77,7 +78,7 @@ protected: KisCanvasSubject *m_subject; private: - QCursor m_cursor; + TQCursor m_cursor; }; #endif // KIS_TOOL_NON_PAINT_H_ diff --git a/krita/ui/kis_tool_paint.cc b/krita/ui/kis_tool_paint.cc index 25129a82..d8d19f36 100644 --- a/krita/ui/kis_tool_paint.cc +++ b/krita/ui/kis_tool_paint.cc @@ -16,13 +16,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,7 +42,7 @@ #include "kis_tool_controller.h" #include "kis_tool_paint.h" -KisToolPaint::KisToolPaint(const QString& UIName) +KisToolPaint::KisToolPaint(const TQString& UIName) : super(UIName) { m_subject = 0; @@ -75,7 +75,7 @@ void KisToolPaint::paint(KisCanvasPainter&) { } -void KisToolPaint::paint(KisCanvasPainter&, const QRect&) +void KisToolPaint::paint(KisCanvasPainter&, const TQRect&) { } @@ -107,34 +107,34 @@ void KisToolPaint::doubleClick(KisDoubleClickEvent *) { } -void KisToolPaint::keyPress(QKeyEvent *) +void KisToolPaint::keyPress(TQKeyEvent *) { } -void KisToolPaint::keyRelease(QKeyEvent *) +void KisToolPaint::keyRelease(TQKeyEvent *) { } -QWidget* KisToolPaint::createOptionWidget(QWidget* parent) +TQWidget* KisToolPaint::createOptionWidget(TQWidget* tqparent) { - m_optionWidget = new QWidget(parent); + m_optionWidget = new TQWidget(tqparent); m_optionWidget->setCaption(m_UIName); - m_lbOpacity = new QLabel(i18n("Opacity:"), m_optionWidget); + m_lbOpacity = new TQLabel(i18n("Opacity:"), m_optionWidget); m_slOpacity = new KisIntSpinbox( m_optionWidget, "int_m_optionwidget"); m_slOpacity->setRange( 0, 100); m_slOpacity->setValue(m_opacity / OPACITY_OPAQUE * 100); - connect(m_slOpacity, SIGNAL(valueChanged(int)), this, SLOT(slotSetOpacity(int))); + connect(m_slOpacity, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetOpacity(int))); - m_lbComposite = new QLabel(i18n("Mode:"), m_optionWidget); + m_lbComposite = new TQLabel(i18n("Mode:"), m_optionWidget); m_cmbComposite = new KisCmbComposite(m_optionWidget); - connect(m_cmbComposite, SIGNAL(activated(const KisCompositeOp&)), this, SLOT(slotSetCompositeMode(const KisCompositeOp&))); + connect(m_cmbComposite, TQT_SIGNAL(activated(const KisCompositeOp&)), this, TQT_SLOT(slotSetCompositeMode(const KisCompositeOp&))); - QVBoxLayout* verticalLayout = new QVBoxLayout(m_optionWidget); + TQVBoxLayout* verticalLayout = new TQVBoxLayout(m_optionWidget); verticalLayout->setMargin(0); verticalLayout->setSpacing(3); - m_optionWidgetLayout = new QGridLayout(verticalLayout, 2, 3, 6); + m_optionWidgetLayout = new TQGridLayout(verticalLayout, 2, 3, 6); m_optionWidgetLayout->addWidget(m_lbOpacity, 0, 0); m_optionWidgetLayout->addWidget(m_slOpacity, 0, 1); @@ -142,34 +142,34 @@ QWidget* KisToolPaint::createOptionWidget(QWidget* parent) m_optionWidgetLayout->addWidget(m_lbComposite, 1, 0); m_optionWidgetLayout->addWidget(m_cmbComposite, 1, 1); - verticalLayout->addItem(new QSpacerItem(0,0,QSizePolicy::Fixed,QSizePolicy::Expanding)); + verticalLayout->addItem(new TQSpacerItem(0,0,TQSizePolicy::Fixed,TQSizePolicy::Expanding)); if (!quickHelp().isEmpty()) { - QPushButton* push = new QPushButton(SmallIconSet( "help" ), "", m_optionWidget); - connect(push, SIGNAL(clicked()), this, SLOT(slotPopupQuickHelp())); + TQPushButton* push = new TQPushButton(SmallIconSet( "help" ), "", m_optionWidget); + connect(push, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPopupQuickHelp())); - QHBoxLayout* hLayout = new QHBoxLayout(m_optionWidget); + TQHBoxLayout* hLayout = new TQHBoxLayout(m_optionWidget); hLayout->addWidget(push); - hLayout->addItem(new QSpacerItem(0,0,QSizePolicy::Expanding,QSizePolicy::Fixed)); + hLayout->addItem(new TQSpacerItem(0,0,TQSizePolicy::Expanding,TQSizePolicy::Fixed)); verticalLayout->addLayout(hLayout); } return m_optionWidget; } -QWidget* KisToolPaint::optionWidget() +TQWidget* KisToolPaint::optionWidget() { return m_optionWidget; } -void KisToolPaint::addOptionWidgetLayout(QLayout *layout) +void KisToolPaint::addOptionWidgetLayout(TQLayout *tqlayout) { Q_ASSERT(m_optionWidget != 0); Q_ASSERT(m_optionWidgetLayout != 0); int rowCount = m_optionWidgetLayout->numRows(); - m_optionWidgetLayout->addMultiCellLayout(layout, rowCount, rowCount, 0, 1); + m_optionWidgetLayout->addMultiCellLayout(tqlayout, rowCount, rowCount, 0, 1); } -void KisToolPaint::addOptionWidgetOption(QWidget *control, QWidget *label) +void KisToolPaint::addOptionWidgetOption(TQWidget *control, TQWidget *label) { Q_ASSERT(m_optionWidget != 0); Q_ASSERT(m_optionWidgetLayout != 0); @@ -192,12 +192,12 @@ void KisToolPaint::slotSetCompositeMode(const KisCompositeOp& compositeOp) m_compositeOp = compositeOp; } -QCursor KisToolPaint::cursor() +TQCursor KisToolPaint::cursor() { return m_cursor; } -void KisToolPaint::setCursor(const QCursor& cursor) +void KisToolPaint::setCursor(const TQCursor& cursor) { m_cursor = cursor; @@ -244,7 +244,7 @@ void KisToolPaint::updateCompositeOpComboBox() KisCompositeOpList compositeOps = device->colorSpace()->userVisiblecompositeOps(); m_cmbComposite->setCompositeOpList(compositeOps); - if (compositeOps.find(m_compositeOp) == compositeOps.end()) { + if (compositeOps.tqfind(m_compositeOp) == compositeOps.end()) { m_compositeOp = COMPOSITE_OVER; } m_cmbComposite->setCurrentItem(m_compositeOp); @@ -254,7 +254,7 @@ void KisToolPaint::updateCompositeOpComboBox() } void KisToolPaint::slotPopupQuickHelp() { - QWhatsThis::display(quickHelp()); + TQWhatsThis::display(quickHelp()); } #include "kis_tool_paint.moc" diff --git a/krita/ui/kis_tool_paint.h b/krita/ui/kis_tool_paint.h index 9aae6516..6e1406b5 100644 --- a/krita/ui/kis_tool_paint.h +++ b/krita/ui/kis_tool_paint.h @@ -19,24 +19,24 @@ #ifndef KIS_TOOL_PAINT_H_ #define KIS_TOOL_PAINT_H_ -#include -#include +#include +#include #include #include "kis_tool.h" #include "kis_composite_op.h" -class QCheckBox; -class QEvent; -class QKeyEvent; -class QComboBox; -class QPaintEvent; -class QRect; -class QGridLayout; +class TQCheckBox; +class TQEvent; +class TQKeyEvent; +class TQComboBox; +class TQPaintEvent; +class TQRect; +class TQGridLayout; class KDialog; class KisCanvasSubject; -class QLabel; +class TQLabel; class KisCmbComposite; class KisIntSpinbox; @@ -51,30 +51,31 @@ enum enumBrushMode { class KRITACORE_EXPORT KisToolPaint : public KisTool { Q_OBJECT + TQ_OBJECT typedef KisTool super; public: - KisToolPaint(const QString& UIName); + KisToolPaint(const TQString& UIName); virtual ~KisToolPaint(); public: virtual void update(KisCanvasSubject *subject); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); virtual void doubleClick(KisDoubleClickEvent *e); - virtual void keyPress(QKeyEvent *e); - virtual void keyRelease(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); + virtual void keyRelease(TQKeyEvent *e); - virtual QCursor cursor(); - virtual void setCursor(const QCursor& cursor); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); - virtual void addOptionWidgetOption(QWidget *control, QWidget *label = 0); + virtual TQCursor cursor(); + virtual void setCursor(const TQCursor& cursor); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); + virtual void addOptionWidgetOption(TQWidget *control, TQWidget *label = 0); public slots: virtual void activate(); @@ -87,30 +88,30 @@ public slots: protected: void notifyModified() const; - // Add the tool-specific layout to the default option widget's layout. - void addOptionWidgetLayout(QLayout *layout); + // Add the tool-specific tqlayout to the default option widget's tqlayout. + void addOptionWidgetLayout(TQLayout *tqlayout); private: void updateCompositeOpComboBox(); protected: KisCanvasSubject *m_subject; - QRect m_dirtyRect; - Q_UINT8 m_opacity; + TQRect m_dirtyRect; + TQ_UINT8 m_opacity; KisCompositeOp m_compositeOp; bool m_paintOutline; private: - QString m_UIName; + TQString m_UIName; - QCursor m_cursor; + TQCursor m_cursor; - QWidget *m_optionWidget; - QGridLayout *m_optionWidgetLayout; + TQWidget *m_optionWidget; + TQGridLayout *m_optionWidgetLayout; - QLabel *m_lbOpacity; + TQLabel *m_lbOpacity; KisIntSpinbox *m_slOpacity; - QLabel *m_lbComposite; + TQLabel *m_lbComposite; KisCmbComposite *m_cmbComposite; }; diff --git a/krita/ui/kis_tool_registry.cc b/krita/ui/kis_tool_registry.cc index 5e5e17d4..0878c106 100644 --- a/krita/ui/kis_tool_registry.cc +++ b/krita/ui/kis_tool_registry.cc @@ -37,8 +37,8 @@ KisToolRegistry *KisToolRegistry::m_singleton = 0; KisToolRegistry::KisToolRegistry() { // Load all modules: color models, paintops, filters - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/Tool"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/Tool"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); KTrader::OfferList::ConstIterator iter; @@ -48,7 +48,7 @@ KisToolRegistry::KisToolRegistry() KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService ( service, this, 0, TQStringList(), &errCode); if ( plugin ) kdDebug(DBG_AREA_PLUGINS) << "found plugin " << service->property("Name").toString() << "\n"; else { diff --git a/krita/ui/kis_tool_registry.h b/krita/ui/kis_tool_registry.h index 2fef3d1e..5fd32b93 100644 --- a/krita/ui/kis_tool_registry.h +++ b/krita/ui/kis_tool_registry.h @@ -19,7 +19,7 @@ #ifndef KIS_TOOL_REGISTRY_H_ #define KIS_TOOL_REGISTRY_H_ -#include +#include #include "kis_tool_types.h" #include "kis_generic_registry.h" @@ -27,7 +27,7 @@ class KActionCollection; class KisCanvasSubject; -class QStringList; +class TQStringList; /** * A registry, similar to the tool and colormodel registry @@ -35,9 +35,10 @@ class QStringList; * in contrast to the paintop and colormodel registries, creates * a vector containing instances of all registered tools. */ -class KRITACORE_EXPORT KisToolRegistry : public QObject, public KisGenericRegistry{ +class KRITACORE_EXPORT KisToolRegistry : public TQObject, public KisGenericRegistry{ Q_OBJECT + TQ_OBJECT public: virtual ~KisToolRegistry(); diff --git a/krita/ui/kis_tool_shape.cc b/krita/ui/kis_tool_shape.cc index 06c854a7..db510b8f 100644 --- a/krita/ui/kis_tool_shape.cc +++ b/krita/ui/kis_tool_shape.cc @@ -16,20 +16,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include "kis_tool_shape.h" -#include "wdgshapeoptions.h" +#include "wdgtqshapeoptions.h" -KisToolShape::KisToolShape(const QString& UIName) : super(UIName) +KisToolShape::KisToolShape(const TQString& UIName) : super(UIName) { - m_shapeOptionsWidget = 0; + m_tqshapeOptionsWidget = 0; m_optionLayout = 0; } @@ -37,31 +37,31 @@ KisToolShape::~KisToolShape() { } -QWidget* KisToolShape::createOptionWidget(QWidget* parent) +TQWidget* KisToolShape::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); - m_shapeOptionsWidget = new WdgGeometryOptions(0); - Q_CHECK_PTR(m_shapeOptionsWidget); + m_tqshapeOptionsWidget = new WdgGeometryOptions(0); + Q_CHECK_PTR(m_tqshapeOptionsWidget); - m_optionLayout = new QGridLayout(widget, 2, 1); + m_optionLayout = new TQGridLayout(widget, 2, 1); // super::addOptionWidgetLayout(m_optionLayout); - m_shapeOptionsWidget->cmbFill->reparent(widget, QPoint(0,0), true); - m_shapeOptionsWidget->textLabel3->reparent(widget, QPoint(0,0), true); - addOptionWidgetOption(m_shapeOptionsWidget->cmbFill, m_shapeOptionsWidget->textLabel3); + m_tqshapeOptionsWidget->cmbFill->reparent(widget, TQPoint(0,0), true); + m_tqshapeOptionsWidget->textLabel3->reparent(widget, TQPoint(0,0), true); + addOptionWidgetOption(m_tqshapeOptionsWidget->cmbFill, m_tqshapeOptionsWidget->textLabel3); return widget; } KisPainter::FillStyle KisToolShape::fillStyle(void) { - if (m_shapeOptionsWidget) { - return static_cast(m_shapeOptionsWidget->cmbFill->currentItem()); + if (m_tqshapeOptionsWidget) { + return static_cast(m_tqshapeOptionsWidget->cmbFill->currentItem()); } else { return KisPainter::FillStyleNone; } } -#include "kis_tool_shape.moc" +#include "kis_tool_tqshape.moc" diff --git a/krita/ui/kis_tool_shape.h b/krita/ui/kis_tool_shape.h index b6c1b2db..2c0a9500 100644 --- a/krita/ui/kis_tool_shape.h +++ b/krita/ui/kis_tool_shape.h @@ -24,28 +24,29 @@ #include "kis_tool_paint.h" #include "kis_painter.h" -class QGridLayout; +class TQGridLayout; class WdgGeometryOptions; class KRITACORE_EXPORT KisToolShape : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: - KisToolShape(const QString& UIName); + KisToolShape(const TQString& UIName); virtual ~KisToolShape(); virtual enumToolType toolType() { return TOOL_SHAPE; } protected: - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); KisPainter::FillStyle fillStyle(); private: - QGridLayout *m_optionLayout; - WdgGeometryOptions *m_shapeOptionsWidget; + TQGridLayout *m_optionLayout; + WdgGeometryOptions *m_tqshapeOptionsWidget; }; #endif // KIS_TOOL_SHAPE_H_ diff --git a/krita/ui/kis_view.cc b/krita/ui/kis_view.cc index 4bd4a2b1..3220c07e 100644 --- a/krita/ui/kis_view.cc +++ b/krita/ui/kis_view.cc @@ -25,21 +25,21 @@ #include #include -// Qt -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +// TQt +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -168,8 +168,8 @@ // sent to a receiver if it does not accept the tablet event. #define MOUSE_CHANGE_EVENT_DELAY 100 -KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const char *name) - : super(doc, parent, name) +KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *tqparent, const char *name) + : super(doc, tqparent, name) , KXMLGUIBuilder( shell() ) , m_panning( false ) , m_oldTool( 0 ) @@ -239,25 +239,25 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch Q_ASSERT(doc); Q_ASSERT(adapter); - Q_ASSERT(parent); + Q_ASSERT(tqparent); KisConfig cfg; m_currentColorChooserDisplay = KisID("BLA"); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); // Must come before input devices are referenced as this detects them. -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KisCanvasWidget::initX11Support(); #endif // Install event filter before we create any child widgets so they can see // the tablet events. - qApp->installEventFilter(this); + tqApp->installEventFilter(this); m_tabletEventTimer.start(); m_inputDevice = KisInputDevice::mouse(); - connect(&m_initialZoomTimer, SIGNAL(timeout()), SLOT(slotInitialZoomTimeout())); + connect(&m_initialZoomTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotInitialZoomTimeout())); m_paletteManager = new KoPaletteManager(this, actionCollection(), "Krita palette manager"); if (cfg.fixDockerWidth()) m_paletteManager->setFixedWidth( 360 ); @@ -275,8 +275,8 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch // This needs to be set before the dockers are created. m_image = m_doc->currentImage(); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - m_fg = KisColor(Qt::black, cs); - m_bg = KisColor(Qt::white, cs); + m_fg = KisColor(TQt::black, cs); + m_bg = KisColor(TQt::white, cs); createDockers(); @@ -288,7 +288,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch else setXMLFile("krita.rc"); - KStdAction::keyBindings( mainWindow()->guiFactory(), SLOT( configureShortcuts() ), actionCollection() ); + KStdAction::keyBindings( mainWindow()->guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() ); createLayerBox(); @@ -302,7 +302,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch dcopObject(); - connect(this, SIGNAL(autoScroll(const QPoint &)), SLOT(slotAutoScroll(const QPoint &))); + connect(this, TQT_SIGNAL(autoScroll(const TQPoint &)), TQT_SLOT(slotAutoScroll(const TQPoint &))); setMouseTracking(true); @@ -313,8 +313,8 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch m_brushesAndStuffToolBar = new KisControlFrame(mainWindow(), this); // Load all plugins - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/ViewPlugin"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/ViewPlugin"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); KTrader::OfferList::ConstIterator iter; for(iter = offers.begin(); iter != offers.end(); ++iter) @@ -322,7 +322,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService ( service, this, 0, TQStringList(), &errCode); if ( plugin ) { kdDebug(41006) << "found plugin " << service->property("Name").toString() << "\n"; insertChildClient(plugin); @@ -340,7 +340,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch { slotLoadingFinished(); } else { - connect(doc, SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + connect(doc, TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); } setFocus(); @@ -360,27 +360,27 @@ KisView::~KisView() } -static Qt::Dock stringToDock( const QString& attrPosition ) +static TQt::Dock stringToDock( const TQString& attrPosition ) { KToolBar::Dock dock = KToolBar::DockTop; if ( !attrPosition.isEmpty() ) { if ( attrPosition == "top" ) - dock = Qt::DockTop; + dock = TQt::DockTop; else if ( attrPosition == "left" ) - dock = Qt::DockLeft; + dock = TQt::DockLeft; else if ( attrPosition == "right" ) - dock = Qt::DockRight; + dock = TQt::DockRight; else if ( attrPosition == "bottom" ) - dock = Qt::DockBottom; + dock = TQt::DockBottom; else if ( attrPosition == "floating" ) - dock = Qt::DockTornOff; + dock = TQt::DockTornOff; else if ( attrPosition == "flat" ) - dock = Qt::DockMinimized; + dock = TQt::DockMinimized; } return dock; } -QWidget * KisView::createContainer( QWidget *parent, int index, const QDomElement &element, int &id ) +TQWidget * KisView::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ) { if( element.attribute( "name" ) == "ToolBox" ) { @@ -394,11 +394,11 @@ QWidget * KisView::createContainer( QWidget *parent, int index, const QDomElemen mainWindow()->moveDockWindow( m_toolBox, dock, false, 0, 0 ); } - return KXMLGUIBuilder::createContainer( parent, index, element, id ); + return KXMLGUIBuilder::createContainer( tqparent, index, element, id ); } -void KisView::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id ) +void KisView::removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id ) { Q_ASSERT(container); @@ -408,7 +408,7 @@ void KisView::removeContainer( QWidget *container, QWidget *parent, QDomElement m_toolManager->youAintGotNoToolBox(); } else { - KXMLGUIBuilder::removeContainer( container, parent, element, id ); + KXMLGUIBuilder::removeContainer( container, tqparent, element, id ); } } @@ -426,20 +426,20 @@ void KisView::createLayerBox() m_layerBox = new KisLayerBox(this); m_layerBox->setCaption(i18n("Layers")); - connect(m_layerBox, SIGNAL(sigRequestLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestGroupLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addGroupLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestAdjustmentLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addAdjustmentLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&)), - this, SLOT(addPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&))); - connect(m_layerBox, SIGNAL(sigRequestLayerProperties(KisLayerSP)), - this, SLOT(showLayerProperties(KisLayerSP))); - connect(m_layerBox, SIGNAL(sigOpacityChanged(int, bool)), this, SLOT(layerOpacity(int, bool))); - connect(m_layerBox, SIGNAL(sigOpacityFinishedChanging(int, int)), - this, SLOT(layerOpacityFinishedChanging(int, int))); - connect(m_layerBox, SIGNAL(sigItemComposite(const KisCompositeOp&)), this, SLOT(layerCompositeOp(const KisCompositeOp&))); + connect(m_layerBox, TQT_SIGNAL(sigRequestLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestGroupLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addGroupLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestAdjustmentLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addAdjustmentLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&)), + this, TQT_SLOT(addPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&))); + connect(m_layerBox, TQT_SIGNAL(sigRequestLayerProperties(KisLayerSP)), + this, TQT_SLOT(showLayerProperties(KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigOpacityChanged(int, bool)), this, TQT_SLOT(layerOpacity(int, bool))); + connect(m_layerBox, TQT_SIGNAL(sigOpacityFinishedChanging(int, int)), + this, TQT_SLOT(layerOpacityFinishedChanging(int, int))); + connect(m_layerBox, TQT_SIGNAL(sigItemComposite(const KisCompositeOp&)), this, TQT_SLOT(layerCompositeOp(const KisCompositeOp&))); paletteManager()->addWidget(m_layerBox, "layerbox", krita::LAYERBOX, 0); @@ -458,18 +458,18 @@ void KisView::setupScrollBars() { m_scrollX = 0; m_scrollY = 0; - m_vScroll = new QScrollBar(QScrollBar::Vertical, this); + m_vScroll = new TQScrollBar(TQScrollBar::Vertical, this); Q_CHECK_PTR(m_vScroll); - m_hScroll = new QScrollBar(QScrollBar::Horizontal, this); + m_hScroll = new TQScrollBar(TQScrollBar::Horizontal, this); Q_CHECK_PTR(m_hScroll); m_vScroll->setGeometry(width() - 16, 20, 16, height() - 36); m_hScroll->setGeometry(20, height() - 16, width() - 36, 16); m_hScroll->setValue(0); m_vScroll->setValue(0); - QObject::connect(m_vScroll, SIGNAL(valueChanged(int)), this, SLOT(scrollV(int))); - QObject::connect(m_hScroll, SIGNAL(valueChanged(int)), this, SLOT(scrollH(int))); + TQObject::connect(m_vScroll, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(scrollV(int))); + TQObject::connect(m_hScroll, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(scrollH(int))); } void KisView::setupRulers() @@ -494,11 +494,11 @@ void KisView::setupRulers() void KisView::updateStatusBarZoomLabel () { if (zoom() < 1 - EPSILON) { - m_statusBarZoomLabel->setText(i18n("Zoom %1%").arg(zoom() * 100, 0, 'g', 4)); + m_statusBarZoomLabel->setText(i18n("Zoom %1%").tqarg(zoom() * 100, 0, 'g', 4)); } else { - m_statusBarZoomLabel->setText(i18n("Zoom %1%").arg(zoom() * 100, 0, 'f', 0)); + m_statusBarZoomLabel->setText(i18n("Zoom %1%").tqarg(zoom() * 100, 0, 'f', 0)); } - m_statusBarZoomLabel->setMaximumWidth(m_statusBarZoomLabel->fontMetrics().width(i18n("Zoom %1%").arg("0.8888 "))); + m_statusBarZoomLabel->setMaximumWidth(m_statusBarZoomLabel->fontMetrics().width(i18n("Zoom %1%").tqarg("0.8888 "))); } void KisView::updateStatusBarSelectionLabel() @@ -512,8 +512,8 @@ void KisView::updateStatusBarSelectionLabel() KisPaintDeviceSP dev = img->activeDevice(); if (dev) { if (dev->hasSelection()) { - QRect r = dev->selection()->selectedExactRect(); - m_statusBarSelectionLabel->setText( i18n("Selection Active: x = %1 y = %2 width = %3 height = %4").arg(r.x()).arg(r.y()).arg( r.width()).arg( r.height())); + TQRect r = dev->selection()->selectedExactRect(); + m_statusBarSelectionLabel->setText( i18n("Selection Active: x = %1 y = %2 width = %3 height = %4").tqarg(r.x()).tqarg(r.y()).tqarg( r.width()).tqarg( r.height())); return; } } @@ -555,7 +555,7 @@ void KisView::resetMonitorProfile() if (m_monitorProfile == 0) { KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); m_monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); } @@ -566,7 +566,7 @@ void KisView::setupStatusBar() KStatusBar *sb = statusBar(); if (sb) { - m_statusBarZoomLabel = new QLabel(sb); + m_statusBarZoomLabel = new TQLabel(sb); addStatusBarItem(m_statusBarZoomLabel,1); updateStatusBarZoomLabel(); @@ -601,112 +601,112 @@ void KisView::setupActions() m_fullScreen = KStdAction::fullScreen( NULL, NULL, actionCollection(), this ); - connect( m_fullScreen, SIGNAL( toggled( bool )), this, SLOT( slotUpdateFullScreen( bool ))); + connect( m_fullScreen, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( slotUpdateFullScreen( bool ))); - m_imgProperties = new KAction(i18n("Image Properties"), 0, this, SLOT(slotImageProperties()), actionCollection(), "img_properties"); + m_imgProperties = new KAction(i18n("Image Properties"), 0, this, TQT_SLOT(slotImageProperties()), actionCollection(), "img_properties"); m_imgScan = 0; // How the hell do I get a KAction to the scan plug-in?!? - m_imgResizeToLayer = new KAction(i18n("Resize Image to Size of Current Layer"), 0, this, SLOT(imgResizeToActiveLayer()), actionCollection(), "resizeimgtolayer"); + m_imgResizeToLayer = new KAction(i18n("Resize Image to Size of Current Layer"), 0, this, TQT_SLOT(imgResizeToActiveLayer()), actionCollection(), "resizeimgtolayer"); // view actions - m_zoomIn = KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection(), "zoom_in"); - m_zoomOut = KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection(), "zoom_out"); - m_actualPixels = new KAction(i18n("Actual Pixels"), "Ctrl+0", this, SLOT(slotActualPixels()), actionCollection(), "actual_pixels"); - m_actualSize = KStdAction::actualSize(this, SLOT(slotActualSize()), actionCollection(), "actual_size"); + m_zoomIn = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection(), "zoom_in"); + m_zoomOut = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection(), "zoom_out"); + m_actualPixels = new KAction(i18n("Actual Pixels"), "Ctrl+0", this, TQT_SLOT(slotActualPixels()), actionCollection(), "actual_pixels"); + m_actualSize = KStdAction::actualSize(this, TQT_SLOT(slotActualSize()), actionCollection(), "actual_size"); m_actualSize->setEnabled(false); - m_fitToCanvas = KStdAction::fitToPage(this, SLOT(slotFitToCanvas()), actionCollection(), "fit_to_canvas"); + m_fitToCanvas = KStdAction::fitToPage(this, TQT_SLOT(slotFitToCanvas()), actionCollection(), "fit_to_canvas"); // layer actions - m_layerAdd = new KAction(i18n("&Add..."), "Ctrl+Shift+N", this, SLOT(layerAdd()), actionCollection(), "insert_layer"); + m_layerAdd = new KAction(i18n("&Add..."), "Ctrl+Shift+N", this, TQT_SLOT(layerAdd()), actionCollection(), "insert_layer"); m_actionPartLayer = new KoPartSelectAction( i18n( "&Object Layer" ), "frame_query", - this, SLOT( addPartLayer() ), + this, TQT_SLOT( addPartLayer() ), actionCollection(), "insert_part_layer" ); m_actionAdjustmentLayer = new KAction( i18n( "&Adjustment Layer" ), 0, - this, SLOT( addAdjustmentLayer() ), + this, TQT_SLOT( addAdjustmentLayer() ), actionCollection(), "insert_adjustment_layer" ); - m_layerRm = new KAction(i18n("&Remove"), 0, this, SLOT(layerRemove()), actionCollection(), "remove_layer"); - m_layerDup = new KAction(i18n("Duplicate"), 0, this, SLOT(layerDuplicate()), actionCollection(), "duplicate_layer"); - m_layerHide = new KToggleAction(i18n("&Hide"), 0, this, SLOT(layerToggleVisible()), actionCollection(), "hide_layer"); + m_layerRm = new KAction(i18n("&Remove"), 0, this, TQT_SLOT(layerRemove()), actionCollection(), "remove_layer"); + m_layerDup = new KAction(i18n("Duplicate"), 0, this, TQT_SLOT(layerDuplicate()), actionCollection(), "duplicate_layer"); + m_layerHide = new KToggleAction(i18n("&Hide"), 0, this, TQT_SLOT(layerToggleVisible()), actionCollection(), "hide_layer"); m_layerHide->setCheckedState(KGuiItem(i18n("&Show"))); m_layerHide->setChecked(false); - m_layerRaise = new KAction(i18n("Raise"), "raise", "Ctrl+]", this, SLOT(layerRaise()), actionCollection(), "raiselayer"); - m_layerLower = new KAction(i18n("Lower"), "lower", "Ctrl+[", this, SLOT(layerLower()), actionCollection(), "lowerlayer"); - m_layerTop = new KAction(i18n("To Top"), "bring_forward", "Ctrl+Shift+]", this, SLOT(layerFront()), actionCollection(), "toplayer"); - m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", "Ctrl+Shift+[", this, SLOT(layerBack()), actionCollection(), "bottomlayer"); - m_layerProperties = new KAction(i18n("Properties"), 0, this, SLOT(layerProperties()), actionCollection(), "layer_properties"); - (void)new KAction(i18n("I&nsert Image as Layer..."), 0, this, SLOT(slotInsertImageAsLayer()), actionCollection(), "insert_image_as_layer"); - m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", this, SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image"); - (void)new KAction(i18n("Flip on &X Axis"), "view_left_right", 0, this, SLOT(mirrorLayerX()), actionCollection(), "mirrorLayerX"); - (void)new KAction(i18n("Flip on &Y Axis"), "view_top_bottom", 0, this, SLOT(mirrorLayerY()), actionCollection(), "mirrorLayerY"); + m_layerRaise = new KAction(i18n("Raise"), "raise", "Ctrl+]", this, TQT_SLOT(layerRaise()), actionCollection(), "raiselayer"); + m_layerLower = new KAction(i18n("Lower"), "lower", "Ctrl+[", this, TQT_SLOT(layerLower()), actionCollection(), "lowerlayer"); + m_layerTop = new KAction(i18n("To Top"), "bring_forward", "Ctrl+Shift+]", this, TQT_SLOT(layerFront()), actionCollection(), "toplayer"); + m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", "Ctrl+Shift+[", this, TQT_SLOT(layerBack()), actionCollection(), "bottomlayer"); + m_layerProperties = new KAction(i18n("Properties"), 0, this, TQT_SLOT(layerProperties()), actionCollection(), "layer_properties"); + (void)new KAction(i18n("I&nsert Image as Layer..."), 0, this, TQT_SLOT(slotInsertImageAsLayer()), actionCollection(), "insert_image_as_layer"); + m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", this, TQT_SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image"); + (void)new KAction(i18n("Flip on &X Axis"), "view_left_right", 0, this, TQT_SLOT(mirrorLayerX()), actionCollection(), "mirrorLayerX"); + (void)new KAction(i18n("Flip on &Y Axis"), "view_top_bottom", 0, this, TQT_SLOT(mirrorLayerY()), actionCollection(), "mirrorLayerY"); m_createMask = new KAction(i18n("Create Mask"), 0, this, - SLOT(slotCreateMask()), actionCollection(), "create_mask"); - m_maskFromSelection = new KAction(i18n("Mask From Selection"), 0, this, - SLOT(slotMaskFromSelection()), actionCollection(), - "mask_fromsel"); - m_maskToSelection = new KAction(i18n("Mask to Selection"), 0, this, - SLOT(slotMaskToSelection()), actionCollection(), "mask_tosel"); - m_applyMask = new KAction(i18n("Apply Mask"), 0, this, SLOT(slotApplyMask()), - actionCollection(), "apply_mask"); + TQT_SLOT(slotCreateMask()), actionCollection(), "create_tqmask"); + m_tqmaskFromSelection = new KAction(i18n("Mask From Selection"), 0, this, + TQT_SLOT(slotMaskFromSelection()), actionCollection(), + "tqmask_fromsel"); + m_tqmaskToSelection = new KAction(i18n("Mask to Selection"), 0, this, + TQT_SLOT(slotMaskToSelection()), actionCollection(), "tqmask_tosel"); + m_applyMask = new KAction(i18n("Apply Mask"), 0, this, TQT_SLOT(slotApplyMask()), + actionCollection(), "apply_tqmask"); m_removeMask = new KAction(i18n("Remove Mask"), 0, this, - SLOT(slotRemoveMask()), actionCollection(), "remove_mask"); + TQT_SLOT(slotRemoveMask()), actionCollection(), "remove_tqmask"); m_showMask = new KToggleAction(i18n( "Show Mask" ), 0, this, - SLOT(slotShowMask()), actionCollection(), "show_mask"); + TQT_SLOT(slotShowMask()), actionCollection(), "show_tqmask"); m_editMask = new KToggleAction(i18n( "Edit Mask" ), 0, this, - SLOT(slotEditMask()), actionCollection(), "edit_mask"); + TQT_SLOT(slotEditMask()), actionCollection(), "edit_tqmask"); // image actions - m_imgFlatten = new KAction(i18n("&Flatten Image"), "Ctrl+Shift+E", this, SLOT(flattenImage()), actionCollection(), "flatten_image"); - m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), "Ctrl+E", this, SLOT(mergeLayer()), actionCollection(), "merge_layer"); + m_imgFlatten = new KAction(i18n("&Flatten Image"), "Ctrl+Shift+E", this, TQT_SLOT(flattenImage()), actionCollection(), "flatten_image"); + m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), "Ctrl+E", this, TQT_SLOT(mergeLayer()), actionCollection(), "merge_layer"); // setting actions - KStdAction::preferences(this, SLOT(preferences()), actionCollection(), "preferences"); + KStdAction::preferences(this, TQT_SLOT(preferences()), actionCollection(), "preferences"); - m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), "Ctrl+R", this, SLOT( showRuler() ), actionCollection(), "view_ruler" ); + m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), "Ctrl+R", this, TQT_SLOT( showRuler() ), actionCollection(), "view_ruler" ); m_RulerAction->setChecked(cfg.showRulers()); m_RulerAction->setCheckedState(i18n("Hide Rulers")); m_RulerAction->setWhatsThis( i18n("The rulers show the horizontal and vertical positions of the mouse on the image " "and can be used to position your mouse at the right place on the canvas.

Uncheck this to disable " "the rulers from being displayed." ) ); - //m_guideAction = new KToggleAction( i18n( "Guide Lines" ), 0, this, SLOT( viewGuideLines() ), actionCollection(), "view_guidelines" ); + //m_guideAction = new KToggleAction( i18n( "Guide Lines" ), 0, this, TQT_SLOT( viewGuideLines() ), actionCollection(), "view_guidelines" ); // Add new palette - new KAction(i18n("Add New Palette..."), 0, this, SLOT(slotAddPalette()), + new KAction(i18n("Add New Palette..."), 0, this, TQT_SLOT(slotAddPalette()), actionCollection(), "add_palette"); - new KAction(i18n("Edit Palette..."), 0, this, SLOT(slotEditPalette()), + new KAction(i18n("Edit Palette..."), 0, this, TQT_SLOT(slotEditPalette()), actionCollection(), "edit_palette"); - // XXX: This triggers a repaint of the image, but way too early + // XXX: This triggers a tqrepaint of the image, but way too early //showRuler(); } -void KisView::resizeEvent(QResizeEvent *) +void KisView::resizeEvent(TQResizeEvent *) { if (!m_paintViewEnabled) { startInitialZoomTimerIfReady(); } KisImageSP img = currentImg(); - Q_INT32 scrollBarExtent = style().pixelMetric(QStyle::PM_ScrollBarExtent); - Q_INT32 drawH; - Q_INT32 drawW; - Q_INT32 docW; - Q_INT32 docH; + TQ_INT32 scrollBarExtent = style().tqpixelMetric(TQStyle::PM_ScrollBarExtent); + TQ_INT32 drawH; + TQ_INT32 drawW; + TQ_INT32 docW; + TQ_INT32 docH; // if (img) { // KisGuideMgr *mgr = img->guides(); // mgr->resize(size()); // } - docW = static_cast(ceil(docWidth() * zoom())); - docH = static_cast(ceil(docHeight() * zoom())); + docW = static_cast(ceil(docWidth() * zoom())); + docH = static_cast(ceil(docHeight() * zoom())); m_rulerThickness = m_RulerAction->isChecked() ? RULER_THICKNESS : 0; drawH = height() - m_rulerThickness; @@ -775,8 +775,8 @@ void KisView::resizeEvent(QResizeEvent *) m_hScrollBarExtent = scrollBarExtent; } - Q_INT32 oldCanvasXOffset = m_canvasXOffset; - Q_INT32 oldCanvasYOffset = m_canvasYOffset; + TQ_INT32 oldCanvasXOffset = m_canvasXOffset; + TQ_INT32 oldCanvasYOffset = m_canvasYOffset; if (docW < drawW) { m_canvasXOffset = (drawW - docW) / 2; @@ -799,29 +799,29 @@ void KisView::resizeEvent(QResizeEvent *) if (!m_canvas->isOpenGLCanvas()) { - if (m_canvasPixmap.size() != QSize(drawW, drawH)) { + if (m_canvasPixmap.size() != TQSize(drawW, drawH)) { - Q_INT32 oldCanvasWidth = m_canvasPixmap.width(); - Q_INT32 oldCanvasHeight = m_canvasPixmap.height(); + TQ_INT32 oldCanvasWidth = m_canvasPixmap.width(); + TQ_INT32 oldCanvasHeight = m_canvasPixmap.height(); - Q_INT32 newCanvasWidth = drawW; - Q_INT32 newCanvasHeight = drawH; + TQ_INT32 newCanvasWidth = drawW; + TQ_INT32 newCanvasHeight = drawH; - QRegion exposedRegion = QRect(0, 0, newCanvasWidth, newCanvasHeight); + TQRegion exposedRegion = TQRect(0, 0, newCanvasWidth, newCanvasHeight); // Increase size first so that we can copy the old image area to the new one. - m_canvasPixmap.resize(QMAX(oldCanvasWidth, newCanvasWidth), QMAX(oldCanvasHeight, newCanvasHeight)); + m_canvasPixmap.resize(TQMAX(oldCanvasWidth, newCanvasWidth), TQMAX(oldCanvasHeight, newCanvasHeight)); if (!m_canvasPixmap.isNull()) { if (oldCanvasXOffset != m_canvasXOffset || oldCanvasYOffset != m_canvasYOffset) { - Q_INT32 srcX; - Q_INT32 srcY; - Q_INT32 srcWidth; - Q_INT32 srcHeight; - Q_INT32 dstX; - Q_INT32 dstY; + TQ_INT32 srcX; + TQ_INT32 srcY; + TQ_INT32 srcWidth; + TQ_INT32 srcHeight; + TQ_INT32 dstX; + TQ_INT32 dstY; if (oldCanvasXOffset <= m_canvasXOffset) { // Move to the right @@ -848,9 +848,9 @@ void KisView::resizeEvent(QResizeEvent *) } bitBlt(&m_canvasPixmap, dstX, dstY, &m_canvasPixmap, srcX, srcY, srcWidth, srcHeight); - exposedRegion -= QRegion(QRect(dstX, dstY, srcWidth, srcHeight)); + exposedRegion -= TQRegion(TQRect(dstX, dstY, srcWidth, srcHeight)); } else { - exposedRegion -= QRegion(QRect(0, 0, oldCanvasWidth, oldCanvasHeight)); + exposedRegion -= TQRegion(TQRect(0, 0, oldCanvasWidth, oldCanvasHeight)); } } @@ -858,24 +858,24 @@ void KisView::resizeEvent(QResizeEvent *) if (!m_canvasPixmap.isNull() && !exposedRegion.isEmpty()) { - QMemArray rects = exposedRegion.rects(); + TQMemArray rects = exposedRegion.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect r = rects[i]; - updateQPaintDeviceCanvas(viewToWindow(r)); + TQRect r = rects[i]; + updateTQPaintDeviceCanvas(viewToWindow(r)); } } } } - int fontheight = QFontMetrics(KGlobalSettings::generalFont()).height() * 3; + int fontheight = TQFontMetrics(KGlobalSettings::generalFont()).height() * 3; m_vScroll->setPageStep(drawH); m_vScroll->setLineStep(fontheight); m_hScroll->setPageStep(drawW); m_hScroll->setLineStep(fontheight); - m_hRuler->setGeometry(m_rulerThickness + m_canvasXOffset, 0, QMIN(docW, drawW), m_rulerThickness); - m_vRuler->setGeometry(0, m_rulerThickness + m_canvasYOffset, m_rulerThickness, QMIN(docH, drawH)); + m_hRuler->setGeometry(m_rulerThickness + m_canvasXOffset, 0, TQMIN(docW, drawW), m_rulerThickness); + m_vRuler->setGeometry(0, m_rulerThickness + m_canvasYOffset, m_rulerThickness, TQMIN(docH, drawH)); if (m_vScroll->isVisible()) m_vRuler->updateVisibleArea(0, m_vScroll->value()); @@ -900,20 +900,20 @@ void KisView::resizeEvent(QResizeEvent *) emit viewTransformationsChanged(); } -void KisView::styleChange(QStyle& oldStyle) +void KisView::styleChange(TQStyle& oldStyle) { Q_UNUSED(oldStyle); m_canvas->updateGeometry(); refreshKisCanvas(); } -void KisView::paletteChange(const QPalette& oldPalette) +void KisView::paletteChange(const TQPalette& oldPalette) { Q_UNUSED(oldPalette); refreshKisCanvas(); } -void KisView::showEvent(QShowEvent *) +void KisView::showEvent(TQShowEvent *) { if (!m_showEventReceived) { m_showEventReceived = true; @@ -926,24 +926,24 @@ void KisView::updateReadWrite(bool readwrite) layerUpdateGUI(readwrite); } -Q_INT32 KisView::horzValue() const +TQ_INT32 KisView::horzValue() const { return m_hScroll->value() - m_canvasXOffset; } -Q_INT32 KisView::vertValue() const +TQ_INT32 KisView::vertValue() const { return m_vScroll->value() - m_canvasYOffset; } -void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) +void KisView::updateTQPaintDeviceCanvas(const TQRect& imageRect) { - QRect vr = windowToView(imageRect); - vr &= QRect(0, 0, m_canvas->width(), m_canvas->height()); + TQRect vr = windowToView(imageRect); + vr &= TQRect(0, 0, m_canvas->width(), m_canvas->height()); if (!vr.isEmpty()) { - QPainter gc; + TQPainter gc; if (gc.begin(&m_canvasPixmap)) { @@ -951,20 +951,20 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) if (img && m_paintViewEnabled) { - QRect wr = viewToWindow(vr); + TQRect wr = viewToWindow(vr); if (wr.left() < 0 || wr.right() >= img->width() || wr.top() < 0 || wr.bottom() >= img->height()) { // Erase areas outside document - QRegion rg(vr); - rg -= QRegion(windowToView(QRect(0, 0, img->width(), img->height()))); + TQRegion rg(vr); + rg -= TQRegion(windowToView(TQRect(0, 0, img->width(), img->height()))); - QMemArray rects = rg.rects(); + TQMemArray rects = rg.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect er = rects[i]; - gc.fillRect(er, colorGroup().mid()); + TQRect er = rects[i]; + gc.fillRect(er, tqcolorGroup().mid()); } - wr &= QRect(0, 0, img->width(), img->height()); + wr &= TQRect(0, 0, img->width(), img->height()); } if (!wr.isEmpty()) { @@ -991,14 +991,14 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) paintFlags, HDRExposure()); } else { - QRect canvasRect = windowToView(wr); - QRect scaledImageRect = canvasRect; + TQRect canvasRect = windowToView(wr); + TQRect scaledImageRect = canvasRect; scaledImageRect.moveBy(horzValue(), vertValue()); - QSize scaledImageSize(static_cast(ceil(docWidth() * zoom())), - static_cast(ceil(docHeight() * zoom()))); + TQSize scaledImageSize(static_cast(ceil(docWidth() * zoom())), + static_cast(ceil(docHeight() * zoom()))); - QImage image = m_image->convertToQImage(scaledImageRect, scaledImageSize, + TQImage image = m_image->convertToTQImage(scaledImageRect, scaledImageSize, monitorProfile(), paintFlags, HDRExposure()); gc.drawImage(canvasRect.topLeft(), image, image.rect()); @@ -1014,23 +1014,23 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) } // paintGuides(); } else { - gc.fillRect(vr, colorGroup().mid()); + gc.fillRect(vr, tqcolorGroup().mid()); } } } } -void KisView::paintQPaintDeviceView(const QRegion& canvasRegion) +void KisView::paintTQPaintDeviceView(const TQRegion& canvasRegion) { - Q_ASSERT(m_canvas->QPaintDeviceWidget() != 0); + Q_ASSERT(m_canvas->TQPaintDeviceWidget() != 0); - if (m_canvas->QPaintDeviceWidget() != 0 && !m_canvasPixmap.isNull()) { - QMemArray rects = canvasRegion.rects(); + if (m_canvas->TQPaintDeviceWidget() != 0 && !m_canvasPixmap.isNull()) { + TQMemArray rects = canvasRegion.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect r = rects[i]; + TQRect r = rects[i]; - bitBlt(m_canvas->QPaintDeviceWidget(), r.x(), r.y(), &m_canvasPixmap, + bitBlt(m_canvas->TQPaintDeviceWidget(), r.x(), r.y(), &m_canvasPixmap, r.x(), r.y(), r.width(), r.height()); } @@ -1038,7 +1038,7 @@ void KisView::paintQPaintDeviceView(const QRegion& canvasRegion) } } -void KisView::updateOpenGLCanvas(const QRect& imageRect) +void KisView::updateOpenGLCanvas(const TQRect& imageRect) { #ifdef HAVE_GL KisImageSP img = currentImg(); @@ -1055,7 +1055,7 @@ void KisView::updateOpenGLCanvas(const QRect& imageRect) #endif } -void KisView::paintOpenGLView(const QRect& canvasRect) +void KisView::paintOpenGLView(const TQRect& canvasRect) { #ifdef HAVE_GL if (!m_canvas->isUpdatesEnabled()) { @@ -1066,7 +1066,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glDrawBuffer(GL_BACK); - QColor widgetBackgroundColor = colorGroup().mid(); + TQColor widgetBackgroundColor = tqcolorGroup().mid(); glClearColor(widgetBackgroundColor.red() / 255.0, widgetBackgroundColor.green() / 255.0, widgetBackgroundColor.blue() / 255.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); @@ -1075,8 +1075,8 @@ void KisView::paintOpenGLView(const QRect& canvasRect) if (img && m_paintViewEnabled) { - QRect vr = canvasRect; - vr &= QRect(0, 0, m_canvas->width(), m_canvas->height()); + TQRect vr = canvasRect; + vr &= TQRect(0, 0, m_canvas->width(), m_canvas->height()); if (!vr.isNull()) { @@ -1093,7 +1093,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glTranslatef(m_canvasXOffset, m_canvasYOffset, 0.0); glEnable(GL_TEXTURE_2D); - glBegin(GL_QUADS); + glBegin(GL_TQUADS); glTexCoord2f(0.0, 0.0); glVertex2f(0.0, 0.0); @@ -1118,8 +1118,8 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - QRect wr = viewToWindow(QRect(0, 0, m_canvas->width(), m_canvas->height())); - wr &= QRect(0, 0, img->width(), img->height()); + TQRect wr = viewToWindow(TQRect(0, 0, m_canvas->width(), m_canvas->height())); + wr &= TQRect(0, 0, img->width(), img->height()); m_OpenGLImageContext->setHDRExposure(HDRExposure()); @@ -1134,7 +1134,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glBindTexture(GL_TEXTURE_2D, m_OpenGLImageContext->imageTextureTile(x, y)); - glBegin(GL_QUADS); + glBegin(GL_TQUADS); glTexCoord2f(0.0, 0.0); glVertex2f(x, y); @@ -1168,7 +1168,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) m_canvas->OpenGLWidget()->swapBuffers(); - paintToolOverlay(QRegion(canvasRect)); + paintToolOverlay(TQRegion(canvasRect)); #else Q_UNUSED(canvasRect); @@ -1213,26 +1213,26 @@ void KisView::updateCanvas() } } -void KisView::updateCanvas(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisView::updateCanvas(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { - updateCanvas(QRect(x, y, w, h)); + updateCanvas(TQRect(x, y, w, h)); } -void KisView::updateCanvas(const QRect& imageRect) +void KisView::updateCanvas(const TQRect& imageRect) { if (m_canvas->isOpenGLCanvas()) { updateOpenGLCanvas(imageRect); paintOpenGLView(windowToView(imageRect)); } else { - updateQPaintDeviceCanvas(imageRect); + updateTQPaintDeviceCanvas(imageRect); //m_canvas->update(windowToView(imageRect)); - m_canvas->repaint(windowToView(imageRect)); + m_canvas->tqrepaint(windowToView(imageRect)); } } void KisView::refreshKisCanvas() { - QRect imageRect = viewToWindow(QRect(0, 0, m_canvas->width(), m_canvas->height())); + TQRect imageRect = viewToWindow(TQRect(0, 0, m_canvas->width(), m_canvas->height())); if (m_image) { imageRect |= m_image->bounds(); @@ -1241,7 +1241,7 @@ void KisView::refreshKisCanvas() updateCanvas(imageRect); // Enable this if updateCanvas does an m_canvas->update() - //m_canvas->repaint(); + //m_canvas->tqrepaint(); } void KisView::selectionDisplayToggled(bool displaySelection) @@ -1263,8 +1263,8 @@ void KisView::layerUpdateGUI(bool enable) KisImageSP img = currentImg(); KisLayerSP layer; - Q_INT32 nlayers = 0; - Q_INT32 nvisible = 0; + TQ_INT32 nlayers = 0; + TQ_INT32 nvisible = 0; @@ -1457,13 +1457,13 @@ void KisView::zoomAroundPoint(double x, double y, double zf) if (m_hScroll->isVisible()) { double vcx = m_canvas->width() / 2.0; - Q_INT32 scrollX = qRound(x * zoom() - vcx); + TQ_INT32 scrollX = tqRound(x * zoom() - vcx); m_hScroll->setValue(scrollX); } if (m_vScroll->isVisible()) { double vcy = m_canvas->height() / 2.0; - Q_INT32 scrollY = qRound(y * zoom() - vcy); + TQ_INT32 scrollY = tqRound(y * zoom() - vcy); m_vScroll->setValue(scrollY); } @@ -1475,7 +1475,7 @@ void KisView::zoomAroundPoint(double x, double y, double zf) m_vScroll->update(); if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { refreshKisCanvas(); } @@ -1504,22 +1504,22 @@ void KisView::zoomTo(const KisRect& r) } } -void KisView::zoomTo(const QRect& r) +void KisView::zoomTo(const TQRect& r) { zoomTo(KisRect(r)); } -void KisView::zoomTo(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisView::zoomTo(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { zoomTo(KisRect(x, y, w, h)); } -void KisView::zoomIn(Q_INT32 x, Q_INT32 y) +void KisView::zoomIn(TQ_INT32 x, TQ_INT32 y) { zoomAroundPoint(x, y, nextZoomInLevel()); } -void KisView::zoomOut(Q_INT32 x, Q_INT32 y) +void KisView::zoomOut(TQ_INT32 x, TQ_INT32 y) { zoomAroundPoint(x, y, nextZoomOutLevel()); } @@ -1574,7 +1574,7 @@ double KisView::fitToCanvasZoomLevel() const double xZoomLevel = static_cast(fullCanvasWidth) / img->width(); double yZoomLevel = static_cast(fullCanvasHeight) / img->height(); - return QMIN(xZoomLevel, yZoomLevel); + return TQMIN(xZoomLevel, yZoomLevel); } else { return 1; @@ -1612,7 +1612,7 @@ void KisView::imgResizeToActiveLayer() img->lock(); - QRect r = layer->exactBounds(); + TQRect r = layer->exactBounds(); img->resize(r.width(), r.height(), r.x(), r.y(), true); img->unlock(); @@ -1631,14 +1631,14 @@ void KisView::slotImageProperties() KisDlgImageProperties dlg(img, this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { if (dlg.imageWidth() != img->width() || dlg.imageHeight() != img->height()) { resizeCurrentImage(dlg.imageWidth(), dlg.imageHeight()); } - Q_INT32 opacity = dlg.opacity(); + TQ_INT32 opacity = dlg.opacity(); opacity = opacity * 255 / 100; img->setName(dlg.imageName()); img->setColorSpace(dlg.colorSpace()); @@ -1669,8 +1669,8 @@ void KisView::slotEditPalette() if (!srv) { return; } - QValueList resources = srv->resources(); - QValueList palettes; + TQValueList resources = srv->resources(); + TQValueList palettes; for(uint i = 0; i < resources.count(); i++) { KisPalette* palette = dynamic_cast(*resources.at(i)); @@ -1679,7 +1679,7 @@ void KisView::slotEditPalette() palettes.append(palette); } - if (chooser.exec() != QDialog::Accepted ) { + if (chooser.exec() != TQDialog::Accepted ) { return; } @@ -1700,10 +1700,10 @@ void KisView::slotEditPalette() void KisView::saveLayerAsImage() { - QStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); - QString mimelist = listMimeFilter.join(" "); + TQStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); + TQString mimelist = listMimeFilter.join(" "); - KFileDialog fd (QString::null, mimelist, this, "Export Layer", true); + KFileDialog fd (TQString(), mimelist, this, "Export Layer", true); fd.setCaption(i18n("Export Layer")); fd.setMimeFilter(listMimeFilter); fd.setOperationMode(KFileDialog::Saving); @@ -1711,7 +1711,7 @@ void KisView::saveLayerAsImage() if (!fd.exec()) return; KURL url = fd.selectedURL(); - QString mimefilter = fd.currentMimeFilter(); + TQString mimefilter = fd.currentMimeFilter(); if (url.isEmpty()) return; @@ -1723,7 +1723,7 @@ void KisView::saveLayerAsImage() KisLayerSP l = img->activeLayer(); if (!l) return; - QRect r = l->exactBounds(); + TQRect r = l->exactBounds(); KisDoc d; d.prepareForImport(); @@ -1738,7 +1738,7 @@ void KisView::saveLayerAsImage() -Q_INT32 KisView::importImage(const KURL& urlArg) +TQ_INT32 KisView::importImage(const KURL& urlArg) { KisImageSP currentImage = currentImg(); @@ -1747,11 +1747,11 @@ Q_INT32 KisView::importImage(const KURL& urlArg) } KURL::List urls; - Q_INT32 rc = 0; + TQ_INT32 rc = 0; if (urlArg.isEmpty()) { - QString mimelist = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Import).join(" "); - urls = KFileDialog::getOpenURLs(QString::null, mimelist, 0, i18n("Import Image")); + TQString mimelist = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Import).join(" "); + urls = KFileDialog::getOpenURLs(TQString(), mimelist, 0, i18n("Import Image")); } else { urls.push_back(urlArg); } @@ -1862,15 +1862,15 @@ void KisView::rotateLayer(double radians) } KisFilterStrategy *filter = KisFilterStrategyRegistry::instance()->get(KisID("Triangle")); - QRect r; + TQRect r; if(dev->hasSelection()) r = dev->selection()->selectedExactRect(); else r = dev->exactBounds(); double cx = r.x()+r.width()/2.0; double cy = r.y()+r.height()/2.0; - Q_INT32 tx = Q_INT32(cx*cos(radians) - cy*sin(radians) - cx + 0.5); - Q_INT32 ty = Q_INT32(cy*cos(radians) + cx*sin(radians) - cy + 0.5); + TQ_INT32 tx = TQ_INT32(cx*cos(radians) - cy*sin(radians) - cx + 0.5); + TQ_INT32 ty = TQ_INT32(cy*cos(radians) + cx*sin(radians) - cy + 0.5); KisTransformWorker tw(dev, 1.0, 1.0, 0, 0, radians, -tx, -ty, m_progress, filter); tw.run(); @@ -1965,7 +1965,7 @@ void KisView::preferences() } else { m_OpenGLImageContext = 0; - m_canvas->createQPaintDeviceCanvas(); + m_canvas->createTQPaintDeviceCanvas(); } connectCurrentImg(); @@ -2082,26 +2082,26 @@ void KisView::slotUpdateFullScreen(bool toggle) uint newState = KoView::shell()->windowState(); if (toggle) { - newState |= Qt::WindowFullScreen; + newState |= TQt::WindowFullScreen; } else { - newState &= ~Qt::WindowFullScreen; + newState &= ~TQt::WindowFullScreen; } KoView::shell()->setWindowState(newState); } } -Q_INT32 KisView::docWidth() const +TQ_INT32 KisView::docWidth() const { return currentImg() ? currentImg()->width() : 0; } -Q_INT32 KisView::docHeight() const +TQ_INT32 KisView::docHeight() const { return currentImg() ? currentImg()->height() : 0; } -void KisView::scrollTo(Q_INT32 x, Q_INT32 y) +void KisView::scrollTo(TQ_INT32 x, TQ_INT32 y) { if (m_hScroll->isVisible()) { m_hScroll->setValue(x); @@ -2160,14 +2160,14 @@ void KisView::setBGColor(const KisColor& c) { m_bg = c; notifyObservers(); - emit sigBGQColorChanged( c.toQColor() ); + emit sigBGTQColorChanged( c.toTQColor() ); } void KisView::setFGColor(const KisColor& c) { m_fg = c; notifyObservers(); - emit sigFGQColorChanged( c.toQColor() ); + emit sigFGTQColorChanged( c.toTQColor() ); } void KisView::slotSetFGColor(const KisColor& c) @@ -2184,18 +2184,18 @@ void KisView::slotSetBGColor(const KisColor& c) notifyObservers(); } -void KisView::slotSetFGQColor(const QColor& c) +void KisView::slotSetFGTQColor(const TQColor& c) { KisColorSpace * monitorSpace = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA"), m_monitorProfile); setFGColor(KisColor(c, monitorSpace)); - emit sigFGQColorChanged(c); + emit sigFGTQColorChanged(c); } -void KisView::slotSetBGQColor(const QColor& c) +void KisView::slotSetBGTQColor(const TQColor& c) { KisColorSpace * monitorSpace = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA"), m_monitorProfile); setBGColor(KisColor(c, monitorSpace)); - emit sigBGQColorChanged(c); + emit sigBGTQColorChanged(c); } @@ -2212,7 +2212,7 @@ void KisView::setupPrinter(KPrinter& printer) void KisView::print(KPrinter& printer) { - QPainter gc(&printer); + TQPainter gc(&printer); KisImageSP img = currentImg(); if (!img) return; @@ -2221,14 +2221,14 @@ void KisView::print(KPrinter& printer) gc.setClipping(false); KisConfig cfg; - QString printerProfileName = cfg.printerProfile(); + TQString printerProfileName = cfg.printerProfile(); KisProfile * printerProfile = KisMetaRegistry::instance()->csRegistry() ->getProfileByName(printerProfileName); - QRect r = img->bounds(); + TQRect r = img->bounds(); img->renderToPainter(r.x(), r.y(), r.width(), r.height(), gc, printerProfile, KisImage::PAINT_IMAGE_ONLY, HDRExposure()); } -void KisView::paintToolOverlay(const QRegion& region) +void KisView::paintToolOverlay(const TQRegion& region) { if (!region.isEmpty() && m_toolManager->currentTool() && !m_toolIsPainting) { KisCanvasPainter gc(m_canvas); @@ -2236,19 +2236,19 @@ void KisView::paintToolOverlay(const QRegion& region) gc.setClipRegion(region); gc.setClipping(true); - // Prevent endless loop if the tool needs to have the canvas repainted + // Prevent endless loop if the tool needs to have the canvas tqrepainted m_toolIsPainting = true; m_toolManager->currentTool()->paint(gc, region.boundingRect()); m_toolIsPainting = false; } } -void KisView::canvasGotPaintEvent(QPaintEvent *event) +void KisView::canvasGotPaintEvent(TQPaintEvent *event) { if (m_canvas->isOpenGLCanvas()) { paintOpenGLView(event->rect()); } else { - paintQPaintDeviceView(event->region()); + paintTQPaintDeviceView(event->region()); } } @@ -2274,19 +2274,19 @@ void KisView::canvasGotButtonPressEvent(KisButtonPressEvent *e) KisImageSP img = currentImg(); // if (img) { -// QPoint pt = mapToScreen(e->pos().floorQPoint()); +// TQPoint pt = mapToScreen(e->pos().floorTQPoint()); // KisGuideMgr *mgr = img->guides(); // -// m_lastGuidePoint = mapToScreen(e->pos().floorQPoint()); +// m_lastGuidePoint = mapToScreen(e->pos().floorTQPoint()); // m_currentGuide = 0; // -// if ((e->state() & ~Qt::ShiftButton) == Qt::NoButton) { -// KisGuideSP gd = mgr->find(static_cast(pt.x() / zoom()), static_cast(pt.y() / zoom()), QMAX(2.0, 2.0 / zoom())); +// if ((e->state() & ~TQt::ShiftButton) == Qt::NoButton) { +// KisGuideSP gd = mgr->tqfind(static_cast(pt.x() / zoom()), static_cast(pt.y() / zoom()), TQMAX(2.0, 2.0 / zoom())); // // if (gd) { // m_currentGuide = gd; // -// if ((e->button() == Qt::RightButton) || ((e->button() & Qt::ShiftButton) == Qt::ShiftButton)) { +// if ((e->button() == Qt::RightButton) || ((e->button() & TQt::ShiftButton) == TQt::ShiftButton)) { // if (gd->isSelected()) // mgr->unselect(gd); // else @@ -2304,13 +2304,13 @@ void KisView::canvasGotButtonPressEvent(KisButtonPressEvent *e) // } // } if (e->button() == Qt::RightButton) { - QPopupMenu * m_popup = 0; + TQPopupMenu * m_popup = 0; if (factory()) { Q_ASSERT(factory()); - m_popup = (QPopupMenu *)factory()->container("image_popup", this); + m_popup = (TQPopupMenu *)factory()->container("image_popup", this); } if (m_popup) { - m_popup->popup(e->globalPos().roundQPoint()); + m_popup->popup(e->globalPos().roundTQPoint()); } } else if (e->device() == currentInputDevice() && m_toolManager->currentTool()) { @@ -2357,7 +2357,7 @@ void KisView::canvasGotMoveEvent(KisMoveEvent *e) #if 0 if (img && m_currentGuide) { - QPoint p = mapToScreen(e->pos().floorQPoint()); + TQPoint p = mapToScreen(e->pos().floorTQPoint()); KisGuideMgr *mgr = img->guides(); if (((e->state() & Qt::LeftButton) == Qt::LeftButton) && mgr->hasSelected()) { @@ -2381,7 +2381,7 @@ void KisView::canvasGotMoveEvent(KisMoveEvent *e) m_toolManager->currentTool()->move(&ev); } -// m_lastGuidePoint = mapToScreen(e->pos().floorQPoint()); +// m_lastGuidePoint = mapToScreen(e->pos().floorTQPoint()); emit cursorPosition(wp.floorX(), wp.floorY()); } @@ -2405,13 +2405,13 @@ int KisView::bottomBorder() const return m_vScrollBarExtent; } -void KisView::mouseMoveEvent(QMouseEvent *e) +void KisView::mouseMoveEvent(TQMouseEvent *e) { KisMoveEvent ke(currentInputDevice(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->state()); canvasGotMoveEvent(&ke); } -void KisView::slotAutoScroll(const QPoint &p) +void KisView::slotAutoScroll(const TQPoint &p) { scrollTo(horzValue()+p.x(), vertValue()+p.y()); } @@ -2480,17 +2480,17 @@ void KisView::canvasGotDoubleClickEvent(KisDoubleClickEvent *e) } } -void KisView::canvasGotEnterEvent(QEvent *e) +void KisView::canvasGotEnterEvent(TQEvent *e) { Q_UNUSED( e ); } -void KisView::canvasGotLeaveEvent (QEvent *e) +void KisView::canvasGotLeaveEvent (TQEvent *e) { Q_UNUSED( e ); } -void KisView::canvasGotMouseWheelEvent(QWheelEvent *event) +void KisView::canvasGotMouseWheelEvent(TQWheelEvent *event) { //if(event->state() == ControlButton ) //{ @@ -2508,18 +2508,18 @@ void KisView::canvasGotMouseWheelEvent(QWheelEvent *event) } } //} else { - // QApplication::sendEvent(m_vScroll, event); + // TQApplication::sendEvent(m_vScroll, event); //} } -void KisView::canvasGotKeyPressEvent(QKeyEvent *event) +void KisView::canvasGotKeyPressEvent(TQKeyEvent *event) { if (!m_toolManager->currentTool()) { event->ignore(); return; } - if (event->key() == Qt::Key_Space) { + if (event->key() == TQt::Key_Space) { if (!m_panning) { // Set tool temporarily to pan m_panning = true; @@ -2537,26 +2537,26 @@ void KisView::canvasGotKeyPressEvent(QKeyEvent *event) m_toolManager->currentTool()->keyPress(event); } -void KisView::canvasGotKeyReleaseEvent(QKeyEvent *event) +void KisView::canvasGotKeyReleaseEvent(TQKeyEvent *event) { if (m_toolManager->currentTool()) m_toolManager->currentTool()->keyRelease(event); } -void KisView::canvasGotDragEnterEvent(QDragEnterEvent *event) +void KisView::canvasGotDragEnterEvent(TQDragEnterEvent *event) { bool accept = false; // Only accept drag if we're not busy, particularly as we may - // be showing a progress bar and calling qApp->processEvents(). - if (KURLDrag::canDecode(event) && QApplication::overrideCursor() == 0) { + // be showing a progress bar and calling tqApp->processEvents(). + if (KURLDrag::canDecode(event) && TQApplication::overrideCursor() == 0) { accept = true; } event->accept(accept); } -void KisView::canvasGotDropEvent(QDropEvent *event) +void KisView::canvasGotDropEvent(TQDropEvent *event) { KURL::List urls; @@ -2587,7 +2587,7 @@ void KisView::canvasGotDropEvent(QDropEvent *event) popup.insertSeparator(); popup.insertItem(i18n("Cancel"), cancelId); - int actionId = popup.exec(QCursor::pos()); + int actionId = popup.exec(TQCursor::pos()); if (actionId >= 0 && actionId != cancelId) { for (KURL::List::ConstIterator it = urls.begin (); it != urls.end (); ++it) { @@ -2620,11 +2620,11 @@ namespace { typedef KNamedCommand super; public: - // The QStrings are the _serialized_ configs + // The TQStrings are the _serialized_ configs KisChangeFilterCmd(KisAdjustmentLayerSP layer, KisFilterConfiguration* config, - const QString& before, - const QString& after) : super(i18n("Change Filter")) + const TQString& before, + const TQString& after) : super(i18n("Change Filter")) { m_layer = layer; m_config = config; @@ -2634,28 +2634,28 @@ namespace { public: virtual void execute() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_config->fromXML(m_after); //Q_ASSERT(m_after == m_config->toString()); m_layer->setFilter(m_config); m_layer->setDirty(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } virtual void unexecute() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_config->fromXML(m_before); //Q_ASSERT(m_before == m_config->toString()); m_layer->setFilter(m_config); m_layer->setDirty(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } private: KisAdjustmentLayerSP m_layer; KisFilterConfiguration* m_config; - QString m_before; - QString m_after; + TQString m_before; + TQString m_after; }; } @@ -2677,8 +2677,8 @@ void KisView::showLayerProperties(KisLayerSP layer) if (KisAdjustmentLayerSP alayer = dynamic_cast(layer.data())) { KisDlgAdjLayerProps dlg(alayer, alayer->name(), i18n("Adjustment Layer Properties"), this, "dlgadjlayerprops"); - QString before = dlg.filterConfiguration()->toString(); - if (dlg.exec() == QDialog::Accepted) + TQString before = dlg.filterConfiguration()->toString(); + if (dlg.exec() == TQDialog::Accepted) { KisChangeFilterCmd * cmd = new KisChangeFilterCmd(alayer, dlg.filterConfiguration(), @@ -2695,18 +2695,18 @@ void KisView::showLayerProperties(KisLayerSP layer) layer->opacity(), layer->compositeOp(), cs); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { if (layer->name() != dlg.getName() || layer->opacity() != dlg.getOpacity() || layer->compositeOp() != dlg.getCompositeOp()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_adapter->beginMacro(i18n("Property Changes")); layer->image()->setLayerProperties(layer, dlg.getOpacity(), dlg.getCompositeOp(), dlg.getName()); layer->setDirty(); m_adapter->endMacro(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_doc->setModified( true ); } } @@ -2717,29 +2717,29 @@ void KisView::layerAdd() { KisImageSP img = currentImg(); if (img && img->activeLayer()) { - addLayer(img->activeLayer()->parent(), img->activeLayer()); + addLayer(img->activeLayer()->tqparent(), img->activeLayer()); } else if (img) addLayer(static_cast(img->rootLayer().data()), 0); } -void KisView::addLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addLayer(KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (img) { KisConfig cfg; - QString profilename; + TQString profilename; if(img->colorSpace()->getProfile()) profilename = img->colorSpace()->getProfile()->productName(); NewLayerDialog dlg(img->colorSpace()->id(), profilename, img->nextLayerName(), this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisColorSpace* cs = KisMetaRegistry::instance()-> csRegistry() -> getColorSpace(dlg.colorSpaceID(),dlg.profileName()); KisLayerSP layer = new KisPaintLayer(img, dlg.layerName(), dlg.opacity(), cs); if (layer) { layer->setCompositeOp(dlg.compositeOp()); - img->addLayer(layer, parent.data(), above); + img->addLayer(layer, tqparent.data(), above); updateCanvas(); } else { KMessageBox::error(this, i18n("Could not add layer to image."), i18n("Layer Error")); @@ -2751,22 +2751,22 @@ void KisView::addLayer(KisGroupLayerSP parent, KisLayerSP above) } } -void KisView::addGroupLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addGroupLayer(KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (img) { - QString profilename; + TQString profilename; if(img->colorSpace()->getProfile()) profilename = img->colorSpace()->getProfile()->productName(); KisConfig cfg; NewLayerDialog dlg(img->colorSpace()->id(), profilename, img->nextLayerName(), this); dlg.setColorSpaceEnabled(false); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisLayerSP layer = new KisGroupLayer(img, dlg.layerName(), dlg.opacity()); if (layer) { layer->setCompositeOp(dlg.compositeOp()); - img->addLayer(layer, parent.data(), above); + img->addLayer(layer, tqparent.data(), above); updateCanvas(); } else { KMessageBox::error(this, i18n("Could not add layer to image."), i18n("Layer Error")); @@ -2783,35 +2783,35 @@ void KisView::addPartLayer() addPartLayer(img->rootLayer(), img->rootLayer()->firstChild(), m_actionPartLayer->documentEntry()); } -void KisView::addPartLayer(KisGroupLayerSP parent, KisLayerSP above, const KoDocumentEntry& entry) +void KisView::addPartLayer(KisGroupLayerSP tqparent, KisLayerSP above, const KoDocumentEntry& entry) { delete m_partHandler; // Only one at a time - m_partHandler = new KisPartLayerHandler(this, entry, parent, above); - - disconnect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), this, 0); - - connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), - m_partHandler, SLOT(gotButtonPressEvent(KisButtonPressEvent*))); - connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), - m_partHandler, SLOT(gotButtonReleaseEvent(KisButtonReleaseEvent*))); - connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - m_partHandler, SLOT(gotMoveEvent(KisMoveEvent*))); - connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - m_partHandler, SLOT(gotKeyPressEvent(QKeyEvent*))); - - connect(m_partHandler, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - connect(m_partHandler, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); - connect(m_partHandler, SIGNAL(handlerDone()), - this, SLOT(reconnectAfterPartInsert())); -} - -void KisView::insertPart(const QRect& viewRect, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above) { + m_partHandler = new KisPartLayerHandler(this, entry, tqparent, above); + + disconnect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), this, 0); + + connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), + m_partHandler, TQT_SLOT(gotButtonPressEvent(KisButtonPressEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), + m_partHandler, TQT_SLOT(gotButtonReleaseEvent(KisButtonReleaseEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + m_partHandler, TQT_SLOT(gotMoveEvent(KisMoveEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + m_partHandler, TQT_SLOT(gotKeyPressEvent(TQKeyEvent*))); + + connect(m_partHandler, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + connect(m_partHandler, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); + connect(m_partHandler, TQT_SIGNAL(handlerDone()), + this, TQT_SLOT(reconnectAfterPartInsert())); +} + +void KisView::insertPart(const TQRect& viewRect, const KoDocumentEntry& entry, + KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (!img) return; @@ -2822,27 +2822,27 @@ void KisView::insertPart(const QRect& viewRect, const KoDocumentEntry& entry, if ( !doc->showEmbedInitDialog(this) ) return; - QRect rect = viewToWindow(viewRect); + TQRect rect = viewToWindow(viewRect); KisChildDoc * childDoc = m_doc->createChildDoc(rect, doc); KisPartLayerImpl* partLayer = new KisPartLayerImpl(img, childDoc); partLayer->setDocType(entry.service()->genericName()); - img->addLayer(partLayer, parent, above); + img->addLayer(partLayer, tqparent, above); m_doc->setModified(true); reconnectAfterPartInsert(); } void KisView::reconnectAfterPartInsert() { - connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), - this, SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); - connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), - this, SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); - connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), + this, TQT_SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), + this, TQT_SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); delete m_partHandler; m_partHandler = 0; @@ -2853,12 +2853,12 @@ void KisView::addAdjustmentLayer() KisImageSP img = currentImg(); if (!img) return; - addAdjustmentLayer( img->activeLayer()->parent(), img->activeLayer() ); + addAdjustmentLayer( img->activeLayer()->tqparent(), img->activeLayer() ); } -void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above) { - Q_ASSERT(parent); + Q_ASSERT(tqparent); Q_ASSERT(above); KisImageSP img = currentImg(); @@ -2890,23 +2890,23 @@ void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above) } KisDlgAdjustmentLayer dlg(img, img->nextLayerName(), i18n("New Adjustment Layer"), this, "dlgadjustmentlayer"); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisSelectionSP selection = 0; if (dev->hasSelection()) { selection = dev->selection(); } KisFilterConfiguration * filter = dlg.filterConfiguration(); - QString name = dlg.layerName(); + TQString name = dlg.layerName(); - addAdjustmentLayer( parent, above, name, filter, selection); + addAdjustmentLayer( tqparent, above, name, filter, selection); } } -void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const QString & name, +void KisView::addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above, const TQString & name, KisFilterConfiguration * filter, KisSelectionSP selection) { - Q_ASSERT(parent); + Q_ASSERT(tqparent); Q_ASSERT(above); Q_ASSERT(filter); @@ -2914,7 +2914,7 @@ void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const if (!img) return; KisAdjustmentLayer * l = new KisAdjustmentLayer(img, name, filter, selection); - img->addLayer(l, parent, above); + img->addLayer(l, tqparent, above); } void KisView::slotChildActivated(bool a) { @@ -2943,8 +2943,8 @@ void KisView::layerRemove() img->removeLayer(layer); - if (layer->parent()) - layer->parent()->setDirty(layer->extent()); + if (layer->tqparent()) + layer->tqparent()->setDirty(layer->extent()); updateCanvas(); layerUpdateGUI(img->activeLayer() != 0); @@ -2965,8 +2965,8 @@ void KisView::layerDuplicate() return; KisLayerSP dup = active->clone(); - dup->setName(i18n("Duplicate of '%1'").arg(active->name())); - img->addLayer(dup, active->parent().data(), active); + dup->setName(i18n("Duplicate of '%1'").tqarg(active->name())); + img->addLayer(dup, active->tqparent().data(), active); if (dup) { img->activate( dup ); updateCanvas(); @@ -3079,26 +3079,26 @@ void KisView::scrollH(int value) if (xShift > 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, 0, xShift, m_canvasPixmap.height()); + TQRect drawRect(0, 0, xShift, m_canvasPixmap.height()); bitBlt(&m_canvasPixmap, xShift, 0, &m_canvasPixmap, 0, 0, m_canvasPixmap.width() - xShift, m_canvasPixmap.height()); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } else if (xShift < 0) { - QRect drawRect(m_canvasPixmap.width() + xShift, 0, -xShift, m_canvasPixmap.height()); + TQRect drawRect(m_canvasPixmap.width() + xShift, 0, -xShift, m_canvasPixmap.height()); if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { bitBlt(&m_canvasPixmap, 0, 0, &m_canvasPixmap, -xShift, 0, m_canvasPixmap.width() + xShift, m_canvasPixmap.height()); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } if (m_oldTool) { @@ -3124,26 +3124,26 @@ void KisView::scrollV(int value) if (yShift > 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, 0, m_canvasPixmap.width(), yShift); + TQRect drawRect(0, 0, m_canvasPixmap.width(), yShift); bitBlt(&m_canvasPixmap, 0, yShift, &m_canvasPixmap, 0, 0, m_canvasPixmap.width(), m_canvasPixmap.height() - yShift); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } else if (yShift < 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, m_canvasPixmap.height() + yShift, m_canvasPixmap.width(), -yShift); + TQRect drawRect(0, m_canvasPixmap.height() + yShift, m_canvasPixmap.width(), -yShift); bitBlt(&m_canvasPixmap, 0, 0, &m_canvasPixmap, 0, -yShift, m_canvasPixmap.width(), m_canvasPixmap.height() + yShift); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } if (m_oldTool) { @@ -3161,53 +3161,53 @@ void KisView::scrollV(int value) void KisView::setupCanvas() { m_canvas = new KisCanvas(this, "kis_canvas"); - m_canvas->setFocusPolicy( QWidget::StrongFocus ); - QObject::connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent*)), this, SLOT(canvasGotDoubleClickEvent(KisDoubleClickEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotPaintEvent(QPaintEvent*)), this, SLOT(canvasGotPaintEvent(QPaintEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotEnterEvent(QEvent*)), this, SLOT(canvasGotEnterEvent(QEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotLeaveEvent(QEvent*)), this, SLOT(canvasGotLeaveEvent(QEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotMouseWheelEvent(QWheelEvent*)), this, SLOT(canvasGotMouseWheelEvent(QWheelEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotKeyReleaseEvent(QKeyEvent*)), this, SLOT(canvasGotKeyReleaseEvent(QKeyEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDragEnterEvent(QDragEnterEvent*)), this, SLOT(canvasGotDragEnterEvent(QDragEnterEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDropEvent(QDropEvent*)), this, SLOT(canvasGotDropEvent(QDropEvent*))); + m_canvas->setFocusPolicy( TQ_StrongFocus ); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, TQT_SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, TQT_SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent*)), this, TQT_SLOT(canvasGotDoubleClickEvent(KisDoubleClickEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotPaintEvent(TQPaintEvent*)), this, TQT_SLOT(canvasGotPaintEvent(TQPaintEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotEnterEvent(TQEvent*)), this, TQT_SLOT(canvasGotEnterEvent(TQEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotLeaveEvent(TQEvent*)), this, TQT_SLOT(canvasGotLeaveEvent(TQEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotMouseWheelEvent(TQWheelEvent*)), this, TQT_SLOT(canvasGotMouseWheelEvent(TQWheelEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotKeyReleaseEvent(TQKeyEvent*)), this, TQT_SLOT(canvasGotKeyReleaseEvent(TQKeyEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDragEnterEvent(TQDragEnterEvent*)), this, TQT_SLOT(canvasGotDragEnterEvent(TQDragEnterEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDropEvent(TQDropEvent*)), this, TQT_SLOT(canvasGotDropEvent(TQDropEvent*))); } void KisView::connectCurrentImg() { if (m_image) { - connect(m_image, SIGNAL(sigActiveSelectionChanged(KisImageSP)), m_selectionManager, SLOT(imgSelectionChanged(KisImageSP))); - connect(m_image, SIGNAL(sigActiveSelectionChanged(KisImageSP)), this, SLOT(updateCanvas())); - connect(m_image, SIGNAL(sigColorSpaceChanged(KisColorSpace *)), this, SLOT(updateStatusBarProfileLabel())); - connect(m_image, SIGNAL(sigProfileChanged(KisProfile * )), SLOT(profileChanged(KisProfile * ))); - - connect(m_image, SIGNAL(sigLayersChanged(KisGroupLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigMaskInfoChanged()), SLOT(maskUpdated())); - connect(m_image, SIGNAL(sigLayerAdded(KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerActivated(KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerActivated(KisLayerSP)), SLOT(updateCanvas())); - connect(m_image, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigActiveSelectionChanged(KisImageSP)), m_selectionManager, TQT_SLOT(imgSelectionChanged(KisImageSP))); + connect(m_image, TQT_SIGNAL(sigActiveSelectionChanged(KisImageSP)), this, TQT_SLOT(updateCanvas())); + connect(m_image, TQT_SIGNAL(sigColorSpaceChanged(KisColorSpace *)), this, TQT_SLOT(updateStatusBarProfileLabel())); + connect(m_image, TQT_SIGNAL(sigProfileChanged(KisProfile * )), TQT_SLOT(profileChanged(KisProfile * ))); + + connect(m_image, TQT_SIGNAL(sigLayersChanged(KisGroupLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigMaskInfoChanged()), TQT_SLOT(tqmaskUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), TQT_SLOT(updateCanvas())); + connect(m_image, TQT_SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), TQT_SLOT(layersUpdated())); KisConnectPartLayerVisitor v(m_image, this, true); m_image->rootLayer()->accept(v); - connect(m_image, SIGNAL(sigLayerAdded(KisLayerSP)), - SLOT(handlePartLayerAdded(KisLayerSP))); + connect(m_image, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), + TQT_SLOT(handlePartLayerAdded(KisLayerSP))); - maskUpdated(); + tqmaskUpdated(); #ifdef HAVE_GL if (m_OpenGLImageContext != 0) { - connect(m_OpenGLImageContext, SIGNAL(sigImageUpdated(QRect)), SLOT(slotOpenGLImageUpdated(QRect))); - connect(m_OpenGLImageContext, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_OpenGLImageContext, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(slotOpenGLImageUpdated(TQRect))); + connect(m_OpenGLImageContext, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); } else #endif { - connect(m_image, SIGNAL(sigImageUpdated(QRect)), SLOT(imgUpdated(QRect))); - connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(imgUpdated(TQRect))); + connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); } } @@ -3239,16 +3239,16 @@ void KisView::handlePartLayerAdded(KisLayerSP layer) if (!l) return; - connect(this, SIGNAL(childActivated(KoDocumentChild*)), - layer, SLOT(childActivated(KoDocumentChild*))); + connect(this, TQT_SIGNAL(childActivated(KoDocumentChild*)), + layer, TQT_SLOT(childActivated(KoDocumentChild*))); } -void KisView::imgUpdated(QRect rc) +void KisView::imgUpdated(TQRect rc) { updateCanvas(rc); } -void KisView::slotOpenGLImageUpdated(QRect rc) +void KisView::slotOpenGLImageUpdated(TQRect rc) { paintOpenGLView(windowToView(rc)); } @@ -3258,13 +3258,13 @@ void KisView::profileChanged(KisProfile * /*profile*/) updateStatusBarProfileLabel(); } -void KisView::slotImageSizeChanged(Q_INT32 /*w*/, Q_INT32 /*h*/) +void KisView::slotImageSizeChanged(TQ_INT32 /*w*/, TQ_INT32 /*h*/) { resizeEvent(0); refreshKisCanvas(); } -void KisView::resizeCurrentImage(Q_INT32 w, Q_INT32 h, bool cropLayers) +void KisView::resizeCurrentImage(TQ_INT32 w, TQ_INT32 h, bool cropLayers) { if (!currentImg()) return; @@ -3298,9 +3298,9 @@ void KisView::shearCurrentImage(double angleX, double angleY) } -QPoint KisView::viewToWindow(const QPoint& pt) +TQPoint KisView::viewToWindow(const TQPoint& pt) { - QPoint converted; + TQPoint converted; converted.rx() = static_cast((pt.x() + horzValue()) / zoom()); converted.ry() = static_cast((pt.y() + vertValue()) / zoom()); @@ -3308,9 +3308,9 @@ QPoint KisView::viewToWindow(const QPoint& pt) return converted; } -QPoint KisView::viewToWindow(const QPoint& pt) const +TQPoint KisView::viewToWindow(const TQPoint& pt) const { - QPoint converted; + TQPoint converted; converted.rx() = static_cast((pt.x() + horzValue()) / zoom()); converted.ry() = static_cast((pt.y() + vertValue()) / zoom()); @@ -3328,9 +3328,9 @@ KisPoint KisView::viewToWindow(const KisPoint& pt) return converted; } -QRect KisView::viewToWindow(const QRect& rc) +TQRect KisView::viewToWindow(const TQRect& rc) { - QRect r; + TQRect r; r.setTopLeft(viewToWindow(rc.topLeft())); r.setRight((int)(ceil((rc.right() + 1.0 + horzValue()) / zoom()) - 1)); @@ -3351,27 +3351,27 @@ KisRect KisView::viewToWindow(const KisRect& rc) return r; } -void KisView::viewToWindow(Q_INT32 *x, Q_INT32 *y) +void KisView::viewToWindow(TQ_INT32 *x, TQ_INT32 *y) { if (x && y) { - QPoint p = viewToWindow(QPoint(*x, *y)); + TQPoint p = viewToWindow(TQPoint(*x, *y)); *x = p.x(); *y = p.y(); } } -QPoint KisView::windowToView(const QPoint& pt) +TQPoint KisView::windowToView(const TQPoint& pt) { - QPoint p; + TQPoint p; p.setX(static_cast(pt.x() * zoom() - horzValue())); p.setY(static_cast(pt.y() * zoom() - vertValue())); return p; } -QPoint KisView::windowToView(const QPoint& pt) const +TQPoint KisView::windowToView(const TQPoint& pt) const { - QPoint p; + TQPoint p; p.setX(static_cast(pt.x() * zoom() - horzValue())); p.setY(static_cast(pt.y() * zoom() - vertValue())); @@ -3387,9 +3387,9 @@ KisPoint KisView::windowToView(const KisPoint& pt) return p; } -QRect KisView::windowToView(const QRect& rc) +TQRect KisView::windowToView(const TQRect& rc) { - QRect r; + TQRect r; r.setTopLeft(windowToView(rc.topLeft())); r.setRight((int)(ceil((rc.right() + 1.0) * zoom()) - horzValue() - 1)); @@ -3410,10 +3410,10 @@ KisRect KisView::windowToView(const KisRect& rc) return r; } -void KisView::windowToView(Q_INT32 *x, Q_INT32 *y) +void KisView::windowToView(TQ_INT32 *x, TQ_INT32 *y) { if (x && y) { - QPoint p = windowToView(QPoint(*x, *y)); + TQPoint p = windowToView(TQPoint(*x, *y)); *x = p.x(); *y = p.y(); } @@ -3439,29 +3439,29 @@ void KisView::guiActivateEvent(KParts::GUIActivateEvent *event) super::guiActivateEvent(event); } -bool KisView::eventFilter(QObject *o, QEvent *e) +bool KisView::eventFilter(TQObject *o, TQEvent *e) { Q_ASSERT(o); Q_ASSERT(e); switch (e->type()) { - case QEvent::TabletMove: - case QEvent::TabletPress: - case QEvent::TabletRelease: + case TQEvent::TabletMove: + case TQEvent::TabletPress: + case TQEvent::TabletRelease: { - QTabletEvent *te = static_cast(e); + TQTabletEvent *te = static_cast(e); KisInputDevice device; switch (te->device()) { default: - case QTabletEvent::Stylus: - case QTabletEvent::NoDevice: + case TQTabletEvent::Stylus: + case TQTabletEvent::NoDevice: device = KisInputDevice::stylus(); break; - case QTabletEvent::Puck: + case TQTabletEvent::Puck: device = KisInputDevice::puck(); break; - case QTabletEvent::Eraser: + case TQTabletEvent::Eraser: device = KisInputDevice::eraser(); break; } @@ -3470,13 +3470,13 @@ bool KisView::eventFilter(QObject *o, QEvent *e) // We ignore device change due to mouse events for a short duration // after a tablet event, since these are almost certainly mouse events - // sent to receivers that don't accept the tablet event. + // sent to tqreceivers that don't accept the tablet event. m_tabletEventTimer.start(); break; } - case QEvent::MouseButtonPress: - case QEvent::MouseMove: - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonPress: + case TQEvent::MouseMove: + case TQEvent::MouseButtonRelease: { #ifdef EXTENDED_X11_TABLET_SUPPORT KisInputDevice device = KisCanvasWidget::findActiveInputDevice(); @@ -3493,8 +3493,8 @@ bool KisView::eventFilter(QObject *o, QEvent *e) } break; } - case QEvent::KeyPress: - case QEvent::KeyRelease: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: { if (m_canvas->cursorIsOverCanvas()) { m_canvas->handleKeyEvent(e); @@ -3507,17 +3507,17 @@ bool KisView::eventFilter(QObject *o, QEvent *e) // This eventFilter is called for all widgets already, no need to install event filters multiple times // Even worse: with multiple views, they would all install event filters on each other's widgets, // due to the qapp event filter triggering in all views! - case QEvent::ChildInserted: + case TQEvent::ChildInserted: { - QChildEvent *childEvent = static_cast(e); - QObject *child = childEvent->child(); + TQChildEvent *childEvent = static_cast(e); + TQObject *child = childEvent->child(); if ( child->isWidgetType() ) { child->installEventFilter(this); - QObjectList *objectList = child->queryList("QWidget"); - QObjectListIt it(*objectList); - QObject *obj; + TQObjectList *objectList = child->queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectListIt it(*objectList); + TQObject *obj; while ((obj = it.current()) != 0) { obj->installEventFilter(this); ++it; @@ -3532,9 +3532,9 @@ bool KisView::eventFilter(QObject *o, QEvent *e) } #if 0 - if ((o == m_hRuler || o == m_vRuler) && (e->type() == QEvent::MouseMove || e->type() == QEvent::MouseButtonRelease)) { - QMouseEvent *me = dynamic_cast(e); - QPoint pt = mapFromGlobal(me->globalPos()); + if ((o == m_hRuler || o == m_vRuler) && (e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseButtonRelease)) { + TQMouseEvent *me = dynamic_cast(e); + TQPoint pt = mapFromGlobal(me->globalPos()); KisImageSP img = currentImg(); KisGuideMgr *mgr; @@ -3543,8 +3543,8 @@ bool KisView::eventFilter(QObject *o, QEvent *e) mgr = img->guides(); - if (e->type() == QEvent::MouseMove && (me->state() & Qt::LeftButton)) { - bool flag = geometry().contains(pt); + if (e->type() == TQEvent::MouseMove && (me->state() & Qt::LeftButton)) { + bool flag = tqgeometry().tqcontains(pt); KisGuideSP gd; if (m_currentGuide == 0 && flag) { @@ -3576,7 +3576,7 @@ bool KisView::eventFilter(QObject *o, QEvent *e) m_currentGuide = 0; } } - } else if (e->type() == QEvent::MouseButtonRelease && m_currentGuide) { + } else if (e->type() == TQEvent::MouseButtonRelease && m_currentGuide) { eraseGuides(); mgr->unselect(m_currentGuide); paintGuides(); @@ -3627,9 +3627,9 @@ void KisView::updateGuides() //{ //} -QPoint KisView::mapToScreen(const QPoint& pt) +TQPoint KisView::mapToScreen(const TQPoint& pt) { - QPoint converted; + TQPoint converted; converted.rx() = pt.x() + horzValue(); converted.ry() = pt.y() + vertValue(); @@ -3647,7 +3647,7 @@ void KisView::detach(KisCanvasObserver *observer) { Q_ASSERT(observer); if (observer) { - vKisCanvasObserver_it it = std::find(m_observers.begin(), m_observers.end(), observer); + vKisCanvasObserver_it it = std::tqfind(m_observers.begin(), m_observers.end(), observer); if (it != m_observers.end()) m_observers.erase(it); @@ -3759,10 +3759,10 @@ KisProgressDisplayInterface *KisView::progressDisplay() const return m_progress; } -QCursor KisView::setCanvasCursor(const QCursor & cursor) +TQCursor KisView::setCanvasCursor(const TQCursor & cursor) { - QCursor oldCursor = m_canvas->cursor(); - QCursor newCursor; + TQCursor oldCursor = m_canvas->cursor(); + TQCursor newCursor; KisConfig cfg; @@ -3811,51 +3811,51 @@ void KisView::createDockers() m_hsvwidget = new KoHSVWidget(this, "hsv"); m_hsvwidget->setCaption(i18n("HSV")); - connect(m_hsvwidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_hsvwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setBgColor(const QColor &))); + connect(m_hsvwidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_hsvwidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_hsvwidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_hsvwidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_hsvwidget, "hsvwidget", krita::COLORBOX, 0, PALETTE_DOCKER, true); m_rgbwidget = new KoRGBWidget(this, "rgb"); m_rgbwidget->setCaption(i18n("RGB")); - connect(m_rgbwidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_rgbwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setBgColor(const QColor &))); + connect(m_rgbwidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_rgbwidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_rgbwidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_rgbwidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_rgbwidget, "rgbwidget", krita::COLORBOX); m_graywidget = new KoGrayWidget(this, "gray"); m_graywidget->setCaption(i18n("Gray")); - connect(m_graywidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_graywidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_graywidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_graywidget, SLOT(setBgColor(const QColor &))); + connect(m_graywidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_graywidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_graywidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_graywidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_graywidget, "graywidget", krita::COLORBOX); //make sure the color chooser get right default values - emit sigFGQColorChanged(m_fg.toQColor()); - emit sigBGQColorChanged(m_bg.toQColor()); + emit sigFGTQColorChanged(m_fg.toTQColor()); + emit sigBGTQColorChanged(m_bg.toTQColor()); m_palettewidget = new KisPaletteWidget(this); m_palettewidget->setCaption(i18n("Palettes")); - connect(m_palettewidget, SIGNAL(colorSelected(const QColor &)), - this, SLOT(slotSetFGQColor(const QColor &))); + connect(m_palettewidget, TQT_SIGNAL(colorSelected(const TQColor &)), + this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); // No BGColor or reverse slotFGChanged->palette connections, since that's not useful here KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("PaletteServer"); - QValueList resources = rServer->resources(); - QValueList::iterator it; + TQValueList resources = rServer->resources(); + TQValueList::iterator it; for ( it = resources.begin(); it != resources.end(); ++it ) { m_palettewidget->slotAddPalette( *it ); } - connect(m_palettewidget, SIGNAL(colorSelected(const KisColor &)), this, SLOT(slotSetFGColor(const KisColor &))); + connect(m_palettewidget, TQT_SIGNAL(colorSelected(const KisColor &)), this, TQT_SLOT(slotSetFGColor(const KisColor &))); m_paletteManager->addWidget( m_palettewidget, "palettewidget", krita::COLORBOX, 10, PALETTE_DOCKER, true); } -QPoint KisView::applyViewTransformations(const QPoint& p) const { - QPoint point(windowToView(p)); +TQPoint KisView::applyViewTransformations(const TQPoint& p) const { + TQPoint point(windowToView(p)); if (m_hRuler->isShown()) point.ry() += m_hRuler->height(); @@ -3865,11 +3865,11 @@ QPoint KisView::applyViewTransformations(const QPoint& p) const { return point; } -QPoint KisView::reverseViewTransformations(const QPoint& p) const { +TQPoint KisView::reverseViewTransformations(const TQPoint& p) const { // Since we now zoom ourselves, the only thing super::~ does is nothing anymore. // Hence, zoom ourselves, like super would // viewToWindow doesn't take the rulers into account, do that ourselves - QPoint point(p); + TQPoint point(p); if (m_hRuler -> isShown()) point.ry() -= m_hRuler -> height(); if (m_vRuler -> isShown()) @@ -3880,7 +3880,7 @@ QPoint KisView::reverseViewTransformations(const QPoint& p) const { void KisView::canvasAddChild(KoViewChild *child) { super::canvasAddChild(child); - connect(this, SIGNAL(viewTransformationsChanged()), child, SLOT(reposition())); + connect(this, TQT_SIGNAL(viewTransformationsChanged()), child, TQT_SLOT(reposition())); m_vScroll->raise(); m_hScroll->raise(); m_vScroll->raise(); @@ -3894,7 +3894,7 @@ void KisView::slotLoadingFinished() setCurrentImage(document()->currentImage()); m_paletteManager->showWidget( "layerbox" ); m_canvas->show(); - disconnect(document(), SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + disconnect(document(), TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); m_imageLoaded = true; startInitialZoomTimerIfReady(); @@ -3933,7 +3933,7 @@ void KisView::slotMaskFromSelection() { if (!layer) return; - KNamedCommand *cmd = layer->maskFromSelectionCommand(); + KNamedCommand *cmd = layer->tqmaskFromSelectionCommand(); cmd->execute(); if (undoAdapter() && undoAdapter()->undo()) { undoAdapter()->addCommand(cmd); @@ -3945,7 +3945,7 @@ void KisView::slotMaskToSelection() { if (!layer) return; - KNamedCommand *cmd = layer->maskToSelectionCommand(); + KNamedCommand *cmd = layer->tqmaskToSelectionCommand(); cmd->execute(); if (undoAdapter() && undoAdapter()->undo()) { undoAdapter()->addCommand(cmd); @@ -3992,7 +3992,7 @@ void KisView::slotShowMask() { layer->setRenderMask(m_showMask->isChecked()); } -void KisView::maskUpdated() { +void KisView::tqmaskUpdated() { KisPaintLayer* layer = dynamic_cast(currentImg()->activeLayer().data()); if (!layer) { m_createMask->setEnabled(false); @@ -4003,8 +4003,8 @@ void KisView::maskUpdated() { return; } m_createMask->setEnabled(!layer->hasMask()); - m_maskFromSelection->setEnabled(true); // Perhaps also update this to false when no selection? - m_maskToSelection->setEnabled(layer->hasMask()); + m_tqmaskFromSelection->setEnabled(true); // Perhaps also update this to false when no selection? + m_tqmaskToSelection->setEnabled(layer->hasMask()); m_applyMask->setEnabled(layer->hasMask()); m_removeMask->setEnabled(layer->hasMask()); diff --git a/krita/ui/kis_view.h b/krita/ui/kis_view.h index 71d97017..134d934a 100644 --- a/krita/ui/kis_view.h +++ b/krita/ui/kis_view.h @@ -29,10 +29,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -52,13 +52,13 @@ #include "kis_color.h" #include "kis_input_device.h" -class QButton; -class QLabel; -class QPaintEvent; -class QScrollBar; -class QWidget; -class QPopup; -class QPopupMenu; +class TQButton; +class TQLabel; +class TQPaintEvent; +class TQScrollBar; +class TQWidget; +class TQPopup; +class TQPopupMenu; class DCOPObject; class KAction; @@ -118,6 +118,7 @@ class KRITA_EXPORT KisView { Q_OBJECT + TQ_OBJECT typedef KoView super; @@ -126,16 +127,16 @@ class KRITA_EXPORT KisView typedef vKisCanvasObserver::const_iterator vKisCanvasObserver_cit; public: - KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent = 0, const char *name = 0); + KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisView(); public: // KXMLGUIBuilder implementation - virtual QWidget *createContainer( QWidget *parent, int index, const QDomElement &element, int &id ); - virtual void removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id ); + virtual TQWidget *createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ); + virtual void removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id ); public: // KoView implementation - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); virtual DCOPObject* dcopObject(); @@ -150,13 +151,13 @@ public: // KoView implementation virtual int topBorder() const; virtual int bottomBorder() const; - Q_INT32 docWidth() const; - Q_INT32 docHeight() const; + TQ_INT32 docWidth() const; + TQ_INT32 docHeight() const; void updateStatusBarSelectionLabel(); - virtual QPoint applyViewTransformations(const QPoint& p) const; - virtual QPoint reverseViewTransformations( const QPoint& p) const; + virtual TQPoint applyViewTransformations(const TQPoint& p) const; + virtual TQPoint reverseViewTransformations( const TQPoint& p) const; virtual void canvasAddChild(KoViewChild *child); signals: @@ -170,10 +171,10 @@ signals: * changed. **/ void currentColorSpaceChanged(KisColorSpace* cs); - void cursorPosition(Q_INT32 xpos, Q_INT32 ypos); + void cursorPosition(TQ_INT32 xpos, TQ_INT32 ypos); - void sigFGQColorChanged(const QColor &); - void sigBGQColorChanged(const QColor &); + void sigFGTQColorChanged(const TQColor &); + void sigBGTQColorChanged(const TQColor &); void sigInputDeviceChanged(const KisInputDevice& inputDevice); @@ -211,15 +212,15 @@ public slots: public: - virtual void mouseMoveEvent(QMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); - void resizeCurrentImage(Q_INT32 w, Q_INT32 h, bool cropLayers = false); + void resizeCurrentImage(TQ_INT32 w, TQ_INT32 h, bool cropLayers = false); void scaleCurrentImage(double sx, double sy, KisFilterStrategy *filterStrategy); void rotateCurrentImage(double radians); void shearCurrentImage(double angleX, double angleY); - void insertPart(const QRect& viewRect, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above); + void insertPart(const TQRect& viewRect, const KoDocumentEntry& entry, + KisGroupLayerSP tqparent, KisLayerSP above); /** * Import an image as a layer. If there is more than @@ -229,13 +230,13 @@ public: * @param url the url to the image file * @return the number of layers added */ - Q_INT32 importImage(const KURL& url = KURL()); + TQ_INT32 importImage(const KURL& url = KURL()); protected: - virtual void resizeEvent(QResizeEvent*); // From QWidget - virtual void styleChange(QStyle& oldStyle); // From QWidget - virtual void paletteChange(const QPalette& oldPalette); // From QWidget - virtual void showEvent(QShowEvent *); + virtual void resizeEvent(TQResizeEvent*); // From TQWidget + virtual void styleChange(TQStyle& oldStyle); // From TQWidget + virtual void paletteChange(const TQPalette& oldPalette); // From TQWidget + virtual void showEvent(TQShowEvent *); protected slots: virtual void slotChildActivated(bool a); // from KoView @@ -309,40 +310,40 @@ private slots: private: virtual KisCanvas *kiscanvas() const; - virtual Q_INT32 horzValue() const; - virtual Q_INT32 vertValue() const; + virtual TQ_INT32 horzValue() const; + virtual TQ_INT32 vertValue() const; - virtual void scrollTo(Q_INT32 x, Q_INT32 y); + virtual void scrollTo(TQ_INT32 x, TQ_INT32 y); - virtual void updateCanvas(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - virtual void updateCanvas(const QRect& imageRect); + virtual void updateCanvas(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + virtual void updateCanvas(const TQRect& imageRect); virtual void zoomIn(); - virtual void zoomIn(Q_INT32 x, Q_INT32 y); + virtual void zoomIn(TQ_INT32 x, TQ_INT32 y); virtual void zoomOut(); - virtual void zoomOut(Q_INT32 x, Q_INT32 y); + virtual void zoomOut(TQ_INT32 x, TQ_INT32 y); - virtual void zoomTo(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - virtual void zoomTo(const QRect& r); + virtual void zoomTo(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + virtual void zoomTo(const TQRect& r); virtual void zoomTo(const KisRect& r); virtual void zoomAroundPoint(double x, double y, double zf); - virtual QPoint viewToWindow(const QPoint& pt); - virtual QPoint viewToWindow(const QPoint& pt) const; + virtual TQPoint viewToWindow(const TQPoint& pt); + virtual TQPoint viewToWindow(const TQPoint& pt) const; virtual KisPoint viewToWindow(const KisPoint& pt); - virtual QRect viewToWindow(const QRect& rc); + virtual TQRect viewToWindow(const TQRect& rc); virtual KisRect viewToWindow(const KisRect& rc); - virtual void viewToWindow(Q_INT32 *x, Q_INT32 *y); + virtual void viewToWindow(TQ_INT32 *x, TQ_INT32 *y); - virtual QPoint windowToView(const QPoint& pt); - virtual QPoint windowToView(const QPoint& pt) const; + virtual TQPoint windowToView(const TQPoint& pt); + virtual TQPoint windowToView(const TQPoint& pt) const; virtual KisPoint windowToView(const KisPoint& pt); - virtual QRect windowToView(const QRect& rc); + virtual TQRect windowToView(const TQRect& rc); virtual KisRect windowToView(const KisRect& rc); - virtual void windowToView(Q_INT32 *x, Q_INT32 *y); + virtual void windowToView(TQ_INT32 *x, TQ_INT32 *y); - virtual QCursor setCanvasCursor(const QCursor & cursor); + virtual TQCursor setCanvasCursor(const TQCursor & cursor); void setInputDevice(KisInputDevice inputDevice); KisInputDevice currentInputDevice() const; @@ -366,13 +367,13 @@ private: void createLayerBox(); void createDockers(); - void paintToolOverlay(const QRegion& region); + void paintToolOverlay(const TQRegion& region); - void paintQPaintDeviceView(const QRegion& canvasRegion); - void paintOpenGLView(const QRect& canvasRect); + void paintTQPaintDeviceView(const TQRegion& canvasRegion); + void paintOpenGLView(const TQRect& canvasRect); - void updateQPaintDeviceCanvas(const QRect& imageRect); - void updateOpenGLCanvas(const QRect& imageRect); + void updateTQPaintDeviceCanvas(const TQRect& imageRect); + void updateOpenGLCanvas(const TQRect& imageRect); /** * Update the whole of the KisCanvas, including areas outside the image. @@ -427,13 +428,13 @@ private: private slots: void layersUpdated(); // Used in the channel separation to notify the view that we have added a few layers. - void maskUpdated(); // To update the enabled or disabled status of the mask entries + void tqmaskUpdated(); // To update the enabled or disabled status of the tqmask entries - void slotSetFGQColor(const QColor & c); - void slotSetBGQColor(const QColor & c); + void slotSetFGTQColor(const TQColor & c); + void slotSetBGTQColor(const TQColor & c); - void imgUpdated(QRect rc); - void slotOpenGLImageUpdated(QRect rc); + void imgUpdated(TQRect rc); + void slotOpenGLImageUpdated(TQRect rc); void imgResizeToActiveLayer(); @@ -441,18 +442,18 @@ private slots: void canvasGotButtonPressEvent(KisButtonPressEvent *e); void canvasGotButtonReleaseEvent(KisButtonReleaseEvent *e); void canvasGotDoubleClickEvent(KisDoubleClickEvent *e); - void canvasGotPaintEvent(QPaintEvent *e); - void canvasGotEnterEvent(QEvent *e); - void canvasGotLeaveEvent(QEvent *e); - void canvasGotMouseWheelEvent(QWheelEvent *e); - void canvasGotKeyPressEvent(QKeyEvent*); - void canvasGotKeyReleaseEvent(QKeyEvent*); - void canvasGotDragEnterEvent(QDragEnterEvent*); - void canvasGotDropEvent(QDropEvent*); + void canvasGotPaintEvent(TQPaintEvent *e); + void canvasGotEnterEvent(TQEvent *e); + void canvasGotLeaveEvent(TQEvent *e); + void canvasGotMouseWheelEvent(TQWheelEvent *e); + void canvasGotKeyPressEvent(TQKeyEvent*); + void canvasGotKeyReleaseEvent(TQKeyEvent*); + void canvasGotDragEnterEvent(TQDragEnterEvent*); + void canvasGotDropEvent(TQDropEvent*); void reconnectAfterPartInsert(); - QPoint mapToScreen(const QPoint& pt); + TQPoint mapToScreen(const TQPoint& pt); void slotImageProperties(); void layerCompositeOp(const KisCompositeOp& compositeOp); @@ -465,13 +466,13 @@ private slots: void layerProperties(); void showLayerProperties(KisLayerSP layer); void layerAdd(); - void addLayer(KisGroupLayerSP parent, KisLayerSP above); - void addGroupLayer(KisGroupLayerSP parent, KisLayerSP above); + void addLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void addGroupLayer(KisGroupLayerSP tqparent, KisLayerSP above); void addPartLayer(); - void addPartLayer(KisGroupLayerSP parent, KisLayerSP above, const KoDocumentEntry& entry); + void addPartLayer(KisGroupLayerSP tqparent, KisLayerSP above, const KoDocumentEntry& entry); void addAdjustmentLayer(); - void addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above); - void addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const QString & name, KisFilterConfiguration * filter, KisSelectionSP selection = 0); + void addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above, const TQString & name, KisFilterConfiguration * filter, KisSelectionSP selection = 0); void layerRemove(); void layerDuplicate(); void layerRaise(); @@ -491,7 +492,7 @@ private slots: void slotActualSize(); void slotFitToCanvas(); - void slotImageSizeChanged(Q_INT32 w, Q_INT32 h); + void slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h); void scrollH(int value); void scrollV(int value); @@ -504,7 +505,7 @@ private slots: void preferences(); - void slotAutoScroll(const QPoint &p); + void slotAutoScroll(const TQPoint &p); void handlePartLayerAdded(KisLayerSP layer); @@ -534,9 +535,9 @@ private: // Fringe benefits KisRuler *m_hRuler; KisRuler *m_vRuler; - Q_INT32 m_rulerThickness; - Q_INT32 m_vScrollBarExtent; - Q_INT32 m_hScrollBarExtent; + TQ_INT32 m_rulerThickness; + TQ_INT32 m_vScrollBarExtent; + TQ_INT32 m_hScrollBarExtent; // Actions KAction *m_imgFlatten; @@ -559,8 +560,8 @@ private: KAction *m_layerTop; KAction *m_createMask; - KAction *m_maskFromSelection; - KAction *m_maskToSelection; + KAction *m_tqmaskFromSelection; + KAction *m_tqmaskToSelection; KAction *m_applyMask; KAction *m_removeMask; KToggleAction *m_editMask; @@ -581,8 +582,8 @@ private: DCOPObject *m_dcop; // Widgets - QScrollBar *m_hScroll; // XXX: the sizing of the scrollthumbs - QScrollBar *m_vScroll; // is not right yet. + TQScrollBar *m_hScroll; // XXX: the sizing of the scrollthumbs + TQScrollBar *m_vScroll; // is not right yet. int m_scrollX; int m_scrollY; int m_canvasXOffset; @@ -593,14 +594,14 @@ private: bool m_showEventReceived; bool m_imageLoaded; - QTimer m_initialZoomTimer; + TQTimer m_initialZoomTimer; // KisGuideSP m_currentGuide; -// QPoint m_lastGuidePoint; +// TQPoint m_lastGuidePoint; KisUndoAdapter *m_adapter; vKisCanvasObserver m_observers; - QLabel *m_statusBarZoomLabel; + TQLabel *m_statusBarZoomLabel; KSqueezedTextLabel *m_statusBarSelectionLabel; KSqueezedTextLabel *m_statusBarProfileLabel; KisLabelProgress *m_progress; @@ -622,10 +623,10 @@ private: KisID m_paintop; const KisPaintOpSettings *m_paintopSettings; - QTime m_tabletEventTimer; - QTabletEvent::TabletDevice m_lastTabletEventDevice; + TQTime m_tabletEventTimer; + TQTabletEvent::TabletDevice m_lastTabletEventDevice; - QPixmap m_canvasPixmap; + TQPixmap m_canvasPixmap; bool m_toolIsPainting; #ifdef HAVE_GL diff --git a/krita/ui/kis_view_iface.h b/krita/ui/kis_view_iface.h index 0cc9b79d..5a9cd360 100644 --- a/krita/ui/kis_view_iface.h +++ b/krita/ui/kis_view_iface.h @@ -21,7 +21,7 @@ #include -#include +#include class KisView; diff --git a/krita/ui/kobirdeyepanel.cpp b/krita/ui/kobirdeyepanel.cpp index fda95945..c3091680 100644 --- a/krita/ui/kobirdeyepanel.cpp +++ b/krita/ui/kobirdeyepanel.cpp @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -52,33 +52,33 @@ KoThumbnailAdapter::~KoThumbnailAdapter() {} KoBirdEyePanel::KoBirdEyePanel( KoZoomAdapter * zoomListener, KoThumbnailAdapter * thumbnailProvider, KoCanvasAdapter * canvas, - QWidget * parent, + TQWidget * tqparent, const char * name, WFlags f) - : QWidget(parent, name, f) + : TQWidget(tqparent, name, f) , m_zoomListener(zoomListener) , m_thumbnailProvider(thumbnailProvider) , m_canvas(canvas) , m_dragging(false) { - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); m_page = new WdgBirdEye(this); - m_page->zoom->setRange((int) (QMAX(1, 100 * zoomListener->getMinZoom())), (int) (100 * zoomListener->getMaxZoom())); + m_page->zoom->setRange((int) (TQMAX(1, 100 * zoomListener->getMinZoom())), (int) (100 * zoomListener->getMaxZoom())); m_page->zoom->setValue(100); m_page->zoom->setSuffix("%"); m_page->toolbar->setIconSize(16); m_page->view->installEventFilter(this); - m_page->view->setBackgroundMode(Qt::NoBackground); + m_page->view->setBackgroundMode(TQt::NoBackground); - m_zoomIn = new KAction( i18n("Zoom In"), "birdeye_zoom_plus", 0, this, SLOT(zoomPlus()), this, "zoomIn" ); - m_zoomOut = new KAction( i18n("Zoom Out"), "birdeye_zoom_minus", 0, this, SLOT(zoomMinus()), this, "zoomOut" ); + m_zoomIn = new KAction( i18n("Zoom In"), "birdeye_zoom_plus", 0, this, TQT_SLOT(zoomPlus()), this, "zoomIn" ); + m_zoomOut = new KAction( i18n("Zoom Out"), "birdeye_zoom_minus", 0, this, TQT_SLOT(zoomMinus()), this, "zoomOut" ); l->addWidget(m_page); - connect(m_page->zoom, SIGNAL(valueChanged(int)), SLOT(zoomValueChanged(int))); - connect(m_page->bn100, SIGNAL(clicked()), SLOT(zoom100())); - connect(m_page->slZoom, SIGNAL(valueChanged(int)), SLOT(sliderChanged( int ))); + connect(m_page->zoom, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(zoomValueChanged(int))); + connect(m_page->bn100, TQT_SIGNAL(clicked()), TQT_SLOT(zoom100())); + connect(m_page->slZoom, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderChanged( int ))); } KoBirdEyePanel::~KoBirdEyePanel() @@ -192,10 +192,10 @@ void KoBirdEyePanel::sliderChanged( int v ) } } -void KoBirdEyePanel::cursorPosChanged(Q_INT32 xpos, Q_INT32 ypos) +void KoBirdEyePanel::cursorPosChanged(TQ_INT32 xpos, TQ_INT32 ypos) { - m_page->txtX->setText(QString("%L1").arg(xpos, 5)); - m_page->txtY->setText(QString("%L1").arg(ypos, 5)); + m_page->txtX->setText(TQString("%L1").tqarg(xpos, 5)); + m_page->txtY->setText(TQString("%L1").tqarg(ypos, 5)); } void KoBirdEyePanel::setThumbnailProvider(KoThumbnailAdapter * thumbnailProvider) @@ -209,36 +209,36 @@ void KoBirdEyePanel::slotViewTransformationChanged() updateVisibleArea(); renderView(); m_page->view->update(); - setZoom(qRound(m_canvas->zoomFactor() * 100)); + setZoom(tqRound(m_canvas->zoomFactor() * 100)); } -void KoBirdEyePanel::slotUpdate(const QRect & r) +void KoBirdEyePanel::slotUpdate(const TQRect & r) { - QRect updateRect = r; + TQRect updateRect = r; if (m_thumbnailProvider->pixelSize() != m_documentSize) { m_documentSize = m_thumbnailProvider->pixelSize(); fitThumbnailToView(); - updateRect = QRect(0, 0, m_documentSize.width(), m_documentSize.height()); + updateRect = TQRect(0, 0, m_documentSize.width(), m_documentSize.height()); } - updateRect &= QRect(0, 0, m_documentSize.width(), m_documentSize.height()); + updateRect &= TQRect(0, 0, m_documentSize.width(), m_documentSize.height()); if (!updateRect.isEmpty() && !m_documentSize.isEmpty()) { - QRect thumbnailRect = documentToThumbnail(KoRect::fromQRect(updateRect)); + TQRect thumbnailRect = documentToThumbnail(KoRect::fromTQRect(updateRect)); if (!thumbnailRect.isEmpty()) { - QImage thumbnailImage = m_thumbnailProvider->image(thumbnailRect, m_thumbnail.size()); + TQImage thumbnailImage = m_thumbnailProvider->image(thumbnailRect, m_thumbnail.size()); if (!thumbnailImage.isNull()) { Q_ASSERT(thumbnailImage.size() == thumbnailRect.size()); - QPainter painter(&m_thumbnail); + TQPainter painter(&m_thumbnail); - painter.fillRect(thumbnailRect, colorGroup().mid()); + painter.fillRect(thumbnailRect, tqcolorGroup().mid()); painter.drawImage(thumbnailRect.x(), thumbnailRect.y(), thumbnailImage); } } @@ -248,24 +248,24 @@ void KoBirdEyePanel::slotUpdate(const QRect & r) m_page->view->update(); } -QRect KoBirdEyePanel::documentToThumbnail(const KoRect& docRect) +TQRect KoBirdEyePanel::documentToThumbnail(const KoRect& docRect) { if (docRect.isEmpty() || m_documentSize.isEmpty() || m_thumbnail.isNull()) { - return QRect(); + return TQRect(); } - Q_INT32 thumbnailLeft = static_cast((docRect.left() * m_thumbnail.width()) / m_documentSize.width()); - Q_INT32 thumbnailRight = static_cast(((docRect.right() + 1) * m_thumbnail.width()) / m_documentSize.width()); - Q_INT32 thumbnailTop = static_cast((docRect.top() * m_thumbnail.height()) / m_documentSize.height()); - Q_INT32 thumbnailBottom = static_cast(((docRect.bottom() + 1) * m_thumbnail.height()) / m_documentSize.height()); + TQ_INT32 thumbnailLeft = static_cast((docRect.left() * m_thumbnail.width()) / m_documentSize.width()); + TQ_INT32 thumbnailRight = static_cast(((docRect.right() + 1) * m_thumbnail.width()) / m_documentSize.width()); + TQ_INT32 thumbnailTop = static_cast((docRect.top() * m_thumbnail.height()) / m_documentSize.height()); + TQ_INT32 thumbnailBottom = static_cast(((docRect.bottom() + 1) * m_thumbnail.height()) / m_documentSize.height()); - QRect thumbnailRect(thumbnailLeft, thumbnailTop, thumbnailRight - thumbnailLeft + 1, thumbnailBottom - thumbnailTop + 1); + TQRect thumbnailRect(thumbnailLeft, thumbnailTop, thumbnailRight - thumbnailLeft + 1, thumbnailBottom - thumbnailTop + 1); thumbnailRect &= m_thumbnail.rect(); return thumbnailRect; } -KoRect KoBirdEyePanel::thumbnailToDocument(const QRect& thumbnailRect) +KoRect KoBirdEyePanel::thumbnailToDocument(const TQRect& thumbnailRect) { if (thumbnailRect.isEmpty() || m_documentSize.isEmpty() || m_thumbnail.isNull()) { return KoRect(); @@ -282,12 +282,12 @@ KoRect KoBirdEyePanel::thumbnailToDocument(const QRect& thumbnailRect) return docRect; } -QPoint KoBirdEyePanel::viewToThumbnail(const QPoint& viewPoint) +TQPoint KoBirdEyePanel::viewToThumbnail(const TQPoint& viewPoint) { int thumbnailX = (m_viewBuffer.width() - m_thumbnail.width()) / 2; int thumbnailY = (m_viewBuffer.height() - m_thumbnail.height()) / 2; - return QPoint(viewPoint.x() - thumbnailX, viewPoint.y() - thumbnailY); + return TQPoint(viewPoint.x() - thumbnailX, viewPoint.y() - thumbnailY); } @@ -305,20 +305,20 @@ void KoBirdEyePanel::updateVisibleArea() } -bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) +bool KoBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev) { - if (o == m_page->view && ev->type() == QEvent::Resize) { - resizeViewEvent(static_cast(ev)->size()); + if (o == m_page->view && ev->type() == TQEvent::Resize) { + resizeViewEvent(static_cast(ev)->size()); } - if (o == m_page->view && ev->type() == QEvent::Paint) { - paintViewEvent(static_cast(ev)); + if (o == m_page->view && ev->type() == TQEvent::Paint) { + paintViewEvent(static_cast(ev)); } - if (o == m_page->view && ev->type() == QEvent::MouseMove) { + if (o == m_page->view && ev->type() == TQEvent::MouseMove) { - QMouseEvent* me = (QMouseEvent*)ev; - QPoint thumbnailPos = viewToThumbnail(me->pos()); + TQMouseEvent* me = (TQMouseEvent*)ev; + TQPoint thumbnailPos = viewToThumbnail(me->pos()); if (m_dragging) { handleMouseMoveAction(thumbnailPos); @@ -329,10 +329,10 @@ bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) return true; } - if (o == m_page->view && ev->type() == QEvent::MouseButtonPress) { + if (o == m_page->view && ev->type() == TQEvent::MouseButtonPress) { - QMouseEvent* me = (QMouseEvent*)ev; - QPoint thumbnailPos = viewToThumbnail(me->pos()); + TQMouseEvent* me = (TQMouseEvent*)ev; + TQPoint thumbnailPos = viewToThumbnail(me->pos()); if (me->button() == LeftButton) { handleMousePress(thumbnailPos); @@ -341,9 +341,9 @@ bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) return true; } - if (o == m_page->view && ev->type() == QEvent::MouseButtonRelease) { + if (o == m_page->view && ev->type() == TQEvent::MouseButtonRelease) { - QMouseEvent* me = (QMouseEvent*)ev; + TQMouseEvent* me = (TQMouseEvent*)ev; if (me->button() == LeftButton) { m_dragging = false; @@ -355,58 +355,58 @@ bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) return m_page->eventFilter(o, ev); } -KoBirdEyePanel::enumDragHandle KoBirdEyePanel::dragHandleAt(QPoint p) +KoBirdEyePanel::enumDragHandle KoBirdEyePanel::dragHandleAt(TQPoint p) { - QRect left = QRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); - QRect right = QRect(m_visibleAreaInThumbnail.right()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); - QRect top = QRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, m_visibleAreaInThumbnail.width()+2, 3); - QRect bottom = QRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.bottom()-1, m_visibleAreaInThumbnail.width()+2, 3); + TQRect left = TQRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); + TQRect right = TQRect(m_visibleAreaInThumbnail.right()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); + TQRect top = TQRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, m_visibleAreaInThumbnail.width()+2, 3); + TQRect bottom = TQRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.bottom()-1, m_visibleAreaInThumbnail.width()+2, 3); - if (left.contains(p)) { + if (left.tqcontains(p)) { return DragHandleLeft; } - if (right.contains(p)) { + if (right.tqcontains(p)) { return DragHandleRight; } - if (top.contains(p)) { + if (top.tqcontains(p)) { return DragHandleTop; } - if (bottom.contains(p)) { + if (bottom.tqcontains(p)) { return DragHandleBottom; } - if (m_visibleAreaInThumbnail.contains(p)) { + if (m_visibleAreaInThumbnail.tqcontains(p)) { return DragHandleCentre; } return DragHandleNone; } -void KoBirdEyePanel::handleMouseMove(QPoint p) +void KoBirdEyePanel::handleMouseMove(TQPoint p) { - QCursor cursor; + TQCursor cursor; switch (dragHandleAt(p)) { case DragHandleLeft: case DragHandleRight: - cursor = Qt::sizeHorCursor; + cursor = TQt::sizeHorCursor; break; case DragHandleTop: case DragHandleBottom: - cursor = Qt::sizeVerCursor; + cursor = TQt::sizeVerCursor; break; case DragHandleCentre: - cursor = Qt::sizeAllCursor; + cursor = TQt::sizeAllCursor; break; default: case DragHandleNone: - if (m_thumbnail.rect().contains(p)) { - cursor = Qt::PointingHandCursor; + if (m_thumbnail.rect().tqcontains(p)) { + cursor = TQt::PointingHandCursor; } else { - cursor = Qt::arrowCursor; + cursor = TQt::arrowCursor; } break; } @@ -414,16 +414,16 @@ void KoBirdEyePanel::handleMouseMove(QPoint p) m_page->view->setCursor(cursor); } -void KoBirdEyePanel::handleMouseMoveAction(QPoint p) +void KoBirdEyePanel::handleMouseMoveAction(TQPoint p) { if (m_dragging) { - Q_INT32 dx = p.x() - m_lastDragPos.x(); - Q_INT32 dy = p.y() - m_lastDragPos.y(); + TQ_INT32 dx = p.x() - m_lastDragPos.x(); + TQ_INT32 dy = p.y() - m_lastDragPos.y(); m_lastDragPos = p; - QRect thumbnailRect = m_visibleAreaInThumbnail; + TQRect thumbnailRect = m_visibleAreaInThumbnail; switch (m_dragHandle) { case DragHandleLeft: { @@ -455,23 +455,23 @@ void KoBirdEyePanel::handleMouseMoveAction(QPoint p) } } -void KoBirdEyePanel::handleMousePress(QPoint p) +void KoBirdEyePanel::handleMousePress(TQPoint p) { if (!m_dragging) { enumDragHandle dragHandle = dragHandleAt(p); if (dragHandle == DragHandleNone) { - if (m_thumbnail.rect().contains(p)) { + if (m_thumbnail.rect().tqcontains(p)) { // Snap visible area centre to p and begin a centre drag. - QRect thumbnailRect = m_visibleAreaInThumbnail; + TQRect thumbnailRect = m_visibleAreaInThumbnail; thumbnailRect.moveCenter(p); makeThumbnailRectVisible(thumbnailRect); m_dragHandle = DragHandleCentre; - m_page->view->setCursor(Qt::sizeAllCursor); + m_page->view->setCursor(TQt::sizeAllCursor); m_dragging = true; } } else { @@ -482,13 +482,13 @@ void KoBirdEyePanel::handleMousePress(QPoint p) } } -void KoBirdEyePanel::makeThumbnailRectVisible(const QRect& r) +void KoBirdEyePanel::makeThumbnailRectVisible(const TQRect& r) { if (r.isEmpty()) { return; } - QRect thumbnailRect = r; + TQRect thumbnailRect = r; if (thumbnailRect.left() < m_thumbnail.rect().left()) { thumbnailRect.moveLeft(m_thumbnail.rect().left()); @@ -538,18 +538,18 @@ void KoBirdEyePanel::makeThumbnailRectVisible(const QRect& r) m_zoomListener->zoomTo(docRect.center().x(), docRect.center().y(), zoomFactor); } -void KoBirdEyePanel::resizeViewEvent(QSize size) +void KoBirdEyePanel::resizeViewEvent(TQSize size) { m_viewBuffer.resize(size); fitThumbnailToView(); - slotUpdate(QRect(0, 0, m_documentSize.width(), m_documentSize.height())); + slotUpdate(TQRect(0, 0, m_documentSize.width(), m_documentSize.height())); } void KoBirdEyePanel::fitThumbnailToView() { - QRect docRect = QRect(0, 0, m_thumbnailProvider->pixelSize().width(), m_thumbnailProvider->pixelSize().height()); - Q_INT32 thumbnailWidth; - Q_INT32 thumbnailHeight; + TQRect docRect = TQRect(0, 0, m_thumbnailProvider->pixelSize().width(), m_thumbnailProvider->pixelSize().height()); + TQ_INT32 thumbnailWidth; + TQ_INT32 thumbnailHeight; if (docRect.isEmpty()) { thumbnailWidth = 0; @@ -562,9 +562,9 @@ void KoBirdEyePanel::fitThumbnailToView() if (xScale < yScale) { thumbnailWidth = m_page->view->contentsRect().width() - thumbnailBorderPixels; - thumbnailHeight = Q_INT32(ceil(docRect.height() * xScale)); + thumbnailHeight = TQ_INT32(ceil(docRect.height() * xScale)); } else { - thumbnailWidth = Q_INT32(ceil(docRect.width() * yScale)); + thumbnailWidth = TQ_INT32(ceil(docRect.width() * yScale)); thumbnailHeight = m_page->view->contentsRect().height() - thumbnailBorderPixels; } } @@ -581,9 +581,9 @@ void KoBirdEyePanel::renderView() updateVisibleArea(); - QPainter painter(&m_viewBuffer); + TQPainter painter(&m_viewBuffer); - painter.fillRect(0, 0, m_viewBuffer.width(), m_viewBuffer.height(), colorGroup().mid()); + painter.fillRect(0, 0, m_viewBuffer.width(), m_viewBuffer.height(), tqcolorGroup().mid()); if (!m_thumbnail.isNull()) { @@ -592,12 +592,12 @@ void KoBirdEyePanel::renderView() painter.drawPixmap(thumbnailX, thumbnailY, m_thumbnail); - painter.setPen(Qt::red); + painter.setPen(TQt::red); painter.drawRect(thumbnailX + m_visibleAreaInThumbnail.x() - 1, thumbnailY + m_visibleAreaInThumbnail.y() - 1, m_visibleAreaInThumbnail.width() + 2, m_visibleAreaInThumbnail.height() + 2); - painter.setPen(Qt::red.light()); + painter.setPen(TQt::red.light()); painter.drawRect(thumbnailX + m_visibleAreaInThumbnail.x() - 2, thumbnailY + m_visibleAreaInThumbnail.y() - 2, m_visibleAreaInThumbnail.width() + 4, @@ -606,7 +606,7 @@ void KoBirdEyePanel::renderView() } } -void KoBirdEyePanel::paintViewEvent(QPaintEvent *e) +void KoBirdEyePanel::paintViewEvent(TQPaintEvent *e) { Q_ASSERT(!m_viewBuffer.isNull()); diff --git a/krita/ui/kobirdeyepanel.h b/krita/ui/kobirdeyepanel.h index 0b625c99..24770b18 100644 --- a/krita/ui/kobirdeyepanel.h +++ b/krita/ui/kobirdeyepanel.h @@ -21,13 +21,13 @@ #ifndef KO_BIRD_EYE_PANEL #define KO_BIRD_EYE_PANEL -#include -#include +#include +#include #include #include -class QPixmap; +class TQPixmap; class KAction; class KoDocument; class WdgBirdEye; @@ -49,7 +49,7 @@ public: * Returns the total area of the document in pixels. Use KoPageLayout and KoZoomhandler * to take care of zoom, points and whatnot when computing this. */ - virtual QRect size() = 0; + virtual TQRect size() = 0; /** * Return the current canvas zoom factor. @@ -117,17 +117,17 @@ class KoThumbnailAdapter * * @returns the size in pixels. */ - virtual QSize pixelSize() = 0; + virtual TQSize pixelSize() = 0; /** - * Returns the specified rectangle of the thumbnail as a QImage. thumbnailSize + * Returns the specified rectangle of the thumbnail as a TQImage. thumbnailSize * gives the dimensions of the whole document thumbnail, and r specifies a rectangle * within that. * * @param r the rectangle in the thumbnail to be rendered * @param thumbnailSize the size in pixels of the full thumbnail */ - virtual QImage image(QRect r, QSize thumbnailSize) = 0; + virtual TQImage image(TQRect r, TQSize thumbnailSize) = 0; }; /** @@ -135,9 +135,10 @@ class KoThumbnailAdapter * with a red panning rectangle to and a zoom slider and a toolbar * with a couple of useful functions. */ -class KoBirdEyePanel : public QWidget { +class KoBirdEyePanel : public TQWidget { Q_OBJECT + TQ_OBJECT public: @@ -148,20 +149,20 @@ public: * @param thumbnailProvider the class that creates the small image at the right * zoomlevel * @param canvas the place the document is painted. - * @param parent the parent widget - * @param name the QObject name of this bird eye widget - * @param f the widget flags (@see QWidget) + * @param tqparent the tqparent widget + * @param name the TQObject name of this bird eye widget + * @param f the widget flags (@see TQWidget) */ KoBirdEyePanel( KoZoomAdapter * zoomListener, KoThumbnailAdapter * thumbnailProvider, KoCanvasAdapter * canvas, - QWidget * parent, + TQWidget * tqparent, const char * name = 0, WFlags f = 0 ); virtual ~KoBirdEyePanel(); - bool eventFilter(QObject*, QEvent*); + bool eventFilter(TQObject*, TQEvent*); public slots: @@ -178,7 +179,7 @@ public slots: */ void slotViewTransformationChanged(); - void cursorPosChanged(Q_INT32 xpos, Q_INT32 ypos); + void cursorPosChanged(TQ_INT32 xpos, TQ_INT32 ypos); void zoomMinus(); void zoomPlus(); @@ -188,7 +189,7 @@ public slots: * * @param r The rect that has been changed: this is unzoomed. */ - void slotUpdate(const QRect & r); + void slotUpdate(const TQRect & r); protected slots: @@ -200,14 +201,14 @@ protected slots: protected: void setZoom(int zoom); - void handleMouseMove(QPoint); - void handleMouseMoveAction(QPoint); - void handleMousePress(QPoint); + void handleMouseMove(TQPoint); + void handleMouseMoveAction(TQPoint); + void handleMousePress(TQPoint); void fitThumbnailToView(); void renderView(); - void resizeViewEvent(QSize size); - void paintViewEvent(QPaintEvent *e); - void makeThumbnailRectVisible(const QRect& r); + void resizeViewEvent(TQSize size); + void paintViewEvent(TQPaintEvent *e); + void makeThumbnailRectVisible(const TQRect& r); enum enumDragHandle { DragHandleNone, @@ -221,22 +222,22 @@ protected: /* * Returns the drag handle type at point p in thumbnail coordinates. */ - enumDragHandle dragHandleAt(QPoint p); + enumDragHandle dragHandleAt(TQPoint p); /** * Returns the rectangle in the thumbnail covered by the given document rectangle. */ - QRect documentToThumbnail(const KoRect& docRect); + TQRect documentToThumbnail(const KoRect& docRect); /** * Returns the rectangle in the document covered by the given thumbnail rectangle. */ - KoRect thumbnailToDocument(const QRect& thumbnailRect); + KoRect thumbnailToDocument(const TQRect& thumbnailRect); /** * Converts a point in the view to a point in the thumbnail. */ - QPoint viewToThumbnail(const QPoint& viewPoint); + TQPoint viewToThumbnail(const TQPoint& viewPoint); private: @@ -248,14 +249,14 @@ private: KAction* m_zoomIn; KAction* m_zoomOut; - QPixmap m_viewBuffer; - QPixmap m_thumbnail; + TQPixmap m_viewBuffer; + TQPixmap m_thumbnail; - QSize m_documentSize; - QRect m_visibleAreaInThumbnail; + TQSize m_documentSize; + TQRect m_visibleAreaInThumbnail; bool m_dragging; enumDragHandle m_dragHandle; - QPoint m_lastDragPos; + TQPoint m_lastDragPos; }; diff --git a/krita/ui/layerlist.cpp b/krita/ui/layerlist.cpp index 5246896d..d1c925b4 100644 --- a/krita/ui/layerlist.cpp +++ b/krita/ui/layerlist.cpp @@ -20,15 +20,15 @@ #include "layerlist.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -40,27 +40,27 @@ #include #include -class LayerItemIterator: public QListViewItemIterator +class LayerItemIterator: public TQListViewItemIterator { public: - LayerItemIterator( LayerList *list ): QListViewItemIterator( list ) { } - LayerItemIterator( LayerList *list, IteratorFlag flags ): QListViewItemIterator( list, flags ) { } - LayerItemIterator( LayerItem *item ): QListViewItemIterator( item ) { } - LayerItemIterator( LayerItem *item, IteratorFlag flags ): QListViewItemIterator( item, flags ) { } - LayerItem *operator*() { return static_cast( QListViewItemIterator::operator*() ); } + LayerItemIterator( LayerList *list ): TQListViewItemIterator( list ) { } + LayerItemIterator( LayerList *list, IteratorFlag flags ): TQListViewItemIterator( list, flags ) { } + LayerItemIterator( LayerItem *item ): TQListViewItemIterator( item ) { } + LayerItemIterator( LayerItem *item, IteratorFlag flags ): TQListViewItemIterator( item, flags ) { } + LayerItem *operator*() { return static_cast( TQListViewItemIterator::operator*() ); } }; struct LayerProperty { - QString name; - QString displayName; - QPixmap enabledIcon; - QPixmap disabledIcon; + TQString name; + TQString displayName; + TQPixmap enabledIcon; + TQPixmap disabledIcon; bool defaultValue; bool validForFolders; LayerProperty(): defaultValue( false ), validForFolders( true ) { } - LayerProperty( const QString &pname, const QString &pdisplayName, const QPixmap &enabled, const QPixmap &disabled, + LayerProperty( const TQString &pname, const TQString &pdisplayName, const TQPixmap &enabled, const TQPixmap &disabled, bool pdefaultValue, bool pvalidForFolders ) : name( pname ), displayName( pdisplayName ), @@ -79,11 +79,11 @@ public: bool foldersCanBeActive; bool previewsShown; int itemHeight; - QValueList properties; + TQValueList properties; KPopupMenu contextMenu; LayerToolTip *tooltip; - Private( QWidget *parent, LayerList *list ); + Private( TQWidget *tqparent, LayerList *list ); ~Private(); }; @@ -92,43 +92,43 @@ class LayerItem::Private public: bool isFolder; int id; - QValueList properties; - QImage *previewImage; + TQValueList properties; + TQImage *previewImage; bool previewChanged; - QPixmap scaledPreview; - QSize previewSize; - QPoint previewOffset; + TQPixmap scaledPreview; + TQSize previewSize; + TQPoint previewOffset; Private( int pid ): isFolder( false ), id( pid ), previewImage( 0 ), previewChanged( false ) { } }; static const int MAX_SIZE = 256; -class LayerToolTip: public QToolTip, public QFrame +class LayerToolTip: public TQToolTip, public TQFrame { LayerList *m_list; LayerItem *m_item; - QPoint m_pos; - QTimer m_timer; - QImage m_img; + TQPoint m_pos; + TQTimer m_timer; + TQImage m_img; public: - LayerToolTip( QWidget *parent, LayerList *list ) - : QToolTip( parent ), - QFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM | WNoAutoErase ), + LayerToolTip( TQWidget *tqparent, LayerList *list ) + : TQToolTip( tqparent ), + TQFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM | WNoAutoErase ), m_list( list ) { - QFrame::setPalette( QToolTip::palette() ); - connect( &m_timer, SIGNAL( timeout() ), m_list, SLOT( hideTip() ) ); - qApp->installEventFilter( this ); + TQFrame::setPalette( TQToolTip::palette() ); + connect( &m_timer, TQT_SIGNAL( timeout() ), m_list, TQT_SLOT( hideTip() ) ); + tqApp->installEventFilter( this ); } - virtual void maybeTip( const QPoint &pos ) + virtual void maybeTip( const TQPoint &pos ) { m_pos = pos; LayerItem *prev = m_item; m_item = static_cast(m_list->itemAt( m_pos )); - if( QToolTip::parentWidget() && m_list->showToolTips() && m_item ) + if( TQToolTip::tqparentWidget() && m_list->showToolTips() && m_item ) { if( m_item != prev ) hideTip(); @@ -142,9 +142,9 @@ public: { m_img = m_item->tooltipPreview(); m_timer.start( 15000, true ); - if( !isVisible() || sizeHint() != size() ) + if( !isVisible() || tqsizeHint() != size() ) { - resize( sizeHint() ); + resize( tqsizeHint() ); position(); } if( !isVisible() ) @@ -157,29 +157,29 @@ public: { if( !isVisible() ) return; - QFrame::hide(); - QToolTip::hide(); + TQFrame::hide(); + TQToolTip::hide(); m_timer.stop(); m_img.reset(); m_list->triggerUpdate(); } - virtual void drawContents( QPainter *painter ) + virtual void drawContents( TQPainter *painter ) { - QPixmap buf( width(), height() ); - QPainter p( &buf ); - buf.fill( colorGroup().background() ); - p.setPen( colorGroup().foreground() ); + TQPixmap buf( width(), height() ); + TQPainter p( &buf ); + buf.fill( tqcolorGroup().background() ); + p.setPen( tqcolorGroup().foreground() ); p.drawRect( buf.rect() ); - QSimpleRichText text( m_item->tooltip(), QToolTip::font() ); - text.setWidth( QCOORD_MAX ); + TQSimpleRichText text( m_item->tooltip(), TQToolTip::font() ); + text.setWidth( TQCOORD_MAX ); p.translate( 5, 5 ); if( !m_img.isNull() ) { if( m_img.width() > MAX_SIZE || m_img.height() > MAX_SIZE ) - m_img = m_img.scale( MAX_SIZE, MAX_SIZE, QImage::ScaleMin ); + m_img = m_img.scale( MAX_SIZE, MAX_SIZE, TQ_ScaleMin ); int y = 0; if( m_img.height() < text.height() ) y = text.height()/2 - m_img.height()/2; @@ -188,18 +188,18 @@ public: p.translate( m_img.width() + 10, 0 ); } - text.draw( &p, 0, 0, rect(), colorGroup() ); + text.draw( &p, 0, 0, rect(), tqcolorGroup() ); painter->drawPixmap( 0, 0, buf ); } - virtual QSize sizeHint() const + virtual TQSize tqsizeHint() const { if( !m_item ) - return QSize( 0, 0 ); + return TQSize( 0, 0 ); - QSimpleRichText text( m_item->tooltip(), QToolTip::font() ); - text.setWidth( QCOORD_MAX ); + TQSimpleRichText text( m_item->tooltip(), TQToolTip::font() ); + text.setWidth( TQCOORD_MAX ); int width = text.widthUsed(); if( !m_img.isNull() ) @@ -211,16 +211,16 @@ public: height = kMin( m_img.height(), MAX_SIZE ); height += 10; - return QSize( width, height ); + return TQSize( width, height ); } void position() { - const QRect drect = QApplication::desktop()->availableGeometry( QToolTip::parentWidget() ); - const QSize size = sizeHint(); + const TQRect drect = TQApplication::desktop()->availableGeometry( TQToolTip::tqparentWidget() ); + const TQSize size = tqsizeHint(); const int width = size.width(), height = size.height(); - const QRect tmp = m_item->rect(); - const QRect irect( m_list->viewport()->mapToGlobal( m_list->contentsToViewport(tmp.topLeft()) ), tmp.size() ); + const TQRect tmp = m_item->rect(); + const TQRect irect( m_list->viewport()->mapToGlobal( m_list->contentsToViewport(tmp.topLeft()) ), tmp.size() ); int y; if( irect.bottom() + height < drect.bottom() ) @@ -228,27 +228,27 @@ public: else y = kMax( drect.top(), irect.top() - height ); - int x = kMax( drect.x(), QToolTip::parentWidget()->mapToGlobal( m_pos ).x() - width/2 ); + int x = kMax( drect.x(), TQToolTip::tqparentWidget()->mapToGlobal( m_pos ).x() - width/2 ); if( x + width > drect.right() ) x = drect.right() - width; move( x, y ); } - virtual bool eventFilter( QObject *, QEvent *e ) + virtual bool eventFilter( TQObject *, TQEvent *e ) { if( isVisible() ) switch ( e->type() ) { - case QEvent::KeyPress: - case QEvent::KeyRelease: - case QEvent::MouseButtonPress: - case QEvent::MouseButtonRelease: - //case QEvent::MouseMove: - case QEvent::FocusIn: - case QEvent::FocusOut: - case QEvent::Wheel: - case QEvent::Leave: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonRelease: + //case TQEvent::MouseMove: + case TQEvent::FocusIn: + case TQEvent::FocusOut: + case TQEvent::Wheel: + case TQEvent::Leave: hideTip(); default: break; } @@ -257,9 +257,9 @@ public: } }; -LayerList::Private::Private( QWidget *parent, LayerList *list ) +LayerList::Private::Private( TQWidget *tqparent, LayerList *list ) : activeLayer( 0 ), foldersCanBeActive( false ), previewsShown( false ), itemHeight( 32 ), - tooltip( new LayerToolTip( parent, list ) ) { } + tooltip( new LayerToolTip( tqparent, list ) ) { } LayerList::Private::~Private() { @@ -273,17 +273,17 @@ static int getID() return id--; } -static QSize iconSize() { return QIconSet::iconSize( QIconSet::Small ); } +static TQSize iconSize() { return TQIconSet::iconSize( TQIconSet::Small ); } /////////////// // LayerList // /////////////// -LayerList::LayerList( QWidget *parent, const char *name ) - : super( parent, name ), d( new Private( viewport(), this ) ) +LayerList::LayerList( TQWidget *tqparent, const char *name ) + : super( tqparent, name ), d( new Private( viewport(), this ) ) { - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); setRootIsDecorated( true ); setSorting( -1 ); setSortColumn( -1 ); @@ -291,23 +291,23 @@ LayerList::LayerList( QWidget *parent, const char *name ) setFullWidth( true ); setItemsRenameable( false ); setDropHighlighter( true ); - setDefaultRenameAction( QListView::Accept ); + setDefaultRenameAction( TQListView::Accept ); setDragEnabled( true ); setAcceptDrops( true ); setItemsMovable( true ); - addColumn( QString() ); + addColumn( TQString() ); header()->hide(); - QToolTip::add(this, i18n("Right-click to create folders. Click on the layername to change the layer's name. Click and drag to move layers.")); + TQToolTip::add(this, i18n("Right-click to create folders. Click on the layername to change the layer's name. Click and drag to move layers.")); setNumRows( 2 ); - connect( this, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ), - SLOT( slotItemRenamed( QListViewItem*, const QString&, int ) ) ); - connect( this, SIGNAL( moved( QPtrList&, QPtrList&, QPtrList& ) ), - SLOT( slotItemMoved( QPtrList&, QPtrList&, QPtrList& ) ) ); - connect( this, SIGNAL( onItem( QListViewItem* ) ), SLOT( hideTip() ) ); - connect( this, SIGNAL( onViewport() ), SLOT( hideTip() ) ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ), + TQT_SLOT( slotItemRenamed( TQListViewItem*, const TQString&, int ) ) ); + connect( this, TQT_SIGNAL( moved( TQPtrList&, TQPtrList&, TQPtrList& ) ), + TQT_SLOT( slotItemMoved( TQPtrList&, TQPtrList&, TQPtrList& ) ) ); + connect( this, TQT_SIGNAL( onItem( TQListViewItem* ) ), TQT_SLOT( hideTip() ) ); + connect( this, TQT_SIGNAL( onViewport() ), TQT_SLOT( hideTip() ) ); } LayerList::~LayerList() @@ -315,13 +315,13 @@ LayerList::~LayerList() delete d; } -void LayerList::addProperty( const QString &name, const QString &displayName, const QIconSet &icon, +void LayerList::addProperty( const TQString &name, const TQString &displayName, const TQIconSet &icon, bool defaultValue, bool validForFolders ) { - addProperty( name, displayName, icon.pixmap( QIconSet::Small, QIconSet::Normal ), icon.pixmap( QIconSet::Small, QIconSet::Disabled ), defaultValue, validForFolders ); + addProperty( name, displayName, icon.pixmap( TQIconSet::Small, TQIconSet::Normal ), icon.pixmap( TQIconSet::Small, TQIconSet::Disabled ), defaultValue, validForFolders ); } -void LayerList::addProperty( const QString &name, const QString &displayName, QPixmap enabled, QPixmap disabled, +void LayerList::addProperty( const TQString &name, const TQString &displayName, TQPixmap enabled, TQPixmap disabled, bool defaultValue, bool validForFolders ) { d->properties.append( LayerProperty( name, displayName, enabled, disabled, defaultValue, validForFolders ) ); @@ -376,12 +376,12 @@ int LayerList::activeLayerID() const return -1; } -QValueList LayerList::selectedLayers() const +TQValueList LayerList::selectedLayers() const { if( !firstChild() ) - return QValueList(); + return TQValueList(); - QValueList layers; + TQValueList layers; for( LayerItemIterator it( firstChild() ); *it; ++it ) if( (*it)->isSelected() ) layers.append( *it ); @@ -389,10 +389,10 @@ QValueList LayerList::selectedLayers() const return layers; } -QValueList LayerList::selectedLayerIDs() const +TQValueList LayerList::selectedLayerIDs() const { - const QValueList layers = selectedLayers(); - QValueList ids; + const TQValueList layers = selectedLayers(); + TQValueList ids; for( int i = 0, n = layers.count(); i < n; ++i ) ids.append( layers[i]->id() ); @@ -438,16 +438,16 @@ bool LayerList::isFolder( int id ) const return l->isFolder(); } -QString LayerList::displayName( int id ) const +TQString LayerList::displayName( int id ) const { LayerItem* const l = layer( id ); if( !l ) - return QString::null; //should be more severe... + return TQString(); //should be more severe... return l->displayName(); } -bool LayerList::property( int id, const QString &name ) const +bool LayerList::property( int id, const TQString &name ) const { LayerItem* const l = layer( id ); if( !l ) @@ -533,7 +533,7 @@ void LayerList::setActiveLayer( int id ) //SLOT setActiveLayer( layer( id ) ); } -void LayerList::setLayerDisplayName( LayerItem *layer, const QString &displayName ) +void LayerList::setLayerDisplayName( LayerItem *layer, const TQString &displayName ) { if( !layer ) return; @@ -541,12 +541,12 @@ void LayerList::setLayerDisplayName( LayerItem *layer, const QString &displayNam layer->setDisplayName( displayName ); } -void LayerList::setLayerDisplayName( int id, const QString &displayName ) +void LayerList::setLayerDisplayName( int id, const TQString &displayName ) { setLayerDisplayName( layer( id ), displayName ); } -void LayerList::setLayerProperty( LayerItem *layer, const QString &name, bool on ) //SLOT +void LayerList::setLayerProperty( LayerItem *layer, const TQString &name, bool on ) //SLOT { if( !layer ) return; @@ -554,12 +554,12 @@ void LayerList::setLayerProperty( LayerItem *layer, const QString &name, bool on layer->setProperty( name, on ); } -void LayerList::setLayerProperty( int id, const QString &name, bool on ) //SLOT +void LayerList::setLayerProperty( int id, const TQString &name, bool on ) //SLOT { setLayerProperty( layer( id ), name, on ); } -void LayerList::toggleLayerProperty( LayerItem *layer, const QString &name ) //SLOT +void LayerList::toggleLayerProperty( LayerItem *layer, const TQString &name ) //SLOT { if( !layer ) return; @@ -567,12 +567,12 @@ void LayerList::toggleLayerProperty( LayerItem *layer, const QString &name ) //S layer->toggleProperty( name ); } -void LayerList::toggleLayerProperty( int id, const QString &name ) //SLOT +void LayerList::toggleLayerProperty( int id, const TQString &name ) //SLOT { toggleLayerProperty( layer( id ), name ); } -void LayerList::setLayerPreviewImage( LayerItem *layer, QImage *image ) +void LayerList::setLayerPreviewImage( LayerItem *layer, TQImage *image ) { if( !layer ) return; @@ -580,7 +580,7 @@ void LayerList::setLayerPreviewImage( LayerItem *layer, QImage *image ) layer->setPreviewImage( image ); } -void LayerList::setLayerPreviewImage( int id, QImage *image ) +void LayerList::setLayerPreviewImage( int id, TQImage *image ) { setLayerPreviewImage( layer( id ), image ); } @@ -598,54 +598,54 @@ void LayerList::layerPreviewChanged( int id ) layerPreviewChanged( layer( id ) ); } -LayerItem *LayerList::addLayer( const QString &displayName, LayerItem *after, int id ) //SLOT +LayerItem *LayerList::addLayer( const TQString &displayName, LayerItem *after, int id ) //SLOT { return new LayerItem( displayName, this, after, id ); } -LayerItem *LayerList::addLayer( const QString &displayName, int afterID, int id ) //SLOT +LayerItem *LayerList::addLayer( const TQString &displayName, int afterID, int id ) //SLOT { return new LayerItem( displayName, this, layer( afterID ), id ); } //SLOT -LayerItem *LayerList::addLayerToParent( const QString &displayName, LayerItem *parent, LayerItem *after, int id ) +LayerItem *LayerList::addLayerToParent( const TQString &displayName, LayerItem *tqparent, LayerItem *after, int id ) { - if( parent && parent->isFolder() ) - return parent->addLayer( displayName, after, id ); + if( tqparent && tqparent->isFolder() ) + return tqparent->addLayer( displayName, after, id ); else return 0; } -LayerItem *LayerList::addLayerToParent( const QString &displayName, int parentID, int afterID, int id ) //SLOT +LayerItem *LayerList::addLayerToParent( const TQString &displayName, int tqparentID, int afterID, int id ) //SLOT { - return addLayerToParent( displayName, folder( parentID ), layer( afterID ), id ); + return addLayerToParent( displayName, folder( tqparentID ), layer( afterID ), id ); } -void LayerList::moveLayer( LayerItem *layer, LayerItem *parent, LayerItem *after ) //SLOT +void LayerList::moveLayer( LayerItem *layer, LayerItem *tqparent, LayerItem *after ) //SLOT { if( !layer ) return; - if( parent && !parent->isFolder() ) - parent = 0; + if( tqparent && !tqparent->isFolder() ) + tqparent = 0; - if( layer->parent() == parent && layer->prevSibling() == after ) + if( layer->tqparent() == tqparent && layer->prevSibling() == after ) return; - QListViewItem *current = currentItem(); + TQListViewItem *current = currentItem(); - moveItem( layer, parent, after ); + moveItem( layer, tqparent, after ); - emit layerMoved( layer, parent, after ); - emit layerMoved( layer->id(), parent ? parent->id() : -1, after ? after->id() : -1 ); + emit layerMoved( layer, tqparent, after ); + emit layerMoved( layer->id(), tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); - setCurrentItem( current ); //HACK, sometimes Qt changes this under us + setCurrentItem( current ); //HACK, sometimes TQt changes this under us } -void LayerList::moveLayer( int id, int parentID, int afterID ) //SLOT +void LayerList::moveLayer( int id, int tqparentID, int afterID ) //SLOT { - moveLayer( layer( id ), folder( parentID ), layer( afterID ) ); + moveLayer( layer( id ), folder( tqparentID ), layer( afterID ) ); } void LayerList::removeLayer( LayerItem *layer ) //SLOT @@ -658,13 +658,13 @@ void LayerList::removeLayer( int id ) //SLOT delete layer( id ); } -void LayerList::contentsMousePressEvent( QMouseEvent *e ) +void LayerList::contentsMousePressEvent( TQMouseEvent *e ) { LayerItem *item = static_cast( itemAt( contentsToViewport( e->pos() ) ) ); if( item ) { - QMouseEvent m( QEvent::MouseButtonPress, item->mapFromListView( e->pos() ), e->button(), e->state() ); + TQMouseEvent m( TQEvent::MouseButtonPress, item->mapFromListView( e->pos() ), e->button(), e->state() ); if( !item->mousePressEvent( &m ) ) super::contentsMousePressEvent( e ); } @@ -676,12 +676,12 @@ void LayerList::contentsMousePressEvent( QMouseEvent *e ) } } -void LayerList::contentsMouseDoubleClickEvent( QMouseEvent *e ) +void LayerList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) { super::contentsMouseDoubleClickEvent( e ); if( LayerItem *layer = static_cast( itemAt( contentsToViewport( e->pos() ) ) ) ) { - if( !layer->iconsRect().contains( layer->mapFromListView( e->pos() ) ) ) + if( !layer->iconsRect().tqcontains( layer->mapFromListView( e->pos() ) ) ) { emit requestLayerProperties( layer ); emit requestLayerProperties( layer->id() ); @@ -694,26 +694,26 @@ void LayerList::contentsMouseDoubleClickEvent( QMouseEvent *e ) } } -void LayerList::findDrop( const QPoint &pos, QListViewItem *&parent, QListViewItem *&after ) +void LayerList::findDrop( const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after ) { LayerItem *item = static_cast( itemAt( contentsToViewport( pos ) ) ); if( item && item->isFolder() ) { - parent = item; + tqparent = item; after = 0; } else - super::findDrop( pos, parent, after ); + super::findDrop( pos, tqparent, after ); } void LayerList::showContextMenu() { - LayerItem *layer = static_cast( itemAt( viewport()->mapFromGlobal( QCursor::pos() ) ) ); + LayerItem *layer = static_cast( itemAt( viewport()->mapFromGlobal( TQCursor::pos() ) ) ); if( layer ) setCurrentItem( layer ); d->contextMenu.clear(); constructMenu( layer ); - menuActivated( d->contextMenu.exec( QCursor::pos() ), layer ); + menuActivated( d->contextMenu.exec( TQCursor::pos() ), layer ); } void LayerList::hideTip() @@ -723,7 +723,7 @@ void LayerList::hideTip() void LayerList::maybeTip() { - d->tooltip->maybeTip( d->tooltip->QToolTip::parentWidget()->mapFromGlobal( QCursor::pos() ) ); + d->tooltip->maybeTip( d->tooltip->TQToolTip::tqparentWidget()->mapFromGlobal( TQCursor::pos() ) ); } void LayerList::constructMenu( LayerItem *layer ) @@ -746,28 +746,28 @@ void LayerList::constructMenu( LayerItem *layer ) void LayerList::menuActivated( int id, LayerItem *layer ) { - const QValueList selected = selectedLayers(); + const TQValueList selected = selectedLayers(); - LayerItem *parent = ( layer && layer->isFolder() ) ? layer : 0; + LayerItem *tqparent = ( layer && layer->isFolder() ) ? layer : 0; LayerItem *after = 0; - if( layer && !parent ) + if( layer && !tqparent ) { - parent = layer->parent(); + tqparent = layer->tqparent(); after = layer->prevSibling(); } switch( id ) { case MenuItems::NewLayer: - emit requestNewLayer( parent, after ); - emit requestNewLayer( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewLayer( tqparent, after ); + emit requestNewLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::NewFolder: - emit requestNewFolder( parent, after ); - emit requestNewFolder( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewFolder( tqparent, after ); + emit requestNewFolder( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::RemoveLayer: { - QValueList ids; + TQValueList ids; for( int i = 0, n = selected.count(); i < n; ++i ) { ids.append( selected[i]->id() ); @@ -793,7 +793,7 @@ void LayerList::menuActivated( int id, LayerItem *layer ) } } -void LayerList::slotItemRenamed( QListViewItem *item, const QString &text, int col ) +void LayerList::slotItemRenamed( TQListViewItem *item, const TQString &text, int col ) { if( !item || col != 0 ) return; @@ -802,7 +802,7 @@ void LayerList::slotItemRenamed( QListViewItem *item, const QString &text, int c emit displayNameChanged( static_cast( item )->id(), text ); } -void LayerList::slotItemMoved( QPtrList &items, QPtrList &/*afterBefore*/, QPtrList &afterNow ) +void LayerList::slotItemMoved( TQPtrList &items, TQPtrList &/*afterBefore*/, TQPtrList &afterNow ) { for( int i = 0, n = items.count(); i < n; ++i ) { @@ -810,15 +810,15 @@ void LayerList::slotItemMoved( QPtrList &items, QPtrListparent() ) - l->parent()->setOpen( true ); + if( l->tqparent() ) + l->tqparent()->setOpen( true ); - emit layerMoved( l, l->parent(), a ); - emit layerMoved( l->id(), l->parent() ? l->parent()->id() : -1, a ? a->id() : -1 ); + emit layerMoved( l, l->tqparent(), a ); + emit layerMoved( l->id(), l->tqparent() ? l->tqparent()->id() : -1, a ? a->id() : -1 ); } } -void LayerList::setCurrentItem( QListViewItem *item ) +void LayerList::setCurrentItem( TQListViewItem *item ) { if( !item ) return; @@ -839,14 +839,14 @@ void LayerList::setCurrentItem( QListViewItem *item ) // LayerItem // /////////////// -LayerItem::LayerItem( const QString &displayName, LayerList *p, LayerItem *after, int id ) +LayerItem::LayerItem( const TQString &displayName, LayerList *p, LayerItem *after, int id ) : super( p, after ), d( new Private( id ) ) { init(); setDisplayName( displayName ); } -LayerItem::LayerItem( const QString &displayName, LayerItem *p, LayerItem *after, int id ) +LayerItem::LayerItem( const TQString &displayName, LayerItem *p, LayerItem *after, int id ) : super( ( p && p->isFolder() ) ? p : 0, after ), d( new Private( id ) ) { init(); @@ -861,13 +861,13 @@ void LayerItem::init() for( int i = 0, n = listView()->d->properties.count(); i < n; ++i ) d->properties.append( listView()->d->properties[i].defaultValue ); - if( parent()) - parent()->setOpen( true ); + if( tqparent()) + tqparent()->setOpen( true ); } LayerItem::~LayerItem() { - if (listView() && (listView()->activeLayer() == this || contains(listView()->activeLayer()))) + if (listView() && (listView()->activeLayer() == this || tqcontains(listView()->activeLayer()))) listView()->setActiveLayer( static_cast( 0 ) ); delete d; } @@ -885,9 +885,9 @@ bool LayerItem::isFolder() const return d->isFolder; } -bool LayerItem::contains(const LayerItem *item) +bool LayerItem::tqcontains(const LayerItem *item) { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); while (it.current()) { if (static_cast(it.current()) == item) { @@ -903,12 +903,12 @@ int LayerItem::id() const return d->id; } -QString LayerItem::displayName() const +TQString LayerItem::displayName() const { return text( 0 ); } -void LayerItem::setDisplayName( const QString &s ) +void LayerItem::setDisplayName( const TQString &s ) { if( displayName() == s ) return; @@ -927,7 +927,7 @@ void LayerItem::setActive() listView()->setActiveLayer( this ); } -bool LayerItem::property( const QString &name ) const +bool LayerItem::property( const TQString &name ) const { int i = listView()->d->properties.count() - 1; while( i && listView()->d->properties[i].name != name ) @@ -939,7 +939,7 @@ bool LayerItem::property( const QString &name ) const return d->properties[i]; } -void LayerItem::setProperty( const QString &name, bool on ) +void LayerItem::setProperty( const TQString &name, bool on ) { int i = listView()->d->properties.count() - 1; while( i && listView()->d->properties[i].name != name ) @@ -959,7 +959,7 @@ void LayerItem::setProperty( const QString &name, bool on ) update(); } -void LayerItem::toggleProperty( const QString &name ) +void LayerItem::toggleProperty( const TQString &name ) { int i = listView()->d->properties.count() - 1; while( i && listView()->d->properties[i].name != name ) @@ -975,7 +975,7 @@ void LayerItem::toggleProperty( const QString &name ) update(); } -void LayerItem::setPreviewImage( QImage *image ) +void LayerItem::setPreviewImage( TQImage *image ) { d->previewImage = image; previewChanged(); @@ -987,7 +987,7 @@ void LayerItem::previewChanged() update(); } -LayerItem *LayerItem::addLayer( const QString &displayName, LayerItem *after, int id ) +LayerItem *LayerItem::addLayer( const TQString &displayName, LayerItem *after, int id ) { if( !isFolder() ) return 0; @@ -996,7 +996,7 @@ LayerItem *LayerItem::addLayer( const QString &displayName, LayerItem *after, in LayerItem *LayerItem::prevSibling() const { - LayerItem *item = parent() ? parent()->firstChild() : listView()->firstChild(); + LayerItem *item = tqparent() ? tqparent()->firstChild() : listView()->firstChild(); if( !item || this == item ) return 0; for(; item && this != item->nextSibling(); item = item->nextSibling() ); @@ -1013,14 +1013,14 @@ int LayerItem::mapYFromListView( int y ) const return y - rect().top(); } -QPoint LayerItem::mapFromListView( const QPoint &point ) const +TQPoint LayerItem::mapFromListView( const TQPoint &point ) const { - return QPoint( mapXFromListView( point.x() ), mapYFromListView( point.y() ) ); + return TQPoint( mapXFromListView( point.x() ), mapYFromListView( point.y() ) ); } -QRect LayerItem::mapFromListView( const QRect &rect ) const +TQRect LayerItem::mapFromListView( const TQRect &rect ) const { - return QRect( mapFromListView( rect.topLeft() ), rect.size() ); + return TQRect( mapFromListView( rect.topLeft() ), rect.size() ); } int LayerItem::mapXToListView( int x ) const @@ -1033,26 +1033,26 @@ int LayerItem::mapYToListView( int y ) const return y + rect().top(); } -QPoint LayerItem::mapToListView( const QPoint &point ) const +TQPoint LayerItem::mapToListView( const TQPoint &point ) const { - return QPoint( mapXToListView( point.x() ), mapYToListView( point.y() ) ); + return TQPoint( mapXToListView( point.x() ), mapYToListView( point.y() ) ); } -QRect LayerItem::mapToListView( const QRect &rect ) const +TQRect LayerItem::mapToListView( const TQRect &rect ) const { - return QRect( mapToListView( rect.topLeft() ), rect.size() ); + return TQRect( mapToListView( rect.topLeft() ), rect.size() ); } -QRect LayerItem::rect() const +TQRect LayerItem::rect() const { const int indent = listView()->treeStepSize() * ( depth() + 1 ); - return QRect( listView()->header()->sectionPos( 0 ) + indent, itemPos(), + return TQRect( listView()->header()->sectionPos( 0 ) + indent, itemPos(), listView()->header()->sectionSize( 0 ) - indent, height() ); } -QRect LayerItem::textRect() const +TQRect LayerItem::textRect() const { - static QFont f; + static TQFont f; static int minbearing = 1337 + 666; //can be 0 or negative, 2003 is less likely if( minbearing == 2003 || f != font() ) { @@ -1067,12 +1067,12 @@ QRect LayerItem::textRect() const const int width = ( multiline() ? rect().right() : iconsRect().left() ) - indent - margin + minbearing; - return QRect( indent, 0, width, fontMetrics().height() ); + return TQRect( indent, 0, width, fontMetrics().height() ); } -QRect LayerItem::iconsRect() const +TQRect LayerItem::iconsRect() const { - const QValueList &lp = listView()->d->properties; + const TQValueList &lp = listView()->d->properties; int propscount = 0; for( int i = 0, n = lp.count(); i < n; ++i ) if( !lp[i].enabledIcon.isNull() && ( !multiline() || !isFolder() || lp[i].validForFolders ) ) @@ -1083,32 +1083,32 @@ QRect LayerItem::iconsRect() const const int x = multiline() ? previewRect().right() + listView()->itemMargin() : rect().width() - iconswidth; const int y = multiline() ? fontMetrics().height() : 0; - return QRect( x, y, iconswidth, iconSize().height() ); + return TQRect( x, y, iconswidth, iconSize().height() ); } -QRect LayerItem::previewRect() const +TQRect LayerItem::previewRect() const { - return QRect( 0, 0, listView()->previewsShown() ? height() : 0, height() ); + return TQRect( 0, 0, listView()->previewsShown() ? height() : 0, height() ); } -void LayerItem::drawText( QPainter *p, const QColorGroup &cg, const QRect &r ) +void LayerItem::drawText( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) { p->translate( r.left(), r.top() ); p->setPen( isSelected() ? cg.highlightedText() : cg.text() ); - const QString text = KStringHandler::rPixelSqueeze( displayName(), p->fontMetrics(), r.width() ); - p->drawText( listView()->itemMargin(), 0, r.width(), r.height(), Qt::AlignAuto | Qt::AlignTop, text ); + const TQString text = KStringHandler::rPixelSqueeze( displayName(), p->fontMetrics(), r.width() ); + p->drawText( listView()->itemMargin(), 0, r.width(), r.height(), TQt::AlignAuto | TQt::AlignTop, text ); p->translate( -r.left(), -r.top() ); } -void LayerItem::drawIcons( QPainter *p, const QColorGroup &/*cg*/, const QRect &r ) +void LayerItem::drawIcons( TQPainter *p, const TQColorGroup &/*cg*/, const TQRect &r ) { p->translate( r.left(), r.top() ); int x = 0; - const QValueList &lp = listView()->d->properties; + const TQValueList &lp = listView()->d->properties; for( int i = 0, n = lp.count(); i < n; ++i ) if( !lp[i].enabledIcon.isNull() && ( !multiline() || !isFolder() || lp[i].validForFolders ) ) { @@ -1120,7 +1120,7 @@ void LayerItem::drawIcons( QPainter *p, const QColorGroup &/*cg*/, const QRect & p->translate( -r.left(), -r.top() ); } -void LayerItem::drawPreview( QPainter *p, const QColorGroup &/*cg*/, const QRect &r ) +void LayerItem::drawPreview( TQPainter *p, const TQColorGroup &/*cg*/, const TQRect &r ) { if( !showPreview() ) return; @@ -1128,7 +1128,7 @@ void LayerItem::drawPreview( QPainter *p, const QColorGroup &/*cg*/, const QRect if( d->previewChanged || r.size() != d->previewSize ) { //TODO handle width() != height() const int size = kMin( r.width(), kMax( previewImage()->width(), previewImage()->height() ) ); - const QImage i = previewImage()->smoothScale( size, size, QImage::ScaleMin ); + const TQImage i = previewImage()->smoothScale( size, size, TQ_ScaleMin ); d->scaledPreview.convertFromImage( i ); d->previewOffset.setX( r.width()/2 - i.width()/2 ); d->previewOffset.setY( r.height()/2 - i.height()/2 ); @@ -1150,11 +1150,11 @@ bool LayerItem::multiline() const return height() >= fontMetrics().height() + iconSize().height(); } -QFont LayerItem::font() const +TQFont LayerItem::font() const { if( isActive() ) { - QFont f = listView()->font(); + TQFont f = listView()->font(); f.setBold( !f.bold() ); f.setItalic( !f.italic() ); return f; @@ -1163,30 +1163,30 @@ QFont LayerItem::font() const return listView()->font(); } -QFontMetrics LayerItem::fontMetrics() const +TQFontMetrics LayerItem::fontMetrics() const { - return QFontMetrics( font() ); + return TQFontMetrics( font() ); } -bool LayerItem::mousePressEvent( QMouseEvent *e ) +bool LayerItem::mousePressEvent( TQMouseEvent *e ) { if( e->button() == Qt::RightButton ) { - if ( !(e->state() & Qt::ControlButton) && !(e->state() & Qt::ShiftButton) ) + if ( !(e->state() & TQt::ControlButton) && !(e->state() & TQt::ShiftButton) ) setActive(); - QTimer::singleShot( 0, listView(), SLOT( showContextMenu() ) ); + TQTimer::singleShot( 0, listView(), TQT_SLOT( showContextMenu() ) ); return false; } - const QRect ir = iconsRect(), tr = textRect(); + const TQRect ir = iconsRect(), tr = textRect(); - if( ir.contains( e->pos() ) ) + if( ir.tqcontains( e->pos() ) ) { const int iconWidth = iconSize().width(); int x = e->pos().x() - ir.left(); if( x % ( iconWidth + listView()->itemMargin() ) < iconWidth ) //it's on an icon, not a margin { - const QValueList &lp = listView()->d->properties; + const TQValueList &lp = listView()->d->properties; int p = -1; for( int i = 0, n = lp.count(); i < n; ++i ) { @@ -1201,56 +1201,56 @@ bool LayerItem::mousePressEvent( QMouseEvent *e ) return true; } - else if( tr.contains( e->pos() ) && isSelected() && !listView()->renameLineEdit()->isVisible() ) + else if( tr.tqcontains( e->pos() ) && isSelected() && !listView()->renameLineEdit()->isVisible() ) { listView()->rename( this, 0 ); - QRect r( listView()->contentsToViewport( mapToListView( tr.topLeft() ) ), tr.size() ); + TQRect r( listView()->contentsToViewport( mapToListView( tr.topLeft() ) ), tr.size() ); listView()->renameLineEdit()->setGeometry( r ); return true; } - if ( !(e->state() & Qt::ControlButton) && !(e->state() & Qt::ShiftButton) ) + if ( !(e->state() & TQt::ControlButton) && !(e->state() & TQt::ShiftButton) ) setActive(); return false; } -QString LayerItem::tooltip() const +TQString LayerItem::tooltip() const { - QString tip; + TQString tip; tip += ""; - tip += QString("").arg( displayName() ); - QString row = ""; + tip += TQString("").tqarg( displayName() ); + TQString row = ""; for( int i = 0, n = listView()->d->properties.count(); i < n; ++i ) if( !isFolder() || listView()->d->properties[i].validForFolders ) { if( d->properties[i] ) - tip += row.arg( i18n( "%1:" ).arg( listView()->d->properties[i].displayName ) ).arg( i18n( "Yes" ) ); + tip += row.tqarg( i18n( "%1:" ).tqarg( listView()->d->properties[i].displayName ) ).tqarg( i18n( "Yes" ) ); else - tip += row.arg( i18n( "%1:" ).arg( listView()->d->properties[i].displayName ) ).arg( i18n( "No" ) ); + tip += row.tqarg( i18n( "%1:" ).tqarg( listView()->d->properties[i].displayName ) ).tqarg( i18n( "No" ) ); } tip += "
%1
%1%2
%1
%1%2
"; return tip; } -QImage *LayerItem::previewImage() const +TQImage *LayerItem::previewImage() const { return d->previewImage; } -QImage LayerItem::tooltipPreview() const +TQImage LayerItem::tooltipPreview() const { if( previewImage() ) return *previewImage(); - return QImage(); + return TQImage(); } -int LayerItem::width( const QFontMetrics &fm, const QListView *lv, int c ) const +int LayerItem::width( const TQFontMetrics &fm, const TQListView *lv, int c ) const { if( c != 0 ) return super::width( fm, lv, c ); - const QValueList &lp = listView()->d->properties; + const TQValueList &lp = listView()->d->properties; int propscount = 0; for( int i = 0, n = d->properties.count(); i < n; ++i ) if( !lp[i].enabledIcon.isNull() && ( !multiline() || !isFolder() || lp[i].validForFolders ) ) @@ -1264,7 +1264,7 @@ int LayerItem::width( const QFontMetrics &fm, const QListView *lv, int c ) const return super::width( fm, lv, 0 ) + iconswidth; } -void LayerItem::paintCell( QPainter *painter, const QColorGroup &cg, int column, int width, int align ) +void LayerItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int column, int width, int align ) { if( column != 0 ) { @@ -1272,14 +1272,14 @@ void LayerItem::paintCell( QPainter *painter, const QColorGroup &cg, int column, return; } - QPixmap buf( width, height() ); - QPainter p( &buf ); + TQPixmap buf( width, height() ); + TQPainter p( &buf ); p.setFont( font() ); - const QColorGroup cg_ = isEnabled() ? listView()->palette().active() : listView()->palette().disabled(); + const TQColorGroup cg_ = isEnabled() ? listView()->palette().active() : listView()->palette().disabled(); - const QColor bg = isSelected() ? cg_.highlight() + const TQColor bg = isSelected() ? cg_.highlight() : isAlternate() ? listView()->alternateBackground() : listView()->viewport()->backgroundColor(); @@ -1316,10 +1316,10 @@ void LayerItem::setSelected( bool selected ) LayerItem *LayerList::firstChild() const { return static_cast( super::firstChild() ); } LayerItem *LayerList::lastChild() const { return static_cast( super::lastChild() ); } LayerList *LayerItem::listView() const { return static_cast( super::listView() ); } -void LayerItem::update() const { listView()->repaintItem( this ); } +void LayerItem::update() const { listView()->tqrepaintItem( this ); } LayerItem *LayerItem::firstChild() const { return static_cast( super::firstChild() ); } LayerItem *LayerItem::nextSibling() const { return static_cast( super::nextSibling() ); } -LayerItem *LayerItem::parent() const { return static_cast( super::parent() ); } +LayerItem *LayerItem::tqparent() const { return static_cast( super::tqparent() ); } #include "layerlist.moc" diff --git a/krita/ui/layerlist.h b/krita/ui/layerlist.h index b981b266..129baa7c 100644 --- a/krita/ui/layerlist.h +++ b/krita/ui/layerlist.h @@ -21,27 +21,28 @@ #ifndef LAYERLIST_H #define LAYERLIST_H -#include +#include #include -class QMouseEvent; -class QString; +class TQMouseEvent; +class TQString; class KPopupMenu; class LayerItem; class LayerFolder; -template class QPtrList; +template class TQPtrList; class LayerList: public KListView { Q_OBJECT + TQ_OBJECT public: - LayerList( QWidget *parent = 0, const char *name = 0 ); + LayerList( TQWidget *tqparent = 0, const char *name = 0 ); virtual ~LayerList(); - void addProperty( const QString &name, const QString &displayName, const QIconSet &icon = QIconSet(), + void addProperty( const TQString &name, const TQString &displayName, const TQIconSet &icon = TQIconSet(), bool defaultValue = false, bool validForFolders = true ); - void addProperty( const QString &name, const QString &displayName, QPixmap enabled, QPixmap disabled, + void addProperty( const TQString &name, const TQString &displayName, TQPixmap enabled, TQPixmap disabled, bool defaultValue = false, bool validForFolders = true ); bool foldersCanBeActive() const; @@ -55,13 +56,13 @@ public: LayerItem *activeLayer() const; int activeLayerID() const; - QValueList selectedLayers() const; - QValueList selectedLayerIDs() const; + TQValueList selectedLayers() const; + TQValueList selectedLayerIDs() const; void makeFolder( int id ); bool isFolder( int id ) const; - QString displayName( int id ) const; - bool property( int id, const QString &name ) const; + TQString displayName( int id ) const; + bool property( int id, const TQString &name ) const; struct MenuItems { @@ -78,29 +79,29 @@ public slots: void setActiveLayer( LayerItem *layer ); void setActiveLayer( int id ); - void setLayerDisplayName( LayerItem *layer, const QString &displayName ); - void setLayerDisplayName( int id, const QString &displayName ); + void setLayerDisplayName( LayerItem *layer, const TQString &displayName ); + void setLayerDisplayName( int id, const TQString &displayName ); - void setLayerProperty( LayerItem *layer, const QString &name, bool on ); - void setLayerProperty( int id, const QString &name, bool on ); + void setLayerProperty( LayerItem *layer, const TQString &name, bool on ); + void setLayerProperty( int id, const TQString &name, bool on ); - void toggleLayerProperty( LayerItem *layer, const QString &name ); - void toggleLayerProperty( int id, const QString &name ); + void toggleLayerProperty( LayerItem *layer, const TQString &name ); + void toggleLayerProperty( int id, const TQString &name ); - void setLayerPreviewImage( LayerItem *layer, QImage *image ); - void setLayerPreviewImage( int id, QImage *image ); + void setLayerPreviewImage( LayerItem *layer, TQImage *image ); + void setLayerPreviewImage( int id, TQImage *image ); void layerPreviewChanged( LayerItem *layer ); void layerPreviewChanged( int id ); - LayerItem *addLayer( const QString &displayName, LayerItem *after = 0, int id = -1 ); - LayerItem *addLayer( const QString &displayName, int afterID, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, int afterID, int id = -1 ); - LayerItem *addLayerToParent( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ); - LayerItem *addLayerToParent( const QString &displayName, int parentID, int afterID = -1, int id = -1 ); + LayerItem *addLayerToParent( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayerToParent( const TQString &displayName, int tqparentID, int afterID = -1, int id = -1 ); - void moveLayer( LayerItem *layer, LayerItem *parent, LayerItem *after ); - void moveLayer( int id, int parentID, int afterID ); + void moveLayer( LayerItem *layer, LayerItem *tqparent, LayerItem *after ); + void moveLayer( int id, int tqparentID, int afterID ); void removeLayer( LayerItem *layer ); void removeLayer( int id ); @@ -109,26 +110,26 @@ signals: void activated( LayerItem *layer ); void activated( int id ); - void displayNameChanged( LayerItem *layer, const QString &displayName ); - void displayNameChanged( int id, const QString &displayName ); + void displayNameChanged( LayerItem *layer, const TQString &displayName ); + void displayNameChanged( int id, const TQString &displayName ); - void propertyChanged( LayerItem *layer, const QString &name, bool on ); - void propertyChanged( int id, const QString &name, bool on ); + void propertyChanged( LayerItem *layer, const TQString &name, bool on ); + void propertyChanged( int id, const TQString &name, bool on ); - void layerMoved( LayerItem *layer, LayerItem *parent, LayerItem *after ); - void layerMoved( int id, int parentID, int afterID ); + void layerMoved( LayerItem *layer, LayerItem *tqparent, LayerItem *after ); + void layerMoved( int id, int tqparentID, int afterID ); - void requestNewLayer( LayerItem *parent, LayerItem *after ); - void requestNewLayer( int parentID, int afterID ); + void requestNewLayer( LayerItem *tqparent, LayerItem *after ); + void requestNewLayer( int tqparentID, int afterID ); - void requestNewFolder( LayerItem *parent, LayerItem *after ); - void requestNewFolder( int parentID, int afterID ); + void requestNewFolder( LayerItem *tqparent, LayerItem *after ); + void requestNewFolder( int tqparentID, int afterID ); void requestRemoveLayer( LayerItem *layer ); void requestRemoveLayer( int id ); - void requestRemoveLayers( QValueList layers ); - void requestRemoveLayers( QValueList ids ); + void requestRemoveLayers( TQValueList layers ); + void requestRemoveLayers( TQValueList ids ); void requestLayerProperties( LayerItem *layer ); void requestLayerProperties( int id ); @@ -150,26 +151,26 @@ private: Private* const d; private slots: - void slotItemRenamed( QListViewItem *item, const QString &text, int col ); - void slotItemMoved( QPtrList&, QPtrList&, QPtrList& ); + void slotItemRenamed( TQListViewItem *item, const TQString &text, int col ); + void slotItemMoved( TQPtrList&, TQPtrList&, TQPtrList& ); void showContextMenu(); void hideTip(); void maybeTip(); public: //reimplemented for internal reasons - virtual void setCurrentItem( QListViewItem *i ); + virtual void setCurrentItem( TQListViewItem *i ); protected: - virtual void contentsMousePressEvent( QMouseEvent *e ); - virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e ); - virtual void findDrop( const QPoint &pos, QListViewItem *&parent, QListViewItem *&after ); + virtual void contentsMousePressEvent( TQMouseEvent *e ); + virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e ); + virtual void findDrop( const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after ); }; class LayerItem: public KListViewItem { public: - LayerItem( const QString &displayName, LayerList *parent, LayerItem *after = 0, int id = -1 ); - LayerItem( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ); + LayerItem( const TQString &displayName, LayerList *tqparent, LayerItem *after = 0, int id = -1 ); + LayerItem( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ); virtual ~LayerItem(); void makeFolder(); @@ -177,24 +178,24 @@ public: // Returns true if this item is the given item or the tree rooted at // this item contains the given item. - bool contains(const LayerItem *item); + bool tqcontains(const LayerItem *item); int id() const; - QString displayName() const; - void setDisplayName( const QString &displayName ); + TQString displayName() const; + void setDisplayName( const TQString &displayName ); bool isActive() const; void setActive(); - bool property( const QString &name ) const; - void setProperty( const QString &name, bool on ); - void toggleProperty( const QString &name ); + bool property( const TQString &name ) const; + void setProperty( const TQString &name, bool on ); + void toggleProperty( const TQString &name ); - void setPreviewImage( QImage *image ); + void setPreviewImage( TQImage *image ); void previewChanged(); - LayerItem *addLayer( const QString &displayName, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, LayerItem *after = 0, int id = -1 ); LayerItem *prevSibling() const; @@ -202,41 +203,41 @@ public: //convenience LayerItem *nextSibling() const; LayerList *listView() const; LayerItem *firstChild() const; - LayerItem *parent() const; - void update() const; //like QWidget::update() + LayerItem *tqparent() const; + void update() const; //like TQWidget::update() protected: - virtual QRect rect() const; + virtual TQRect rect() const; int mapXFromListView( int x ) const; int mapYFromListView( int y ) const; - QPoint mapFromListView( const QPoint &point ) const; - QRect mapFromListView( const QRect &rect ) const; + TQPoint mapFromListView( const TQPoint &point ) const; + TQRect mapFromListView( const TQRect &rect ) const; int mapXToListView( int x ) const; int mapYToListView( int y ) const; - QPoint mapToListView( const QPoint &point ) const; - QRect mapToListView( const QRect &rect ) const; + TQPoint mapToListView( const TQPoint &point ) const; + TQRect mapToListView( const TQRect &rect ) const; - virtual QRect textRect() const; - virtual QRect iconsRect() const; - virtual QRect previewRect() const; + virtual TQRect textRect() const; + virtual TQRect iconsRect() const; + virtual TQRect previewRect() const; - virtual void drawText( QPainter *p, const QColorGroup &cg, const QRect &r ); - virtual void drawIcons( QPainter *p, const QColorGroup &cg, const QRect &r ); - virtual void drawPreview( QPainter *p, const QColorGroup &cg, const QRect &r ); + virtual void drawText( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); + virtual void drawIcons( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); + virtual void drawPreview( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); bool multiline() const; bool showPreview() const; - virtual QFont font() const; - QFontMetrics fontMetrics() const; + virtual TQFont font() const; + TQFontMetrics fontMetrics() const; - virtual bool mousePressEvent( QMouseEvent *e ); + virtual bool mousePressEvent( TQMouseEvent *e ); - virtual QString tooltip() const; + virtual TQString tooltip() const; - virtual QImage *previewImage() const; - virtual QImage tooltipPreview() const; + virtual TQImage *previewImage() const; + virtual TQImage tooltipPreview() const; private: typedef KListViewItem super; @@ -249,8 +250,8 @@ private: void init(); public: //reimplemented for internal reasons - virtual int width( const QFontMetrics &fm, const QListView *lv, int c ) const; - 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 paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); virtual void setup(); virtual void setSelected( bool selected ); }; @@ -258,10 +259,10 @@ public: //reimplemented for internal reasons class LayerFolder: public LayerItem { public: - LayerFolder( const QString &displayName, LayerList *parent, LayerItem *after = 0, int id = -1 ) - : LayerItem( displayName, parent, after, id ) { makeFolder(); } - LayerFolder( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ) - : LayerItem( displayName, parent, after, id ) { makeFolder(); } + LayerFolder( const TQString &displayName, LayerList *tqparent, LayerItem *after = 0, int id = -1 ) + : LayerItem( displayName, tqparent, after, id ) { makeFolder(); } + LayerFolder( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ) + : LayerItem( displayName, tqparent, after, id ) { makeFolder(); } }; diff --git a/krita/ui/squeezedcombobox.cpp b/krita/ui/squeezedcombobox.cpp index 971a73e6..81aaa33f 100644 --- a/krita/ui/squeezedcombobox.cpp +++ b/krita/ui/squeezedcombobox.cpp @@ -20,54 +20,54 @@ /** @file squeezedcombobox.cpp */ -// Qt includes. +// TQt includes. -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // Local includes. #include "squeezedcombobox.h" -SqueezedComboBoxTip::SqueezedComboBoxTip( QWidget * parent, SqueezedComboBox* name ) - : QToolTip( parent ) +SqueezedComboBoxTip::SqueezedComboBoxTip( TQWidget * tqparent, SqueezedComboBox* name ) + : TQToolTip( tqparent ) { m_originalWidget = name; } -void SqueezedComboBoxTip::maybeTip( const QPoint &pos ) +void SqueezedComboBoxTip::maybeTip( const TQPoint &pos ) { - QListBox* listBox = m_originalWidget->listBox(); + TQListBox* listBox = m_originalWidget->listBox(); if (!listBox) return; - QListBoxItem* selectedItem = listBox->itemAt( pos ); + TQListBoxItem* selectedItem = listBox->itemAt( pos ); if (selectedItem) { - QRect positionToolTip = listBox->itemRect( selectedItem ); - QString toolTipText = m_originalWidget->itemHighlighted(); + TQRect positionToolTip = listBox->tqitemRect( selectedItem ); + TQString toolTipText = m_originalWidget->itemHighlighted(); if (!toolTipText.isNull()) tip(positionToolTip, toolTipText); } } -SqueezedComboBox::SqueezedComboBox( QWidget *parent, const char *name ) - : QComboBox( parent, name ) +SqueezedComboBox::SqueezedComboBox( TQWidget *tqparent, const char *name ) + : TQComboBox( tqparent, name ) { setMinimumWidth(100); - m_timer = new QTimer(this); + m_timer = new TQTimer(this); m_tooltip = new SqueezedComboBoxTip( listBox()->viewport(), this ); - connect(m_timer, SIGNAL(timeout()), - SLOT(slotTimeOut())); - connect(this, SIGNAL(activated( int )), - SLOT(slotUpdateToolTip( int ))); + connect(m_timer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotTimeOut())); + connect(this, TQT_SIGNAL(activated( int )), + TQT_SLOT(slotUpdateToolTip( int ))); } SqueezedComboBox::~SqueezedComboBox() @@ -76,7 +76,7 @@ SqueezedComboBox::~SqueezedComboBox() delete m_timer; } -bool SqueezedComboBox::contains( const QString& _text ) const +bool SqueezedComboBox::tqcontains( const TQString& _text ) const { if ( _text.isEmpty() ) return false; @@ -90,20 +90,20 @@ bool SqueezedComboBox::contains( const QString& _text ) const return false; } -QSize SqueezedComboBox::sizeHint() const +TQSize SqueezedComboBox::tqsizeHint() const { constPolish(); - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); - int maxW = count() ? 18 : 7 * fm.width(QChar('x')) + 18; - int maxH = QMAX( fm.lineSpacing(), 14 ) + 2; + int maxW = count() ? 18 : 7 * fm.width(TQChar('x')) + 18; + int maxH = TQMAX( fm.lineSpacing(), 14 ) + 2; - return style().sizeFromContents(QStyle::CT_ComboBox, this, - QSize(maxW, maxH)). - expandedTo(QApplication::globalStrut()); + return style().sizeFromContents(TQStyle::CT_ComboBox, this, + TQSize(maxW, maxH)). + expandedTo(TQApplication::globalStrut()); } -void SqueezedComboBox::insertSqueezedItem(const QString& newItem, int index) +void SqueezedComboBox::insertSqueezedItem(const TQString& newItem, int index) { m_originalItems[index] = newItem; insertItem( squeezeText(newItem), index ); @@ -113,14 +113,14 @@ void SqueezedComboBox::insertSqueezedItem(const QString& newItem, int index) slotUpdateToolTip(0); } -void SqueezedComboBox::resizeEvent ( QResizeEvent * ) +void SqueezedComboBox::resizeEvent ( TQResizeEvent * ) { m_timer->start(200, true); } void SqueezedComboBox::slotTimeOut() { - QMapIterator it; + TQMapIterator it; for (it = m_originalItems.begin() ; it != m_originalItems.end(); ++it) { @@ -128,24 +128,24 @@ void SqueezedComboBox::slotTimeOut() } } -QString SqueezedComboBox::squeezeText( const QString& original) +TQString SqueezedComboBox::squeezeText( const TQString& original) { // not the complete widgetSize is usable. Need to compensate for that. int widgetSize = width()-30; - QFontMetrics fm( fontMetrics() ); + TQFontMetrics fm( fontMetrics() ); // If we can fit the full text, return that. if (fm.width(original) < widgetSize) return(original); // We need to squeeze. - QString sqItem = original; // prevent empty return value; + TQString sqItem = original; // prevent empty return value; widgetSize = widgetSize-fm.width("..."); for (uint i = 0 ; i != original.length(); ++i) { if ( (int)fm.width(original.right(i)) > widgetSize) { - sqItem = QString("..." + original.right(--i)); + sqItem = TQString("..." + original.right(--i)); break; } } @@ -154,11 +154,11 @@ QString SqueezedComboBox::squeezeText( const QString& original) void SqueezedComboBox::slotUpdateToolTip( int index ) { - QToolTip::remove(this); - QToolTip::add(this, m_originalItems[index]); + TQToolTip::remove(this); + TQToolTip::add(this, m_originalItems[index]); } -QString SqueezedComboBox::itemHighlighted() +TQString SqueezedComboBox::itemHighlighted() { int curItem = this->listBox()->currentItem(); return m_originalItems[curItem]; diff --git a/krita/ui/squeezedcombobox.h b/krita/ui/squeezedcombobox.h index 51f9eb51..66758335 100644 --- a/krita/ui/squeezedcombobox.h +++ b/krita/ui/squeezedcombobox.h @@ -20,15 +20,15 @@ /** @file squeezedcombobox.h */ -#ifndef SQUEEZEDCOMBOBOX_H -#define SQUEEZEDCOMBOBOX_H +#ifndef STQUEEZEDCOMBOBOX_H +#define STQUEEZEDCOMBOBOX_H -class QTimer; +class TQTimer; -// Qt includes. +// TQt includes. -#include -#include +#include +#include class SqueezedComboBox; @@ -37,11 +37,11 @@ class SqueezedComboBox; * the tooltip will contain the full text and helps * the user find the correct entry. It is automatically * activated when starting a SqueezedComboBox. This is - * inherited from QToolTip + * inherited from TQToolTip * * @author Tom Albers */ -class SqueezedComboBoxTip : public QToolTip +class SqueezedComboBoxTip : public TQToolTip { public: /** @@ -51,18 +51,18 @@ public: * t = new SqueezedComboBoxTip( this->listBox()->viewport(), this ); * @endcode * - * @param parent parent widget (viewport) - * @param name parent widget + * @param tqparent tqparent widget (viewport) + * @param name tqparent widget */ - SqueezedComboBoxTip( QWidget *parent, SqueezedComboBox *name ); + SqueezedComboBoxTip( TQWidget *tqparent, SqueezedComboBox *name ); protected: /** - * Reimplemented version from QToolTip which shows the + * Reimplemented version from TQToolTip which shows the * tooltip when needed. * @param pos the point where the mouse currently is */ - void maybeTip( const QPoint& pos ); + void maybeTip( const TQPoint& pos ); private: SqueezedComboBox* m_originalWidget; @@ -70,7 +70,7 @@ private: /** @class SqueezedComboBox * - * This widget is a QComboBox, but then a little bit + * This widget is a TQComboBox, but then a little bit * different. It only shows the right part of the items * depending on de size of the widget. When it is not * possible to show the complete item, it will be shortened @@ -79,58 +79,59 @@ private: * @image html squeezedcombobox.png "This is how it looks" * @author Tom Albers */ -class SqueezedComboBox : public QComboBox +class SqueezedComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: /** * Constructor - * @param parent parent widget + * @param tqparent tqparent widget * @param name name to give to the widget */ - SqueezedComboBox(QWidget *parent = 0, const char *name = 0 ); + SqueezedComboBox(TQWidget *tqparent = 0, const char *name = 0 ); /** * destructor */ virtual ~SqueezedComboBox(); - bool contains(const QString & text) const; + bool tqcontains(const TQString & text) const; /** - * This inserts a item to the list. See QComboBox::insertItem() - * for detaills. Please do not use QComboBox::insertItem() to this + * This inserts a item to the list. See TQComboBox::insertItem() + * for detaills. Please do not use TQComboBox::insertItem() to this * widget, as that will fail. * @param newItem the original (long version) of the item which needs * to be added to the combobox * @param index the position in the widget. */ - void insertSqueezedItem(const QString& newItem, int index); + void insertSqueezedItem(const TQString& newItem, int index); /** * This method returns the full text (not squeezed) of the currently * highlighted item. * @return full text of the highlighted item */ - QString itemHighlighted( ); + TQString itemHighlighted( ); /** - * Sets the sizeHint() of this widget. + * Sets the tqsizeHint() of this widget. */ - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; private slots: void slotTimeOut(); void slotUpdateToolTip( int index ); private: - void resizeEvent ( QResizeEvent * ); - QString squeezeText( const QString& original); + void resizeEvent ( TQResizeEvent * ); + TQString squeezeText( const TQString& original); - QMap m_originalItems; - QTimer* m_timer; + TQMap m_originalItems; + TQTimer* m_timer; SqueezedComboBoxTip* m_tooltip; }; -#endif // SQUEEZEDCOMBOBOX_H +#endif // STQUEEZEDCOMBOBOX_H diff --git a/krita/ui/wdgapplyprofile.ui b/krita/ui/wdgapplyprofile.ui index f486b625..549cd10c 100644 --- a/krita/ui/wdgapplyprofile.ui +++ b/krita/ui/wdgapplyprofile.ui @@ -1,6 +1,6 @@ WdgApplyProfile - + WdgApplyProfile @@ -24,7 +24,7 @@ unnamed - + groupBox1 @@ -35,7 +35,7 @@ unnamed - + lblProfile @@ -64,18 +64,18 @@ - + textLabel1 The image data you want to paste does not have an ICM profile associated with it. If you do not select a profile, Krita will assume that the image data is encoded in the import profile defined in the Settings dialog. - + WordBreak|AlignVCenter - + grpRenderIntent @@ -92,7 +92,7 @@ unnamed - + radioRelativeColorimetric @@ -103,7 +103,7 @@ Within and outside gamut; same as Absolute Colorimetric. White point changed to result in neutral grays. - + radioSaturation @@ -114,7 +114,7 @@ Hue and saturation maintained with lightness sacrificed to maintain saturation. White point changed to result in neutral grays. Intended for business graphics (make it colorful charts, graphs, overheads, ...) - + radioButton4 @@ -125,7 +125,7 @@ Within the destination device gamut; hue, lightness and saturation are maintained. Outside the gamut; hue and lightness are maintained, saturation is sacrificed. White point for source and destination; unchanged. Intended for spot colors (Pantone, TruMatch, logo colors, ...) - + radioPerceptual @@ -168,5 +168,5 @@ cmbProfile - + diff --git a/krita/ui/wdgautobrush.ui b/krita/ui/wdgautobrush.ui index dd6b55fc..a8aa02e0 100644 --- a/krita/ui/wdgautobrush.ui +++ b/krita/ui/wdgautobrush.ui @@ -1,6 +1,6 @@ KisWdgAutobrush - + KisWdgAutobrush @@ -24,15 +24,15 @@ unnamed - + - layout3 + tqlayout3 unnamed - + grpSize @@ -46,9 +46,9 @@ 0 - + - layout21 + tqlayout21 @@ -57,7 +57,7 @@ 0 - + textLabel2 @@ -76,7 +76,7 @@ image0 - + spinBoxWidth @@ -90,7 +90,7 @@ 5 - + textLabel2_2 @@ -101,7 +101,7 @@ image1 - + spinBoxHeigth @@ -117,7 +117,7 @@ - + bnLinkSize @@ -129,13 +129,13 @@ 0 - + 16 0 - + 16 32767 @@ -153,7 +153,7 @@ - + grpFade @@ -167,9 +167,9 @@ 0 - + - layout23 + tqlayout23 @@ -178,7 +178,7 @@ 0 - + textLabelHorizontal @@ -189,7 +189,7 @@ image0 - + spinBoxHorizontal @@ -203,7 +203,7 @@ 1 - + textLabel2_2_2 @@ -214,7 +214,7 @@ image1 - + spinBoxVertical @@ -230,7 +230,7 @@ - + bnLinkFade @@ -242,13 +242,13 @@ 0 - + 16 0 - + 16 32767 @@ -271,15 +271,15 @@ - + - layout6 + tqlayout6 unnamed - + brushPreview @@ -291,7 +291,7 @@ 0 - + 95 95 @@ -304,7 +304,7 @@ true - + Circle @@ -332,7 +332,7 @@ Expanding - + 20 0 @@ -351,5 +351,5 @@ 89504e470d0a1a0a0000000d49484452000000190000001a0806000000427df7cd000000b9494441544889dd95410ec4200845b1e9ba78ff538a176056260c5181569bccfca590ff2a204da510ecd601008078ed8778953372cec8db20d23c0a72417aa611900999997941a795500a256d2acf7a434354bf212d4927ebc488a417518d4dd75d0dcbb5f2ed983d59f101af94eb7f20d39e3c1963136299f7e2b361f89d9e8c6ed16efc4ee3892a205ecb9adc24fdcc176ffd4b9839e9b896592eb9d623b1106464e605b821da340200086e61afb91ea2a377e89577e57f00357f504513c00b590000000049454e44ae426082 - + diff --git a/krita/ui/wdgautogradient.ui b/krita/ui/wdgautogradient.ui index ab2821c8..59875f87 100644 --- a/krita/ui/wdgautogradient.ui +++ b/krita/ui/wdgautogradient.ui @@ -1,6 +1,6 @@ KisWdgAutogradient - + KisWdgAutogradient @@ -22,7 +22,7 @@ 0 - + groupBox1 @@ -45,7 +45,7 @@ 0 - + 32767 30 @@ -55,9 +55,9 @@ ClickFocus - + - layout11 + tqlayout11 @@ -69,9 +69,9 @@ unnamed - + - layout10 + tqlayout10 @@ -81,7 +81,7 @@ unnamed - + textLabel1 @@ -93,9 +93,9 @@ Segment Color - + - layout8 + tqlayout8 @@ -105,7 +105,7 @@ unnamed - + labelLeftColor @@ -129,7 +129,7 @@ 0 - + 30 30 @@ -148,9 +148,9 @@ - + - layout9 + tqlayout9 @@ -160,7 +160,7 @@ unnamed - + labelRightColor @@ -184,7 +184,7 @@ 0 - + 30 30 @@ -205,9 +205,9 @@ - + - layout5 + tqlayout5 @@ -217,7 +217,7 @@ unnamed - + textLabel2 @@ -285,9 +285,9 @@ - + - layout11_2 + tqlayout11_2 @@ -299,7 +299,7 @@ unnamed - + Linear @@ -336,7 +336,7 @@ ClickFocus - + RGB @@ -392,7 +392,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082 - + kcolorbutton.h diff --git a/krita/ui/wdgbirdeye.ui b/krita/ui/wdgbirdeye.ui index 0333ef7a..77f03131 100644 --- a/krita/ui/wdgbirdeye.ui +++ b/krita/ui/wdgbirdeye.ui @@ -1,6 +1,6 @@ WdgBirdEye - + WdgBirdEye @@ -23,9 +23,9 @@ Overview - + - + @@ -37,9 +37,9 @@ 0 - + - layout4 + tqlayout4 @@ -51,15 +51,15 @@ 1 - + - layout10 + tqlayout10 unnamed - + lblX @@ -67,17 +67,17 @@ X: - + txtX - + 50 0 - + 50 32767 @@ -93,7 +93,7 @@ 00000 - + lblY @@ -101,17 +101,17 @@ Y: - + txtY - + 50 0 - + 50 32767 @@ -137,7 +137,7 @@ Expanding - + 20 20 @@ -146,7 +146,7 @@ - + view @@ -158,13 +158,13 @@ 0 - + 75 75 - + 200 75 @@ -186,16 +186,16 @@ toolbar - + 32767 32 - + - layout4 + tqlayout4 @@ -224,7 +224,7 @@ 10 - + slZoom @@ -249,7 +249,7 @@ Horizontal - + bn100 @@ -290,13 +290,13 @@ kiconloader.h - + zoomChanged(int) zoomMinus() zoomPlus() - + BarIcon - + ktoolbar.h knuminput.h diff --git a/krita/ui/wdgcolorsettings.ui b/krita/ui/wdgcolorsettings.ui index 63034d50..3d2def86 100644 --- a/krita/ui/wdgcolorsettings.ui +++ b/krita/ui/wdgcolorsettings.ui @@ -1,6 +1,6 @@ WdgColorSettings - + WdgColorSettings @@ -19,15 +19,15 @@ unnamed - + - layout8 + tqlayout8 unnamed - + textLabel1_2 @@ -47,7 +47,7 @@ 0 - + 0 20 @@ -56,7 +56,7 @@ - + grpDisplay @@ -67,7 +67,7 @@ unnamed - + textLabel1 @@ -81,7 +81,7 @@ The icm profile for your calibrated monitor. - + textLabel1_4 @@ -154,7 +154,7 @@ The different rendering intent methods will affect only what is shown on screen, - + groupBox2 @@ -186,7 +186,7 @@ The different rendering intent methods will affect only what is shown on screen, cmbPrintProfile - + lbldefaultprinterspace @@ -194,7 +194,7 @@ The different rendering intent methods will affect only what is shown on screen, Color model: - + textLabel4 @@ -210,7 +210,7 @@ The different rendering intent methods will affect only what is shown on screen, - + grpPasteBehaviour @@ -221,18 +221,18 @@ The different rendering intent methods will affect only what is shown on screen, unnamed - + textLabel1_2_2 <p>Select what color profile to add when pasting from external applications that do not use a color profile.</p> - + WordBreak|AlignVCenter - + radioPasteWeb @@ -243,7 +243,7 @@ The different rendering intent methods will affect only what is shown on screen, sRGB are like images from the web are supposed to be seen. - + radioPasteMonitor @@ -254,7 +254,7 @@ The different rendering intent methods will affect only what is shown on screen, This is like you see it in the other application - + radioPasteAsk @@ -264,15 +264,15 @@ The different rendering intent methods will affect only what is shown on screen, - + - layout6 + tqlayout6 unnamed - + chkBlackpoint @@ -295,7 +295,7 @@ The different rendering intent methods will affect only what is shown on screen, Expanding - + 20 16 @@ -346,7 +346,7 @@ The different rendering intent methods will affect only what is shown on screen, 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388db5944d4c5c5518869f73ce9db9cc40f929cc30300e18129a50685268a28291982e1a2175212eaab1c49d3f8971e7aec6aedb54a32b435dd8685cb8c0c4b8b0feb421b7bd8186a069d23209144b18cb0c02f3732ff3c3ccbdd705a571941213f1dd9d93739ef37e6fbeef08d334d9d5d0d090c701c8344d2176c1a6697a5d5d5dd8b64d2a95c2b2ac7f05b12c8b783c8e6118d8b6fd685fdb753a39394928e2a7c55724d693a7e214104220242805520a84d8b9e4790f0b1302c7751958f1e30534be9fa41a0c60db362dbe227f64af91b6e7719c2dfc0117a71c603da591de2882a7d3d4ec27122b10acad50aeb88044d542b84de3af7ab44aa55274f4e449dbf354bc347aa096fbf37e7efa2ecbad1b36907d78b289de8120232f37726250c3f52cf0a026a0f6065b9645d929e038167aa096d91b307171059034b5f8e9e9eb44fa052b4b25eeccd9dc99cb71f6ad082fbea2e351c075bdbdc13b9109fc01b83fef63e2e232e03076b68393231a0dcd024daf502c1e66e67a89cb971ef0e5a74bb4b61e6378248094b92ab0ac024b70ca017ef8360394187b2dc6d8b89ffa500e4d4f93d9083275d5e6f9913ade3dd70ee87c7d25c95646a25415aadab152b09ed4f8c5cc130a853839eac3951b684a61e70ef3f9c739668c24eba912afbfddc6d4d506e6a6d7b8b7d082aa8eb8dab19482cdcd220e36dd3dc19df23545de0a71f952861923493456cfd3cf36123c54a0b7bf0e8064621b21f7712c040857071ca4eea0f40a99f510573ec971cb48030e811a1faded3e94be85f2fb00703d1ff26f96ab9f011a5b04d0c4f26fdb948a754c1b25668c2491483d5d5d611617d6b8f0fe32cb779b492ce65168b4c774a4701eefd8f3a02d56e6e8f13aeefe9a63fa5a89d1970e91d908f3d46003e1480d173e28b37827c9b977348ab92ce16890237d1ec907ee3e8e3d8f60d0e1f4583d009f7d9860662acff89bad1c1faad0717493f7ce7713ed8cb0995c255f2a317a26427b67198f6a70f51c0a41b902279ed1187f23cc17130b7c74de65eac77a7a8f05517e41e2deefa4930576db60fa7a8ee1535134df3e93e7b82e0817476439fd6a9070a49f6fbe4a3077739db99b15c001146dd13a46cf1cc1f83943c62e51de76b0738fc9381e8f3390f0236b252e124999e11724fd833196164bacadb87848224fe874f779b43fe9f2dca928956d505a96dbb3f9bdc18661e00534c26d1a7a40e13912a11c9454280da41048a9915c75585df500074d53d816dc9edd229528ef0db66dbbea3ffdaffa471f1f28d8344df1bf800f1a6e9aa6f813c39885bc050f269c0000000049454e44ae426082 - + kis_cmb_idlist.h kcombobox.h diff --git a/krita/ui/wdgcustombrush.ui b/krita/ui/wdgcustombrush.ui index ea0418b3..78c77be3 100644 --- a/krita/ui/wdgcustombrush.ui +++ b/krita/ui/wdgcustombrush.ui @@ -1,6 +1,6 @@ KisWdgCustomBrush - + KisWdgCustomBrush @@ -16,15 +16,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + textLabel2 @@ -32,7 +32,7 @@ Style: - + Constant @@ -68,7 +68,7 @@ 2 - + textLabel3 @@ -76,7 +76,7 @@ Selection mode: - + Regular @@ -93,17 +93,17 @@ - + colorAsMask - Use color as mask + Use color as tqmask - + - layout6 + tqlayout6 @@ -119,14 +119,14 @@ Expanding - + 40 20 - + preview @@ -138,7 +138,7 @@ 0 - + 50 50 @@ -158,7 +158,7 @@ Expanding - + 40 20 @@ -167,15 +167,15 @@ - + - layout7 + tqlayout7 unnamed - + brushButton @@ -183,7 +183,7 @@ Use as Brush - + addButton @@ -195,5 +195,5 @@ - + diff --git a/krita/ui/wdgcustompalette.ui b/krita/ui/wdgcustompalette.ui index 251a51bb..c5cbe9dc 100644 --- a/krita/ui/wdgcustompalette.ui +++ b/krita/ui/wdgcustompalette.ui @@ -1,6 +1,6 @@ KisWdgCustomPalette - + KisWdgCustomPalette @@ -16,7 +16,7 @@ unnamed - + palettename @@ -29,7 +29,7 @@ view - + addColor @@ -37,7 +37,7 @@ Add New Color... - + removeColor @@ -48,7 +48,7 @@ Remove Selected Color - + addPalette @@ -81,7 +81,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388db5944d4c5c5518869f73ce9db9cc40f929cc30300e18129a50685268a28291982e1a2175212eaab1c49d3f8971e7aec6aedb54a32b435dd8685cb8c0c4b8b0feb421b7bd8186a069d23209144b18cb0c02f3732ff3c3ccbdd705a571941213f1dd9d93739ef37e6fbeef08d334d9d5d0d090c701c8344d2176c1a6697a5d5d5dd8b64d2a95c2b2ac7f05b12c8b783c8e6118d8b6fd685fdb753a39394928e2a7c55724d693a7e214104220242805520a84d8b9e4790f0b1302c7751958f1e30534be9fa41a0c60db362dbe227f64af91b6e7719c2dfc0117a71c603da591de2882a7d3d4ec27122b10acad50aeb88044d542b84de3af7ab44aa55274f4e449dbf354bc347aa096fbf37e7efa2ecbad1b36907d78b289de8120232f37726250c3f52cf0a026a0f6065b9645d929e038167aa096d91b307171059034b5f8e9e9eb44fa052b4b25eeccd9dc99cb71f6ad082fbea2e351c075bdbdc13b9109fc01b83fef63e2e232e03076b68393231a0dcd024daf502c1e66e67a89cb971ef0e5a74bb4b61e6378248094b92ab0ac024b70ca017ef8360394187b2dc6d8b89ffa500e4d4f93d9083275d5e6f9913ade3dd70ee87c7d25c95646a25415aadab152b09ed4f8c5cc130a853839eac3951b684a61e70ef3f9c739668c24eba912afbfddc6d4d506e6a6d7b8b7d082aa8eb8dab19482cdcd220e36dd3dc19df23545de0a71f952861923493456cfd3cf36123c54a0b7bf0e8064621b21f7712c040857071ca4eea0f40a99f510573ec971cb48030e811a1faded3e94be85f2fb00703d1ff26f96ab9f011a5b04d0c4f26fdb948a754c1b25668c2491483d5d5d611617d6b8f0fe32cb779b492ce65168b4c774a4701eefd8f3a02d56e6e8f13aeefe9a63fa5a89d1970e91d908f3d46003e1480d173e28b37827c9b977348ab92ce16890237d1ec907ee3e8e3d8f60d0e1f4583d009f7d9860662acff89bad1c1faad0717493f7ce7713ed8cb0995c255f2a317a26427b67198f6a70f51c0a41b902279ed1187f23cc17130b7c74de65eac77a7a8f05517e41e2deefa4930576db60fa7a8ee1535134df3e93e7b82e0817476439fd6a9070a49f6fbe4a3077739db99b15c001146dd13a46cf1cc1f83943c62e51de76b0738fc9381e8f3390f0236b252e124999e11724fd833196164bacadb87848224fe874f779b43fe9f2dca928956d505a96dbb3f9bdc18661e00534c26d1a7a40e13912a11c9454280da41048a9915c75585df500074d53d816dc9edd229528ef0db66dbbea3ffdaffa471f1f28d8344df1bf800f1a6e9aa6f813c39885bc050f269c0000000049454e44ae426082 - + kis_palette_view.h diff --git a/krita/ui/wdgcustompattern.ui b/krita/ui/wdgcustompattern.ui index 9db08918..d195f670 100644 --- a/krita/ui/wdgcustompattern.ui +++ b/krita/ui/wdgcustompattern.ui @@ -1,6 +1,6 @@ KisWdgCustomPattern - + KisWdgCustomPattern @@ -16,15 +16,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + textLabel1 @@ -32,7 +32,7 @@ Source: - + Entire Image @@ -47,9 +47,9 @@ - + - layout6 + tqlayout6 @@ -65,14 +65,14 @@ Expanding - + 40 20 - + preview @@ -84,7 +84,7 @@ 0 - + 50 50 @@ -104,7 +104,7 @@ Expanding - + 40 20 @@ -113,15 +113,15 @@ - + - layout7 + tqlayout7 unnamed - + patternButton @@ -129,7 +129,7 @@ Use as Pattern - + exportButton @@ -140,7 +140,7 @@ Export - + addButton @@ -152,5 +152,5 @@ - + diff --git a/krita/ui/wdgdisplaysettings.ui b/krita/ui/wdgdisplaysettings.ui index 1427a497..990f316b 100644 --- a/krita/ui/wdgdisplaysettings.ui +++ b/krita/ui/wdgdisplaysettings.ui @@ -1,6 +1,6 @@ WdgDisplaySettings - + WdgDisplaySettings @@ -29,14 +29,14 @@ Expanding - + 20 50 - + buttonGroup1 @@ -47,15 +47,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + cbUseOpenGL @@ -75,7 +75,7 @@ Expanding - + 121 31 @@ -86,5 +86,5 @@ - + diff --git a/krita/ui/wdggeneralsettings.ui b/krita/ui/wdggeneralsettings.ui index 35864b49..051cf795 100644 --- a/krita/ui/wdggeneralsettings.ui +++ b/krita/ui/wdggeneralsettings.ui @@ -1,6 +1,6 @@ WdgGeneralSettings - + WdgGeneralSettings @@ -16,34 +16,34 @@ unnamed - + - layout3 + tqlayout3 unnamed - + - layout1 + tqlayout1 unnamed - + textLabel1 - &Cursor shape: + &Cursor tqshape: - m_cmbCursorShape + m_cmbtqCursorShape - + Tool Icon @@ -65,12 +65,12 @@ - m_cmbCursorShape + m_cmbtqCursorShape - + grpDockability @@ -84,7 +84,7 @@ unnamed - + radioAllowDocking @@ -92,7 +92,7 @@ Allow &docking - + radioDisallowDocking @@ -100,7 +100,7 @@ Allow only &floating - + radioSmartDocking @@ -110,15 +110,15 @@ - + - layout2 + tqlayout2 unnamed - + textLabel1_2 @@ -148,7 +148,7 @@ Expanding - + 41 20 @@ -165,7 +165,7 @@ Expanding - + 20 41 @@ -176,7 +176,7 @@ - + knuminput.h diff --git a/krita/ui/wdggridsettings.ui b/krita/ui/wdggridsettings.ui index 77515844..a89574d1 100644 --- a/krita/ui/wdggridsettings.ui +++ b/krita/ui/wdggridsettings.ui @@ -1,6 +1,6 @@ WdgGridSettingsBase - + WdgGridSettingsBase @@ -29,14 +29,14 @@ Expanding - + 20 31 - + groupBox9 @@ -57,7 +57,7 @@ Expanding - + 16 20 @@ -79,7 +79,7 @@ - + textLabel3 @@ -87,7 +87,7 @@ Subdivision: - + textLabel2_4 @@ -112,7 +112,7 @@ - + groupBox5 @@ -123,7 +123,7 @@ unnamed - + textLabel4 @@ -174,7 +174,7 @@ selectSubdivisionStyle - + textLabel5 @@ -192,7 +192,7 @@ Expanding - + 34 20 @@ -201,7 +201,7 @@ - + groupBox3 @@ -212,23 +212,23 @@ unnamed - + - layout8 + tqlayout8 unnamed - + - layout6 + tqlayout6 unnamed - + textLabel2 @@ -247,7 +247,7 @@ image0 - + textLabel2_2 @@ -282,7 +282,7 @@ - + bnLinkSpacing @@ -294,13 +294,13 @@ 0 - + 16 0 - + 16 32767 @@ -318,15 +318,15 @@ - + - layout9 + tqlayout9 unnamed - + textLabel1 @@ -357,7 +357,7 @@ Expanding - + 41 20 @@ -366,7 +366,7 @@ - + groupBox3_2 @@ -377,7 +377,7 @@ unnamed - + textLabel2_3 @@ -393,7 +393,7 @@ X: - + textLabel2_2_2 @@ -427,7 +427,7 @@ Expanding - + 20 20 @@ -448,7 +448,7 @@ 89504e470d0a1a0a0000000d49484452000000190000001a0806000000427df7cd000000b9494441544889dd95410ec4200845b1e9ba78ff538a176056260c5181569bccfca590ff2a204da510ecd601008078ed8778953372cec8db20d23c0a72417aa611900999997941a795500a256d2acf7a434354bf212d4927ebc488a417518d4dd75d0dcbb5f2ed983d59f101af94eb7f20d39e3c1963136299f7e2b361f89d9e8c6ed16efc4ee3892a205ecb9adc24fdcc176ffd4b9839e9b896592eb9d623b1106464e605b821da340200086e61afb91ea2a377e89577e57f00357f504513c00b590000000049454e44ae426082 - + kcolorbutton.h kcolorbutton.h diff --git a/krita/ui/wdglayerbox.ui b/krita/ui/wdglayerbox.ui index a384f306..9bfe5760 100644 --- a/krita/ui/wdglayerbox.ui +++ b/krita/ui/wdglayerbox.ui @@ -1,6 +1,6 @@ WdgLayerBox - + WdgLayerBox @@ -22,9 +22,9 @@ 0 - + - layout3 + tqlayout3 @@ -42,7 +42,7 @@ 0 - + 0 10 @@ -72,25 +72,25 @@ listLayers - + - layout6 + tqlayout6 unnamed - + bnAdd - + 22 22 - + 18 18 @@ -106,17 +106,17 @@ Create a new layer - + bnLower - + 22 22 - + 18 18 @@ -132,17 +132,17 @@ Move layer down - + bnRaise - + 22 22 - + 18 18 @@ -158,17 +158,17 @@ Move layer up - + bnProperties - + 22 22 - + 18 18 @@ -191,24 +191,24 @@ Expanding - + 20 20 - + bnDelete - + 22 22 - + 18 18 @@ -295,5 +295,5 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082 - + diff --git a/krita/ui/wdglayerproperties.ui b/krita/ui/wdglayerproperties.ui index b4000ea5..35eb01ad 100644 --- a/krita/ui/wdglayerproperties.ui +++ b/krita/ui/wdglayerproperties.ui @@ -1,6 +1,6 @@ WdgLayerProperties - + WdgLayerProperties @@ -16,12 +16,12 @@ unnamed - + editName - + textLabel3 @@ -37,7 +37,7 @@ cmbProfile - + textLabel4 @@ -45,7 +45,7 @@ Composite mode: - + textLabel1_2 @@ -53,7 +53,7 @@ Profile: - + textLabel2 @@ -61,7 +61,7 @@ Colorspace: - + textLabel1 @@ -166,5 +166,5 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388db5944d4c5c5518869f73ce9db9cc40f929cc30300e18129a50685268a28291982e1a2175212eaab1c49d3f8971e7aec6aedb54a32b435dd8685cb8c0c4b8b0feb421b7bd8186a069d23209144b18cb0c02f3732ff3c3ccbdd705a571941213f1dd9d93739ef37e6fbeef08d334d9d5d0d090c701c8344d2176c1a6697a5d5d5dd8b64d2a95c2b2ac7f05b12c8b783c8e6118d8b6fd685fdb753a39394928e2a7c55724d693a7e214104220242805520a84d8b9e4790f0b1302c7751958f1e30534be9fa41a0c60db362dbe227f64af91b6e7719c2dfc0117a71c603da591de2882a7d3d4ec27122b10acad50aeb88044d542b84de3af7ab44aa55274f4e449dbf354bc347aa096fbf37e7efa2ecbad1b36907d78b289de8120232f37726250c3f52cf0a026a0f6065b9645d929e038167aa096d91b307171059034b5f8e9e9eb44fa052b4b25eeccd9dc99cb71f6ad082fbea2e351c075bdbdc13b9109fc01b83fef63e2e232e03076b68393231a0dcd024daf502c1e66e67a89cb971ef0e5a74bb4b61e6378248094b92ab0ac024b70ca017ef8360394187b2dc6d8b89ffa500e4d4f93d9083275d5e6f9913ade3dd70ee87c7d25c95646a25415aadab152b09ed4f8c5cc130a853839eac3951b684a61e70ef3f9c739668c24eba912afbfddc6d4d506e6a6d7b8b7d082aa8eb8dab19482cdcd220e36dd3dc19df23545de0a71f952861923493456cfd3cf36123c54a0b7bf0e8064621b21f7712c040857071ca4eea0f40a99f510573ec971cb48030e811a1faded3e94be85f2fb00703d1ff26f96ab9f011a5b04d0c4f26fdb948a754c1b25668c2491483d5d5d611617d6b8f0fe32cb779b492ce65168b4c774a4701eefd8f3a02d56e6e8f13aeefe9a63fa5a89d1970e91d908f3d46003e1480d173e28b37827c9b977348ab92ce16890237d1ec907ee3e8e3d8f60d0e1f4583d009f7d9860662acff89bad1c1faad0717493f7ce7713ed8cb0995c255f2a317a26427b67198f6a70f51c0a41b902279ed1187f23cc17130b7c74de65eac77a7a8f05517e41e2deefa4930576db60fa7a8ee1535134df3e93e7b82e0817476439fd6a9070a49f6fbe4a3077739db99b15c001146dd13a46cf1cc1f83943c62e51de76b0738fc9381e8f3390f0236b252e124999e11724fd833196164bacadb87848224fe874f779b43fe9f2dca928956d505a96dbb3f9bdc18661e00534c26d1a7a40e13912a11c9454280da41048a9915c75585df500074d53d816dc9edd229528ef0db66dbbea3ffdaffa471f1f28d8344df1bf800f1a6e9aa6f813c39885bc050f269c0000000049454e44ae426082 - + diff --git a/krita/ui/wdgnewimage.ui b/krita/ui/wdgnewimage.ui index a85c1469..5e3b89a6 100644 --- a/krita/ui/wdgnewimage.ui +++ b/krita/ui/wdgnewimage.ui @@ -1,6 +1,6 @@ WdgNewImage - + WdgNewImage @@ -22,7 +22,7 @@ 0 - + lblName @@ -33,7 +33,7 @@ txtName - + txtName @@ -41,7 +41,7 @@ untitled-1 - + grpImage @@ -52,7 +52,7 @@ unnamed - + lblHeight @@ -63,7 +63,7 @@ intHeight - + lblWidth @@ -96,7 +96,7 @@ 0 - + lblResolution @@ -137,7 +137,7 @@ Expanding - + 131 61 @@ -146,7 +146,7 @@ - + grpMode @@ -157,7 +157,7 @@ unnamed - + lblColorSpaces @@ -178,7 +178,7 @@ cmbProfile - + lblProfiles @@ -191,7 +191,7 @@ - + grpContents @@ -202,12 +202,12 @@ unnamed - + txtDescription - + lblColor @@ -223,21 +223,21 @@ cmbColor - + lblDescription Description: - + AlignTop txtDescription - + lblOpacity @@ -248,7 +248,7 @@ sliderOpacity - + opacityPanel @@ -265,7 +265,7 @@ 0 - + textLabel1 @@ -273,7 +273,7 @@ Transparent - + sliderOpacity @@ -302,7 +302,7 @@ Opacity of the background color. - + textLabel2 @@ -314,9 +314,9 @@ - + - layout1 + tqlayout1 @@ -332,14 +332,14 @@ Expanding - + 480 21 - + m_createButton @@ -359,7 +359,7 @@ Expanding - + 21 0 @@ -421,7 +421,7 @@ sliderOpacity txtDescription - + knuminput.h knuminput.h diff --git a/krita/ui/wdgpalettechooser.ui b/krita/ui/wdgpalettechooser.ui index f1840dd8..553cd62b 100644 --- a/krita/ui/wdgpalettechooser.ui +++ b/krita/ui/wdgpalettechooser.ui @@ -1,6 +1,6 @@ KisPaletteChooser - + KisPaletteChooser @@ -22,14 +22,14 @@ unnamed - + paletteList - + - layout2 + tqlayout2 @@ -45,14 +45,14 @@ Expanding - + 255 20 - + buttonOk @@ -69,7 +69,7 @@ true - + buttonCancel @@ -101,5 +101,5 @@ reject() - + diff --git a/krita/ui/wdgperformancesettings.ui b/krita/ui/wdgperformancesettings.ui index e5f1b9c8..b8cd4cf4 100644 --- a/krita/ui/wdgperformancesettings.ui +++ b/krita/ui/wdgperformancesettings.ui @@ -1,6 +1,6 @@ WdgPerformanceSettings - + WdgPerformanceSettings @@ -16,15 +16,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + textLabel1 @@ -61,7 +61,7 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be Expanding - + 81 20 @@ -70,15 +70,15 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be - + - layout5 + tqlayout5 unnamed - + textLabel2 @@ -89,11 +89,11 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be This configures how much Krita will use the swap file. If you move the slider all the way to the left, Krita will not use the swap file at all. If you move it all the way to the right, Krita will make maximum use of the swap file. - + m_swappiness - + 600 32767 @@ -127,7 +127,7 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be Expanding - + 20 139 @@ -138,7 +138,7 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be - + knuminput.h knuminput.h diff --git a/krita/ui/wdgpressuresettings.ui b/krita/ui/wdgpressuresettings.ui index a081142c..41ead6a9 100644 --- a/krita/ui/wdgpressuresettings.ui +++ b/krita/ui/wdgpressuresettings.ui @@ -1,6 +1,6 @@ WdgPressureSettings - + WdgPressureSettings @@ -26,14 +26,14 @@ Expanding - + 21 89 - + textLabel3 @@ -41,7 +41,7 @@ Softer - + textLabel2 @@ -49,7 +49,7 @@ Firmer - + slPressure @@ -62,5 +62,5 @@ - + diff --git a/krita/ui/wdgselectionoptions.ui b/krita/ui/wdgselectionoptions.ui index 13c9394d..39846fa3 100644 --- a/krita/ui/wdgselectionoptions.ui +++ b/krita/ui/wdgselectionoptions.ui @@ -1,6 +1,6 @@ WdgSelectionOptions - + WdgSelectionOptions @@ -22,9 +22,9 @@ 0 - + - layout1 + tqlayout1 @@ -33,7 +33,7 @@ 6 - + lblAction @@ -41,7 +41,7 @@ Action: - + Add @@ -60,5 +60,5 @@ - + diff --git a/krita/ui/wdgshapeoptions.ui b/krita/ui/wdgshapeoptions.ui index 9c18771e..c0e6338b 100644 --- a/krita/ui/wdgshapeoptions.ui +++ b/krita/ui/wdgshapeoptions.ui @@ -1,6 +1,6 @@ WdgGeometryOptions - + WdgGeometryOptions @@ -35,14 +35,14 @@ Expanding - + 20 16 - + textLabel3 @@ -50,7 +50,7 @@ Fill: - + Not Filled @@ -85,7 +85,7 @@ Expanding - + 21 20 @@ -94,5 +94,5 @@ - + diff --git a/krita/ui/wdgtabletdevicesettings.ui b/krita/ui/wdgtabletdevicesettings.ui index 07f90d30..59cad307 100644 --- a/krita/ui/wdgtabletdevicesettings.ui +++ b/krita/ui/wdgtabletdevicesettings.ui @@ -1,6 +1,6 @@ WdgTabletDeviceSettings - + WdgTabletDeviceSettings @@ -29,14 +29,14 @@ Expanding - + 21 90 - + groupBox3 @@ -47,15 +47,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + textLabel1_2 @@ -63,22 +63,22 @@ X: - + cbX - + - layout4_4 + tqlayout4_4 unnamed - + textLabel1_2_4 @@ -86,22 +86,22 @@ Y: - + cbY - + - layout4_2 + tqlayout4_2 unnamed - + textLabel1_2_2 @@ -109,22 +109,22 @@ Pressure: - + cbPressure - + - layout4_3 + tqlayout4_3 unnamed - + textLabel1_2_3 @@ -132,22 +132,22 @@ X tilt: - + cbXTilt - + - layout4_6 + tqlayout4_6 unnamed - + textLabel1_2_6 @@ -155,22 +155,22 @@ Y tilt: - + cbYTilt - + - layout4_5 + tqlayout4_5 unnamed - + textLabel1_2_5 @@ -178,7 +178,7 @@ Wheel: - + cbWheel @@ -189,5 +189,5 @@ - + diff --git a/krita/ui/wdgtabletsettings.ui b/krita/ui/wdgtabletsettings.ui index 775f1e9b..ad4dc7bf 100644 --- a/krita/ui/wdgtabletsettings.ui +++ b/krita/ui/wdgtabletsettings.ui @@ -1,6 +1,6 @@ WdgTabletSettings - + WdgTabletSettings @@ -19,7 +19,7 @@ unnamed - + grpTabletDevices @@ -30,15 +30,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + textLabel1 @@ -46,22 +46,22 @@ Device: - + cbTabletDevice - + - layout5 + tqlayout5 unnamed - + chkEnableTabletDevice @@ -69,7 +69,7 @@ Enable - + btnConfigureTabletDevice @@ -91,7 +91,7 @@ Expanding - + 21 90 @@ -100,5 +100,5 @@ - + diff --git a/krita/ui/wdgtextbrush.ui b/krita/ui/wdgtextbrush.ui index 4126dc76..562a62f9 100644 --- a/krita/ui/wdgtextbrush.ui +++ b/krita/ui/wdgtextbrush.ui @@ -1,6 +1,6 @@ KisWdgTextBrush - + KisWdgTextBrush @@ -19,23 +19,23 @@ unnamed - + - layout3 + tqlayout3 unnamed - + - layout9 + tqlayout9 unnamed - + labelText @@ -47,7 +47,7 @@ lineEdit - + 120 0 @@ -63,15 +63,15 @@ - + - layout10 + tqlayout10 unnamed - + lblFont @@ -87,7 +87,7 @@ Font: - + bnFont @@ -120,7 +120,7 @@ Minimum - + 121 20 @@ -137,7 +137,7 @@ Minimum - + 20 31 @@ -148,10 +148,10 @@ - + boldButtonClicked() - - + + klineedit.h -- cgit v1.2.1