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
v3.5.13-sru
tpearson 14 years ago
parent 03d51915bf
commit bce8199dda

@ -197,7 +197,7 @@ void KCamera::load(KConfig *config)
m_model = config->readEntry("Model"); m_model = config->readEntry("Model");
if (m_path.isNull()) if (m_path.isNull())
m_path = config->readEntry("Path"); m_path = config->readEntry("Path");
tqinvalidateCamera(); invalidateCamera();
} }
void KCamera::save(KConfig *config) void KCamera::save(KConfig *config)
@ -223,17 +223,17 @@ void KCamera::setName(const TQString &name)
void KCamera::setModel(const TQString &model) void KCamera::setModel(const TQString &model)
{ {
m_model = model; m_model = model;
tqinvalidateCamera(); invalidateCamera();
initInformation(); initInformation();
} }
void KCamera::setPath(const TQString &path) void KCamera::setPath(const TQString &path)
{ {
m_path = path; m_path = path;
tqinvalidateCamera(); invalidateCamera();
} }
void KCamera::tqinvalidateCamera() void KCamera::invalidateCamera()
{ {
if (m_camera) { if (m_camera) {
gp_camera_free(m_camera); gp_camera_free(m_camera);

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

@ -145,7 +145,7 @@ void KColorEditView::setColorAtCursorComponentValueLabelSizes(TQLabel* const lab
} }
KColorEditDoc *KColorEditView::document() const { KColorEditDoc *KColorEditView::document() const {
KColorEditApp *theApp=(KColorEditApp *) tqparentWidget(); KColorEditApp *theApp=(KColorEditApp *) parentWidget();
return theApp->document(); return theApp->document();
} }

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

@ -79,7 +79,7 @@ dviRenderer::dviRenderer(TQWidget *par)
connect(&font_pool, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) ); connect(&font_pool, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) );
tqparentWidget = par; parentWidget = par;
shrinkfactor = 3; shrinkfactor = 3;
current_page = 0; current_page = 0;
resolutionInDPI = 0.0; resolutionInDPI = 0.0;
@ -206,7 +206,7 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page)
page->isEmpty = false; page->isEmpty = false;
if (errorMsg.isEmpty() != true) { if (errorMsg.isEmpty() != true) {
KMessageBox::detailedError(tqparentWidget, KMessageBox::detailedError(parentWidget,
i18n("<qt><strong>File corruption!</strong> KDVI had trouble interpreting your DVI file. Most " i18n("<qt><strong>File corruption!</strong> KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>"), "likely this means that the DVI file is broken.</qt>"),
errorMsg, i18n("DVI File Error")); errorMsg, i18n("DVI File Error"));
@ -260,7 +260,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
if (showMsg) { if (showMsg) {
KDialogBase *dialog= new KDialogBase(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes, 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); TQVBox *topcontents = new TQVBox (dialog);
topcontents->setSpacing(KDialog::spacingHint()*2); topcontents->setSpacing(KDialog::spacingHint()*2);
@ -311,7 +311,7 @@ void dviRenderer::embedPostScript()
if (!dviFile) if (!dviFile)
return; return;
embedPS_progress = new KProgressDialog(tqparentWidget, "embedPSProgressDialog", embedPS_progress = new KProgressDialog(parentWidget, "embedPSProgressDialog",
i18n("Embedding PostScript Files"), TQString(), true); i18n("Embedding PostScript Files"), TQString(), true);
if (!embedPS_progress) if (!embedPS_progress)
return; return;
@ -342,10 +342,10 @@ void dviRenderer::embedPostScript()
if (!errorMsg.isEmpty()) { if (!errorMsg.isEmpty()) {
errorMsg = "<qt>" + errorMsg + "</qt>"; 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(); errorMsg = TQString();
} else } 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>", "will probably want to save the DVI file now.") + "</qt>",
TQString(), "embeddingDone"); TQString(), "embeddingDone");
@ -435,7 +435,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// Make sure the file actually exists. // Make sure the file actually exists.
if (!fi.exists() || fi.isDir()) { if (!fi.exists() || fi.isDir()) {
KMessageBox::error( tqparentWidget, KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist. " i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist. "
"KDVI already tried to add the ending '.dvi'.</qt>").tqarg(filename), "KDVI already tried to add the ending '.dvi'.</qt>").tqarg(filename),
i18n("File Error!")); i18n("File Error!"));
@ -448,7 +448,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// the multipage. // the multipage.
TQString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() ); TQString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() );
if (mimetype != "application/x-dvi") { if (mimetype != "application/x-dvi") {
KMessageBox::sorry( tqparentWidget, KMessageBox::sorry( parentWidget,
i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr> which has " 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>" ) "type <strong>%2</strong>. KDVI can only load DVI (.dvi) files.</qt>" )
.tqarg( fname ) .tqarg( fname )
@ -459,7 +459,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// Check if the file is a valid DVI file. // Check if the file is a valid DVI file.
if (!isValidFile(filename)) if (!isValidFile(filename))
{ {
KMessageBox::sorry( tqparentWidget, KMessageBox::sorry( parentWidget,
i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most " i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>") "likely this means that the DVI file is broken.</qt>")
.tqarg( fname ) ); .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)) { if ((dviFile_new->dvi_Data() == NULL)||(dviFile_new->errorMsg.isEmpty() != true)) {
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
if (dviFile_new->errorMsg.isEmpty() != true) if (dviFile_new->errorMsg.isEmpty() != true)
KMessageBox::detailedError(tqparentWidget, KMessageBox::detailedError(parentWidget,
i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most " i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>"), "likely this means that the DVI file is broken.</qt>"),
dviFile_new->errorMsg, i18n("DVI File Error")); dviFile_new->errorMsg, i18n("DVI File Error"));
@ -637,7 +637,7 @@ Anchor dviRenderer::parseReference(const TQString &reference)
TQString refFileName = splitter.filePath(); TQString refFileName = splitter.filePath();
if (sourceHyperLinkAnchors.isEmpty()) { 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 " "line %1 in the TeX-file <strong>%2</strong>. It seems, however, that the DVI file "
"does not contain the necessary source file information. " "does not contain the necessary source file information. "
"We refer to the manual of KDVI for a detailed explanation on how to include this " "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); return Anchor(bestMatch->page, bestMatch->distance_from_top);
} else } else
if (anchorForRefFileFound == false) 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), "line %1 in the TeX-file <strong>%2</strong>.</qt>").tqarg(refLineNumber).tqarg(refFileName),
i18n( "Could Not Find Reference" )); i18n( "Could Not Find Reference" ));
else { else {
@ -733,7 +733,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
TQString TeXfile = splitter.filePath(); TQString TeXfile = splitter.filePath();
if ( ! splitter.fileExists() ) if ( ! splitter.fileExists() )
{ {
KMessageBox::sorry(tqparentWidget, TQString("<qt>") + KMessageBox::sorry(parentWidget, TQString("<qt>") +
i18n("The DVI-file refers to the TeX-file " i18n("The DVI-file refers to the TeX-file "
"<strong>%1</strong> which could not be found.").tqarg(KShellProcess::quote(TeXfile)) + "<strong>%1</strong> which could not be found.").tqarg(KShellProcess::quote(TeXfile)) +
TQString("</qt>"), TQString("</qt>"),
@ -743,7 +743,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
TQString command = editorCommand; TQString command = editorCommand;
if (command.isEmpty() == true) { 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. " i18n("You have not yet specified an editor for inverse search. "
"Please choose your favorite editor in the " "Please choose your favorite editor in the "
"<strong>DVI options dialog</strong> " "<strong>DVI options dialog</strong> "

@ -96,12 +96,12 @@ void dviRenderer::exportPDF()
TQString suggestedName = dviFile->filename; TQString suggestedName = dviFile->filename;
suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".pdf"; 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()) if (fileName.isEmpty())
return; return;
TQFileInfo finfo(fileName); TQFileInfo finfo(fileName);
if (finfo.exists()) { 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")); i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel) if (r == KMessageBox::Cancel)
return; return;
@ -116,7 +116,7 @@ void dviRenderer::exportPDF()
"a while because dvipdfm needs to generate its own bitmap fonts " "a while because dvipdfm needs to generate its own bitmap fonts "
"Please be patient."), "Please be patient."),
i18n("Waiting for dvipdfm to finish..."), i18n("Waiting for dvipdfm to finish..."),
tqparentWidget, i18n("dvipdfm progress dialog"), false ); parentWidget, i18n("dvipdfm progress dialog"), false );
if (progress != 0) { if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") ); progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages ); progress->setTotalSteps( dviFile->total_pages );
@ -177,7 +177,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
return; return;
if (dviFile->numberOfExternalNONPSFiles != 0) { 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 " 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 " "<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>" "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; TQString suggestedName = dviFile->filename;
suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".ps"; 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()) if (fileName.isEmpty())
return; return;
TQFileInfo finfo(fileName); TQFileInfo finfo(fileName);
if (finfo.exists()) { 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")); i18n("Overwrite File"));
if (r == KMessageBox::No) if (r == KMessageBox::No)
return; 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 " "a while because dvips needs to generate its own bitmap fonts "
"Please be patient."), "Please be patient."),
i18n("Waiting for dvips to finish..."), i18n("Waiting for dvips to finish..."),
tqparentWidget, i18n("dvips progress dialog"), false ); parentWidget, i18n("dvips progress dialog"), false );
if (progress != 0) { if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") ); progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages ); 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, // export_errorString, does not correspond to sproc. In that case,
// we ingore the return status silently. // we ingore the return status silently.
if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0)) if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0))
KMessageBox::error( tqparentWidget, export_errorString ); KMessageBox::error( parentWidget, export_errorString );
if (export_printer != 0) if (export_printer != 0)
export_printer->printFiles( TQStringList(export_fileName), true ); 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, // export_errorString, does not correspond to sproc. In that case,
// we ingore the return status silently. // we ingore the return status silently.
if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0)) 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 // Let's hope that this is not all too nasty... killing a
// KShellProcess from a slot that was called from the KShellProcess // KShellProcess from a slot that was called from the KShellProcess

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

@ -125,7 +125,7 @@ public:
channel of pixmaps. Experiments show that --depending of the channel of pixmaps. Experiments show that --depending of the
configuration of QT at compile and runtime or the availability configuration of QT at compile and runtime or the availability
of the XFt extension, alpha channels are either supported, or 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 TeXFont implementation use this flag to choose the apropriate
drawing routines for the different setups. */ drawing routines for the different setups. */
bool TQPixmapSupportsAlpha; bool TQPixmapSupportsAlpha;

@ -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) const char *name, const TQStringList& args)
: KMultiPage(tqparentWidget, widgetName, tqparent, name), DVIRenderer(tqparentWidget) : KMultiPage(parentWidget, widgetName, tqparent, name), DVIRenderer(parentWidget)
{ {
Q_UNUSED(args); Q_UNUSED(args);
#ifdef PERFORMANCE_MEASUREMENT #ifdef PERFORMANCE_MEASUREMENT
@ -239,7 +239,7 @@ void KDVIMultiPage::print()
// Show the printer options dialog. Return immediately if the user // Show the printer options dialog. Return immediately if the user
// aborts. // 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; return;
// This funny method call is necessary for the KPrinter to return // This funny method call is necessary for the KPrinter to return

@ -15,7 +15,7 @@ class KDVIMultiPage : public KMultiPage
TQ_OBJECT TQ_OBJECT
public: public:
KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args = TQStringList()); const char *name, const TQStringList& args = TQStringList());
virtual ~KDVIMultiPage(); virtual ~KDVIMultiPage();

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

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

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

@ -31,9 +31,9 @@ typedef KParts::GenericFactory<FaxMultiPage> FaxMultiPageFactory;
K_EXPORT_COMPONENT_FACTORY(kfaxviewpart, 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&) 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 /* This is kparts wizardry that cannot be understood by man. Simply
change the names to match your implementation. */ change the names to match your implementation. */

@ -90,7 +90,7 @@ public:
kmultipage. Please have a look at the constructor's source code to kmultipage. Please have a look at the constructor's source code to
see how to adjust this for your implementation. 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()); const char *name, const TQStringList& args = TQStringList());
/** Destructor /** Destructor

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

@ -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) // The code in the loop (when testing whether got_sig_term got set)
// should read some variation of: // should read some variation of:
// tqparentJob()->wasKilled() // parentJob()->wasKilled()
// //
// Unfortunatelly, that's currently impossible without breaking BIC. // Unfortunatelly, that's currently impossible without breaking BIC.
// So we need to catch the signal ourselves. // So we need to catch the signal ourselves.

@ -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="global" impldecl="in implementation">kdialog.h</include>
<include location="local" impldecl="in implementation">generalsettingswidget.ui.h</include> <include location="local" impldecl="in implementation">generalsettingswidget.ui.h</include>
</includes> </includes>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI> </UI>

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

@ -74,7 +74,7 @@ namespace KGV {
} }
} }
KGVPart::KGVPart( TQWidget* tqparentWidget, const char*, KGVPart::KGVPart( TQWidget* parentWidget, const char*,
TQObject* tqparent, const char* name, TQObject* tqparent, const char* name,
const TQStringList &args ) : const TQStringList &args ) :
KParts::ReadOnlyPart( tqparent, name ), KParts::ReadOnlyPart( tqparent, name ),
@ -108,7 +108,7 @@ KGVPart::KGVPart( TQWidget* tqparentWidget, const char*,
this, TQT_SLOT( slotDoFileDirty() ) ); this, TQT_SLOT( slotDoFileDirty() ) );
// Setup main widget // Setup main widget
_mainWidget = new KGVMainWidget( tqparentWidget ); _mainWidget = new KGVMainWidget( parentWidget );
_mainWidget->setFocusPolicy( TQ_StrongFocus ); _mainWidget->setFocusPolicy( TQ_StrongFocus );
_mainWidget->installEventFilter( this ); _mainWidget->installEventFilter( this );
_mainWidget->setAcceptDrops( true ); _mainWidget->setAcceptDrops( true );

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

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

@ -33,7 +33,7 @@ class KDE_EXPORT KGVFactory : public KParts::Factory
static KInstance *instance(); static KInstance *instance();
static KAboutData *aboutData(); 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, TQObject *tqparent, const char *name,
const char *className, const char *className,
const TQStringList &args ); const TQStringList &args );

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

@ -214,7 +214,7 @@ bool Mrml::startSession( const KURL& url )
// desired collection-id // desired collection-id
// Wolfgang says, we shouldn't create an own session-id here, as gcc 2.95 // 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. // accept the server's session-id.
TQString msg = mrmlString( TQString() ).tqarg( TQString msg = mrmlString( TQString() ).tqarg(
"<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \ "<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \

@ -90,14 +90,14 @@ KInstance * PartFactory::instance()
return s_instance; return s_instance;
} }
KParts::Part * PartFactory::createPartObject( TQWidget *tqparentWidget, KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget,
const char *widgetName, const char *widgetName,
TQObject *tqparent, TQObject *tqparent,
const char *name, const char *name,
const char *, const char *,
const TQStringList& args ) 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; uint MrmlPart::s_sessionId = 0;
MrmlPart::MrmlPart( TQWidget *tqparentWidget, const char * /* widgetName */, MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */,
TQObject *tqparent, const char *name, TQObject *tqparent, const char *name,
const TQStringList& /* args */ ) const TQStringList& /* args */ )
: KParts::ReadOnlyPart( tqparent, name ), : KParts::ReadOnlyPart( tqparent, name ),
@ -126,7 +126,7 @@ MrmlPart::MrmlPart( TQWidget *tqparentWidget, const char * /* widgetName */,
KConfig *config = PartFactory::instance()->config(); KConfig *config = PartFactory::instance()->config();
config->setGroup("MRML Settings"); 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" ); m_view = new MrmlView( box, "MrmlView" );
connect( m_view, TQT_SIGNAL( activated( const KURL&, ButtonState )), connect( m_view, TQT_SIGNAL( activated( const KURL&, ButtonState )),
this, TQT_SLOT( slotActivated( 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"); queryStep.setAttribute("query-type", "at-random");
// remove user-relevance-element-list element for random search // remove user-relevance-element-list element for random search
relevanceList.tqparentNode().removeChild( relevanceList ); relevanceList.parentNode().removeChild( relevanceList );
} }
} }
else else

@ -59,7 +59,7 @@ class MrmlPart : public KParts::ReadOnlyPart
public: public:
enum tqStatus { NeedCollection, CanSearch, InProgress }; 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 ); TQObject *tqparent, const char *name, const TQStringList& args );
~MrmlPart(); ~MrmlPart();
@ -160,7 +160,7 @@ public:
static KInstance * instance(); static KInstance * instance();
protected: protected:
virtual KParts::Part * createPartObject( TQWidget *tqparentWidget = 0, virtual KParts::Part * createPartObject( TQWidget *parentWidget = 0,
const char *widgetName = 0, const char *widgetName = 0,
TQObject *tqparent = 0, TQObject *tqparent = 0,
const char *name = 0, const char *name = 0,

@ -42,7 +42,7 @@ enum PixelValue
}; };
static void setPixel (unsigned char *colorBitmap, static void setPixel (unsigned char *colorBitmap,
unsigned char *tqmaskBitmap, unsigned char *maskBitmap,
int width, int width,
int y, int x, enum PixelValue pv) int y, int x, enum PixelValue pv)
{ {
@ -52,32 +52,32 @@ static void setPixel (unsigned char *colorBitmap,
const int MaskOpaque = 1; const int MaskOpaque = 1;
const int MaskTransparent = 0; const int MaskTransparent = 0;
int colorValue, tqmaskValue; int colorValue, maskValue;
switch (pv) switch (pv)
{ {
case White: case White:
colorValue = ColorWhite; colorValue = ColorWhite;
tqmaskValue = MaskOpaque; maskValue = MaskOpaque;
break; break;
case Black: case Black:
colorValue = ColorBlack; colorValue = ColorBlack;
tqmaskValue = MaskOpaque; maskValue = MaskOpaque;
break; break;
case Transparent: case Transparent:
default: default:
colorValue = ColorWhite; colorValue = ColorWhite;
tqmaskValue = MaskTransparent; maskValue = MaskTransparent;
break; break;
} }
if (colorValue) if (colorValue)
colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
if (tqmaskValue) if (maskValue)
tqmaskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8));
} }
@ -90,10 +90,10 @@ const TQCursor *kpMakeCursorLightCross ()
const int side = 24; const int side = 24;
const int byteSize = (side * side) / 8; const int byteSize = (side * side) / 8;
unsigned char *colorBitmap = new unsigned char [byteSize]; 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 (colorBitmap, 0, byteSize);
memset (tqmaskBitmap, 0, byteSize); memset (maskBitmap, 0, byteSize);
const int oddSide = side - 1; const int oddSide = side - 1;
const int strokeLen = oddSide * 3 / 8; const int strokeLen = oddSide * 3 / 8;
@ -104,7 +104,7 @@ const TQCursor *kpMakeCursorLightCross ()
#define X_(val) (val) #define X_(val) (val)
#define Y_(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 // horizontal
DRAW (Y_(side / 2), X_(1 + i)); DRAW (Y_(side / 2), X_(1 + i));
DRAW (Y_(side / 2), X_(side - 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*/), 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; delete [] colorBitmap;
return cursor; return cursor;

@ -354,7 +354,7 @@ const TQColor &kpColor::toTQColor () const
} }
// public // public
TQColor kpColor::tqmaskColor () const TQColor kpColor::maskColor () const
{ {
return isTransparent () ? TQt::color0 : TQt::color1; return isTransparent () ? TQt::color0 : TQt::color1;
} }

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

@ -1235,7 +1235,7 @@ void kpDocument::setSelection (const kpSelection &selection)
} }
// public // public
TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
{ {
kpSelection *sel = selection (); kpSelection *sel = selection ();
@ -1259,13 +1259,13 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
} }
TQBitmap tqmaskBitmap = tqmaskBitmap_; TQBitmap maskBitmap = maskBitmap_;
if (tqmaskBitmap.isNull () && if (maskBitmap.isNull () &&
!sel->isRectangular ()) !sel->isRectangular ())
{ {
tqmaskBitmap = sel->tqmaskForOwnType (); maskBitmap = sel->maskForOwnType ();
if (tqmaskBitmap.isNull ()) if (maskBitmap.isNull ())
{ {
kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl; kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl;
return TQPixmap (); return TQPixmap ();
@ -1275,7 +1275,7 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
TQPixmap selPixmap = getPixmapAt (boundingRect); TQPixmap selPixmap = getPixmapAt (boundingRect);
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
{ {
// Src Dest = Result // Src Dest = Result
// ----------------- // -----------------
@ -1286,8 +1286,8 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const
TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap); TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap);
bitBlt (&selMaskBitmap, bitBlt (&selMaskBitmap,
TQPoint (0, 0), TQPoint (0, 0),
&tqmaskBitmap, &maskBitmap,
TQRect (0, 0, tqmaskBitmap.width (), tqmaskBitmap.height ()), TQRect (0, 0, maskBitmap.width (), maskBitmap.height ()),
TQt::AndROP); TQt::AndROP);
selPixmap.setMask (selMaskBitmap); selPixmap.setMask (selMaskBitmap);
} }
@ -1328,14 +1328,14 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
// Figure out tqmask for non-rectangular selections // 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 // Get selection pixmap from document
// //
TQPixmap selPixmap = getSelectedPixmap (tqmaskBitmap); TQPixmap selPixmap = getSelectedPixmap (maskBitmap);
if (vm) if (vm)
vm->setQueueUpdates (); vm->setQueueUpdates ();

@ -189,7 +189,7 @@ public:
void setSelection (const kpSelection &selection); void setSelection (const kpSelection &selection);
// TODO: this always returns opaque pixmap - need transparent ver // 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 selectionPullFromDocument (const kpColor &backgroundColor);
bool selectionDelete (); bool selectionDelete ();

@ -337,11 +337,11 @@ int kpSelection::size () const
// public // public
TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
{ {
if (!m_rect.isValid ()) if (!m_rect.isValid ())
{ {
kdError () << "kpSelection::tqmaskForOwnType() boundingRect invalid" << endl; kdError () << "kpSelection::maskForOwnType() boundingRect invalid" << endl;
return TQBitmap (); return TQBitmap ();
} }
@ -351,17 +351,17 @@ TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
if (nullForRectangular) if (nullForRectangular)
return TQBitmap (); return TQBitmap ();
TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ()); TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
tqmaskBitmap.fill (TQt::color1/*opaque*/); maskBitmap.fill (TQt::color1/*opaque*/);
return tqmaskBitmap; return maskBitmap;
} }
TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ()); TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
tqmaskBitmap.fill (TQt::color0/*transparent*/); maskBitmap.fill (TQt::color0/*transparent*/);
TQPainter painter; TQPainter painter;
painter.begin (&tqmaskBitmap); painter.begin (&maskBitmap);
painter.setPen (TQt::color1)/*opaque*/; painter.setPen (TQt::color1)/*opaque*/;
painter.setBrush (TQt::color1/*opaque*/); painter.setBrush (TQt::color1/*opaque*/);
@ -379,7 +379,7 @@ TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const
painter.end (); painter.end ();
return tqmaskBitmap; return maskBitmap;
} }
@ -615,11 +615,11 @@ static TQRgb mostContrastingRGB (TQRgb val)
} }
// private // private
static void drawTextLines (TQPainter *painter, TQPainter *tqmaskPainter, static void drawTextLines (TQPainter *painter, TQPainter *maskPainter,
const TQRect &rect, const TQRect &rect,
const TQValueVector <TQString> &textLines) 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 // TODO: fix esp. before making method public
kdError () << "kpselection.cpp:drawTextLines() can't deal with existing painter clip regions" << endl; 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 ()) \ if (painter->isActive ()) \
painter->cmd; \ painter->cmd; \
\ \
if (tqmaskPainter->isActive ()) \ if (maskPainter->isActive ()) \
tqmaskPainter->cmd; \ maskPainter->cmd; \
} }

@ -103,7 +103,7 @@ public:
int size () const; int size () const;
TQBitmap tqmaskForOwnType (bool nullForRectangular = false) const; TQBitmap maskForOwnType (bool nullForRectangular = false) const;
// synonyms // synonyms
TQPoint topLeft () const; TQPoint topLeft () const;

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

@ -590,10 +590,10 @@ void kpView::addToQueuedArea (const TQRect &rect)
} }
// public // public
void kpView::tqinvalidateQueuedArea () void kpView::invalidateQueuedArea ()
{ {
#if DEBUG_KP_VIEW && 0 #if DEBUG_KP_VIEW && 0
kdDebug () << "kpView::tqinvalidateQueuedArea()" << endl; kdDebug () << "kpView::invalidateQueuedArea()" << endl;
#endif #endif
d->m_queuedUpdateArea = TQRegion (); d->m_queuedUpdateArea = TQRegion ();
@ -621,7 +621,7 @@ void kpView::updateQueuedArea ()
if (!d->m_queuedUpdateArea.isNull ()) if (!d->m_queuedUpdateArea.isNull ())
vm->updateView (this, d->m_queuedUpdateArea); vm->updateView (this, d->m_queuedUpdateArea);
tqinvalidateQueuedArea (); invalidateQueuedArea ();
} }
// public // public
@ -1346,21 +1346,21 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
destPixmapPainter.setBackgroundMode (Qt::OpaqueMode); destPixmapPainter.setBackgroundMode (Qt::OpaqueMode);
destPixmapPainter.setBackgroundColor (TQt::blue); destPixmapPainter.setBackgroundColor (TQt::blue);
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
TQPainter tqmaskBitmapPainter; TQPainter maskBitmapPainter;
if (destPixmap->tqmask ()) if (destPixmap->tqmask ())
{ {
tqmaskBitmap = *destPixmap->tqmask (); maskBitmap = *destPixmap->tqmask ();
tqmaskBitmapPainter.begin (&tqmaskBitmap); maskBitmapPainter.begin (&maskBitmap);
tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/); maskBitmapPainter.setPen (TQt::color1/*opaque*/);
} }
#define PAINTER_CMD(cmd) \ #define PAINTER_CMD(cmd) \
{ \ { \
destPixmapPainter . cmd; \ destPixmapPainter . cmd; \
if (tqmaskBitmapPainter.isActive ()) \ if (maskBitmapPainter.isActive ()) \
tqmaskBitmapPainter . cmd; \ maskBitmapPainter . cmd; \
} }
TQRect boundingRect = sel->boundingRect (); TQRect boundingRect = sel->boundingRect ();
@ -1450,10 +1450,10 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
#undef PAINTER_CMD #undef PAINTER_CMD
destPixmapPainter.end (); destPixmapPainter.end ();
if (tqmaskBitmapPainter.isActive ()) if (maskBitmapPainter.isActive ())
tqmaskBitmapPainter.end (); 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 ()); rect.moveBy (-docRect.x (), -docRect.y ());
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
TQPainter destPixmapPainter, tqmaskBitmapPainter; TQPainter destPixmapPainter, maskBitmapPainter;
if (destPixmap->tqmask ()) if (destPixmap->tqmask ())
{ {
tqmaskBitmap = *destPixmap->tqmask (); maskBitmap = *destPixmap->tqmask ();
tqmaskBitmapPainter.begin (&tqmaskBitmap); maskBitmapPainter.begin (&maskBitmap);
tqmaskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/); maskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/);
tqmaskBitmapPainter.end (); maskBitmapPainter.end ();
} }
destPixmapPainter.begin (destPixmap); destPixmapPainter.begin (destPixmap);
@ -1496,8 +1496,8 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec
destPixmapPainter.fillRect (rect, TQt::white); destPixmapPainter.fillRect (rect, TQt::white);
destPixmapPainter.end (); destPixmapPainter.end ();
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
destPixmap->setMask (tqmaskBitmap); destPixmap->setMask (maskBitmap);
} }
} }
} }

@ -366,11 +366,11 @@ public:
* Removes the dirty region that has been queued for updating. * Removes the dirty region that has been queued for updating.
* Does not update the view. * Does not update the view.
*/ */
void tqinvalidateQueuedArea (); void invalidateQueuedArea ();
/** /**
* Updates the part of the view described by dirty region and then * 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. * is set to queue updates.
*/ */
void updateQueuedArea (); void updateQueuedArea ();

@ -152,7 +152,7 @@ void kpViewManager::setTempPixmap (const kpTempPixmap &tempPixmap)
} }
// public // public
void kpViewManager::tqinvalidateTempPixmap () void kpViewManager::invalidateTempPixmap ()
{ {
if (!m_tempPixmap) if (!m_tempPixmap)
return; return;

@ -69,7 +69,7 @@ public:
const kpTempPixmap *tempPixmap () const; const kpTempPixmap *tempPixmap () const;
void setTempPixmap (const kpTempPixmap &tempPixmap); void setTempPixmap (const kpTempPixmap &tempPixmap);
void tqinvalidateTempPixmap (); void invalidateTempPixmap ();
// //

@ -240,7 +240,7 @@ void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, boo
// HACK: The above "image.convertDepth()" erases the Alpha Channel // HACK: The above "image.convertDepth()" erases the Alpha Channel
// (at least for monochrome). // (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. // Put the tqmask back.
// //

@ -97,14 +97,14 @@ bool kpFloodFill::fill ()
{ {
TQApplication::setOverrideCursor (TQt::waitCursor); TQApplication::setOverrideCursor (TQt::waitCursor);
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
if (m_pixmapPtr->tqmask () || m_color.isTransparent ()) if (m_pixmapPtr->tqmask () || m_color.isTransparent ())
{ {
tqmaskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr); maskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr);
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
tqmaskPainter.setPen (m_color.tqmaskColor ()); maskPainter.setPen (m_color.maskColor ());
} }
if (m_color.isOpaque ()) if (m_color.isOpaque ())
@ -124,18 +124,18 @@ bool kpFloodFill::fill ()
if (painter.isActive ()) if (painter.isActive ())
painter.drawLine (p1, p2); painter.drawLine (p1, p2);
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.drawLine (p1, p2); maskPainter.drawLine (p1, p2);
} }
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
m_pixmapPtr->setMask (tqmaskBitmap); m_pixmapPtr->setMask (maskBitmap);
TQApplication::restoreOverrideCursor (); TQApplication::restoreOverrideCursor ();
} }

@ -772,7 +772,7 @@ void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
if (!destPixmapPtr) if (!destPixmapPtr)
return; 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 */ bitBlt (destPixmapPtr, /* dest */
destAt.x (), destAt.y (), /* dest pt */ destAt.x (), destAt.y (), /* dest pt */
&srcPixmap, /* src */ &srcPixmap, /* src */
@ -856,10 +856,10 @@ TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm)
return *pm.tqmask (); return *pm.tqmask ();
else else
{ {
TQBitmap tqmaskBitmap (pm.width (), pm.height ()); TQBitmap maskBitmap (pm.width (), pm.height ());
tqmaskBitmap.fill (TQt::color1/*opaque*/); maskBitmap.fill (TQt::color1/*opaque*/);
return tqmaskBitmap; return maskBitmap;
} }
} }
@ -870,9 +870,9 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des
if (!destPixmapPtr) if (!destPixmapPtr)
return; return;
TQBitmap tqmaskBitmap = getNonNullMask (*destPixmapPtr); TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr);
TQPainter p (&tqmaskBitmap); TQPainter p (&maskBitmap);
p.setPen (TQt::color0/*transparent*/); p.setPen (TQt::color0/*transparent*/);
p.setBrush (TQt::color0/*transparent*/); p.setBrush (TQt::color0/*transparent*/);
@ -881,7 +881,7 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des
p.end (); 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*/) if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/)
return; return;
TQBitmap tqmaskBitmap = *destPixmapPtr->tqmask (); TQBitmap maskBitmap = *destPixmapPtr->tqmask ();
TQPainter p (&tqmaskBitmap); TQPainter p (&maskBitmap);
p.setPen (TQt::color1/*opaque*/); p.setPen (TQt::color1/*opaque*/);
p.setBrush (TQt::color1/*opaque*/); p.setBrush (TQt::color1/*opaque*/);
@ -948,7 +948,7 @@ void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect
p.end (); p.end ();
destPixmapPtr->setMask (tqmaskBitmap); destPixmapPtr->setMask (maskBitmap);
} }
// public static // public static
@ -1107,8 +1107,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
#if DEBUG_KP_PIXMAP_FX && 1 #if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tfilling in new areas" << endl; kdDebug () << "\tfilling in new areas" << endl;
#endif #endif
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
if (backgroundColor.isOpaque ()) if (backgroundColor.isOpaque ())
{ {
@ -1119,10 +1119,10 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
if (backgroundColor.isTransparent () || destPixmapPtr->tqmask ()) if (backgroundColor.isTransparent () || destPixmapPtr->tqmask ())
{ {
tqmaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr); maskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
tqmaskPainter.setPen (backgroundColor.tqmaskColor ()); maskPainter.setPen (backgroundColor.maskColor ());
tqmaskPainter.setBrush (backgroundColor.tqmaskColor ()); maskPainter.setBrush (backgroundColor.maskColor ());
} }
#define PAINTER_CALL(cmd) \ #define PAINTER_CALL(cmd) \
@ -1130,8 +1130,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
if (painter.isActive ()) \ if (painter.isActive ()) \
painter . cmd ; \ painter . cmd ; \
\ \
if (tqmaskPainter.isActive ()) \ if (maskPainter.isActive ()) \
tqmaskPainter . cmd ; \ maskPainter . cmd ; \
} }
if (w > oldWidth) if (w > oldWidth)
PAINTER_CALL (drawRect (oldWidth, 0, w - oldWidth, oldHeight)); 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)); PAINTER_CALL (drawRect (0, oldHeight, w, h - oldHeight));
#undef PAINTER_CALL #undef PAINTER_CALL
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
destPixmapPtr->setMask (tqmaskBitmap); destPixmapPtr->setMask (maskBitmap);
} }
} }
@ -1378,7 +1378,7 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
if (backgroundColor.isTransparent () || pm.tqmask ()) if (backgroundColor.isTransparent () || pm.tqmask ())
{ {
newBitmapMask.resize (newPixmap.width (), newPixmap.height ()); newBitmapMask.resize (newPixmap.width (), newPixmap.height ());
newBitmapMask.fill (backgroundColor.tqmaskColor ()); newBitmapMask.fill (backgroundColor.maskColor ());
} }
TQPainter painter (&newPixmap); TQPainter painter (&newPixmap);
@ -1416,10 +1416,10 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
if (!newBitmapMask.isNull ()) if (!newBitmapMask.isNull ())
{ {
TQPainter tqmaskPainter (&newBitmapMask); TQPainter maskPainter (&newBitmapMask);
tqmaskPainter.setWorldMatrix (transformMatrix); maskPainter.setWorldMatrix (transformMatrix);
tqmaskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm)); maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
tqmaskPainter.end (); maskPainter.end ();
newPixmap.setMask (newBitmapMask); newPixmap.setMask (newBitmapMask);
} }

@ -294,7 +294,7 @@ public:
// //
// Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it // Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it
// to a tqmask. KolourPaint - and TQPixmap to a great extent - does not // 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 // a pixmap from a foreign source; else all KolourPaint code will
// exhibit "undefined behaviour". // exhibit "undefined behaviour".
// //

