Browse Source

Remove the tq in front of these incorrectly TQt4-converted methods/data members:

tqrepaint[...]
tqinvalidate[...]
tqparent[...]
tqmask[...]
tqlayout[...]
tqalignment[...]


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 8 years ago
parent
commit
bce8199dda
100 changed files with 557 additions and 557 deletions
  1. 4
    4
      kamera/kcontrol/kameradevice.cpp
  2. 1
    1
      kamera/kcontrol/kameradevice.h
  3. 1
    1
      kcoloredit/kcoloreditview.cpp
  4. 7
    7
      kdvi/TeXFont_PK.cpp
  5. 14
    14
      kdvi/dviRenderer.cpp
  6. 9
    9
      kdvi/dviRenderer_export.cpp
  7. 1
    1
      kdvi/fontpool.cpp
  8. 1
    1
      kdvi/fontpool.h
  9. 3
    3
      kdvi/kdvi_multipage.cpp
  10. 1
    1
      kdvi/kdvi_multipage.h
  11. 2
    2
      kdvi/optionDialogFontsWidget_base.ui
  12. 1
    1
      kdvi/optionDialogSpecialWidget_base.ui
  13. 2
    2
      kdvi/special.cpp
  14. 2
    2
      kfaxview/faxmultipage.cpp
  15. 1
    1
      kfaxview/faxmultipage.h
  16. 3
    3
      kfaxview/faxrenderer.cpp
  17. 1
    1
      kfile-plugins/ps/gscreator.cpp
  18. 2
    2
      kghostview/generalsettingswidget.ui
  19. 2
    2
      kghostview/gssettingswidget.ui
  20. 2
    2
      kghostview/kgv_view.cpp
  21. 1
    1
      kghostview/kgv_view.h
  22. 2
    2
      kghostview/kgvfactory.cpp
  23. 1
    1
      kghostview/kgvfactory.h
  24. 1
    1
      kmrml/kmrml/kcontrol/serverconfigwidget.ui
  25. 1
    1
      kmrml/kmrml/mrml.cpp
  26. 5
    5
      kmrml/kmrml/mrml_part.cpp
  27. 2
    2
      kmrml/kmrml/mrml_part.h
  28. 12
    12
      kolourpaint/cursors/kpcursorlightcross.cpp
  29. 1
    1
      kolourpaint/kpcolor.cpp
  30. 1
    1
      kolourpaint/kpcolor.h
  31. 10
    10
      kolourpaint/kpdocument.cpp
  32. 1
    1
      kolourpaint/kpdocument.h
  33. 13
    13
      kolourpaint/kpselection.cpp
  34. 1
    1
      kolourpaint/kpselection.h
  35. 3
    3
      kolourpaint/kpthumbnail.cpp
  36. 21
    21
      kolourpaint/kpview.cpp
  37. 2
    2
      kolourpaint/kpview.h
  38. 1
    1
      kolourpaint/kpviewmanager.cpp
  39. 1
    1
      kolourpaint/kpviewmanager.h
  40. 1
    1
      kolourpaint/pixmapfx/kpeffectreducecolors.cpp
  41. 11
    11
      kolourpaint/pixmapfx/kpfloodfill.cpp
  42. 27
    27
      kolourpaint/pixmapfx/kppixmapfx.cpp
  43. 1
    1
      kolourpaint/pixmapfx/kppixmapfx.h
  44. 7
    7
      kolourpaint/tools/kptoolairspray.cpp
  45. 11
    11
      kolourpaint/tools/kptoolautocrop.cpp
  46. 1
    1
      kolourpaint/tools/kptoolclear.cpp
  47. 1
    1
      kolourpaint/tools/kptoolcrop.cpp
  48. 41
    41
      kolourpaint/tools/kptoolpen.cpp
  49. 2
    2
      kolourpaint/tools/kptoolpen.h
  50. 30
    30
      kolourpaint/tools/kptoolpolygon.cpp
  51. 39
    39
      kolourpaint/tools/kptoolrectangle.cpp
  52. 6
    6
      kolourpaint/tools/kptoolrectangle.h
  53. 3
    3
      kolourpaint/widgets/kptoolwidgetbase.cpp
  54. 1
    1
      kolourpaint/widgets/kptoolwidgetbase.h
  55. 9
    9
      kolourpaint/widgets/kptoolwidgeterasersize.cpp
  56. 5
    5
      kolourpaint/widgets/kptoolwidgetfillstyle.cpp
  57. 2
    2
      kolourpaint/widgets/kptoolwidgetfillstyle.h
  58. 8
    8
      kolourpaint/widgets/kptoolwidgetlinewidth.cpp
  59. 1
    1
      kooka/kocrbase.h
  60. 4
    4
      kooka/kocrocrad.cpp
  61. 2
    2
      kooka/kocrocrad.h
  62. 2
    2
      kooka/kookaimage.cpp
  63. 1
    1
      kooka/kookaimage.h
  64. 1
    1
      kooka/ksaneocr.cpp
  65. 1
    1
      kpdf/conf/dlgaccessibility.ui
  66. 1
    1
      kpdf/conf/dlggeneral.ui
  67. 1
    1
      kpdf/conf/dlgperformance.ui
  68. 1
    1
      kpdf/conf/dlgpresentation.ui
  69. 2
    2
      kpdf/core/generator_pdf/gp_outputdev.cpp
  70. 1
    1
      kpdf/core/generator_pdf/gp_outputdev.h
  71. 3
    3
      kpdf/part.cpp
  72. 1
    1
      kpdf/part.h
  73. 1
    1
      kpdf/ui/minibar.cpp
  74. 13
    13
      kpdf/ui/pageview.cpp
  75. 2
    2
      kpdf/ui/pageview.h
  76. 4
    4
      kpdf/ui/pageviewutils.cpp
  77. 5
    5
      kpdf/ui/toc.cpp
  78. 1
    1
      kpdf/ui/toc.h
  79. 84
    84
      kpovmodeler/pmdockwidget.cpp
  80. 2
    2
      kpovmodeler/pmdockwidget.h
  81. 7
    7
      kpovmodeler/pmdockwidget_private.cpp
  82. 2
    2
      kpovmodeler/pmfactory.cpp
  83. 1
    1
      kpovmodeler/pmfactory.h
  84. 19
    19
      kpovmodeler/pmglview.cpp
  85. 1
    1
      kpovmodeler/pmglview.h
  86. 14
    14
      kpovmodeler/pminsertrulesystem.cpp
  87. 5
    5
      kpovmodeler/pminsertrulesystem.h
  88. 2
    2
      kpovmodeler/pmlayoutsettings.cpp
  89. 2
    2
      kpovmodeler/pmlibraryhandle.cpp
  90. 2
    2
      kpovmodeler/pmlibraryhandle.h
  91. 7
    7
      kpovmodeler/pmlibraryiconview.cpp
  92. 1
    1
      kpovmodeler/pmlibrarymanager.h
  93. 1
    1
      kpovmodeler/pmparser.cpp
  94. 3
    3
      kpovmodeler/pmpart.cpp
  95. 2
    2
      kpovmodeler/pmpart.h
  96. 1
    1
      kpovmodeler/pmshell.cpp
  97. 1
    1
      kpovmodeler/pmtreeview.cpp
  98. 1
    1
      kpovmodeler/pmtreeviewitem.h
  99. 5
    5
      kpovmodeler/pmviewlayoutmanager.cpp
  100. 0
    0
      kpovmodeler/pmviewlayoutmanager.h

+ 4
- 4
kamera/kcontrol/kameradevice.cpp View File

@@ -197,7 +197,7 @@ void KCamera::load(KConfig *config)
m_model = config->readEntry("Model");
if (m_path.isNull())
m_path = config->readEntry("Path");
tqinvalidateCamera();
invalidateCamera();
}

void KCamera::save(KConfig *config)
@@ -223,17 +223,17 @@ void KCamera::setName(const TQString &name)
void KCamera::setModel(const TQString &model)
{
m_model = model;
tqinvalidateCamera();
invalidateCamera();
initInformation();
}

void KCamera::setPath(const TQString &path)
{
m_path = path;
tqinvalidateCamera();
invalidateCamera();
}

void KCamera::tqinvalidateCamera()
void KCamera::invalidateCamera()
{
if (m_camera) {
gp_camera_free(m_camera);

+ 1
- 1
kamera/kcontrol/kameradevice.h View File

@@ -44,7 +44,7 @@ class KCamera : public TQObject {
public:
KCamera(const TQString &name, const TQString &path);
~KCamera();
void tqinvalidateCamera();
void invalidateCamera();
bool configure();
void load(KConfig *m_config);
void save(KConfig *m_config);

+ 1
- 1
kcoloredit/kcoloreditview.cpp View File

@@ -145,7 +145,7 @@ void KColorEditView::setColorAtCursorComponentValueLabelSizes(TQLabel* const lab
}

KColorEditDoc *KColorEditView::document() const {
KColorEditApp *theApp=(KColorEditApp *) tqparentWidget();
KColorEditApp *theApp=(KColorEditApp *) parentWidget();

return theApp->document();
}

+ 7
- 7
kdvi/TeXFont_PK.cpp View File

@@ -347,7 +347,7 @@ static const uchar bitflip[256] = {
15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255
};

static TQ_UINT32 bit_tqmasks[33] = {
static TQ_UINT32 bit_masks[33] = {
0x0, 0x1, 0x3, 0x7,
0xf, 0x1f, 0x3f, 0x7f,
0xff, 0x1ff, 0x3ff, 0x7ff,
@@ -595,12 +595,12 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
h_bit -= count;
word_weight -= count;
if (paint_switch)
word |= bit_tqmasks[count] << word_weight;
word |= bit_masks[count] << word_weight;
count = 0;
} else
if (count >= h_bit && h_bit <= word_weight) {
if (paint_switch)
word |= bit_tqmasks[h_bit] << (word_weight - h_bit);
word |= bit_masks[h_bit] << (word_weight - h_bit);
*cp++ = word;
/* "output" row(s) */
for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) {
@@ -615,7 +615,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
h_bit = characterBitmaps[ch]->w;
} else {
if (paint_switch)
word |= bit_tqmasks[word_weight];
word |= bit_masks[word_weight];
*cp++ = word;
word = 0;
count -= word_weight;
@@ -679,14 +679,14 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
while (count > 0) {
if (count < word_weight && count < h_bit) {
if (paint_switch)
word |= bit_tqmasks[count] << (32 - word_weight);
word |= bit_masks[count] << (32 - word_weight);
h_bit -= count;
word_weight -= count;
count = 0;
} else
if (count >= h_bit && h_bit <= word_weight) {
if (paint_switch)
word |= bit_tqmasks[h_bit] << (32 - word_weight);
word |= bit_masks[h_bit] << (32 - word_weight);
*cp++ = word;
/* "output" row(s) */
for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) {
@@ -701,7 +701,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
h_bit = characterBitmaps[ch]->w;
} else {
if (paint_switch)
word |= bit_tqmasks[word_weight] << (32 - word_weight);
word |= bit_masks[word_weight] << (32 - word_weight);
*cp++ = word;
word = 0;
count -= word_weight;

+ 14
- 14
kdvi/dviRenderer.cpp View File

@@ -79,7 +79,7 @@ dviRenderer::dviRenderer(TQWidget *par)

connect(&font_pool, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) );

tqparentWidget = par;
parentWidget = par;
shrinkfactor = 3;
current_page = 0;
resolutionInDPI = 0.0;
@@ -206,7 +206,7 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page)
page->isEmpty = false;
if (errorMsg.isEmpty() != true) {
KMessageBox::detailedError(tqparentWidget,
KMessageBox::detailedError(parentWidget,
i18n("<qt><strong>File corruption!</strong> KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>"),
errorMsg, i18n("DVI File Error"));
@@ -260,7 +260,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
if (showMsg) {
KDialogBase *dialog= new KDialogBase(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes,
tqparentWidget, "information", true, true,KStdGuiItem::ok() );
parentWidget, "information", true, true,KStdGuiItem::ok() );
TQVBox *topcontents = new TQVBox (dialog);
topcontents->setSpacing(KDialog::spacingHint()*2);
@@ -311,7 +311,7 @@ void dviRenderer::embedPostScript()
if (!dviFile)
return;

embedPS_progress = new KProgressDialog(tqparentWidget, "embedPSProgressDialog",
embedPS_progress = new KProgressDialog(parentWidget, "embedPSProgressDialog",
i18n("Embedding PostScript Files"), TQString(), true);
if (!embedPS_progress)
return;
@@ -342,10 +342,10 @@ void dviRenderer::embedPostScript()

if (!errorMsg.isEmpty()) {
errorMsg = "<qt>" + errorMsg + "</qt>";
KMessageBox::detailedError(tqparentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg);
KMessageBox::detailedError(parentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg);
errorMsg = TQString();
} else
KMessageBox::information(tqparentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You "
KMessageBox::information(parentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You "
"will probably want to save the DVI file now.") + "</qt>",
TQString(), "embeddingDone");

@@ -435,7 +435,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// Make sure the file actually exists.
if (!fi.exists() || fi.isDir()) {
KMessageBox::error( tqparentWidget,
KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist. "
"KDVI already tried to add the ending '.dvi'.</qt>").tqarg(filename),
i18n("File Error!"));
@@ -448,7 +448,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// the multipage.
TQString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() );
if (mimetype != "application/x-dvi") {
KMessageBox::sorry( tqparentWidget,
KMessageBox::sorry( parentWidget,
i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr> which has "
"type <strong>%2</strong>. KDVI can only load DVI (.dvi) files.</qt>" )
.tqarg( fname )
@@ -459,7 +459,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// Check if the file is a valid DVI file.
if (!isValidFile(filename))
{
KMessageBox::sorry( tqparentWidget,
KMessageBox::sorry( parentWidget,
i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>")
.tqarg( fname ) );
@@ -477,7 +477,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
if ((dviFile_new->dvi_Data() == NULL)||(dviFile_new->errorMsg.isEmpty() != true)) {
TQApplication::restoreOverrideCursor();
if (dviFile_new->errorMsg.isEmpty() != true)
KMessageBox::detailedError(tqparentWidget,
KMessageBox::detailedError(parentWidget,
i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>"),
dviFile_new->errorMsg, i18n("DVI File Error"));
@@ -637,7 +637,7 @@ Anchor dviRenderer::parseReference(const TQString &reference)
TQString refFileName = splitter.filePath();
if (sourceHyperLinkAnchors.isEmpty()) {
KMessageBox::sorry(tqparentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to "
KMessageBox::sorry(parentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to "
"line %1 in the TeX-file <strong>%2</strong>. It seems, however, that the DVI file "
"does not contain the necessary source file information. "
"We refer to the manual of KDVI for a detailed explanation on how to include this "
@@ -680,7 +680,7 @@ Anchor dviRenderer::parseReference(const TQString &reference)
return Anchor(bestMatch->page, bestMatch->distance_from_top);
} else
if (anchorForRefFileFound == false)
KMessageBox::sorry(tqparentWidget, i18n("<qt>KDVI was not able to locate the place in the DVI file which corresponds to "
KMessageBox::sorry(parentWidget, i18n("<qt>KDVI was not able to locate the place in the DVI file which corresponds to "
"line %1 in the TeX-file <strong>%2</strong>.</qt>").tqarg(refLineNumber).tqarg(refFileName),
i18n( "Could Not Find Reference" ));
else {
@@ -733,7 +733,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
TQString TeXfile = splitter.filePath();
if ( ! splitter.fileExists() )
{
KMessageBox::sorry(tqparentWidget, TQString("<qt>") +
KMessageBox::sorry(parentWidget, TQString("<qt>") +
i18n("The DVI-file refers to the TeX-file "
"<strong>%1</strong> which could not be found.").tqarg(KShellProcess::quote(TeXfile)) +
TQString("</qt>"),
@@ -743,7 +743,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
TQString command = editorCommand;
if (command.isEmpty() == true) {
int r = KMessageBox::warningContinueCancel(tqparentWidget, TQString("<qt>") +
int r = KMessageBox::warningContinueCancel(parentWidget, TQString("<qt>") +
i18n("You have not yet specified an editor for inverse search. "
"Please choose your favorite editor in the "
"<strong>DVI options dialog</strong> "

+ 9
- 9
kdvi/dviRenderer_export.cpp View File

@@ -96,12 +96,12 @@ void dviRenderer::exportPDF()
TQString suggestedName = dviFile->filename;
suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".pdf";

TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), tqparentWidget, i18n("Export File As"));
TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), parentWidget, i18n("Export File As"));
if (fileName.isEmpty())
return;
TQFileInfo finfo(fileName);
if (finfo.exists()) {
int r = KMessageBox::warningContinueCancel (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName),
int r = KMessageBox::warningContinueCancel (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName),
i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel)
return;
@@ -116,7 +116,7 @@ void dviRenderer::exportPDF()
"a while because dvipdfm needs to generate its own bitmap fonts "
"Please be patient."),
i18n("Waiting for dvipdfm to finish..."),
tqparentWidget, i18n("dvipdfm progress dialog"), false );
parentWidget, i18n("dvipdfm progress dialog"), false );
if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages );
@@ -177,7 +177,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
return;

if (dviFile->numberOfExternalNONPSFiles != 0) {
KMessageBox::sorry( tqparentWidget,
KMessageBox::sorry( parentWidget,
i18n("<qt><P>This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the "
"<strong>dvips</strong> program that KDVI uses interally to print or to export to PostScript. The functionality that "
"you require is therefore unavailable in this version of KDVI.</p>"
@@ -195,12 +195,12 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
TQString suggestedName = dviFile->filename;
suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".ps";

fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), tqparentWidget, i18n("Export File As"));
fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), parentWidget, i18n("Export File As"));
if (fileName.isEmpty())
return;
TQFileInfo finfo(fileName);
if (finfo.exists()) {
int r = KMessageBox::warningYesNo (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName),
int r = KMessageBox::warningYesNo (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName),
i18n("Overwrite File"));
if (r == KMessageBox::No)
return;
@@ -219,7 +219,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
"a while because dvips needs to generate its own bitmap fonts "
"Please be patient."),
i18n("Waiting for dvips to finish..."),
tqparentWidget, i18n("dvips progress dialog"), false );
parentWidget, i18n("dvips progress dialog"), false );
if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages );
@@ -341,7 +341,7 @@ void dviRenderer::dvips_terminated(KProcess *sproc)
// export_errorString, does not correspond to sproc. In that case,
// we ingore the return status silently.
if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0))
KMessageBox::error( tqparentWidget, export_errorString );
KMessageBox::error( parentWidget, export_errorString );

if (export_printer != 0)
export_printer->printFiles( TQStringList(export_fileName), true );
@@ -359,7 +359,7 @@ void dviRenderer::editorCommand_terminated(KProcess *sproc)
// export_errorString, does not correspond to sproc. In that case,
// we ingore the return status silently.
if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0))
KMessageBox::error( tqparentWidget, export_errorString );
KMessageBox::error( parentWidget, export_errorString );

// Let's hope that this is not all too nasty... killing a
// KShellProcess from a slot that was called from the KShellProcess

+ 1
- 1
kdvi/fontpool.cpp View File

@@ -77,7 +77,7 @@ fontPool::fontPool()
// pixmaps. Experiments show that --depending of the configuration
// of QT at compile and runtime or the availability of the XFt
// extension, alpha channels are either supported, or silently
// converted to 1-bit tqmasks.
// converted to 1-bit masks.
TQImage start(1, 1, 32); // Generate a 1x1 image, black with alpha=0x10
start.setAlphaBuffer(true);
TQ_UINT32 *destScanLine = (TQ_UINT32 *)start.scanLine(0);

+ 1
- 1
kdvi/fontpool.h View File

@@ -125,7 +125,7 @@ public:
channel of pixmaps. Experiments show that --depending of the
configuration of QT at compile and runtime or the availability
of the XFt extension, alpha channels are either supported, or
silently converted to 1-bit tqmasks. The redering routines in the
silently converted to 1-bit masks. The redering routines in the
TeXFont implementation use this flag to choose the apropriate
drawing routines for the different setups. */
bool TQPixmapSupportsAlpha;

+ 3
- 3
kdvi/kdvi_multipage.cpp View File

@@ -49,9 +49,9 @@ K_EXPORT_COMPONENT_FACTORY(kdvipart, KDVIMultiPageFactory)



KDVIMultiPage::KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent,
KDVIMultiPage::KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args)
: KMultiPage(tqparentWidget, widgetName, tqparent, name), DVIRenderer(tqparentWidget)
: KMultiPage(parentWidget, widgetName, tqparent, name), DVIRenderer(parentWidget)
{
Q_UNUSED(args);
#ifdef PERFORMANCE_MEASUREMENT
@@ -239,7 +239,7 @@ void KDVIMultiPage::print()

// Show the printer options dialog. Return immediately if the user
// aborts.
if (!printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) ))
if (!printer->setup(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) ))
return;

// This funny method call is necessary for the KPrinter to return

+ 1
- 1
kdvi/kdvi_multipage.h View File

@@ -15,7 +15,7 @@ class KDVIMultiPage : public KMultiPage
TQ_OBJECT

public:
KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent,
KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args = TQStringList());
virtual ~KDVIMultiPage();


+ 2
- 2
kdvi/optionDialogFontsWidget_base.ui View File

@@ -59,6 +59,6 @@
<Q_SLOTS>
<slot>buttonGroup1_clicked(int)</slot>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>

+ 1
- 1
kdvi/optionDialogSpecialWidget_base.ui View File

@@ -199,7 +199,7 @@
</widget>
<customwidgets>
</customwidgets>
<tqlayoutdefaults spacing="6" margin="11"/>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>

+ 2
- 2
kdvi/special.cpp View File

@@ -650,11 +650,11 @@ void dviRenderer::applicationDoSpecial(char *cp)
// line break is encountered)
if (special_command.startsWith("ps:SDict begin [") && special_command.endsWith(" pdfmark end")) {
if (!currentlyDrawnPage->hyperLinkList.isEmpty()) {
// Parse the PostScript literal text string inside tqparentheses
// Parse the PostScript literal text string inside parentheses
// and store it into 'targetName'. The scanner works
// according to "PostScript language reference, third edition"
// - Sec. 3.2.2. The specification is implemented completely:
// balanced tqparentheses and all escape sequences are
// balanced parentheses and all escape sequences are
// considered.
TQString tmpTargetName = special_command.section('(', 1);
TQString targetName;

+ 2
- 2
kfaxview/faxmultipage.cpp View File

@@ -31,9 +31,9 @@ typedef KParts::GenericFactory<FaxMultiPage> FaxMultiPageFactory;
K_EXPORT_COMPONENT_FACTORY(kfaxviewpart, FaxMultiPageFactory)


FaxMultiPage::FaxMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent,
FaxMultiPage::FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList&)
: KMultiPage(tqparentWidget, widgetName, tqparent, name), faxRenderer(tqparentWidget)
: KMultiPage(parentWidget, widgetName, tqparent, name), faxRenderer(parentWidget)
{
/* This is kparts wizardry that cannot be understood by man. Simply
change the names to match your implementation. */

+ 1
- 1
kfaxview/faxmultipage.h View File

@@ -90,7 +90,7 @@ public:
kmultipage. Please have a look at the constructor's source code to
see how to adjust this for your implementation.
*/
FaxMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent,
FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args = TQStringList());
/** Destructor

+ 3
- 3
kfaxview/faxrenderer.cpp View File

@@ -135,7 +135,7 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &)
TQFileInfo fi(fname);
TQString filename = fi.absFilePath();
if (!fi.exists() || fi.isDir()) {
KMessageBox::error( tqparentWidget,
KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").tqarg(filename),
i18n("File Error"));
// the return value 'false' indicates that this operation was not successful.
@@ -156,11 +156,11 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &)
// leaving an error message in fax.errorString(). We try to handle
// this case gracefully.
if (fax.errorString().isEmpty())
KMessageBox::error( tqparentWidget,
KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").tqarg(filename),
i18n("File Error"));
else
KMessageBox::detailedError( tqparentWidget,
KMessageBox::detailedError( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").tqarg(filename),
fax.errorString(),
i18n("File Error"));

+ 1
- 1
kfile-plugins/ps/gscreator.cpp View File

@@ -176,7 +176,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img
{
// The code in the loop (when testing whether got_sig_term got set)
// should read some variation of:
// tqparentJob()->wasKilled()
// parentJob()->wasKilled()
//
// Unfortunatelly, that's currently impossible without breaking BIC.
// So we need to catch the signal ourselves.

+ 2
- 2
kghostview/generalsettingswidget.ui View File

@@ -106,6 +106,6 @@ In case of problems you might want to see its error messages</string>
<include location="global" impldecl="in implementation">kdialog.h</include>
<include location="local" impldecl="in implementation">generalsettingswidget.ui.h</include>
</includes>
<tqlayoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>

+ 2
- 2
kghostview/gssettingswidget.ui View File

@@ -145,8 +145,8 @@
<Q_SLOTS>
<slot specifier="non virtual">setDetectedVersion( TQString v )</slot>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kurlrequester.h</includehint>

+ 2
- 2
kghostview/kgv_view.cpp View File

@@ -74,7 +74,7 @@ namespace KGV {
}
}

KGVPart::KGVPart( TQWidget* tqparentWidget, const char*,
KGVPart::KGVPart( TQWidget* parentWidget, const char*,
TQObject* tqparent, const char* name,
const TQStringList &args ) :
KParts::ReadOnlyPart( tqparent, name ),
@@ -108,7 +108,7 @@ KGVPart::KGVPart( TQWidget* tqparentWidget, const char*,
this, TQT_SLOT( slotDoFileDirty() ) );

// Setup main widget
_mainWidget = new KGVMainWidget( tqparentWidget );
_mainWidget = new KGVMainWidget( parentWidget );
_mainWidget->setFocusPolicy( TQ_StrongFocus );
_mainWidget->installEventFilter( this );
_mainWidget->setAcceptDrops( true );

+ 1
- 1
kghostview/kgv_view.h View File

@@ -57,7 +57,7 @@ class KGVPart: public KParts::ReadOnlyPart
Q_OBJECT
TQ_OBJECT
public:
KGVPart( TQWidget* tqparentWidget, const char* widgetName,
KGVPart( TQWidget* parentWidget, const char* widgetName,
TQObject* tqparent, const char* name,
const TQStringList& args = TQStringList() );


+ 2
- 2
kghostview/kgvfactory.cpp View File

@@ -52,7 +52,7 @@ KGVFactory *KGVFactory::s_self;
KInstance *KGVFactory::s_instance;
KAboutData *KGVFactory::s_aboutData;

KParts::Part *KGVFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName,
KParts::Part *KGVFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name,
const char *className,
const TQStringList &args_ )
@@ -68,7 +68,7 @@ KParts::Part *KGVFactory::createPartObject( TQWidget *tqparentWidget, const char
if ( !strcmp( className, "Browser/View" ) ) {
className = "KParts::ReadOnlyPart";
}
KGVPart *part = KDEPrivate::ConcreteFactory<KGVPart>::create( tqparentWidget,
KGVPart *part = KDEPrivate::ConcreteFactory<KGVPart>::create( parentWidget,
widgetName,
tqparent,
name,

+ 1
- 1
kghostview/kgvfactory.h View File

@@ -33,7 +33,7 @@ class KDE_EXPORT KGVFactory : public KParts::Factory
static KInstance *instance();
static KAboutData *aboutData();

virtual KParts::Part *createPartObject( TQWidget *tqparentWidget, const char *widgetName,
virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name,
const char *className,
const TQStringList &args );

+ 1
- 1
kmrml/kmrml/kcontrol/serverconfigwidget.ui View File

@@ -268,5 +268,5 @@
<tabstop>m_userEdit</tabstop>
<tabstop>m_passEdit</tabstop>
</tabstops>
<tqlayoutdefaults spacing="6" margin="11"/>
<layoutdefaults spacing="6" margin="11"/>
</UI>

+ 1
- 1
kmrml/kmrml/mrml.cpp View File

@@ -214,7 +214,7 @@ bool Mrml::startSession( const KURL& url )
// desired collection-id

// Wolfgang says, we shouldn't create an own session-id here, as gcc 2.95
// aptqparently makes problems in exception handling somehow. So we simply
// apparently makes problems in exception handling somehow. So we simply
// accept the server's session-id.
TQString msg = mrmlString( TQString() ).tqarg(
"<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \

+ 5
- 5
kmrml/kmrml/mrml_part.cpp View File

@@ -90,14 +90,14 @@ KInstance * PartFactory::instance()
return s_instance;
}

KParts::Part * PartFactory::createPartObject( TQWidget *tqparentWidget,
KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget,
const char *widgetName,
TQObject *tqparent,
const char *name,
const char *,
const TQStringList& args )
{
return new MrmlPart( tqparentWidget, widgetName, tqparent, name, args );
return new MrmlPart( parentWidget, widgetName, tqparent, name, args );
}


@@ -111,7 +111,7 @@ KParts::Part * PartFactory::createPartObject( TQWidget *tqparentWidget,

uint MrmlPart::s_sessionId = 0;

MrmlPart::MrmlPart( TQWidget *tqparentWidget, const char * /* widgetName */,
MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */,
TQObject *tqparent, const char *name,
const TQStringList& /* args */ )
: KParts::ReadOnlyPart( tqparent, name ),
@@ -126,7 +126,7 @@ MrmlPart::MrmlPart( TQWidget *tqparentWidget, const char * /* widgetName */,
KConfig *config = PartFactory::instance()->config();
config->setGroup("MRML Settings");

TQVBox *box = new TQVBox( tqparentWidget, "main mrml box" );
TQVBox *box = new TQVBox( parentWidget, "main mrml box" );
m_view = new MrmlView( box, "MrmlView" );
connect( m_view, TQT_SIGNAL( activated( const KURL&, ButtonState )),
this, TQT_SLOT( slotActivated( const KURL&, ButtonState )));
@@ -677,7 +677,7 @@ void MrmlPart::performQuery( TQDomDocument& doc )
queryStep.setAttribute("query-type", "at-random");

// remove user-relevance-element-list element for random search
relevanceList.tqparentNode().removeChild( relevanceList );
relevanceList.parentNode().removeChild( relevanceList );
}
}
else

+ 2
- 2
kmrml/kmrml/mrml_part.h View File

@@ -59,7 +59,7 @@ class MrmlPart : public KParts::ReadOnlyPart
public:
enum tqStatus { NeedCollection, CanSearch, InProgress };

MrmlPart( TQWidget *tqparentWidget, const char *widgetName,
MrmlPart( TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name, const TQStringList& args );
~MrmlPart();

@@ -160,7 +160,7 @@ public:
static KInstance * instance();

protected:
virtual KParts::Part * createPartObject( TQWidget *tqparentWidget = 0,
virtual KParts::Part * createPartObject( TQWidget *parentWidget = 0,
const char *widgetName = 0,
TQObject *tqparent = 0,
const char *name = 0,

+ 12
- 12
kolourpaint/cursors/kpcursorlightcross.cpp View File

@@ -42,7 +42,7 @@ enum PixelValue
};

static void setPixel (unsigned char *colorBitmap,
unsigned char *tqmaskBitmap,
unsigned char *maskBitmap,
int width,
int y, int x, enum PixelValue pv)
{
@@ -52,32 +52,32 @@ static void setPixel (unsigned char *colorBitmap,
const int MaskOpaque = 1;
const int MaskTransparent = 0;

int colorValue, tqmaskValue;
int colorValue, maskValue;

switch (pv)
{
case White:
colorValue = ColorWhite;
tqmaskValue = MaskOpaque;
maskValue = MaskOpaque;
break;

case Black:
colorValue = ColorBlack;
tqmaskValue = MaskOpaque;
maskValue = MaskOpaque;
break;

case Transparent:
default:
colorValue = ColorWhite;
tqmaskValue = MaskTransparent;
maskValue = MaskTransparent;
break;
}

if (colorValue)
colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));

if (tqmaskValue)
tqmaskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
if (maskValue)
maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
}


@@ -90,10 +90,10 @@ const TQCursor *kpMakeCursorLightCross ()
const int side = 24;
const int byteSize = (side * side) / 8;
unsigned char *colorBitmap = new unsigned char [byteSize];
unsigned char *tqmaskBitmap = new unsigned char [byteSize];
unsigned char *maskBitmap = new unsigned char [byteSize];

memset (colorBitmap, 0, byteSize);
memset (tqmaskBitmap, 0, byteSize);
memset (maskBitmap, 0, byteSize);

const int oddSide = side - 1;
const int strokeLen = oddSide * 3 / 8;
@@ -104,7 +104,7 @@ const TQCursor *kpMakeCursorLightCross ()

#define X_(val) (val)
#define Y_(val) (val)
#define DRAW(y,x) setPixel (colorBitmap, tqmaskBitmap, side, (y), (x), pv)
#define DRAW(y,x) setPixel (colorBitmap, maskBitmap, side, (y), (x), pv)
// horizontal
DRAW (Y_(side / 2), X_(1 + i));
DRAW (Y_(side / 2), X_(side - 1 - i));
@@ -118,9 +118,9 @@ const TQCursor *kpMakeCursorLightCross ()
}

TQCursor *cursor = new TQCursor (TQBitmap (side, side, colorBitmap, true/*little endian bit order*/),
TQBitmap (side, side, tqmaskBitmap, true/*little endian bit order*/));
TQBitmap (side, side, maskBitmap, true/*little endian bit order*/));

delete [] tqmaskBitmap;
delete [] maskBitmap;
delete [] colorBitmap;

return cursor;

+ 1
- 1
kolourpaint/kpcolor.cpp View File

@@ -354,7 +354,7 @@ const TQColor &kpColor::toTQColor () const
}

// public
TQColor kpColor::tqmaskColor () const
TQColor kpColor::maskColor () const
{
return isTransparent () ? TQt::color0 : TQt::color1;
}

+ 1
- 1
kolourpaint/kpcolor.h View File

@@ -87,7 +87,7 @@ public:
// (const TQColor & return results in fewer color reallocations)
const TQColor &toTQColor () const;

TQColor tqmaskColor () const;
TQColor maskColor () const;

private:
bool m_rgbaIsValid;

+ 10
- 10
kolourpaint/kpdocument.cpp View File

@@ -1235,7 +1235,7 @@ void kpDocument::setSelection (const kpSelection &selection)
}

// public
TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
{
kpSelection *sel = selection ();

@@ -1259,13 +1259,13 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
}


TQBitmap tqmaskBitmap = tqmaskBitmap_;
if (tqmaskBitmap.isNull () &&
TQBitmap maskBitmap = maskBitmap_;
if (maskBitmap.isNull () &&
!sel->isRectangular ())
{
tqmaskBitmap = sel->tqmaskForOwnType ();
maskBitmap = sel->maskForOwnType ();

if (tqmaskBitmap.isNull ())
if (maskBitmap.isNull ())
{
kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl;
return TQPixmap ();
@@ -1275,7 +1275,7 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const

TQPixmap selPixmap = getPixmapAt (boundingRect);

if (!tqmaskBitmap.isNull ())
if (!maskBitmap.isNull ())
{
// Src Dest = Result
// -----------------
@@ -1286,8 +1286,8 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap);
bitBlt (&selMaskBitmap,
TQPoint (0, 0),
&tqmaskBitmap,
TQRect (0, 0, tqmaskBitmap.width (), tqmaskBitmap.height ()),
&maskBitmap,
TQRect (0, 0, maskBitmap.width (), maskBitmap.height ()),
TQt::AndROP);
selPixmap.setMask (selMaskBitmap);
}
@@ -1328,14 +1328,14 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
// Figure out tqmask for non-rectangular selections
//

TQBitmap tqmaskBitmap = sel->tqmaskForOwnType (true/*return null bitmap for rectangular*/);
TQBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/);


//
// Get selection pixmap from document
//

TQPixmap selPixmap = getSelectedPixmap (tqmaskBitmap);
TQPixmap selPixmap = getSelectedPixmap (maskBitmap);

if (vm)
vm->setQueueUpdates ();

+ 1
- 1
kolourpaint/kpdocument.h View File

@@ -189,7 +189,7 @@ public:
void setSelection (const kpSelection &selection);

// TODO: this always returns opaque pixmap - need transparent ver
TQPixmap getSelectedPixmap (const TQBitmap &tqmaskBitmap = TQBitmap ()) const;
TQPixmap getSelectedPixmap (const TQBitmap &maskBitmap = TQBitmap ()) const;

bool selectionPullFromDocument (const kpColor &backgroundColor);
bool selectionDelete ();

+ 13
- 13
kolourpaint/kpselection.cpp View File

@@ -337,11 +337,11 @@ int kpSelection::size () const


// public
TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
{
if (!m_rect.isValid ())
{
kdError () << "kpSelection::tqmaskForOwnType() boundingRect invalid" << endl;
kdError () << "kpSelection::maskForOwnType() boundingRect invalid" << endl;
return TQBitmap ();
}

@@ -351,17 +351,17 @@ TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
if (nullForRectangular)
return TQBitmap ();

TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ());
tqmaskBitmap.fill (TQt::color1/*opaque*/);
return tqmaskBitmap;
TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
maskBitmap.fill (TQt::color1/*opaque*/);
return maskBitmap;
}


TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ());
tqmaskBitmap.fill (TQt::color0/*transparent*/);
TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
maskBitmap.fill (TQt::color0/*transparent*/);