@ -314,7 +314,7 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
TQPixmap pixmap = document ()->getPixmapAt (docRect); TQPixmap pixmap = document ()->getPixmapAt (docRect);
TQBitmap tqmask; TQBitmap tqmask;
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
if (m_color.isOpaque ()) if (m_color.isOpaque ())
{ {
@ -325,8 +325,8 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
if (pixmap.tqmask () || m_color.isTransparent ()) if (pixmap.tqmask () || m_color.isTransparent ())
{ {
tqmask = kpPixmapFX::getNonNullMask (pixmap); tqmask = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmask); maskPainter.begin (&tqmask);
tqmaskPainter.setPen (m_color.tqmaskColor ()); maskPainter.setPen (m_color.maskColor ());
} }
for (int i = 0; i < (int) points.count (); i++) for (int i = 0; i < (int) points.count (); i++)
@ -337,12 +337,12 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
if (painter.isActive ()) if (painter.isActive ())
painter.drawPoint (pt); painter.drawPoint (pt);
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.drawPoint (pt); maskPainter.drawPoint (pt);
} }
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();

@ -654,7 +654,7 @@ void kpToolAutoCropCommand::unexecute ()
return; return;
TQPixmap pixmap (m_oldWidth, m_oldHeight); TQPixmap pixmap (m_oldWidth, m_oldHeight);
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
// restore the position of the centre image // restore the position of the centre image
kpPixmapFX::setPixmapAt (&pixmap, m_contentsRect, kpPixmapFX::setPixmapAt (&pixmap, m_contentsRect,
@ -663,7 +663,7 @@ void kpToolAutoCropCommand::unexecute ()
// draw the borders // draw the borders
TQPainter painter (&pixmap); TQPainter painter (&pixmap);
TQPainter tqmaskPainter; TQPainter maskPainter;
const kpToolAutoCropBorder *borders [] = const kpToolAutoCropBorder *borders [] =
{ {
@ -699,14 +699,14 @@ void kpToolAutoCropCommand::unexecute ()
} }
else else
{ {
if (tqmaskBitmap.isNull ()) if (maskBitmap.isNull ())
{ {
// TODO: dangerous when a painter is active on pixmap? // TODO: dangerous when a painter is active on pixmap?
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
} }
tqmaskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/); maskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/);
} }
} }
else else
@ -721,7 +721,7 @@ void kpToolAutoCropCommand::unexecute ()
if (*p) if (*p)
{ {
// TODO: We should really edit the tqmask here. Due to good // 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 // will be marked as opaque in the tqmask; if it's not
// initialized, we will be opaque by default), we // initialized, we will be opaque by default), we
// don't actually have to edit the tqmask but this is // don't actually have to edit the tqmask but this is
@ -731,13 +731,13 @@ void kpToolAutoCropCommand::unexecute ()
} }
} }
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
painter.end (); painter.end ();
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap); pixmap.setMask (maskBitmap);
if (!m_actOnSelection) if (!m_actOnSelection)

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

@ -167,7 +167,7 @@ void kpToolCropSetImageCommand::execute ()
kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap, kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap,
TQPoint (0, 0), TQPoint (0, 0),
m_fromSelection.tqmaskForOwnType ()); m_fromSelection.maskForOwnType ());
kpPixmapFX::paintPixmapAt (&newDocPixmap, kpPixmapFX::paintPixmapAt (&newDocPixmap,
TQPoint (0, 0), TQPoint (0, 0),

@ -179,7 +179,7 @@ void kpToolPen::end ()
if (vm) if (vm)
{ {
if (vm->tempPixmap () && vm->tempPixmap ()->isBrush ()) if (vm->tempPixmap () && vm->tempPixmap ()->isBrush ())
vm->tqinvalidateTempPixmap (); vm->invalidateTempPixmap ();
if (m_mode & (SquareBrushes | DiverseBrushes)) if (m_mode & (SquareBrushes | DiverseBrushes))
vm->unsetCursor (); vm->unsetCursor ();
@ -218,7 +218,7 @@ void kpToolPen::beginDraw ()
// user starts drawing in the background color, we don't want to leave // 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 // the cursor in the foreground colour -- just hide it in all cases
// to avoid confusion // to avoid confusion
viewManager ()->tqinvalidateTempPixmap (); viewManager ()->invalidateTempPixmap ();
setUserMessage (cancelUserMessage ()); setUserMessage (cancelUserMessage ());
} }
@ -282,15 +282,15 @@ void kpToolPen::hover (const TQPoint &point)
setUserShapePoints (point); setUserShapePoints (point);
} }
bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter, bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image, const TQImage &image,
const kpColor &colorToReplace, const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty) 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 TQImage &image,
const kpColor &colorToReplace, const kpColor &colorToReplace,
const TQRect &imageRect, const TQRect &drawRect) const TQRect &imageRect, const TQRect &drawRect)
@ -308,8 +308,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter,
{ \ { \
if (painter && painter->isActive ()) \ if (painter && painter->isActive ()) \
painter->drawLine (startDrawX, y, x - 1, y); \ painter->drawLine (startDrawX, y, x - 1, y); \
if (tqmaskPainter && tqmaskPainter->isActive ()) \ if (maskPainter && maskPainter->isActive ()) \
tqmaskPainter->drawLine (startDrawX, y, x - 1, y); \ maskPainter->drawLine (startDrawX, y, x - 1, y); \
didSomething = true; \ didSomething = true; \
startDrawX = -1; \ startDrawX = -1; \
} }
@ -388,8 +388,8 @@ void kpToolPen::globalDraw ()
kpToolPenCommand *cmd = new kpToolPenCommand ( kpToolPenCommand *cmd = new kpToolPenCommand (
i18n ("Color Eraser"), mainWindow ()); i18n ("Color Eraser"), mainWindow ());
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
if (backgroundColor ().isOpaque ()) if (backgroundColor ().isOpaque ())
{ {
@ -400,16 +400,16 @@ void kpToolPen::globalDraw ()
if (backgroundColor ().isTransparent () || if (backgroundColor ().isTransparent () ||
document ()->pixmap ()->tqmask ()) document ()->pixmap ()->tqmask ())
{ {
tqmaskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ()); maskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ());
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
tqmaskPainter.setPen (backgroundColor ().tqmaskColor ()); maskPainter.setPen (backgroundColor ().maskColor ());
} }
const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ()); const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
TQRect rect = document ()->rect (); TQRect rect = document ()->rect ();
const bool didSomething = wash (&painter, &tqmaskPainter, image, const bool didSomething = wash (&painter, &maskPainter, image,
foregroundColor ()/*replace foreground*/, foregroundColor ()/*replace foreground*/,
rect, rect); rect, rect);
@ -417,13 +417,13 @@ void kpToolPen::globalDraw ()
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
if (didSomething) if (didSomething)
{ {
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
document ()->pixmap ()->setMask (tqmaskBitmap); document ()->pixmap ()->setMask (maskBitmap);
document ()->slotContentsChanged (rect); document ()->slotContentsChanged (rect);
@ -519,8 +519,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
#if DEBUG_KP_TOOL_PEN #if DEBUG_KP_TOOL_PEN
kdDebug () << "\tconvert to image: " << timer.restart () << "ms" << endl; kdDebug () << "\tconvert to image: " << timer.restart () << "ms" << endl;
#endif #endif
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
if (color (m_mouseButton).isOpaque ()) if (color (m_mouseButton).isOpaque ())
{ {
@ -531,12 +531,12 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (color (m_mouseButton).isTransparent () || if (color (m_mouseButton).isTransparent () ||
pixmap.tqmask ()) pixmap.tqmask ())
{ {
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
tqmaskPainter.setPen (color (m_mouseButton).tqmaskColor ()); maskPainter.setPen (color (m_mouseButton).maskColor ());
} }
bool didSomething = wash (&painter, &tqmaskPainter, bool didSomething = wash (&painter, &maskPainter,
image, image,
color (1 - m_mouseButton)/*color to tqreplace*/, color (1 - m_mouseButton)/*color to tqreplace*/,
rect, rect); rect, rect);
@ -544,13 +544,13 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
if (didSomething) if (didSomething)
{ {
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap); pixmap.setMask (maskBitmap);
#if DEBUG_KP_TOOL_PEN #if DEBUG_KP_TOOL_PEN
kdDebug () << "\twashed: " << timer.restart () << "ms" << endl; kdDebug () << "\twashed: " << timer.restart () << "ms" << endl;
@ -594,9 +594,9 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
bool transparent = c.isTransparent (); bool transparent = c.isTransparent ();
TQPixmap pixmap = document ()->getPixmapAt (rect); TQPixmap pixmap = document ()->getPixmapAt (rect);
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
if (m_mode & (DrawsPixels | WashesPixmaps)) if (m_mode & (DrawsPixels | WashesPixmaps))
{ {
@ -608,9 +608,9 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (transparent || pixmap.tqmask ()) if (transparent || pixmap.tqmask ())
{ {
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
tqmaskPainter.setPen (c.tqmaskColor ()); maskPainter.setPen (c.maskColor ());
} }
} }
@ -635,8 +635,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ()) if (painter.isActive ())
painter.drawLine (sp, ep); painter.drawLine (sp, ep);
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.drawLine (sp, ep); maskPainter.drawLine (sp, ep);
didSomething = true; didSomething = true;
} }
@ -678,7 +678,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (m_mode & WashesPixmaps) if (m_mode & WashesPixmaps)
{ {
if (wash (&painter, &tqmaskPainter, image, if (wash (&painter, &maskPainter, image,
colorToReplace, colorToReplace,
rect, plotx + rect.left (), ploty + rect.top ())) 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 (m_mode & WashesPixmaps)
{ {
if (wash (&painter, &tqmaskPainter, image, if (wash (&painter, &maskPainter, image,
colorToReplace, colorToReplace,
rect, plotx + rect.left (), oldploty + rect.top ())) 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 (m_mode & WashesPixmaps)
{ {
if (wash (&painter, &tqmaskPainter, image, if (wash (&painter, &maskPainter, image,
colorToReplace, colorToReplace,
rect, plotx + rect.left (), ploty + rect.top ())) rect, plotx + rect.left (), ploty + rect.top ()))
{ {
@ -806,8 +806,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
#if DEBUG_KP_TOOL_PEN #if DEBUG_KP_TOOL_PEN
if (m_mode & WashesPixmaps) if (m_mode & WashesPixmaps)
@ -824,8 +824,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const
if (didSomething) if (didSomething)
{ {
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap); pixmap.setMask (maskBitmap);
// draw onto doc // draw onto doc
document ()->setPixmapAt (pixmap, rect.topLeft ()); document ()->setPixmapAt (pixmap, rect.topLeft ());

@ -103,11 +103,11 @@ private slots:
void slotEraserSizeChanged (int size); void slotEraserSizeChanged (int size);
private: private:
bool wash (TQPainter *painter, TQPainter *tqmaskPainter, bool wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image, const TQImage &image,
const kpColor &colorToReplace, const kpColor &colorToReplace,
const TQRect &imageRect, int plotx, int ploty); const TQRect &imageRect, int plotx, int ploty);
bool wash (TQPainter *painter, TQPainter *tqmaskPainter, bool wash (TQPainter *painter, TQPainter *maskPainter,
const TQImage &image, const TQImage &image,
const kpColor &colorToReplace, const kpColor &colorToReplace,
const TQRect &imageRect, const TQRect &drawRect); const TQRect &imageRect, const TQRect &drawRect);

@ -81,7 +81,7 @@ static const char *pointArrayToString (const TQPointArray &pointArray)
static TQPen makeMaskPen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle) 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, lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle,
Qt::RoundCap, Qt::RoundJoin); Qt::RoundCap, Qt::RoundJoin);
} }
@ -103,7 +103,7 @@ static TQBrush makeMaskBrush (const kpColor &foregroundColor,
kpToolWidgetFillStyle *toolWidgetFillStyle) kpToolWidgetFillStyle *toolWidgetFillStyle)
{ {
if (toolWidgetFillStyle) if (toolWidgetFillStyle)
return toolWidgetFillStyle->tqmaskBrush (foregroundColor, backgroundColor); return toolWidgetFillStyle->maskBrush (foregroundColor, backgroundColor);
else else
return Qt::NoBrush; return Qt::NoBrush;
} }
@ -155,33 +155,33 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
// draw // draw
TQPen pen = makePen (foregroundColor, lineWidth, lineStyle), TQPen pen = makePen (foregroundColor, lineWidth, lineStyle),
tqmaskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle); maskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle), TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle),
tqmaskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle); maskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);
TQPixmap pixmap = oldPixmap; TQPixmap pixmap = oldPixmap;
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
if (pixmap.tqmask () || if (pixmap.tqmask () ||
(tqmaskPen.style () != TQt::NoPen && (maskPen.style () != TQt::NoPen &&
tqmaskPen.color () == TQt::color0/*transparent*/) || maskPen.color () == TQt::color0/*transparent*/) ||
(tqmaskBrush.style () != TQt::NoBrush && (maskBrush.style () != TQt::NoBrush &&
tqmaskBrush.color () == TQt::color0/*transparent*/)) maskBrush.color () == TQt::color0/*transparent*/))
{ {
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
tqmaskPainter.setPen (tqmaskPen); maskPainter.setPen (maskPen);
tqmaskPainter.setBrush (tqmaskBrush); maskPainter.setBrush (maskBrush);
#if DEBUG_KP_TOOL_POLYGON && 0 #if DEBUG_KP_TOOL_POLYGON && 0
kdDebug () << "\ttqmaskPainter begin because:" << endl kdDebug () << "\tmaskPainter begin because:" << endl
<< "\t\tpixmap.tqmask=" << pixmap.tqmask () << endl << "\t\tpixmap.tqmask=" << pixmap.tqmask () << endl
<< "\t\t(tqmaskPenStyle!=NoPen)=" << (tqmaskPen.style () != TQt::NoPen) << endl << "\t\t(maskPenStyle!=NoPen)=" << (maskPen.style () != TQt::NoPen) << endl
<< "\t\t(tqmaskPenColor==trans)=" << (tqmaskPen.color () == TQt::color0) << endl << "\t\t(maskPenColor==trans)=" << (maskPen.color () == TQt::color0) << endl
<< "\t\t(tqmaskBrushStyle!=NoBrush)=" << (tqmaskBrush.style () != TQt::NoBrush) << endl << "\t\t(maskBrushStyle!=NoBrush)=" << (maskBrush.style () != TQt::NoBrush) << endl
<< "\t\t(tqmaskBrushColor==trans)=" << (tqmaskBrush.color () == TQt::color0) << endl; << "\t\t(maskBrushColor==trans)=" << (maskBrush.color () == TQt::color0) << endl;
#endif #endif
} }
@ -204,8 +204,8 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ()) \ if (painter.isActive ()) \
painter . cmd ; \ painter . cmd ; \
\ \
if (tqmaskPainter.isActive ()) \ if (maskPainter.isActive ()) \
tqmaskPainter . cmd ; \ maskPainter . cmd ; \
} }
// SYNC: TQt bug // SYNC: TQt bug
@ -240,9 +240,9 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
painter.setRasterOp (TQt::XorROP); painter.setRasterOp (TQt::XorROP);
} }
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
{ {
TQPen XORpen = tqmaskPainter.pen (); TQPen XORpen = maskPainter.pen ();
// TODO??? // TODO???
#if 0 #if 0
@ -252,7 +252,7 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
XORpen.setColor (TQt::color0/*transparent*/); XORpen.setColor (TQt::color0/*transparent*/);
#endif #endif
tqmaskPainter.setPen (XORpen); maskPainter.setPen (XORpen);
} }
PAINTER_CALL (drawLine (pointsInRect [0], pointsInRect [count - 1])); PAINTER_CALL (drawLine (pointsInRect [0], pointsInRect [count - 1]));
@ -288,11 +288,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap,
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap); pixmap.setMask (maskBitmap);
return pixmap; return pixmap;
} }
@ -671,7 +671,7 @@ void kpToolPolygon::cancelShape ()
endDraw (TQPoint (), TQRect ()); endDraw (TQPoint (), TQRect ());
commandHistory ()->undo (); commandHistory ()->undo ();
#else #else
viewManager ()->tqinvalidateTempPixmap (); viewManager ()->invalidateTempPixmap ();
#endif #endif
m_points.resize (0); m_points.resize (0);
@ -781,7 +781,7 @@ void kpToolPolygon::endShape (const TQPoint &, const TQRect &)
if (!hasBegunShape ()) if (!hasBegunShape ())
return; return;
viewManager ()->tqinvalidateTempPixmap (); viewManager ()->invalidateTempPixmap ();
TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth); TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);

@ -53,39 +53,39 @@
static TQPixmap pixmap (const kpToolRectangle::Mode mode, static TQPixmap pixmap (const kpToolRectangle::Mode mode,
kpDocument *document, const TQRect &rect, kpDocument *document, const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint, const TQPoint &startPoint, const TQPoint &endPoint,
const TQPen &pen, const TQPen &tqmaskPen, const TQPen &pen, const TQPen &maskPen,
const TQBrush &brush, const TQBrush &tqmaskBrush) const TQBrush &brush, const TQBrush &maskBrush)
{ {
TQPixmap pixmap = document->getPixmapAt (rect); TQPixmap pixmap = document->getPixmapAt (rect);
TQBitmap tqmaskBitmap; TQBitmap maskBitmap;
TQPainter painter, tqmaskPainter; TQPainter painter, maskPainter;
#if DEBUG_KP_TOOL_RECTANGLE && 1 #if DEBUG_KP_TOOL_RECTANGLE && 1
kdDebug () << "pixmap: rect=" << rect kdDebug () << "pixmap: rect=" << rect
<< " startPoint=" << startPoint << " startPoint=" << startPoint
<< " endPoint=" << endPoint << " endPoint=" << endPoint
<< endl; << endl;
kdDebug () << "\tm: p=" << (tqmaskPen.style () != TQt::NoPen) kdDebug () << "\tm: p=" << (maskPen.style () != TQt::NoPen)
<< " b=" << (tqmaskBrush.style () != TQt::NoBrush) << " b=" << (maskBrush.style () != TQt::NoBrush)
<< " o: p=" << (pen.style () != TQt::NoPen) << " o: p=" << (pen.style () != TQt::NoPen)
<< " b=" << (brush.style () != TQt::NoBrush) << " b=" << (brush.style () != TQt::NoBrush)
<< endl; << endl;
kdDebug () << "\ttqmaskPen.color()=" << (int *) tqmaskPen.color ().rgb () kdDebug () << "\tmaskPen.color()=" << (int *) maskPen.color ().rgb ()
<< " transparent=" << (int *) TQt::color0.rgb ()/*transparent*/ << " transparent=" << (int *) TQt::color0.rgb ()/*transparent*/
<< endl; << endl;
#endif #endif
if (pixmap.tqmask () || if (pixmap.tqmask () ||
(tqmaskPen.style () != TQt::NoPen && (maskPen.style () != TQt::NoPen &&
tqmaskPen.color () == TQt::color0/*transparent*/) || maskPen.color () == TQt::color0/*transparent*/) ||
(tqmaskBrush.style () != TQt::NoBrush && (maskBrush.style () != TQt::NoBrush &&
tqmaskBrush.color () == TQt::color0/*transparent*/)) maskBrush.color () == TQt::color0/*transparent*/))
{ {
tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); maskBitmap = kpPixmapFX::getNonNullMask (pixmap);
tqmaskPainter.begin (&tqmaskBitmap); maskPainter.begin (&maskBitmap);
tqmaskPainter.setPen (tqmaskPen); maskPainter.setPen (maskPen);
tqmaskPainter.setBrush (tqmaskBrush); maskPainter.setBrush (maskBrush);
} }
if (pen.style () != TQt::NoPen || if (pen.style () != TQt::NoPen ||
@ -101,8 +101,8 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ()) \ if (painter.isActive ()) \
painter . cmd ; \ painter . cmd ; \
\ \
if (tqmaskPainter.isActive ()) \ if (maskPainter.isActive ()) \
tqmaskPainter . cmd ; \ maskPainter . cmd ; \
} }
if (startPoint != endPoint) if (startPoint != endPoint)
@ -144,11 +144,11 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (painter.isActive ()) if (painter.isActive ())
painter.end (); painter.end ();
if (tqmaskPainter.isActive ()) if (maskPainter.isActive ())
tqmaskPainter.end (); maskPainter.end ();
if (!tqmaskBitmap.isNull ()) if (!maskBitmap.isNull ())
pixmap.setMask (tqmaskBitmap); pixmap.setMask (maskBitmap);
return pixmap; return pixmap;
} }
@ -231,7 +231,7 @@ void kpToolRectangle::slotBackgroundColorChanged (const kpColor &)
// private // private
void kpToolRectangle::updatePen (int mouseButton) void kpToolRectangle::updatePen (int mouseButton)
{ {
TQColor tqmaskPenColor = color (mouseButton).tqmaskColor (); TQColor maskPenColor = color (mouseButton).maskColor ();
if (!m_toolWidgetLineWidth) if (!m_toolWidgetLineWidth)
{ {
@ -239,7 +239,7 @@ void kpToolRectangle::updatePen (int mouseButton)
m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor ()); m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor ());
else else
m_pen [mouseButton] = TQPen(Qt::NoPen); m_pen [mouseButton] = TQPen(Qt::NoPen);
m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor); m_maskPen [mouseButton] = TQPen (maskPenColor);
} }
else else
{ {
@ -251,7 +251,7 @@ void kpToolRectangle::updatePen (int mouseButton)
} }
else else
m_pen [mouseButton] = TQPen(Qt::NoPen); m_pen [mouseButton] = TQPen(Qt::NoPen);
m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor, m_maskPen [mouseButton] = TQPen (maskPenColor,
m_toolWidgetLineWidth->lineWidth (), m_toolWidgetLineWidth->lineWidth (),
TQt::SolidLine); TQt::SolidLine);
} }
@ -270,14 +270,14 @@ void kpToolRectangle::updateBrush (int mouseButton)
color (mouseButton)/*foreground colour*/, color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/); color (1 - mouseButton)/*background colour*/);
m_tqmaskBrush [mouseButton] = m_toolWidgetFillStyle->tqmaskBrush ( m_maskBrush [mouseButton] = m_toolWidgetFillStyle->maskBrush (
color (mouseButton)/*foreground colour*/, color (mouseButton)/*foreground colour*/,
color (1 - mouseButton)/*background colour*/); color (1 - mouseButton)/*background colour*/);
} }
else else
{ {
m_brush [mouseButton] = TQBrush(Qt::NoBrush); 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_toolRectangleRectWithoutLineWidth = rect;
m_toolRectangleRect = kpTool::neededRect (rect, TQMAX (m_pen [m_mouseButton].width (), m_toolRectangleRect = kpTool::neededRect (rect, TQMAX (m_pen [m_mouseButton].width (),
m_tqmaskPen [m_mouseButton].width ())); m_maskPen [m_mouseButton].width ()));
} }
void kpToolRectangle::beginDraw () void kpToolRectangle::beginDraw ()
@ -451,8 +451,8 @@ void kpToolRectangle::updateShape ()
TQPixmap newPixmap = pixmap (m_mode, document (), m_toolRectangleRect, TQPixmap newPixmap = pixmap (m_mode, document (), m_toolRectangleRect,
m_toolRectangleStartPoint, m_toolRectangleEndPoint, m_toolRectangleStartPoint, m_toolRectangleEndPoint,
m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton], m_pen [m_mouseButton], m_maskPen [m_mouseButton],
m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton]); m_brush [m_mouseButton], m_maskBrush [m_mouseButton]);
kpTempPixmap newTempPixmap (false/*always display*/, kpTempPixmap newTempPixmap (false/*always display*/,
kpTempPixmap::SetPixmap/*render mode*/, kpTempPixmap::SetPixmap/*render mode*/,
m_toolRectangleRect.topLeft (), m_toolRectangleRect.topLeft (),
@ -511,7 +511,7 @@ void kpToolRectangle::cancelShape ()
endDraw (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); endDraw (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
mainWindow ()->commandHistory ()->undo (); mainWindow ()->commandHistory ()->undo ();
#else #else
viewManager ()->tqinvalidateTempPixmap (); viewManager ()->invalidateTempPixmap ();
#endif #endif
setUserMessage (i18n ("Let go of all the mouse buttons.")); setUserMessage (i18n ("Let go of all the mouse buttons."));
@ -527,13 +527,13 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &)
applyModifiers (); applyModifiers ();
// TODO: flicker // TODO: flicker
viewManager ()->tqinvalidateTempPixmap (); viewManager ()->invalidateTempPixmap ();
mainWindow ()->commandHistory ()->addCommand ( mainWindow ()->commandHistory ()->addCommand (
new kpToolRectangleCommand new kpToolRectangleCommand
(m_mode, (m_mode,
m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton], m_pen [m_mouseButton], m_maskPen [m_mouseButton],
m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton], m_brush [m_mouseButton], m_maskBrush [m_mouseButton],
m_toolRectangleRect, m_toolRectangleStartPoint, m_toolRectangleEndPoint, m_toolRectangleRect, m_toolRectangleStartPoint, m_toolRectangleEndPoint,
mainWindow ())); mainWindow ()));
@ -546,15 +546,15 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &)
*/ */
kpToolRectangleCommand::kpToolRectangleCommand (kpToolRectangle::Mode mode, kpToolRectangleCommand::kpToolRectangleCommand (kpToolRectangle::Mode mode,
const TQPen &pen, const TQPen &tqmaskPen, const TQPen &pen, const TQPen &maskPen,
const TQBrush &brush, const TQBrush &tqmaskBrush, const TQBrush &brush, const TQBrush &maskBrush,
const TQRect &rect, const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint, const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow) kpMainWindow *mainWindow)
: kpCommand (mainWindow), : kpCommand (mainWindow),
m_mode (mode), m_mode (mode),
m_pen (pen), m_tqmaskPen (tqmaskPen), m_pen (pen), m_maskPen (maskPen),
m_brush (brush), m_tqmaskBrush (tqmaskBrush), m_brush (brush), m_maskBrush (maskBrush),
m_rect (rect), m_rect (rect),
m_startPoint (startPoint), m_startPoint (startPoint),
m_endPoint (endPoint), m_endPoint (endPoint),
@ -612,8 +612,8 @@ void kpToolRectangleCommand::execute ()
doc->setPixmapAt (pixmap (m_mode, doc, doc->setPixmapAt (pixmap (m_mode, doc,
m_rect, m_startPoint, m_endPoint, m_rect, m_startPoint, m_endPoint,
m_pen, m_tqmaskPen, m_pen, m_maskPen,
m_brush, m_tqmaskBrush), m_brush, m_maskBrush),
m_rect.topLeft ()); m_rect.topLeft ());
} }

@ -103,10 +103,10 @@ private:
kpToolWidgetFillStyle *m_toolWidgetFillStyle; kpToolWidgetFillStyle *m_toolWidgetFillStyle;
void updatePen (int mouseButton); void updatePen (int mouseButton);
TQPen m_pen [2], m_tqmaskPen [2]; TQPen m_pen [2], m_maskPen [2];
void updateBrush (int mouseButton); void updateBrush (int mouseButton);
TQBrush m_brush [2], m_tqmaskBrush [2]; TQBrush m_brush [2], m_maskBrush [2];
void applyModifiers (); void applyModifiers ();
TQPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint; TQPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint;
@ -117,8 +117,8 @@ class kpToolRectangleCommand : public kpCommand
{ {
public: public:
kpToolRectangleCommand (kpToolRectangle::Mode mode, kpToolRectangleCommand (kpToolRectangle::Mode mode,
const TQPen &pen, const TQPen &tqmaskPen, const TQPen &pen, const TQPen &maskPen,
const TQBrush &brush, const TQBrush &tqmaskBrush, const TQBrush &brush, const TQBrush &maskBrush,
const TQRect &rect, const TQRect &rect,
const TQPoint &startPoint, const TQPoint &endPoint, const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow); kpMainWindow *mainWindow);
@ -133,8 +133,8 @@ public:
private: private:
kpToolRectangle::Mode m_mode; kpToolRectangle::Mode m_mode;
TQPen m_pen, m_tqmaskPen; TQPen m_pen, m_maskPen;
TQBrush m_brush, m_tqmaskBrush; TQBrush m_brush, m_maskBrush;
TQRect m_rect; TQRect m_rect;
TQPoint m_startPoint, m_endPoint; TQPoint m_startPoint, m_endPoint;
TQPixmap *m_oldPixmapPtr; TQPixmap *m_oldPixmapPtr;

@ -92,7 +92,7 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
<< endl; << endl;
#endif #endif
retqlayoutOptions (); relayoutOptions ();
const TQPair <int, int> rowColPair = defaultSelectedRowAndCol (); const TQPair <int, int> rowColPair = defaultSelectedRowAndCol ();
if (!setSelected (rowColPair.first, rowColPair.second, false/*don't save*/)) if (!setSelected (rowColPair.first, rowColPair.second, false/*don't save*/))
@ -226,10 +226,10 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
// public // public
void kpToolWidgetBase::retqlayoutOptions () void kpToolWidgetBase::relayoutOptions ()
{ {
#if DEBUG_KP_TOOL_WIDGET_BASE #if DEBUG_KP_TOOL_WIDGET_BASE
kdDebug () << "kpToolWidgetBase::retqlayoutOptions()" << endl; kdDebug () << "kpToolWidgetBase::relayoutOptions()" << endl;
#endif #endif
while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0) while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0)

@ -70,7 +70,7 @@ public: // (only have to use these if you don't use finishConstruction())
void saveSelectedAsDefault () const; void saveSelectedAsDefault () const;
void retqlayoutOptions (); void relayoutOptions ();
public: public:
int selectedRow () const; int selectedRow () const;

@ -78,9 +78,9 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *tqparent, const char *
TQBitmap tqmask (previewPixmap.width (), previewPixmap.height ()); TQBitmap tqmask (previewPixmap.width (), previewPixmap.height ());
tqmask.fill (TQt::color0/*transparent*/); tqmask.fill (TQt::color0/*transparent*/);
TQPainter tqmaskPainter (&tqmask); TQPainter maskPainter (&tqmask);
tqmaskPainter.fillRect (rect, TQt::color1/*opaque*/); maskPainter.fillRect (rect, TQt::color1/*opaque*/);
tqmaskPainter.end (); maskPainter.end ();
previewPixmap.setMask (tqmask); previewPixmap.setMask (tqmask);
@ -130,19 +130,19 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (color.isTransparent ()) if (color.isTransparent ())
{ {
TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ()); TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
tqmaskBitmap.fill (TQt::color0/*transparent*/); maskBitmap.fill (TQt::color0/*transparent*/);
if (showBorder) if (showBorder)
{ {
TQPainter tqmaskBitmapPainter (&tqmaskBitmap); TQPainter maskBitmapPainter (&maskBitmap);
tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/); maskBitmapPainter.setPen (TQt::color1/*opaque*/);
tqmaskBitmapPainter.drawRect (tqmaskBitmap.rect ()); maskBitmapPainter.drawRect (maskBitmap.rect ());
} }
pixmap.setMask (tqmaskBitmap); pixmap.setMask (maskBitmap);
} }

@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const
} }
// public static // public static
TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs, TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor, const kpColor &foregroundColor,
const kpColor &backgroundColor) const kpColor &backgroundColor)
{ {
@ -152,10 +152,10 @@ TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs,
return Qt::NoBrush; return Qt::NoBrush;
break; break;
case FillWithBackground: case FillWithBackground:
return TQBrush (backgroundColor.tqmaskColor ()); return TQBrush (backgroundColor.maskColor ());
break; break;
case FillWithForeground: case FillWithForeground:
return TQBrush (foregroundColor.tqmaskColor ()); return TQBrush (foregroundColor.maskColor ());
break; break;
default: default:
return Qt::NoBrush; return Qt::NoBrush;
@ -163,10 +163,10 @@ TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs,
} }
} }
TQBrush kpToolWidgetFillStyle::tqmaskBrush (const kpColor &foregroundColor, TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor) const kpColor &backgroundColor)
{ {
return tqmaskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor); return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
} }
// public static // public static

@ -59,10 +59,10 @@ private:
public: public:
FillStyle fillStyle () const; FillStyle fillStyle () const;
static TQBrush tqmaskBrushForFillStyle (FillStyle fs, static TQBrush maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor, const kpColor &foregroundColor,
const kpColor &backgroundColor); const kpColor &backgroundColor);
TQBrush tqmaskBrush (const kpColor &foregroundColor, TQBrush maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor); const kpColor &backgroundColor);
static TQBrush brushForFillStyle (FillStyle fs, static TQBrush brushForFillStyle (FillStyle fs,

@ -52,22 +52,22 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *tqparent, const char *na
(h <= 0 ? height () : h)); (h <= 0 ? height () : h));
pixmap.fill (TQt::white); pixmap.fill (TQt::white);
TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ()); TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
tqmaskBitmap.fill (TQt::color0/*transparent*/); maskBitmap.fill (TQt::color0/*transparent*/);
TQPainter painter (&pixmap), tqmaskPainter (&tqmaskBitmap); TQPainter painter (&pixmap), maskPainter (&maskBitmap);
painter.setPen (TQt::black), tqmaskPainter.setPen (TQt::color1/*opaque*/); painter.setPen (TQt::black), maskPainter.setPen (TQt::color1/*opaque*/);
painter.setBrush (TQt::black), tqmaskPainter.setBrush (TQt::color1/*opaque*/); painter.setBrush (TQt::black), maskPainter.setBrush (TQt::color1/*opaque*/);
TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2, TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2,
pixmap.width (), lineWidths [i]); pixmap.width (), lineWidths [i]);
painter.drawRect (rect), tqmaskPainter.drawRect (rect); painter.drawRect (rect), maskPainter.drawRect (rect);
painter.end (), tqmaskPainter.end (); painter.end (), maskPainter.end ();
pixmap.setMask (tqmaskBitmap); pixmap.setMask (maskBitmap);
addOption (pixmap, TQString::number (lineWidths [i])); addOption (pixmap, TQString::number (lineWidths [i]));
startNewOptionRow (); startNewOptionRow ();

@ -107,7 +107,7 @@ protected:
* ocr engine used. * ocr engine used.
* It calls the virtual subs ocrEngineName, ocrEngineLogo and ocrEngineDesc which * It calls the virtual subs ocrEngineName, ocrEngineLogo and ocrEngineDesc which
* must return the approbiate values for the engines. * must return the approbiate values for the engines.
* @return a pointer to a VBox in which further elements can be tqlayouted * @return a pointer to a VBox in which further elements can be layouted
*/ */
virtual void ocrIntro(); virtual void ocrIntro();

@ -92,7 +92,7 @@ TQString ocradDialog::ocrEngineDesc() const
} }
int ocradDialog::tqlayoutDetectionMode() const int ocradDialog::layoutDetectionMode() const
{ {
return m_layoutMode->currentItem(); return m_layoutMode->currentItem();
} }
@ -131,8 +131,8 @@ EngineError ocradDialog::setupGui()
/** tqlayout detection button **/ /** tqlayout detection button **/
conf->setGroup( CFG_GROUP_OCRAD ); conf->setGroup( CFG_GROUP_OCRAD );
int tqlayoutDetect = conf->readNumEntry( CFG_OCRAD_LAYOUT_DETECTION, 0 ); int layoutDetect = conf->readNumEntry( CFG_OCRAD_LAYOUT_DETECTION, 0 );
kdDebug(28000) << "Layout detection from config: " << tqlayoutDetect << endl; kdDebug(28000) << "Layout detection from config: " << layoutDetect << endl;
(void) new KSeparator( KSeparator::HLine, page); (void) new KSeparator( KSeparator::HLine, page);
TQHBox *hb1 = new TQHBox(page); TQHBox *hb1 = new TQHBox(page);
@ -142,7 +142,7 @@ EngineError ocradDialog::setupGui()
m_layoutMode->insertItem(i18n("No Layout Detection"), 0 ); m_layoutMode->insertItem(i18n("No Layout Detection"), 0 );
m_layoutMode->insertItem(i18n("Column Detection"), 1 ); m_layoutMode->insertItem(i18n("Column Detection"), 1 );
m_layoutMode->insertItem(i18n("Full Layout Detection"), 2); m_layoutMode->insertItem(i18n("Full Layout Detection"), 2);
m_layoutMode->setCurrentItem(tqlayoutDetect); m_layoutMode->setCurrentItem(layoutDetect);
/** stating the ocrad binary **/ /** stating the ocrad binary **/
(void) new KSeparator( KSeparator::HLine, page); (void) new KSeparator( KSeparator::HLine, page);