TQPainter painter;
painter.begin (&tqmaskBitmap);
painter.begin (&maskBitmap);
painter.setPen (TQt::color1)/*opaque*/;
painter.setBrush (TQt::color1/*opaque*/);

@@ -379,7 +379,7 @@ TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
painter.end ();


return tqmaskBitmap;
return maskBitmap;
}


@@ -615,11 +615,11 @@ static TQRgb mostContrastingRGB (TQRgb val)
}

// private
static void drawTextLines (TQPainter *painter, TQPainter *tqmaskPainter,
static void drawTextLines (TQPainter *painter, TQPainter *maskPainter,
const TQRect &rect,
const TQValueVector <TQString> &textLines)
{
if (!painter->clipRegion ().isEmpty () || !tqmaskPainter->clipRegion ().isEmpty ())
if (!painter->clipRegion ().isEmpty () || !maskPainter->clipRegion ().isEmpty ())
{
// TODO: fix esp. before making method public
kdError () << "kpselection.cpp:drawTextLines() can't deal with existing painter clip regions" << endl;
@@ -632,8 +632,8 @@ static void drawTextLines (TQPainter *painter, TQPainter *tqmaskPainter,
if (painter->isActive ()) \
painter->cmd; \
\
if (tqmaskPainter->isActive ()) \
tqmaskPainter->cmd; \
if (maskPainter->isActive ()) \
maskPainter->cmd; \
}



+ 1
- 1
kolourpaint/kpselection.h View File

@@ -103,7 +103,7 @@ public:

int size () const;

TQBitmap tqmaskForOwnType (bool nullForRectangular = false) const;
TQBitmap maskForOwnType (bool nullForRectangular = false) const;

// synonyms
TQPoint topLeft () const;

+ 3
- 3
kolourpaint/kpthumbnail.cpp View File

@@ -63,7 +63,7 @@ kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name)
}


TQSize tqlayoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ();
TQSize layoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ();
#if DEBUG_KP_THUMBNAIL
kdDebug () << "\ttqlayout=" << tqlayout ()
<< " minSize=" << (tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ()) << endl;
@@ -73,8 +73,8 @@ kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name)
#endif
if (tqlayout ())
tqlayout ()->setResizeMode (TQLayout::FreeResize);
setMinimumSize (TQMAX (tqlayoutMinimumSize.width (), 64),
TQMAX (tqlayoutMinimumSize.height (), 64));
setMinimumSize (TQMAX (layoutMinimumSize.width (), 64),
TQMAX (layoutMinimumSize.height (), 64));


// Enable "X" Close Button

+ 21
- 21
kolourpaint/kpview.cpp View File

@@ -590,10 +590,10 @@ void kpView::addToQueuedArea (const TQRect &rect)
}

// public
void kpView::tqinvalidateQueuedArea ()
void kpView::invalidateQueuedArea ()
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView::tqinvalidateQueuedArea()" << endl;
kdDebug () << "kpView::invalidateQueuedArea()" << endl;
#endif

d->m_queuedUpdateArea = TQRegion ();
@@ -621,7 +621,7 @@ void kpView::updateQueuedArea ()
if (!d->m_queuedUpdateArea.isNull ())
vm->updateView (this, d->m_queuedUpdateArea);

tqinvalidateQueuedArea ();
invalidateQueuedArea ();
}

// public
@@ -1346,21 +1346,21 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
destPixmapPainter.setBackgroundMode (Qt::OpaqueMode);
destPixmapPainter.setBackgroundColor (TQt::blue);

TQBitmap tqmaskBitmap;
TQPainter tqmaskBitmapPainter;
TQBitmap maskBitmap;
TQPainter maskBitmapPainter;
if (destPixmap->tqmask ())
{
tqmaskBitmap = *destPixmap->tqmask ();
tqmaskBitmapPainter.begin (&tqmaskBitmap);
tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/);
maskBitmap = *destPixmap->tqmask ();
maskBitmapPainter.begin (&maskBitmap);
maskBitmapPainter.setPen (TQt::color1/*opaque*/);
}