@ -38,7 +38,7 @@
#include "kocrbase.h" #include "kocrbase.h"
#define CFG_GROUP_OCRAD "ocrad" #define CFG_GROUP_OCRAD "ocrad"
#define CFG_OCRAD_LAYOUT_DETECTION "tqlayoutDetection" #define CFG_OCRAD_LAYOUT_DETECTION "layoutDetection"
#define CFG_OCRAD_EXTRA_ARGUMENTS "extraArguments" #define CFG_OCRAD_EXTRA_ARGUMENTS "extraArguments"
#define CFG_OCRAD_FORMAT "format" #define CFG_OCRAD_FORMAT "format"
#define CFG_OCRAD_CHARSET "charset" #define CFG_OCRAD_CHARSET "charset"
@ -71,7 +71,7 @@ public:
TQString orfUrl() const; TQString orfUrl() const;
int tqlayoutDetectionMode() const; int layoutDetectionMode() const;
/** /**
* returns the numeric version of the ocrad program. * returns the numeric version of the ocrad program.

@ -205,7 +205,7 @@ void KookaImage::extractNow()
{ {
kdDebug(28000) << "extracting a subimage number " << m_subNo << endl; kdDebug(28000) << "extracting a subimage number " << m_subNo << endl;
KookaImage *tqparent = tqparentImage(); KookaImage *tqparent = parentImage();
if( tqparent ) if( tqparent )
{ {
@ -328,7 +328,7 @@ KookaImage::~KookaImage()
} }
KookaImage* KookaImage::tqparentImage() const KookaImage* KookaImage::parentImage() const
{ {
return( m_parent ); return( m_parent );
} }

@ -78,7 +78,7 @@ public:
/** /**
* the tqparent image. * the tqparent image.
*/ */
KookaImage* tqparentImage() const; KookaImage* parentImage() const;
/** /**
* returns true if this is a subimage. * returns true if this is a subimage.

@ -401,7 +401,7 @@ void KSANEOCR::startOCRAD( )
*daemon << m_tmpOrfName; // the orf result file *daemon << m_tmpOrfName; // the orf result file
*daemon << TQFile::encodeName( m_ocrImagePBM ).data(); // The name of the image *daemon << TQFile::encodeName( m_ocrImagePBM ).data(); // The name of the image
*daemon << TQString("-l"); *daemon << TQString("-l");
*daemon << TQString::number( ocrDia->tqlayoutDetectionMode()); *daemon << TQString::number( ocrDia->layoutDetectionMode());
KConfig *konf = KGlobal::config (); KConfig *konf = KGlobal::config ();
KConfigGroupSaver( konf, CFG_GROUP_OCRAD ); KConfigGroupSaver( konf, CFG_GROUP_OCRAD );

@ -567,7 +567,7 @@
<includes> <includes>
<include location="global" impldecl="in implementation">kdialog.h</include> <include location="global" impldecl="in implementation">kdialog.h</include>
</includes> </includes>
<tqlayoutdefaults spacing="5" margin="11"/> <layoutdefaults spacing="5" margin="11"/>
<includehints> <includehints>
<includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint>
<includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint>

@ -167,5 +167,5 @@
<function access="protected" specifier="non virtual">showEvent( TQShowEvent * )</function> <function access="protected" specifier="non virtual">showEvent( TQShowEvent * )</function>
</functions> </functions>
<pixmapfunction>DesktopIcon</pixmapfunction> <pixmapfunction>DesktopIcon</pixmapfunction>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -274,5 +274,5 @@
<function access="private">init()</function> <function access="private">init()</function>
</functions> </functions>
<pixmapfunction>DesktopIcon</pixmapfunction> <pixmapfunction>DesktopIcon</pixmapfunction>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -275,7 +275,7 @@
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
</connection> </connection>
</connections> </connections>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint>
</includehints> </includehints>

@ -172,7 +172,7 @@ void KPDFOutputDev::processLink( Link * link, Catalog * catalog )
} }
void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str, void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str,
int _width, int _height, GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg ) int _width, int _height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg )
{ {
if ( m_generateImages ) if ( m_generateImages )
{ {
@ -207,7 +207,7 @@ void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str,
m_rects.push_back( rect ); m_rects.push_back( rect );
} }
} }
SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, tqmaskColors, inlineImg ); SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, maskColors, inlineImg );
} }
//END - OutputDev hooked calls //END - OutputDev hooked calls

@ -63,7 +63,7 @@ class KPDFOutputDev : public SplashOutputDev
virtual void processLink(Link *link, Catalog *catalog); virtual void processLink(Link *link, Catalog *catalog);
//----- image drawing //----- image drawing
virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height,
GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg); GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg);
private: private:
// delete all interal objects and data // delete all interal objects and data

@ -113,7 +113,7 @@ using namespace KPDF;
unsigned int Part::m_count = 0; unsigned int Part::m_count = 0;
Part::Part(TQWidget *tqparentWidget, const char *widgetName, Part::Part(TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name, TQObject *tqparent, const char *name,
const TQStringList & /*args*/ ) const TQStringList & /*args*/ )
: DCOPObject("kpdf"), KParts::ReadOnlyPart(tqparent, name), m_showMenuBarAction(0), m_showFullScreenAction(0), : DCOPObject("kpdf"), KParts::ReadOnlyPart(tqparent, name), m_showMenuBarAction(0), m_showFullScreenAction(0),
@ -157,7 +157,7 @@ Part::Part(TQWidget *tqparentWidget, const char *widgetName,
connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) ); connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) );
// widgets: ^searchbar (toolbar containing label and SearchWidget) // widgets: ^searchbar (toolbar containing label and SearchWidget)
// m_searchToolBar = new KToolBar( tqparentWidget, "searchBar" ); // m_searchToolBar = new KToolBar( parentWidget, "searchBar" );
// m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() ); // m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() );
// TQLabel * sLabel = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" ); // TQLabel * sLabel = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" );
// m_searchWidget = new SearchWidget( m_searchToolBar, m_document ); // m_searchWidget = new SearchWidget( m_searchToolBar, m_document );
@ -165,7 +165,7 @@ Part::Part(TQWidget *tqparentWidget, const char *widgetName,
// m_searchToolBar->setStretchableWidget( m_searchWidget ); // m_searchToolBar->setStretchableWidget( m_searchWidget );
// widgets: [] splitter [] // widgets: [] splitter []
m_splitter = new TQSplitter( tqparentWidget, widgetName ); m_splitter = new TQSplitter( parentWidget, widgetName );
m_splitter->setOpaqueResize( true ); m_splitter->setOpaqueResize( true );
setWidget( m_splitter ); setWidget( m_splitter );

@ -63,7 +63,7 @@ Q_OBJECT
public: public:
// Default constructor // Default constructor
Part(TQWidget* tqparentWidget, const char* widgetName, Part(TQWidget* parentWidget, const char* widgetName,
TQObject* tqparent, const char* name, const TQStringList& args); TQObject* tqparent, const char* name, const TQStringList& args);
// Destructor // Destructor

@ -428,7 +428,7 @@ void HoverButton::paintEvent( TQPaintEvent * e )
else else
{ {
TQPainter p( this ); TQPainter p( this );
p.fillRect(e->rect(), tqparentWidget() ? tqparentWidget()->tqpalette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor()); p.fillRect(e->rect(), parentWidget() ? parentWidget()->tqpalette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor());
drawButtonLabel( &p ); drawButtonLabel( &p );
} }
} }

@ -173,7 +173,7 @@ void PageViewTip::maybeTip( const TQPoint &_p )
* 160 - constructor and creating actions plus their connected slots (empty stuff) * 160 - constructor and creating actions plus their connected slots (empty stuff)
* 70 - DocumentObserver inherited methodes (important) * 70 - DocumentObserver inherited methodes (important)
* 550 - events: mouse, keyboard, drag/drop * 550 - events: mouse, keyboard, drag/drop
* 170 - slotRetqlayoutPages: set contents of the scrollview on continuous/single modes * 170 - slotRelayoutPages: set contents of the scrollview on continuous/single modes
* 100 - zoom: zooming pages in different ways, keeping update the toolbar actions, etc.. * 100 - zoom: zooming pages in different ways, keeping update the toolbar actions, etc..
* other misc functions: only slotRequestVisiblePixmaps and pickItemOnPoint noticeable, * other misc functions: only slotRequestVisiblePixmaps and pickItemOnPoint noticeable,
* and many insignificant stuff like this comment :-) * and many insignificant stuff like this comment :-)
@ -343,12 +343,12 @@ void PageView::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool do
d->items.push_back( new PageViewItem( *setIt ) ); d->items.push_back( new PageViewItem( *setIt ) );
if ( pageSet.count() > 0 ) if ( pageSet.count() > 0 )
// TODO for Enrico: Check if doing always the slotRetqlayoutPages() is not // TODO for Enrico: Check if doing always the slotRelayoutPages() is not
// suboptimal in some cases, i'd say it is not but a recheck will not hurt // suboptimal in some cases, i'd say it is not but a recheck will not hurt
// Need slotRetqlayoutPages() here instead of d->dirtyLayout = true // Need slotRelayoutPages() here instead of d->dirtyLayout = true
// because opening a pdf from another pdf will not trigger a viewportchange // because opening a pdf from another pdf will not trigger a viewportchange
// so pages are never retqlayouted // so pages are never relayouted
TQTimer::singleShot(0, this, TQT_SLOT(slotRetqlayoutPages())); TQTimer::singleShot(0, this, TQT_SLOT(slotRelayoutPages()));
else else
{ {
// update the mouse cursor when closing because we may have close through a link and // update the mouse cursor when closing because we may have close through a link and
@ -395,7 +395,7 @@ void PageView::notifyViewportChanged( bool smoothMove )
// retqlayout in "Single Pages" mode or if a retqlayout is pending // retqlayout in "Single Pages" mode or if a retqlayout is pending
d->blockPixmapsRequest = true; d->blockPixmapsRequest = true;
if ( !KpdfSettings::viewContinuous() || d->dirtyLayout ) if ( !KpdfSettings::viewContinuous() || d->dirtyLayout )
slotRetqlayoutPages(); slotRelayoutPages();
// restore viewport center or use default {x-center,v-top} tqalignment // restore viewport center or use default {x-center,v-top} tqalignment
const TQRect & r = item->tqgeometry(); const TQRect & r = item->tqgeometry();
@ -637,7 +637,7 @@ void PageView::viewportResizeEvent( TQResizeEvent * )
if ( !d->delayResizeTimer ) if ( !d->delayResizeTimer )
{ {
d->delayResizeTimer = new TQTimer( this ); d->delayResizeTimer = new TQTimer( this );
connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRetqlayoutPages() ) ); connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRelayoutPages() ) );
} }
d->delayResizeTimer->start( 333, true ); d->delayResizeTimer->start( 333, true );
} }
@ -1550,7 +1550,7 @@ void PageView::updateZoom( ZoomMode newZoomMode )
// be sure to block updates to document's viewport // be sure to block updates to document's viewport
bool prevState = d->blockViewport; bool prevState = d->blockViewport;
d->blockViewport = true; d->blockViewport = true;
slotRetqlayoutPages(); slotRelayoutPages();
d->blockViewport = prevState; d->blockViewport = prevState;
// request pixmaps // request pixmaps
slotRequestVisiblePixmaps(); slotRequestVisiblePixmaps();
@ -1649,7 +1649,7 @@ void PageView::doTypeAheadSearch()
} }
//BEGIN private SLOTS //BEGIN private SLOTS
void PageView::slotRetqlayoutPages() void PageView::slotRelayoutPages()
// called by: notifySetup, viewportResizeEvent, slotTwoPagesToggled, slotContinuousToggled, updateZoom // called by: notifySetup, viewportResizeEvent, slotTwoPagesToggled, slotContinuousToggled, updateZoom
{ {
// set an empty container if we have no pages // set an empty container if we have no pages
@ -2070,7 +2070,7 @@ void PageView::slotRotateRight()
// be sure to block updates to document's viewport // be sure to block updates to document's viewport
bool prevState = d->blockViewport; bool prevState = d->blockViewport;
d->blockViewport = true; d->blockViewport = true;
slotRetqlayoutPages(); slotRelayoutPages();
d->blockViewport = prevState; d->blockViewport = prevState;
// request pixmaps // request pixmaps
slotRequestVisiblePixmaps(); slotRequestVisiblePixmaps();
@ -2094,7 +2094,7 @@ void PageView::slotRotateLeft()
// be sure to block updates to document's viewport // be sure to block updates to document's viewport
bool prevState = d->blockViewport; bool prevState = d->blockViewport;
d->blockViewport = true; d->blockViewport = true;
slotRetqlayoutPages(); slotRelayoutPages();
d->blockViewport = prevState; d->blockViewport = prevState;
// request pixmaps // request pixmaps
slotRequestVisiblePixmaps(); slotRequestVisiblePixmaps();
@ -2108,7 +2108,7 @@ void PageView::slotTwoPagesToggled( bool on )
KpdfSettings::setViewColumns( newColumns ); KpdfSettings::setViewColumns( newColumns );
KpdfSettings::writeConfig(); KpdfSettings::writeConfig();
if ( d->document->pages() > 0 ) if ( d->document->pages() > 0 )
slotRetqlayoutPages(); slotRelayoutPages();
} }
} }
@ -2119,7 +2119,7 @@ void PageView::slotContinuousToggled( bool on )
KpdfSettings::setViewContinuous( on ); KpdfSettings::setViewContinuous( on );
KpdfSettings::writeConfig(); KpdfSettings::writeConfig();
if ( d->document->pages() > 0 ) if ( d->document->pages() > 0 )
slotRetqlayoutPages(); slotRelayoutPages();
} }
} }

@ -101,7 +101,7 @@ class PageView : public TQScrollView, public DocumentObserver
void selectionStart( int x, int y, const TQColor & color, bool aboveAll = false ); void selectionStart( int x, int y, const TQColor & color, bool aboveAll = false );
void selectionEndPoint( int x, int y ); void selectionEndPoint( int x, int y );
void selectionClear(); void selectionClear();
// update internal zoom values and end in a slotRetqlayoutPages(); // update internal zoom values and end in a slotRelayoutPages();
void updateZoom( ZoomMode newZm ); void updateZoom( ZoomMode newZm );
// update the text on the label using global zoom value or current page's one // update the text on the label using global zoom value or current page's one
void updateZoomText(); void updateZoomText();
@ -115,7 +115,7 @@ class PageView : public TQScrollView, public DocumentObserver
private slots: private slots:
// activated either directly or via TQTimer on the viewportResizeEvent // activated either directly or via TQTimer on the viewportResizeEvent
void slotRetqlayoutPages(); void slotRelayoutPages();
// activated either directly or via the contentsMoving(int,int) signal // activated either directly or via the contentsMoving(int,int) signal
void slotRequestVisiblePixmaps( int left = -1, int top = -1 ); void slotRequestVisiblePixmaps( int left = -1, int top = -1 );
// activated by the viewport move timer // activated by the viewport move timer

@ -93,10 +93,10 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration
resize( tqgeometry.size() ); resize( tqgeometry.size() );
// create and set transparency tqmask // create and set transparency tqmask
TQPainter tqmaskPainter( &tqmask); TQPainter maskPainter( &tqmask);
tqmask.fill( TQt::black ); tqmask.fill( TQt::black );
tqmaskPainter.setBrush( TQt::white ); maskPainter.setBrush( TQt::white );
tqmaskPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); maskPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() );
setMask( tqmask ); setMask( tqmask );
// draw background // draw background
@ -119,7 +119,7 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration
// if the tqlayout is RtL, we can move it to the right place only after we // if the tqlayout is RtL, we can move it to the right place only after we
// know how much size it will take // know how much size it will take
if ( TQApplication::reverseLayout() ) if ( TQApplication::reverseLayout() )
move( tqparentWidget()->width() - tqgeometry.width() - 10, 10 ); move( parentWidget()->width() - tqgeometry.width() - 10, 10 );
// show widget and schedule a tqrepaint // show widget and schedule a tqrepaint
show(); show();

@ -104,21 +104,21 @@ void TOC::notifySetup( const TQValueVector< KPDFPage * > & /*pages*/, bool docum
emit hasTOC( true ); emit hasTOC( true );
} }
void TOC::addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem ) void TOC::addChildren( const TQDomNode & parentNode, KListViewItem * parentItem )
{ {
// keep track of the current listViewItem // keep track of the current listViewItem
TOCItem * currentItem = 0; TOCItem * currentItem = 0;
TQDomNode n = tqparentNode.firstChild(); TQDomNode n = parentNode.firstChild();
while( !n.isNull() ) while( !n.isNull() )
{ {
// convert the node to an element (sure it is) // convert the node to an element (sure it is)
TQDomElement e = n.toElement(); TQDomElement e = n.toElement();
// insert the entry as top level (listview tqparented) or 2nd+ level // insert the entry as top level (listview parented) or 2nd+ level
if ( !tqparentItem ) if ( !parentItem )
currentItem = new TOCItem( this, currentItem, e ); currentItem = new TOCItem( this, currentItem, e );
else else
currentItem = new TOCItem( tqparentItem, currentItem, e ); currentItem = new TOCItem( parentItem, currentItem, e );
// descend recursively and advance to the next node // descend recursively and advance to the next node
if ( e.hasChildNodes() ) if ( e.hasChildNodes() )

@ -36,7 +36,7 @@ Q_OBJECT
void slotExecuted(TQListViewItem *i); void slotExecuted(TQListViewItem *i);
private: private:
void addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem = 0 ); void addChildren( const TQDomNode & parentNode, KListViewItem * parentItem = 0 );
DocumentViewport getViewport( const TQDomElement &e ) const; DocumentViewport getViewport( const TQDomElement &e ) const;
KPDFDocument *m_document; KPDFDocument *m_document;
}; };

@ -627,7 +627,7 @@ void PMDockWidget::show()
void PMDockWidget::setDockWindowType (NET::WindowType windowType) void PMDockWidget::setDockWindowType (NET::WindowType windowType)
{ {
d->windowType = windowType; d->windowType = windowType;
applyToWidget( tqparentWidget(), TQPoint(0,0) ); applyToWidget( parentWidget(), TQPoint(0,0) );
} }
#endif #endif
@ -636,7 +636,7 @@ void PMDockWidget::setDockWindowTransient (TQWidget *tqparent, bool transientEna
{ {
d->_parent = tqparent; d->_parent = tqparent;
d->transient = transientEnabled; d->transient = transientEnabled;
applyToWidget( tqparentWidget(), TQPoint(0,0) ); applyToWidget( parentWidget(), TQPoint(0,0) );
} }
bool PMDockWidget::event( TQEvent* pevent ) bool PMDockWidget::event( TQEvent* pevent )
@ -663,13 +663,13 @@ bool PMDockWidget::event( TQEvent* pevent )
emit manager->change(); emit manager->change();
break; break;
case TQEvent::CaptionChange: case TQEvent::CaptionChange:
if ( tqparentWidget() ){ if ( parentWidget() ){
if ( tqparent()->inherits("PMDockSplitter") ){ if ( tqparent()->inherits("PMDockSplitter") ){
((PMDockSplitter*)(tqparent()))->updateName(); ((PMDockSplitter*)(tqparent()))->updateName();
} }
if ( tqparentDockTabGroup() ){ if ( parentDockTabGroup() ){
setDockTabName( tqparentDockTabGroup() ); setDockTabName( parentDockTabGroup() );
tqparentDockTabGroup()->setTabLabel( this, tabPageLabel() ); parentDockTabGroup()->setTabLabel( this, tabPageLabel() );
} }
} }
break; break;
@ -715,7 +715,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
succes = false; succes = false;
} }
if ( tqparent() && !tqparent()->inherits("PMDockSplitter") && !tqparentDockTabGroup() ){ if ( tqparent() && !tqparent()->inherits("PMDockSplitter") && !parentDockTabGroup() ){
succes = false; succes = false;
} }
@ -724,7 +724,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
if( target && ( dockPos != PMDockWidget::DockCenter ) if( target && ( dockPos != PMDockWidget::DockCenter )
&& ( dockPos != PMDockWidget::DockNone ) ) && ( dockPos != PMDockWidget::DockNone ) )
{ {
TQWidget* pdt = target->tqparentDockTabGroup( ); TQWidget* pdt = target->parentDockTabGroup( );
if( pdt ) if( pdt )
return manualDock( ( PMDockWidget* ) ( pdt->tqparent( ) ), return manualDock( ( PMDockWidget* ) ( pdt->tqparent( ) ),
dockPos, spliPos, pos, check, tabIndex ); dockPos, spliPos, pos, check, tabIndex );
@ -759,19 +759,19 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
return this; return this;
} }
PMDockTabGroup* tqparentTab = target->tqparentDockTabGroup(); PMDockTabGroup* parentTab = target->parentDockTabGroup();
if ( tqparentTab ){ if ( parentTab ){
// add to existing TabGroup // add to existing TabGroup
applyToWidget( tqparentTab ); applyToWidget( parentTab );
tqparentTab->insertTab( this, icon() ? *icon() : TQPixmap(), parentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex ); tabPageLabel(), tabIndex );
setDockTabName( tqparentTab ); setDockTabName( parentTab );
if( !toolTipStr.isEmpty()) if( !toolTipStr.isEmpty())
tqparentTab->setTabToolTip( this, toolTipStr); parentTab->setTabToolTip( this, toolTipStr);
currentDockPos = PMDockWidget::DockCenter; currentDockPos = PMDockWidget::DockCenter;
emit manager->change(); emit manager->change();
return (PMDockWidget*)tqparentTab->tqparent(); return (PMDockWidget*)parentTab->tqparent();
} }
// MODIFICATION (Zehender): // MODIFICATION (Zehender):
@ -792,7 +792,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
{ {
PMDockWidget* dw = ( PMDockWidget* ) wtarget; PMDockWidget* dw = ( PMDockWidget* ) wtarget;
newTarget = dw; newTarget = dw;
TQWidget* pw = wtarget->tqparentWidget( ); TQWidget* pw = wtarget->parentWidget( );
if( pw ) if( pw )
{ {
if( pw->inherits( "PMDockSplitter" ) ) if( pw->inherits( "PMDockSplitter" ) )
@ -803,7 +803,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
} }
} }
} }
wtarget = wtarget->tqparentWidget( ); wtarget = wtarget->parentWidget( );
} }
if( newTarget != target ) if( newTarget != target )
@ -813,8 +813,8 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
// END MODIFICATION // END MODIFICATION
// create a new dockwidget that will contain the target and this // create a new dockwidget that will contain the target and this
TQWidget* tqparentDock = target->tqparentWidget(); TQWidget* parentDock = target->parentWidget();
PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(TQString("")), tqparentDock ); PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(TQString("")), parentDock );
newDock->currentDockPos = target->currentDockPos; newDock->currentDockPos = target->currentDockPos;
if ( dockPos == PMDockWidget::DockCenter ){ if ( dockPos == PMDockWidget::DockCenter ){
@ -824,9 +824,9 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
} }
newDock->eDocking = (target->eDocking & eDocking) & (~(int)PMDockWidget::DockCenter); newDock->eDocking = (target->eDocking & eDocking) & (~(int)PMDockWidget::DockCenter);
newDock->applyToWidget( tqparentDock ); newDock->applyToWidget( parentDock );
if ( !tqparentDock ){ if ( !parentDock ){
// dock to a toplevel dockwidget means newDock is toplevel now // dock to a toplevel dockwidget means newDock is toplevel now
newDock->move( target->frameGeometry().topLeft() ); newDock->move( target->frameGeometry().topLeft() );
newDock->resize( target->tqgeometry().size() ); newDock->resize( target->tqgeometry().size() );
@ -909,9 +909,9 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
panner->show(); panner->show();
} }
if ( tqparentDock ){ if ( parentDock ){
if ( tqparentDock->inherits("PMDockSplitter") ){ if ( parentDock->inherits("PMDockSplitter") ){
PMDockSplitter* sp = (PMDockSplitter*)tqparentDock; PMDockSplitter* sp = (PMDockSplitter*)parentDock;
sp->deactivate(); sp->deactivate();
if ( sp->getFirst() == target ) if ( sp->getFirst() == target )
sp->activate( newDock, 0L ); sp->activate( newDock, 0L );
@ -928,10 +928,10 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
return newDock; return newDock;
} }
PMDockTabGroup* PMDockWidget::tqparentDockTabGroup() const PMDockTabGroup* PMDockWidget::parentDockTabGroup() const
{ {
if ( !tqparent() ) return 0L; if ( !tqparent() ) return 0L;
TQWidget* candidate = tqparentWidget()->tqparentWidget(); TQWidget* candidate = parentWidget()->parentWidget();
if ( candidate && candidate->inherits("PMDockTabGroup") ) return (PMDockTabGroup*)candidate; if ( candidate && candidate->inherits("PMDockTabGroup") ) return (PMDockTabGroup*)candidate;
return 0L; return 0L;
} }
@ -948,8 +948,8 @@ void PMDockWidget::toDesktop()
void PMDockWidget::undock() void PMDockWidget::undock()
{ {
TQWidget* tqparentW = tqparentWidget(); TQWidget* parentW = parentWidget();
if ( !tqparentW ){ if ( !parentW ){
hide(); hide();
if (!d->blockHasUndockedSignal) if (!d->blockHasUndockedSignal)
emit hasUndocked(); emit hasUndocked();
@ -962,73 +962,73 @@ void PMDockWidget::undock()
manager->blockSignals(true); manager->blockSignals(true);
manager->undockProcess = true; manager->undockProcess = true;
bool isV = tqparentW->isVisibleToTLW(); bool isV = parentW->isVisibleToTLW();
PMDockTabGroup* tqparentTab = tqparentDockTabGroup(); PMDockTabGroup* parentTab = parentDockTabGroup();
if ( tqparentTab ){ if ( parentTab ){
d->index = tqparentTab->indexOf( this); // memorize the page position in the tab widget d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
tqparentTab->removePage( this ); parentTab->removePage( this );
formerBrotherDockWidget = (PMDockWidget*)tqparentTab->page(0); formerBrotherDockWidget = (PMDockWidget*)parentTab->page(0);
TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
this, TQT_SLOT(loseFormerBrotherDockWidget()) ); this, TQT_SLOT(loseFormerBrotherDockWidget()) );
applyToWidget( 0L ); applyToWidget( 0L );
if ( tqparentTab->count() == 1 ){ if ( parentTab->count() == 1 ){
// last subdock widget in the tab control // last subdock widget in the tab control
PMDockWidget* lastTab = (PMDockWidget*)tqparentTab->page(0); PMDockWidget* lastTab = (PMDockWidget*)parentTab->page(0);
tqparentTab->removePage( lastTab ); parentTab->removePage( lastTab );
lastTab->applyToWidget( 0L ); lastTab->applyToWidget( 0L );
lastTab->move( tqparentTab->mapToGlobal(tqparentTab->frameGeometry().topLeft()) ); lastTab->move( parentTab->mapToGlobal(parentTab->frameGeometry().topLeft()) );
// PMDockTabGroup always have a tqparent that is a PMDockWidget // PMDockTabGroup always have a tqparent that is a PMDockWidget
PMDockWidget* tqparentOfTab = (PMDockWidget*)tqparentTab->tqparent(); PMDockWidget* parentOfTab = (PMDockWidget*)parentTab->tqparent();
delete tqparentTab; // PMDockTabGroup delete parentTab; // PMDockTabGroup
TQWidget* tqparentOfDockWidget = tqparentOfTab->tqparentWidget(); TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
if ( tqparentOfDockWidget == 0L ){ if ( parentOfDockWidget == 0L ){
if ( isV ) lastTab->show(); if ( isV ) lastTab->show();
} else { } else {
if ( tqparentOfDockWidget->inherits("PMDockSplitter") ){ if ( parentOfDockWidget->inherits("PMDockSplitter") ){
PMDockSplitter* split = (PMDockSplitter*)tqparentOfDockWidget; PMDockSplitter* split = (PMDockSplitter*)parentOfDockWidget;
lastTab->applyToWidget( split ); lastTab->applyToWidget( split );
split->deactivate(); split->deactivate();
if ( split->getFirst() == tqparentOfTab ){ if ( split->getFirst() == parentOfTab ){
split->activate( lastTab ); split->activate( lastTab );
if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical ) if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockLeft ); emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockLeft );
else else
emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockTop ); emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockTop );
} else { } else {
split->activate( 0L, lastTab ); split->activate( 0L, lastTab );
if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical ) if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockRight ); emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockRight );
else else
emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockBottom ); emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockBottom );
} }
split->show(); split->show();
} else { } else {
lastTab->applyToWidget( tqparentOfDockWidget ); lastTab->applyToWidget( parentOfDockWidget );
} }
lastTab->show(); lastTab->show();
} }
manager->blockSignals(false); manager->blockSignals(false);
emit manager->replaceDock( tqparentOfTab, lastTab ); emit manager->replaceDock( parentOfTab, lastTab );
lastTab->currentDockPos = tqparentOfTab->currentDockPos; lastTab->currentDockPos = parentOfTab->currentDockPos;
emit tqparentOfTab->iMBeingClosed(); emit parentOfTab->iMBeingClosed();
manager->blockSignals(true); manager->blockSignals(true);
delete tqparentOfTab; delete parentOfTab;
} else { } else {
setDockTabName( tqparentTab ); setDockTabName( parentTab );
} }
} else { } else {
/*********************************************************************************************/ /*********************************************************************************************/
if ( tqparentW->inherits("PMDockSplitter") ){ if ( parentW->inherits("PMDockSplitter") ){
PMDockSplitter* tqparentSplitterOfDockWidget = (PMDockSplitter*)tqparentW; PMDockSplitter* parentSplitterOfDockWidget = (PMDockSplitter*)parentW;
d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos(); d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
PMDockWidget* secondWidget = (PMDockWidget*)tqparentSplitterOfDockWidget->getAnother( this ); PMDockWidget* secondWidget = (PMDockWidget*)parentSplitterOfDockWidget->getAnother( this );
PMDockWidget* group = (PMDockWidget*)tqparentSplitterOfDockWidget->tqparentWidget(); PMDockWidget* group = (PMDockWidget*)parentSplitterOfDockWidget->parentWidget();
formerBrotherDockWidget = secondWidget; formerBrotherDockWidget = secondWidget;
applyToWidget( 0L ); applyToWidget( 0L );
group->hide(); group->hide();
@ -1037,25 +1037,25 @@ void PMDockWidget::undock()
TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
this, TQT_SLOT(loseFormerBrotherDockWidget()) ); this, TQT_SLOT(loseFormerBrotherDockWidget()) );
if ( !group->tqparentWidget() ){ if ( !group->parentWidget() ){
secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() ); secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
secondWidget->resize( group->width(), group->height() ); secondWidget->resize( group->width(), group->height() );
} else { } else {
TQWidget* obj = group->tqparentWidget(); TQWidget* obj = group->parentWidget();
secondWidget->applyToWidget( obj ); secondWidget->applyToWidget( obj );
if ( obj->inherits("PMDockSplitter") ){ if ( obj->inherits("PMDockSplitter") ){
PMDockSplitter* tqparentOfGroup = (PMDockSplitter*)obj; PMDockSplitter* parentOfGroup = (PMDockSplitter*)obj;
tqparentOfGroup->deactivate(); parentOfGroup->deactivate();
if ( tqparentOfGroup->getFirst() == group ) if ( parentOfGroup->getFirst() == group )
tqparentOfGroup->activate( secondWidget ); parentOfGroup->activate( secondWidget );
else else
tqparentOfGroup->activate( 0L, secondWidget ); parentOfGroup->activate( 0L, secondWidget );
} }
} }
secondWidget->currentDockPos = group->currentDockPos; secondWidget->currentDockPos = group->currentDockPos;
secondWidget->formerDockPos = group->formerDockPos; secondWidget->formerDockPos = group->formerDockPos;
delete tqparentSplitterOfDockWidget; delete parentSplitterOfDockWidget;
manager->blockSignals(false); manager->blockSignals(false);
emit manager->replaceDock( group, secondWidget ); emit manager->replaceDock( group, secondWidget );
emit group->iMBeingClosed(); emit group->iMBeingClosed();
@ -1107,13 +1107,13 @@ void PMDockWidget::setDockTabName( PMDockTabGroup* tab )
listOfCaption.remove( listOfCaption.length()-1, 1 ); listOfCaption.remove( listOfCaption.length()-1, 1 );
listOfName.remove( listOfName.length()-1, 1 ); listOfName.remove( listOfName.length()-1, 1 );
tab->tqparentWidget()->setName( listOfName.utf8() ); tab->parentWidget()->setName( listOfName.utf8() );
tab->tqparentWidget()->setCaption( listOfCaption ); tab->parentWidget()->setCaption( listOfCaption );
tab->tqparentWidget()->tqrepaint( false ); // PMDockWidget->tqrepaint tab->parentWidget()->tqrepaint( false ); // PMDockWidget->tqrepaint
if ( tab->tqparentWidget()->tqparent() ) if ( tab->parentWidget()->tqparent() )
if ( tab->tqparentWidget()->tqparent()->inherits("PMDockSplitter") ) if ( tab->parentWidget()->tqparent()->inherits("PMDockSplitter") )
((PMDockSplitter*)(tab->tqparentWidget()->tqparent()))->updateName(); ((PMDockSplitter*)(tab->parentWidget()->tqparent()))->updateName();
} }
bool PMDockWidget::mayBeHide() const bool PMDockWidget::mayBeHide() const
@ -1146,16 +1146,16 @@ void PMDockWidget::changeHideShowState()
void PMDockWidget::makeDockVisible() void PMDockWidget::makeDockVisible()
{ {
if ( tqparentDockTabGroup() ){ if ( parentDockTabGroup() ){
tqparentDockTabGroup()->showPage( this ); parentDockTabGroup()->showPage( this );
} }
if ( isVisible() ) return; if ( isVisible() ) return;
TQWidget* p = tqparentWidget(); TQWidget* p = parentWidget();
while ( p ){ while ( p ){
if ( !p->isVisible() ) if ( !p->isVisible() )
p->show(); p->show();
p = p->tqparentWidget(); p = p->parentWidget();
} }
if( tqparent() == 0L) // is undocked if( tqparent() == 0L) // is undocked
dockBack(); dockBack();
@ -1306,7 +1306,7 @@ void PMDockManager::activate()
while ( (obj=(PMDockWidget*)it.current()) ) { while ( (obj=(PMDockWidget*)it.current()) ) {
++it; ++it;
if ( obj->widget ) obj->widget->show(); if ( obj->widget ) obj->widget->show();
if ( !obj->tqparentDockTabGroup() ){ if ( !obj->parentDockTabGroup() ){
obj->show(); obj->show();
} }
} }
@ -1468,7 +1468,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos )
if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockTabGroup", "_dock_tab" ) ) return 0L; if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockTabGroup", "_dock_tab" ) ) return 0L;
if (!childDockWidgetList) return 0L; if (!childDockWidgetList) return 0L;
if ( childDockWidgetList->tqfind(w) != -1 ) return 0L; if ( childDockWidgetList->tqfind(w) != -1 ) return 0L;
if ( currentDragWidget->isGroup && ((PMDockWidget*)w)->tqparentDockTabGroup() ) return 0L; if ( currentDragWidget->isGroup && ((PMDockWidget*)w)->parentDockTabGroup() ) return 0L;
PMDockWidget* www = (PMDockWidget*)w; PMDockWidget* www = (PMDockWidget*)w;
if ( www->dockSite( ) == (int)PMDockWidget::DockNone ) return 0L; if ( www->dockSite( ) == (int)PMDockWidget::DockNone ) return 0L;
@ -1559,9 +1559,9 @@ void PMDockManager::startDrag( PMDockWidget* w )
|| ( w->currentDockPos == PMDockWidget::DockTop) || ( w->currentDockPos == PMDockWidget::DockBottom)) { || ( w->currentDockPos == PMDockWidget::DockTop) || ( w->currentDockPos == PMDockWidget::DockBottom)) {
w->prevSideDockPosBeforeDrag = w->currentDockPos; w->prevSideDockPosBeforeDrag = w->currentDockPos;
if ( w->tqparentWidget()->inherits("PMDockSplitter") ){ if ( w->parentWidget()->inherits("PMDockSplitter") ){
PMDockSplitter* tqparentSplitterOfDockWidget = (PMDockSplitter*)(w->tqparentWidget()); PMDockSplitter* parentSplitterOfDockWidget = (PMDockSplitter*)(w->parentWidget());
w->d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos(); w->d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
} }
} }
@ -1577,7 +1577,7 @@ void PMDockManager::dragMove( PMDockWidget* dw, TQPoint pos )
PMDockWidget::DockPosition oldPos = curPos; PMDockWidget::DockPosition oldPos = curPos;
TQSize r = dw->widget->size(); TQSize r = dw->widget->size();
if ( dw->tqparentDockTabGroup() ){ if ( dw->parentDockTabGroup() ){
curPos = PMDockWidget::DockCenter; curPos = PMDockWidget::DockCenter;
if ( oldPos != curPos ) { if ( oldPos != curPos ) {
d->dragRect.setRect( p.x()+2, p.y()+2, r.width()-4, r.height()-4 ); d->dragRect.setRect( p.x()+2, p.y()+2, r.width()-4, r.height()-4 );

@ -614,7 +614,7 @@ public:
/** /**
* @return the tqparent widget of this if it inherits class PMDockTabGroup * @return the tqparent widget of this if it inherits class PMDockTabGroup
*/ */
PMDockTabGroup* tqparentDockTabGroup() const; PMDockTabGroup* parentDockTabGroup() const;
#ifndef NO_KDE2 #ifndef NO_KDE2
@ -855,7 +855,7 @@ public:
#ifndef NO_KDE2 #ifndef NO_KDE2
/** /**
* Saves the current state of the dockmanager and of all controlled widgets. * Saves the current state of the dockmanager and of all controlled widgets.
* State means here to save the tqgeometry, visibility, tqparents, internal object names, orientation, * State means here to save the tqgeometry, visibility, parents, internal object names, orientation,
* separator positions, dockwidget-group information, tab widget states (if it is a tab group) and * separator positions, dockwidget-group information, tab widget states (if it is a tab group) and
* last but not least some necessary things for recovering the dockmainwindow state. * last but not least some necessary things for recovering the dockmainwindow state.
* *

@ -238,15 +238,15 @@ void PMDockSplitter::updateName()
if ( !initialised ) return; if ( !initialised ) return;
TQString new_name = TQString( child0->name() ) + "," + child1->name(); TQString new_name = TQString( child0->name() ) + "," + child1->name();
tqparentWidget()->setName( new_name.latin1() ); parentWidget()->setName( new_name.latin1() );
tqparentWidget()->setCaption( child0->caption() + "," + child1->caption() ); parentWidget()->setCaption( child0->caption() + "," + child1->caption() );
tqparentWidget()->tqrepaint( false ); parentWidget()->tqrepaint( false );
((PMDockWidget*)tqparentWidget())->firstName = child0->name(); ((PMDockWidget*)parentWidget())->firstName = child0->name();
((PMDockWidget*)tqparentWidget())->lastName = child1->name(); ((PMDockWidget*)parentWidget())->lastName = child1->name();
((PMDockWidget*)tqparentWidget())->splitterOrientation = orientation; ((PMDockWidget*)parentWidget())->splitterOrientation = orientation;
TQWidget* p = tqparentWidget()->tqparentWidget(); TQWidget* p = parentWidget()->parentWidget();
if ( p != 0L && p->inherits("PMDockSplitter" ) ) if ( p != 0L && p->inherits("PMDockSplitter" ) )
((PMDockSplitter*)p)->updateName(); ((PMDockSplitter*)p)->updateName();
} }

@ -54,7 +54,7 @@ PMFactory::~PMFactory( )
s_aboutData = 0L; s_aboutData = 0L;
} }
KParts::Part* PMFactory::createPartObject( TQWidget* tqparentWidget, KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget,
const char* widgetName, const char* widgetName,
TQObject* tqparent, const char* name, TQObject* tqparent, const char* name,
const char* classname, const char* classname,
@ -65,7 +65,7 @@ KParts::Part* PMFactory::createPartObject( TQWidget* tqparentWidget,
bool readwrite = !( ( strcmp( classname, "Browser/View" ) == 0 ) bool readwrite = !( ( strcmp( classname, "Browser/View" ) == 0 )
|| ( strcmp( classname, "KParts::ReadOnlyPart" ) == 0 ) ); || ( strcmp( classname, "KParts::ReadOnlyPart" ) == 0 ) );
KParts::ReadWritePart *part = new PMPart( tqparentWidget, widgetName, KParts::ReadWritePart *part = new PMPart( parentWidget, widgetName,
tqparent, name, readwrite ); tqparent, name, readwrite );
return part; return part;

@ -33,7 +33,7 @@ public:
PMFactory( ); PMFactory( );
virtual ~PMFactory( ); virtual ~PMFactory( );
virtual KParts::Part* createPartObject( TQWidget* tqparentWidget, virtual KParts::Part* createPartObject( TQWidget* parentWidget,
const char* widgetName, const char* widgetName,
TQObject* tqparent, const char* name, TQObject* tqparent, const char* name,
const char* classname, const char* classname,

@ -312,7 +312,7 @@ void PMGLView::initializeGL( )
Window p; Window p;
p = RootWindow( display, vi->screen ); p = RootWindow( display, vi->screen );
TQWidget* pw = tqparentWidget( ); TQWidget* pw = parentWidget( );
if( pw ) if( pw )
p = pw->winId( ); p = pw->winId( );
@ -406,7 +406,7 @@ void PMGLView::setScale( double scale )
if( m_dScale > 0 ) if( m_dScale > 0 )
{ {
m_dScale = scale; m_dScale = scale;
tqinvalidateProjection( ); invalidateProjection( );
} }
else else
kdError( PMArea ) << "Scale <= 0 in PMGLView::setScale\n"; kdError( PMArea ) << "Scale <= 0 in PMGLView::setScale\n";
@ -415,18 +415,18 @@ void PMGLView::setScale( double scale )
void PMGLView::setTranslationX( double d ) void PMGLView::setTranslationX( double d )
{ {
m_dTransX = d; m_dTransX = d;
tqinvalidateProjection( ); invalidateProjection( );
} }
void PMGLView::setTranslationY( double d ) void PMGLView::setTranslationY( double d )
{ {
m_dTransY = d; m_dTransY = d;
tqinvalidateProjection( ); invalidateProjection( );
} }
void PMGLView::resizeEvent( TQResizeEvent* ) void PMGLView::resizeEvent( TQResizeEvent* )
{ {
tqinvalidateProjection( ); invalidateProjection( );
} }
void PMGLView::paintEvent( TQPaintEvent* ) void PMGLView::paintEvent( TQPaintEvent* )
@ -434,7 +434,7 @@ void PMGLView::paintEvent( TQPaintEvent* )
tqrepaint( ); tqrepaint( );
} }
void PMGLView::tqinvalidateProjection( bool graphicalChange /*= true*/ ) void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ )
{ {
m_viewTransformation = PMMatrix::identity( ); m_viewTransformation = PMMatrix::identity( );
@ -698,14 +698,14 @@ void PMGLView::mouseMoveEvent( TQMouseEvent* e )
m_dTransX += m_scaleIntX * c; m_dTransX += m_scaleIntX * c;
m_dTransY += m_scaleIntY * c; m_dTransY += m_scaleIntY * c;
m_dScale *= s; m_dScale *= s;
tqinvalidateProjection( ); invalidateProjection( );
} }
} }
else if( m_bTranslateMode ) else if( m_bTranslateMode )
{ {
m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale; m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale;
m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale; m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale;
tqinvalidateProjection( ); invalidateProjection( );
} }
m_mousePos = e->pos( ); m_mousePos = e->pos( );
} }
@ -713,7 +713,7 @@ void PMGLView::mouseMoveEvent( TQMouseEvent* e )
{ {
m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale; m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale;
m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale; m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale;
tqinvalidateProjection( ); invalidateProjection( );
m_mousePos = e->pos( ); m_mousePos = e->pos( );
} }
@ -799,7 +799,7 @@ void PMGLView::wheelEvent( TQWheelEvent* e )
m_dTransX += deltaX * c; m_dTransX += deltaX * c;
m_dTransY += deltaY * c; m_dTransY += deltaY * c;
m_dScale *= s; m_dScale *= s;
tqinvalidateProjection( ); invalidateProjection( );
} }
} }
@ -858,7 +858,7 @@ void PMGLView::keyPressEvent( TQKeyEvent* e )
accept = false; accept = false;
if( accept ) if( accept )
tqinvalidateProjection( ); invalidateProjection( );
else else
e->ignore( ); e->ignore( );
} }
@ -885,7 +885,7 @@ void PMGLView::slotAutoScroll( )
m_dTransX += pixels * m_autoScrollDirectionX / m_dScale; m_dTransX += pixels * m_autoScrollDirectionX / m_dScale;
m_dTransY -= pixels * m_autoScrollDirectionY / m_dScale; m_dTransY -= pixels * m_autoScrollDirectionY / m_dScale;
tqinvalidateProjection( ); invalidateProjection( );
if( m_bGraphicalChangeMode ) if( m_bGraphicalChangeMode )
if( m_bMultipleSelectionMode ) if( m_bMultipleSelectionMode )
@ -1101,7 +1101,7 @@ void PMGLView::setType( PMViewType t )
if( m_type != t ) if( m_type != t )
m_viewTransformation = PMMatrix::identity( ); m_viewTransformation = PMMatrix::identity( );
m_type = t; m_type = t;
tqinvalidateProjection( ); invalidateProjection( );
emit viewTypeChanged( viewTypeAsString( t ) ); emit viewTypeChanged( viewTypeAsString( t ) );
} }
@ -1109,7 +1109,7 @@ void PMGLView::setType( PMViewType t )
void PMGLView::setCamera( PMCamera* c ) void PMGLView::setCamera( PMCamera* c )
{ {
m_pCamera = c; m_pCamera = c;
tqinvalidateProjection( ); invalidateProjection( );
} }
void PMGLView::slotRefresh( ) void PMGLView::slotRefresh( )
@ -1135,7 +1135,7 @@ void PMGLView::slotClear( )
void PMGLView::slotActiveRenderModeChanged( ) void PMGLView::slotActiveRenderModeChanged( )
{ {
if( ( m_type == PMViewCamera ) && m_pCamera ) if( ( m_type == PMViewCamera ) && m_pCamera )
tqinvalidateProjection( ); invalidateProjection( );
} }
void PMGLView::slotStopRendering( ) void PMGLView::slotStopRendering( )
@ -1176,13 +1176,13 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode,
{ {
if( obj->type( ) == "Camera" ) if( obj->type( ) == "Camera" )
if( m_pCamera == ( PMCamera* ) obj ) if( m_pCamera == ( PMCamera* ) obj )
tqinvalidateProjection( ); invalidateProjection( );
if( obj->tqparent( ) ) if( obj->tqparent( ) )
if( obj->tqparent( )->type( ) == "Camera" ) if( obj->tqparent( )->type( ) == "Camera" )
if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( m_pCamera == ( PMCamera* ) obj->tqparent( ) )
if( obj->hasTransformationMatrix( ) ) if( obj->hasTransformationMatrix( ) )
tqinvalidateProjection( ); invalidateProjection( );
} }
redraw = true; redraw = true;
@ -1213,7 +1213,7 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode,
if( obj->tqparent( )->type( ) == "Camera" ) if( obj->tqparent( )->type( ) == "Camera" )
if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( m_pCamera == ( PMCamera* ) obj->tqparent( ) )
if( obj->hasTransformationMatrix( ) ) if( obj->hasTransformationMatrix( ) )
tqinvalidateProjection( ); invalidateProjection( );
} }
redraw = true; redraw = true;
} }
@ -1229,7 +1229,7 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode,
if( obj->tqparent( )->type( ) == "Camera" ) if( obj->tqparent( )->type( ) == "Camera" )
if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( m_pCamera == ( PMCamera* ) obj->tqparent( ) )
if( obj->hasTransformationMatrix( ) ) if( obj->hasTransformationMatrix( ) )
tqinvalidateProjection( ); invalidateProjection( );
redraw = true; redraw = true;
} }

@ -353,7 +353,7 @@ private:
/** /**
* Invalidates the projection and repaints the view * Invalidates the projection and repaints the view
*/ */
void tqinvalidateProjection( bool graphicaChange = false ); void invalidateProjection( bool graphicaChange = false );
/** /**
* Starts multiple selection mode * Starts multiple selection mode

@ -897,7 +897,7 @@ void PMInsertRuleSystem::loadRules( const TQString& fileName )
PMRuleClass::s_pPrototypeManager = 0; PMRuleClass::s_pPrototypeManager = 0;
} }
bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, bool PMInsertRuleSystem::canInsert( const PMObject* parentObject,
const TQString& className, const TQString& className,
const PMObject* after, const PMObject* after,
const PMObjectList* objectsBetween ) const PMObjectList* objectsBetween )
@ -905,7 +905,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
bool possible = false; bool possible = false;
// find rules for target class // find rules for target class
PMMetaObject* meta = tqparentObject->tqmetaObject( ); PMMetaObject* meta = parentObject->tqmetaObject( );
for( ; meta && !possible; meta = meta->superClass( ) ) for( ; meta && !possible; meta = meta->superClass( ) )
{ {
PMRuleTargetClass* tc = m_rulesDict.tqfind( meta->className( ) ); PMRuleTargetClass* tc = m_rulesDict.tqfind( meta->className( ) );
@ -917,7 +917,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
TQStringList::ConstIterator it; TQStringList::ConstIterator it;
for( it = exceptions.begin( ); for( it = exceptions.begin( );
it != exceptions.end( ) && !exceptionFound; ++it ) it != exceptions.end( ) && !exceptionFound; ++it )
if( tqparentObject->isA( *it ) ) if( parentObject->isA( *it ) )
exceptionFound = true; exceptionFound = true;
if( !exceptionFound ) if( !exceptionFound )
@ -935,7 +935,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
// count already inserted child objects // count already inserted child objects
bool afterInsertPoint = false; bool afterInsertPoint = false;
PMObject* o = tqparentObject->firstChild( ); PMObject* o = parentObject->firstChild( );
if( !after ) if( !after )
afterInsertPoint = true; afterInsertPoint = true;
for( ; o; o = o->nextSibling( ) ) for( ; o; o = o->nextSibling( ) )
@ -952,7 +952,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
} }
// evaluate condition value // evaluate condition value
possible = rule->evaluate( tqparentObject ); possible = rule->evaluate( parentObject );
} }
} }
} }
@ -962,15 +962,15 @@ bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
return possible; return possible;
} }
bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, bool PMInsertRuleSystem::canInsert( const PMObject* parentObject,
const PMObject* object, const PMObject* object,
const PMObject* after, const PMObject* after,
const PMObjectList* objectsBetween ) const PMObjectList* objectsBetween )
{ {
return canInsert( tqparentObject, object->type( ), after, objectsBetween ); return canInsert( parentObject, object->type( ), after, objectsBetween );
} }
int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
const PMObjectList& list, const PMObjectList& list,
const PMObject* after ) const PMObject* after )
{ {
@ -978,17 +978,17 @@ int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
TQStringList classes; TQStringList classes;
for( ; it.current( ); ++it ) for( ; it.current( ); ++it )
classes.append( it.current( )->type( ) ); classes.append( it.current( )->type( ) );
return canInsert( tqparentObject, classes, after ); return canInsert( parentObject, classes, after );
} }
int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
const TQStringList& list, const TQStringList& list,
const PMObject* after ) const PMObject* after )
{ {
if( list.size( ) == 1 ) if( list.size( ) == 1 )
{ {
// more efficient // more efficient
if( canInsert( tqparentObject, list.first( ), after ) ) if( canInsert( parentObject, list.first( ), after ) )
return 1; return 1;
else else
return 0; return 0;
@ -996,7 +996,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
// find rules for target class // find rules for target class
TQPtrList<PMRuleTargetClass> targetClassList; TQPtrList<PMRuleTargetClass> targetClassList;
PMMetaObject* meta = tqparentObject->tqmetaObject( ); PMMetaObject* meta = parentObject->tqmetaObject( );
for( ; meta; meta = meta->superClass( ) ) for( ; meta; meta = meta->superClass( ) )
{ {
PMRuleTargetClass* tc = m_rulesDict.tqfind( meta->className( ) ); PMRuleTargetClass* tc = m_rulesDict.tqfind( meta->className( ) );
@ -1015,7 +1015,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
{ {
rit.current( )->reset( ); rit.current( )->reset( );
bool afterInsertPoint = false; bool afterInsertPoint = false;
PMObject* o = tqparentObject->firstChild( ); PMObject* o = parentObject->firstChild( );
if( !after ) if( !after )
afterInsertPoint = true; afterInsertPoint = true;
for( ; o; o = o->nextSibling( ) ) for( ; o; o = o->nextSibling( ) )
@ -1041,7 +1041,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject,
{ {
PMRule* rule = rit.current( ); PMRule* rule = rit.current( );
if( rule->matches( *oit ) ) if( rule->matches( *oit ) )
possible = rule->evaluate( tqparentObject ); possible = rule->evaluate( parentObject );
} }
} }
if( possible ) if( possible )

@ -624,7 +624,7 @@ public:
* The parser uses the third parameter for top level objects. These objects * The parser uses the third parameter for top level objects. These objects
* have to be treated as if they are inserted after the object after. * have to be treated as if they are inserted after the object after.
*/ */
bool canInsert( const PMObject* tqparentObject, const TQString& className, bool canInsert( const PMObject* parentObject, const TQString& className,
const PMObject* after, const PMObjectList* objectsBetween = 0 ); const PMObject* after, const PMObjectList* objectsBetween = 0 );
/** /**
@ -634,20 +634,20 @@ public:
* The parser uses the third parameter for top level objects. These objects * The parser uses the third parameter for top level objects. These objects
* have to be treated as if they are inserted after the object after. * have to be treated as if they are inserted after the object after.
* *
* Same as canInsert( tqparentObject, object->class( ), after, objectsBetween ) * Same as canInsert( parentObject, object->class( ), after, objectsBetween )
*/ */
bool canInsert( const PMObject* tqparentObject, const PMObject* object, bool canInsert( const PMObject* parentObject, const PMObject* object,
const PMObject* after, const PMObjectList* objectsBetween = 0 ); const PMObject* after, const PMObjectList* objectsBetween = 0 );
/** /**
* Returns the number of objects that can be inserted at that position * Returns the number of objects that can be inserted at that position
*/ */
int canInsert( const PMObject* tqparentObject, const PMObjectList& list, int canInsert( const PMObject* parentObject, const PMObjectList& list,
const PMObject* after ); const PMObject* after );
/** /**
* Returns the number of objects that can be inserted at that position * Returns the number of objects that can be inserted at that position
*/ */
int canInsert( const PMObject* tqparentObject, const TQStringList& listOfClasses, int canInsert( const PMObject* parentObject, const TQStringList& listOfClasses,
const PMObject* after ); const PMObject* after );
/** /**
* Returns a pointer to the part * Returns a pointer to the part

@ -186,7 +186,7 @@ PMLayoutSettings::PMLayoutSettings( TQWidget* tqparent, const char* name )
void PMLayoutSettings::displaySettings( ) void PMLayoutSettings::displaySettings( )
{ {
PMViewLayoutManager* m = PMViewLayoutManager::theManager( ); PMViewLayoutManager* m = PMViewLayoutManager::theManager( );
m_viewLayouts = m->tqlayouts( ); m_viewLayouts = m->layouts( );
m_currentViewLayout = m_viewLayouts.begin( ); m_currentViewLayout = m_viewLayouts.begin( );
m_defaultViewLayout = m_viewLayouts.begin( ); m_defaultViewLayout = m_viewLayouts.begin( );
for( ; ( m_defaultViewLayout != m_viewLayouts.end( ) ) && for( ; ( m_defaultViewLayout != m_viewLayouts.end( ) ) &&
@ -210,7 +210,7 @@ bool PMLayoutSettings::validateData( )
if( ( *lit ).name( ).isEmpty( ) ) if( ( *lit ).name( ).isEmpty( ) )
{ {
emit showMe( ); emit showMe( );
KMessageBox::error( this, i18n( "View tqlayouts may not have empty names." ), KMessageBox::error( this, i18n( "View layouts may not have empty names." ),
i18n( "Error" ) ); i18n( "Error" ) );
return false; return false;
} }

@ -353,12 +353,12 @@ PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const TQString& sub
return PMLibraryHandle::NotInLib; return PMLibraryHandle::NotInLib;
} }
PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const TQString& tqparentPath ) PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const TQString& parentPath )
{ {
if( m_readOnly ) if( m_readOnly )
return PMLibraryHandle::ReadOnlyLib; return PMLibraryHandle::ReadOnlyLib;
TQString newPath = tqparentPath + "/" + m_path.section( '/', -1 ); TQString newPath = parentPath + "/" + m_path.section( '/', -1 );
PMLibraryHandle::EntryIterator itr( m_libraries ); PMLibraryHandle::EntryIterator itr( m_libraries );
for( ; itr.current( ); ++itr ) for( ; itr.current( ); ++itr )
{ {

@ -181,10 +181,10 @@ public:
/** /**
* Changes the tqparent library if this is a sub library * Changes the tqparent library if this is a sub library
* @param tqparentPath The new tqparent path for this library * @param parentPath The new tqparent path for this library
* @return PMLibraryHandle::Ok if successful or the reason for failure * @return PMLibraryHandle::Ok if successful or the reason for failure
*/ */
PMLibraryHandle::PMResult changeParentLibrary( const TQString& tqparentPath ); PMLibraryHandle::PMResult changeParentLibrary( const TQString& parentPath );
private: private:

@ -220,10 +220,10 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra
TQValueList<bool> subLibList; TQValueList<bool> subLibList;
if( m_isSubLibrary && PMLibraryIconDrag::decode( e, pathList, subLibList ) ) if( m_isSubLibrary && PMLibraryIconDrag::decode( e, pathList, subLibList ) )
{ {
PMLibraryIconView* source = static_cast<PMLibraryIconView*>( e->source( )->tqparentWidget( ) ); PMLibraryIconView* source = static_cast<PMLibraryIconView*>( e->source( )->parentWidget( ) );
PMLibraryHandle* tqparentLib = source->library( ); PMLibraryHandle* parentLib = source->library( );
PMLibraryHandle newParentLib = PMLibraryHandle( m_path ); PMLibraryHandle newParentLib = PMLibraryHandle( m_path );
if ( tqparentLib->isReadOnly() || newParentLib.isReadOnly() ) if ( parentLib->isReadOnly() || newParentLib.isReadOnly() )
{ {
e->ignore(); e->ignore();
return; return;
@ -238,7 +238,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra
if( subLibList[i] ) if( subLibList[i] )
{ {
TQString newpath = newPath( path, true ); TQString newpath = newPath( path, true );
if( tqparentLib->deleteSubLibrary( path ) == PMLibraryHandle::Ok ) if( parentLib->deleteSubLibrary( path ) == PMLibraryHandle::Ok )
{ {
PMLibraryHandle lib = PMLibraryHandle( path ); PMLibraryHandle lib = PMLibraryHandle( path );
if( newParentLib.addSubLibrary( newpath, lib.name() ) == PMLibraryHandle::Ok ) if( newParentLib.addSubLibrary( newpath, lib.name() ) == PMLibraryHandle::Ok )
@ -249,7 +249,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra
else else
{ {
success = false; success = false;
tqparentLib->addSubLibrary( path, lib.name( ) ); parentLib->addSubLibrary( path, lib.name( ) );
} }
} }
else else
@ -258,7 +258,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra
else else
{ {
TQString newpath = newPath( path, false ); TQString newpath = newPath( path, false );
if( tqparentLib->deleteObject( path ) == PMLibraryHandle::Ok ) if( parentLib->deleteObject( path ) == PMLibraryHandle::Ok )
{ {
PMLibraryObject obj = PMLibraryObject( path ); PMLibraryObject obj = PMLibraryObject( path );
if( newParentLib.addObject( newpath, obj.name() ) == PMLibraryHandle::Ok ) if( newParentLib.addObject( newpath, obj.name() ) == PMLibraryHandle::Ok )
@ -268,7 +268,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra
else else
{ {
success = false; success = false;
tqparentLib->addObject( path, obj.name( ) ); parentLib->addObject( path, obj.name( ) );
} }
} }
else else

@ -72,7 +72,7 @@ public:
/** /**
* Refreshes the list of libraries. * Refreshes the list of libraries.
* WARNING: This function tqinvalidates all previously given PMLibraryHandle pointers * WARNING: This function invalidates all previously given PMLibraryHandle pointers
*/ */
void refresh( ); void refresh( );

@ -200,7 +200,7 @@ void PMParser::parse( PMObjectList* list, PMObject* tqparent,
PMObject* obj = tqparent; PMObject* obj = tqparent;
bool stop = false; bool stop = false;
// go to tqparents, until the tqparent is the scene // go to parents, until the tqparent is the scene
// (declares can only be inserted as top level objects) // (declares can only be inserted as top level objects)
do do
{ {

@ -99,7 +99,7 @@ TQTime PMDebugTime;
//#define KPM_WITH_OBJECT_LIBRARY //#define KPM_WITH_OBJECT_LIBRARY
PMPart::PMPart( TQWidget* tqparentWidget, const char* widgetName, PMPart::PMPart( TQWidget* parentWidget, const char* widgetName,
TQObject* tqparent, const char* name, bool readwrite, TQObject* tqparent, const char* name, bool readwrite,
PMShell* shell ) PMShell* shell )
: DCOPObject( "PMPartIface" ), : DCOPObject( "PMPartIface" ),
@ -141,7 +141,7 @@ PMPart::PMPart( TQWidget* tqparentWidget, const char* widgetName,
initActions( ); initActions( );
initDocument( ); initDocument( );
initView( tqparentWidget, widgetName ); initView( parentWidget, widgetName );
restoreConfig( instance( )->config( ) ); restoreConfig( instance( )->config( ) );
@ -161,7 +161,7 @@ PMPart::PMPart( TQWidget* tqparentWidget, const char* widgetName,
slotObjectChanged( m_pScene, PMCNewSelection, this ); slotObjectChanged( m_pScene, PMCNewSelection, this );
} }
PMPart::PMPart( TQWidget* /*tqparentWidget*/, const char* /*widgetName*/, PMPart::PMPart( TQWidget* /*parentWidget*/, const char* /*widgetName*/,
TQObject* tqparent, const char* name, bool readwrite, TQObject* tqparent, const char* name, bool readwrite,
bool /*onlyCutPaste*/, PMShell* shell ) bool /*onlyCutPaste*/, PMShell* shell )
: DCOPObject( "LibraryBrowserIface" ), : DCOPObject( "LibraryBrowserIface" ),

@ -76,7 +76,7 @@ public:
* construtor of PMPart, calls all init functions to create the * construtor of PMPart, calls all init functions to create the
* application. * application.
*/ */
PMPart( TQWidget* tqparentWidget, const char* widgetName, PMPart( TQWidget* parentWidget, const char* widgetName,
TQObject* tqparent, const char* name, bool readWrite, TQObject* tqparent, const char* name, bool readWrite,
PMShell* shell = 0 ); PMShell* shell = 0 );
@ -84,7 +84,7 @@ public:
* construtor of PMPart, calls all init functions to create the * construtor of PMPart, calls all init functions to create the
* application. It does not create the main widget. * application. It does not create the main widget.
*/ */
PMPart( TQWidget* tqparentWidget, const char* widgetName, PMPart( TQWidget* parentWidget, const char* widgetName,
TQObject* tqparent, const char* name, bool readWrite, TQObject* tqparent, const char* name, bool readWrite,
bool onlyCutPaste, PMShell* shell = 0 ); bool onlyCutPaste, PMShell* shell = 0 );

@ -159,7 +159,7 @@ void PMShell::setupActions( )
"view_new_librarybrowser" ); "view_new_librarybrowser" );
#endif #endif
// Creating the view tqlayouts menu // Creating the view layouts menu
m_pViewLayoutsAction = new KActionMenu( i18n( "View Layouts" ), m_pViewLayoutsAction = new KActionMenu( i18n( "View Layouts" ),
actionCollection( ), "view_layouts_menu" ); actionCollection( ), "view_layouts_menu" );
KPopupMenu* menu = m_pViewLayoutsAction->popupMenu( ); KPopupMenu* menu = m_pViewLayoutsAction->popupMenu( );

@ -804,7 +804,7 @@ bool PMTreeView::targetDisplaysPart( TQWidget* target )
// find the tree view // find the tree view
TQWidget* t = target; TQWidget* t = target;
while( t && !t->isA( "PMTreeView" ) ) while( t && !t->isA( "PMTreeView" ) )
t = t->tqparentWidget( ); t = t->parentWidget( );
if( t ) if( t )
if( ( ( PMTreeView* ) t )->part( ) == m_pPart ) if( ( ( PMTreeView* ) t )->part( ) == m_pPart )
result = true; result = true;

@ -61,7 +61,7 @@ public:
PMObject* object( ) const { return m_pObject; } PMObject* object( ) const { return m_pObject; }
/** /**
* Returns a key that can be used for sorting, here the index in the * Returns a key that can be used for sorting, here the index in the
* tqparents list of tqchildren * parents list of tqchildren
*/ */
virtual TQString key( int column, bool ascending ) const; virtual TQString key( int column, bool ascending ) const;
/** /**

@ -663,7 +663,7 @@ void PMViewLayoutManager::loadData( )
m_layoutsLoaded = true; m_layoutsLoaded = true;
TQString fileName = locate( "data", "kpovmodeler/viewtqlayouts.xml" ); TQString fileName = locate( "data", "kpovmodeler/viewlayouts.xml" );
if( fileName.isEmpty( ) ) if( fileName.isEmpty( ) )
{ {
// Generate a default tqlayout // Generate a default tqlayout
@ -710,7 +710,7 @@ void PMViewLayoutManager::loadData( )
TQFile file( fileName ); TQFile file( fileName );
if( !file.open( IO_ReadOnly ) ) if( !file.open( IO_ReadOnly ) )
{ {
kdError( PMArea ) << i18n( "Could not open the view tqlayouts file." ) kdError( PMArea ) << i18n( "Could not open the view layouts file." )
<< endl; << endl;
return; return;
} }
@ -740,16 +740,16 @@ void PMViewLayoutManager::loadData( )
void PMViewLayoutManager::saveData( ) void PMViewLayoutManager::saveData( )
{ {
TQString fileName = locateLocal( "data", "kpovmodeler/viewtqlayouts.xml" ); TQString fileName = locateLocal( "data", "kpovmodeler/viewlayouts.xml" );
if( fileName.isEmpty( ) ) if( fileName.isEmpty( ) )
{ {
kdError( PMArea ) << i18n( "View tqlayouts not found." ) << endl; kdError( PMArea ) << i18n( "View layouts not found." ) << endl;
return; return;
} }
TQFile file( fileName ); TQFile file( fileName );
if( !file.open( IO_WriteOnly ) ) if( !file.open( IO_WriteOnly ) )
{ {
kdError( PMArea ) << i18n( "Could not open the view tqlayouts file." ) kdError( PMArea ) << i18n( "Could not open the view layouts file." )
<< endl; << endl;
return; return;
} }

@ -198,11 +198,11 @@ private:
}; };
/** /**
* Singleton that contains the view tqlayouts available. * Singleton that contains the view layouts available.
* *
* It interacts with @ref PMShell to create the view tqlayouts. * It interacts with @ref PMShell to create the view layouts.
* The class maintains a list of tqlayouts as well as the name of the default * The class maintains a list of layouts as well as the name of the default
* tqlayout. The tqlayouts are stored in a XML file caled viewtqlayouts.xml. * tqlayout. The layouts are stored in a XML file caled viewlayouts.xml.
*/ */
class PMViewLayoutManager class PMViewLayoutManager
{ {
@ -217,7 +217,7 @@ public:
static PMViewLayoutManager* theManager( ); static PMViewLayoutManager* theManager( );
/** /**
* Returns the list of available view tqlayouts * Returns the list of available view layouts
*/ */
TQStringList availableLayouts( ); TQStringList availableLayouts( );
/** /**
@ -237,7 +237,7 @@ public:
*/ */
void displayDefaultLayout( PMShell* shell ); void displayDefaultLayout( PMShell* shell );
/** /**
* Loads all tqlayouts from the configuration file * Loads all layouts from the configuration file
*/ */
void loadData( ); void loadData( );
/** /**
@ -261,15 +261,15 @@ public:
*/ */
PMViewLayout* findLayout( const TQString& name ); PMViewLayout* findLayout( const TQString& name );
/** /**
* Returns the list of available tqlayouts * Returns the list of available layouts
*/ */
TQValueList<PMViewLayout> tqlayouts( ) { return m_layouts; } TQValueList<PMViewLayout> layouts( ) { return m_layouts; }
/** /**
* Sets the list of available tqlayouts * Sets the list of available layouts
*/ */
void setLayouts( const TQValueList<PMViewLayout>& l ) { m_layouts = l; } void setLayouts( const TQValueList<PMViewLayout>& l ) { m_layouts = l; }
/** /**
* Fill the available tqlayouts menu * Fill the available layouts menu
*/ */
void fillPopupMenu( KPopupMenu* pMenu ); void fillPopupMenu( KPopupMenu* pMenu );
private: private:

@ -78,7 +78,7 @@ KLineal::KLineal(TQWidget*tqparent,const char* name):KMainWindow(tqparent,name){
TQWhatsThis::add(this, TQWhatsThis::add(this,
i18n( i18n(
"This is a tool to measure pixel distances and colors on the screen. " "This is a tool to measure pixel distances and colors on the screen. "
"It is useful for working on tqlayouts of dialogs, web pages etc." "It is useful for working on layouts of dialogs, web pages etc."
)); ));
TQBitmap bim = TQBitmap(TQSize(8, 48), cursorBits); TQBitmap bim = TQBitmap(TQSize(8, 48), cursorBits);
TQWMatrix m; TQWMatrix m;

@ -351,8 +351,8 @@ If &lt;i&gt;no delay&lt;/i&gt; is set, the program will wait for a mouse click b
<function specifier="non virtual" returnType="TQPixmap">preview()</function> <function specifier="non virtual" returnType="TQPixmap">preview()</function>
</functions> </functions>
<pixmapfunction>SmallIconSet</pixmapfunction> <pixmapfunction>SmallIconSet</pixmapfunction>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints> <includehints>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>

@ -166,15 +166,15 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
contents += TQRegion( w - border, 0, border, h ); contents += TQRegion( w - border, 0, border, h );
} }
//Get the tqmasked away area. //Get the masked away area.
TQRegion tqmaskedAway = bbox - contents; TQRegion maskedAway = bbox - contents;
TQMemArray<TQRect> tqmaskedAwayRects = tqmaskedAway.tqrects(); TQMemArray<TQRect> maskedAwayRects = maskedAway.tqrects();
//Construct a bitmap tqmask from the rectangles //Construct a bitmap tqmask from the rectangles
TQPainter p(&tqmask); TQPainter p(&tqmask);
p.fillRect(0, 0, w, h, TQt::color1); p.fillRect(0, 0, w, h, TQt::color1);
for (uint pos = 0; pos < tqmaskedAwayRects.count(); pos++) for (uint pos = 0; pos < maskedAwayRects.count(); pos++)
p.fillRect(tqmaskedAwayRects[pos], TQt::color0); p.fillRect(maskedAwayRects[pos], TQt::color0);
p.end(); p.end();
pm.setMask(tqmask); pm.setMask(tqmask);

@ -107,7 +107,7 @@ void CanvasText::handleTSpan(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM,
TQString text = tspan->text(); TQString text = tspan->text();
if(!text.isEmpty()) if(!text.isEmpty())
{ {
T2P::GlyphLayoutParams *params = tspan->tqlayoutParams(); T2P::GlyphLayoutParams *params = tspan->layoutParams();
if(bMultipleX || bMultipleY) if(bMultipleX || bMultipleY)
{ {
@ -265,7 +265,7 @@ KSVGTextChunk *CanvasText::createTextChunk(KSVGCanvas *canvas, const SVGMatrixIm
curx = usex; curx = usex;
cury = usey; cury = usey;
T2P::GlyphLayoutParams *params = tpath->tqlayoutParams(); T2P::GlyphLayoutParams *params = tpath->layoutParams();
if(!params->tb()) if(!params->tb())
curx += endx; curx += endx;
@ -290,7 +290,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
TQMemArray<double> _cury(1); TQMemArray<double> _cury(1);
_cury[0] = double(cury); _cury[0] = double(cury);
T2P::GlyphLayoutParams *params = m_text->tqlayoutParams(); T2P::GlyphLayoutParams *params = m_text->layoutParams();
SVGTextPositioningElementImpl *tp = textChunk->getTextElement(0); SVGTextPositioningElementImpl *tp = textChunk->getTextElement(0);
SVGTextContentElementImpl *tc = textChunk->getTextContentElement(0); SVGTextContentElementImpl *tc = textChunk->getTextContentElement(0);
SVGTextContentElementImpl *tc0 = tc; SVGTextContentElementImpl *tc0 = tc;
@ -373,7 +373,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
} }
{ {
T2P::GlyphLayoutParams *params = tc->tqlayoutParams(); T2P::GlyphLayoutParams *params = tc->layoutParams();
params->setLetterSpacing(params->letterSpacing() + addLetterSpacing); params->setLetterSpacing(params->letterSpacing() + addLetterSpacing);
if(bpath) if(bpath)
{ {
@ -429,7 +429,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
return; return;
// Draw 'text-decoration' // Draw 'text-decoration'
// TODO: Currently just ignore text-decoration on vertical tqlayouts, is that correct? // TODO: Currently just ignore text-decoration on vertical layouts, is that correct?
// Underline and overline have to be drawn before the glyphs are rendered // Underline and overline have to be drawn before the glyphs are rendered
if(tc0->getTextDecoration() & UNDERLINE && !params->tb()) if(tc0->getTextDecoration() & UNDERLINE && !params->tb())
addTextDecoration(tc0, (curx - anchor), (cury + (glyph->underlinePosition() - glyph->pixelBaseline())), addTextDecoration(tc0, (curx - anchor), (cury + (glyph->underlinePosition() - glyph->pixelBaseline())),
@ -444,7 +444,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
SVGTextContentElementImpl *style = textChunk->getTextContentElement(j); SVGTextContentElementImpl *style = textChunk->getTextContentElement(j);
// Draw 'text-decoration' // Draw 'text-decoration'
// TODO: Currently just ignore text-decoration on vertical tqlayouts, is that correct? // TODO: Currently just ignore text-decoration on vertical layouts, is that correct?
// Underline and overline have to be drawn before the glyphs are rendered // Underline and overline have to be drawn before the glyphs are rendered
if(style->getAttribute("text-decoration") == "underline" && !params->tb()) if(style->getAttribute("text-decoration") == "underline" && !params->tb())
addTextDecoration(style, glyph->bboxX() - anchor, (cury + (glyph->underlinePosition() - glyph->pixelBaseline())), addTextDecoration(style, glyph->bboxX() - anchor, (cury + (glyph->underlinePosition() - glyph->pixelBaseline())),

@ -300,13 +300,13 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &,
if(svg && svg->ownerSVGElement() == 0) if(svg && svg->ownerSVGElement() == 0)
{ {
SVGImageElementImpl *tqparentImage = Helper::self()->doc()->tqparentImage(); SVGImageElementImpl *parentImage = Helper::self()->doc()->parentImage();
if(tqparentImage) if(parentImage)
{ {
// We're being displayed in a document via an 'image' element. Set // We're being displayed in a document via an 'image' element. Set
// us up to fit into it's rectangle. // us up to fit into it's rectangle.
tqparentImage->setupSVGElement(svg); parentImage->setupSVGElement(svg);
} }
} }
@ -316,25 +316,25 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &,
{ {
// Set up the cached screenCTM // Set up the cached screenCTM
SVGLocatableImpl *locatableParent = 0; SVGLocatableImpl *locatableParent = 0;
DOM::Node tqparentNode = newElement->parentNode(); DOM::Node parentNode = newElement->parentNode();
if(!tqparentNode.isNull()) if(!parentNode.isNull())
{ {
SVGElementImpl *tqparent = Helper::self()->doc()->getElementFromHandle(tqparentNode.handle()); SVGElementImpl *tqparent = Helper::self()->doc()->getElementFromHandle(parentNode.handle());
if(tqparent) if(tqparent)
locatableParent = dynamic_cast<SVGLocatableImpl *>(tqparent); locatableParent = dynamic_cast<SVGLocatableImpl *>(tqparent);
} }
SVGMatrixImpl *tqparentMatrix = 0; SVGMatrixImpl *parentMatrix = 0;
if(locatableParent) if(locatableParent)
tqparentMatrix = locatableParent->getScreenCTM(); parentMatrix = locatableParent->getScreenCTM();
else else
tqparentMatrix = SVGSVGElementImpl::createSVGMatrix(); parentMatrix = SVGSVGElementImpl::createSVGMatrix();
locatable->updateCachedScreenCTM(tqparentMatrix); locatable->updateCachedScreenCTM(parentMatrix);
tqparentMatrix->deref(); parentMatrix->deref();
} }
m_currentNode = newElement; m_currentNode = newElement;

@ -13,7 +13,7 @@ static const char SVGDOMNodeBridge__s_hashTableStrings[] = {
"attributes\0" "attributes\0"
"childNodes\0" "childNodes\0"
"firstChild\0" "firstChild\0"
"tqparentNode\0" "parentNode\0"
"lastChild\0" "lastChild\0"
"localName\0" "localName\0"
"nodeValue\0" "nodeValue\0"

@ -6,8 +6,8 @@ namespace KSVG {
static const char SVGMaskElementImpl__s_hashTableStrings[] = { static const char SVGMaskElementImpl__s_hashTableStrings[] = {
"\0" "\0"
"tqmaskContentUnits\0" "maskContentUnits\0"
"tqmaskUnits\0" "maskUnits\0"
"height\0" "height\0"
"width\0" "width\0"
"x\0" "x\0"

@ -78,10 +78,10 @@ SVGUseElement SVGElementInstance::correspondingUseElement() const
return SVGUseElement(impl->correspondingUseElement()); return SVGUseElement(impl->correspondingUseElement());
} }
SVGElementInstance SVGElementInstance::tqparentNode() const SVGElementInstance SVGElementInstance::parentNode() const
{ {
if(!impl) return SVGElementInstance(0); if(!impl) return SVGElementInstance(0);
return SVGElementInstance(impl->tqparentNode()); return SVGElementInstance(impl->parentNode());
} }
SVGElementInstanceList SVGElementInstance::childNodes() const SVGElementInstanceList SVGElementInstance::childNodes() const

@ -39,7 +39,7 @@ public:
SVGElement correspondingElement() const; SVGElement correspondingElement() const;
SVGUseElement correspondingUseElement() const; SVGUseElement correspondingUseElement() const;
SVGElementInstance tqparentNode() const; SVGElementInstance parentNode() const;
SVGElementInstanceList childNodes() const; SVGElementInstanceList childNodes() const;
SVGElementInstance firstChild() const; SVGElementInstance firstChild() const;
SVGElementInstance lastChild() const; SVGElementInstance lastChild() const;

@ -70,16 +70,16 @@ SVGMaskElement::~SVGMaskElement()
impl->deref(); impl->deref();
} }
SVGAnimatedEnumeration SVGMaskElement::tqmaskUnits() const SVGAnimatedEnumeration SVGMaskElement::maskUnits() const
{ {
if(!impl) return SVGAnimatedEnumeration(0); if(!impl) return SVGAnimatedEnumeration(0);
return SVGAnimatedEnumeration(impl->tqmaskUnits()); return SVGAnimatedEnumeration(impl->maskUnits());
} }
SVGAnimatedEnumeration SVGMaskElement::tqmaskContentUnits() const SVGAnimatedEnumeration SVGMaskElement::maskContentUnits() const
{ {
if(!impl) return SVGAnimatedEnumeration(0); if(!impl) return SVGAnimatedEnumeration(0);
return SVGAnimatedEnumeration(impl->tqmaskContentUnits()); return SVGAnimatedEnumeration(impl->maskContentUnits());
} }
SVGAnimatedLength SVGMaskElement::x() const SVGAnimatedLength SVGMaskElement::x() const

@ -48,8 +48,8 @@ public:
SVGMaskElement(SVGMaskElementImpl *other); SVGMaskElement(SVGMaskElementImpl *other);
virtual ~SVGMaskElement(); virtual ~SVGMaskElement();
SVGAnimatedEnumeration tqmaskUnits() const; SVGAnimatedEnumeration maskUnits() const;
SVGAnimatedEnumeration tqmaskContentUnits() const; SVGAnimatedEnumeration maskContentUnits() const;
SVGAnimatedLength x() const; SVGAnimatedLength x() const;
SVGAnimatedLength y() const; SVGAnimatedLength y() const;
SVGAnimatedLength width() const; SVGAnimatedLength width() const;

@ -57,7 +57,7 @@ class SVGTextElementImpl;
* specification and painting attributes which describe how exactly to render * specification and painting attributes which describe how exactly to render
* the characters. Since <code>text</code> elements are rendered using the * the characters. Since <code>text</code> elements are rendered using the
* same rendering methods as other graphics elements, all of the same * same rendering methods as other graphics elements, all of the same
* coordinate system transformations, painting, clipping and tqmasking * coordinate system transformations, painting, clipping and masking
* features that apply to tqshapes such as paths and rectangles also * features that apply to tqshapes such as paths and rectangles also
* apply to <code>text</code> elements. * apply to <code>text</code> elements.
* *

@ -31,7 +31,7 @@
#define KSVG_GET_COMMON \ #define KSVG_GET_COMMON \
public: \ public: \
\ \
/* The standard hasProperty call, auto-generated. Looks in hashtable, forwards to tqparents. */ \ /* The standard hasProperty call, auto-generated. Looks in hashtable, forwards to parents. */ \
bool hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; \ bool hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; \
\ \
/* get() method, called by KSVGBridge::get */ \ /* get() method, called by KSVGBridge::get */ \
@ -80,7 +80,7 @@ public: \
/* put() method, called by KSVGBridge::put */ \ /* put() method, called by KSVGBridge::put */ \
bool put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr); \ bool put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr); \
\ \
/* Called by lookupPut. Auto-generated. Looks in hashtable, forwards to tqparents. */ \ /* Called by lookupPut. Auto-generated. Looks in hashtable, forwards to parents. */ \
bool putInParents(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr); bool putInParents(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr);
// For classes which inherit a read-write class, but have no readwrite property themselves // For classes which inherit a read-write class, but have no readwrite property themselves
@ -150,7 +150,7 @@ namespace KSVG
{ {
const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName); const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName);
if(!entry) // not found, forward to tqparents if(!entry) // not found, forward to parents
return thisObj->getInParents(exec, propertyName, bridge); return thisObj->getInParents(exec, propertyName, bridge);
if(entry->attr & KJS::Function) if(entry->attr & KJS::Function)
@ -174,7 +174,7 @@ namespace KSVG
{ {
const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName); const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName);
if(!entry) // not found, forward to tqparents if(!entry) // not found, forward to parents
return thisObj->getInParents(exec, propertyName, bridge); return thisObj->getInParents(exec, propertyName, bridge);
if(entry->attr & KJS::Function) if(entry->attr & KJS::Function)
@ -199,7 +199,7 @@ namespace KSVG
{ {
const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName); const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName);
if(!entry) // not found, forward to tqparents if(!entry) // not found, forward to parents
return thisObj->putInParents(exec, propertyName, value, attr); return thisObj->putInParents(exec, propertyName, value, attr);
else if(entry->attr & KJS::Function) // Function: put as override property else if(entry->attr & KJS::Function) // Function: put as override property
return false; return false;

@ -496,10 +496,10 @@ WindowQObject::WindowQObject(Window *w) : tqparent(w)
WindowQObject::~WindowQObject() WindowQObject::~WindowQObject()
{ {
tqparentDestroyed(); // reuse same code parentDestroyed(); // reuse same code
} }
void WindowQObject::tqparentDestroyed() void WindowQObject::parentDestroyed()
{ {
killTimers(); killTimers();

@ -110,7 +110,7 @@ public:
public slots: public slots:
void timeoutClose(); void timeoutClose();
protected slots: protected slots:
void tqparentDestroyed(); void parentDestroyed();
protected: protected:
void timerEvent(TQTimerEvent *e); void timerEvent(TQTimerEvent *e);
private: private:

@ -74,7 +74,7 @@ unsigned int SVGDocumentImpl::elemDictHashSizes [] =
const int SVGDocumentImpl::numElemDictHashSizes = sizeof(elemDictHashSizes) / sizeof(elemDictHashSizes[0]); const int SVGDocumentImpl::numElemDictHashSizes = sizeof(elemDictHashSizes) / sizeof(elemDictHashSizes[0]);
SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *tqparentImage) : TQObject(), DOM::DomShared(), DOM::Document(), SVGDOMNodeBridge(static_cast<DOM::Node>(*this)) SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *parentImage) : TQObject(), DOM::DomShared(), DOM::Document(), SVGDOMNodeBridge(static_cast<DOM::Node>(*this))
{ {
m_animations = anim; m_animations = anim;
@ -97,7 +97,7 @@ SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *tqpar
m_resortZIndicesOnFinishedLoading = false; m_resortZIndicesOnFinishedLoading = false;
m_fit = fit; m_fit = fit;
m_parentImage = tqparentImage; m_parentImage = parentImage;
if(m_parentImage) if(m_parentImage)
m_parentImage->ref(); m_parentImage->ref();
} }
@ -392,9 +392,9 @@ void SVGDocumentImpl::syncCachedMatrices()
{ {
if(rootElement()) if(rootElement())
{ {
SVGMatrixImpl *tqparentMatrix = SVGSVGElementImpl::createSVGMatrix(); SVGMatrixImpl *parentMatrix = SVGSVGElementImpl::createSVGMatrix();
rootElement()->checkCachedScreenCTM(tqparentMatrix); rootElement()->checkCachedScreenCTM(parentMatrix);
tqparentMatrix->deref(); parentMatrix->deref();
} }
} }

@ -74,7 +74,7 @@ class SVGDocumentImpl : public TQObject,
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
SVGDocumentImpl(bool anim = true, bool bFit = false, SVGImageElementImpl *tqparentImage = 0); SVGDocumentImpl(bool anim = true, bool bFit = false, SVGImageElementImpl *parentImage = 0);
virtual ~SVGDocumentImpl(); virtual ~SVGDocumentImpl();
float screenPixelsPerMillimeterX() const; float screenPixelsPerMillimeterX() const;
@ -90,7 +90,7 @@ public:
void setRootElement(SVGSVGElementImpl *); void setRootElement(SVGSVGElementImpl *);
SVGSVGElementImpl *rootElement() const; SVGSVGElementImpl *rootElement() const;
SVGImageElementImpl *tqparentImage() const { return m_parentImage; } SVGImageElementImpl *parentImage() const { return m_parentImage; }
SVGWindowImpl *window(); SVGWindowImpl *window();

@ -49,7 +49,7 @@ using namespace KSVG;
nodeName SVGDOMNodeBridge::NodeName DontDelete|ReadOnly nodeName SVGDOMNodeBridge::NodeName DontDelete|ReadOnly
nodeValue SVGDOMNodeBridge::NodeValue DontDelete nodeValue SVGDOMNodeBridge::NodeValue DontDelete
nodeType SVGDOMNodeBridge::NodeType DontDelete|ReadOnly nodeType SVGDOMNodeBridge::NodeType DontDelete|ReadOnly
tqparentNode SVGDOMNodeBridge::ParentNode DontDelete|ReadOnly parentNode SVGDOMNodeBridge::ParentNode DontDelete|ReadOnly
childNodes SVGDOMNodeBridge::ChildNodes DontDelete|ReadOnly childNodes SVGDOMNodeBridge::ChildNodes DontDelete|ReadOnly
firstChild SVGDOMNodeBridge::FirstChild DontDelete|ReadOnly firstChild SVGDOMNodeBridge::FirstChild DontDelete|ReadOnly
lastChild SVGDOMNodeBridge::LastChild DontDelete|ReadOnly lastChild SVGDOMNodeBridge::LastChild DontDelete|ReadOnly

@ -75,7 +75,7 @@ SVGUseElementImpl *SVGElementInstanceImpl::correspondingUseElement() const
return m_correspondingUseElement; return m_correspondingUseElement;
} }
SVGElementInstanceImpl *SVGElementInstanceImpl::tqparentNode() const SVGElementInstanceImpl *SVGElementInstanceImpl::parentNode() const
{ {
return m_parentNode; return m_parentNode;
} }

@ -40,7 +40,7 @@ public:
SVGElementImpl *correspondingElement() const; SVGElementImpl *correspondingElement() const;
SVGUseElementImpl *correspondingUseElement() const; SVGUseElementImpl *correspondingUseElement() const;
SVGElementInstanceImpl *tqparentNode() const; SVGElementInstanceImpl *parentNode() const;
SVGElementInstanceListImpl *childNodes() const; SVGElementInstanceListImpl *childNodes() const;
SVGElementInstanceImpl *firstChild() const; SVGElementInstanceImpl *firstChild() const;
SVGElementInstanceImpl *lastChild() const; SVGElementInstanceImpl *lastChild() const;

@ -353,7 +353,7 @@ void SVGImageElementImpl::onScreenCTMUpdated()
SVGMatrixImpl *ctm = getScreenCTM(); SVGMatrixImpl *ctm = getScreenCTM();
m_svgRoot->setRootParentScreenCTM(ctm); m_svgRoot->setRootParentScreenCTM(ctm);
m_svgRoot->tqinvalidateCachedMatrices(); m_svgRoot->invalidateCachedMatrices();
m_svgRoot->ownerDoc()->syncCachedMatrices(); m_svgRoot->ownerDoc()->syncCachedMatrices();
} }
} }

@ -282,9 +282,9 @@ void SVGLengthImpl::convertNumToPx()
bool sizeLocal = (style->getFontSize() != -1); bool sizeLocal = (style->getFontSize() != -1);
bool familyLocal = (style->getFontFamily() && style->getFontFamily()->getFirst()); bool familyLocal = (style->getFontFamily() && style->getFontFamily()->getFirst());
SVGStylableImpl *tqparentStyle = 0; SVGStylableImpl *parentStyle = 0;
if((!sizeLocal || !familyLocal) && m_context) if((!sizeLocal || !familyLocal) && m_context)
tqparentStyle = dynamic_cast<SVGStylableImpl *>(m_context->ownerDoc()->getElementFromHandle(m_context->parentNode().handle())); parentStyle = dynamic_cast<SVGStylableImpl *>(m_context->ownerDoc()->getElementFromHandle(m_context->parentNode().handle()));
// Look up font-size in a SAFE way, because at this place // Look up font-size in a SAFE way, because at this place
// processStyle() has NOT yet been called, so we need // processStyle() has NOT yet been called, so we need
@ -294,13 +294,13 @@ void SVGLengthImpl::convertNumToPx()
if(sizeLocal) if(sizeLocal)
useSize = style->getFontSize(); useSize = style->getFontSize();
else if(tqparentStyle && tqparentStyle->getFontSize() != -1) else if(parentStyle && parentStyle->getFontSize() != -1)
useSize = tqparentStyle->getFontSize(); useSize = parentStyle->getFontSize();
if(familyLocal) if(familyLocal)
useFont = style->getFontFamily()->getFirst()->string(); useFont = style->getFontFamily()->getFirst()->string();
else if(tqparentStyle && tqparentStyle->getFontFamily() && tqparentStyle->getFontFamily()->getFirst()) else if(parentStyle && parentStyle->getFontFamily() && parentStyle->getFontFamily()->getFirst())
useFont = tqparentStyle->getFontFamily()->getFirst()->string(); useFont = parentStyle->getFontFamily()->getFirst()->string();
if(m_unitType == SVG_LENGTHTYPE_EMS) if(m_unitType == SVG_LENGTHTYPE_EMS)
m_value = m_valueInSpecifiedUnits * useSize; m_value = m_valueInSpecifiedUnits * useSize;

@ -79,9 +79,9 @@ SVGMatrixImpl *SVGLocatableImpl::getTransformToElement(SVGElementImpl *)
return ret; return ret;
} }
void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM) void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM)
{ {
m_cachedScreenCTM->copy(tqparentScreenCTM); m_cachedScreenCTM->copy(parentScreenCTM);
const SVGMatrixImpl *local = localMatrix(); const SVGMatrixImpl *local = localMatrix();
@ -114,7 +114,7 @@ void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *tqparentScreen
} }
} }
void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM) void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM)
{ {
if(m_cachedScreenCTMIsValid) if(m_cachedScreenCTMIsValid)
{ {
@ -135,7 +135,7 @@ void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *tqparentScreenC
} }
} }
else else
updateCachedScreenCTM(tqparentScreenCTM); updateCachedScreenCTM(parentScreenCTM);
} }
// Ecma stuff // Ecma stuff

@ -52,14 +52,14 @@ public:
virtual const SVGMatrixImpl *localMatrix() { return 0; } virtual const SVGMatrixImpl *localMatrix() { return 0; }
bool cachedScreenCTMIsValid() const { return m_cachedScreenCTMIsValid; } bool cachedScreenCTMIsValid() const { return m_cachedScreenCTMIsValid; }
void tqinvalidateCachedMatrices() { m_cachedScreenCTMIsValid = false; } void invalidateCachedMatrices() { m_cachedScreenCTMIsValid = false; }
// If the cached matrix is invalid, update it and update any child elements // If the cached matrix is invalid, update it and update any child elements
// recursively. Otherwise, check child elements recursively. // recursively. Otherwise, check child elements recursively.
virtual void checkCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM); virtual void checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM);
// Update the cached matrix, and update child element cached matrices, // Update the cached matrix, and update child element cached matrices,
// recursively. // recursively.
virtual void updateCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM); virtual void updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM);
// Called immediately after the screen ctm has been updated. // Called immediately after the screen ctm has been updated.
virtual void onScreenCTMUpdated() {} virtual void onScreenCTMUpdated() {}