#define PAINTER_CMD(cmd) \
{ \
destPixmapPainter . cmd; \
if (tqmaskBitmapPainter.isActive ()) \
tqmaskBitmapPainter . cmd; \
if (maskBitmapPainter.isActive ()) \
maskBitmapPainter . cmd; \
}

TQRect boundingRect = sel->boundingRect ();
@@ -1450,10 +1450,10 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
#undef PAINTER_CMD

destPixmapPainter.end ();
if (tqmaskBitmapPainter.isActive ())
tqmaskBitmapPainter.end ();
if (maskBitmapPainter.isActive ())
maskBitmapPainter.end ();

destPixmap->setMask (tqmaskBitmap);
destPixmap->setMask (maskBitmap);
}


@@ -1480,15 +1480,15 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
{
rect.moveBy (-docRect.x (), -docRect.y ());

TQBitmap tqmaskBitmap;
TQPainter destPixmapPainter, tqmaskBitmapPainter;
TQBitmap maskBitmap;
TQPainter destPixmapPainter, maskBitmapPainter;

if (destPixmap->tqmask ())
{
tqmaskBitmap = *destPixmap->tqmask ();
tqmaskBitmapPainter.begin (&tqmaskBitmap);
tqmaskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/);
tqmaskBitmapPainter.end ();
maskBitmap = *destPixmap->tqmask ();
maskBitmapPainter.begin (&maskBitmap);
maskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/);
maskBitmapPainter.end ();
}

destPixmapPainter.begin (destPixmap);
@@ -1496,8 +1496,8 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
destPixmapPainter.fillRect (rect, TQt::white);
destPixmapPainter.end ();

if (!tqmaskBitmap.isNull ())
destPixmap->setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
destPixmap->setMask (maskBitmap);
}
}
}

+ 2
- 2
kolourpaint/kpview.h View File

@@ -366,11 +366,11 @@ public:
* Removes the dirty region that has been queued for updating.
* Does not update the view.
*/
void tqinvalidateQueuedArea ();
void invalidateQueuedArea ();

/**
* Updates the part of the view described by dirty region and then
* calls tqinvalidateQueuedArea(). Does nothing if @ref kpViewManager
* calls invalidateQueuedArea(). Does nothing if @ref kpViewManager
* is set to queue updates.
*/
void updateQueuedArea ();

+ 1
- 1
kolourpaint/kpviewmanager.cpp View File

@@ -152,7 +152,7 @@ void kpViewManager::setTempPixmap (const kpTempPixmap &tempPixmap)
}

// public
void kpViewManager::tqinvalidateTempPixmap ()
void kpViewManager::invalidateTempPixmap ()
{
if (!m_tempPixmap)
return;

+ 1
- 1
kolourpaint/kpviewmanager.h View File

@@ -69,7 +69,7 @@ public:

const kpTempPixmap *tempPixmap () const;
void setTempPixmap (const kpTempPixmap &tempPixmap);
void tqinvalidateTempPixmap ();
void invalidateTempPixmap ();


//

+ 1
- 1
kolourpaint/pixmapfx/kpeffectreducecolors.cpp View File

@@ -240,7 +240,7 @@ void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, boo

// HACK: The above "image.convertDepth()" erases the Alpha Channel
// (at least for monochrome).
// tqpixmap.html says "alpha tqmasks on monochrome images are ignored."
// tqpixmap.html says "alpha masks on monochrome images are ignored."
//
// Put the tqmask back.
//

+ 11
- 11
kolourpaint/pixmapfx/kpfloodfill.cpp View File

@@ -97,14 +97,14 @@ bool kpFloodFill::fill ()
{
TQApplication::setOverrideCursor (TQt::waitCursor);

TQPainter painter, tqmaskPainter;
TQBitmap tqmaskBitmap;
TQPainter painter, maskPainter;
TQBitmap maskBitmap;

if (m_pixmapPtr->tqmask () || m_color.isTransparent ())
{
tqmaskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr);
tqmaskPainter.begin (&tqmaskBitmap);
tqmaskPainter.setPen (m_color.tqmaskColor ());
maskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr);
maskPainter.begin (&maskBitmap);
maskPainter.setPen (m_color.maskColor ());
}