@ -63,11 +63,11 @@ SVGMaskElementImpl::SVGMaskElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(
m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this); m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
m_height->ref(); m_height->ref();
m_tqmaskUnits = new SVGAnimatedEnumerationImpl(); m_maskUnits = new SVGAnimatedEnumerationImpl();
m_tqmaskUnits->ref(); m_maskUnits->ref();
m_tqmaskContentUnits = new SVGAnimatedEnumerationImpl(); m_maskContentUnits = new SVGAnimatedEnumerationImpl();
m_tqmaskContentUnits->ref(); m_maskContentUnits->ref();
m_converter = new SVGUnitConverter(); m_converter = new SVGUnitConverter();
m_converter->add(m_x); m_converter->add(m_x);
@ -77,7 +77,7 @@ SVGMaskElementImpl::SVGMaskElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(
m_canvas = 0; m_canvas = 0;
m_tqmaskCache.setMaxTotalCost(1024 * 1024); m_maskCache.setMaxTotalCost(1024 * 1024);
} }
SVGMaskElementImpl::~SVGMaskElementImpl() SVGMaskElementImpl::~SVGMaskElementImpl()
@ -90,23 +90,23 @@ SVGMaskElementImpl::~SVGMaskElementImpl()
m_width->deref(); m_width->deref();
if(m_height) if(m_height)
m_height->deref(); m_height->deref();
if(m_tqmaskUnits) if(m_maskUnits)
m_tqmaskContentUnits->deref(); m_maskContentUnits->deref();
if(m_tqmaskUnits) if(m_maskUnits)
m_tqmaskContentUnits->deref(); m_maskContentUnits->deref();
delete m_converter; delete m_converter;
if(m_canvas) if(m_canvas)
delete m_canvas; delete m_canvas;
} }
SVGAnimatedEnumerationImpl *SVGMaskElementImpl::tqmaskUnits() const SVGAnimatedEnumerationImpl *SVGMaskElementImpl::maskUnits() const
{ {
return m_tqmaskUnits; return m_maskUnits;
} }
SVGAnimatedEnumerationImpl *SVGMaskElementImpl::tqmaskContentUnits() const SVGAnimatedEnumerationImpl *SVGMaskElementImpl::maskContentUnits() const
{ {
return m_tqmaskContentUnits; return m_maskContentUnits;
} }
SVGAnimatedLengthImpl *SVGMaskElementImpl::x() const SVGAnimatedLengthImpl *SVGMaskElementImpl::x() const
@ -132,8 +132,8 @@ SVGAnimatedLengthImpl *SVGMaskElementImpl::height() const
/* /*
@namespace KSVG @namespace KSVG
@begin SVGMaskElementImpl::s_hashTable 7 @begin SVGMaskElementImpl::s_hashTable 7
tqmaskUnits SVGMaskElementImpl::MaskUnits DontDelete|ReadOnly maskUnits SVGMaskElementImpl::MaskUnits DontDelete|ReadOnly
tqmaskContentUnits SVGMaskElementImpl::MaskContentUnits DontDelete|ReadOnly maskContentUnits SVGMaskElementImpl::MaskContentUnits DontDelete|ReadOnly
x SVGMaskElementImpl::X DontDelete|ReadOnly x SVGMaskElementImpl::X DontDelete|ReadOnly
y SVGMaskElementImpl::Y DontDelete|ReadOnly y SVGMaskElementImpl::Y DontDelete|ReadOnly
width SVGMaskElementImpl::Width DontDelete|ReadOnly width SVGMaskElementImpl::Width DontDelete|ReadOnly
@ -148,14 +148,14 @@ Value SVGMaskElementImpl::getValueProperty(ExecState *exec, int token) const
{ {
case MaskUnits: case MaskUnits:
if(!attributeMode) if(!attributeMode)
return m_tqmaskUnits->cache(exec); return m_maskUnits->cache(exec);
else else
return Number(m_tqmaskUnits->baseVal()); return Number(m_maskUnits->baseVal());
case MaskContentUnits: case MaskContentUnits:
if(!attributeMode) if(!attributeMode)
return m_tqmaskContentUnits->cache(exec); return m_maskContentUnits->cache(exec);
else else
return Number(m_tqmaskContentUnits->baseVal()); return Number(m_maskContentUnits->baseVal());
case X: case X:
if(!attributeMode) if(!attributeMode)
return m_x->cache(exec); return m_x->cache(exec);
@ -194,15 +194,15 @@ void SVGMaskElementImpl::putValueProperty(ExecState *exec, int token, const Valu
{ {
case MaskUnits: case MaskUnits:
if(value.toString(exec).qstring() == "objectBoundingBox") if(value.toString(exec).qstring() == "objectBoundingBox")
m_tqmaskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX); m_maskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
else else
m_tqmaskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE); m_maskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE);
break; break;
case MaskContentUnits: case MaskContentUnits:
if(value.toString(exec).qstring() == "objectBoundingBox") if(value.toString(exec).qstring() == "objectBoundingBox")
m_tqmaskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX); m_maskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
else else
m_tqmaskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE); m_maskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE);
break; break;
case X: case X:
converter()->modify(x(), value.toString(exec).qstring()); converter()->modify(x(), value.toString(exec).qstring());
@ -262,7 +262,7 @@ void SVGMaskElementImpl::setAttributes()
SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight) SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight)
{ {
converter()->finalize(referencingElement, ownerSVGElement(), tqmaskUnits()->baseVal()); converter()->finalize(referencingElement, ownerSVGElement(), maskUnits()->baseVal());
TQ_UINT32 *imageBits = new TQ_UINT32[imageWidth * imageHeight]; TQ_UINT32 *imageBits = new TQ_UINT32[imageWidth * imageHeight];
@ -282,12 +282,12 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
SVGRectImpl *bbox = referencingElement->getBBox(); SVGRectImpl *bbox = referencingElement->getBBox();
if(tqmaskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) if(maskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
baseMatrix->translate(-(bbox->x() + x()->baseVal()->value()), -(bbox->y() + y()->baseVal()->value())); baseMatrix->translate(-(bbox->x() + x()->baseVal()->value()), -(bbox->y() + y()->baseVal()->value()));
else else
baseMatrix->translate(-x()->baseVal()->value(), -y()->baseVal()->value()); baseMatrix->translate(-x()->baseVal()->value(), -y()->baseVal()->value());
if(tqmaskContentUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) if(maskContentUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
{ {
baseMatrix->translate(bbox->x(), bbox->y()); baseMatrix->translate(bbox->x(), bbox->y());
baseMatrix->scaleNonUniform(bbox->width(), bbox->height()); baseMatrix->scaleNonUniform(bbox->width(), bbox->height());
@ -336,12 +336,12 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
{ {
// Note: r and b reversed // Note: r and b reversed
//TQImage tqmaskImage(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight, 32, 0, 0, TQImage::IgnoreEndian); //TQImage maskImage(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight, 32, 0, 0, TQImage::IgnoreEndian);
//tqmaskImage.setAlphaBuffer(true); //maskImage.setAlphaBuffer(true);
//tqmaskImage.save("tqmask.png", "PNG"); //maskImage.save("tqmask.png", "PNG");
} }
TQByteArray tqmaskData(imageWidth * imageHeight); TQByteArray maskData(imageWidth * imageHeight);
const double epsilon = DBL_EPSILON; const double epsilon = DBL_EPSILON;
// Convert the rgba image into an 8-bit tqmask, according to the specs. // Convert the rgba image into an 8-bit tqmask, according to the specs.
@ -378,9 +378,9 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
double luminanceAlpha = 0.2125 * r + 0.7154 * g + 0.0721 * b; double luminanceAlpha = 0.2125 * r + 0.7154 * g + 0.0721 * b;
// Multiply by alpha. // Multiply by alpha.
double tqmaskValue = luminanceAlpha * a; double maskValue = luminanceAlpha * a;
tqmaskData[i] = static_cast<unsigned char>(tqmaskValue * 255 + 0.5); maskData[i] = static_cast<unsigned char>(maskValue * 255 + 0.5);
} }
delete [] imageBits; delete [] imageBits;
@ -392,12 +392,12 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
// need to set it here. // need to set it here.
TQWMatrix tempMatrix; TQWMatrix tempMatrix;
return Mask(tqmaskData, tempMatrix, imageWidth, imageHeight); return Mask(maskData, tempMatrix, imageWidth, imageHeight);
} }
SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement) SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement)
{ {
converter()->finalize(referencingElement, ownerSVGElement(), tqmaskUnits()->baseVal()); converter()->finalize(referencingElement, ownerSVGElement(), maskUnits()->baseVal());
SVGMatrixImpl *refCTM = 0; SVGMatrixImpl *refCTM = 0;
SVGLocatableImpl *locatableRef = dynamic_cast<SVGLocatableImpl *>(referencingElement); SVGLocatableImpl *locatableRef = dynamic_cast<SVGLocatableImpl *>(referencingElement);
@ -420,10 +420,10 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
{ {
CacheKey key(referencingElement, imageWidth, imageHeight); CacheKey key(referencingElement, imageWidth, imageHeight);
if(!m_tqmaskCache.tqfind(key, tqmask)) if(!m_maskCache.tqfind(key, tqmask))
{ {
tqmask = createMask(referencingElement, imageWidth, imageHeight); tqmask = createMask(referencingElement, imageWidth, imageHeight);
m_tqmaskCache.insert(key, tqmask, imageWidth * imageHeight); m_maskCache.insert(key, tqmask, imageWidth * imageHeight);
} }
// Generate a tqmask-coordinates to screen-coordinates matrix // Generate a tqmask-coordinates to screen-coordinates matrix
@ -433,7 +433,7 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
else else
matrix = SVGSVGElementImpl::createSVGMatrix(); matrix = SVGSVGElementImpl::createSVGMatrix();
if(tqmaskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) if(maskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
{ {
SVGRectImpl *bbox = referencingElement->getBBox(); SVGRectImpl *bbox = referencingElement->getBBox();
matrix->translate(bbox->x() + x()->baseVal()->value(), bbox->y() + y()->baseVal()->value()); matrix->translate(bbox->x() + x()->baseVal()->value(), bbox->y() + y()->baseVal()->value());
@ -453,7 +453,7 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
return tqmask; return tqmask;
} }
TQByteArray SVGMaskElementImpl::tqmaskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle) TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle)
{ {
TQByteArray cumulativeMask; TQByteArray cumulativeMask;
@ -467,18 +467,18 @@ TQByteArray SVGMaskElementImpl::tqmaskRectangle(SVGShapeImpl *tqshape, const TQR
if(element) if(element)
{ {
SVGMaskElementImpl *tqmaskElement = dynamic_cast<SVGMaskElementImpl *>(element); SVGMaskElementImpl *maskElement = dynamic_cast<SVGMaskElementImpl *>(element);
if(tqmaskElement) if(maskElement)
{ {
SVGMaskElementImpl::Mask tqmask = tqmaskElement->createMask(tqshape); SVGMaskElementImpl::Mask tqmask = maskElement->createMask(tqshape);
if(!tqmask.isEmpty()) if(!tqmask.isEmpty())
{ {
TQByteArray tqmaskData = tqmask.rectangle(screenRectangle); TQByteArray maskData = tqmask.rectangle(screenRectangle);
if(cumulativeMask.size() == 0) if(cumulativeMask.size() == 0)
cumulativeMask = tqmaskData; cumulativeMask = maskData;
else else
{ {
int size = cumulativeMask.size(); int size = cumulativeMask.size();
@ -486,7 +486,7 @@ TQByteArray SVGMaskElementImpl::tqmaskRectangle(SVGShapeImpl *tqshape, const TQR
// Multiply into the cumulative tqmask (using fast divide by 255) // Multiply into the cumulative tqmask (using fast divide by 255)
for(int i = 0; i < size; i++) for(int i = 0; i < size; i++)
{ {
int tmp = tqmaskData[i] * cumulativeMask[i] + 0x80; int tmp = maskData[i] * cumulativeMask[i] + 0x80;
cumulativeMask[i] = (tmp + (tmp >> 8)) >> 8; cumulativeMask[i] = (tmp + (tmp >> 8)) >> 8;
} }
} }
@ -495,11 +495,11 @@ TQByteArray SVGMaskElementImpl::tqmaskRectangle(SVGShapeImpl *tqshape, const TQR
} }
} }
DOM::Node tqparentNode = tqshape->parentNode(); DOM::Node parentNode = tqshape->parentNode();
if(!tqparentNode.isNull()) if(!parentNode.isNull())
{ {
SVGElementImpl *tqparent = tqshape->ownerDoc()->getElementFromHandle(tqparentNode.handle()); SVGElementImpl *tqparent = tqshape->ownerDoc()->getElementFromHandle(parentNode.handle());
if(tqparent) if(tqparent)
tqshape = dynamic_cast<SVGShapeImpl *>(tqparent); tqshape = dynamic_cast<SVGShapeImpl *>(tqparent);

@ -75,8 +75,8 @@ public:
SVGMaskElementImpl(DOM::ElementImpl *); SVGMaskElementImpl(DOM::ElementImpl *);
virtual ~SVGMaskElementImpl(); virtual ~SVGMaskElementImpl();
SVGAnimatedEnumerationImpl *tqmaskUnits() const; SVGAnimatedEnumerationImpl *maskUnits() const;
SVGAnimatedEnumerationImpl *tqmaskContentUnits() const; SVGAnimatedEnumerationImpl *maskContentUnits() const;
SVGAnimatedLengthImpl *x() const; SVGAnimatedLengthImpl *x() const;
SVGAnimatedLengthImpl *y() const; SVGAnimatedLengthImpl *y() const;
SVGAnimatedLengthImpl *width() const; SVGAnimatedLengthImpl *width() const;
@ -89,10 +89,10 @@ public:
Mask createMask(SVGShapeImpl *referencingElement); Mask createMask(SVGShapeImpl *referencingElement);
// Compute the tqmask on a given tqshape, taking into account all tqmasks defined // Compute the tqmask on a given tqshape, taking into account all masks defined
// on the tqshape's ancestors. This is a workaround for us not having a buffer // on the tqshape's ancestors. This is a workaround for us not having a buffer
// for container elements, so we can't tqmask containers directly. // for container elements, so we can't tqmask containers directly.
static TQByteArray tqmaskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle); static TQByteArray maskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle);
private: private:
class CacheKey class CacheKey
@ -110,8 +110,8 @@ private:
Mask createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight); Mask createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight);
SVGAnimatedEnumerationImpl *m_tqmaskUnits; SVGAnimatedEnumerationImpl *m_maskUnits;
SVGAnimatedEnumerationImpl *m_tqmaskContentUnits; SVGAnimatedEnumerationImpl *m_maskContentUnits;
SVGAnimatedLengthImpl *m_x; SVGAnimatedLengthImpl *m_x;
SVGAnimatedLengthImpl *m_y; SVGAnimatedLengthImpl *m_y;
SVGAnimatedLengthImpl *m_width; SVGAnimatedLengthImpl *m_width;
@ -120,7 +120,7 @@ private:
SVGUnitConverter *m_converter; SVGUnitConverter *m_converter;
KSVGCanvas *m_canvas; KSVGCanvas *m_canvas;
MinOneLRUCache<CacheKey, Mask> m_tqmaskCache; MinOneLRUCache<CacheKey, Mask> m_maskCache;
public: public:
KSVG_GET KSVG_GET

@ -166,7 +166,7 @@ void SVGSVGElementImpl::setAttributes()
m_viewport->setWidth(width()->baseVal()->value()); m_viewport->setWidth(width()->baseVal()->value());
m_viewport->setHeight(height()->baseVal()->value()); m_viewport->setHeight(height()->baseVal()->value());
if(isRootElement() && ownerDoc()->tqparentImage() == 0) if(isRootElement() && ownerDoc()->parentImage() == 0)
{ {
if(ownerDoc()->canvas()) if(ownerDoc()->canvas())
ownerDoc()->canvas()->setViewportDimension(int(ceil(width()->baseVal()->value() * currentScale())), int(ceil(height()->baseVal()->value() * currentScale()))); ownerDoc()->canvas()->setViewportDimension(int(ceil(width()->baseVal()->value() * currentScale())), int(ceil(height()->baseVal()->value() * currentScale())));
@ -271,7 +271,7 @@ void SVGSVGElementImpl::setCurrentScale(float currentScale)
if( m_currentScale != currentScale ) if( m_currentScale != currentScale )
{ {
m_currentScale = currentScale; m_currentScale = currentScale;
tqinvalidateCachedMatrices(); invalidateCachedMatrices();
if(hasEventListener(SVGEvent::ZOOM_EVENT, true)) if(hasEventListener(SVGEvent::ZOOM_EVENT, true))
dispatchEvent(SVGEvent::ZOOM_EVENT, false, false); dispatchEvent(SVGEvent::ZOOM_EVENT, false, false);
@ -289,7 +289,7 @@ void SVGSVGElementImpl::setCurrentTranslate(const TQPoint &p)
{ {
m_currentTranslate->setX(p.x()); m_currentTranslate->setX(p.x());
m_currentTranslate->setY(p.y()); m_currentTranslate->setY(p.y());
tqinvalidateCachedMatrices(); invalidateCachedMatrices();
if(hasEventListener(SVGEvent::SCROLL_EVENT, true)) if(hasEventListener(SVGEvent::SCROLL_EVENT, true))
dispatchEvent(SVGEvent::SCROLL_EVENT, false, false); dispatchEvent(SVGEvent::SCROLL_EVENT, false, false);
} }

@ -98,9 +98,9 @@ SVGStylableImpl::~SVGStylableImpl()
void SVGStylableImpl::processStyle() void SVGStylableImpl::processStyle()
{ {
SVGStylableImpl *tqparentStyle = 0; SVGStylableImpl *parentStyle = 0;
if(m_object && m_object->ownerDoc()) if(m_object && m_object->ownerDoc())
tqparentStyle = dynamic_cast<SVGStylableImpl *>(m_object->ownerDoc()->getElementFromHandle((*m_object).parentNode().handle())); parentStyle = dynamic_cast<SVGStylableImpl *>(m_object->ownerDoc()->getElementFromHandle((*m_object).parentNode().handle()));
// Spec: default "none" // Spec: default "none"
if(~m_flags & SVG_STYLE_FLAG_STROKE) if(~m_flags & SVG_STYLE_FLAG_STROKE)
@ -109,8 +109,8 @@ void SVGStylableImpl::processStyle()
m_strokeColor->ref(); m_strokeColor->ref();
SVGPaintImpl *strokeColor = 0L; SVGPaintImpl *strokeColor = 0L;
if(tqparentStyle) if(parentStyle)
strokeColor = tqparentStyle->getStrokeColor(); strokeColor = parentStyle->getStrokeColor();
if(strokeColor) if(strokeColor)
*m_strokeColor = *strokeColor; *m_strokeColor = *strokeColor;
@ -125,8 +125,8 @@ void SVGStylableImpl::processStyle()
m_fillColor->ref(); m_fillColor->ref();
SVGPaintImpl *fillColor = 0; SVGPaintImpl *fillColor = 0;
if(tqparentStyle) if(parentStyle)
fillColor = tqparentStyle->getFillColor(); fillColor = parentStyle->getFillColor();
if(fillColor) if(fillColor)
*m_fillColor = *fillColor; *m_fillColor = *fillColor;
@ -140,8 +140,8 @@ void SVGStylableImpl::processStyle()
m_color = new SVGColorImpl(m_object); m_color = new SVGColorImpl(m_object);
m_color->ref(); m_color->ref();
SVGColorImpl *color = 0; SVGColorImpl *color = 0;
if(tqparentStyle) if(parentStyle)
color = tqparentStyle->getColor(); color = parentStyle->getColor();
if(color) if(color)
*m_color = *color; *m_color = *color;
@ -150,8 +150,8 @@ void SVGStylableImpl::processStyle()
// Spec: default sRGB // Spec: default sRGB
if(~m_flags & SVG_STYLE_FLAG_COLOR_INTERPOLATION) if(~m_flags & SVG_STYLE_FLAG_COLOR_INTERPOLATION)
{ {
if(tqparentStyle) if(parentStyle)
m_colorInterpolation = tqparentStyle->getColorInterpolation(); m_colorInterpolation = parentStyle->getColorInterpolation();
else else
m_colorInterpolation = CI_SRGB; m_colorInterpolation = CI_SRGB;
} }
@ -163,8 +163,8 @@ void SVGStylableImpl::processStyle()
m_strokeWidth->ref(); m_strokeWidth->ref();
SVGAnimatedLengthImpl *strokeWidth = 0; SVGAnimatedLengthImpl *strokeWidth = 0;
if(tqparentStyle) if(parentStyle)
strokeWidth = tqparentStyle->getStrokeWidth(); strokeWidth = parentStyle->getStrokeWidth();
if(strokeWidth) if(strokeWidth)
*m_strokeWidth = *strokeWidth; *m_strokeWidth = *strokeWidth;
@ -175,8 +175,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "4" // Spec: default "4"
if(~m_flags & SVG_STYLE_FLAG_STROKE_MITER_LIMIT) if(~m_flags & SVG_STYLE_FLAG_STROKE_MITER_LIMIT)
{ {
if(tqparentStyle) if(parentStyle)
m_strokeMiterlimit = tqparentStyle->getStrokeMiterlimit(); m_strokeMiterlimit = parentStyle->getStrokeMiterlimit();
else else
m_strokeMiterlimit = 4; m_strokeMiterlimit = 4;
} }
@ -184,8 +184,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "butt" // Spec: default "butt"
if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_CAP) if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_CAP)
{ {
if(tqparentStyle) if(parentStyle)
m_capStyle = tqparentStyle->getCapStyle(); m_capStyle = parentStyle->getCapStyle();
else else
m_capStyle = PATH_STROKE_CAP_BUTT; m_capStyle = PATH_STROKE_CAP_BUTT;
} }
@ -193,8 +193,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "miter" // Spec: default "miter"
if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_JOIN) if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_JOIN)
{ {
if(tqparentStyle) if(parentStyle)
m_joinStyle = tqparentStyle->getJoinStyle(); m_joinStyle = parentStyle->getJoinStyle();
else else
m_joinStyle = PATH_STROKE_JOIN_MITER; m_joinStyle = PATH_STROKE_JOIN_MITER;
} }
@ -202,8 +202,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "auto" // Spec: default "auto"
if(~m_flags & SVG_STYLE_FLAG_CURSOR) if(~m_flags & SVG_STYLE_FLAG_CURSOR)
{ {
if(tqparentStyle) if(parentStyle)
m_cursor = tqparentStyle->getCursor(); m_cursor = parentStyle->getCursor();
else else
m_cursor = CURSOR_AUTO; m_cursor = CURSOR_AUTO;
} }
@ -211,8 +211,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "visiblePainted" // Spec: default "visiblePainted"
if(~m_flags & SVG_STYLE_FLAG_POINTER_EVENTS) if(~m_flags & SVG_STYLE_FLAG_POINTER_EVENTS)
{ {
if(tqparentStyle) if(parentStyle)
m_pointerEvents = tqparentStyle->getPointerEvents(); m_pointerEvents = parentStyle->getPointerEvents();
else else
m_pointerEvents = PE_VISIBLE_PAINTED; m_pointerEvents = PE_VISIBLE_PAINTED;
} }
@ -224,8 +224,8 @@ void SVGStylableImpl::processStyle()
m_dashOffset->ref(); m_dashOffset->ref();
SVGAnimatedLengthImpl *dashOffset = 0; SVGAnimatedLengthImpl *dashOffset = 0;
if(tqparentStyle) if(parentStyle)
dashOffset = tqparentStyle->getDashOffset(); dashOffset = parentStyle->getDashOffset();
if(dashOffset) if(dashOffset)
*m_dashOffset = *dashOffset; *m_dashOffset = *dashOffset;
@ -237,8 +237,8 @@ void SVGStylableImpl::processStyle()
if(~m_flags & SVG_STYLE_FLAG_STROKE_DASH_ARRAY) if(~m_flags & SVG_STYLE_FLAG_STROKE_DASH_ARRAY)
{ {
SVGAnimatedLengthListImpl *dashArray = 0; SVGAnimatedLengthListImpl *dashArray = 0;
if(tqparentStyle) if(parentStyle)
dashArray = tqparentStyle->getDashArray(); dashArray = parentStyle->getDashArray();
if(dashArray) if(dashArray)
{ {
@ -256,16 +256,16 @@ void SVGStylableImpl::processStyle()
// Spec: default "1" -> 1 == Not opaque // Spec: default "1" -> 1 == Not opaque
if(~m_flags & SVG_STYLE_FLAG_FILL_OPACITY) if(~m_flags & SVG_STYLE_FLAG_FILL_OPACITY)
{ {
if(tqparentStyle) if(parentStyle)
m_fillOpacity = tqparentStyle->getFillOpacity(); m_fillOpacity = parentStyle->getFillOpacity();
else else
m_fillOpacity = 1; m_fillOpacity = 1;
} }
if(~m_flags & SVG_STYLE_FLAG_STROKE_OPACITY) if(~m_flags & SVG_STYLE_FLAG_STROKE_OPACITY)
{ {
if(tqparentStyle) if(parentStyle)
m_strokeOpacity = tqparentStyle->getStrokeOpacity(); m_strokeOpacity = parentStyle->getStrokeOpacity();
else else
m_strokeOpacity = 1; m_strokeOpacity = 1;
} }
@ -273,14 +273,14 @@ void SVGStylableImpl::processStyle()
// Fake group opacity by multiplying by our tqparent's group opacity // Fake group opacity by multiplying by our tqparent's group opacity
if(~m_flags & SVG_STYLE_FLAG_OPACITY) if(~m_flags & SVG_STYLE_FLAG_OPACITY)
{ {
if(tqparentStyle) if(parentStyle)
m_opacity = tqparentStyle->getOpacity(); m_opacity = parentStyle->getOpacity();
else else
m_opacity = 1; m_opacity = 1;
} }
else else
if(tqparentStyle) if(parentStyle)
m_opacity *= tqparentStyle->getOpacity(); m_opacity *= parentStyle->getOpacity();
if(~m_flags & SVG_STYLE_FLAG_CLIP_PATH) if(~m_flags & SVG_STYLE_FLAG_CLIP_PATH)
m_clipPath = ""; m_clipPath = "";
@ -291,16 +291,16 @@ void SVGStylableImpl::processStyle()
// Spec: default "nonzero" // Spec: default "nonzero"
if(~m_flags & SVG_STYLE_FLAG_FILL_RULE) if(~m_flags & SVG_STYLE_FLAG_FILL_RULE)
{ {
if(tqparentStyle) if(parentStyle)
m_fillRule = tqparentStyle->getFillRule(); m_fillRule = parentStyle->getFillRule();
else else
m_fillRule = RULE_NONZERO; m_fillRule = RULE_NONZERO;
} }
if(~m_flags & SVG_STYLE_FLAG_CLIP_RULE) if(~m_flags & SVG_STYLE_FLAG_CLIP_RULE)
{ {
if(tqparentStyle) if(parentStyle)
m_clipRule = tqparentStyle->getClipRule(); m_clipRule = parentStyle->getClipRule();
else else
m_clipRule = RULE_NONZERO; m_clipRule = RULE_NONZERO;
} }
@ -308,8 +308,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "hidden" // Spec: default "hidden"
if(~m_flags & SVG_STYLE_FLAG_OVERFLOW) if(~m_flags & SVG_STYLE_FLAG_OVERFLOW)
{ {
if(tqparentStyle) if(parentStyle)
m_overflow = tqparentStyle->getOverflow(); m_overflow = parentStyle->getOverflow();
else else
m_overflow = false; m_overflow = false;
} }
@ -322,8 +322,8 @@ void SVGStylableImpl::processStyle()
if(~m_flags & SVG_STYLE_FLAG_VISIBILITY) if(~m_flags & SVG_STYLE_FLAG_VISIBILITY)
{ {
if(tqparentStyle) if(parentStyle)
m_visible = tqparentStyle->getVisible(); m_visible = parentStyle->getVisible();
else else
m_visible = true; m_visible = true;
} }
@ -331,8 +331,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "medium" // Spec: default "medium"
if(~m_flags & SVG_STYLE_FLAG_FONT_SIZE) if(~m_flags & SVG_STYLE_FLAG_FONT_SIZE)
{ {
if(tqparentStyle) if(parentStyle)
m_fontSize = tqparentStyle->getFontSize(); m_fontSize = parentStyle->getFontSize();
else else
m_fontSize = fontSizeForText("medium"); m_fontSize = fontSizeForText("medium");
} }
@ -347,8 +347,8 @@ void SVGStylableImpl::processStyle()
} }
SVGStringListImpl *fontFamily = 0; SVGStringListImpl *fontFamily = 0;
if(tqparentStyle) if(parentStyle)
fontFamily = tqparentStyle->getFontFamily(); fontFamily = parentStyle->getFontFamily();
if(fontFamily) if(fontFamily)
*m_fontFamily = *fontFamily; *m_fontFamily = *fontFamily;
@ -364,8 +364,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "normal" // Spec: default "normal"
if(~m_flags & SVG_STYLE_FLAG_FONT_STYLE) if(~m_flags & SVG_STYLE_FLAG_FONT_STYLE)
{ {
if(tqparentStyle) if(parentStyle)
m_fontStyle = tqparentStyle->getFontStyle(); m_fontStyle = parentStyle->getFontStyle();
else else
m_fontStyle = FSNORMAL; m_fontStyle = FSNORMAL;
} }
@ -373,8 +373,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "normal" // Spec: default "normal"
if(~m_flags & SVG_STYLE_FLAG_FONT_WEIGHT) if(~m_flags & SVG_STYLE_FLAG_FONT_WEIGHT)
{ {
if(tqparentStyle) if(parentStyle)
m_fontWeight = tqparentStyle->getFontWeight(); m_fontWeight = parentStyle->getFontWeight();
else else
m_fontWeight = "normal"; m_fontWeight = "normal";
} }
@ -382,8 +382,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "start" // Spec: default "start"
if(~m_flags & SVG_STYLE_FLAG_TEXT_ANCHOR) if(~m_flags & SVG_STYLE_FLAG_TEXT_ANCHOR)
{ {
if(tqparentStyle) if(parentStyle)
m_textAnchor = tqparentStyle->getTextAnchor(); m_textAnchor = parentStyle->getTextAnchor();
else else
m_textAnchor = TASTART; m_textAnchor = TASTART;
} }
@ -391,8 +391,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "LTR" // Spec: default "LTR"
if(~m_flags & SVG_STYLE_FLAG_TEXT_DIRECTION) if(~m_flags & SVG_STYLE_FLAG_TEXT_DIRECTION)
{ {
if(tqparentStyle) if(parentStyle)
m_textDirection = tqparentStyle->getTextDirection(); m_textDirection = parentStyle->getTextDirection();
else else
m_textDirection = LTR; m_textDirection = LTR;
} }
@ -400,8 +400,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "none" // Spec: default "none"
if(~m_flags & SVG_STYLE_FLAG_TEXT_DECORATION) if(~m_flags & SVG_STYLE_FLAG_TEXT_DECORATION)
{ {
if(tqparentStyle) if(parentStyle)
m_textDecoration = tqparentStyle->getTextDecoration(); m_textDecoration = parentStyle->getTextDecoration();
else else
m_textDecoration = TDNONE; m_textDecoration = TDNONE;
} }
@ -409,8 +409,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "baseline" // Spec: default "baseline"
if(~m_flags & SVG_STYLE_FLAG_BASELINE_SHIFT) if(~m_flags & SVG_STYLE_FLAG_BASELINE_SHIFT)
{ {
if(tqparentStyle) if(parentStyle)
m_baselineShift = tqparentStyle->getBaselineShift(); m_baselineShift = parentStyle->getBaselineShift();
else else
m_baselineShift = "baseline"; m_baselineShift = "baseline";
} }
@ -418,8 +418,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "lr-tb", FIXME // Spec: default "lr-tb", FIXME
if(~m_flags & SVG_STYLE_FLAG_TEXT_WRITING_MODE) if(~m_flags & SVG_STYLE_FLAG_TEXT_WRITING_MODE)
{ {
if(tqparentStyle) if(parentStyle)
m_textWritingMode = tqparentStyle->getTextWritingMode(); m_textWritingMode = parentStyle->getTextWritingMode();
else else
m_textWritingMode = LR; m_textWritingMode = LR;
} }
@ -427,8 +427,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "normal" // Spec: default "normal"
if(~m_flags & SVG_STYLE_FLAG_TEXT_UNICODE_BIDI) if(~m_flags & SVG_STYLE_FLAG_TEXT_UNICODE_BIDI)
{ {
if(tqparentStyle) if(parentStyle)
m_textUnicodeBidi = tqparentStyle->getTextUnicodeBidi(); m_textUnicodeBidi = parentStyle->getTextUnicodeBidi();
else else
m_textUnicodeBidi = UBNORMAL; m_textUnicodeBidi = UBNORMAL;
} }
@ -436,8 +436,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "auto" // Spec: default "auto"
if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_VERTICAL) if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_VERTICAL)
{ {
if(tqparentStyle) if(parentStyle)
m_glyphOrientationVertical = tqparentStyle->getGlyphOrientationVertical(); m_glyphOrientationVertical = parentStyle->getGlyphOrientationVertical();
else else
m_glyphOrientationVertical = "auto"; m_glyphOrientationVertical = "auto";
} }
@ -445,8 +445,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "auto" // Spec: default "auto"
if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_HORIZONTAL) if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_HORIZONTAL)
{ {
if(tqparentStyle) if(parentStyle)
m_glyphOrientationHorizontal = tqparentStyle->getGlyphOrientationHorizontal(); m_glyphOrientationHorizontal = parentStyle->getGlyphOrientationHorizontal();
else else
m_glyphOrientationHorizontal = "auto"; m_glyphOrientationHorizontal = "auto";
} }
@ -454,8 +454,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "normal" // Spec: default "normal"
if(~m_flags & SVG_STYLE_FLAG_LETTER_SPACING) if(~m_flags & SVG_STYLE_FLAG_LETTER_SPACING)
{ {
if(tqparentStyle) if(parentStyle)
m_letterSpacing = tqparentStyle->getLetterSpacing(); m_letterSpacing = parentStyle->getLetterSpacing();
else else
m_letterSpacing = "normal"; m_letterSpacing = "normal";
} }
@ -463,8 +463,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "normal" // Spec: default "normal"
if(~m_flags & SVG_STYLE_FLAG_WORD_SPACING) if(~m_flags & SVG_STYLE_FLAG_WORD_SPACING)
{ {
if(tqparentStyle) if(parentStyle)
m_wordSpacing = tqparentStyle->getWordSpacing(); m_wordSpacing = parentStyle->getWordSpacing();
else else
m_wordSpacing = "normal"; m_wordSpacing = "normal";
} }
@ -481,8 +481,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "none" // Spec: default "none"
if(~m_flags & SVG_STYLE_FLAG_MARKER_START) if(~m_flags & SVG_STYLE_FLAG_MARKER_START)
{ {
if(tqparentStyle) if(parentStyle)
m_startMarker = tqparentStyle->getStartMarker(); m_startMarker = parentStyle->getStartMarker();
else else
m_startMarker = TQString(); m_startMarker = TQString();
} }
@ -490,8 +490,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "none" // Spec: default "none"
if(~m_flags & SVG_STYLE_FLAG_MARKER_MID) if(~m_flags & SVG_STYLE_FLAG_MARKER_MID)
{ {
if(tqparentStyle) if(parentStyle)
m_midMarker = tqparentStyle->getMidMarker(); m_midMarker = parentStyle->getMidMarker();
else else
m_midMarker = TQString(); m_midMarker = TQString();
} }
@ -499,8 +499,8 @@ void SVGStylableImpl::processStyle()
// Spec: default "none" // Spec: default "none"
if(~m_flags & SVG_STYLE_FLAG_MARKER_END) if(~m_flags & SVG_STYLE_FLAG_MARKER_END)
{ {
if(tqparentStyle) if(parentStyle)
m_endMarker = tqparentStyle->getEndMarker(); m_endMarker = parentStyle->getEndMarker();
else else
m_endMarker = TQString(); m_endMarker = TQString();
} }

@ -95,7 +95,7 @@ TQString SVGTextContentElementImpl::textDirectionAwareText()
return text; return text;
} }
T2P::GlyphLayoutParams *SVGTextContentElementImpl::tqlayoutParams() const T2P::GlyphLayoutParams *SVGTextContentElementImpl::layoutParams() const
{ {
SVGStylableImpl *style = const_cast<SVGTextContentElementImpl *>(this); SVGStylableImpl *style = const_cast<SVGTextContentElementImpl *>(this);

@ -52,7 +52,7 @@ public:
TQString textDirectionAwareText(); TQString textDirectionAwareText();
virtual T2P::GlyphLayoutParams *tqlayoutParams() const; virtual T2P::GlyphLayoutParams *layoutParams() const;
SVGAnimatedLengthImpl *textLength() const; SVGAnimatedLengthImpl *textLength() const;
SVGAnimatedEnumerationImpl *lengthAdjust() const; SVGAnimatedEnumerationImpl *lengthAdjust() const;

@ -104,9 +104,9 @@ void SVGTextPathElementImpl::setAttributes()
KSVG_SET_ALT_ATTRIBUTE(Spacing, "exact") KSVG_SET_ALT_ATTRIBUTE(Spacing, "exact")
} }
T2P::GlyphLayoutParams *SVGTextPathElementImpl::tqlayoutParams() const T2P::GlyphLayoutParams *SVGTextPathElementImpl::layoutParams() const
{ {
T2P::GlyphLayoutParams *params = SVGTextContentElementImpl::tqlayoutParams(); T2P::GlyphLayoutParams *params = SVGTextContentElementImpl::layoutParams();
params->setTextPathStartOffset(startOffset()->baseVal()->value()); params->setTextPathStartOffset(startOffset()->baseVal()->value());
return params; return params;
} }

@ -41,7 +41,7 @@ public:
SVGAnimatedEnumerationImpl *spacing() const; SVGAnimatedEnumerationImpl *spacing() const;
virtual void setAttributes(); virtual void setAttributes();
virtual T2P::GlyphLayoutParams *tqlayoutParams() const; virtual T2P::GlyphLayoutParams *layoutParams() const;
private: private:
SVGAnimatedLengthImpl *m_startOffset; SVGAnimatedLengthImpl *m_startOffset;

@ -83,18 +83,18 @@ SVGMatrixImpl *SVGTransformableImpl::getCTM()
SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this); SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this);
Q_ASSERT(element); Q_ASSERT(element);
DOM::Node tqparentNde = element->parentNode(); DOM::Node parentNde = element->parentNode();
if(!tqparentNde.isNull() && tqparentNde.nodeType() != DOM::Node::DOCUMENT_NODE) if(!parentNde.isNull() && parentNde.nodeType() != DOM::Node::DOCUMENT_NODE)
{ {
SVGElementImpl *tqparent = element->ownerDoc()->getElementFromHandle(tqparentNde.handle()); SVGElementImpl *tqparent = element->ownerDoc()->getElementFromHandle(parentNde.handle());
SVGLocatableImpl *locatableParent = dynamic_cast<SVGLocatableImpl *>(tqparent); SVGLocatableImpl *locatableParent = dynamic_cast<SVGLocatableImpl *>(tqparent);
if(locatableParent) if(locatableParent)
{ {
SVGMatrixImpl *tqparentCTM = locatableParent->getCTM(); SVGMatrixImpl *parentCTM = locatableParent->getCTM();
ctm->multiply(tqparentCTM); ctm->multiply(parentCTM);
tqparentCTM->deref(); parentCTM->deref();
} }
} }
@ -124,7 +124,7 @@ void SVGTransformableImpl::updateLocalMatrix()
} }
} }
tqinvalidateCachedMatrices(); invalidateCachedMatrices();
} }
// Ecma stuff // Ecma stuff

@ -592,7 +592,7 @@ ksvg_art_rgb_affine_clip_callback (void *callback_data, int y,
} }
static static
void ksvg_art_rgb_affine_clip_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], void ksvg_art_rgb_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6],
int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
{ {
const art_u8 *src_p; const art_u8 *src_p;
@ -662,7 +662,7 @@ void ksvg_art_rgb_affine_clip_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, in
} }
static void static void
ksvg_art_rgb_affine_clip_tqmask_callback (void *callback_data, int y, ksvg_art_rgb_affine_clip_mask_callback (void *callback_data, int y,
int start, ArtSVPRenderAAStep *steps, int n_steps) int start, ArtSVPRenderAAStep *steps, int n_steps)
{ {
ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
@ -673,14 +673,14 @@ ksvg_art_rgb_affine_clip_tqmask_callback (void *callback_data, int y,
int k; int k;
int *alphatab; int *alphatab;
int alpha; int alpha;
const art_u8 *tqmaskbuf; const art_u8 *maskbuf;
linebuf = data->dst; linebuf = data->dst;
x0 = data->x0; x0 = data->x0;
x1 = data->x1; x1 = data->x1;
alphatab = data->alphatab; alphatab = data->alphatab;
tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); maskbuf = data->tqmask + (y - data->y0) * (x1 - x0);
if(n_steps > 0) if(n_steps > 0)
{ {
@ -689,7 +689,7 @@ ksvg_art_rgb_affine_clip_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_affine_clip_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
for(k = 0; k < n_steps - 1; k++) for(k = 0; k < n_steps - 1; k++)
@ -701,7 +701,7 @@ ksvg_art_rgb_affine_clip_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_affine_clip_tqmask_run(linebuf + (run_x0 - x0) * 3, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_affine_clip_mask_run(linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
running_sum += steps[k].delta; running_sum += steps[k].delta;
@ -709,14 +709,14 @@ ksvg_art_rgb_affine_clip_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_affine_clip_tqmask_run(linebuf + (run_x1 - x0) * 3, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_affine_clip_mask_run(linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
else else
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_affine_clip_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
data->dst += data->dst_rowstride; data->dst += data->dst_rowstride;
@ -853,7 +853,7 @@ ksvg_art_rgba_affine_clip_callback (void *callback_data, int y,
} }
static static
void ksvg_art_rgba_affine_clip_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], void ksvg_art_rgba_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6],
int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
{ {
const art_u8 *src_p; const art_u8 *src_p;
@ -930,7 +930,7 @@ void ksvg_art_rgba_affine_clip_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, i
} }
static void static void
ksvg_art_rgba_affine_clip_tqmask_callback (void *callback_data, int y, ksvg_art_rgba_affine_clip_mask_callback (void *callback_data, int y,
int start, ArtSVPRenderAAStep *steps, int n_steps) int start, ArtSVPRenderAAStep *steps, int n_steps)
{ {
ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
@ -941,14 +941,14 @@ ksvg_art_rgba_affine_clip_tqmask_callback (void *callback_data, int y,
int k; int k;
int *alphatab; int *alphatab;
int alpha; int alpha;
const art_u8 *tqmaskbuf; const art_u8 *maskbuf;
linebuf = data->dst; linebuf = data->dst;
x0 = data->x0; x0 = data->x0;
x1 = data->x1; x1 = data->x1;
alphatab = data->alphatab; alphatab = data->alphatab;
tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); maskbuf = data->tqmask + (y - data->y0) * (x1 - x0);
if(n_steps > 0) if(n_steps > 0)
{ {
@ -957,7 +957,7 @@ ksvg_art_rgba_affine_clip_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_affine_clip_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
for(k = 0; k < n_steps - 1; k++) for(k = 0; k < n_steps - 1; k++)
@ -969,7 +969,7 @@ ksvg_art_rgba_affine_clip_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_affine_clip_tqmask_run(linebuf + (run_x0 - x0) * 4, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_affine_clip_mask_run(linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
running_sum += steps[k].delta; running_sum += steps[k].delta;
@ -977,14 +977,14 @@ ksvg_art_rgba_affine_clip_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_affine_clip_tqmask_run(linebuf + (run_x1 - x0) * 4, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_affine_clip_mask_run(linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
else else
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_affine_clip_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
data->dst += data->dst_rowstride; data->dst += data->dst_rowstride;
@ -1064,14 +1064,14 @@ void ksvg_art_rgb_affine_clip(const ArtSVP *svp, art_u8 *dst, int x0, int y0, in
if(dst_channels == 3) if(dst_channels == 3)
{ {
if(tqmask) if(tqmask)
art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_tqmask_callback, &data); art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_mask_callback, &data);
else else
art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_callback, &data); art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_callback, &data);
} }
else else
{ {
if(tqmask) if(tqmask)
art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_tqmask_callback, &data); art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_mask_callback, &data);
else else
art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_callback, &data); art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_callback, &data);
} }
@ -1228,7 +1228,7 @@ ksvg_art_rgb_texture_callback (void *callback_data, int y,
} }
static static
void ksvg_art_rgb_texture_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], void ksvg_art_rgb_texture_mask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6],
int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
{ {
const art_u8 *src_p; const art_u8 *src_p;
@ -1322,7 +1322,7 @@ void ksvg_art_rgb_texture_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0
} }
static void static void
ksvg_art_rgb_texture_tqmask_callback (void *callback_data, int y, ksvg_art_rgb_texture_mask_callback (void *callback_data, int y,
int start, ArtSVPRenderAAStep *steps, int n_steps) int start, ArtSVPRenderAAStep *steps, int n_steps)
{ {
ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
@ -1333,7 +1333,7 @@ ksvg_art_rgb_texture_tqmask_callback (void *callback_data, int y,
int k; int k;
int *alphatab; int *alphatab;
int alpha; int alpha;
const art_u8 *tqmaskbuf; const art_u8 *maskbuf;
linebuf = data->dst; linebuf = data->dst;
x0 = data->x0; x0 = data->x0;
@ -1341,7 +1341,7 @@ ksvg_art_rgb_texture_tqmask_callback (void *callback_data, int y,
alphatab = data->alphatab; alphatab = data->alphatab;
tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); maskbuf = data->tqmask + (y - data->y0) * (x1 - x0);
if(n_steps > 0) if(n_steps > 0)
{ {
@ -1350,7 +1350,7 @@ ksvg_art_rgb_texture_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_texture_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_texture_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
for(k = 0; k < n_steps - 1; k++) for(k = 0; k < n_steps - 1; k++)
@ -1362,7 +1362,7 @@ ksvg_art_rgb_texture_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_texture_tqmask_run(linebuf + (run_x0 - x0) * 3, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_texture_mask_run(linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
running_sum += steps[k].delta; running_sum += steps[k].delta;
@ -1370,14 +1370,14 @@ ksvg_art_rgb_texture_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_texture_tqmask_run(linebuf + (run_x1 - x0) * 3, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_texture_mask_run(linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
else else
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgb_texture_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgb_texture_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
data->dst += data->dst_rowstride; data->dst += data->dst_rowstride;
@ -1545,7 +1545,7 @@ ksvg_art_rgba_texture_callback (void *callback_data, int y,
} }
static static
void ksvg_art_rgba_texture_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], void ksvg_art_rgba_texture_mask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6],
int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
{ {
const art_u8 *src_p; const art_u8 *src_p;
@ -1651,7 +1651,7 @@ void ksvg_art_rgba_texture_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x
} }
static void static void
ksvg_art_rgba_texture_tqmask_callback (void *callback_data, int y, ksvg_art_rgba_texture_mask_callback (void *callback_data, int y,
int start, ArtSVPRenderAAStep *steps, int n_steps) int start, ArtSVPRenderAAStep *steps, int n_steps)
{ {
ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
@ -1662,7 +1662,7 @@ ksvg_art_rgba_texture_tqmask_callback (void *callback_data, int y,
int k; int k;
int *alphatab; int *alphatab;
int alpha; int alpha;
const art_u8 *tqmaskbuf; const art_u8 *maskbuf;
linebuf = data->dst; linebuf = data->dst;
x0 = data->x0; x0 = data->x0;
@ -1670,7 +1670,7 @@ ksvg_art_rgba_texture_tqmask_callback (void *callback_data, int y,
alphatab = data->alphatab; alphatab = data->alphatab;
tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); maskbuf = data->tqmask + (y - data->y0) * (x1 - x0);
if(n_steps > 0) if(n_steps > 0)
{ {
@ -1679,7 +1679,7 @@ ksvg_art_rgba_texture_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_texture_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_texture_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
for(k = 0; k < n_steps - 1; k++) for(k = 0; k < n_steps - 1; k++)
@ -1691,7 +1691,7 @@ ksvg_art_rgba_texture_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_texture_tqmask_run(linebuf + (run_x0 - x0) * 4, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_texture_mask_run(linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
running_sum += steps[k].delta; running_sum += steps[k].delta;
@ -1699,14 +1699,14 @@ ksvg_art_rgba_texture_tqmask_callback (void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_texture_tqmask_run(linebuf + (run_x1 - x0) * 4, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_texture_mask_run(linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
} }
else else
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
ksvg_art_rgba_texture_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); ksvg_art_rgba_texture_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
} }
data->dst += data->dst_rowstride; data->dst += data->dst_rowstride;
@ -1796,9 +1796,9 @@ void ksvg_art_rgb_texture(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1
if(tqmask) if(tqmask)
{ {
if(dst_channels == 3) if(dst_channels == 3)
art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_texture_tqmask_callback, &data); art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_texture_mask_callback, &data);
else else
art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_texture_tqmask_callback, &data); art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_texture_mask_callback, &data);
} }
else else
{ {

@ -124,7 +124,7 @@ art_ksvg_rgba_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, i
} }
static void static void
art_ksvg_rgba_tqmask_run_alpha (art_u8 *buf, art_u8 *tqmask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) art_ksvg_rgba_mask_run_alpha (art_u8 *buf, art_u8 *tqmask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n)
{ {
int i; int i;
int v; int v;
@ -330,7 +330,7 @@ art_ksvg_rgba_svp_alpha_opaque_callback(void *callback_data, int y,
} }
static void static void
art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y, art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y,
int start, ArtSVPRenderAAStep *steps, int n_steps) int start, ArtSVPRenderAAStep *steps, int n_steps)
{ {
ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data; ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data;
@ -342,7 +342,7 @@ art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y,
art_u8 r, g, b; art_u8 r, g, b;
int *alphatab; int *alphatab;
int alpha; int alpha;
art_u8 *tqmaskbuf; art_u8 *maskbuf;
linebuf = data->buf; linebuf = data->buf;
x0 = data->x0; x0 = data->x0;
@ -353,7 +353,7 @@ art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y,
b = data->b; b = data->b;
alphatab = data->alphatab; alphatab = data->alphatab;
tqmaskbuf = data->tqmask + (y - data->y0) * (data->x1 - data->x0); maskbuf = data->tqmask + (y - data->y0) * (data->x1 - data->x0);
if(n_steps > 0) if(n_steps > 0)
{ {
@ -362,7 +362,7 @@ art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgba_tqmask_run_alpha (linebuf, tqmaskbuf, art_ksvg_rgba_mask_run_alpha (linebuf, maskbuf,
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
run_x1 - x0); run_x1 - x0);
} }
@ -376,7 +376,7 @@ art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgba_tqmask_run_alpha (linebuf + (run_x0 - x0) * 4, tqmaskbuf + (run_x0 - x0), art_ksvg_rgba_mask_run_alpha (linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0),
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
run_x1 - run_x0); run_x1 - run_x0);
} }
@ -386,7 +386,7 @@ art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgba_tqmask_run_alpha (linebuf + (run_x1 - x0) * 4, tqmaskbuf + (run_x1 - x0) , art_ksvg_rgba_mask_run_alpha (linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0) ,
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
x1 - run_x1); x1 - run_x1);
} }
@ -395,7 +395,7 @@ art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgba_tqmask_run_alpha (linebuf, tqmaskbuf, art_ksvg_rgba_mask_run_alpha (linebuf, maskbuf,
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
x1 - x0); x1 - x0);
} }
@ -472,7 +472,7 @@ art_ksvg_rgba_svp_alpha(const ArtSVP *svp,
data.y0 = y0; data.y0 = y0;
if(tqmask) if(tqmask)
art_svp_render_aa (svp, x0, y0, x1, y1, art_ksvg_rgba_svp_alpha_tqmask_callback, &data); art_svp_render_aa (svp, x0, y0, x1, y1, art_ksvg_rgba_svp_alpha_mask_callback, &data);
else else
{ {
if (alpha == 255) if (alpha == 255)
@ -485,7 +485,7 @@ art_ksvg_rgba_svp_alpha(const ArtSVP *svp,
/* RGB renderers */ /* RGB renderers */
static void static void
art_ksvg_rgb_tqmask_run_alpha(art_u8 *buf, art_u8 *tqmask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) art_ksvg_rgb_mask_run_alpha(art_u8 *buf, art_u8 *tqmask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n)
{ {
int i; int i;
int v; int v;
@ -515,7 +515,7 @@ art_ksvg_rgb_tqmask_run_alpha(art_u8 *buf, art_u8 *tqmask, art_u8 r, art_u8 g, a
} }
static void static void
art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y, art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y,
int start, ArtSVPRenderAAStep *steps, int n_steps) int start, ArtSVPRenderAAStep *steps, int n_steps)
{ {
ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data; ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data;
@ -527,7 +527,7 @@ art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y,
art_u8 r, g, b; art_u8 r, g, b;
int *alphatab; int *alphatab;
int alpha; int alpha;
art_u8 *tqmaskbuf; art_u8 *maskbuf;
linebuf = data->buf; linebuf = data->buf;
x0 = data->x0; x0 = data->x0;
@ -538,7 +538,7 @@ art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y,
b = data->b; b = data->b;
alphatab = data->alphatab; alphatab = data->alphatab;
tqmaskbuf = data->tqmask + (y - data->y0) * (data->x1 - data->x0); maskbuf = data->tqmask + (y - data->y0) * (data->x1 - data->x0);
if(n_steps > 0) if(n_steps > 0)
{ {
@ -547,7 +547,7 @@ art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgb_tqmask_run_alpha (linebuf, tqmaskbuf, art_ksvg_rgb_mask_run_alpha (linebuf, maskbuf,
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
run_x1 - x0); run_x1 - x0);
} }
@ -561,7 +561,7 @@ art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgb_tqmask_run_alpha (linebuf + (run_x0 - x0) * 3, tqmaskbuf + (run_x0 - x0), art_ksvg_rgb_mask_run_alpha (linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0),
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
run_x1 - run_x0); run_x1 - run_x0);
} }
@ -571,7 +571,7 @@ art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgb_tqmask_run_alpha (linebuf + (run_x1 - x0) * 3, tqmaskbuf + (run_x1 - x0) , art_ksvg_rgb_mask_run_alpha (linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0) ,
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
x1 - run_x1); x1 - run_x1);
} }
@ -580,7 +580,7 @@ art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y,
{ {
alpha = (running_sum >> 16) & 0xff; alpha = (running_sum >> 16) & 0xff;
if(alpha) if(alpha)
art_ksvg_rgb_tqmask_run_alpha (linebuf, tqmaskbuf, art_ksvg_rgb_mask_run_alpha (linebuf, maskbuf,
r, g, b, alphatab[alpha], r, g, b, alphatab[alpha],
x1 - x0); x1 - x0);
} }
@ -654,6 +654,6 @@ art_ksvg_rgb_svp_alpha_tqmask(const ArtSVP *svp,
data.x1 = x1; data.x1 = x1;
data.y0 = y0; data.y0 = y0;
art_svp_render_aa(svp, x0, y0, x1, y1, art_ksvg_rgb_svp_alpha_tqmask_callback, &data); art_svp_render_aa(svp, x0, y0, x1, y1, art_ksvg_rgb_svp_alpha_mask_callback, &data);
} }

@ -162,7 +162,7 @@ void Converter::selectGlyph(GlyphRenderParams *params)
// 2. Load glyph into font's glyphSlot, according to the GlyphLayoutParams // 2. Load glyph into font's glyphSlot, according to the GlyphLayoutParams
int flags = FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP; int flags = FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
// 3. Don't pass FT_LOAD_VERTICAL_LAYOUT on TTB tqlayouts when rendering // 3. Don't pass FT_LOAD_VERTICAL_LAYOUT on TTB layouts when rendering
// a latin glyph because it needs to be rotated... // a latin glyph because it needs to be rotated...
if(params->tqlayout()->tb()) if(params->tqlayout()->tb())
{ {
@ -456,7 +456,7 @@ GlyphSet *Converter::calcString(Font *font, const unsigned short *text, unsigned
result->m_height = T2PMAX(1, int(bbox.b().y() - bbox.a().y())); result->m_height = T2PMAX(1, int(bbox.b().y() - bbox.a().y()));
// Correct bounding box information also on // Correct bounding box information also on
// vertical tqlayouts! (Niko) // vertical layouts! (Niko)
if(!params->tb()) if(!params->tb())
{ {
if(bpath) if(bpath)

@ -185,7 +185,7 @@ namespace T2P
private: private:
Font *m_font; Font *m_font;
const GlyphLayoutParams *m_layout; // Glyph tqlayouting params const GlyphLayoutParams *m_layout; // Glyph layouting params
unsigned int m_glyphIndex; // 'character' index in font unsigned int m_glyphIndex; // 'character' index in font
unsigned int m_lastGlyph; // Kerning unsigned int m_lastGlyph; // Kerning

@ -372,7 +372,7 @@ template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> co
#if (defined(__GNUC__) && (__GNUC__ < 3)) || (defined(__EDG_VERSION__) && (__EDG_VERSION__ <= 238)) #if (defined(__GNUC__) && (__GNUC__ < 3)) || (defined(__EDG_VERSION__) && (__EDG_VERSION__ <= 238))
// g++ 2.9x doesn't allow static_cast<X const *>(void *) // g++ 2.9x doesn't allow static_cast<X const *>(void *)
// aptqparently EDG 2.38 also doesn't accept it // apparently EDG 2.38 also doesn't accept it
template<class D, class T> D * get_deleter(shared_ptr<T> const & p) template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
{ {

@ -63,7 +63,7 @@ void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf,
void gdk_pixbuf_xlib_render_pixmap_and_tqmask (GdkPixbuf *pixbuf, void gdk_pixbuf_xlib_render_pixmap_and_tqmask (GdkPixbuf *pixbuf,
Pixmap *pixmap_return, Pixmap *pixmap_return,
Pixmap *tqmask_return, Pixmap *mask_return,
int alpha_threshold); int alpha_threshold);

@ -913,7 +913,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
static_image[i]->byte_order = MSBFirst; static_image[i]->byte_order = MSBFirst;
} }
} }
/* ok, so aptqparently, image_info->bpp is actually /* ok, so apparently, image_info->bpp is actually
BYTES per pixel. What fun! */ BYTES per pixel. What fun! */
switch (static_image[0]->bits_per_pixel) { switch (static_image[0]->bits_per_pixel) {
case 1: case 1:

@ -214,7 +214,7 @@ void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMat
TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1); TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
TQByteArray tqmask = SVGMaskElementImpl::tqmaskRectangle(tqshape, screenBBox); TQByteArray tqmask = SVGMaskElementImpl::maskRectangle(tqshape, screenBBox);
double affine[6]; double affine[6];
KSVGHelper::matrixToAffine(matrix, affine); KSVGHelper::matrixToAffine(matrix, affine);
@ -330,22 +330,22 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape)
else else
{ {
SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(tqshape); SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(tqshape);
DOM::Node tqparentNode = element->parentNode(); DOM::Node parentNode = element->parentNode();
if(!tqparentNode.isNull()) if(!parentNode.isNull())
{ {
SVGElementImpl *tqparent = element->ownerDoc()->getElementFromHandle(tqparentNode.handle()); SVGElementImpl *tqparent = element->ownerDoc()->getElementFromHandle(parentNode.handle());
if(tqparent) if(tqparent)
{ {
SVGShapeImpl *tqparentShape = dynamic_cast<SVGShapeImpl *>(tqparent); SVGShapeImpl *parentShape = dynamic_cast<SVGShapeImpl *>(tqparent);
if(tqparentShape) if(parentShape)
{ {
// Clip against ancestor clipping paths // Clip against ancestor clipping paths
ArtSVP *tqparentClippedSvp = clipSingleSVP(clippedSvp, tqparentShape); ArtSVP *parentClippedSvp = clipSingleSVP(clippedSvp, parentShape);
art_svp_free(clippedSvp); art_svp_free(clippedSvp);
clippedSvp = tqparentClippedSvp; clippedSvp = parentClippedSvp;
} }
} }
} }

@ -252,7 +252,7 @@ void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *st
TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1); TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
TQByteArray tqmask = SVGMaskElementImpl::tqmaskRectangle(tqshape, screenBBox); TQByteArray tqmask = SVGMaskElementImpl::maskRectangle(tqshape, screenBBox);
if(paintType(style) == SVG_PAINTTYPE_URI) if(paintType(style) == SVG_PAINTTYPE_URI)
{ {

@ -56,7 +56,7 @@ KSVGPluginFactory::~KSVGPluginFactory()
s_about = 0; s_about = 0;
} }
KParts::Part *KSVGPluginFactory::createPartObject(TQWidget *tqparentWidget, const char *wname, TQObject *tqparent, const char *name, const char *, const TQStringList &args) KParts::Part *KSVGPluginFactory::createPartObject(TQWidget *parentWidget, const char *wname, TQObject *tqparent, const char *name, const char *, const TQStringList &args)
{ {
// Get the width and height of the <embed> // Get the width and height of the <embed>
// TODO : <object> // TODO : <object>
@ -72,7 +72,7 @@ KParts::Part *KSVGPluginFactory::createPartObject(TQWidget *tqparentWidget, cons
height = r2.cap(3).toUInt(&dummy); height = r2.cap(3).toUInt(&dummy);
} }
return new KSVGPlugin(tqparentWidget, wname, tqparent, name, width, height); return new KSVGPlugin(parentWidget, wname, tqparent, name, width, height);
} }
KInstance *KSVGPluginFactory::instance() KInstance *KSVGPluginFactory::instance()

@ -35,7 +35,7 @@ public:
KSVGPluginFactory(TQObject *tqparent = 0, const char *name = 0); KSVGPluginFactory(TQObject *tqparent = 0, const char *name = 0);
virtual ~KSVGPluginFactory(); virtual ~KSVGPluginFactory();
virtual KParts::Part *createPartObject(TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList()); virtual KParts::Part *createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList());
static KInstance *instance(); static KInstance *instance();

@ -37,7 +37,7 @@ class KSVGPlugin : public KParts::ReadOnlyPart
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
KSVGPlugin(TQWidget *tqparentWidget, const char *wname, TQObject *tqparent, const char *name, unsigned int width = 0, unsigned int height = 0); KSVGPlugin(TQWidget *parentWidget, const char *wname, TQObject *tqparent, const char *name, unsigned int width = 0, unsigned int height = 0);
virtual ~KSVGPlugin(); virtual ~KSVGPlugin();
virtual bool openFile() { return false; } virtual bool openFile() { return false; }

@ -103,13 +103,13 @@ linking-uri-02-b -
linking-uri-03-t x linking-uri-03-t x
[MASKING] [MASKING]
tqmasking-tqmask-01-b - masking-tqmask-01-b -
tqmasking-opacity-01-b o masking-opacity-01-b o
tqmasking-path-01-b x masking-path-01-b x
tqmasking-path-02-b x masking-path-02-b x
tqmasking-path-03-t x masking-path-03-t x
tqmasking-path-04-b o masking-path-04-b o
tqmasking-path-05-f x masking-path-05-f x
[METADATA] [METADATA]
metadata-example-01-b x metadata-example-01-b x

@ -81,15 +81,15 @@ linking-view-BE-05.svg o
linking-xlinkAttr-BE-02.svg x linking-xlinkAttr-BE-02.svg x
Group 11: [Masking] - 21.09.2003 Group 11: [Masking] - 21.09.2003
tqmasking-clipPath-BE-01.svg: x masking-clipPath-BE-01.svg: x
tqmasking-clipPath-BE-02.svg: x masking-clipPath-BE-02.svg: x
tqmasking-clipPath-BE-08.svg: x masking-clipPath-BE-08.svg: x
tqmasking-clipRule-BE-03.svg: x masking-clipRule-BE-03.svg: x
tqmasking-groupOpac-BE-04.svg: x masking-groupOpac-BE-04.svg: x
tqmasking-tqmask-BE-05.svg: x masking-tqmask-BE-05.svg: x
tqmasking-tqmask-BE-06.svg: x masking-tqmask-BE-06.svg: x
tqmasking-property-BE-07.svg: x masking-property-BE-07.svg: x
tqmasking-vportClip-BE-09.svg: x masking-vportClip-BE-09.svg: x
Group 12: [Metadata] - 21.09.2003 Group 12: [Metadata] - 21.09.2003
metadata-sample-BE-01.svg: x PLANE REFERENCE IMAGE LOOKS WRONG - WE MATCH BATIK'S OUTPUT metadata-sample-BE-01.svg: x PLANE REFERENCE IMAGE LOOKS WRONG - WE MATCH BATIK'S OUTPUT

@ -87,7 +87,7 @@ void FileFinder::keyPressEvent( TQKeyEvent *e )
void FileFinder::hide() void FileFinder::hide()
{ {
KLineEdit::hide(); KLineEdit::hide();
tqparentWidget()->setFocus(); parentWidget()->setFocus();
} }
void FileFinder::slotAccept( const TQString& dir ) void FileFinder::slotAccept( const TQString& dir )

@ -519,12 +519,12 @@ void ImlibWidget::restoreCursor()
setCursor( m_oldCursor ); setCursor( m_oldCursor );
} }
// Retqparenting a widget in TQt in fact means destroying the old X window of the widget // Reparenting a widget in TQt in fact means destroying the old X window of the widget
// and creating a new one. And since the X window used for the Imlib image is a child // and creating a new one. And since the X window used for the Imlib image is a child
// of this widget's X window, destroying this widget's X window would mean also // of this widget's X window, destroying this widget's X window would mean also
// destroying the Imlib image X window. Therefore it needs to be temporarily reparented // destroying the Imlib image X window. Therefore it needs to be temporarily reparented
// away and reparented back to the new X window. // away and reparented back to the new X window.
// Retqparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes. // Reparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes.
void ImlibWidget::reparent( TQWidget* tqparent, WFlags f, const TQPoint& p, bool showIt ) void ImlibWidget::reparent( TQWidget* tqparent, WFlags f, const TQPoint& p, bool showIt )
{ {
XWindowAttributes attr; XWindowAttributes attr;

@ -133,7 +133,7 @@ private slots:
void slotOpenURL(); void slotOpenURL();
void slotSetURL( const KURL& ); void slotSetURL( const KURL& );
void slotURLComboReturnPressed(); void slotURLComboReturnPressed();
// void tqinvalidateImages( const KFileItemList& items ); // void invalidateImages( const KFileItemList& items );
void slotDeleteCurrentImage(ImageWindow *viewer); void slotDeleteCurrentImage(ImageWindow *viewer);
void slotTrashCurrentImage(ImageWindow *viewer); void slotTrashCurrentImage(ImageWindow *viewer);
void slotDeleteCurrentImage(); void slotDeleteCurrentImage();

@ -283,8 +283,8 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a
<includes> <includes>
<include location="global" impldecl="in implementation">kdialog.h</include> <include location="global" impldecl="in implementation">kdialog.h</include>
</includes> </includes>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints> <includehints>
<includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint>

@ -96,7 +96,7 @@ void KImageHolder::mouseMoveEvent( TQMouseEvent *ev )
} }
else // create a selection else // create a selection
{ {
TQWidget * tqparentwidget = ( TQWidget* )tqparent(); TQWidget * parentwidget = ( TQWidget* )tqparent();
if( ! m_bSelecting ) if( ! m_bSelecting )
{ {
m_bSelecting = true; m_bSelecting = true;
@ -127,17 +127,17 @@ void KImageHolder::mouseMoveEvent( TQMouseEvent *ev )
// -2 => scroll to the left 2 px per 50ms // -2 => scroll to the left 2 px per 50ms
// 2 => scroll to the right 2 px per 50ms // 2 => scroll to the right 2 px per 50ms
// ... // ...
m_xOffset = mapTo( tqparentwidget, ev->pos() ).x(); m_xOffset = mapTo( parentwidget, ev->pos() ).x();
m_yOffset = mapTo( tqparentwidget, ev->pos() ).y(); m_yOffset = mapTo( parentwidget, ev->pos() ).y();
if( m_xOffset > 0 ) if( m_xOffset > 0 )
{ {
m_xOffset -= tqparentwidget->width(); m_xOffset -= parentwidget->width();
if( m_xOffset < 0 ) if( m_xOffset < 0 )
m_xOffset = 0; m_xOffset = 0;
} }
if( m_yOffset > 0 ) if( m_yOffset > 0 )
{ {
m_yOffset -= tqparentwidget->height(); m_yOffset -= parentwidget->height();
if( m_yOffset < 0 ) if( m_yOffset < 0 )
m_yOffset = 0; m_yOffset = 0;
} }

@ -55,10 +55,10 @@
typedef KParts::GenericFactory<KViewViewer> KViewViewerFactory; typedef KParts::GenericFactory<KViewViewer> KViewViewerFactory;
K_EXPORT_COMPONENT_FACTORY( libkviewviewer, KViewViewerFactory ) K_EXPORT_COMPONENT_FACTORY( libkviewviewer, KViewViewerFactory )
KViewViewer::KViewViewer( TQWidget *tqparentWidget, const char * /*widgetName*/, KViewViewer::KViewViewer( TQWidget *parentWidget, const char * /*widgetName*/,
TQObject *tqparent, const char *name, const TQStringList & ) TQObject *tqparent, const char *name, const TQStringList & )
: KImageViewer::Viewer( tqparent, name ) : KImageViewer::Viewer( tqparent, name )
, m_pParentWidget( tqparentWidget ) , m_pParentWidget( parentWidget )
, m_pJob( 0 ) , m_pJob( 0 )
, m_pExtension( 0 ) , m_pExtension( 0 )
, m_pCanvas( 0 ) , m_pCanvas( 0 )

@ -49,7 +49,7 @@ class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIf
friend class KViewKonqExtension; friend class KViewKonqExtension;
public: public:
KViewViewer( TQWidget * tqparentWidget, const char * widgetName, KViewViewer( TQWidget * parentWidget, const char * widgetName,
TQObject * tqparent, const char * name, const TQStringList & ); TQObject * tqparent, const char * name, const TQStringList & );
virtual ~KViewViewer(); virtual ~KViewViewer();

@ -180,8 +180,8 @@
<includes> <includes>
<include location="global" impldecl="in implementation">kdialog.h</include> <include location="global" impldecl="in implementation">kdialog.h</include>
</includes> </includes>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints> <includehints>
<includehint>tqwidget.h</includehint> <includehint>tqwidget.h</includehint>
<includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint>

@ -271,8 +271,8 @@
<slot access="private" specifier="non virtual">init()</slot> <slot access="private" specifier="non virtual">init()</slot>
<slot specifier="non virtual">noSort()</slot> <slot specifier="non virtual">noSort()</slot>
</Q_SLOTS> </Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints> <includehints>
<includehint>kdialog.h</includehint> <includehint>kdialog.h</includehint>
<includehint>klistview.h</includehint> <includehint>klistview.h</includehint>

@ -82,11 +82,11 @@ KViewPresenter::KViewPresenter( TQObject* tqparent, const char* name, const TQSt
connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), m_paSlideshow, TQT_SLOT( setChecked( bool ) ) ); connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), m_paSlideshow, TQT_SLOT( setChecked( bool ) ) );
// search for file_open action // search for file_open action
KXMLGUIClient * tqparentClient = static_cast<KXMLGUIClient*>( tqparent->qt_cast( "KXMLGUIClient" ) ); KXMLGUIClient * parentClient = static_cast<KXMLGUIClient*>( tqparent->qt_cast( "KXMLGUIClient" ) );
if( tqparentClient ) if( parentClient )
{ {
m_paFileOpen = tqparentClient->actionCollection()->action( "file_open" ); m_paFileOpen = parentClient->actionCollection()->action( "file_open" );
m_paFileClose = tqparentClient->actionCollection()->action( "file_close" ); m_paFileClose = parentClient->actionCollection()->action( "file_close" );
} }
if( m_paFileClose ) if( m_paFileClose )
connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) ); connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) );