if (m_color.isOpaque ())
@@ -124,18 +124,18 @@ bool kpFloodFill::fill ()
if (painter.isActive ())
painter.drawLine (p1, p2);

if (tqmaskPainter.isActive ())
tqmaskPainter.drawLine (p1, p2);
if (maskPainter.isActive ())
maskPainter.drawLine (p1, p2);
}

if (painter.isActive ())
painter.end ();

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

if (!tqmaskBitmap.isNull ())
m_pixmapPtr->setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
m_pixmapPtr->setMask (maskBitmap);

TQApplication::restoreOverrideCursor ();
}

+ 27
- 27
kolourpaint/pixmapfx/kppixmapfx.cpp View File

@@ -772,7 +772,7 @@ void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
if (!destPixmapPtr)
return;

// Copy src (tqmasked by src's tqmask) on top of dest.
// Copy src (masked by src's tqmask) on top of dest.
bitBlt (destPixmapPtr, /* dest */
destAt.x (), destAt.y (), /* dest pt */
&srcPixmap, /* src */
@@ -856,10 +856,10 @@ TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm)
return *pm.tqmask ();
else
{
TQBitmap tqmaskBitmap (pm.width (), pm.height ());
tqmaskBitmap.fill (TQt::color1/*opaque*/);
TQBitmap maskBitmap (pm.width (), pm.height ());
maskBitmap.fill (TQt::color1/*opaque*/);

return tqmaskBitmap;
return maskBitmap;
}
}

@@ -870,9 +870,9 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des
if (!destPixmapPtr)
return;

TQBitmap tqmaskBitmap = getNonNullMask (*destPixmapPtr);
TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr);

TQPainter p (&tqmaskBitmap);
TQPainter p (&maskBitmap);

p.setPen (TQt::color0/*transparent*/);
p.setBrush (TQt::color0/*transparent*/);
@@ -881,7 +881,7 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des

p.end ();

destPixmapPtr->setMask (tqmaskBitmap);
destPixmapPtr->setMask (maskBitmap);
}


@@ -937,9 +937,9 @@ void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect
if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/)
return;

TQBitmap tqmaskBitmap = *destPixmapPtr->tqmask ();
TQBitmap maskBitmap = *destPixmapPtr->tqmask ();

TQPainter p (&tqmaskBitmap);
TQPainter p (&maskBitmap);

p.setPen (TQt::color1/*opaque*/);
p.setBrush (TQt::color1/*opaque*/);
@@ -948,7 +948,7 @@ void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect

p.end ();

destPixmapPtr->setMask (tqmaskBitmap);
destPixmapPtr->setMask (maskBitmap);
}

// public static
@@ -1107,8 +1107,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tfilling in new areas" << endl;
#endif
TQBitmap tqmaskBitmap;
TQPainter painter, tqmaskPainter;
TQBitmap maskBitmap;
TQPainter painter, maskPainter;

if (backgroundColor.isOpaque ())
{
@@ -1119,10 +1119,10 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,

if (backgroundColor.isTransparent () || destPixmapPtr->tqmask ())
{
tqmaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
tqmaskPainter.begin (&tqmaskBitmap);
tqmaskPainter.setPen (backgroundColor.tqmaskColor ());
tqmaskPainter.setBrush (backgroundColor.tqmaskColor ());
maskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
maskPainter.begin (&maskBitmap);
maskPainter.setPen (backgroundColor.maskColor ());
maskPainter.setBrush (backgroundColor.maskColor ());
}

#define PAINTER_CALL(cmd) \
@@ -1130,8 +1130,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
if (painter.isActive ()) \
painter . cmd ; \
\
if (tqmaskPainter.isActive ()) \
tqmaskPainter . cmd ; \
if (maskPainter.isActive ()) \
maskPainter . cmd ; \
}
if (w > oldWidth)
PAINTER_CALL (drawRect (oldWidth, 0, w - oldWidth, oldHeight));
@@ -1140,14 +1140,14 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
PAINTER_CALL (drawRect (0, oldHeight, w, h - oldHeight));
#undef PAINTER_CALL

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

if (painter.isActive ())
painter.end ();

if (!tqmaskBitmap.isNull ())
destPixmapPtr->setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
destPixmapPtr->setMask (maskBitmap);
}
}

@@ -1378,7 +1378,7 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
if (backgroundColor.isTransparent () || pm.tqmask ())
{
newBitmapMask.resize (newPixmap.width (), newPixmap.height ());
newBitmapMask.fill (backgroundColor.tqmaskColor ());
newBitmapMask.fill (backgroundColor.maskColor ());
}

TQPainter painter (&newPixmap);
@@ -1416,10 +1416,10 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,

if (!newBitmapMask.isNull ())
{
TQPainter tqmaskPainter (&newBitmapMask);
tqmaskPainter.setWorldMatrix (transformMatrix);
tqmaskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
tqmaskPainter.end ();
TQPainter maskPainter (&newBitmapMask);
maskPainter.setWorldMatrix (transformMatrix);
maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
maskPainter.end ();
newPixmap.setMask (newBitmapMask);
}


+ 1
- 1
kolourpaint/pixmapfx/kppixmapfx.h View File

@@ -294,7 +294,7 @@ public:
//
// Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it
// to a tqmask. KolourPaint - and TQPixmap to a great extent - does not
// support Alpha Channels - only tqmasks. Call this whenever you get
// support Alpha Channels - only masks. Call this whenever you get
// a pixmap from a foreign source; else all KolourPaint code will
// exhibit "undefined behaviour".
//

+ 7
- 7
kolourpaint/tools/kptoolairspray.cpp View File

@@ -314,7 +314,7 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
TQPixmap pixmap = document ()->getPixmapAt (docRect);
TQBitmap tqmask;

TQPainter painter, tqmaskPainter;
TQPainter painter, maskPainter;

if (m_color.isOpaque ())
{
@@ -325,8 +325,8 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
if (pixmap.tqmask () || m_color.isTransparent ())
{
tqmask = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmask);
tqmaskPainter.setPen (m_color.tqmaskColor ());
maskPainter.begin (&tqmask);
maskPainter.setPen (m_color.maskColor ());
}

for (int i = 0; i < (int) points.count (); i++)
@@ -337,12 +337,12 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
if (painter.isActive ())
painter.drawPoint (pt);

if (tqmaskPainter.isActive ())
tqmaskPainter.drawPoint (pt);
if (maskPainter.isActive ())
maskPainter.drawPoint (pt);
}

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

if (painter.isActive ())
painter.end ();

+ 11
- 11
kolourpaint/tools/kptoolautocrop.cpp View File

@@ -654,7 +654,7 @@ void kpToolAutoCropCommand::unexecute ()
return;

TQPixmap pixmap (m_oldWidth, m_oldHeight);
TQBitmap tqmaskBitmap;
TQBitmap maskBitmap;

// restore the position of the centre image
kpPixmapFX::setPixmapAt (&pixmap, m_contentsRect,
@@ -663,7 +663,7 @@ void kpToolAutoCropCommand::unexecute ()
// draw the borders

TQPainter painter (&pixmap);
TQPainter tqmaskPainter;
TQPainter maskPainter;

const kpToolAutoCropBorder *borders [] =
{
@@ -699,14 +699,14 @@ void kpToolAutoCropCommand::unexecute ()
}
else
{
if (tqmaskBitmap.isNull ())
if (maskBitmap.isNull ())
{
// TODO: dangerous when a painter is active on pixmap?
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap);
maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
maskPainter.begin (&maskBitmap);
}

tqmaskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/);
maskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/);
}
}
else
@@ -721,7 +721,7 @@ void kpToolAutoCropCommand::unexecute ()
if (*p)
{
// TODO: We should really edit the tqmask here. Due to good
// luck (if "tqmaskBitmap" is initialized above, this region
// luck (if "maskBitmap" is initialized above, this region
// will be marked as opaque in the tqmask; if it's not
// initialized, we will be opaque by default), we
// don't actually have to edit the tqmask but this is
@@ -731,13 +731,13 @@ void kpToolAutoCropCommand::unexecute ()
}
}

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

painter.end ();

if (!tqmaskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
pixmap.setMask (maskBitmap);


if (!m_actOnSelection)

+ 1
- 1
kolourpaint/tools/kptoolclear.cpp View File

@@ -108,7 +108,7 @@ void kpToolClearCommand::execute ()
kpPixmapFX::fill (&newPixmap, m_newColor);
// TODO: maybe disable Image/Clear if transparent colour
if (m_newColor.isOpaque ())
newPixmap.setMask (sel->tqmaskForOwnType ());
newPixmap.setMask (sel->maskForOwnType ());

sel->setPixmap (newPixmap);
}

+ 1
- 1
kolourpaint/tools/kptoolcrop.cpp View File

@@ -167,7 +167,7 @@ void kpToolCropSetImageCommand::execute ()

kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap,
TQPoint (0, 0),
m_fromSelection.tqmaskForOwnType ());
m_fromSelection.maskForOwnType ());

kpPixmapFX::paintPixmapAt (&newDocPixmap,
TQPoint (0, 0),

+ 41
- 41
kolourpaint/tools/kptoolpen.cpp View File

@@ -179,7 +179,7 @@ void kpToolPen::end ()
if (vm)
{
if (vm->tempPixmap () && vm->tempPixmap ()->isBrush ())
vm->tqinvalidateTempPixmap ();
vm->invalidateTempPixmap ();

if (m_mode & (SquareBrushes | DiverseBrushes))
vm->unsetCursor ();
@@ -218,7 +218,7 @@ void kpToolPen::beginDraw ()
// user starts drawing in the background color, we don't want to leave
// the cursor in the foreground colour -- just hide it in all cases
// to avoid confusion
viewManager ()->tqinvalidateTempPixmap ();
viewManager ()->invalidateTempPixmap ();

setUserMessage (cancelUserMessage ());
}
@@ -282,15 +282,15 @@ void kpToolPen::hover (const TQPoint &point)
setUserShapePoints (point);
}

bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty)
{
return wash (painter, tqmaskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty));
return wash (painter, maskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty));
}

bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, const TQRect &drawRect)
@@ -308,8 +308,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
{ \
if (painter && painter->isActive ()) \
painter->drawLine (startDrawX, y, x - 1, y); \
if (tqmaskPainter && tqmaskPainter->isActive ()) \
tqmaskPainter->drawLine (startDrawX, y, x - 1, y); \
if (maskPainter && maskPainter->isActive ()) \
maskPainter->drawLine (startDrawX, y, x - 1, y); \
didSomething = true; \
startDrawX = -1; \
}
@@ -388,8 +388,8 @@ void kpToolPen::globalDraw ()
kpToolPenCommand *cmd = new kpToolPenCommand (
i18n ("Color Eraser"), mainWindow ());

TQPainter painter, tqmaskPainter;
TQBitmap tqmaskBitmap;
TQPainter painter, maskPainter;
TQBitmap maskBitmap;

if (backgroundColor ().isOpaque ())
{
@@ -400,16 +400,16 @@ void kpToolPen::globalDraw ()
if (backgroundColor ().isTransparent () ||
document ()->pixmap ()->tqmask ())
{
tqmaskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ());
tqmaskPainter.begin (&tqmaskBitmap);
maskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ());
maskPainter.begin (&maskBitmap);

tqmaskPainter.setPen (backgroundColor ().tqmaskColor ());
maskPainter.setPen (backgroundColor ().maskColor ());
}

const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
TQRect rect = document ()->rect ();

const bool didSomething = wash (&painter, &tqmaskPainter, image,
const bool didSomething = wash (&painter, &maskPainter, image,
foregroundColor ()/*replace foreground*/,
rect, rect);

@@ -417,13 +417,13 @@ void kpToolPen::globalDraw ()
if (painter.isActive ())
painter.end ();

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

if (didSomething)
{
if (!tqmaskBitmap.isNull ())
document ()->pixmap ()->setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
document ()->pixmap ()->setMask (maskBitmap);


document ()->slotContentsChanged (rect);
@@ -519,8 +519,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
#if DEBUG_KP_TOOL_PEN
kdDebug () << "\tconvert to image: " << timer.restart () << "ms" << endl;
#endif
TQPainter painter, tqmaskPainter;
TQBitmap tqmaskBitmap;
TQPainter painter, maskPainter;
TQBitmap maskBitmap;

if (color (m_mouseButton).isOpaque ())
{
@@ -531,12 +531,12 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (color (m_mouseButton).isTransparent () ||
pixmap.tqmask ())
{
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap);
tqmaskPainter.setPen (color (m_mouseButton).tqmaskColor ());
maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
maskPainter.begin (&maskBitmap);
maskPainter.setPen (color (m_mouseButton).maskColor ());
}

bool didSomething = wash (&painter, &tqmaskPainter,
bool didSomething = wash (&painter, &maskPainter,
image,
color (1 - m_mouseButton)/*color to tqreplace*/,
rect, rect);
@@ -544,13 +544,13 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ())
painter.end ();

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

if (didSomething)
{
if (!tqmaskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
pixmap.setMask (maskBitmap);

#if DEBUG_KP_TOOL_PEN
kdDebug () << "\twashed: " << timer.restart () << "ms" << endl;
@@ -594,9 +594,9 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
bool transparent = c.isTransparent ();

TQPixmap pixmap = document ()->getPixmapAt (rect);
TQBitmap tqmaskBitmap;
TQBitmap maskBitmap;

TQPainter painter, tqmaskPainter;
TQPainter painter, maskPainter;

if (m_mode & (DrawsPixels | WashesPixmaps))
{
@@ -608,9 +608,9 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const

if (transparent || pixmap.tqmask ())
{
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap);
tqmaskPainter.setPen (c.tqmaskColor ());
maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
maskPainter.begin (&maskBitmap);
maskPainter.setPen (c.maskColor ());
}
}

@@ -635,8 +635,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ())
painter.drawLine (sp, ep);

if (tqmaskPainter.isActive ())
tqmaskPainter.drawLine (sp, ep);
if (maskPainter.isActive ())
maskPainter.drawLine (sp, ep);

didSomething = true;
}
@@ -678,7 +678,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const

if (m_mode & WashesPixmaps)
{
if (wash (&painter, &tqmaskPainter, image,
if (wash (&painter, &maskPainter, image,
colorToReplace,
rect, plotx + rect.left (), ploty + rect.top ()))
{
@@ -746,7 +746,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const

if (m_mode & WashesPixmaps)
{
if (wash (&painter, &tqmaskPainter, image,
if (wash (&painter, &maskPainter, image,
colorToReplace,
rect, plotx + rect.left (), oldploty + rect.top ()))
{
@@ -774,7 +774,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const

if (m_mode & WashesPixmaps)
{
if (wash (&painter, &tqmaskPainter, image,
if (wash (&painter, &maskPainter, image,
colorToReplace,
rect, plotx + rect.left (), ploty + rect.top ()))
{
@@ -806,8 +806,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ())
painter.end ();

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

#if DEBUG_KP_TOOL_PEN
if (m_mode & WashesPixmaps)
@@ -824,8 +824,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const

if (didSomething)
{
if (!tqmaskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
pixmap.setMask (maskBitmap);

// draw onto doc
document ()->setPixmapAt (pixmap, rect.topLeft ());

+ 2
- 2
kolourpaint/tools/kptoolpen.h View File

@@ -103,11 +103,11 @@ private slots:
void slotEraserSizeChanged (int size);

private:
bool wash (TQPainter *painter, TQPainter *tqmaskPainter,
bool wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty);
bool wash (TQPainter *painter, TQPainter *tqmaskPainter,
bool wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image,
const kpColor &colorToReplace,
const TQRect &imageRect, const TQRect &drawRect);

+ 30
- 30
kolourpaint/tools/kptoolpolygon.cpp View File

@@ -81,7 +81,7 @@ static const char *pointArrayToString (const TQPointArray &pointArray)

static TQPen makeMaskPen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle)
{
return TQPen (color.tqmaskColor (),
return TQPen (color.maskColor (),
lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle,
Qt::RoundCap, Qt::RoundJoin);
}
@@ -103,7 +103,7 @@ static TQBrush makeMaskBrush (const kpColor &foregroundColor,
kpToolWidgetFillStyle *toolWidgetFillStyle)
{
if (toolWidgetFillStyle)
return toolWidgetFillStyle->tqmaskBrush (foregroundColor, backgroundColor);
return toolWidgetFillStyle->maskBrush (foregroundColor, backgroundColor);
else
return Qt::NoBrush;
}
@@ -155,33 +155,33 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
// draw

TQPen pen = makePen (foregroundColor, lineWidth, lineStyle),
tqmaskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
maskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle),
tqmaskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);
maskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);

TQPixmap pixmap = oldPixmap;
TQBitmap tqmaskBitmap;
TQBitmap maskBitmap;

TQPainter painter, tqmaskPainter;
TQPainter painter, maskPainter;

if (pixmap.tqmask () ||
(tqmaskPen.style () != TQt::NoPen &&
tqmaskPen.color () == TQt::color0/*transparent*/) ||
(tqmaskBrush.style () != TQt::NoBrush &&
tqmaskBrush.color () == TQt::color0/*transparent*/))
(maskPen.style () != TQt::NoPen &&
maskPen.color () == TQt::color0/*transparent*/) ||
(maskBrush.style () != TQt::NoBrush &&
maskBrush.color () == TQt::color0/*transparent*/))
{
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap);
tqmaskPainter.setPen (tqmaskPen);
tqmaskPainter.setBrush (tqmaskBrush);
maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
maskPainter.begin (&maskBitmap);
maskPainter.setPen (maskPen);
maskPainter.setBrush (maskBrush);

#if DEBUG_KP_TOOL_POLYGON && 0
kdDebug () << "\ttqmaskPainter begin because:" << endl
kdDebug () << "\tmaskPainter begin because:" << endl
<< "\t\tpixmap.tqmask=" << pixmap.tqmask () << endl
<< "\t\t(tqmaskPenStyle!=NoPen)=" << (tqmaskPen.style () != TQt::NoPen) << endl
<< "\t\t(tqmaskPenColor==trans)=" << (tqmaskPen.color () == TQt::color0) << endl
<< "\t\t(tqmaskBrushStyle!=NoBrush)=" << (tqmaskBrush.style () != TQt::NoBrush) << endl
<< "\t\t(tqmaskBrushColor==trans)=" << (tqmaskBrush.color () == TQt::color0) << endl;
<< "\t\t(maskPenStyle!=NoPen)=" << (maskPen.style () != TQt::NoPen) << endl
<< "\t\t(maskPenColor==trans)=" << (maskPen.color () == TQt::color0) << endl
<< "\t\t(maskBrushStyle!=NoBrush)=" << (maskBrush.style () != TQt::NoBrush) << endl
<< "\t\t(maskBrushColor==trans)=" << (maskBrush.color () == TQt::color0) << endl;
#endif
}

@@ -204,8 +204,8 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ()) \
painter . cmd ; \
\
if (tqmaskPainter.isActive ()) \
tqmaskPainter . cmd ; \
if (maskPainter.isActive ()) \
maskPainter . cmd ; \
}

// SYNC: TQt bug
@@ -240,9 +240,9 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
painter.setRasterOp (TQt::XorROP);
}

if (tqmaskPainter.isActive ())
if (maskPainter.isActive ())
{
TQPen XORpen = tqmaskPainter.pen ();
TQPen XORpen = maskPainter.pen ();

// TODO???
#if 0
@@ -252,7 +252,7 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
XORpen.setColor (TQt::color0/*transparent*/);
#endif

tqmaskPainter.setPen (XORpen);
maskPainter.setPen (XORpen);
}

PAINTER_CALL (drawLine (pointsInRect [0], pointsInRect [count - 1]));
@@ -288,11 +288,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ())
painter.end ();

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

if (!tqmaskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
pixmap.setMask (maskBitmap);

return pixmap;
}
@@ -671,7 +671,7 @@ void kpToolPolygon::cancelShape ()
endDraw (TQPoint (), TQRect ());
commandHistory ()->undo ();
#else
viewManager ()->tqinvalidateTempPixmap ();
viewManager ()->invalidateTempPixmap ();
#endif
m_points.resize (0);

@@ -781,7 +781,7 @@ void kpToolPolygon::endShape (const TQPoint &, const TQRect &)
if (!hasBegunShape ())
return;

viewManager ()->tqinvalidateTempPixmap ();
viewManager ()->invalidateTempPixmap ();

TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);


+ 39
- 39
kolourpaint/tools/kptoolrectangle.cpp View File

@@ -53,39 +53,39 @@
static TQPixmap pixmap (const kpToolRectangle::Mode mode,
kpDocument *document, const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint,
const TQPen &pen, const TQPen &tqmaskPen,
const TQBrush &brush, const TQBrush &tqmaskBrush)
const TQPen &pen, const TQPen &maskPen,
const TQBrush &brush, const TQBrush &maskBrush)
{
TQPixmap pixmap = document->getPixmapAt (rect);
TQBitmap tqmaskBitmap;
TQBitmap maskBitmap;

TQPainter painter, tqmaskPainter;
TQPainter painter, maskPainter;

#if DEBUG_KP_TOOL_RECTANGLE && 1
kdDebug () << "pixmap: rect=" << rect
<< " startPoint=" << startPoint
<< " endPoint=" << endPoint
<< endl;
kdDebug () << "\tm: p=" << (tqmaskPen.style () != TQt::NoPen)
<< " b=" << (tqmaskBrush.style () != TQt::NoBrush)
kdDebug () << "\tm: p=" << (maskPen.style () != TQt::NoPen)
<< " b=" << (maskBrush.style () != TQt::NoBrush)
<< " o: p=" << (pen.style () != TQt::NoPen)
<< " b=" << (brush.style () != TQt::NoBrush)
<< endl;
kdDebug () << "\ttqmaskPen.color()=" << (int *) tqmaskPen.color ().rgb ()
kdDebug () << "\tmaskPen.color()=" << (int *) maskPen.color ().rgb ()
<< " transparent=" << (int *) TQt::color0.rgb ()/*transparent*/
<< endl;
#endif

if (pixmap.tqmask () ||
(tqmaskPen.style () != TQt::NoPen &&
tqmaskPen.color () == TQt::color0/*transparent*/) ||
(tqmaskBrush.style () != TQt::NoBrush &&
tqmaskBrush.color () == TQt::color0/*transparent*/))
(maskPen.style () != TQt::NoPen &&
maskPen.color () == TQt::color0/*transparent*/) ||
(maskBrush.style () != TQt::NoBrush &&
maskBrush.color () == TQt::color0/*transparent*/))
{
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap);
tqmaskPainter.setPen (tqmaskPen);
tqmaskPainter.setBrush (tqmaskBrush);
maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
maskPainter.begin (&maskBitmap);
maskPainter.setPen (maskPen);
maskPainter.setBrush (maskBrush);
}

if (pen.style () != TQt::NoPen ||
@@ -101,8 +101,8 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ()) \
painter . cmd ; \
\
if (tqmaskPainter.isActive ()) \
tqmaskPainter . cmd ; \
if (maskPainter.isActive ()) \
maskPainter . cmd ; \
}

if (startPoint != endPoint)
@@ -144,11 +144,11 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ())
painter.end ();