@ -220,7 +220,7 @@ void PhotoBook::updateButton( bool nextExist, bool previousExit)
K_EXPORT_COMPONENT_FACTORY(libphotobook, PhotoBookFactory ) K_EXPORT_COMPONENT_FACTORY(libphotobook, PhotoBookFactory )
PhotoBookPart::PhotoBookPart( PhotoBookPart::PhotoBookPart(
TQWidget *tqparentWidget, const char *widgetName, TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name, TQObject *tqparent, const char *name,
const TQStringList& const TQStringList&
) )
@ -229,7 +229,7 @@ PhotoBookPart::PhotoBookPart(
setInstance(PhotoBookFactory::instance()); setInstance(PhotoBookFactory::instance());
new PhotoBookBrowserExtension(this); new PhotoBookBrowserExtension(this);
bv = new PhotoBook(tqparentWidget, this, widgetName); bv = new PhotoBook(parentWidget, this, widgetName);
setWidget(bv); setWidget(bv);
connect( connect(

@ -115,7 +115,7 @@ Q_OBJECT
public: public:
PhotoBookPart( PhotoBookPart(
TQWidget *tqparentWidget, const char *widgetName, TQWidget *parentWidget, const char *widgetName,
TQObject *tqparent, const char *name=0, TQObject *tqparent, const char *name=0,
const TQStringList& args = TQStringList() const TQStringList& args = TQStringList()
); );

@ -17,7 +17,7 @@
DocumentRenderer::DocumentRenderer(TQWidget* par) DocumentRenderer::DocumentRenderer(TQWidget* par)
: mutex(true), tqparentWidget(par), accessibilityBackground(false), : mutex(true), parentWidget(par), accessibilityBackground(false),
accessibilityBackgroundColor(TQColor(255,255,255)) accessibilityBackgroundColor(TQColor(255,255,255))
{ {
numPages = 0; numPages = 0;

@ -447,7 +447,7 @@ protected:
This pointer can be used by implementations e.g. to display error This pointer can be used by implementations e.g. to display error
messages. This pointer can well be zero. messages. This pointer can well be zero.
*/ */
TQGuardedPtr<TQWidget> tqparentWidget; TQGuardedPtr<TQWidget> parentWidget;
/** specifies if accessibilityBackgroundColor should be used /** specifies if accessibilityBackgroundColor should be used

@ -26,9 +26,9 @@
K_EXPORT_COMPONENT_FACTORY(emptymultipagepart, EmptyMultiPageFactory) K_EXPORT_COMPONENT_FACTORY(emptymultipagepart, EmptyMultiPageFactory)
EmptyMultiPage::EmptyMultiPage(TQWidget* tqparentWidget, const char* widgetName, TQObject* tqparent, const char* name, EmptyMultiPage::EmptyMultiPage(TQWidget* parentWidget, const char* widgetName, TQObject* tqparent, const char* name,
const TQStringList& args) const TQStringList& args)
: KMultiPage(tqparentWidget, widgetName, tqparent, name), emptyRenderer(tqparentWidget) : KMultiPage(parentWidget, widgetName, tqparent, name), emptyRenderer(parentWidget)
{ {
Q_UNUSED(args); Q_UNUSED(args);
setInstance(EmptyMultiPageFactory::instance()); setInstance(EmptyMultiPageFactory::instance());

@ -33,7 +33,7 @@ class EmptyMultiPage : public KMultiPage
TQ_OBJECT TQ_OBJECT
public: public:
EmptyMultiPage(TQWidget* tqparentWidget, const char* widgetName, TQObject* tqparent, const char* name, EmptyMultiPage(TQWidget* parentWidget, const char* widgetName, TQObject* tqparent, const char* name,
const TQStringList& args = TQStringList()); const TQStringList& args = TQStringList());
virtual TQStringList fileFormats() const { return TQString(); } virtual TQStringList fileFormats() const { return TQString(); }

@ -34,7 +34,7 @@
//#define DEBUG_KMULTIPAGE //#define DEBUG_KMULTIPAGE
KMultiPage::KMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name) KMultiPage::KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent, const char *name)
: DCOPObject("kmultipage"), KParts::ReadOnlyPart(tqparent, name) : DCOPObject("kmultipage"), KParts::ReadOnlyPart(tqparent, name)
{ {
// For reasons which I don't understand, the initialization of the // For reasons which I don't understand, the initialization of the
@ -43,12 +43,12 @@ KMultiPage::KMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObjec
// This is because of the virtual inheritance. Get rid of it (but it's BC, and this is a lib...) -- DF // This is because of the virtual inheritance. Get rid of it (but it's BC, and this is a lib...) -- DF
setObjId("kmultipage"); setObjId("kmultipage");
tqparentWdg = tqparentWidget; parentWdg = parentWidget;
lastCurrentPage = 0; lastCurrentPage = 0;
timer_id = -1; timer_id = -1;
searchInProgress = false; searchInProgress = false;
TQVBox* verticalBox = new TQVBox(tqparentWidget); TQVBox* verticalBox = new TQVBox(parentWidget);
verticalBox->setFocusPolicy(TQ_StrongFocus); verticalBox->setFocusPolicy(TQ_StrongFocus);
setWidget(verticalBox); setWidget(verticalBox);
@ -207,7 +207,7 @@ bool KMultiPage::closeURL()
widgetList.setAutoDelete(false); widgetList.setAutoDelete(false);
// Update ScrollView. // Update ScrollView.
scrollView()->tqlayoutPages(); scrollView()->layoutPages();
enableActions(false); enableActions(false);
// Clear Thumbnail List. // Clear Thumbnail List.
@ -536,7 +536,7 @@ bool KMultiPage::gotoPage(const PageNumber& page, int y, bool isLink)
if (pageWidget != 0) if (pageWidget != 0)
pageWidget->setPageNumber(tableauStartPage + i); pageWidget->setPageNumber(tableauStartPage + i);
} }
scrollView()->tqlayoutPages(); scrollView()->layoutPages();
} }
} }
// move scrollview to "page". // move scrollview to "page".
@ -575,7 +575,7 @@ bool KMultiPage::gotoPage(const PageNumber& page, int y, bool isLink)
} }
pageWidget->setPageNumber(page); pageWidget->setPageNumber(page);
scrollView()->tqlayoutPages(); scrollView()->layoutPages();
scrollView()->moveViewportToWidget(pageWidget, y); scrollView()->moveViewportToWidget(pageWidget, y);
} else { } else {
// There are multiple widgets, then we are either in the // There are multiple widgets, then we are either in the
@ -689,7 +689,7 @@ void KMultiPage::renderModeChanged()
pageCache->clear(); pageCache->clear();
generateDocumentWidgets(); generateDocumentWidgets();
scrollView()->tqlayoutPages(); scrollView()->layoutPages();
for (TQ_UINT16 i=0; i < widgetList.size(); i++) for (TQ_UINT16 i=0; i < widgetList.size(); i++)
{ {
@ -732,7 +732,7 @@ void KMultiPage::repaintAllVisibleWidgets()
// re-aligned. This will automatically update all necessary // re-aligned. This will automatically update all necessary
// widgets. // widgets.
if (everResized == true) if (everResized == true)
scrollView()->tqlayoutPages(true); scrollView()->layoutPages(true);
} }
@ -767,7 +767,7 @@ void KMultiPage::print()
return; return;
// initialize the printer using the print dialog // initialize the printer using the print dialog
if ( printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) { if ( printer->setup(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) {
// Now do the printing. // Now do the printing.
TQValueList<int> pageList = printer->pageList(); TQValueList<int> pageList = printer->pageList();
if (pageList.isEmpty()) if (pageList.isEmpty())
@ -891,7 +891,7 @@ void KMultiPage::updateWidgetSize(const PageNumber& pageNumber)
if (pageSize != documentWidget->pageSize()) if (pageSize != documentWidget->pageSize())
{ {
documentWidget->setPageSize(pageSize); documentWidget->setPageSize(pageSize);
scrollView()->tqlayoutPages(); scrollView()->layoutPages();
} }
// We have just one widget per page. // We have just one widget per page.
break; break;

@ -40,7 +40,7 @@ class KMultiPage : public KParts::ReadOnlyPart, virtual public kmultipageInterfa
TQ_OBJECT TQ_OBJECT
public: public:
KMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name); KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent, const char *name);
virtual ~KMultiPage(); virtual ~KMultiPage();
/* returns the scrollview used for the display */ /* returns the scrollview used for the display */
@ -121,7 +121,7 @@ public:
// Show the printer options dialog. Return immediately if the user // Show the printer options dialog. Return immediately if the user
// aborts. // 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)) )) {
delete printer; delete printer;
return; return;
} }
@ -155,7 +155,7 @@ public:
// Show the printer options dialog. Return immediately if the user // Show the printer options dialog. Return immediately if the user
// aborts. // 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)) )) {
delete printer; delete printer;
return; return;
} }
@ -569,7 +569,7 @@ protected:
This pointer is automatically set by the constructor. This pointer is automatically set by the constructor.
*/ */
TQGuardedPtr<TQWidget> tqparentWdg; TQGuardedPtr<TQWidget> parentWdg;
TQPtrVector<DocumentWidget> widgetList; TQPtrVector<DocumentWidget> widgetList;

@ -56,7 +56,7 @@
typedef KParts::GenericFactory<KViewPart> KViewPartFactory; typedef KParts::GenericFactory<KViewPart> KViewPartFactory;
K_EXPORT_COMPONENT_FACTORY(kviewerpart, KViewPartFactory) K_EXPORT_COMPONENT_FACTORY(kviewerpart, KViewPartFactory)
KViewPart::KViewPart(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args) const char *name, const TQStringList& args)
: KViewPart_Iface(tqparent, name), showSidebar(0), saveAction(0), partManager(0), : KViewPart_Iface(tqparent, name), showSidebar(0), saveAction(0), partManager(0),
multiPageLibrary(TQString()), aboutDialog(0) multiPageLibrary(TQString()), aboutDialog(0)
@ -71,12 +71,12 @@ KViewPart::KViewPart(TQWidget *tqparentWidget, const char *widgetName, TQObject
connect(watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(fileChanged(const TQString&))); connect(watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(fileChanged(const TQString&)));
watch->startScan(); watch->startScan();
mainWidget = new TQHBox(tqparentWidget, widgetName); mainWidget = new TQHBox(parentWidget, widgetName);
mainWidget->setFocusPolicy(TQ_StrongFocus); mainWidget->setFocusPolicy(TQ_StrongFocus);
setWidget(mainWidget); setWidget(mainWidget);
// Setup part manager // Setup part manager
partManager = new KParts::PartManager(tqparentWidget, "PartManager for kviewpart"); partManager = new KParts::PartManager(parentWidget, "PartManager for kviewpart");
setManager(partManager); setManager(partManager);
// Don't switch to another part when pressing a mouse button // Don't switch to another part when pressing a mouse button
partManager->setActivationButtonMask(0); partManager->setActivationButtonMask(0);
@ -113,7 +113,7 @@ KViewPart::KViewPart(TQWidget *tqparentWidget, const char *widgetName, TQObject
// If still no MultiPage has been found, report an error and abort. // If still no MultiPage has been found, report an error and abort.
if (offers.isEmpty()) if (offers.isEmpty())
{ {
KMessageBox::error(tqparentWidget, i18n("<qt>No MultiPage found.</qt>")); KMessageBox::error(parentWidget, i18n("<qt>No MultiPage found.</qt>"));
// return; // return;
} }

@ -34,7 +34,7 @@ class KViewPart : public KViewPart_Iface
TQ_OBJECT TQ_OBJECT
public: public:
KViewPart(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args); const char *name, const TQStringList& args);
virtual ~KViewPart(); virtual ~KViewPart();

@ -46,7 +46,7 @@ class ThumbnailWidget : public TQWidget
TQ_OBJECT TQ_OBJECT
public: public:
ThumbnailWidget(MarkListWidget* tqparent_, const PageNumber& _pageNumber, DocumentPageCache*); ThumbnailWidget(MarkListWidget* parent_, const PageNumber& _pageNumber, DocumentPageCache*);
private: private:
virtual void paintEvent(TQPaintEvent*); virtual void paintEvent(TQPaintEvent*);

@ -519,7 +519,7 @@
<includes> <includes>
<include location="global" impldecl="in implementation">kdialog.h</include> <include location="global" impldecl="in implementation">kdialog.h</include>
</includes> </includes>
<tqlayoutdefaults spacing="5" margin="11"/> <layoutdefaults spacing="5" margin="11"/>
<includehints> <includehints>
<includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint>
<includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint>

@ -144,5 +144,5 @@
<tabstop>kcfg_OverviewModeRows</tabstop> <tabstop>kcfg_OverviewModeRows</tabstop>
<tabstop>kcfg_OverviewModeColumns</tabstop> <tabstop>kcfg_OverviewModeColumns</tabstop>
</tabstops> </tabstops>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -250,7 +250,7 @@
<tabstop>widthUnits</tabstop> <tabstop>widthUnits</tabstop>
<tabstop>heightInput</tabstop> <tabstop>heightInput</tabstop>
</tabstops> </tabstops>
<tqlayoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint>

@ -66,7 +66,7 @@ void PageView::addChild( TQPtrVector<DocumentWidget> *wdgList )
} }
widgetList = wdgList; widgetList = wdgList;
tqlayoutPages(); layoutPages();
} }
@ -237,7 +237,7 @@ void PageView::viewportResizeEvent( TQResizeEvent* e )
if (!widgetList) if (!widgetList)
return; return;
tqlayoutPages(); layoutPages();
emit viewSizeChanged( viewport()->size() ); emit viewSizeChanged( viewport()->size() );
} }
@ -295,7 +295,7 @@ void PageView::setFullScreenMode(bool fullScreen)
} }
} }
void PageView::tqlayoutPages(bool zoomChanged) void PageView::layoutPages(bool zoomChanged)
{ {
// Paranoid safety check // Paranoid safety check
if (widgetList == 0) if (widgetList == 0)

@ -108,7 +108,7 @@ public slots:
/** Set tqlayout of the page widgets according to the current viewmode and zoomlevel. /** Set tqlayout of the page widgets according to the current viewmode and zoomlevel.
Set zoomChanged = true if the the tqlayout needs updateing because the zoomlevel has changed. */ Set zoomChanged = true if the the tqlayout needs updateing because the zoomlevel has changed. */
void tqlayoutPages(bool zoomChanged = false); void layoutPages(bool zoomChanged = false);
void slotEnableMoveTool(bool enable); void slotEnableMoveTool(bool enable);

@ -47,9 +47,9 @@ typedef KParts::GenericFactory<DjVuMultiPage> DjVuMultiPageFactory;
K_EXPORT_COMPONENT_FACTORY(djvuviewpart, DjVuMultiPageFactory) K_EXPORT_COMPONENT_FACTORY(djvuviewpart, DjVuMultiPageFactory)
DjVuMultiPage::DjVuMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, DjVuMultiPage::DjVuMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList&) const char *name, const TQStringList&)
: KMultiPage(tqparentWidget, widgetName, tqparent, name), djvuRenderer(tqparentWidget) : KMultiPage(parentWidget, widgetName, tqparent, name), djvuRenderer(parentWidget)
{ {
/* This is kparts wizardry that cannot be understood by man. Simply /* This is kparts wizardry that cannot be understood by man. Simply
change the names to match your implementation. */ change the names to match your implementation. */
@ -162,7 +162,7 @@ void DjVuMultiPage::slotDeletePages()
if (numberOfPages() == 0) if (numberOfPages() == 0)
return; return;
KDialogBase dialog( tqparentWdg, "urldialog", true, i18n("Delete Pages"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); KDialogBase dialog( parentWdg, "urldialog", true, i18n("Delete Pages"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
PageRangeWidget range( 1, numberOfPages(), currentPageNumber(), &dialog, "range widget" ); PageRangeWidget range( 1, numberOfPages(), currentPageNumber(), &dialog, "range widget" );
TQToolTip::add( &range, i18n( "Select the pages you wish to delete." ) ); TQToolTip::add( &range, i18n( "Select the pages you wish to delete." ) );
dialog.setButtonOK(i18n("Delete Pages")); dialog.setButtonOK(i18n("Delete Pages"));
@ -220,7 +220,7 @@ void DjVuMultiPage::print()
printer->addDialogPage( conversionOptions ); printer->addDialogPage( conversionOptions );
// initialize the printer using the print dialog // initialize the printer using the print dialog
if ( printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) { if ( printer->setup(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) {
// Now do the printing. // Now do the printing.
TQValueList<int> pageList = printer->pageList(); TQValueList<int> pageList = printer->pageList();
if (pageList.isEmpty()) if (pageList.isEmpty())
@ -334,7 +334,7 @@ void DjVuMultiPage::slotSave()
fileName = fileName+ending; fileName = fileName+ending;
if (TQFile(fileName).exists()) { if (TQFile(fileName).exists()) {
int r = KMessageBox::warningContinueCancel(tqparentWdg, i18n("The file %1\nalready exists. Do you want to overwrite it?").tqarg(fileName), int r = KMessageBox::warningContinueCancel(parentWdg, i18n("The file %1\nalready exists. Do you want to overwrite it?").tqarg(fileName),
i18n("Overwrite File"), i18n("Overwrite")); i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel) if (r == KMessageBox::Cancel)
return; return;
@ -344,7 +344,7 @@ void DjVuMultiPage::slotSave()
/* /*
if (!djvuRenderer.save(fileName) == false) if (!djvuRenderer.save(fileName) == false)
KMessageBox::error( tqparentWdg, KMessageBox::error( parentWdg,
i18n("<qt><strong>File error.</strong> Unable to write to the specified file '%1'. The document is <strong>not</strong> saved.</qt>").tqarg(fileName), i18n("<qt><strong>File error.</strong> Unable to write to the specified file '%1'. The document is <strong>not</strong> saved.</qt>").tqarg(fileName),
i18n("File Error")); i18n("File Error"));
*/ */

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

@ -270,7 +270,7 @@ bool DjVuRenderer::setFile(const TQString &fname, const KURL &)
TQFileInfo fi(fname); TQFileInfo fi(fname);
TQString filename = fi.absFilePath(); TQString filename = fi.absFilePath();
if (!fi.exists() || fi.isDir()) { 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("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").tqarg(filename),
i18n("File Error")); i18n("File Error"));
// the return value 'false' indicates that this operation was not successful. // the return value 'false' indicates that this operation was not successful.
@ -292,7 +292,7 @@ bool DjVuRenderer::setFile(const TQString &fname, const KURL &)
// If the above assumption was false. // If the above assumption was false.
if (!document) if (!document)
{ {
KMessageBox::error( tqparentWidget, KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").tqarg(filename), i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").tqarg(filename),
i18n("File Error")); i18n("File Error"));
@ -577,7 +577,7 @@ bool DjVuRenderer::convertToPSFile( DjVuToPS &converter, TQString filename, TQVa
TQMutexLocker locker( &mutex ); TQMutexLocker locker( &mutex );
// Set up progress dialog // Set up progress dialog
KProgressDialog *pdialog = new KProgressDialog(tqparentWidget, "Printing-ProgressDialog", i18n("Printing..."), i18n("Preparing pages for printing..."), true); KProgressDialog *pdialog = new KProgressDialog(parentWidget, "Printing-ProgressDialog", i18n("Printing..."), i18n("Preparing pages for printing..."), true);
pdialog->setButtonText(i18n("Abort")); pdialog->setButtonText(i18n("Abort"));
pdialog->showCancelButton(true); pdialog->showCancelButton(true);
pdialog->progressBar()->setTotalSteps(pageList.size()); pdialog->progressBar()->setTotalSteps(pageList.size());
@ -634,7 +634,7 @@ void DjVuRenderer::deletePages(TQ_UINT16 from, TQ_UINT16 to)
KProgressDialog *pdialog = 0; KProgressDialog *pdialog = 0;
if (to-from > 9) { if (to-from > 9) {
pdialog = new KProgressDialog(tqparentWidget, "Printing-ProgressDialog", i18n("Deleting pages..."), i18n("Please wait while pages are removed..."), true); pdialog = new KProgressDialog(parentWidget, "Printing-ProgressDialog", i18n("Deleting pages..."), i18n("Please wait while pages are removed..."), true);
pdialog->showCancelButton(false); pdialog->showCancelButton(false);
pdialog->progressBar()->setTotalSteps(to-from+1); pdialog->progressBar()->setTotalSteps(to-from+1);
pdialog->progressBar()->setFormat(TQString()); pdialog->progressBar()->setFormat(TQString());

@ -141,5 +141,5 @@
</spacer> </spacer>
</grid> </grid>
</widget> </widget>
<tqlayoutdefaults spacing="6" margin="0"/> <layoutdefaults spacing="6" margin="0"/>
</UI> </UI>

@ -433,15 +433,15 @@ DjVuDocEditor::strip_incl_chunks(const GP<DataPool> & pool_in)
} }
GUTF8String GUTF8String
DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &tqparent_id, DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &parent_id,
int chunk_num, DjVuPort *source) int chunk_num, DjVuPort *source)
// Will open the 'file_name' and insert it into an existing DjVuFile // Will open the 'file_name' and insert it into an existing DjVuFile
// with ID 'tqparent_id'. Will insert the INCL chunk at position chunk_num // with ID 'parent_id'. Will insert the INCL chunk at position chunk_num
// Will NOT process ANY files included into the file being inserted. // Will NOT process ANY files included into the file being inserted.
// Moreover it will strip out any INCL chunks in that file... // Moreover it will strip out any INCL chunks in that file...
{ {
DEBUG_MSG("DjVuDocEditor::insert_file(): fname='" << file_url << DEBUG_MSG("DjVuDocEditor::insert_file(): fname='" << file_url <<
"', tqparent_id='" << tqparent_id << "'\n"); "', parent_id='" << parent_id << "'\n");
DEBUG_MAKE_INDENT(3); DEBUG_MAKE_INDENT(3);
const GP<DjVmDir> dir(get_djvm_dir()); const GP<DjVmDir> dir(get_djvm_dir());
@ -469,16 +469,16 @@ DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &tqparent_id,
file_pool=strip_incl_chunks(file_pool); file_pool=strip_incl_chunks(file_pool);
// Check if tqparent ID is valid // Check if tqparent ID is valid
GP<DjVmDir::File> tqparent_frec(dir->id_to_file(tqparent_id)); GP<DjVmDir::File> parent_frec(dir->id_to_file(parent_id));
if (!tqparent_frec) if (!parent_frec)
tqparent_frec=dir->name_to_file(tqparent_id); parent_frec=dir->name_to_file(parent_id);
if (!tqparent_frec) if (!parent_frec)
tqparent_frec=dir->title_to_file(tqparent_id); parent_frec=dir->title_to_file(parent_id);
if (!tqparent_frec) if (!parent_frec)
G_THROW( ERR_MSG("DjVuDocEditor.no_file") "\t" +tqparent_id); G_THROW( ERR_MSG("DjVuDocEditor.no_file") "\t" +parent_id);
const GP<DjVuFile> tqparent_file(get_djvu_file(tqparent_id)); const GP<DjVuFile> parent_file(get_djvu_file(parent_id));
if (!tqparent_file) if (!parent_file)
G_THROW( ERR_MSG("DjVuDocEditor.create_fail") "\t"+tqparent_id); G_THROW( ERR_MSG("DjVuDocEditor.create_fail") "\t"+parent_id);
// Now obtain ID for the new file // Now obtain ID for the new file
const GUTF8String id(find_unique_id(file_url.fname())); const GUTF8String id(find_unique_id(file_url.fname()));
@ -486,7 +486,7 @@ DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &tqparent_id,
// Add it into the directory // Add it into the directory
const GP<DjVmDir::File> frec( const GP<DjVmDir::File> frec(
DjVmDir::File::create(id, id, id, DjVmDir::File::INCLUDE)); DjVmDir::File::create(id, id, id, DjVmDir::File::INCLUDE));
int pos=dir->get_file_pos(tqparent_frec); int pos=dir->get_file_pos(parent_frec);
if (pos>=0) if (pos>=0)
++pos; ++pos;
dir->insert_file(frec, pos); dir->insert_file(frec, pos);
@ -500,7 +500,7 @@ DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &tqparent_id,
} }
// And insert it into the tqparent DjVuFile // And insert it into the tqparent DjVuFile
tqparent_file->insert_file(id, chunk_num); parent_file->insert_file(id, chunk_num);
return id; return id;
} }
@ -930,7 +930,7 @@ DjVuDocEditor::generate_ref_map(const GP<DjVuFile> & file,
GMap<GUTF8String, void *> & ref_map, GMap<GUTF8String, void *> & ref_map,
GMap<GURL, void *> & visit_map) GMap<GURL, void *> & visit_map)
// This private function is used to generate a list (implemented as map) // This private function is used to generate a list (implemented as map)
// of files referencing the given file. To get list of all tqparents // of files referencing the given file. To get list of all parents
// for file with ID 'id' iterate map obtained as // for file with ID 'id' iterate map obtained as
// *((GMap<GUTF8String, void *> *) ref_map[id]) // *((GMap<GUTF8String, void *> *) ref_map[id])
{ {
@ -944,17 +944,17 @@ DjVuDocEditor::generate_ref_map(const GP<DjVuFile> & file,
for(GPosition pos=files_list;pos;++pos) for(GPosition pos=files_list;pos;++pos)
{ {
GP<DjVuFile> child_file=files_list[pos]; GP<DjVuFile> child_file=files_list[pos];
// First: add the current file to the list of tqparents for // First: add the current file to the list of parents for
// the child being processed // the child being processed
GURL child_url=child_file->get_url(); GURL child_url=child_file->get_url();
const GUTF8String child_id( const GUTF8String child_id(
djvm_dir->name_to_file(child_url.fname())->get_load_name()); djvm_dir->name_to_file(child_url.fname())->get_load_name());
GMap<GUTF8String, void *> * tqparents=0; GMap<GUTF8String, void *> * parents=0;
if (ref_map.tqcontains(child_id)) if (ref_map.tqcontains(child_id))
tqparents=(GMap<GUTF8String, void *> *) ref_map[child_id]; parents=(GMap<GUTF8String, void *> *) ref_map[child_id];
else else
ref_map[child_id]=tqparents=new GMap<GUTF8String, void *>(); ref_map[child_id]=parents=new GMap<GUTF8String, void *>();
(*tqparents)[id]=0; (*parents)[id]=0;
// Second: go recursively // Second: go recursively
generate_ref_map(child_file, ref_map, visit_map); generate_ref_map(child_file, ref_map, visit_map);
} }
@ -972,22 +972,22 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref,
// Finally, if remove_unref is TRUE, we will go down the files // Finally, if remove_unref is TRUE, we will go down the files
// hierarchy removing every file, which becomes unreferenced. // hierarchy removing every file, which becomes unreferenced.
// //
// ref_map will be used to find out list of tqparents referencing // ref_map will be used to find out list of parents referencing
// this file (required when removing INCL chunks) // this file (required when removing INCL chunks)
{ {
// First get rid of INCL chunks in tqparents // First get rid of INCL chunks in parents
GMap<GUTF8String, void *> * tqparents=(GMap<GUTF8String, void *> *) ref_map[id]; GMap<GUTF8String, void *> * parents=(GMap<GUTF8String, void *> *) ref_map[id];
if (tqparents) if (parents)
{ {
for(GPosition pos=*tqparents;pos;++pos) for(GPosition pos=*parents;pos;++pos)
{ {
const GUTF8String tqparent_id((*tqparents).key(pos)); const GUTF8String parent_id((*parents).key(pos));
const GP<DjVuFile> tqparent(get_djvu_file(tqparent_id)); const GP<DjVuFile> tqparent(get_djvu_file(parent_id));
if (tqparent) if (tqparent)
tqparent->unlink_file(id); tqparent->unlink_file(id);
} }
delete tqparents; delete parents;
tqparents=0; parents=0;
ref_map.del(id); ref_map.del(id);
} }
@ -1006,10 +1006,10 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref,
GURL child_url=child_file->get_url(); GURL child_url=child_file->get_url();
const GUTF8String child_id( const GUTF8String child_id(
djvm_dir->name_to_file(child_url.fname())->get_load_name()); djvm_dir->name_to_file(child_url.fname())->get_load_name());
GMap<GUTF8String, void *> * tqparents=(GMap<GUTF8String, void *> *) ref_map[child_id]; GMap<GUTF8String, void *> * parents=(GMap<GUTF8String, void *> *) ref_map[child_id];
if (tqparents) tqparents->del(id); if (parents) parents->del(id);
if (remove_unref && (!tqparents || !tqparents->size())) if (remove_unref && (!parents || !parents->size()))
remove_file(child_id, remove_unref, ref_map); remove_file(child_id, remove_unref, ref_map);
} }
} G_CATCH(exc) { } G_CATCH(exc) {
@ -1041,7 +1041,7 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref)
if (!djvm_dir->id_to_file(id)) if (!djvm_dir->id_to_file(id))
G_THROW( ERR_MSG("DjVuDocEditor.no_file") "\t"+id); G_THROW( ERR_MSG("DjVuDocEditor.no_file") "\t"+id);
// First generate a map of references (containing the list of tqparents // First generate a map of references (containing the list of parents
// including this particular file. This will speed things up // including this particular file. This will speed things up
// significatly. // significatly.
GMap<GUTF8String, void *> ref_map; // GMap<GUTF8String, GMap<GUTF8String, void *> *> in fact GMap<GUTF8String, void *> ref_map; // GMap<GUTF8String, GMap<GUTF8String, void *> *> in fact
@ -1058,8 +1058,8 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref)
GPosition pos; GPosition pos;
while((pos=ref_map)) while((pos=ref_map))
{ {
GMap<GUTF8String, void *> * tqparents=(GMap<GUTF8String, void *> *) ref_map[pos]; GMap<GUTF8String, void *> * parents=(GMap<GUTF8String, void *> *) ref_map[pos];
delete tqparents; delete parents;
ref_map.del(pos); ref_map.del(pos);
} }
} }

@ -199,7 +199,7 @@ public:
an exception is thrown. */ an exception is thrown. */
GUTF8String page_to_id(int page_num) const; GUTF8String page_to_id(int page_num) const;
GUTF8String insert_file(const GURL &url, const GUTF8String &tqparent_id, GUTF8String insert_file(const GURL &url, const GUTF8String &parent_id,
int chunk_num=1, DjVuPort *source=0); int chunk_num=1, DjVuPort *source=0);
/** Inserts the referenced file into this DjVu document. /** Inserts the referenced file into this DjVu document.

@ -1328,7 +1328,7 @@ DjVuDocument::get_thumbnail(int page_num, bool dont_decode)
} }
} }
// Aptqparently we're out of luck and need to decode the requested // Apparently we're out of luck and need to decode the requested
// page (unless it's already done and if it's allowed) and render // page (unless it's already done and if it's allowed) and render
// it into the thumbnail. If dont_decode is true, do not attempt // it into the thumbnail. If dont_decode is true, do not attempt
// to create this file (because this will result in a request for data) // to create this file (because this will result in a request for data)

@ -91,7 +91,7 @@ namespace DJVU {
//// DJVUIMAGE: CONSTRUCTION //// DJVUIMAGE: CONSTRUCTION
DjVuImage::DjVuImage(void) DjVuImage::DjVuImage(void)
: rotate_count(-1),retqlayout_sent(false) : rotate_count(-1),relayout_sent(false)
{ {
} }
@ -423,13 +423,13 @@ DjVuImage::get_long_description() const
void void
DjVuImage::notify_chunk_done(const DjVuPort *, const GUTF8String & name) DjVuImage::notify_chunk_done(const DjVuPort *, const GUTF8String & name)
{ {
if (!retqlayout_sent && if (!relayout_sent &&
( !name.cmp("INFO", 4) || ( !name.cmp("INFO", 4) ||
!name.cmp("PMxx", 2) || !name.cmp("PMxx", 2) ||
!name.cmp("BMxx", 2) ) ) !name.cmp("BMxx", 2) ) )
{ {
DjVuPort::get_portcaster()->notify_retqlayout(this); DjVuPort::get_portcaster()->notify_retqlayout(this);
retqlayout_sent=true; relayout_sent=true;
} }
else if (!name.cmp("Sxxx", 1) || else if (!name.cmp("Sxxx", 1) ||
!name.cmp("BGxx", 2) || !name.cmp("BGxx", 2) ||

@ -414,7 +414,7 @@ public:
private: private:
GP<DjVuFile> file; GP<DjVuFile> file;
int rotate_count; int rotate_count;
bool retqlayout_sent; bool relayout_sent;
// HELPERS // HELPERS
int stencil(GPixmap *pm, const GRect &rect, int subs, double gcorr) const; int stencil(GPixmap *pm, const GRect &rect, int subs, double gcorr) const;

@ -325,24 +325,24 @@ GIFFChunk::get_chunks_number(const GUTF8String &name)
//************************************************************************ //************************************************************************
void void
GIFFManager::add_chunk(GUTF8String tqparent_name, const GP<GIFFChunk> & chunk, GIFFManager::add_chunk(GUTF8String parent_name, const GP<GIFFChunk> & chunk,
int pos) int pos)
// tqparent_name is the fully qualified name of the PARENT // parent_name is the fully qualified name of the PARENT
// IT MAY BE EMPTY // IT MAY BE EMPTY
// All the required chunks will be created // All the required chunks will be created
// pos=-1 means to append the chunk // pos=-1 means to append the chunk
{ {
DEBUG_MSG("GIFFManager::add_chunk(): Adding chunk to name='" << tqparent_name << "'\n"); DEBUG_MSG("GIFFManager::add_chunk(): Adding chunk to name='" << parent_name << "'\n");
DEBUG_MAKE_INDENT(3); DEBUG_MAKE_INDENT(3);
if (!top_level->get_name().length()) if (!top_level->get_name().length())
{ {
if ((!tqparent_name.length())||(tqparent_name[0]!='.')) if ((!parent_name.length())||(parent_name[0]!='.'))
G_THROW( ERR_MSG("GIFFManager.no_top_name") ); G_THROW( ERR_MSG("GIFFManager.no_top_name") );
if (tqparent_name.length() < 2) if (parent_name.length() < 2)
{ {
// 'chunk' is actually the new top-level chunk // 'chunk' is actually the new top-level chunk
DEBUG_MSG("since tqparent_name=='.', making the chunk top-level\n"); DEBUG_MSG("since parent_name=='.', making the chunk top-level\n");
if (!chunk->is_container()) if (!chunk->is_container())
G_THROW( ERR_MSG("GIFFManager.no_top_cont") ); G_THROW( ERR_MSG("GIFFManager.no_top_cont") );
top_level=chunk; top_level=chunk;
@ -350,33 +350,33 @@ GIFFManager::add_chunk(GUTF8String tqparent_name, const GP<GIFFChunk> & chunk,
} }
DEBUG_MSG("Setting the name of the top-level chunk\n"); DEBUG_MSG("Setting the name of the top-level chunk\n");
const int next_dot=tqparent_name.search('.',1); const int next_dot=parent_name.search('.',1);
if(next_dot>=0) if(next_dot>=0)
{ {
top_level->set_name(tqparent_name.substr(1,next_dot-1)); top_level->set_name(parent_name.substr(1,next_dot-1));
}else }else
{ {
top_level->set_name(tqparent_name.substr(1,(unsigned int)-1)); top_level->set_name(parent_name.substr(1,(unsigned int)-1));
} }
} }
DEBUG_MSG("top level chunk name='" << top_level->get_name() << "'\n"); DEBUG_MSG("top level chunk name='" << top_level->get_name() << "'\n");
if (tqparent_name.length() && tqparent_name[0] == '.') if (parent_name.length() && parent_name[0] == '.')
{ {
int next_dot=tqparent_name.search('.',1); int next_dot=parent_name.search('.',1);
if(next_dot<0) if(next_dot<0)
{ {
next_dot=tqparent_name.length(); next_dot=parent_name.length();
} }
GUTF8String top_name=tqparent_name.substr(1,next_dot-1); GUTF8String top_name=parent_name.substr(1,next_dot-1);
if (!top_level->check_name(top_name)) if (!top_level->check_name(top_name))
G_THROW( ERR_MSG("GIFFManager.wrong_name") "\t"+top_name); G_THROW( ERR_MSG("GIFFManager.wrong_name") "\t"+top_name);
tqparent_name=tqparent_name.substr(next_dot,(unsigned int)-1); parent_name=parent_name.substr(next_dot,(unsigned int)-1);
} }
GP<GIFFChunk> cur_sec=top_level; GP<GIFFChunk> cur_sec=top_level;
const char * start, * end=(const char *)tqparent_name-1; const char * start, * end=(const char *)parent_name-1;
do do
{ {
for(start=++end;*end&&(*end!='.');end++) for(start=++end;*end&&(*end!='.');end++)

@ -265,8 +265,8 @@ public:
/// Sets the name of the top level chunk to {\em name} /// Sets the name of the top level chunk to {\em name}
void set_name(const GUTF8String &name); void set_name(const GUTF8String &name);
/** Adds the chunk {\em chunk} to chunk with name {\em tqparent_name} at /** Adds the chunk {\em chunk} to chunk with name {\em parent_name} at
position {\em pos}. {\em tqparent_name} may contain dots, brackets position {\em pos}. {\em parent_name} may contain dots, brackets
and colons. All missing chunks in the chain will be created. and colons. All missing chunks in the chain will be created.
{\bf Examples:} {\bf Examples:}
@ -282,7 +282,7 @@ public:
;; Same thing regardless of the top-level chunk name ;; Same thing regardless of the top-level chunk name
m.addChunk("FORM:DJVU[1]", ch); m.addChunk("FORM:DJVU[1]", ch);
\end{verbatim} */ \end{verbatim} */
void add_chunk(GUTF8String tqparent_name, const GP<GIFFChunk> & chunk, int pos=-1); void add_chunk(GUTF8String parent_name, const GP<GIFFChunk> & chunk, int pos=-1);
/** If {\em name}={\em name1}.{\em name2} where {\em name2} doesn't /** If {\em name}={\em name1}.{\em name2} where {\em name2} doesn't
contain dots, then #addChunk()# will create plain chunk with contain dots, then #addChunk()# will create plain chunk with
name {\em name2} with data {\em buffer} of size {\em length} and name {\em name2} with data {\em buffer} of size {\em length} and

@ -1397,7 +1397,7 @@ cotask_select(int nfds,
} }
// reschedule // reschedule
cotask_yield(); cotask_yield();
// call select to update tqmasks // call select to update masks
if (tm) if (tm)
{ {
tm->tv_sec = maxwait/1000; tm->tv_sec = maxwait/1000;

@ -161,7 +161,7 @@ public:
/** Initializes an IWBitmap with image #bm#. This constructor /** Initializes an IWBitmap with image #bm#. This constructor
performs the wavelet decomposition of image #bm# and records the performs the wavelet decomposition of image #bm# and records the
corresponding wavelet coefficient. Argument #tqmask# is an optional corresponding wavelet coefficient. Argument #tqmask# is an optional
bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). */ bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). */
void init(const GBitmap &bm, const GP<GBitmap> tqmask=0); void init(const GBitmap &bm, const GP<GBitmap> tqmask=0);
// CODER // CODER
/** Encodes one data chunk into ByteStream #bs#. Parameter #parms# controls /** Encodes one data chunk into ByteStream #bs#. Parameter #parms# controls
@ -212,7 +212,7 @@ public:
/** Initializes an IWPixmap with color image #bm#. This constructor /** Initializes an IWPixmap with color image #bm#. This constructor
performs the wavelet decomposition of image #bm# and records the performs the wavelet decomposition of image #bm# and records the
corresponding wavelet coefficient. Argument #tqmask# is an optional corresponding wavelet coefficient. Argument #tqmask# is an optional
bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). bilevel image specifying the masked pixels (see \Ref{IW44Image.h}).
Argument #crcbmode# specifies how the chrominance information should be Argument #crcbmode# specifies how the chrominance information should be
encoded (see \Ref{CRCBMode}). */ encoded (see \Ref{CRCBMode}). */
void init(const GPixmap &bm, const GP<GBitmap> tqmask=0, CRCBMode crcbmode=CRCBnormal); void init(const GPixmap &bm, const GP<GBitmap> tqmask=0, CRCBMode crcbmode=CRCBnormal);
@ -724,7 +724,7 @@ interpolate_tqmask(short *data16, int w, int h, int rowsize,
const signed char *tqmask8, int mskrowsize) const signed char *tqmask8, int mskrowsize)
{ {
int i,j; int i,j;
// count tqmasked bits // count masked bits
short *count; short *count;
GPBuffer<short> gcount(count,w*h); GPBuffer<short> gcount(count,w*h);
short *cp = count; short *cp = count;
@ -851,7 +851,7 @@ forward_tqmask(short *data16, int w, int h, int rowsize, int begin, int end,
} }
// Decompose // Decompose
IW44Image::Transform::Encode::forward(sdata, w, h, w, scale, scale+scale); IW44Image::Transform::Encode::forward(sdata, w, h, w, scale, scale+scale);
// Cancel tqmasked coefficients // Cancel masked coefficients
d = sdata; d = sdata;
m = stqmask; m = stqmask;
for (i=0; i<h; i+=scale+scale) for (i=0; i<h; i+=scale+scale)
@ -947,7 +947,7 @@ IW44Image::Map::Encode::create(const signed char *img8, int imgrowsize,
// Interpolate pixels below tqmask // Interpolate pixels below tqmask
DJVU_PROGRESS_RUN(transf, 1); DJVU_PROGRESS_RUN(transf, 1);
interpolate_tqmask(data16, iw, ih, bw, msk8, mskrowsize); interpolate_tqmask(data16, iw, ih, bw, msk8, mskrowsize);
// Multiscale iterative tqmasked decomposition // Multiscale iterative masked decomposition
DJVU_PROGRESS_RUN(transf, 3); DJVU_PROGRESS_RUN(transf, 3);
forward_tqmask(data16, iw, ih, bw, 1, 32, msk8, mskrowsize); forward_tqmask(data16, iw, ih, bw, 1, 32, msk8, mskrowsize);
} }

@ -140,7 +140,7 @@
routine can use an optional bilevel image named the tqmask. Every non zero routine can use an optional bilevel image named the tqmask. Every non zero
pixel in the tqmask means the value of the corresponding pixel in the pixel in the tqmask means the value of the corresponding pixel in the
background image is irrelevant. The wavelet decomposition code will background image is irrelevant. The wavelet decomposition code will
replace these tqmasked pixels by a color value whose coding cost is minimal replace these masked pixels by a color value whose coding cost is minimal
(see \URL{http://www.research.att.com/~leonb/DJVU/tqmask}). (see \URL{http://www.research.att.com/~leonb/DJVU/tqmask}).
{\bf ToDo} --- There are many improvements to be made. Besides better {\bf ToDo} --- There are many improvements to be made. Besides better
@ -278,12 +278,12 @@ public:
/** Initializes an IWBitmap with image #bm#. This constructor /** Initializes an IWBitmap with image #bm#. This constructor
performs the wavelet decomposition of image #bm# and records the performs the wavelet decomposition of image #bm# and records the
corresponding wavelet coefficient. Argument #tqmask# is an optional corresponding wavelet coefficient. Argument #tqmask# is an optional
bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). */ bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). */
static GP<IW44Image> create_encode(const GBitmap &bm, const GP<GBitmap> tqmask=0); static GP<IW44Image> create_encode(const GBitmap &bm, const GP<GBitmap> tqmask=0);
/** Initializes an IWPixmap with color image #bm#. This constructor /** Initializes an IWPixmap with color image #bm#. This constructor
performs the wavelet decomposition of image #bm# and records the performs the wavelet decomposition of image #bm# and records the
corresponding wavelet coefficient. Argument #tqmask# is an optional corresponding wavelet coefficient. Argument #tqmask# is an optional
bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). bilevel image specifying the masked pixels (see \Ref{IW44Image.h}).
Argument #crcbmode# specifies how the chrominance information should be Argument #crcbmode# specifies how the chrominance information should be
encoded (see \Ref{CRCBMode}). */ encoded (see \Ref{CRCBMode}). */
static GP<IW44Image> create_encode(const GPixmap &bm, const GP<GBitmap> tqmask=0, CRCBMode crcbmode=CRCBnormal); static GP<IW44Image> create_encode(const GPixmap &bm, const GP<GBitmap> tqmask=0, CRCBMode crcbmode=CRCBnormal);

@ -467,7 +467,7 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim)
// Avoid coding null tqshapes/blits // Avoid coding null tqshapes/blits
else if (jshp.bits) else if (jshp.bits)
{ {
// Make sure all tqparents have been coded // Make sure all parents have been coded
if (jshp.tqparent>=0 && tqshape2lib[jshp.tqparent]<0) if (jshp.tqparent>=0 && tqshape2lib[jshp.tqparent]<0)
encode_libonly_tqshape(gjim, jshp.tqparent); encode_libonly_tqshape(gjim, jshp.tqparent);
// Allocate library entry when needed // Allocate library entry when needed

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

@ -250,7 +250,7 @@ linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law. threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data If such an object file uses only numerical parameters, data
structure tqlayouts and accessors, and small macros and small inline structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the work. (Executables containing this object code plus portions of the

Loading…
Cancel
Save