if (tqmaskPainter.isActive ())
tqmaskPainter.end ();
if (maskPainter.isActive ())
maskPainter.end ();

if (!tqmaskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap);
if (!maskBitmap.isNull ())
pixmap.setMask (maskBitmap);

return pixmap;
}
@@ -231,7 +231,7 @@ void kpToolRectangle::slotBackgroundColorChanged (const kpColor &)
// private
void kpToolRectangle::updatePen (int mouseButton)
{
TQColor tqmaskPenColor = color (mouseButton).tqmaskColor ();
TQColor maskPenColor = color (mouseButton).maskColor ();

if (!m_toolWidgetLineWidth)
{
@@ -239,7 +239,7 @@ void kpToolRectangle::updatePen (int mouseButton)
m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor ());
else
m_pen [mouseButton] = TQPen(Qt::NoPen);
m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor);
m_maskPen [mouseButton] = TQPen (maskPenColor);
}
else
{
@@ -251,7 +251,7 @@ void kpToolRectangle::updatePen (int mouseButton)
}
else
m_pen [mouseButton] = TQPen(Qt::NoPen);
m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor,
m_maskPen [mouseButton] = TQPen (maskPenColor,
m_toolWidgetLineWidth->lineWidth (),
TQt::SolidLine);
}
@@ -270,14 +270,14 @@ void kpToolRectangle::updateBrush (int mouseButton)
color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/);

m_tqmaskBrush [mouseButton] = m_toolWidgetFillStyle->tqmaskBrush (
m_maskBrush [mouseButton] = m_toolWidgetFillStyle->maskBrush (
color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/);
}
else
{
m_brush [mouseButton] = TQBrush(Qt::NoBrush);
m_tqmaskBrush [mouseButton] = TQBrush(Qt::NoBrush);
m_maskBrush [mouseButton] = TQBrush(Qt::NoBrush);
}
}

@@ -437,7 +437,7 @@ void kpToolRectangle::applyModifiers ()

m_toolRectangleRectWithoutLineWidth = rect;
m_toolRectangleRect = kpTool::neededRect (rect, TQMAX (m_pen [m_mouseButton].width (),
m_tqmaskPen [m_mouseButton].width ()));
m_maskPen [m_mouseButton].width ()));
}

void kpToolRectangle::beginDraw ()
@@ -451,8 +451,8 @@ void kpToolRectangle::updateShape ()

TQPixmap newPixmap = pixmap (m_mode, document (), m_toolRectangleRect,
m_toolRectangleStartPoint, m_toolRectangleEndPoint,
m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton],
m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton]);
m_pen [m_mouseButton], m_maskPen [m_mouseButton],
m_brush [m_mouseButton], m_maskBrush [m_mouseButton]);
kpTempPixmap newTempPixmap (false/*always display*/,
kpTempPixmap::SetPixmap/*render mode*/,
m_toolRectangleRect.topLeft (),
@@ -511,7 +511,7 @@ void kpToolRectangle::cancelShape ()
endDraw (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
mainWindow ()->commandHistory ()->undo ();
#else
viewManager ()->tqinvalidateTempPixmap ();
viewManager ()->invalidateTempPixmap ();