Remove additional unneeded tq method conversions

pull/1/head
Timothy Pearson 13 years ago
parent 45f529de24
commit 74c05bbf9d

@ -221,14 +221,14 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget)
return; return;
} }
// Append all this widgets tqchildren // Append all this widgets children
for(int i = 0; i < gp_widget_count_children(widget); ++i) { for(int i = 0; i < gp_widget_count_children(widget); ++i) {
CameraWidget *widget_child; CameraWidget *widget_child;
gp_widget_get_child(widget, i, &widget_child); gp_widget_get_child(widget, i, &widget_child);
appendWidget(newParent, widget_child); appendWidget(newParent, widget_child);
} }
// Things that must be done after all tqchildren were added // Things that must be done after all children were added
/* /*
switch (widget_type) { switch (widget_type) {
case GP_WIDGET_SECTION: case GP_WIDGET_SECTION:

@ -86,7 +86,7 @@ bool KCamera::initInformation()
int index = gp_abilities_list_lookup_model(m_abilitylist, m_model.local8Bit().data()); int index = gp_abilities_list_lookup_model(m_abilitylist, m_model.local8Bit().data());
if(index < 0) { if(index < 0) {
emit error(i18n("Description of abilities for camera %1 is not available." emit error(i18n("Description of abilities for camera %1 is not available."
" Configuration options may be incorrect.").tqarg(m_model)); " Configuration options may be incorrect.").arg(m_model));
return false; return false;
} }
gp_abilities_list_get_abilities(m_abilitylist, index, &m_abilities); gp_abilities_list_get_abilities(m_abilitylist, index, &m_abilities);
@ -432,7 +432,7 @@ void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item)
int index = gp_abilities_list_lookup_model(m_device->m_abilitylist, model.local8Bit().data()); int index = gp_abilities_list_lookup_model(m_device->m_abilitylist, model.local8Bit().data());
if(index < 0) { if(index < 0) {
slot_error(i18n("Description of abilities for camera %1 is not available." slot_error(i18n("Description of abilities for camera %1 is not available."
" Configuration options may be incorrect.").tqarg(model)); " Configuration options may be incorrect.").arg(model));
} }
int result = gp_abilities_list_get_abilities(m_device->m_abilitylist, index, &abilities); int result = gp_abilities_list_get_abilities(m_device->m_abilitylist, index, &abilities);
if (result == GP_OK) { if (result == GP_OK) {
@ -452,7 +452,7 @@ void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item)
setPortType(INDEX_USB); setPortType(INDEX_USB);
} else { } else {
slot_error(i18n("Description of abilities for camera %1 is not available." slot_error(i18n("Description of abilities for camera %1 is not available."
" Configuration options may be incorrect.").tqarg(model)); " Configuration options may be incorrect.").arg(model));
} }
} }

@ -242,7 +242,7 @@ void KameraProtocol::get(const KURL &url)
#undef GPHOTO_TEXT_FILE #undef GPHOTO_TEXT_FILE
// emit info message // emit info message
infoMessage( i18n("Retrieving data from camera <b>%1</b>").tqarg(url.user()) ); infoMessage( i18n("Retrieving data from camera <b>%1</b>").arg(url.user()) );
// Note: There's no need to re-read directory for each get() anymore // Note: There's no need to re-read directory for each get() anymore
gp_file_new(&m_file); gp_file_new(&m_file);

@ -74,7 +74,7 @@ class KColorEditApp : public KMainWindow
KColorEditDoc *document() const; KColorEditDoc *document() const;
protected: protected:
/** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration
* file * file
*/ */
void saveOptions(); void saveOptions();

@ -42,7 +42,7 @@ void KXYColorSelector::setType(const int type) {
void KXYColorSelector::updateContents() { void KXYColorSelector::updateContents() {
drawPalette(&pixmap); drawPalette(&pixmap);
tqrepaint(); repaint();
} }
void KXYColorSelector::resizeEvent(TQResizeEvent*) { void KXYColorSelector::resizeEvent(TQResizeEvent*) {

@ -53,7 +53,7 @@ void KZColorSelector::setType(const int type) {
void KZColorSelector::updateContents() { void KZColorSelector::updateContents() {
drawPalette(&pixmap); drawPalette(&pixmap);
tqrepaint(false); repaint(false);
} }
void KZColorSelector::resizeEvent(TQResizeEvent*) { void KZColorSelector::resizeEvent(TQResizeEvent*) {

@ -77,7 +77,7 @@ void PaletteViewScrolledArea::redraw() {
} }
void PaletteViewScrolledArea::repaintPalette() { void PaletteViewScrolledArea::repaintPalette() {
tqrepaint(false); repaint(false);
} }
void PaletteViewScrolledArea::checkSelectionAutoScroll(const int mousePosY) { void PaletteViewScrolledArea::checkSelectionAutoScroll(const int mousePosY) {
@ -220,7 +220,7 @@ void PaletteViewScrolledArea::paintEvent(TQPaintEvent* /*event*/) {
setCellsSizes(); setCellsSizes();
TQPixmap pixmap(size()); TQPixmap pixmap(size());
TQPainter painter; TQPainter painter;
painter.tqbegin(TQT_TQPAINTDEVICE(&pixmap), this); painter.begin(TQT_TQPAINTDEVICE(&pixmap), this);
TQFontMetrics fontMetrics = painter.fontMetrics(); TQFontMetrics fontMetrics = painter.fontMetrics();
int maxLineWidth; int maxLineWidth;
if(viewColorNames) { if(viewColorNames) {

@ -105,7 +105,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname)
TQString filename_test(font_pool->getExtraSearchPath() + "/" + filename); TQString filename_test(font_pool->getExtraSearchPath() + "/" + filename);
file = fopen( TQFile::encodeName(filename_test), "r"); file = fopen( TQFile::encodeName(filename_test), "r");
if (file == 0) { if (file == 0) {
kdError(4300) << i18n("Cannot find font %1, file %2.").tqarg(fontname).tqarg(filename) << endl; kdError(4300) << i18n("Cannot find font %1, file %2.").arg(fontname).arg(filename) << endl;
return; return;
} else } else
filename = filename_test; filename = filename_test;
@ -121,7 +121,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname)
font = new TeXFont_PK(this); font = new TeXFont_PK(this);
set_char_p = &dviRenderer::set_char; set_char_p = &dviRenderer::set_char;
if ((checksum != 0) && (checksum != font->checksum)) if ((checksum != 0) && (checksum != font->checksum))
kdWarning(4300) << i18n("Checksum mismatch for font file %1").tqarg(filename) << endl; kdWarning(4300) << i18n("Checksum mismatch for font file %1").arg(filename) << endl;
fontTypeName = "TeX PK"; fontTypeName = "TeX PK";
return; return;
} }
@ -169,7 +169,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname)
#else #else
// If we don't have the FreeType library, we should never have // If we don't have the FreeType library, we should never have
// reached this point. Complain, and leave this font blank // reached this point. Complain, and leave this font blank
kdError(4300) << i18n("Cannot recognize format for font file %1").tqarg(filename) << endl; kdError(4300) << i18n("Cannot recognize format for font file %1").arg(filename) << endl;
#endif #endif
} }

@ -41,13 +41,13 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
int error = FT_New_Face( parent->font_pool->FreeType_library, parent->filename.local8Bit(), 0, &face ); int error = FT_New_Face( parent->font_pool->FreeType_library, parent->filename.local8Bit(), 0, &face );
if ( error == FT_Err_Unknown_File_Format ) { if ( error == FT_Err_Unknown_File_Format ) {
errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").tqarg(parent->filename); errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").arg(parent->filename);
kdError(4300) << errorMessage << endl; kdError(4300) << errorMessage << endl;
fatalErrorInFontLoading = true; fatalErrorInFontLoading = true;
return; return;
} else } else
if ( error ) { if ( error ) {
errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").tqarg(parent->filename); errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").arg(parent->filename);
kdError(4300) << errorMessage << endl; kdError(4300) << errorMessage << endl;
fatalErrorInFontLoading = true; fatalErrorInFontLoading = true;
return; return;
@ -168,7 +168,7 @@ glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const T
long int characterSize_in_printers_points_by_64 = (long int)((64.0*72.0*parent->scaled_size_in_DVI_units*parent->font_pool->getCMperDVIunit())/2.54 + 0.5 ); long int characterSize_in_printers_points_by_64 = (long int)((64.0*72.0*parent->scaled_size_in_DVI_units*parent->font_pool->getCMperDVIunit())/2.54 + 0.5 );
error = FT_Set_Char_Size(face, 0, characterSize_in_printers_points_by_64, res, res ); error = FT_Set_Char_Size(face, 0, characterSize_in_printers_points_by_64, res, res );
if (error) { if (error) {
TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").tqarg(parent->filename); TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").arg(parent->filename);
if (errorMessage.isEmpty()) if (errorMessage.isEmpty())
errorMessage = msg; errorMessage = msg;
kdError(4300) << msg << endl; kdError(4300) << msg << endl;
@ -184,7 +184,7 @@ glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const T
error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_HINTING ); error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_HINTING );
if (error) { if (error) {
TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").tqarg(ch).tqarg(parent->filename); TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty()) if (errorMessage.isEmpty())
errorMessage = msg; errorMessage = msg;
kdError(4300) << msg << endl; kdError(4300) << msg << endl;
@ -196,7 +196,7 @@ glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const T
// convert to an anti-aliased bitmap // convert to an anti-aliased bitmap
error = FT_Render_Glyph( face->glyph, ft_render_mode_normal ); error = FT_Render_Glyph( face->glyph, ft_render_mode_normal );
if (error) { if (error) {
TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").tqarg(ch).tqarg(parent->filename); TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty()) if (errorMessage.isEmpty())
errorMessage = msg; errorMessage = msg;
kdError(4300) << msg << endl; kdError(4300) << msg << endl;
@ -209,8 +209,8 @@ glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const T
if ((slot->bitmap.width == 0) || (slot->bitmap.rows == 0)) { if ((slot->bitmap.width == 0) || (slot->bitmap.rows == 0)) {
if (errorMessage.isEmpty()) if (errorMessage.isEmpty())
errorMessage = i18n("Glyph #%1 is empty.").tqarg(ch); errorMessage = i18n("Glyph #%1 is empty.").arg(ch);
kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").tqarg(ch).tqarg(parent->filename) << endl; kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").arg(ch).arg(parent->filename) << endl;
g->shrunkenCharacter.resize( 15, 15 ); g->shrunkenCharacter.resize( 15, 15 );
g->shrunkenCharacter.fill(TQColor(255, 0, 0)); g->shrunkenCharacter.fill(TQColor(255, 0, 0));
g->x2 = 0; g->x2 = 0;
@ -279,7 +279,7 @@ glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const T
if (g->dvi_advance_in_units_of_design_size_by_2e20 == 0) { if (g->dvi_advance_in_units_of_design_size_by_2e20 == 0) {
int error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_SCALE); int error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_SCALE);
if (error) { if (error) {
TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").tqarg(ch).tqarg(parent->filename); TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty()) if (errorMessage.isEmpty())
errorMessage = msg; errorMessage = msg;
kdError(4300) << msg << endl; kdError(4300) << msg << endl;

@ -91,7 +91,7 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
characterBitmaps[i] = 0; characterBitmaps[i] = 0;
file = fopen(TQFile::encodeName(parent->filename), "r"); file = fopen(TQFile::encodeName(parent->filename), "r");
if (file == 0) if (file == 0)
kdError(4300) << i18n("Cannot open font file %1.").tqarg(parent->filename) << endl; kdError(4300) << i18n("Cannot open font file %1.").arg(parent->filename) << endl;
#ifdef DEBUG_PK #ifdef DEBUG_PK
else else
kdDebug(4300) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl; kdDebug(4300) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl;
@ -136,7 +136,7 @@ glyph* TeXFont_PK::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const TQ
// If the character is not defined in the PK file, mark the // If the character is not defined in the PK file, mark the
// character as missing, and print an error message // character as missing, and print an error message
if (g->addr == 0) { if (g->addr == 0) {
kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").tqarg(ch).tqarg(parent->filename) << endl; kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").arg(ch).arg(parent->filename) << endl;
g->addr = -1; g->addr = -1;
return g; return g;
} }
@ -454,7 +454,7 @@ void TeXFont_PK::PK_skip_specials()
case PK_NOOP : case PK_NOOP :
break; break;
default : default :
oops(i18n("Unexpected %1 in PK file %2").tqarg(PK_flag_byte).tqarg(parent->filename) ); oops(i18n("Unexpected %1 in PK file %2").arg(PK_flag_byte).arg(parent->filename) );
break; break;
} }
} }
@ -521,7 +521,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
w = num(fp, n); w = num(fp, n);
h = num(fp, n); h = num(fp, n);
if (w > 0x7fff || h > 0x7fff) if (w > 0x7fff || h > 0x7fff)
oops(i18n("The character %1 is too large in file %2").tqarg(ch).tqarg(parent->filename)); oops(i18n("The character %1 is too large in file %2").arg(ch).arg(parent->filename));
characterBitmaps[ch]->w = w; characterBitmaps[ch]->w = w;
characterBitmaps[ch]->h = h; characterBitmaps[ch]->h = h;
} }
@ -626,9 +626,9 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
paint_switch = 1 - paint_switch; paint_switch = 1 - paint_switch;
} }
if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h)))
oops(i18n("Wrong number of bits stored: char. %1, font %2").tqarg(ch).tqarg(parent->filename)); oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename));
if (rows_left != 0 || h_bit != characterBitmaps[ch]->w) if (rows_left != 0 || h_bit != characterBitmaps[ch]->w)
oops(i18n("Bad pk file (%1), too many bits").tqarg(parent->filename)); oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename));
} }
// The data in the bitmap is now in the processor's bit order, // The data in the bitmap is now in the processor's bit order,
@ -712,9 +712,9 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
paint_switch = 1 - paint_switch; paint_switch = 1 - paint_switch;
} }
if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h)))
oops(i18n("Wrong number of bits stored: char. %1, font %2").tqarg(ch).tqarg(parent->filename)); oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename));
if (rows_left != 0 || h_bit != characterBitmaps[ch]->w) if (rows_left != 0 || h_bit != characterBitmaps[ch]->w)
oops(i18n("Bad pk file (%1), too many bits").tqarg(parent->filename)); oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename));
} }
} // endif: big or small Endian? } // endif: big or small Endian?
} }

@ -256,7 +256,7 @@ void dvifile::prepare_pages()
while (i > 0) { while (i > 0) {
command_pointer = dvi_Data() + page_offset[i--]; command_pointer = dvi_Data() + page_offset[i--];
if (readUINT8() != BOP) { if (readUINT8() != BOP) {
errorMsg = i18n("The page %1 does not start with the BOP command.").tqarg(i+1); errorMsg = i18n("The page %1 does not start with the BOP command.").arg(i+1);
return; return;
} }
command_pointer += 10 * 4; command_pointer += 10 * 4;

@ -437,7 +437,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
if (!fi.exists() || fi.isDir()) { if (!fi.exists() || fi.isDir()) {
KMessageBox::error( parentWidget, 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>").arg(filename),
i18n("File Error!")); i18n("File Error!"));
return false; return false;
} }
@ -451,8 +451,8 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
KMessageBox::sorry( parentWidget, 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 ) .arg( fname )
.tqarg( mimetype ) ); .arg( mimetype ) );
return false; return false;
} }
@ -462,7 +462,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
KMessageBox::sorry( parentWidget, 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 ) ); .arg( fname ) );
return false; return false;
} }
@ -641,7 +641,7 @@ Anchor dviRenderer::parseReference(const TQString &reference)
"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 "
"information. Press the F1 key to open the manual.</qt>").tqarg(refLineNumber).tqarg(refFileName), "information. Press the F1 key to open the manual.</qt>").arg(refLineNumber).arg(refFileName),
i18n("Could Not Find Reference")); i18n("Could Not Find Reference"));
mutex.unlock(); mutex.unlock();
return Anchor(); return Anchor();
@ -681,7 +681,7 @@ Anchor dviRenderer::parseReference(const TQString &reference)
} else } else
if (anchorForRefFileFound == false) if (anchorForRefFileFound == false)
KMessageBox::sorry(parentWidget, 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>").arg(refLineNumber).arg(refFileName),
i18n( "Could Not Find Reference" )); i18n( "Could Not Find Reference" ));
else { else {
mutex.unlock(); mutex.unlock();
@ -735,7 +735,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
{ {
KMessageBox::sorry(parentWidget, 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.").arg(KShellProcess::quote(TeXfile)) +
TQString("</qt>"), TQString("</qt>"),
i18n( "Could Not Find File" )); i18n( "Could Not Find File" ));
return; return;
@ -786,7 +786,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
"for inverse search, reported an error. You might wish to look at the <strong>document info " "for inverse search, reported an error. You might wish to look at the <strong>document info "
"dialog</strong> which you will find in the File-Menu for a precise error report. The " "dialog</strong> which you will find in the File-Menu for a precise error report. The "
"manual for KDVI contains a detailed explanation how to set up your editor for use with KDVI, " "manual for KDVI contains a detailed explanation how to set up your editor for use with KDVI, "
"and a list of common problems.</qt>").tqarg(command); "and a list of common problems.</qt>").arg(command);
info->clear(i18n("Starting the editor...")); info->clear(i18n("Starting the editor..."));

@ -292,7 +292,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) {
currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); currinf.fontp = currinf.fonttable->find(ch - FNTNUM0);
if (currinf.fontp == NULL) { if (currinf.fontp == NULL) {
errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0);
return; return;
} }
currinf.set_char_p = currinf.fontp->set_char_p; currinf.set_char_p = currinf.fontp->set_char_p;
@ -567,7 +567,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
break; break;
default: default:
errorMsg = i18n("The unknown op-code %1 was encountered.").tqarg(ch); errorMsg = i18n("The unknown op-code %1 was encountered.").arg(ch);
return; return;
} /* end switch*/ } /* end switch*/
} /* end else (ch not a SETCHAR or FNTNUM) */ } /* end else (ch not a SETCHAR or FNTNUM) */

@ -101,7 +101,7 @@ void dviRenderer::exportPDF()
return; return;
TQFileInfo finfo(fileName); TQFileInfo finfo(fileName);
if (finfo.exists()) { if (finfo.exists()) {
int r = KMessageBox::warningContinueCancel (parentWidget, 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?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite")); i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel) if (r == KMessageBox::Cancel)
return; return;
@ -137,12 +137,12 @@ void dviRenderer::exportPDF()
export_errorString = i18n("<qt>The external program 'dvipdf', which was used to export the file, reported an error. " export_errorString = i18n("<qt>The external program 'dvipdf', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will " "You might wish to look at the <strong>document info dialog</strong> which you will "
"find in the File-Menu for a precise error report.</qt>") ; "find in the File-Menu for a precise error report.</qt>") ;
info->clear(i18n("Export: %1 to PDF").tqarg(KShellProcess::quote(dviFile->filename))); info->clear(i18n("Export: %1 to PDF").arg(KShellProcess::quote(dviFile->filename)));
proc->clearArguments(); proc->clearArguments();
finfo.setFile(dviFile->filename); finfo.setFile(dviFile->filename);
*proc << TQString("cd %1; dvipdfm").tqarg(KShellProcess::quote(finfo.dirPath(true))); *proc << TQString("cd %1; dvipdfm").arg(KShellProcess::quote(finfo.dirPath(true)));
*proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName)); *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
*proc << KShellProcess::quote(dviFile->filename); *proc << KShellProcess::quote(dviFile->filename);
proc->closeStdin(); proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) {
@ -200,7 +200,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
return; return;
TQFileInfo finfo(fileName); TQFileInfo finfo(fileName);
if (finfo.exists()) { if (finfo.exists()) {
int r = KMessageBox::warningYesNo (parentWidget, 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?").arg(fileName),
i18n("Overwrite File")); i18n("Overwrite File"));
if (r == KMessageBox::No) if (r == KMessageBox::No)
return; return;
@ -300,17 +300,17 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
export_errorString = i18n("<qt>The external program 'dvips', which was used to export the file, reported an error. " export_errorString = i18n("<qt>The external program 'dvips', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will " "You might wish to look at the <strong>document info dialog</strong> which you will "
"find in the File-Menu for a precise error report.</qt>") ; "find in the File-Menu for a precise error report.</qt>") ;
info->clear(i18n("Export: %1 to PostScript").tqarg(KShellProcess::quote(dviFile->filename))); info->clear(i18n("Export: %1 to PostScript").arg(KShellProcess::quote(dviFile->filename)));
proc->clearArguments(); proc->clearArguments();
TQFileInfo finfo(dviFile->filename); TQFileInfo finfo(dviFile->filename);
*proc << TQString("cd %1; dvips").tqarg(KShellProcess::quote(finfo.dirPath(true))); *proc << TQString("cd %1; dvips").arg(KShellProcess::quote(finfo.dirPath(true)));
if (printer == 0) if (printer == 0)
*proc << "-z"; // export Hyperlinks *proc << "-z"; // export Hyperlinks
if (options.isEmpty() == false) if (options.isEmpty() == false)
*proc << options; *proc << options;
*proc << TQString("%1").tqarg(KShellProcess::quote(sourceFileName)); *proc << TQString("%1").arg(KShellProcess::quote(sourceFileName));
*proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName)); *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
proc->closeStdin(); proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) { if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) {
kdError(4300) << "dvips failed to start" << endl; kdError(4300) << "dvips failed to start" << endl;

@ -84,7 +84,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand)
TQString originalFName = EPSfilename; TQString originalFName = EPSfilename;
embedPS_progress->setLabel(i18n("Embedding %1").tqarg(EPSfilename)); embedPS_progress->setLabel(i18n("Embedding %1").arg(EPSfilename));
tqApp->processEvents(); tqApp->processEvents();
@ -102,7 +102,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand)
for(page=0; page < dviFile->total_pages; page++) for(page=0; page < dviFile->total_pages; page++)
if ((dviFile->page_offset[page] <= currentOffset) && (currentOffset <= dviFile->page_offset[page+1])) if ((dviFile->page_offset[page] <= currentOffset) && (currentOffset <= dviFile->page_offset[page+1]))
break; break;
errorMsg += i18n("Page %1: The PostScript file <strong>%2</strong> could not be found.<br>").tqarg(page+1).tqarg(originalFName); errorMsg += i18n("Page %1: The PostScript file <strong>%2</strong> could not be found.<br>").arg(page+1).arg(originalFName);
embedPS_progress->progressBar()->advance(1); embedPS_progress->progressBar()->advance(1);
tqApp->processEvents(); tqApp->processEvents();
return; return;
@ -131,13 +131,13 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand)
int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise
// Generate the PostScript commands to be included // Generate the PostScript commands to be included
TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury); TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").arg(llx).arg(lly).arg(urx).arg(ury);
if (rwi != 0) if (rwi != 0)
PS.append( TQString(" %1 @rwi").tqarg(rwi) ); PS.append( TQString(" %1 @rwi").arg(rwi) );
if (rhi != 0) if (rhi != 0)
PS.append( TQString(" %1 @rhi").tqarg(rhi) ); PS.append( TQString(" %1 @rhi").arg(rhi) );
if (angle != 0) if (angle != 0)
PS.append( TQString(" %1 @angle").tqarg(angle) ); PS.append( TQString(" %1 @angle").arg(angle) );
if (clip != -1) if (clip != -1)
PS.append(" @clip"); PS.append(" @clip");
PS.append( " @setspecial\n" ); PS.append( " @setspecial\n" );
@ -252,7 +252,7 @@ void dviRenderer::prescan_ParsePapersizeSpecial(const TQString& _cp)
dviFile->suggestedPageSize = new pageSize; dviFile->suggestedPageSize = new pageSize;
dviFile->suggestedPageSize->setPageSize(cp); dviFile->suggestedPageSize->setPageSize(cp);
} else } else
printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").tqarg(cp)); printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").arg(cp));
return; return;
} }
@ -297,7 +297,7 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const TQString& cp)
} }
if (TQFile::exists(_file)) if (TQFile::exists(_file))
PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").tqarg(_file) ); PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").arg(_file) );
} }
@ -321,7 +321,7 @@ void dviRenderer::prescan_ParsePSQuoteSpecial(const TQString& cp)
double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300;
double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300;
PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
PostScriptOutPutString->append( " @beginspecial @setspecial \n" ); PostScriptOutPutString->append( " @beginspecial @setspecial \n" );
PostScriptOutPutString->append( cp ); PostScriptOutPutString->append( cp );
PostScriptOutPutString->append( " @endspecial \n" ); PostScriptOutPutString->append( " @endspecial \n" );
@ -375,17 +375,17 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp)
double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300;
if (cp.find("ps::[begin]", 0, false) == 0) { if (cp.find("ps::[begin]", 0, false) == 0) {
PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(11)) ); PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(11)) );
} else { } else {
if (cp.find("ps::[end]", 0, false) == 0) { if (cp.find("ps::[end]", 0, false) == 0) {
PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(9)) ); PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(9)) );
} else { } else {
if (cp.find("ps::", 0, false) == 0) { if (cp.find("ps::", 0, false) == 0) {
PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(4)) ); PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(4)) );
} else { } else {
PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(3)) ); PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(3)) );
} }
} }
} }
@ -459,22 +459,22 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp)
if (TQFile::exists(EPSfilename)) { if (TQFile::exists(EPSfilename)) {
double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300;
double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300;
PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
PostScriptOutPutString->append( "@beginspecial " ); PostScriptOutPutString->append( "@beginspecial " );
PostScriptOutPutString->append( TQString(" %1 @llx").tqarg(llx) ); PostScriptOutPutString->append( TQString(" %1 @llx").arg(llx) );
PostScriptOutPutString->append( TQString(" %1 @lly").tqarg(lly) ); PostScriptOutPutString->append( TQString(" %1 @lly").arg(lly) );
PostScriptOutPutString->append( TQString(" %1 @urx").tqarg(urx) ); PostScriptOutPutString->append( TQString(" %1 @urx").arg(urx) );
PostScriptOutPutString->append( TQString(" %1 @ury").tqarg(ury) ); PostScriptOutPutString->append( TQString(" %1 @ury").arg(ury) );
if (rwi != 0) if (rwi != 0)
PostScriptOutPutString->append( TQString(" %1 @rwi").tqarg(rwi) ); PostScriptOutPutString->append( TQString(" %1 @rwi").arg(rwi) );
if (rhi != 0) if (rhi != 0)
PostScriptOutPutString->append( TQString(" %1 @rhi").tqarg(rhi) ); PostScriptOutPutString->append( TQString(" %1 @rhi").arg(rhi) );
if (angle != 0) if (angle != 0)
PostScriptOutPutString->append( TQString(" %1 @angle").tqarg(angle) ); PostScriptOutPutString->append( TQString(" %1 @angle").arg(angle) );
if (clip != -1) if (clip != -1)
PostScriptOutPutString->append(" @clip"); PostScriptOutPutString->append(" @clip");
PostScriptOutPutString->append( " @setspecial \n" ); PostScriptOutPutString->append( " @setspecial \n" );
PostScriptOutPutString->append( TQString(" (%1) run\n").tqarg(EPSfilename) ); PostScriptOutPutString->append( TQString(" (%1) run\n").arg(EPSfilename) );
PostScriptOutPutString->append( "@endspecial \n" ); PostScriptOutPutString->append( "@endspecial \n" );
} }
@ -633,7 +633,7 @@ void dviRenderer::prescan(parseSpecials specialParser)
if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) {
currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); currinf.fontp = currinf.fonttable->find(ch - FNTNUM0);
if (currinf.fontp == NULL) { if (currinf.fontp == NULL) {
errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0);
return; return;
} }
currinf.set_char_p = currinf.fontp->set_char_p; currinf.set_char_p = currinf.fontp->set_char_p;

@ -112,7 +112,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e)
if (cp[i].isDigit() == false) if (cp[i].isDigit() == false)
break; break;
emit setStatusBarText( i18n("line %1 of %2").tqarg(cp.left(i)).tqarg(cp.mid(i).simplifyWhiteSpace()) ); emit setStatusBarText( i18n("line %1 of %2").arg(cp.left(i)).arg(cp.mid(i).simplifyWhiteSpace()) );
return; return;
} }
} }

@ -36,7 +36,7 @@ fontEncoding::fontEncoding(const TQString &encName)
encFileName = encFileName.stripWhiteSpace(); encFileName = encFileName.stripWhiteSpace();
if (encFileName.isEmpty()) { if (encFileName.isEmpty()) {
kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").tqarg(encName) << endl; kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl;
return; return;
} }
@ -76,7 +76,7 @@ fontEncoding::fontEncoding(const TQString &encName)
for(; i<256; i++) for(; i<256; i++)
glyphNameVector[i] = ".notdef"; glyphNameVector[i] = ".notdef";
} else { } else {
kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").tqarg(encFileName) << endl; kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl;
return; return;
} }

@ -20,7 +20,7 @@
* MetaFont fonts. A DVI file referres to a MetaFont font by giving an * MetaFont fonts. A DVI file referres to a MetaFont font by giving an
* at-most-8-character name, such as 'cmr10'. The DVI previewer would * at-most-8-character name, such as 'cmr10'. The DVI previewer would
* then locate the associated PK font file (e.g. cmr10.600pk), load * then locate the associated PK font file (e.g. cmr10.600pk), load
* it, and retrieve the character tqshaped. * it, and retrieve the character shaped.
* *
* Today TeX is also used to access Type1 and TrueType fonts, which it * Today TeX is also used to access Type1 and TrueType fonts, which it
* was never designed to do. As in the case of MetaFont font, the DVI * was never designed to do. As in the case of MetaFont font, the DVI

@ -98,7 +98,7 @@ fontMap::fontMap()
} }
file.close(); file.close();
} else } else
kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").tqarg(map_fileName) << endl; kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl;
#ifdef DEBUG_FONTMAP #ifdef DEBUG_FONTMAP
kdDebug(4300) << "FontMap file parsed. Results:" << endl; kdDebug(4300) << "FontMap file parsed. Results:" << endl;

@ -55,7 +55,7 @@ class fontMapEntry {
* Long time ago, when TeX was only used with MetaFont fonts, the DVI * Long time ago, when TeX was only used with MetaFont fonts, the DVI
* file would specify a font by giving an 8-character name, such as * file would specify a font by giving an 8-character name, such as
* 'cmr10'. The DVI previewer would then locate the associated PK font * 'cmr10'. The DVI previewer would then locate the associated PK font
* file, load it, and retrieve the character tqshaped. Happy times, they * file, load it, and retrieve the character shaped. Happy times, they
* were. * were.
* *
* Today TeX is also used to access Type1 and TrueType fonts, which do * Today TeX is also used to access Type1 and TrueType fonts, which do

@ -187,12 +187,12 @@ TQString fontPool::status()
text.append("<table WIDTH=\"100%\" NOSAVE >"); text.append("<table WIDTH=\"100%\" NOSAVE >");
text.append( TQString("<tr><td><b>%1</b></td> <td><b>%2</b></td> <td><b>%3</b></td> <td><b>%4</b> <td><b>%5</b></td> <td><b>%6</b></td></tr>") text.append( TQString("<tr><td><b>%1</b></td> <td><b>%2</b></td> <td><b>%3</b></td> <td><b>%4</b> <td><b>%5</b></td> <td><b>%6</b></td></tr>")
.tqarg(i18n("TeX Name")) .arg(i18n("TeX Name"))
.tqarg(i18n("Family")) .arg(i18n("Family"))
.tqarg(i18n("Zoom")) .arg(i18n("Zoom"))
.tqarg(i18n("Type")) .arg(i18n("Type"))
.tqarg(i18n("Encoding")) .arg(i18n("Encoding"))
.tqarg(i18n("Comment")) ); .arg(i18n("Comment")) );
TeXFontDefinition *fontp = fontList.first(); TeXFontDefinition *fontp = fontList.first();
while ( fontp != 0 ) { while ( fontp != 0 ) {
@ -210,12 +210,12 @@ TQString fontPool::status()
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
tmp << TQString ("<tr><td>%1</td> <td>%2</td> <td>%3%</td> <td>%4</td> <td>%5</td> <td>%6</td></tr>") tmp << TQString ("<tr><td>%1</td> <td>%2</td> <td>%3%</td> <td>%4</td> <td>%5</td> <td>%6</td></tr>")
.tqarg(fontp->fontname) .arg(fontp->fontname)
.tqarg(fontp->getFullFontName()) .arg(fontp->getFullFontName())
.tqarg((int)(fontp->enlargement*100 + 0.5)) .arg((int)(fontp->enlargement*100 + 0.5))
.tqarg(fontp->getFontTypeName()) .arg(fontp->getFontTypeName())
.tqarg(encoding) .arg(encoding)
.tqarg(errMsg); .arg(errMsg);
#endif #endif
fontp=fontList.next(); fontp=fontList.next();
@ -280,7 +280,7 @@ void fontPool::locateFonts()
// present an error message to the user. // present an error message to the user.
if (!areFontsLocated()) { if (!areFontsLocated()) {
markFontsAsLocated(); markFontsAsLocated();
TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").tqarg(getenv("PATH")).tqarg(kpsewhichOutput); TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
KMessageBox::detailedError( 0, i18n("<qt><p>KDVI was not able to locate all the font files " KMessageBox::detailedError( 0, i18n("<qt><p>KDVI was not able to locate all the font files "
"which are necessary to display the current DVI file. " "which are necessary to display the current DVI file. "
"Your document might be unreadable.</p></qt>"), "Your document might be unreadable.</p></qt>"),
@ -330,17 +330,17 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
numFontsInJob++; numFontsInJob++;
if (locateTFMonly == true) if (locateTFMonly == true)
shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").tqarg(fontp->fontname)); shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").arg(fontp->fontname));
else { else {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
if (FreeType_could_be_loaded == true) { if (FreeType_could_be_loaded == true) {
const TQString &filename = fontsByTeXName.findFileName(fontp->fontname); const TQString &filename = fontsByTeXName.findFileName(fontp->fontname);
if (!filename.isEmpty()) if (!filename.isEmpty())
shellProcessCmdLine += KShellProcess::quote(TQString("%1").tqarg(filename)); shellProcessCmdLine += KShellProcess::quote(TQString("%1").arg(filename));
} }
#endif #endif
shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").tqarg(fontp->fontname)); shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").arg(fontp->fontname));
shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").tqarg(fontp->fontname)); shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").arg(fontp->fontname));
} }
} }
fontp=fontList.next(); fontp=fontList.next();
@ -363,7 +363,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
"and your document might by unreadable. If this error is reproducable " "and your document might by unreadable. If this error is reproducable "
"please report the issue to the KDVI developers using the 'Help' menu.<p>" ); "please report the issue to the KDVI developers using the 'Help' menu.<p>" );
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
KMessageBox::error( 0, TQString("<qt>%1%2</qt>").tqarg(importanceOfKPSEWHICH).tqarg(msg), KMessageBox::error( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg),
i18n("Problem locating fonts - KDVI") ); i18n("Problem locating fonts - KDVI") );
markFontsAsLocated(); markFontsAsLocated();
return; return;
@ -399,9 +399,9 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
"typesetting system. If TeX is not installed on your system, you could install the TeTeX distribution (www.tetex.org). " "typesetting system. If TeX is not installed on your system, you could install the TeTeX distribution (www.tetex.org). "
"If you are sure that TeX is installed, please try to use the kpsewhich program from the command line to check if it " "If you are sure that TeX is installed, please try to use the kpsewhich program from the command line to check if it "
"really works.</p>"); "really works.</p>");
TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").tqarg(getenv("PATH")).tqarg(kpsewhichOutput); TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
KMessageBox::detailedError( 0, TQString("<qt>%1%2</qt>").tqarg(importanceOfKPSEWHICH).tqarg(msg), details, KMessageBox::detailedError( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg), details,
i18n("Problem locating fonts - KDVI") ); i18n("Problem locating fonts - KDVI") );
// This makes sure the we don't try to run kpsewhich again // This makes sure the we don't try to run kpsewhich again
markFontsAsLocated(); markFontsAsLocated();
@ -587,7 +587,7 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen)
TQString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1); TQString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1);
progress.show(); progress.show();
progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").tqarg(fontName).tqarg(dpi) ); progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").arg(fontName).arg(dpi) );
} }
MetafontOutput = MetafontOutput.remove(0,numleft+1); MetafontOutput = MetafontOutput.remove(0,numleft+1);
} }

@ -64,17 +64,17 @@ void infoDialog::setDVIData(dvifile *dviFile)
text = i18n("There is no DVI file loaded at the moment."); text = i18n("There is no DVI file loaded at the moment.");
else { else {
text.append("<table WIDTH=\"100%\" NOSAVE >"); text.append("<table WIDTH=\"100%\" NOSAVE >");
text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("Filename")).tqarg(dviFile->filename)); text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Filename")).arg(dviFile->filename));
TQFile file(dviFile->filename); TQFile file(dviFile->filename);
if (file.exists()) if (file.exists())
text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("File Size")).tqarg(KIO::convertSize(file.size()))); text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("File Size")).arg(KIO::convertSize(file.size())));
else else
text.append(TQString("<tr><td><b> </b></td> <td>%1</td></tr>").tqarg(i18n("The file does no longer exist."))); text.append(TQString("<tr><td><b> </b></td> <td>%1</td></tr>").arg(i18n("The file does no longer exist.")));
text.append(TQString("<tr><td><b> </b></td> <td> </td></tr>")); text.append(TQString("<tr><td><b> </b></td> <td> </td></tr>"));
text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("#Pages")).tqarg(dviFile->total_pages)); text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("#Pages")).arg(dviFile->total_pages));
text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("Generator/Date")).tqarg(dviFile->generatorString)); text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Generator/Date")).arg(dviFile->generatorString));
} // else (dviFile == NULL) } // else (dviFile == NULL)
TextLabel1->setText( text ); TextLabel1->setText( text );

@ -161,7 +161,7 @@ void KDVIMultiPage::slotSave()
fileName = fileName+ending; fileName = fileName+ending;
if (TQFile(fileName).exists()) { if (TQFile(fileName).exists()) {
int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite")); i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel) if (r == KMessageBox::Cancel)
return; return;
@ -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(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) )) if (!printer->setup(parentWdg, i18n("Print %1").arg(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
@ -379,7 +379,7 @@ void KDVIMultiPage::print()
dvips_options += TQString(","); dvips_options += TQString(",");
else else
commaflag = 1; commaflag = 1;
dvips_options += TQString("%1").tqarg(*it); dvips_options += TQString("%1").arg(*it);
} }
// Now print. For that, export the DVI-File to PostScript. Note that // Now print. For that, export the DVI-File to PostScript. Note that

@ -77,14 +77,14 @@ int main(int argc, char** argv)
if (!url.isValid()) if (!url.isValid())
{ {
kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl;
return -1; return -1;
} }
if (!url.isLocalFile()) if (!url.isLocalFile())
{ {
kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local "
"files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl;
return -1; return -1;
} }

@ -169,7 +169,7 @@
<property name="text"> <property name="text">
<string>What is 'inverse search'? </string> <string>What is 'inverse search'? </string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="url" stdset="0"> <property name="url" stdset="0">

@ -211,11 +211,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
TQStringList argus; TQStringList argus;
argus << "gs"; argus << "gs";
argus << "-dSAFER" << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNOPAUSE" << "-dBATCH"; argus << "-dSAFER" << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNOPAUSE" << "-dBATCH";
argus << TQString("-sDEVICE=%1").tqarg(*gsDevice); argus << TQString("-sDEVICE=%1").arg(*gsDevice);
argus << TQString("-sOutputFile=%1").tqarg(filename); argus << TQString("-sOutputFile=%1").arg(filename);
argus << TQString("-sExtraIncludePath=%1").tqarg(includePath); argus << TQString("-sExtraIncludePath=%1").arg(includePath);
argus << TQString("-g%1x%2").tqarg(pixel_page_w).tqarg(pixel_page_h); // page size in pixels argus << TQString("-g%1x%2").arg(pixel_page_w).arg(pixel_page_h); // page size in pixels
argus << TQString("-r%1").tqarg(resolution); // resolution in dpi argus << TQString("-r%1").arg(resolution); // resolution in dpi
argus << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe"; argus << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe";
argus << "-f" << PSfile.name(); argus << "-f" << PSfile.name();
@ -241,7 +241,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
while(proc.readln(GSoutput) != -1) { while(proc.readln(GSoutput) != -1) {
if (GSoutput.contains("Unknown device")) { if (GSoutput.contains("Unknown device")) {
kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support " kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support "
"the '%1' ghostview device driver.").tqarg(*gsDevice) << endl; "the '%1' ghostview device driver.").arg(*gsDevice) << endl;
knownDevices.remove(gsDevice); knownDevices.remove(gsDevice);
gsDevice = knownDevices.begin(); gsDevice = knownDevices.begin();
if (knownDevices.isEmpty()) if (knownDevices.isEmpty())
@ -267,7 +267,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
"drivers. Note that KDVI needs to be restarted to re-enable PostScript support." "drivers. Note that KDVI needs to be restarted to re-enable PostScript support."
"</p></qt>")); "</p></qt>"));
else { else {
kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").tqarg(*gsDevice) << endl; kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice) << endl;
gs_generate_graphics_file(page, filename, magnification); gs_generate_graphics_file(page, filename, magnification);
} }
return; return;

@ -222,7 +222,7 @@ void dviRenderer::color_special(const TQString& _cp)
// Take color off the stack // Take color off the stack
if (colorStack.isEmpty()) if (colorStack.isEmpty())
printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Color pop command issued when the color stack is empty." ). printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Color pop command issued when the color stack is empty." ).
tqarg(dviFile->filename).tqarg(current_page)); arg(dviFile->filename).arg(current_page));
else else
colorStack.pop(); colorStack.pop();
return; return;
@ -308,7 +308,7 @@ void parse_special_argument(const TQString& strg, const char* argument_name, int
// Maybe we should open a dialog here. // Maybe we should open a dialog here.
kdError(4300) << i18n("Malformed parameter in the epsf special command.\n" kdError(4300) << i18n("Malformed parameter in the epsf special command.\n"
"Expected a float to follow %1 in %2") "Expected a float to follow %1 in %2")
.tqarg(argument_name).tqarg(strg) << endl; .arg(argument_name).arg(strg) << endl;
} }
} }
@ -432,7 +432,7 @@ void dviRenderer::epsf_special(const TQString& cp)
foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), EPSfilename_orig, -1); foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), EPSfilename_orig, -1);
else else
foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter),
i18n("File not found: \n %1").tqarg(EPSfilename_orig), -1); i18n("File not found: \n %1").arg(EPSfilename_orig), -1);
foreGroundPainter->restore(); foreGroundPainter->restore();
} }
@ -469,12 +469,12 @@ void dviRenderer::TPIC_addPath_special(const TQString& cp)
bool ok; bool ok;
float xKoord = cp_noWhiteSpace.section(' ', 0, 0).toFloat(&ok); float xKoord = cp_noWhiteSpace.section(' ', 0, 0).toFloat(&ok);
if (ok == false) { if (ok == false) {
printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").tqarg(cp) ); printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").arg(cp) );
return; return;
} }
float yKoord = cp_noWhiteSpace.section(' ', 1, 1).toFloat(&ok); float yKoord = cp_noWhiteSpace.section(' ', 1, 1).toFloat(&ok);
if (ok == false) { if (ok == false) {
printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").tqarg(cp) ); printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").arg(cp) );
return; return;
} }
@ -502,7 +502,7 @@ void dviRenderer::TPIC_setPen_special(const TQString& cp)
bool ok; bool ok;
penWidth_in_mInch = cp.stripWhiteSpace().toFloat(&ok); penWidth_in_mInch = cp.stripWhiteSpace().toFloat(&ok);
if (ok == false) { if (ok == false) {
printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").tqarg(cp) ); printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").arg(cp) );
penWidth_in_mInch = 0.0; penWidth_in_mInch = 0.0;
return; return;
} }
@ -700,7 +700,7 @@ void dviRenderer::applicationDoSpecial(char *cp)
foreGroundPainter->translate(-x,-y); foreGroundPainter->translate(-x,-y);
} else } else
printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Could not interpret angle in text rotation special." ). printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Could not interpret angle in text rotation special." ).
tqarg(dviFile->filename).tqarg(current_page)); arg(dviFile->filename).arg(current_page));
} }
// The graphicx package marks the end of rotated text with this // The graphicx package marks the end of rotated text with this
@ -722,6 +722,6 @@ void dviRenderer::applicationDoSpecial(char *cp)
(strncasecmp(cp, "background", 10) == 0) ) (strncasecmp(cp, "background", 10) == 0) )
return; return;
printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").tqarg(special_command)); printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").arg(special_command));
return; return;
} }

@ -177,7 +177,7 @@ void TeXFontDefinition::read_VF_index()
} }
} }
if (cmnd != POST) if (cmnd != POST)
oops(i18n("Wrong command byte found in VF macro list: %1").tqarg(cmnd)); oops(i18n("Wrong command byte found in VF macro list: %1").arg(cmnd));
fclose (VF_file); fclose (VF_file);
file = NULL; file = NULL;

@ -110,7 +110,7 @@ notetiff(const char *name)
if ((tf = fopen(name, "r")) == NULL) { if ((tf = fopen(name, "r")) == NULL) {
TQString mesg = i18n("Unable to open:\n%1\n").tqarg(TQFile::decodeName(name)); TQString mesg = i18n("Unable to open:\n%1\n").arg(TQFile::decodeName(name));
kfaxerror(i18n("Sorry"), mesg); kfaxerror(i18n("Sorry"), mesg);
return 0; return 0;
} }
@ -147,7 +147,7 @@ notetiff(const char *name)
if (fseek(tf, IFDoff, SEEK_SET) < 0) { if (fseek(tf, IFDoff, SEEK_SET) < 0) {
realbad: realbad:
str = i18n("Invalid tiff file:\n%1\n").tqarg(TQFile::decodeName(name)); str = i18n("Invalid tiff file:\n%1\n").arg(TQFile::decodeName(name));
kfaxerror(i18n("Sorry"),str); kfaxerror(i18n("Sorry"),str);
bad: bad:
if (strips) if (strips)
@ -249,7 +249,7 @@ notetiff(const char *name)
case 279: /* StripByteCounts */ case 279: /* StripByteCounts */
if (count != nstrips) { if (count != nstrips) {
str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n") str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n")
.tqarg(TQFile::decodeName(name)).tqarg(nstrips).tqarg(count); .arg(TQFile::decodeName(name)).arg(nstrips).arg(count);
kfaxerror(i18n("Message"),str); kfaxerror(i18n("Message"),str);
goto realbad; goto realbad;
} }
@ -419,7 +419,7 @@ getstrip(struct pagenode *pn, int strip)
pn->length = pn->strips[strip].size; pn->length = pn->strips[strip].size;
} }
else { else {
str = i18n("Trying to expand too many strips\n%1%n").tqarg(TQFile::decodeName(pn->pathname)); str = i18n("Trying to expand too many strips\n%1%n").arg(TQFile::decodeName(pn->pathname));
kfaxerror(i18n("Warning"),str); kfaxerror(i18n("Warning"),str);
return NULL; return NULL;
} }
@ -448,7 +448,7 @@ getstrip(struct pagenode *pn, int strip)
/* handle ghostscript / PC Research fax file */ /* handle ghostscript / PC Research fax file */
if (Data[24] != 1 || Data[25] != 0){ if (Data[24] != 1 || Data[25] != 0){
str = i18n("Only the first page of the PC Research multipage file\n%1\nwill be shown\n") str = i18n("Only the first page of the PC Research multipage file\n%1\nwill be shown\n")
.tqarg(TQFile::decodeName(pn->pathname)); .arg(TQFile::decodeName(pn->pathname));
kfaxerror(i18n("Message"),str); kfaxerror(i18n("Message"),str);
} }
pn->length -= 64; pn->length -= 64;
@ -462,7 +462,7 @@ getstrip(struct pagenode *pn, int strip)
pn->height = G3count(pn, pn->expander == g32expand); pn->height = G3count(pn, pn->expander == g32expand);
if (pn->height == 0) { if (pn->height == 0) {
str = i18n("No fax found in file:\n%1\n").tqarg(TQFile::decodeName(pn->pathname)); str = i18n("No fax found in file:\n%1\n").arg(TQFile::decodeName(pn->pathname));
kfaxerror(i18n("Sorry"),str); kfaxerror(i18n("Sorry"),str);
errno = 0; errno = 0;
badfile(pn); badfile(pn);

@ -701,7 +701,7 @@ void TopLevel::print(){
printer.setFullPage( true ); printer.setFullPage( true );
printer.setUsePrinterResolution( true ); printer.setUsePrinterResolution( true );
printer.setCreator( i18n("KFax") + " " KFAXVERSION ); printer.setCreator( i18n("KFax") + " " KFAXVERSION );
printer.setDocName( TQString("%1 - %2").tqarg(firstpage->name).tqarg(i18n("KFax"))); printer.setDocName( TQString("%1 - %2").arg(firstpage->name).arg(i18n("KFax")));
printer.setDocFileName( firstpage->name ); printer.setDocFileName( firstpage->name );
printer.setPageSelection( KPrinter::ApplicationSide ); printer.setPageSelection( KPrinter::ApplicationSide );
printer.setMinMax( 1, pages ); printer.setMinMax( 1, pages );
@ -792,11 +792,11 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter )
TQSize scaledImageSize = size; TQSize scaledImageSize = size;
if (size.width() > maxSize.width() || size.height() > maxSize.height() ) { if (size.width() > maxSize.width() || size.height() > maxSize.height() ) {
// Image does not fit - scale it and print centered // Image does not fit - scale it and print centered
scaledImageSize.tqscale( maxSize, TQSize::ScaleMin ); scaledImageSize.scale( maxSize, TQSize::ScaleMin );
kdDebug() << "Image does not fit - scaling to " << maxSize << endl; kdDebug() << "Image does not fit - scaling to " << maxSize << endl;
} else { } else {
// Image does fit - print it in original size, but centered // Image does fit - print it in original size, but centered
scaledImageSize.tqscale( size, TQSize::ScaleMin ); scaledImageSize.scale( size, TQSize::ScaleMin );
kdDebug() << "Image does fit - scaling to " << size << endl; kdDebug() << "Image does fit - scaling to " << size << endl;
} }
kdDebug() << "Final image size " << scaledImageSize << endl; kdDebug() << "Final image size " << scaledImageSize << endl;
@ -846,7 +846,7 @@ void TopLevel::openNetFile( const KURL &u)
if ( u.isLocalFile() ) if ( u.isLocalFile() )
{ {
TQString string = i18n("Loading '%1'").tqarg(u.path()); TQString string = i18n("Loading '%1'").arg(u.path());
statusbar->message(string); statusbar->message(string);
openadd( u.path()); openadd( u.path());
statusbar->clear(); statusbar->clear();
@ -1441,17 +1441,17 @@ void TopLevel::uiUpdate(){
currentpage = pages; currentpage = pages;
} }
TQString pagestr = i18n("Page: %1 of %2").tqarg(currentpage).tqarg(pages); TQString pagestr = i18n("Page: %1 of %2").arg(currentpage).arg(pages);
statusbar->changeItem(pagestr, ID_PAGE_NO); statusbar->changeItem(pagestr, ID_PAGE_NO);
if(Image){ if(Image){
TQString wh = i18n("W: %1 H: %2").tqarg(Image->width).tqarg(Image->height); TQString wh = i18n("W: %1 H: %2").arg(Image->width).arg(Image->height);
statusbar->changeItem(wh, ID_INS_OVR); statusbar->changeItem(wh, ID_INS_OVR);
} }
TQString resolution = i18n("Res: %1").tqarg(thispage->vres?i18n("Fine"):i18n("Normal")); TQString resolution = i18n("Res: %1").arg(thispage->vres?i18n("Fine"):i18n("Normal"));
// TODO: resolution += TQString("%1x%2").tqarg(thispage->dpiX).tqarg(thispage->dpiY); // TODO: resolution += TQString("%1x%2").arg(thispage->dpiX).arg(thispage->dpiY);
statusbar->changeItem(resolution, ID_GENERAL); statusbar->changeItem(resolution, ID_GENERAL);
statusbar->changeItem(thispage->name, ID_FNAME); statusbar->changeItem(thispage->name, ID_FNAME);

@ -136,7 +136,7 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &)
TQString filename = fi.absFilePath(); TQString filename = fi.absFilePath();
if (!fi.exists() || fi.isDir()) { if (!fi.exists() || fi.isDir()) {
KMessageBox::error( parentWidget, 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>").arg(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.
mutex.unlock(); mutex.unlock();
@ -157,11 +157,11 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &)
// this case gracefully. // this case gracefully.
if (fax.errorString().isEmpty()) if (fax.errorString().isEmpty())
KMessageBox::error( parentWidget, 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>").arg(filename),
i18n("File Error")); i18n("File Error"));
else else
KMessageBox::detailedError( parentWidget, 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>").arg(filename),
fax.errorString(), fax.errorString(),
i18n("File Error")); i18n("File Error"));
clear(); clear();

@ -327,7 +327,7 @@ KFaxImage::notetiff()
case 279: /* StripByteCounts */ case 279: /* StripByteCounts */
if (count != nstrips) { if (count != nstrips) {
str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n") str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n")
.tqarg(filename()).tqarg(nstrips).tqarg(count); .arg(filename()).arg(nstrips).arg(count);
kfaxerror(str); kfaxerror(str);
goto realbad; goto realbad;
} }
@ -403,7 +403,7 @@ KFaxImage::notetiff()
void void
KFaxImage::badfile(pagenode *pn) KFaxImage::badfile(pagenode *pn)
{ {
kfaxerror(i18n("%1: Bad Fax File").tqarg(filename())); kfaxerror(i18n("%1: Bad Fax File").arg(filename()));
FreeImage(pn); FreeImage(pn);
} }

@ -97,14 +97,14 @@ int main(int argc, char** argv)
if (!url.isValid()) if (!url.isValid())
{ {
kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl;
return -1; return -1;
} }
if (!url.isLocalFile()) if (!url.isLocalFile())
{ {
kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local "
"files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl;
return -1; return -1;
} }

@ -68,7 +68,7 @@ int PageTransition::duration() const
return data->pt->getDuration(); return data->pt->getDuration();
} }
PageTransition::Alignment PageTransition::tqalignment() const PageTransition::Alignment PageTransition::alignment() const
{ {
return (Poppler::PageTransition::Alignment)data->pt->getAlignment(); return (Poppler::PageTransition::Alignment)data->pt->getAlignment();
} }

@ -60,7 +60,7 @@ class PageTransition {
Fade Fade
}; };
/** \brief tqalignment of the transition effect that shall be used /** \brief alignment of the transition effect that shall be used
*/ */
// if changed remember to keep in sync with PageTransition.h enum // if changed remember to keep in sync with PageTransition.h enum
enum Alignment { enum Alignment {
@ -114,7 +114,7 @@ class PageTransition {
/** /**
\brief Get dimension in which the transition effect occurs. \brief Get dimension in which the transition effect occurs.
*/ */
Alignment tqalignment() const; Alignment alignment() const;
/** /**
\brief Get direction of motion of the transition effect. \brief Get direction of motion of the transition effect.

@ -79,7 +79,7 @@ GooString *TQStringToGooString(const TQString &s)
int len = s.length(); int len = s.length();
char *cstring = (char *)gmallocn(s.length(), sizeof(char)); char *cstring = (char *)gmallocn(s.length(), sizeof(char));
for (int i = 0; i < len; ++i) for (int i = 0; i < len; ++i)
cstring[i] = s.tqat(i).tqunicode(); cstring[i] = s.at(i).tqunicode();
GooString *ret = new GooString(cstring, len); GooString *ret = new GooString(cstring, len);
gfree(cstring); gfree(cstring);
return ret; return ret;
@ -136,11 +136,11 @@ void DocumentData::addTocChildren( TQDomDocument * docSyn, TQDomNode * parent, G
} }
} }
// 3. recursively descend over tqchildren // 3. recursively descend over children
outlineItem->open(); outlineItem->open();
GooList * tqchildren = outlineItem->getKids(); GooList * children = outlineItem->getKids();
if ( tqchildren ) if ( children )
addTocChildren( docSyn, &item, tqchildren ); addTocChildren( docSyn, &item, children );
} }
} }

@ -237,10 +237,10 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
#endif #endif
TQString UTCOffset; TQString UTCOffset;
if (utcOffset(h)>0.0) { if (utcOffset(h)>0.0) {
UTCOffset.append(TQString("%1").tqarg(utcOffset(h)/3600, 0, 'f', 1)); UTCOffset.append(TQString("%1").arg(utcOffset(h)/3600, 0, 'f', 1));
UTCOffset.append(" hours behind UTC"); UTCOffset.append(" hours behind UTC");
} else { } else {
UTCOffset.append(TQString("%1").tqarg(-1.0*utcOffset(h)/3600, 0, 'f', 1)); UTCOffset.append(TQString("%1").arg(-1.0*utcOffset(h)/3600, 0, 'f', 1));
UTCOffset.append(" hours ahead of UTC"); UTCOffset.append(" hours ahead of UTC");
} }
appendItem( stdgroup, "UTC Offset", UTCOffset); appendItem( stdgroup, "UTC Offset", UTCOffset);
@ -264,10 +264,10 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
if ( hasLongitude(h) ) { if ( hasLongitude(h) ) {
TQString Longitude; TQString Longitude;
if (longitude(h)<0.0) { if (longitude(h)<0.0) {
Longitude.append(TQString("%1").tqarg(-1.0*longitude(h),0,'f',3)); Longitude.append(TQString("%1").arg(-1.0*longitude(h),0,'f',3));
Longitude.append(" deg West"); Longitude.append(" deg West");
} else { } else {
Longitude.append(TQString("%1").tqarg(longitude(h),0,'f',3)); Longitude.append(TQString("%1").arg(longitude(h),0,'f',3));
Longitude.append(" deg East"); Longitude.append(" deg East");
} }
appendItem( stdgroup, "Longitude", Longitude); appendItem( stdgroup, "Longitude", Longitude);
@ -275,17 +275,17 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
if ( hasLatitude(h) ) { if ( hasLatitude(h) ) {
TQString Latitude; TQString Latitude;
if (latitude(h)<0.0) { if (latitude(h)<0.0) {
Latitude.append(TQString("%1").tqarg(-1.0*latitude(h),0,'f',3)); Latitude.append(TQString("%1").arg(-1.0*latitude(h),0,'f',3));
Latitude.append(" deg South"); Latitude.append(" deg South");
} else { } else {
Latitude.append(TQString("%1").tqarg(latitude(h),0,'f',3)); Latitude.append(TQString("%1").arg(latitude(h),0,'f',3));
Latitude.append(" deg North"); Latitude.append(" deg North");
} }
appendItem( stdgroup, "Latitude", Latitude ); appendItem( stdgroup, "Latitude", Latitude );
} }
if ( hasAltitude(h) ) { if ( hasAltitude(h) ) {
double Altitude = altitude(h); double Altitude = altitude(h);
appendItem( stdgroup, "Altitude", TQString("%1").tqarg(Altitude,0,'f',1) ); appendItem( stdgroup, "Altitude", TQString("%1").arg(Altitude,0,'f',1) );
} }
if ( hasIsoSpeed(h) ) { if ( hasIsoSpeed(h) ) {
double IsoSpeed = isoSpeed(h); double IsoSpeed = isoSpeed(h);

@ -803,7 +803,7 @@ void ExifData::process_EXIF(unsigned char * CharBuf, unsigned int length)
// printf("Exif section in Motorola order\n"); // printf("Exif section in Motorola order\n");
MotorolaOrder = 1; MotorolaOrder = 1;
}else{ }else{
throw FatalError("Invalid Exif tqalignment marker."); throw FatalError("Invalid Exif alignment marker.");
} }
} }

@ -83,16 +83,16 @@ bool KPdfPlugin::readInfo( KFileMetaInfo& info, uint /* what */)
if (doc->isEncrypted()) if (doc->isEncrypted())
{ {
enc = i18n("Yes (Can Print:%1 Can Copy:%2 Can Change:%3 Can Add notes:%4)") enc = i18n("Yes (Can Print:%1 Can Copy:%2 Can Change:%3 Can Add notes:%4)")
.tqarg(doc->okToPrint() ? i18n("Yes") : i18n("No")) .arg(doc->okToPrint() ? i18n("Yes") : i18n("No"))
.tqarg(doc->okToCopy() ? i18n("Yes") : i18n("No")) .arg(doc->okToCopy() ? i18n("Yes") : i18n("No"))
.tqarg(doc->okToChange() ? i18n("Yes") : i18n("No")) .arg(doc->okToChange() ? i18n("Yes") : i18n("No"))
.tqarg(doc->okToAddNotes() ? i18n("Yes") : i18n("No")); .arg(doc->okToAddNotes() ? i18n("Yes") : i18n("No"));
} }
else enc = i18n("No"); else enc = i18n("No");
appendItem(generalGroup, "Protected", enc ); appendItem(generalGroup, "Protected", enc );
appendItem(generalGroup, "Linearized", doc->isLinearized() ? i18n("Yes") : i18n("No") ); appendItem(generalGroup, "Linearized", doc->isLinearized() ? i18n("Yes") : i18n("No") );
TQString versionString = TQString("%1").tqarg( doc->getPDFVersion(), 0, 'f', 1 ); TQString versionString = TQString("%1").arg( doc->getPDFVersion(), 0, 'f', 1 );
appendItem(generalGroup, "Version", versionString ); appendItem(generalGroup, "Version", versionString );
delete doc; delete doc;

@ -134,7 +134,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
long compressed = file.size() - 512; long compressed = file.size() - 512;
long verbatim = xsize * ysize * zsize; long verbatim = xsize * ysize * zsize;
appendItem(group, "Compression", i18n("Runlength Encoded") appendItem(group, "Compression", i18n("Runlength Encoded")
+ TQString(", %1%").tqarg(compressed * 100.0 / verbatim, 0, 'f', 1)); + TQString(", %1%").arg(compressed * 100.0 / verbatim, 0, 'f', 1));
long k; long k;
TQ_UINT32 offs; TQ_UINT32 offs;
@ -152,7 +152,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
k += it.data(); k += it.data();
if (k) if (k)
appendItem(group, "SharedRows", TQString("%1%").tqarg(k * 100.0 appendItem(group, "SharedRows", TQString("%1%").arg(k * 100.0
/ (ysize * zsize), 0, 'f', 1)); / (ysize * zsize), 0, 'f', 1));
else else
appendItem(group, "SharedRows", i18n("None")); appendItem(group, "SharedRows", i18n("None"));

@ -264,7 +264,7 @@ void KGamma::setupUI() {
screenselect = new TQComboBox( options ); screenselect = new TQComboBox( options );
for ( int i = 0; i < ScreenCount; i++ ) for ( int i = 0; i < ScreenCount; i++ )
screenselect->insertItem( i18n("Screen %1").tqarg(i+1) ); screenselect->insertItem( i18n("Screen %1").arg(i+1) );
screenselect->setCurrentItem(currentScreen); screenselect->setCurrentItem(currentScreen);
connect(screenselect, TQT_SIGNAL(activated(int)), TQT_SLOT(changeScreen(int))); connect(screenselect, TQT_SIGNAL(activated(int)), TQT_SLOT(changeScreen(int)));
@ -351,7 +351,7 @@ void KGamma::save() {
if ( !xf86cfgbox->isChecked() ) { //write gamma settings to the users config if ( !xf86cfgbox->isChecked() ) { //write gamma settings to the users config
for (int i = 0; i < ScreenCount; i++) { for (int i = 0; i < ScreenCount; i++) {
config->setGroup( TQString("Screen %1").tqarg(i) ); config->setGroup( TQString("Screen %1").arg(i) );
config->writeEntry("rgamma", rgamma[i]); config->writeEntry("rgamma", rgamma[i]);
config->writeEntry("ggamma", ggamma[i]); config->writeEntry("ggamma", ggamma[i]);
config->writeEntry("bgamma", bgamma[i]); config->writeEntry("bgamma", bgamma[i]);
@ -405,7 +405,7 @@ bool KGamma::loadUserSettings() {
KConfig *config = new KConfig("kgammarc"); KConfig *config = new KConfig("kgammarc");
for (int i = 0; i < ScreenCount; i++) { for (int i = 0; i < ScreenCount; i++) {
config->setGroup(TQString( "Screen %1" ).tqarg(i) ); config->setGroup(TQString( "Screen %1" ).arg(i) );
rgamma[i] = config->readEntry("rgamma"); rgamma[i] = config->readEntry("rgamma");
ggamma[i] = config->readEntry("ggamma"); ggamma[i] = config->readEntry("ggamma");
bgamma[i] = config->readEntry("bgamma"); bgamma[i] = config->readEntry("bgamma");
@ -610,7 +610,7 @@ extern "C"
for (int i = 0; i < xv._ScreenCount(); i++) { for (int i = 0; i < xv._ScreenCount(); i++) {
xv.setScreen(i); xv.setScreen(i);
config->setGroup( TQString("Screen %1").tqarg(i) ); config->setGroup( TQString("Screen %1").arg(i) );
if ((rgamma = config->readEntry("rgamma").toFloat())) if ((rgamma = config->readEntry("rgamma").toFloat()))
xv.setGamma(XVidExtWrap::Red, rgamma); xv.setGamma(XVidExtWrap::Red, rgamma);

@ -68,10 +68,10 @@ namespace {
TQString DisplayOptions::toString( const DisplayOptions& options ) TQString DisplayOptions::toString( const DisplayOptions& options )
{ {
return TQString( qformat ) return TQString( qformat )
.tqarg( options.page() ) .arg( options.page() )
.tqarg( options.magnification() ) .arg( options.magnification() )
.tqarg( options.overrideOrientation() ) .arg( options.overrideOrientation() )
.tqarg( options.overridePageMedia().utf8().data() ); .arg( options.overridePageMedia().utf8().data() );
} }
bool DisplayOptions::fromString( DisplayOptions& out, const TQString& in ) bool DisplayOptions::fromString( DisplayOptions& out, const TQString& in )

@ -9,6 +9,6 @@
void GSSettingsWidget::setDetectedVersion( TQString v) void GSSettingsWidget::setDetectedVersion( TQString v)
{ {
mDetectedVersion->setText(mDetectedVersion->text().tqarg( v )); mDetectedVersion->setText(mDetectedVersion->text().arg( v ));
} }

@ -97,7 +97,7 @@ KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err )
break; break;
} }
_lineNumberLabel->setText( i18n( "On line %1:" ).tqarg( err.lineNumber() ) ); _lineNumberLabel->setText( i18n( "On line %1:" ).arg( err.lineNumber() ) );
_lineLabel->setText( err.line() ); _lineLabel->setText( err.line() );
_descriptionLabel->setText( description( err.type() ) ); _descriptionLabel->setText( description( err.type() ) );

@ -441,7 +441,7 @@ void KGVMiniWidget::showPage( int pagenumber )
/* /*
KNotifyClient::userEvent KNotifyClient::userEvent
(i18n("KGhostview cannot load the document, \"%1\".\n" (i18n("KGhostview cannot load the document, \"%1\".\n"
"It appears to be broken.").tqarg( _fileName ), "It appears to be broken.").arg( _fileName ),
KNotifyClient::Messagebox); KNotifyClient::Messagebox);
_psWidget->disableInterpreter(); _psWidget->disableInterpreter();
_psFile=0; _psFile=0;
@ -486,13 +486,13 @@ void KGVMiniWidget::updateStatusBarText( int pageNumber )
else else
if( !_usePageLabels || document()->format() == KGVDocument::PDF ) if( !_usePageLabels || document()->format() == KGVDocument::PDF )
text = i18n( "Page %1 of %2" ) text = i18n( "Page %1 of %2" )
.tqarg( pageNumber + 1 ) .arg( pageNumber + 1 )
.tqarg( dsc()->page_count() ); .arg( dsc()->page_count() );
else else
text = i18n( "Page %1 (%2 of %3)" ) text = i18n( "Page %1 (%2 of %3)" )
.tqarg( dsc()->page()[ _options.page() ].label ) .arg( dsc()->page()[ _options.page() ].label )
.tqarg( pageNumber + 1 ) .arg( pageNumber + 1 )
.tqarg( dsc()->page_count() ); .arg( dsc()->page_count() );
emit setStatusBarText( text ); emit setStatusBarText( text );
} }

@ -264,7 +264,7 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*,
for ( TQValueList<double>::iterator first = mags.begin(), last = mags.end(); for ( TQValueList<double>::iterator first = mags.begin(), last = mags.end();
first != last; first != last;
++first ) { ++first ) {
TQString str = TQString( "%1%" ).tqarg( KGlobal::locale()->formatNumber( *first * 100.0, 2 )); TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" ); str.remove( KGlobal::locale()->decimalSymbol() + "00" );
zooms << str; zooms << str;
if ( *first == 1.0 ) idx = cur; if ( *first == 1.0 ) idx = cur;
@ -600,7 +600,7 @@ void KGVPart::updateZoomActions()
} }
// Show percentage that isn't predefined // Show percentage that isn't predefined
TQString str = TQString( "%1%" ).tqarg( KGlobal::locale()->formatNumber( zoom, 2 )); TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" ); str.remove( KGlobal::locale()->decimalSymbol() + "00" );
items.insert( items.at(idx), 1, str ); items.insert( items.at(idx), 1, str );
_zoomTo->setItems( items ); _zoomTo->setItems( items );
@ -750,8 +750,8 @@ void KGVPart::slotGhostscriptError( const TQString& error )
"Below are any error messages which were received from Ghostscript " "Below are any error messages which were received from Ghostscript "
"(<nobr><strong>%2</strong></nobr>) " "(<nobr><strong>%2</strong></nobr>) "
"which may help you.</qt>" ) "which may help you.</qt>" )
.tqarg( error ) .arg( error )
.tqarg( Configuration::interpreter() ), .arg( Configuration::interpreter() ),
true ); true );
// The true above makes it show a "configure gs" option, but maybe we // The true above makes it show a "configure gs" option, but maybe we
// should trigger an auto-redetection? // should trigger an auto-redetection?

@ -114,8 +114,8 @@ namespace {
"which are impossible to resolve. Please upgrade to a newer version.\n" "which are impossible to resolve. Please upgrade to a newer version.\n"
"KGhostView will try to work with it, but it may not display any files at all.\n" "KGhostView will try to work with it, but it may not display any files at all.\n"
"Version %2 seems to be appropriate on your system, although newer versions will work as well." ) "Version %2 seems to be appropriate on your system, although newer versions will work as well." )
.tqarg( version ) .arg( version )
.tqarg( recommended ) ); .arg( recommended ) );
} }
if ( version < TQString::number( 7.00 ) ) if ( version < TQString::number( 7.00 ) )
{ {

@ -98,7 +98,7 @@ void KGVDocument::doOpenFile()
KMessageBox::sorry( _part->widget(), KMessageBox::sorry( _part->widget(),
i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: " i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: "
"File does not exist.</qt>" ) "File does not exist.</qt>" )
.tqarg( _fileName ) ); .arg( _fileName ) );
emit canceled( TQString() ); emit canceled( TQString() );
return; return;
} }
@ -107,7 +107,7 @@ void KGVDocument::doOpenFile()
KMessageBox::sorry( _part->widget(), KMessageBox::sorry( _part->widget(),
i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: " i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: "
"Permission denied.</qt>" ) "Permission denied.</qt>" )
.tqarg( _fileName ) ); .arg( _fileName ) );
emit canceled( TQString() ); emit canceled( TQString() );
return; return;
} }
@ -132,7 +132,7 @@ void KGVDocument::doOpenFile()
if( _tmpDSC->status() != 0 ) { if( _tmpDSC->status() != 0 ) {
KMessageBox::error( _part->widget(), KMessageBox::error( _part->widget(),
i18n( "Could not create temporary file: %1" ) i18n( "Could not create temporary file: %1" )
.tqarg( strerror( _tmpDSC->status() ) ) ); .arg( strerror( _tmpDSC->status() ) ) );
emit canceled( TQString() ); emit canceled( TQString() );
return; return;
} }
@ -159,8 +159,8 @@ void KGVDocument::doOpenFile()
"which has type <strong>%2</strong>. KGhostview can " "which has type <strong>%2</strong>. KGhostview can "
"only load PostScript (.ps, .eps) and Portable " "only load PostScript (.ps, .eps) and Portable "
"Document Format (.pdf) files.</qt>" ) "Document Format (.pdf) files.</qt>" )
.tqarg( _fileName ) .arg( _fileName )
.tqarg( _mimetype ) ); .arg( _mimetype ) );
emit canceled( TQString() ); emit canceled( TQString() );
return; return;
} }
@ -190,7 +190,7 @@ bool KGVDocument::uncompressFile()
{ {
KMessageBox::error( _part->widget(), KMessageBox::error( _part->widget(),
i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" ) i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" )
.tqarg( _fileName ) ); .arg( _fileName ) );
emit canceled( TQString() ); emit canceled( TQString() );
return false; return false;
} }
@ -201,7 +201,7 @@ bool KGVDocument::uncompressFile()
{ {
KMessageBox::error( _part->widget(), KMessageBox::error( _part->widget(),
i18n( "Could not create temporary file: %2" ) i18n( "Could not create temporary file: %2" )
.tqarg( strerror( _tmpUnzipped->status() ) ) ); .arg( strerror( _tmpUnzipped->status() ) ) );
emit canceled( TQString() ); emit canceled( TQString() );
return false; return false;
} }
@ -221,7 +221,7 @@ bool KGVDocument::uncompressFile()
{ {
KMessageBox::error( _part->widget(), KMessageBox::error( _part->widget(),
i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" ) i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" )
.tqarg( _fileName ) ); .arg( _fileName ) );
emit canceled( TQString() ); emit canceled( TQString() );
return false; return false;
} }
@ -239,7 +239,7 @@ void KGVDocument::openPDFFileContinue( bool pdf2dscResult )
{ {
KMessageBox::error( _part->widget(), KMessageBox::error( _part->widget(),
i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr>.</qt>" ) i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr>.</qt>" )
.tqarg( _part->url().url() ) ); .arg( _part->url().url() ) );
emit canceled( TQString() ); emit canceled( TQString() );
return; return;
} }
@ -260,8 +260,8 @@ void KGVDocument::openPSFile(const TQString &file)
{ {
KMessageBox::error( _part->widget(), KMessageBox::error( _part->widget(),
i18n( "<qt>Error opening file <nobr><strong>%1</strong></nobr>: %2</qt>" ) i18n( "<qt>Error opening file <nobr><strong>%1</strong></nobr>: %2</qt>" )
.tqarg( _part->url().url() ) .arg( _part->url().url() )
.tqarg( strerror( errno ) ) ); .arg( strerror( errno ) ) );
emit canceled( "" ); emit canceled( "" );
return; return;
} }
@ -497,7 +497,7 @@ TQString KGVDocument::pageListToRange( const PageList& pageList )
if( bss == ess ) if( bss == ess )
range += TQString::number( *ess ); range += TQString::number( *ess );
else else
range += TQString( "%1-%2" ).tqarg( *bss ).tqarg( *ess ); range += TQString( "%1-%2" ).arg( *bss ).arg( *ess );
bss = it; bss = it;
} }
@ -521,7 +521,7 @@ void KGVDocument::print()
printer.setOption( "kde-range", printer.setOption( "kde-range",
pageListToRange( _part->markList()->markList() ) ); pageListToRange( _part->markList()->markList() ) );
if( printer.setup( _part->widget(), i18n("Print %1").tqarg(_part->url().fileName()) ) ) if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) )
{ {
KTempFile tf( TQString(), ".ps" ); KTempFile tf( TQString(), ".ps" );
if( tf.status() == 0 ) if( tf.status() == 0 )
@ -548,7 +548,7 @@ void KGVDocument::print()
{ {
printer.setPageSelection( KPrinter::SystemSide ); printer.setPageSelection( KPrinter::SystemSide );
if( printer.setup( _part->widget(), i18n("Print %1").tqarg(_part->url().fileName()) ) ) if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) )
printer.printFiles( _fileName ); printer.printFiles( _fileName );
} }
} }
@ -775,13 +775,13 @@ void KGVDocument::runPdf2ps( const TQString& pdfName,
process << _interpreterPath process << _interpreterPath
<< "-dNODISPLAY" << "-dNODISPLAY"
<< "-dTQUIET" << "-dTQUIET"
<< TQString( "-sPDFname=%1" ).tqarg( pdfName ) << TQString( "-sPDFname=%1" ).arg( pdfName )
<< TQString( "-sDSCnamale locale( "kghostview" ); << TQString( "-sDSCnamale locale( "kghostview" );
_fallBackPageMedia = pageSizeToString( _fallBackPageMedia = pageSizeToString(
static_cast< TQPrinter::PageSize >( locale.pageSize() ) ); static_cast< TQPrinter::PageSize >( locale.pageSize() ) );
_usePageLabels = false; _usePageLabels = false;
e=%1" ).tqarg( dscName ) e=%1" ).arg( dscName )
<< "pdf2dsc.ps" << "pdf2dsc.ps"
<< "-c" << "-c"
<< "quit"; << "quit";
@ -823,8 +823,8 @@ void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName )
<< "-dDELAYSAFER" << "-dDELAYSAFER"
<< "-dNODISPLAY" << "-dNODISPLAY"
<< "-dTQUIET" << "-dTQUIET"
<< TQString( "-sPDFname=%1" ).tqarg( pdfName ) << TQString( "-sPDFname=%1" ).arg( pdfName )
<< TQString( "-sDSCname=%1" ).tqarg( dscName ) << TQString( "-sDSCname=%1" ).arg( dscName )
<< "-c" << "-c"
<< "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe" << "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe"
<< "-f" << "-f"

@ -252,7 +252,7 @@ KGVShell::openStdin()
if( _tmpFile->status() != 0 ) { if( _tmpFile->status() != 0 ) {
KMessageBox::error( this, KMessageBox::error( this,
i18n( "Could not create temporary file: %1" ) i18n( "Could not create temporary file: %1" )
.tqarg( strerror( _tmpFile->status() ) ) ); .arg( strerror( _tmpFile->status() ) ) );
return; return;
} }
@ -269,7 +269,7 @@ KGVShell::openStdin()
if( read != 0 ) { if( read != 0 ) {
KMessageBox::error( this, KMessageBox::error( this,
i18n( "Could not open standard input stream: %1" ) i18n( "Could not open standard input stream: %1" )
.tqarg( strerror( errno ) ) ); .arg( strerror( errno ) ) );
return; return;
} }

@ -333,7 +333,7 @@ void KPSWidget::setupWidget()
// Make sure the properties are updated immediately. // Make sure the properties are updated immediately.
XSync( x11Display(), false ); XSync( x11Display(), false );
tqrepaint(); repaint();
_widgetDirty = false; _widgetDirty = false;
} }
@ -343,7 +343,7 @@ bool KPSWidget::startInterpreter()
setupWidget(); setupWidget();
_process = new KProcess; _process = new KProcess;
if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).tqarg( winId() ).tqarg( _backgroundPixmap.handle() ) ); if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) );
else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) ); else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) );
*_process << _ghostscriptPath.local8Bit(); *_process << _ghostscriptPath.local8Bit();
@ -420,7 +420,7 @@ void KPSWidget::slotProcessExited( KProcess* process )
{ {
kdDebug( 4500 ) << "KPSWidget::slotProcessExited(): looks like it was not a clean exit." << endl; kdDebug( 4500 ) << "KPSWidget::slotProcessExited(): looks like it was not a clean exit." << endl;
if ( process->normalExit() ) { if ( process->normalExit() ) {
emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).tqarg( process->exitStatus() ) ) ); emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).arg( process->exitStatus() ) ) );
} else { } else {
emit ghostscriptError( TQString( i18n( "Process killed or crashed." ) ) ); emit ghostscriptError( TQString( i18n( "Process killed or crashed." ) ) );
} }

@ -99,19 +99,19 @@ void ScrollBox::setPageSize( const TQSize& s )
{ {
pagesize = s; pagesize = s;
setFixedHeight( s.height() * width() / s.width() ); setFixedHeight( s.height() * width() / s.width() );
tqrepaint(); repaint();
} }
void ScrollBox::setViewSize( const TQSize& s ) void ScrollBox::setViewSize( const TQSize& s )
{ {
viewsize = s; viewsize = s;
tqrepaint(); repaint();
} }
void ScrollBox::setViewPos( const TQPoint& pos ) void ScrollBox::setViewPos( const TQPoint& pos )
{ {
viewpos = pos; viewpos = pos;
tqrepaint(); repaint();
} }
void ScrollBox::setThumbnail( TQPixmap img ) void ScrollBox::setThumbnail( TQPixmap img )

@ -293,14 +293,14 @@ void KColorGrid::setColor( int colNum, uint col, bool update )
} }
//kdDebug(4640) << "KColorGrid::setColor - before updateCell" << endl; //kdDebug(4640) << "KColorGrid::setColor - before updateCell" << endl;
tqrepaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize, cellsize, cellsize); repaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize, cellsize, cellsize);
//updateCell( colNum/numCols(), colNum%numCols(), false ); //updateCell( colNum/numCols(), colNum%numCols(), false );
//kdDebug(4640) << "KColorGrid::setColor - after updateCell" << endl; //kdDebug(4640) << "KColorGrid::setColor - after updateCell" << endl;
} }
void KColorGrid::updateCell( int row, int col, bool ) void KColorGrid::updateCell( int row, int col, bool )
{ {
//kdDebug(4640) << "updateCell - before tqrepaint" << endl; //kdDebug(4640) << "updateCell - before repaint" << endl;
TQWMatrix matrix; TQWMatrix matrix;
TQPainter p; TQPainter p;
p.begin( this ); p.begin( this );
@ -330,6 +330,6 @@ void KColorGrid::setCellSize( int s )
totalheight = (numRows() * s) + 1; totalheight = (numRows() * s) + 1;
resize(totalwidth, totalheight); resize(totalwidth, totalheight);
if ( isVisible() ) if ( isVisible() )
tqrepaint(viewRect(), false); repaint(viewRect(), false);
} }
#include "kcolorgrid.moc" #include "kcolorgrid.moc"

@ -70,7 +70,7 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
if(!url.isValid()) // Giving up if(!url.isValid()) // Giving up
{ {
TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").tqarg(url.url()); TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
KMessageBox::sorry((TQWidget*)parent(), msg); KMessageBox::sorry((TQWidget*)parent(), msg);
return false; return false;
} }
@ -86,7 +86,7 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
{ {
if(!KIO::NetAccess::download( url, filename, (TQWidget*)parent() )) if(!KIO::NetAccess::download( url, filename, (TQWidget*)parent() ))
{ {
TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL()); TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
KMessageBox::error((TQWidget*)parent(), msg); KMessageBox::error((TQWidget*)parent(), msg);
return false; return false;
} }
@ -101,7 +101,7 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
if(!loadedOk) if(!loadedOk)
{ {
TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL()); TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
KMessageBox::error((TQWidget*)parent(), msg); KMessageBox::error((TQWidget*)parent(), msg);
} }
else else
@ -208,7 +208,7 @@ bool KIconEditIcon::saveAs(const TQImage *image)
{ {
int r=KMessageBox::warningContinueCancel(TQT_TQWIDGET(parent()), int r=KMessageBox::warningContinueCancel(TQT_TQWIDGET(parent()),
i18n( "A file named \"%1\" already exists. " i18n( "A file named \"%1\" already exists. "
"Overwrite it?" ).tqarg(file), "Overwrite it?" ).arg(file),
i18n( "Overwrite File?" ), i18n( "Overwrite File?" ),
i18n( "&Overwrite" ) ); i18n( "&Overwrite" ) );
@ -265,7 +265,7 @@ bool KIconEditIcon::save(const TQImage *image, const TQString &_filename)
} }
else else
{ {
TQString msg = i18n("There was an error saving:\n%1\n").tqarg(str); TQString msg = i18n("There was an error saving:\n%1\n").arg(str);
KMessageBox::error((TQWidget*)parent(), msg); KMessageBox::error((TQWidget*)parent(), msg);
kdDebug(4640) << "KIconEditIcon::save - " << msg << endl; kdDebug(4640) << "KIconEditIcon::save - " << msg << endl;
} }

@ -477,7 +477,7 @@ bool KIconEdit::setupStatusBar()
statusbar->insertFixedItem("99999,99999", 0, true); statusbar->insertFixedItem("99999,99999", 0, true);
statusbar->insertFixedItem("99999 x 99999", 1, true); statusbar->insertFixedItem("99999 x 99999", 1, true);
statusbar->insertFixedItem(" 1:999", 2, true); statusbar->insertFixedItem(" 1:999", 2, true);
str = i18n("Colors: %1").tqarg(9999999); str = i18n("Colors: %1").arg(9999999);
statusbar->insertFixedItem(str, 3, true); statusbar->insertFixedItem(str, 3, true);
statusbar->insertItem("", 4); statusbar->insertItem("", 4);

@ -195,7 +195,7 @@ void KIconEdit::slotPrint()
{ {
KPrinter printer; KPrinter printer;
if ( printer.setup(this, i18n("Print %1").tqarg(icon->url().section('/', -1))) ) if ( printer.setup(this, i18n("Print %1").arg(icon->url().section('/', -1))) )
{ {
int margin = 10, yPos = 0; int margin = 10, yPos = 0;
printer.setCreator("KDE Icon Editor"); printer.setCreator("KDE Icon Editor");
@ -422,13 +422,13 @@ void KIconEdit::slotUpdateZoom( int s )
void KIconEdit::slotUpdateStatusPos(int x, int y) void KIconEdit::slotUpdateStatusPos(int x, int y)
{ {
TQString str = i18n("Status Position", "%1, %2").tqarg(x).tqarg(y); TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
statusbar->changeItem( str, 0); statusbar->changeItem( str, 0);
} }
void KIconEdit::slotUpdateStatusSize(int x, int y) void KIconEdit::slotUpdateStatusSize(int x, int y)
{ {
TQString str = i18n("Status Size", "%1 x %2").tqarg(x).tqarg(y); TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
statusbar->changeItem( str, 1); statusbar->changeItem( str, 1);
} }
@ -443,13 +443,13 @@ void KIconEdit::slotUpdateStatusScaling(int s)
void KIconEdit::slotUpdateStatusColors(uint) void KIconEdit::slotUpdateStatusColors(uint)
{ {
TQString str = i18n("Colors: %1").tqarg(grid->numColors()); TQString str = i18n("Colors: %1").arg(grid->numColors());
statusbar->changeItem( str, 3); statusbar->changeItem( str, 3);
} }
void KIconEdit::slotUpdateStatusColors(uint n, uint *) void KIconEdit::slotUpdateStatusColors(uint n, uint *)
{ {
TQString str = i18n("Colors: %1").tqarg(n); TQString str = i18n("Colors: %1").arg(n);
statusbar->changeItem( str, 3); statusbar->changeItem( str, 3);
} }

@ -1044,7 +1044,7 @@ void KIconEditGrid::load( TQImage *image)
emit changed(pixmap()); emit changed(pixmap());
setUpdatesEnabled(true); setUpdatesEnabled(true);
emit needPainting(); emit needPainting();
//tqrepaint(viewRect(), false); //repaint(viewRect(), false);
history->clear(); history->clear();
} }
@ -1379,7 +1379,7 @@ void KIconEditGrid::editPasteAsNew()
*img = tmp; *img = tmp;
load(img); load(img);
setModified(true); setModified(true);
//tqrepaint(viewRect(), false); //repaint(viewRect(), false);
p = *img; p = *img;
emit changed(TQPixmap(p)); emit changed(TQPixmap(p));

@ -112,7 +112,7 @@ void Indexer::processNext()
*m_process << *it; *m_process << *it;
#endif #endif
emit progress( 0, i18n("<qt>Next Folder: <br><b>%1</b>").tqarg( m_currentDir )); emit progress( 0, i18n("<qt>Next Folder: <br><b>%1</b>").arg( m_currentDir ));
m_process->start(); m_process->start();
} }
@ -160,7 +160,7 @@ void Indexer::slotCanRead( KProcIO *proc )
if ( ok ) if ( ok )
{ {
uint dirsLeft = m_dirs.count(); uint dirsLeft = m_dirs.count();
TQString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").tqarg( m_dirCount - dirsLeft ).tqarg( m_dirCount).tqarg( m_currentDir ).tqarg( currentFile ).tqarg( numFiles ); TQString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles );
emit progress( perc, message ); emit progress( perc, message );
} }
} }

@ -465,7 +465,7 @@ void MainPage::slotIndexingFinished( int returnCode )
if ( err ) if ( err )
syserr = TQString::fromLocal8Bit( err ); syserr = TQString::fromLocal8Bit( err );
else else
syserr = i18n("Unknown error: %1").tqarg( returnCode ); syserr = i18n("Unknown error: %1").arg( returnCode );
} }
KMessageBox::detailedError( this, i18n("An error occurred during indexing. The index might be invalid."), KMessageBox::detailedError( this, i18n("An error occurred during indexing. The index might be invalid."),

@ -53,7 +53,7 @@ const TQString * MrmlShared::m_element = 0L;
const TQString * MrmlShared::m_attribute = 0L; const TQString * MrmlShared::m_attribute = 0L;
const TQString * MrmlShared::m_attributeName = 0L; const TQString * MrmlShared::m_attributeName = 0L;
const TQString * MrmlShared::m_attributeValue = 0L; const TQString * MrmlShared::m_attributeValue = 0L;
const TQString * MrmlShared::m_tqchildren = 0L; const TQString * MrmlShared::m_children = 0L;
const TQString * MrmlShared::m_none = 0L; const TQString * MrmlShared::m_none = 0L;
const TQString * MrmlShared::m_multiSet = 0L; const TQString * MrmlShared::m_multiSet = 0L;
@ -141,7 +141,7 @@ void MrmlShared::init()
m_attribute = new TQString ( "attribute" ) ; m_attribute = new TQString ( "attribute" ) ;
m_attributeName = new TQString ( "attribute-name" ) ; m_attributeName = new TQString ( "attribute-name" ) ;
m_attributeValue = new TQString ( "attribute-value" ) ; m_attributeValue = new TQString ( "attribute-value" ) ;
m_tqchildren = new TQString ( "tqchildren" ) ; m_children = new TQString ( "children" ) ;
m_none = new TQString ( "none" ) ; m_none = new TQString ( "none" ) ;
m_multiSet = new TQString ( "multi-set" ) ; m_multiSet = new TQString ( "multi-set" ) ;
@ -215,7 +215,7 @@ void MrmlShared::cleanup()
delete m_attribute; delete m_attribute;
delete m_attributeName; delete m_attributeName;
delete m_attributeValue; delete m_attributeValue;
delete m_tqchildren; delete m_children;
delete m_none; delete m_none;
delete m_visibility; delete m_visibility;

@ -76,7 +76,7 @@ public:
static const TQString& attribute() { return *m_attribute; } static const TQString& attribute() { return *m_attribute; }
static const TQString& attributeName() { return *m_attributeName; } static const TQString& attributeName() { return *m_attributeName; }
static const TQString& attributeValue() { return *m_attributeValue; } static const TQString& attributeValue() { return *m_attributeValue; }
static const TQString& tqchildren() { return *m_tqchildren; } static const TQString& children() { return *m_children; }
static const TQString& none() { return *m_none; } static const TQString& none() { return *m_none; }
static const TQString& visibility() { return *m_visibility; } static const TQString& visibility() { return *m_visibility; }
@ -139,7 +139,7 @@ private:
static const TQString * m_attribute; static const TQString * m_attribute;
static const TQString * m_attributeName; static const TQString * m_attributeName;
static const TQString * m_attributeValue; static const TQString * m_attributeValue;
static const TQString * m_tqchildren; static const TQString * m_children;
static const TQString * m_none; static const TQString * m_none;
static const TQString * m_visibility; static const TQString * m_visibility;

@ -216,11 +216,11 @@ bool Mrml::startSession( const KURL& url )
// 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
// apparently 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() ).arg(
"<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \ "<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \
<get-algorithms /> \ <get-algorithms /> \
<get-collections /> \ <get-collections /> \
</mrml>" ).tqarg( user( url )); </mrml>" ).arg( user( url ));
TQCString utf8 = msg.utf8(); TQCString utf8 = msg.utf8();
// qDebug(":::Writing: %s", utf8.data()); // qDebug(":::Writing: %s", utf8.data());
@ -240,13 +240,13 @@ TQString Mrml::mrmlString( const TQString& sessionId, const TQString& transactio
</mrml>"; </mrml>";
if ( sessionId.isEmpty() ) // when we don't have one yet if ( sessionId.isEmpty() ) // when we don't have one yet
return msg.tqarg( "<mrml>%1" ); return msg.arg( "<mrml>%1" );
if ( transactionId.isNull() ) if ( transactionId.isNull() )
return msg.tqarg( "<mrml session-id=\"%1\">%1" ).tqarg( sessionId ); return msg.arg( "<mrml session-id=\"%1\">%1" ).arg( sessionId );
else else
return msg.tqarg( "<mrml session-id=\"%1\" transaction-id=\"%1\">%1") return msg.arg( "<mrml session-id=\"%1\" transaction-id=\"%1\">%1")
.tqarg( sessionId ).tqarg( transactionId ); .arg( sessionId ).arg( transactionId );
} }
void Mrml::emitData( const TQCString& msg ) void Mrml::emitData( const TQCString& msg )

@ -28,7 +28,7 @@ using namespace KMrml;
// //
// MrmlElement is currently the baseclass for Algorithm and Collection. Both // MrmlElement is currently the baseclass for Algorithm and Collection. Both
// may have a single child-element <query-paradigm-list>, with a number of // may have a single child-element <query-paradigm-list>, with a number of
// <query-paradigm> elements as tqchildren. // <query-paradigm> elements as children.
// //
MrmlElement::MrmlElement( const TQDomElement& elem ) MrmlElement::MrmlElement( const TQDomElement& elem )

@ -310,7 +310,7 @@ void MrmlPart::contactServer( const KURL& url )
TQString host = url.host().isEmpty() ? TQString host = url.host().isEmpty() ?
TQString::fromLatin1("localhost") : url.host(); TQString::fromLatin1("localhost") : url.host();
slotSetStatusBar( i18n("Connecting to indexing server at %1...").tqarg( host )); slotSetStatusBar( i18n("Connecting to indexing server at %1...").arg( host ));
} }
// //
@ -495,7 +495,7 @@ void MrmlPart::parseMrml( TQDomDocument& doc )
else if ( tagName == "error" ) { else if ( tagName == "error" ) {
KMessageBox::information( widget(), KMessageBox::information( widget(),
i18n("Server returned error:\n%1\n") i18n("Server returned error:\n%1\n")
.tqarg( elem.attribute( "message" )), .arg( elem.attribute( "message" )),
i18n("Server Error") ); i18n("Server Error") );
} }

@ -307,10 +307,10 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL,
/* /*
if ( similarity > -1 ) if ( similarity > -1 )
TQToolTip::add( this, TQString::fromLatin1("<qt>%1<br>%1</qt>") TQToolTip::add( this, TQString::fromLatin1("<qt>%1<br>%1</qt>")
.tqarg( url ) .arg( url )
.tqarg(i18n("Similarity: %1").tqarg( TQString::number(similarity)))); .arg(i18n("Similarity: %1").arg( TQString::number(similarity))));
else else
TQToolTip::add( this, TQString::fromLatin1("<qt>%1</qt>").tqarg( url ) ); TQToolTip::add( this, TQString::fromLatin1("<qt>%1</qt>").arg( url ) );
*/ */
setMinimumSize( 130, 130 ); // ### setMinimumSize( 130, 130 ); // ###

@ -98,10 +98,10 @@ void PropertySheet::initFromDOM( const TQDomElement& elem )
m_minSubsetSize = toInt( elem.attribute( MrmlShared::minSubsetSize() )); m_minSubsetSize = toInt( elem.attribute( MrmlShared::minSubsetSize() ));
m_maxSubsetSize = toInt( elem.attribute( MrmlShared::maxSubsetSize() )); m_maxSubsetSize = toInt( elem.attribute( MrmlShared::maxSubsetSize() ));
TQValueList<TQDomElement> tqchildren = TQValueList<TQDomElement> children =
KMrml::directChildElements( elem, MrmlShared::propertySheet() ); KMrml::directChildElements( elem, MrmlShared::propertySheet() );
TQValueListConstIterator<TQDomElement> it = tqchildren.begin(); TQValueListConstIterator<TQDomElement> it = children.begin();
for ( ; it != tqchildren.end(); ++it ) for ( ; it != children.end(); ++it )
m_subSheets.append( new PropertySheet( *it ) ); m_subSheets.append( new PropertySheet( *it ) );
} }
@ -190,7 +190,7 @@ PropertySheet::SendType PropertySheet::getSendType( const TQString& value )
type = AttributeName; type = AttributeName;
else if ( value == MrmlShared::attributeValue() ) else if ( value == MrmlShared::attributeValue() )
type = AttributeValue; type = AttributeValue;
else if ( value == MrmlShared::tqchildren() ) else if ( value == MrmlShared::children() )
type = Children; type = Children;
else if ( value == MrmlShared::none() ) else if ( value == MrmlShared::none() )
type = None; type = None;

@ -34,7 +34,7 @@ namespace KMrml
{ {
MultiSet = 1, // ?? MultiSet = 1, // ??
Subset, // radio-button/combobox or listbox Subset, // radio-button/combobox or listbox
SetElement, // CheckBox -> disables/enables tqchildren? SetElement, // CheckBox -> disables/enables children?
Boolean, // CheckBox Boolean, // CheckBox
Numeric, // Slider/Spinbox Numeric, // Slider/Spinbox
Textual, // lineedit Textual, // lineedit

@ -146,7 +146,7 @@ void Watcher::slotProcExited( KProcess *proc )
i18n("<qt>The server with the command line" i18n("<qt>The server with the command line"
"<br>%1<br>" "<br>%1<br>"
"is not available anymore. Do you want to " "is not available anymore. Do you want to "
"restart it?" ).tqarg( daemon->commandline ), "restart it?" ).arg( daemon->commandline ),
i18n("Service Failure"), i18n("Restart Server"), i18n("Do Not Restart") ) i18n("Service Failure"), i18n("Restart Server"), i18n("Do Not Restart") )
== KMessageBox::Yes ) == KMessageBox::Yes )
{ {
@ -175,7 +175,7 @@ bool Watcher::startDaemon( DaemonData *daemon )
i18n("Unable to start the server with the " i18n("Unable to start the server with the "
"command line" "command line"
"<br>%1<br>" "<br>%1<br>"
"Try again?").tqarg( daemon->commandline ), "Try again?").arg( daemon->commandline ),
i18n("Service Failure"), i18n("Try Again"), i18n("Do Not Try") ) i18n("Service Failure"), i18n("Try Again"), i18n("Do Not Try") )
== KMessageBox::Yes ) == KMessageBox::Yes )
{ {

@ -27,8 +27,8 @@ This file lists known bugs in this version that are not considered
manifestations of the current QSpinBox behaviour. manifestations of the current QSpinBox behaviour.
6. a) The undo history and document modified state are not updated during 6. a) The undo history and document modified state are not updated during
the drawing of multi-segment tqshapes (Polygon, Connected Lines, the drawing of multi-segment shapes (Polygon, Connected Lines,
Curve). They are however updated after tqshapes' completion. Curve). They are however updated after shapes' completion.
b) The text and brush-like tools set the document modified flag even if b) The text and brush-like tools set the document modified flag even if
user cancels the draw operation. user cancels the draw operation.
@ -37,7 +37,7 @@ This file lists known bugs in this version that are not considered
still marked as modified (because 2 commands - the create selection still marked as modified (because 2 commands - the create selection
and the move - were added but only one was undone). and the move - were added but only one was undone).
7. Certain tqshapes may have the wrong size (usually only a pixel off and 7. Certain shapes may have the wrong size (usually only a pixel off and
only in extreme cases) e.g. an ellipse of height 1 always has a width 1 only in extreme cases) e.g. an ellipse of height 1 always has a width 1
pixel less than it should be. This is a Qt bug. pixel less than it should be. This is a Qt bug.

@ -763,7 +763,7 @@ void kpCommandHistoryBase::trimCommandLists ()
-m_documentRestoredPosition > (int) m_undoCommandList.size ()) -m_documentRestoredPosition > (int) m_undoCommandList.size ())
{ {
#if DEBUG_KP_COMMAND_HISTORY #if DEBUG_KP_COMMAND_HISTORY
kdDebug () << "\t\t\ttqinvalidate documentRestoredPosition" << endl; kdDebug () << "\t\t\tinvalidate documentRestoredPosition" << endl;
#endif #endif
m_documentRestoredPosition = INT_MAX; m_documentRestoredPosition = INT_MAX;
} }
@ -911,7 +911,7 @@ void kpCommandHistory::undo ()
if (m_mainWindow && m_mainWindow->toolHasBegunShape ()) if (m_mainWindow && m_mainWindow->toolHasBegunShape ())
{ {
#if DEBUG_KP_COMMAND_HISTORY #if DEBUG_KP_COMMAND_HISTORY
kdDebug () << "\thas begun tqshape - cancel draw" << endl; kdDebug () << "\thas begun shape - cancel draw" << endl;
#endif #endif
m_mainWindow->tool ()->cancelShapeInternal (); m_mainWindow->tool ()->cancelShapeInternal ();
} }
@ -928,7 +928,7 @@ void kpCommandHistory::redo ()
// //
// Ignoring the request would not be intuitive for tools like // Ignoring the request would not be intuitive for tools like
// Polygon & Polyline (where it's not always apparent to the user // Polygon & Polyline (where it's not always apparent to the user
// that s/he's still drawing a tqshape even though the mouse isn't // that s/he's still drawing a shape even though the mouse isn't
// down). // down).
m_mainWindow->tool ()->cancelShapeInternal (); m_mainWindow->tool ()->cancelShapeInternal ();
} }

@ -222,16 +222,16 @@ private:
// Intercepts Undo/Redo requests: // Intercepts Undo/Redo requests:
// //
// If the user is currently drawing a tqshape, it cancels it. // If the user is currently drawing a shape, it cancels it.
// Else it passes on the Undo/Redo request to kpCommandHistoryBase. // Else it passes on the Undo/Redo request to kpCommandHistoryBase.
// //
// TODO: This is wrong. It won't work if the Undo action is disabled, // TODO: This is wrong. It won't work if the Undo action is disabled,
// for instance. // for instance.
// //
// Maybe the real solution is to call kpCommandHistoryBase::addCommand() // Maybe the real solution is to call kpCommandHistoryBase::addCommand()
// as _soon_ as the tqshape starts - not after it ends. But the // as _soon_ as the shape starts - not after it ends. But the
// trouble with this solution is that if the user Undoes/cancels // trouble with this solution is that if the user Undoes/cancels
// the tqshape s/he's currently drawing, it would replace a Redo // the shape s/he's currently drawing, it would replace a Redo
// slot in the history. Arguably you shouldn't be able to Redo // slot in the history. Arguably you shouldn't be able to Redo
// something you never finished drawing. // something you never finished drawing.
// //

@ -1109,22 +1109,22 @@ void kpDocument::setSelection (const kpSelection &selection)
(selection.type () == kpSelection::Text)); (selection.type () == kpSelection::Text));
// We don't change the Selection Tool if the new selection's // We don't change the Selection Tool if the new selection's
// tqshape is merely different to the current tool's (e.g. rectangular // shape is merely different to the current tool's (e.g. rectangular
// vs elliptical) because: // vs elliptical) because:
// //
// 1. All image selection tools support editing selections of all the // 1. All image selection tools support editing selections of all the
// different tqshapes anyway. // different shapes anyway.
// 2. Suppose the user is trying out different drags of selection borders // 2. Suppose the user is trying out different drags of selection borders
// and then decides to paste a differently tqshaped selection before continuing // and then decides to paste a differently shaped selection before continuing
// to try out different borders. If the pasting were to switch to // to try out different borders. If the pasting were to switch to
// a differently tqshaped tool, the borders drawn after the paste would // a differently shaped tool, the borders drawn after the paste would
// be using a new tqshape rather than the tqshape before the paste. This // be using a new shape rather than the shape before the paste. This
// could get irritating so we don't do the switch. // could get irritating so we don't do the switch.
// //
if (m_mainWindow && if (m_mainWindow &&
(!m_mainWindow->toolIsASelectionTool () || isTextChanged)) (!m_mainWindow->toolIsASelectionTool () || isTextChanged))
{ {
// Switch to the appropriately tqshaped selection tool // Switch to the appropriately shaped selection tool
// _before_ we change the selection // _before_ we change the selection
// (all selection tool's ::end() functions nuke the current selection) // (all selection tool's ::end() functions nuke the current selection)
switch (selection.type ()) switch (selection.type ())

@ -712,9 +712,9 @@ void kpDocumentSaveOptionsWidget::setMode (Mode mode)
void kpDocumentSaveOptionsWidget::repaintLabels () void kpDocumentSaveOptionsWidget::repaintLabels ()
{ {
if (mode () != Quality) if (mode () != Quality)
m_colorDepthLabel->tqrepaint (); m_colorDepthLabel->repaint ();
if (mode () == Quality) if (mode () == Quality)
m_qualityLabel->tqrepaint (); m_qualityLabel->repaint ();
} }
@ -767,7 +767,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
if (m_previewDialogLastRelativeGeometry.isEmpty ()) if (m_previewDialogLastRelativeGeometry.isEmpty ())
{ {
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "\tread cfg preview dialog last rel tqgeometry" << endl; kdDebug () << "\tread cfg preview dialog last rel geometry" << endl;
#endif #endif
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave); KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
@ -826,7 +826,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "\ttqgeometry after show=" kdDebug () << "\tgeometry after show="
<< TQRect (m_previewDialog->x (), m_previewDialog->y (), << TQRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ()) m_previewDialog->width (), m_previewDialog->height ())
<< endl; << endl;
@ -852,7 +852,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
cfg->sync (); cfg->sync ();
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "\tsaving preview tqgeometry " kdDebug () << "\tsaving preview geometry "
<< m_previewDialogLastRelativeGeometry << m_previewDialogLastRelativeGeometry
<< " (TQt would have us believe " << " (TQt would have us believe "
<< kpWidgetMapper::fromGlobal (m_visualParent, << kpWidgetMapper::fromGlobal (m_visualParent,
@ -942,7 +942,7 @@ void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry ()
else else
{ {
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "\tnot visible - ignoring tqgeometry" << endl; kdDebug () << "\tnot visible - ignoring geometry" << endl;
#endif #endif
} }
} }

@ -157,7 +157,7 @@ void kpMainWindow::readThumbnailSettings ()
#if DEBUG_KP_MAIN_WINDOW #if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tThumbnail Settings: shown=" << m_configThumbnailShown kdDebug () << "\t\tThumbnail Settings: shown=" << m_configThumbnailShown
<< " tqgeometry=" << m_configThumbnailGeometry << " geometry=" << m_configThumbnailGeometry
<< " zoomed=" << m_configZoomedThumbnail << " zoomed=" << m_configZoomedThumbnail
<< " showRectangle=" << d->m_configThumbnailShowRectangle << " showRectangle=" << d->m_configThumbnailShowRectangle
<< endl; << endl;
@ -808,7 +808,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
#endif #endif
slotCreateThumbnail (); slotCreateThumbnail ();
} }
// this' tqgeometry is weird ATM // this' geometry is weird ATM
else else
{ {
#if DEBUG_KP_MAIN_WINDOW #if DEBUG_KP_MAIN_WINDOW

@ -842,13 +842,13 @@ void kpMainWindow::slotSaveThumbnailGeometry ()
TQRect rect (m_thumbnail->x (), m_thumbnail->y (), TQRect rect (m_thumbnail->x (), m_thumbnail->y (),
m_thumbnail->width (), m_thumbnail->height ()); m_thumbnail->width (), m_thumbnail->height ());
#if DEBUG_KP_MAIN_WINDOW #if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tthumbnail relative tqgeometry=" << rect << endl; kdDebug () << "\tthumbnail relative geometry=" << rect << endl;
#endif #endif
m_configThumbnailGeometry = mapFromGlobal (rect); m_configThumbnailGeometry = mapFromGlobal (rect);
#if DEBUG_KP_MAIN_WINDOW #if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tCONFIG: saving thumbnail tqgeometry " kdDebug () << "\tCONFIG: saving thumbnail geometry "
<< m_configThumbnailGeometry << m_configThumbnailGeometry
<< endl; << endl;
#endif #endif
@ -1067,11 +1067,11 @@ void kpMainWindow::updateThumbnail ()
kdDebug () << "\tcreating thumbnail" << endl; kdDebug () << "\tcreating thumbnail" << endl;
#endif #endif
// Read last saved tqgeometry before creating thumbnail & friends // Read last saved geometry before creating thumbnail & friends
// in case they call notifyThumbnailGeometryChanged() // in case they call notifyThumbnailGeometryChanged()
TQRect thumbnailGeometry = m_configThumbnailGeometry; TQRect thumbnailGeometry = m_configThumbnailGeometry;
#if DEBUG_KP_MAIN_WINDOW #if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tlast used tqgeometry=" << thumbnailGeometry << endl; kdDebug () << "\t\tlast used geometry=" << thumbnailGeometry << endl;
#endif #endif
m_thumbnail = new kpThumbnail (this, "thumbnail"); m_thumbnail = new kpThumbnail (this, "thumbnail");
@ -1084,9 +1084,9 @@ void kpMainWindow::updateThumbnail ()
if (!thumbnailGeometry.isEmpty () && if (!thumbnailGeometry.isEmpty () &&
TQRect (0, 0, width (), height ()).intersects (thumbnailGeometry)) TQRect (0, 0, width (), height ()).intersects (thumbnailGeometry))
{ {
const TQRect tqgeometry = mapToGlobal (thumbnailGeometry); const TQRect geometry = mapToGlobal (thumbnailGeometry);
m_thumbnail->resize (tqgeometry.size ()); m_thumbnail->resize (geometry.size ());
m_thumbnail->move (tqgeometry.topLeft ()); m_thumbnail->move (geometry.topLeft ());
} }
else else
{ {
@ -1101,7 +1101,7 @@ void kpMainWindow::updateThumbnail ()
initialHeight); initialHeight);
#if DEBUG_KP_MAIN_WINDOW #if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tcreating tqgeometry=" << geometryRect << endl; kdDebug () << "\t\tcreating geometry=" << geometryRect << endl;
#endif #endif
geometryRect = mapToGlobal (geometryRect); geometryRect = mapToGlobal (geometryRect);

@ -744,7 +744,7 @@ void kpTool::endDrawInternal (const TQPoint &thisPoint, const TQRect &normalized
// private // private
void kpTool::endShapeInternal (const TQPoint &thisPoint, const TQRect &normalizedRect) void kpTool::endShapeInternal (const TQPoint &thisPoint, const TQRect &normalizedRect)
{ {
endDrawInternal (thisPoint, normalizedRect, true/*end tqshape*/); endDrawInternal (thisPoint, normalizedRect, true/*end shape*/);
} }
// virtual // virtual
@ -1154,7 +1154,7 @@ void kpTool::wheelEvent (TQWheelEvent *e)
if ((e->state () & TQt::ControlButton) == 0) if ((e->state () & TQt::ControlButton) == 0)
return; return;
// If drawing, bye; don't care if a tqshape in progress though. // If drawing, bye; don't care if a shape in progress though.
if (hasBegunDraw ()) if (hasBegunDraw ())
return; return;

@ -1568,7 +1568,7 @@ void kpView::paintEventDrawSelectionResizeHandles (TQPainter *painter, const TQR
painter->setRasterOp (TQt::XorROP); painter->setRasterOp (TQt::XorROP);
} }
TQMemArray <TQRect> rects = selResizeHandlesRegion.tqrects (); TQMemArray <TQRect> rects = selResizeHandlesRegion.rects ();
for (TQMemArray <TQRect>::ConstIterator it = rects.begin (); for (TQMemArray <TQRect>::ConstIterator it = rects.begin ();
it != rects.end (); it != rects.end ();
it++) it++)
@ -1888,7 +1888,7 @@ void kpView::paintEvent (TQPaintEvent *e)
TQRegion viewRegion = clipRegion ().intersect (e->region ()); TQRegion viewRegion = clipRegion ().intersect (e->region ());
TQMemArray <TQRect> rects = viewRegion.tqrects (); TQMemArray <TQRect> rects = viewRegion.rects ();
#if DEBUG_KP_VIEW_RENDERER && 1 #if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "\t#rects = " << rects.count () << endl; kdDebug () << "\t#rects = " << rects.count () << endl;
#endif #endif

@ -628,7 +628,7 @@ void kpViewManager::updateView (kpView *v, const TQRect &viewRect)
if (!queueUpdates ()) if (!queueUpdates ())
{ {
if (fastUpdates ()) if (fastUpdates ())
v->tqrepaint (viewRect, false/*no erase*/); v->repaint (viewRect, false/*no erase*/);
else else
v->update (viewRect); v->update (viewRect);
} }
@ -646,7 +646,7 @@ void kpViewManager::updateView (kpView *v, const TQRegion &viewRegion)
if (!queueUpdates ()) if (!queueUpdates ())
{ {
if (fastUpdates ()) if (fastUpdates ())
v->tqrepaint (viewRegion, false/*no erase*/); v->repaint (viewRegion, false/*no erase*/);
else else
v->update (viewRegion.boundingRect ()); v->update (viewRegion.boundingRect ());
} }

@ -663,7 +663,7 @@ void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect (
// TODO: should be "!widget->testWFlags (TQt::WRepaintNoErase)" // TODO: should be "!widget->testWFlags (TQt::WRepaintNoErase)"
// but for some reason, doesn't work for viewport(). // but for some reason, doesn't work for viewport().
const bool erase = !dynamic_cast <kpView *> (widget); const bool erase = !dynamic_cast <kpView *> (widget);
widget->tqrepaint (redrawWidgetRect, erase); widget->repaint (redrawWidgetRect, erase);
} }
} }
@ -1269,7 +1269,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething)
// Repaint newly exposed region immediately to reduce tearing // Repaint newly exposed region immediately to reduce tearing
// of scrollView. // of scrollView.
m_view->tqrepaint (region, false/*no erase*/); m_view->repaint (region, false/*no erase*/);
} }
} }

@ -147,8 +147,8 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp
// TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)" // TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)"
// but for some reason, doesn't work for viewport(). // but for some reason, doesn't work for viewport().
const bool erase = !dynamic_cast <kpView *> (widget); const bool erase = !dynamic_cast <kpView *> (widget);
- widget->tqrepaint (redrawWidgetRect, erase); - widget->repaint (redrawWidgetRect, erase);
+ widget->tqrepaint (redrawWidgetRegion, erase); + widget->repaint (redrawWidgetRegion, erase);
} }
} }

@ -277,7 +277,7 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
// TODO: This doesn't seem to be wide enough with some fonts so the // TODO: This doesn't seem to be wide enough with some fonts so the
// whole tqlayout moves when we drag the gamma slider. // whole tqlayout moves when we drag the gamma slider.
m_gammaLabel->setMinimumWidth (m_gammaLabel->fontMetrics ().width (" 10.00 ")); m_gammaLabel->setMinimumWidth (m_gammaLabel->fontMetrics ().width (" 10.00 "));
m_gammaLabel->setAlignment (m_gammaLabel->tqalignment () | TQt::AlignRight); m_gammaLabel->setAlignment (m_gammaLabel->alignment () | TQt::AlignRight);
TQPushButton *gammaResetPushButton = new TQPushButton (i18n ("Rese&t"), this); TQPushButton *gammaResetPushButton = new TQPushButton (i18n ("Rese&t"), this);
@ -438,7 +438,7 @@ void kpEffectBalanceWidget::recalculateGammaLabel ()
'f'/*[-]9.9*/, 'f'/*[-]9.9*/,
2/*precision*/) + 2/*precision*/) +
" "); " ");
m_gammaLabel->tqrepaint (); m_gammaLabel->repaint ();
} }

@ -70,7 +70,7 @@ kpToolAutoCropBorder::kpToolAutoCropBorder (const TQPixmap *pixmapPtr,
: m_pixmapPtr (pixmapPtr), : m_pixmapPtr (pixmapPtr),
m_processedColorSimilarity (processedColorSimilarity) m_processedColorSimilarity (processedColorSimilarity)
{ {
tqinvalidate (); invalidate ();
} }
@ -280,7 +280,7 @@ bool kpToolAutoCropBorder::exists () const
} }
// public // public
void kpToolAutoCropBorder::tqinvalidate () void kpToolAutoCropBorder::invalidate ()
{ {
m_rect = TQRect (); m_rect = TQRect ();
m_referenceColor = kpColor::invalid; m_referenceColor = kpColor::invalid;
@ -374,7 +374,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
// and regression testing. // and regression testing.
// //
// TODO: e.g. When the top fills entire rect but bot doesn't we could // TODO: e.g. When the top fills entire rect but bot doesn't we could
// tqinvalidate top and continue autocrop. // invalidate top and continue autocrop.
int numRegions = 0; int numRegions = 0;
if (!leftBorder.calculate (true/*x*/, +1/*going right*/) || if (!leftBorder.calculate (true/*x*/, +1/*going right*/) ||
leftBorder.fillsEntirePixmap () || leftBorder.fillsEntirePixmap () ||
@ -439,7 +439,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
#if DEBUG_KP_TOOL_AUTO_CROP #if DEBUG_KP_TOOL_AUTO_CROP
kdDebug () << "\tignoring left border" << endl; kdDebug () << "\tignoring left border" << endl;
#endif #endif
leftBorder.tqinvalidate (); leftBorder.invalidate ();
} }
} }
@ -454,7 +454,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
#if DEBUG_KP_TOOL_AUTO_CROP #if DEBUG_KP_TOOL_AUTO_CROP
kdDebug () << "\tignoring top border" << endl; kdDebug () << "\tignoring top border" << endl;
#endif #endif
topBorder.tqinvalidate (); topBorder.invalidate ();
} }
} }

@ -69,7 +69,7 @@ public:
bool fillsEntirePixmap () const; bool fillsEntirePixmap () const;
bool exists () const; bool exists () const;
void tqinvalidate (); void invalidate ();
private: private:
const TQPixmap *m_pixmapPtr; const TQPixmap *m_pixmapPtr;

@ -32,7 +32,7 @@
kpToolBrush::kpToolBrush (kpMainWindow *mainWindow) kpToolBrush::kpToolBrush (kpMainWindow *mainWindow)
: kpToolPen (kpToolPen::Brush, : kpToolPen (kpToolPen::Brush,
i18n ("Brush"), i18n ("Brush"),
i18n ("Draw using brushes of different tqshapes and sizes"), i18n ("Draw using brushes of different shapes and sizes"),
TQt::Key_B, TQt::Key_B,
mainWindow, "tool_brush") mainWindow, "tool_brush")
{ {

@ -479,7 +479,7 @@ void kpToolPolygon::beginDraw ()
break; break;
default: default:
kdError () << "kpToolPolygon::beginDraw() tqshape" << endl; kdError () << "kpToolPolygon::beginDraw() shape" << endl;
break; break;
} }
} }

@ -389,7 +389,7 @@ void kpToolPreviewDialog::updatePreview ()
m_previewPixmapLabel->setPixmap (previewPixmap); m_previewPixmapLabel->setPixmap (previewPixmap);
// immediate update esp. for expensive previews // immediate update esp. for expensive previews
m_previewPixmapLabel->tqrepaint (false/*no erase*/); m_previewPixmapLabel->repaint (false/*no erase*/);
#if DEBUG_KP_TOOL_PREVIEW_DIALOG #if DEBUG_KP_TOOL_PREVIEW_DIALOG
kdDebug () << "\tafter TQLabel::setPixmap() previewPixmapLabel: w=" kdDebug () << "\tafter TQLabel::setPixmap() previewPixmapLabel: w="

@ -108,7 +108,7 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode,
if (startPoint != endPoint) if (startPoint != endPoint)
{ {
#if DEBUG_KP_TOOL_RECTANGLE && 1 #if DEBUG_KP_TOOL_RECTANGLE && 1
kdDebug () << "\tdraw tqshape" << endl; kdDebug () << "\tdraw shape" << endl;
#endif #endif
// TODO: Rectangle of pen width 1, height 1 and width X is rendered // TODO: Rectangle of pen width 1, height 1 and width X is rendered

@ -53,7 +53,7 @@ Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
// it turns out that these tqshapes are all really the same thing // it turns out that these shapes are all really the same thing
// (same options, same feel) - the only real difference is the // (same options, same feel) - the only real difference is the
// drawing functions (a one line change) // drawing functions (a one line change)
enum Mode {Rectangle, RoundedRectangle, Ellipse}; enum Mode {Rectangle, RoundedRectangle, Ellipse};

@ -684,9 +684,9 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget)
//m_smoothScaleLabel = new TQLabel (i18n ("S&mooth scale"), m_operationGroupBox); //m_smoothScaleLabel = new TQLabel (i18n ("S&mooth scale"), m_operationGroupBox);
//m_resizeLabel->setAlignment (m_resizeLabel->tqalignment () | TQt::ShowPrefix); //m_resizeLabel->setAlignment (m_resizeLabel->alignment () | TQt::ShowPrefix);
//m_scaleLabel->setAlignment (m_scaleLabel->tqalignment () | TQt::ShowPrefix); //m_scaleLabel->setAlignment (m_scaleLabel->alignment () | TQt::ShowPrefix);
//m_smoothScaleLabel->setAlignment (m_smoothScaleLabel->tqalignment () | TQt::ShowPrefix); //m_smoothScaleLabel->setAlignment (m_smoothScaleLabel->alignment () | TQt::ShowPrefix);
TQButtonGroup *resizeScaleButtonGroup = new TQButtonGroup (baseWidget); TQButtonGroup *resizeScaleButtonGroup = new TQButtonGroup (baseWidget);
@ -727,9 +727,9 @@ void kpToolResizeScaleDialog::createDimensionsGroupBox (TQWidget *baseWidget)
m_dimensionsGroupBox = new TQGroupBox (i18n ("Dimensions"), baseWidget); m_dimensionsGroupBox = new TQGroupBox (i18n ("Dimensions"), baseWidget);
TQLabel *widthLabel = new TQLabel (i18n ("Width:"), m_dimensionsGroupBox); TQLabel *widthLabel = new TQLabel (i18n ("Width:"), m_dimensionsGroupBox);
widthLabel->setAlignment (widthLabel->tqalignment () | TQt::AlignHCenter); widthLabel->setAlignment (widthLabel->alignment () | TQt::AlignHCenter);
TQLabel *heightLabel = new TQLabel (i18n ("Height:"), m_dimensionsGroupBox); TQLabel *heightLabel = new TQLabel (i18n ("Height:"), m_dimensionsGroupBox);
heightLabel->setAlignment (heightLabel->tqalignment () | TQt::AlignHCenter); heightLabel->setAlignment (heightLabel->alignment () | TQt::AlignHCenter);
TQLabel *originalLabel = new TQLabel (i18n ("Original:"), m_dimensionsGroupBox); TQLabel *originalLabel = new TQLabel (i18n ("Original:"), m_dimensionsGroupBox);
m_originalWidthInput = new KIntNumInput ( m_originalWidthInput = new KIntNumInput (

@ -77,7 +77,7 @@ void kpThumbnailView::resizeEvent (TQResizeEvent *e)
<< endl; << endl;
#endif #endif
// For TQResizeEvent's, TQt already throws an entire widget tqrepaint into // For TQResizeEvent's, TQt already throws an entire widget repaint into
// the event loop. So eat useless update() calls that can only slow // the event loop. So eat useless update() calls that can only slow
// things down. // things down.
// TODO: this doesn't seem to work. // TODO: this doesn't seem to work.

@ -133,7 +133,7 @@ void kpColorSimilarityCube::setColorSimilarity (double similarity)
m_colorSimilarity = similarity; m_colorSimilarity = similarity;
tqrepaint (false/*no erase*/); repaint (false/*no erase*/);
} }

@ -199,7 +199,7 @@ int kpToolToolBar::defaultIconSize ()
if (m_defaultIconSize <= 0) if (m_defaultIconSize <= 0)
{ {
// Adapt according to screen tqgeometry // Adapt according to screen geometry
const TQRect desktopSize = KGlobalSettings::desktopGeometry (this); const TQRect desktopSize = KGlobalSettings::desktopGeometry (this);
#if DEBUG_KP_TOOL_TOOL_BAR #if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\tadapting to screen size=" << desktopSize << endl; kdDebug () << "\tadapting to screen size=" << desktopSize << endl;

@ -59,7 +59,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
TQPixmap *pm = m_brushBitmaps; TQPixmap *pm = m_brushBitmaps;
for (int tqshape = 0; tqshape < BRUSH_SIZE_NUM_ROWS; tqshape++) for (int shape = 0; shape < BRUSH_SIZE_NUM_ROWS; shape++)
{ {
for (int i = 0; i < BRUSH_SIZE_NUM_COLS; i++) for (int i = 0; i < BRUSH_SIZE_NUM_COLS; i++)
{ {
@ -68,7 +68,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
pm->resize ((w <= 0 ? width () : w), pm->resize ((w <= 0 ? width () : w),
(h <= 0 ? height () : h)); (h <= 0 ? height () : h));
const int s = brushSize [tqshape][i]; const int s = brushSize [shape][i];
TQRect rect; TQRect rect;
if (s >= pm->width () || s >= pm->height ()) if (s >= pm->width () || s >= pm->height ())
@ -92,7 +92,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
painter.setBrush (TQt::black); painter.setBrush (TQt::black);
// sync: <brushes> // sync: <brushes>
switch (tqshape) switch (shape)
{ {
case 0: case 0:
painter.drawEllipse (rect); painter.drawEllipse (rect);
@ -110,7 +110,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
painter.end (); painter.end ();
pm->setMask (pm->createHeuristicMask ()); pm->setMask (pm->createHeuristicMask ());
addOption (*pm, brushName (tqshape, i)/*tooltip*/); addOption (*pm, brushName (shape, i)/*tooltip*/);
pm++; pm++;
} }
@ -127,38 +127,38 @@ kpToolWidgetBrush::~kpToolWidgetBrush ()
// private // private
TQString kpToolWidgetBrush::brushName (int tqshape, int whichSize) TQString kpToolWidgetBrush::brushName (int shape, int whichSize)
{ {
int s = brushSize [tqshape][whichSize]; int s = brushSize [shape][whichSize];
if (s == 1) if (s == 1)
return i18n ("1x1"); return i18n ("1x1");
TQString tqshapeName; TQString shapeName;
// sync: <brushes> // sync: <brushes>
switch (tqshape) switch (shape)
{ {
case 0: case 0:
tqshapeName = i18n ("Circle"); shapeName = i18n ("Circle");
break; break;
case 1: case 1:
tqshapeName = i18n ("Square"); shapeName = i18n ("Square");
break; break;
case 2: case 2:
// TODO: is this really the name of a tqshape? :) // TODO: is this really the name of a shape? :)
tqshapeName = i18n ("Slash"); shapeName = i18n ("Slash");
break; break;
case 3: case 3:
// TODO: is this really the name of a tqshape? :) // TODO: is this really the name of a shape? :)
tqshapeName = i18n ("Backslash"); shapeName = i18n ("Backslash");
break; break;
} }
if (tqshapeName.isEmpty ()) if (shapeName.isEmpty ())
return TQString(); return TQString();
return i18n ("%1x%2 %3").arg (s).arg (s).arg (tqshapeName); return i18n ("%1x%2 %3").arg (s).arg (s).arg (shapeName);
} }
TQPixmap kpToolWidgetBrush::brush () const TQPixmap kpToolWidgetBrush::brush () const

@ -43,7 +43,7 @@ public:
virtual ~kpToolWidgetBrush (); virtual ~kpToolWidgetBrush ();
private: private:
TQString brushName (int tqshape, int whichSize); TQString brushName (int shape, int whichSize);
public: public:
TQPixmap brush () const; TQPixmap brush () const;

@ -54,7 +54,7 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char
for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++) for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++)
{ {
int s = spraycanSizes [i]; int s = spraycanSizes [i];
TQString iconName = TQString ("tool_spraycan_%1x%1").tqarg (s).tqarg(s); TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s);
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE #if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "\ticonName=" << iconName << endl; kdDebug () << "\ticonName=" << iconName << endl;

@ -276,14 +276,14 @@ void ImgSaver::createDir( const TQString& dir )
if( KIO::mkdir( KURL(dir))) if( KIO::mkdir( KURL(dir)))
{ {
KMessageBox::sorry(0, i18n("The folder\n%1\n does not exist and could not be created;\n" KMessageBox::sorry(0, i18n("The folder\n%1\n does not exist and could not be created;\n"
"please check the permissions.").tqarg(dir)); "please check the permissions.").arg(dir));
} }
} }
#if 0 #if 0
if( ! fi.isWritable() ) if( ! fi.isWritable() )
{ {
KMessageBox::sorry(0, i18n("The directory\n%1\n is not writeable;\nplease check the permissions.") KMessageBox::sorry(0, i18n("The directory\n%1\n is not writeable;\nplease check the permissions.")
.tqarg(dir)); .arg(dir));
} }
#endif #endif
} }
@ -766,7 +766,7 @@ bool ImgSaver::renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt, TQWi
TQString s; TQString s;
s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? "); s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? ");
s += i18n( "That would result in the new filename: %1" ).tqarg( fName); s += i18n( "That would result in the new filename: %1" ).arg( fName);
result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"), result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"),
i18n("Add Extension"), i18n("Do Not Add"), i18n("Add Extension"), i18n("Do Not Add"),
@ -863,7 +863,7 @@ bool ImgSaver::copyImage( const KURL& fromUrl, const KURL& toUrl, TQWidget *over
TQString s; TQString s;
s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? "); s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? ");
s += i18n( "That would result in the new filename: %1" ).tqarg( fName); s += i18n( "That would result in the new filename: %1" ).arg( fName);
result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"), result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"),
i18n("Add Extension"), i18n("Do Not Add"), i18n("Add Extension"), i18n("Do Not Add"),

@ -167,7 +167,7 @@ void ImgPrintDialog::setOptions(const TQMap<TQString,TQString>& opts)
m_sizeH->setValue( help ); m_sizeH->setValue( help );
help = opts[OPT_SCREEN_RES].toInt(); help = opts[OPT_SCREEN_RES].toInt();
m_screenRes->setText(i18n( "Screen resolution: %1 dpi").tqarg(help)); m_screenRes->setText(i18n( "Screen resolution: %1 dpi").arg(help));
help = opts[OPT_PSGEN_DRAFT].toInt(); help = opts[OPT_PSGEN_DRAFT].toInt();
m_psDraft->setChecked( help == 1 ); m_psDraft->setChecked( help == 1 );

@ -356,7 +356,7 @@ KADMOS_ERROR CRep::SetImage(TQImage *Image)
m_RepData.image.width = Image->width(); m_RepData.image.width = Image->width();
m_RepData.image.height = Image->height(); m_RepData.image.height = Image->height();
m_RepData.image.bitsperpixel = Image->depth(); m_RepData.image.bitsperpixel = Image->depth();
m_RepData.image.tqalignment = 1; m_RepData.image.alignment = 1;
m_RepData.image.fillorder = FILLORDER_MSB2LSB; m_RepData.image.fillorder = FILLORDER_MSB2LSB;
// color // color
if( Image->depth() == 1 || (Image->numColors()==2 && Image->depth() == 8) ) if( Image->depth() == 1 || (Image->numColors()==2 && Image->depth() == 8) )

@ -422,14 +422,14 @@ bool KadmosDialog::getSelClassifier( TQString& path ) const
if( res && ! fi.exists() ) if( res && ! fi.exists() )
{ {
kdDebug(28000) << "Classifier file does not exist" << endl; kdDebug(28000) << "Classifier file does not exist" << endl;
path = i18n("Classifier file %1 does not exist").tqarg(classifier); path = i18n("Classifier file %1 does not exist").arg(classifier);
res = false; res = false;
} }
if( res && ! fi.isReadable() ) if( res && ! fi.isReadable() )
{ {
kdDebug(28000) << "Classifier file could not be read" << endl; kdDebug(28000) << "Classifier file could not be read" << endl;
path = i18n("Classifier file %1 is not readable").tqarg(classifier); path = i18n("Classifier file %1 is not readable").arg(classifier);
res = false; res = false;
} }

@ -180,13 +180,13 @@ KURLRequester* KookaPreferences::binaryCheckBox( TQWidget *parent, const TQStrin
{ {
TQHBox *hbox = new TQHBox( parent ); TQHBox *hbox = new TQHBox( parent );
(void) new TQLabel( i18n("Select the %1 binary to use:").tqarg( program ), hbox ); (void) new TQLabel( i18n("Select the %1 binary to use:").arg( program ), hbox );
KURLRequester* urlRequester = new KURLRequester( parent ); KURLRequester* urlRequester = new KURLRequester( parent );
urlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); urlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly );
TQToolTip::add( urlRequester, TQToolTip::add( urlRequester,
i18n( "Enter the path to %1, the optical-character-recognition " i18n( "Enter the path to %1, the optical-character-recognition "
"command line tool.").tqarg(program)); "command line tool.").arg(program));
return urlRequester; return urlRequester;
} }

@ -472,7 +472,7 @@ void KookaView::print()
printer.setUsePrinterResolution(true); printer.setUsePrinterResolution(true);
printer.addDialogPage( new ImgPrintDialog( img )); printer.addDialogPage( new ImgPrintDialog( img ));
if( printer.setup( m_mainWindow, i18n("Print %1").tqarg(img->localFileName().section('/', -1)) )) if( printer.setup( m_mainWindow, i18n("Print %1").arg(img->localFileName().section('/', -1)) ))
{ {
KookaPrint kookaprint( &printer ); KookaPrint kookaprint( &printer );
kookaprint.printImage(img); kookaprint.printImage(img);
@ -565,7 +565,7 @@ void KookaView::startOCR( KookaImage *img )
m_dockOCRText, TQT_SLOT( show() )); m_dockOCRText, TQT_SLOT( show() ));
connect( ocrFabric, TQT_SIGNAL( repaintOCRResImage( )), connect( ocrFabric, TQT_SIGNAL( repaintOCRResImage( )),
img_canvas, TQT_SLOT(tqrepaint())); img_canvas, TQT_SLOT(repaint()));
connect( ocrFabric, TQT_SIGNAL( clearOCRResultText()), connect( ocrFabric, TQT_SIGNAL( clearOCRResultText()),
m_ocrResEdit, TQT_SLOT(clear())); m_ocrResEdit, TQT_SLOT(clear()));
@ -913,7 +913,7 @@ void KookaView::slShowThumbnails(KFileTreeViewItem *dirKfi, bool forceRedraw )
*/ */
void KookaView::slStartLoading( const KURL& url ) void KookaView::slStartLoading( const KURL& url )
{ {
emit( signalChangeStatusbar( i18n("Loading %1" ).tqarg( url.prettyURL() ) )); emit( signalChangeStatusbar( i18n("Loading %1" ).arg( url.prettyURL() ) ));
// if( m_stack->visibleWidget() != img_canvas ) // if( m_stack->visibleWidget() != img_canvas )
// { // {

@ -814,11 +814,11 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr )
TQFileInfo fi( fileName ); TQFileInfo fi( fileName );
if( ! fi.exists() ) { if( ! fi.exists() ) {
error = true; error = true;
errStr = i18n("The orf %1 does not exist.").tqarg(fileName); errStr = i18n("The orf %1 does not exist.").arg(fileName);
} }
if( ! error && ! fi.isReadable() ) { if( ! error && ! fi.isReadable() ) {
error = true; error = true;
errStr = i18n("Permission denied on file %1.").tqarg(fileName); errStr = i18n("Permission denied on file %1.").arg(fileName);
} }

@ -245,7 +245,7 @@ void ScanPackager::slotDecorate( KFileTreeViewItem* item )
} }
/* set image size in pixels */ /* set image size in pixels */
TQString t = i18n( "%1 x %2" ).tqarg( img->width()).tqarg(img->height()); TQString t = i18n( "%1 x %2" ).arg( img->width()).arg(img->height());
item->setText( 1, t ); item->setText( 1, t );
kdDebug( 28000) << "Image loaded and decorated!" << endl; kdDebug( 28000) << "Image loaded and decorated!" << endl;
} }
@ -600,7 +600,7 @@ void ScanPackager::loadImageForItem( KFileTreeViewItem *item )
prevItem = subImgItem; prevItem = subImgItem;
subImgItem->setPixmap( 0, loader->loadIcon( "editcopy", KIcon::Small )); subImgItem->setPixmap( 0, loader->loadIcon( "editcopy", KIcon::Small ));
subImgItem->setText( 0, i18n("Sub-image %1").tqarg( i ) ); subImgItem->setText( 0, i18n("Sub-image %1").arg( i ) );
KookaImage *subImgImg = new KookaImage( i, img ); KookaImage *subImgImg = new KookaImage( i, img );
subImgImg->setFileItem( newKfi ); subImgImg->setFileItem( newKfi );
newKfi->setExtraData( (void*) this, (void*) subImgImg ); newKfi->setExtraData( (void*) this, (void*) subImgImg );
@ -853,7 +853,7 @@ void ScanPackager::slAddImage( TQImage *img, KookaImageMeta* )
m_nextUrlToShow = lurl; m_nextUrlToShow = lurl;
TQString s; TQString s;
/* Count amount of tqchildren of the father */ /* Count amount of children of the father */
TQListViewItem *paps = curr->parent(); TQListViewItem *paps = curr->parent();
if( curr->isDir() ) /* take only father if the is no directory */ if( curr->isDir() ) /* take only father if the is no directory */
paps = curr; paps = curr;
@ -861,7 +861,7 @@ void ScanPackager::slAddImage( TQImage *img, KookaImageMeta* )
if( paps ) if( paps )
{ {
int childcount = paps->childCount(); int childcount = paps->childCount();
s = i18n("%1 images").tqarg(childcount); s = i18n("%1 images").arg(childcount);
paps->setText( 1, s); paps->setText( 1, s);
setOpen( paps, true ); setOpen( paps, true );
} }
@ -1136,7 +1136,7 @@ void ScanPackager::slotDeleteItems( )
s = i18n("Do you really want to delete this image?\nIt cannot be restored!" ); s = i18n("Do you really want to delete this image?\nIt cannot be restored!" );
if( item->isDir() ) if( item->isDir() )
{ {
s = i18n("Do you really want to delete the folder %1\nand all the images inside?").tqarg(""); s = i18n("Do you really want to delete the folder %1\nand all the images inside?").arg("");
} }
result = KMessageBox::warningContinueCancel(this, s, i18n( "Delete Collection Item"), result = KMessageBox::warningContinueCancel(this, s, i18n( "Delete Collection Item"),
KStdGuiItem::del(), "AskForDeleteFiles" ); KStdGuiItem::del(), "AskForDeleteFiles" );
@ -1214,7 +1214,7 @@ TQString ScanPackager::getImgName( TQString name_on_disk )
TQString s; TQString s;
(void) name_on_disk; (void) name_on_disk;
s = i18n("image %1").tqarg(img_counter++); s = i18n("image %1").arg(img_counter++);
return( s ); return( s );
} }

@ -138,7 +138,7 @@
<property name="textFormat"> <property name="textFormat">
<enum>PlainText</enum> <enum>PlainText</enum>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>

@ -118,7 +118,7 @@ KPDFDocument::KPDFDocument(TQWidget *widget)
TQStringList::Iterator it = list.begin(); TQStringList::Iterator it = list.begin();
while( it != list.end() ) while( it != list.end() )
{ {
d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").tqarg(*it), 0, true)->name(); d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").arg(*it), 0, true)->name();
++it; ++it;
} }
} }
@ -331,7 +331,7 @@ void KPDFDocument::reparseConfig()
// reparse generator config and if something changed clear KPDFPages // reparse generator config and if something changed clear KPDFPages
if ( generator && generator->reparseConfig() ) if ( generator && generator->reparseConfig() )
{ {
// tqinvalidate pixmaps // invalidate pixmaps
TQValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end(); TQValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end();
for ( ; it != end; ++it ) for ( ; it != end; ++it )
(*it)->deletePixmapsAndRects(); (*it)->deletePixmapsAndRects();
@ -712,7 +712,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
} }
} }
// reset cursor to previous tqshape // reset cursor to previous shape
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
// send page lists if found anything new // send page lists if found anything new
@ -764,7 +764,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
} }
} }
// reset cursor to previous tqshape // reset cursor to previous shape
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
// if a match has been found.. // if a match has been found..
@ -793,7 +793,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
} }
} }
else if ( !noDialogs ) else if ( !noDialogs )
KMessageBox::information( widget(), i18n("No matches found for '%1'.").tqarg( text ) ); KMessageBox::information( widget(), i18n("No matches found for '%1'.").arg( text ) );
} }
// 3. PREVMATCH //TODO // 3. PREVMATCH //TODO
else if ( type == PrevMatch ) else if ( type == PrevMatch )
@ -865,7 +865,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
} }
} }
// reset cursor to previous tqshape // reset cursor to previous shape
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
// send page lists to update observers (since some filter on bookmarks) // send page lists to update observers (since some filter on bookmarks)
@ -1016,7 +1016,7 @@ void KPDFDocument::processLink( const KPDFLink * link )
KRun::run( *ptr, lst ); KRun::run( *ptr, lst );
} }
else else
KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).tqarg( mime->name() ) ); KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).arg( mime->name() ) );
} break; } break;
case KPDFLink::Action: { case KPDFLink::Action: {

@ -209,7 +209,7 @@ const DocumentInfo * PDFGenerator::generateDocumentInfo()
if ( pdfdoc ) if ( pdfdoc )
{ {
docInfo.set( "format", i18n( "PDF v. <version>", "PDF v. %1" ) docInfo.set( "format", i18n( "PDF v. <version>", "PDF v. %1" )
.tqarg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) ); .arg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) );
docInfo.set( "encryption", pdfdoc->isEncrypted() ? i18n( "Encrypted" ) : i18n( "Unencrypted" ), docInfo.set( "encryption", pdfdoc->isEncrypted() ? i18n( "Encrypted" ) : i18n( "Unencrypted" ),
i18n("Security") ); i18n("Security") );
docInfo.set( "optimization", pdfdoc->isLinearized() ? i18n( "Yes" ) : i18n( "No" ), docInfo.set( "optimization", pdfdoc->isLinearized() ? i18n( "Yes" ) : i18n( "No" ),
@ -528,7 +528,7 @@ static GString *TQStringToGString(const TQString &s) {
int len = s.length(); int len = s.length();
char *cstring = (char *)gmallocn(s.length(), sizeof(char)); char *cstring = (char *)gmallocn(s.length(), sizeof(char));
for (int i = 0; i < len; ++i) for (int i = 0; i < len; ++i)
cstring[i] = s.tqat(i).tqunicode(); cstring[i] = s.at(i).tqunicode();
return new GString(cstring, len); return new GString(cstring, len);
} }
@ -909,11 +909,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items )
item.setAttribute( "Open", TQVariant( (bool)outlineItem->isOpen() ).toString() ); item.setAttribute( "Open", TQVariant( (bool)outlineItem->isOpen() ).toString() );
// 3. recursively descend over tqchildren // 3. recursively descend over children
outlineItem->open(); outlineItem->open();
GList * tqchildren = outlineItem->getKids(); GList * children = outlineItem->getKids();
if ( tqchildren ) if ( children )
addSynopsisChildren( &item, tqchildren ); addSynopsisChildren( &item, children );
} }
} }

@ -18,12 +18,12 @@ KPDFLink::~KPDFLink()
TQString KPDFLinkGoto::linkTip() const TQString KPDFLinkGoto::linkTip() const
{ {
return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).tqarg( m_vp.pageNumber + 1 ) : TQString() ) : i18n("Open external file"); return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).arg( m_vp.pageNumber + 1 ) : TQString() ) : i18n("Open external file");
} }
TQString KPDFLinkExecute::linkTip() const TQString KPDFLinkExecute::linkTip() const
{ {
return i18n( "Execute '%1'..." ).tqarg( m_fileName ); return i18n( "Execute '%1'..." ).arg( m_fileName );
} }
TQString KPDFLinkBrowse::linkTip() const TQString KPDFLinkBrowse::linkTip() const

@ -319,7 +319,7 @@ bool NormalizedRect::intersects( double l, double t, double r, double b ) const
return (l < right) && (r > left) && (t < bottom) && (b > top); return (l < right) && (r > left) && (t < bottom) && (b > top);
} }
TQRect NormalizedRect::tqgeometry( int xScale, int yScale ) const TQRect NormalizedRect::geometry( int xScale, int yScale ) const
{ {
int l = (int)( left * xScale ), int l = (int)( left * xScale ),
t = (int)( top * yScale ), t = (int)( top * yScale ),

@ -36,7 +36,7 @@ class NormalizedRect
bool intersects( const NormalizedRect & normRect ) const; bool intersects( const NormalizedRect & normRect ) const;
bool intersects( double l, double t, double r, double b ) const; bool intersects( double l, double t, double r, double b ) const;
TQRect tqgeometry( int xScale, int yScale ) const; TQRect geometry( int xScale, int yScale ) const;
}; };
/** /**

@ -15,7 +15,7 @@
KPDFPageTransition::KPDFPageTransition( Type type ) KPDFPageTransition::KPDFPageTransition( Type type )
: m_type( type ), : m_type( type ),
m_duration( 1 ), m_duration( 1 ),
m_tqalignment(Horizontal ), m_alignment(Horizontal ),
m_direction( Inward ), m_direction( Inward ),
m_angle( 0 ), m_angle( 0 ),
m_scale( 1.0 ), m_scale( 1.0 ),

@ -51,7 +51,7 @@ class KPDFPageTransition
inline int duration() const { return m_duration; } inline int duration() const { return m_duration; }
// Get dimension in which the transition effect occurs. // Get dimension in which the transition effect occurs.
inline Alignment tqalignment() const { return m_tqalignment; } inline Alignment alignment() const { return m_alignment; }
// Get direction of motion of the transition effect. // Get direction of motion of the transition effect.
inline Direction direction() const { return m_direction; } inline Direction direction() const { return m_direction; }
@ -67,7 +67,7 @@ class KPDFPageTransition
inline void setType( Type type ) { m_type = type; } inline void setType( Type type ) { m_type = type; }
inline void setDuration( int duration ) { m_duration = duration; } inline void setDuration( int duration ) { m_duration = duration; }
inline void setAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; } inline void setAlignment( Alignment alignment ) { m_alignment = alignment; }
inline void setDirection( Direction direction ) { m_direction = direction; } inline void setDirection( Direction direction ) { m_direction = direction; }
inline void setAngle( int angle ) { m_angle = angle; } inline void setAngle( int angle ) { m_angle = angle; }
inline void setScale( double scale ) { m_scale = scale; } inline void setScale( double scale ) { m_scale = scale; }
@ -76,7 +76,7 @@ class KPDFPageTransition
private: private:
Type m_type; Type m_type;
int m_duration; int m_duration;
Alignment m_tqalignment; Alignment m_alignment;
Direction m_direction; Direction m_direction;
int m_angle; int m_angle;
double m_scale; double m_scale;

@ -32,7 +32,7 @@ void CDECL error(int pos, char *msg, ...) {
return; return;
} }
if (pos >= 0) { if (pos >= 0) {
emsg = TQString("Error (%1): ").tqarg(pos); emsg = TQString("Error (%1): ").arg(pos);
} else { } else {
emsg = "Error: "; emsg = "Error: ";
} }

@ -297,7 +297,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName,
m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, TQT_SLOT(slotShowPresentation()), ac, "presentation"); m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, TQT_SLOT(slotShowPresentation()), ac, "presentation");
m_showPresentation->setEnabled( false ); m_showPresentation->setEnabled( false );
// attach the actions of the tqchildren widgets too // attach the actions of the children widgets too
m_pageView->setupActions( ac ); m_pageView->setupActions( ac );
// apply configuration (both internal settings and GUI configured items) // apply configuration (both internal settings and GUI configured items)
@ -510,7 +510,7 @@ bool Part::openURL(const KURL &url)
// these setWindowCaption calls only work for local files // these setWindowCaption calls only work for local files
if ( !b ) if ( !b )
{ {
KMessageBox::error( widget(), i18n("Could not open %1").tqarg( url.prettyURL() ) ); KMessageBox::error( widget(), i18n("Could not open %1").arg( url.prettyURL() ) );
emit setWindowCaption(""); emit setWindowCaption("");
} }
else else
@ -806,17 +806,17 @@ void Part::slotSaveFileAs()
{ {
if (saveURL == url()) if (saveURL == url())
{ {
KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").tqarg(saveURL.filename()) ); KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").arg(saveURL.filename()) );
return; return;
} }
if ( KIO::NetAccess::exists( saveURL, false, widget() ) ) if ( KIO::NetAccess::exists( saveURL, false, widget() ) )
{ {
if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").tqarg(saveURL.filename()), TQString(), i18n("Overwrite")) != KMessageBox::Continue) if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), TQString(), i18n("Overwrite")) != KMessageBox::Continue)
return; return;
} }
if ( !KIO::NetAccess::file_copy( m_file, saveURL, -1, true ) ) if ( !KIO::NetAccess::file_copy( m_file, saveURL, -1, true ) )
KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").tqarg( saveURL.prettyURL() ) ); KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").arg( saveURL.prettyURL() ) );
} }
} }
@ -939,7 +939,7 @@ void Part::slotShowMenu(const KPDFPage *page, const TQPoint &point)
KPopupMenu *popup = new KPopupMenu( widget(), "rmb popup" ); KPopupMenu *popup = new KPopupMenu( widget(), "rmb popup" );
if (page) if (page)
{ {
popup->insertTitle( i18n( "Page %1" ).tqarg( page->number() + 1 ) ); popup->insertTitle( i18n( "Page %1" ).arg( page->number() + 1 ) );
if ( page->hasBookmark() ) if ( page->hasBookmark() )
popup->insertItem( SmallIcon("bookmark"), i18n("Remove Bookmark"), 1 ); popup->insertItem( SmallIcon("bookmark"), i18n("Remove Bookmark"), 1 );
else else

@ -178,7 +178,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
for ( ; hIt != hEnd; ++hIt ) for ( ; hIt != hEnd; ++hIt )
{ {
HighlightRect * r = *hIt; HighlightRect * r = *hIt;
TQRect highlightRect = r->tqgeometry( width, height ); TQRect highlightRect = r->geometry( width, height );
if ( highlightRect.isValid() && highlightRect.intersects( limits ) ) if ( highlightRect.isValid() && highlightRect.intersects( limits ) )
{ {
// find out the rect to highlight on pixmap // find out the rect to highlight on pixmap
@ -226,7 +226,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
if ( (enhanceLinks && rect->objectType() == ObjectRect::Link) || if ( (enhanceLinks && rect->objectType() == ObjectRect::Link) ||
(enhanceImages && rect->objectType() == ObjectRect::Image) ) (enhanceImages && rect->objectType() == ObjectRect::Image) )
{ {
TQRect rectGeometry = rect->tqgeometry( width, height ); TQRect rectGeometry = rect->geometry( width, height );
if ( rectGeometry.intersects( limitsEnlarged ) ) if ( rectGeometry.intersects( limitsEnlarged ) )
{ {
// expand rect and draw inner border // expand rect and draw inner border

@ -146,8 +146,8 @@ void PageViewTip::maybeTip( const TQPoint &_p )
PageViewItem * pageItem = m_view->pickItemOnPoint( p.x(), p.y() ); PageViewItem * pageItem = m_view->pickItemOnPoint( p.x(), p.y() );
if ( pageItem && m_view->d->mouseMode == PageView::MouseNormal ) if ( pageItem && m_view->d->mouseMode == PageView::MouseNormal )
{ {
double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(),
nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height();
// if over a ObjectRect (of type Link) change cursor to hand // if over a ObjectRect (of type Link) change cursor to hand
const ObjectRect * object = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); const ObjectRect * object = pageItem->page()->hasObject( ObjectRect::Link, nX, nY );
@ -158,8 +158,8 @@ void PageViewTip::maybeTip( const TQPoint &_p )
TQString strtip = link->linkTip(); TQString strtip = link->linkTip();
if ( !strtip.isEmpty() ) if ( !strtip.isEmpty() )
{ {
TQRect linkRect = object->tqgeometry( pageItem->width(), pageItem->height() ); TQRect linkRect = object->geometry( pageItem->width(), pageItem->height() );
linkRect.moveBy( - m_view->contentsX() + pageItem->tqgeometry().left(), - m_view->contentsY() + pageItem->tqgeometry().top() ); linkRect.moveBy( - m_view->contentsX() + pageItem->geometry().left(), - m_view->contentsY() + pageItem->geometry().top() );
tip( linkRect, strtip ); tip( linkRect, strtip );
} }
} }
@ -337,7 +337,7 @@ void PageView::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool do
d->items.clear(); d->items.clear();
d->visibleItems.clear(); d->visibleItems.clear();
// create tqchildren widgets // create children widgets
TQValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end(); TQValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end();
for ( ; setIt != setEnd; ++setIt ) for ( ; setIt != setEnd; ++setIt )
d->items.push_back( new PageViewItem( *setIt ) ); d->items.push_back( new PageViewItem( *setIt ) );
@ -397,8 +397,8 @@ void PageView::notifyViewportChanged( bool smoothMove )
if ( !KpdfSettings::viewContinuous() || d->dirtyLayout ) if ( !KpdfSettings::viewContinuous() || d->dirtyLayout )
slotRelayoutPages(); slotRelayoutPages();
// restore viewport center or use default {x-center,v-top} tqalignment // restore viewport center or use default {x-center,v-top} alignment
const TQRect & r = item->tqgeometry(); const TQRect & r = item->geometry();
int newCenterX = r.left(), int newCenterX = r.left(),
newCenterY = r.top(); newCenterY = r.top();
if ( vp.rePos.enabled ) if ( vp.rePos.enabled )
@ -462,13 +462,13 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags )
if ( changedFlags & DocumentObserver::Bookmark ) if ( changedFlags & DocumentObserver::Bookmark )
return; return;
// iterate over visible items: if page(pageNumber) is one of them, tqrepaint it // iterate over visible items: if page(pageNumber) is one of them, repaint it
TQValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end(); TQValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end();
for ( ; iIt != iEnd; ++iIt ) for ( ; iIt != iEnd; ++iIt )
if ( (*iIt)->pageNumber() == pageNumber ) if ( (*iIt)->pageNumber() == pageNumber )
{ {
// update item's rectangle plus the little outline // update item's rectangle plus the little outline
TQRect expandedRect = (*iIt)->tqgeometry(); TQRect expandedRect = (*iIt)->geometry();
expandedRect.addCoords( -1, -1, 3, 3 ); expandedRect.addCoords( -1, -1, 3, 3 );
updateContents( expandedRect ); updateContents( expandedRect );
@ -535,7 +535,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe )
d->selectionRectColor : TQt::red; d->selectionRectColor : TQt::red;
// subdivide region into rects // subdivide region into rects
TQMemArray<TQRect> allRects = TQRegion(pe->region()).tqrects(); TQMemArray<TQRect> allRects = TQRegion(pe->region()).rects();
uint numRects = allRects.count(); uint numRects = allRects.count();
// preprocess rects area to see if it worths or not using subdivision // preprocess rects area to see if it worths or not using subdivision
@ -662,7 +662,7 @@ void PageView::keyPressEvent( TQKeyEvent * e )
bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, true, false, bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, true, false,
KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true );
TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\".");
d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), d->messageWindow->display( status.arg(d->typeAheadString.lower()),
found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 );
d->findTimeoutTimer->start( 3000, true ); d->findTimeoutTimer->start( 3000, true );
} }
@ -682,7 +682,7 @@ void PageView::keyPressEvent( TQKeyEvent * e )
// because it activates the accel // because it activates the accel
releaseKeyboard(); releaseKeyboard();
if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) ) if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) )
d->messageWindow->display( i18n("Text found: \"%1\".").tqarg(d->typeAheadString.lower()), d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()),
PageViewMessage::Find, 3000 ); PageViewMessage::Find, 3000 );
d->findTimeoutTimer->start( 3000, true ); d->findTimeoutTimer->start( 3000, true );
// it is needed to grab the keyboard becase people may have Space assigned to a // it is needed to grab the keyboard becase people may have Space assigned to a
@ -847,7 +847,7 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e )
d->zoomFactor *= ( 1.0 + ( (double)deltaY / 500.0 ) ); d->zoomFactor *= ( 1.0 + ( (double)deltaY / 500.0 ) );
updateZoom( ZoomRefreshCurrent ); updateZoom( ZoomRefreshCurrent );
// uncomment following line to force a complete redraw // uncomment following line to force a complete redraw
viewport()->tqrepaint( false ); viewport()->repaint( false );
return; return;
} }
@ -1006,8 +1006,8 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
// if the mouse has not moved since the press, that's a -click- // if the mouse has not moved since the press, that's a -click-
if ( leftButton && pageItem && d->mousePressPos == e->globalPos()) if ( leftButton && pageItem && d->mousePressPos == e->globalPos())
{ {
double nX = (double)(e->x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), double nX = (double)(e->x() - pageItem->geometry().left()) / (double)pageItem->width(),
nY = (double)(e->y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); nY = (double)(e->y() - pageItem->geometry().top()) / (double)pageItem->height();
const ObjectRect * linkRect, * imageRect; const ObjectRect * linkRect, * imageRect;
linkRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); linkRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY );
if ( linkRect ) if ( linkRect )
@ -1105,7 +1105,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
for ( ; iIt != iEnd; ++iIt ) for ( ; iIt != iEnd; ++iIt )
{ {
PageViewItem * item = *iIt; PageViewItem * item = *iIt;
const TQRect & itemRect = item->tqgeometry(); const TQRect & itemRect = item->geometry();
if ( selectionRect.intersects( itemRect ) ) if ( selectionRect.intersects( itemRect ) )
{ {
// request the textpage if there isn't one // request the textpage if there isn't one
@ -1131,7 +1131,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
if ( KpdfSettings::useKTTSD() ) if ( KpdfSettings::useKTTSD() )
menu.insertItem( SmallIcon("kttsd"), i18n( "Speak Text" ), 2 ); menu.insertItem( SmallIcon("kttsd"), i18n( "Speak Text" ), 2 );
} }
menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).tqarg( selectionRect.width() ).tqarg( selectionRect.height() ) ); menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).arg( selectionRect.width() ).arg( selectionRect.height() ) );
menu.insertItem( SmallIcon("image"), i18n( "Copy to Clipboard" ), 3 ); menu.insertItem( SmallIcon("image"), i18n( "Copy to Clipboard" ), 3 );
menu.insertItem( SmallIcon("filesave"), i18n( "Save to File..." ), 4 ); menu.insertItem( SmallIcon("filesave"), i18n( "Save to File..." ), 4 );
int choice = menu.exec( e->globalPos() ); int choice = menu.exec( e->globalPos() );
@ -1151,7 +1151,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
cb->setPixmap( copyPix, TQClipboard::Clipboard ); cb->setPixmap( copyPix, TQClipboard::Clipboard );
if ( cb->supportsSelection() ) if ( cb->supportsSelection() )
cb->setPixmap( copyPix, TQClipboard::Selection ); cb->setPixmap( copyPix, TQClipboard::Selection );
d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ) ); d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).arg( copyPix.width() ).arg( copyPix.height() ) );
} }
else if ( choice == 4 ) else if ( choice == 4 )
{ {
@ -1165,7 +1165,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
if ( type.isNull() ) if ( type.isNull() )
type = "PNG"; type = "PNG";
copyPix.save( fileName, type.latin1() ); copyPix.save( fileName, type.latin1() );
d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ).tqarg( type ) ); d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).arg( copyPix.width() ).arg( copyPix.height() ).arg( type ) );
} }
} }
} }
@ -1194,7 +1194,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
TQString error; TQString error;
if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error)) if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
{ {
d->messageWindow->display( i18n("Starting KTTSD Failed: %1").tqarg(error) ); d->messageWindow->display( i18n("Starting KTTSD Failed: %1").arg(error) );
KpdfSettings::setUseKTTSD(false); KpdfSettings::setUseKTTSD(false);
KpdfSettings::writeConfig(); KpdfSettings::writeConfig();
} }
@ -1221,7 +1221,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
} }
} }
// clear widget selection and tqinvalidate rect // clear widget selection and invalidate rect
selectionClear(); selectionClear();
// restore previous action if came from it using right button // restore previous action if came from it using right button
@ -1323,17 +1323,17 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect )
for ( ; iIt != iEnd; ++iIt ) for ( ; iIt != iEnd; ++iIt )
{ {
// check if a piece of the page intersects the contents rect // check if a piece of the page intersects the contents rect
if ( !(*iIt)->tqgeometry().intersects( checkRect ) ) if ( !(*iIt)->geometry().intersects( checkRect ) )
continue; continue;
PageViewItem * item = *iIt; PageViewItem * item = *iIt;
TQRect pixmapGeometry = item->tqgeometry(); TQRect pixmapGeometry = item->geometry();
// translate the painter so we draw top-left pixmap corner in 0,0 // translate the painter so we draw top-left pixmap corner in 0,0
p->save(); p->save();
p->translate( pixmapGeometry.left(), pixmapGeometry.top() ); p->translate( pixmapGeometry.left(), pixmapGeometry.top() );
// item pixmap and outline tqgeometry // item pixmap and outline geometry
TQRect outlineGeometry = pixmapGeometry; TQRect outlineGeometry = pixmapGeometry;
outlineGeometry.addCoords( -1, -1, 3, 3 ); outlineGeometry.addCoords( -1, -1, 3, 3 );
@ -1378,7 +1378,7 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect )
} }
// paint with background color the unpainted area // paint with background color the unpainted area
TQMemArray<TQRect> backRects = remainingArea.tqrects(); TQMemArray<TQRect> backRects = remainingArea.rects();
uint backRectsNumber = backRects.count(); uint backRectsNumber = backRects.count();
for ( uint jr = 0; jr < backRectsNumber; jr++ ) for ( uint jr = 0; jr < backRectsNumber; jr++ )
p->fillRect( backRects[ jr ], TQt::gray ); p->fillRect( backRects[ jr ], TQt::gray );
@ -1424,7 +1424,7 @@ PageViewItem * PageView::pickItemOnPoint( int x, int y )
for ( ; iIt != iEnd; ++iIt ) for ( ; iIt != iEnd; ++iIt )
{ {
PageViewItem * i = *iIt; PageViewItem * i = *iIt;
const TQRect & r = i->tqgeometry(); const TQRect & r = i->geometry();
if ( x < r.right() && x > r.left() && y < r.bottom() ) if ( x < r.right() && x > r.left() && y < r.bottom() )
{ {
if ( y > r.top() ) if ( y > r.top() )
@ -1485,7 +1485,7 @@ void PageView::selectionEndPoint( int x, int y )
compoundRegion -= intersection; compoundRegion -= intersection;
} }
// tassellate region with rects and enqueue paint events // tassellate region with rects and enqueue paint events
TQMemArray<TQRect> rects = compoundRegion.tqrects(); TQMemArray<TQRect> rects = compoundRegion.rects();
for ( uint i = 0; i < rects.count(); i++ ) for ( uint i = 0; i < rects.count(); i++ )
updateContents( rects[i] ); updateContents( rects[i] );
} }
@ -1599,7 +1599,7 @@ void PageView::updateZoomText()
selIdx++; selIdx++;
TQString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) ); TQString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) );
localValue.remove( KGlobal::locale()->decimalSymbol() + double_oh ); localValue.remove( KGlobal::locale()->decimalSymbol() + double_oh );
translated << TQString( "%1%" ).tqarg( localValue ); translated << TQString( "%1%" ).arg( localValue );
} }
d->aZoom->setItems( translated ); d->aZoom->setItems( translated );
@ -1619,8 +1619,8 @@ void PageView::updateCursor( const TQPoint &p )
PageViewItem * pageItem = pickItemOnPoint( p.x(), p.y() ); PageViewItem * pageItem = pickItemOnPoint( p.x(), p.y() );
if ( pageItem && d->mouseMode == MouseNormal ) if ( pageItem && d->mouseMode == MouseNormal )
{ {
double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(),
nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height();
// if over a ObjectRect (of type Link) change cursor to hand // if over a ObjectRect (of type Link) change cursor to hand
d->mouseOnRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); d->mouseOnRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY );
@ -1643,7 +1643,7 @@ void PageView::doTypeAheadSearch()
bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, false, false, bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, false, false,
KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true );
TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\".");
d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), d->messageWindow->display( status.arg(d->typeAheadString.lower()),
found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 );
d->findTimeoutTimer->start( 3000, true ); d->findTimeoutTimer->start( 3000, true );
} }
@ -1677,7 +1677,7 @@ void PageView::slotRelayoutPages()
fullHeight = 0; fullHeight = 0;
TQRect viewportRect( contentsX(), contentsY(), viewportWidth, viewportHeight ); TQRect viewportRect( contentsX(), contentsY(), viewportWidth, viewportHeight );
// set all items tqgeometry and resize contents. handle 'continuous' and 'single' modes separately // set all items geometry and resize contents. handle 'continuous' and 'single' modes separately
if ( KpdfSettings::viewContinuous() ) if ( KpdfSettings::viewContinuous() )
{ {
// Here we find out column's width and row's height to compute a table // Here we find out column's width and row's height to compute a table
@ -1816,11 +1816,11 @@ void PageView::slotRelayoutPages()
{ {
int prevX = contentsX(), int prevX = contentsX(),
prevY = contentsY(); prevY = contentsY();
const TQRect & tqgeometry = d->items[ vp.pageNumber ]->tqgeometry(); const TQRect & geometry = d->items[ vp.pageNumber ]->geometry();
double nX = vp.rePos.enabled ? vp.rePos.normalizedX : 0.5, double nX = vp.rePos.enabled ? vp.rePos.normalizedX : 0.5,
nY = vp.rePos.enabled ? vp.rePos.normalizedY : 0.0; nY = vp.rePos.enabled ? vp.rePos.normalizedY : 0.0;
center( tqgeometry.left() + ROUND( nX * (double)tqgeometry.width() ), center( geometry.left() + ROUND( nX * (double)geometry.width() ),
tqgeometry.top() + ROUND( nY * (double)tqgeometry.height() ) ); geometry.top() + ROUND( nY * (double)geometry.height() ) );
// center() usually moves the viewport, that requests pixmaps too. // center() usually moves the viewport, that requests pixmaps too.
// if that doesn't happen we have to request them by hand // if that doesn't happen we have to request them by hand
if ( prevX == contentsX() && prevY == contentsY() ) if ( prevX == contentsX() && prevY == contentsY() )
@ -1867,7 +1867,7 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop )
PageViewItem * i = *iIt; PageViewItem * i = *iIt;
// if the item doesn't intersect the viewport, skip it // if the item doesn't intersect the viewport, skip it
if ( !viewportRect.intersects( i->tqgeometry() ) ) if ( !viewportRect.intersects( i->geometry() ) )
continue; continue;
// add the item to the 'visible list' // add the item to the 'visible list'
@ -1885,18 +1885,18 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop )
// position between the item and the viewport center // position between the item and the viewport center
if ( isEvent ) if ( isEvent )
{ {
const TQRect & tqgeometry = i->tqgeometry(); const TQRect & geometry = i->geometry();
// compute distance between item center and viewport center // compute distance between item center and viewport center
double distance = hypot( (tqgeometry.left() + tqgeometry.right()) / 2 - viewportCenterX, double distance = hypot( (geometry.left() + geometry.right()) / 2 - viewportCenterX,
(tqgeometry.top() + tqgeometry.bottom()) / 2 - viewportCenterY ); (geometry.top() + geometry.bottom()) / 2 - viewportCenterY );
if ( distance >= minDistance && nearPageNumber != -1 ) if ( distance >= minDistance && nearPageNumber != -1 )
continue; continue;
nearPageNumber = i->pageNumber(); nearPageNumber = i->pageNumber();
minDistance = distance; minDistance = distance;
if ( tqgeometry.height() > 0 && tqgeometry.width() > 0 ) if ( geometry.height() > 0 && geometry.width() > 0 )
{ {
focusedX = ( viewportCenterX - (double)tqgeometry.left() ) / (double)tqgeometry.width(); focusedX = ( viewportCenterX - (double)geometry.left() ) / (double)geometry.width();
focusedY = ( viewportCenterY - (double)tqgeometry.top() ) / (double)tqgeometry.height(); focusedY = ( viewportCenterY - (double)geometry.top() ) / (double)geometry.height();
} }
} }
} }

@ -54,7 +54,7 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration
iconXOffset = 0, iconXOffset = 0,
shadowOffset = 1; shadowOffset = 1;
// load icon (if set) and update tqgeometry // load icon (if set) and update geometry
TQPixmap symbol; TQPixmap symbol;
if ( icon != None ) if ( icon != None )
{ {
@ -84,33 +84,33 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration
width += 2 + symbol.width(); width += 2 + symbol.width();
height = TQMAX( height, symbol.height() ); height = TQMAX( height, symbol.height() );
} }
TQRect tqgeometry( 0, 0, width + 10, height + 8 ); TQRect geometry( 0, 0, width + 10, height + 8 );
// resize pixmap, mask and widget // resize pixmap, mask and widget
static TQBitmap mask; static TQBitmap mask;
mask.resize( tqgeometry.size() ); mask.resize( geometry.size() );
m_pixmap.resize( tqgeometry.size() ); m_pixmap.resize( geometry.size() );
resize( tqgeometry.size() ); resize( geometry.size() );
// create and set transparency mask // create and set transparency mask
TQPainter maskPainter( &mask); TQPainter maskPainter( &mask);
mask.fill( TQt::black ); mask.fill( TQt::black );
maskPainter.setBrush( TQt::white ); maskPainter.setBrush( TQt::white );
maskPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); maskPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() );
setMask( mask ); setMask( mask );
// draw background // draw background
TQPainter bufferPainter( &m_pixmap ); TQPainter bufferPainter( &m_pixmap );
bufferPainter.setPen( TQt::black ); bufferPainter.setPen( TQt::black );
bufferPainter.setBrush( paletteBackgroundColor() ); bufferPainter.setBrush( paletteBackgroundColor() );
bufferPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); bufferPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() );
// draw icon if present // draw icon if present
if ( !symbol.isNull() ) if ( !symbol.isNull() )
bufferPainter.drawPixmap( 5 + iconXOffset, 4, symbol, 0, 0, symbol.width(), symbol.height() ); bufferPainter.drawPixmap( 5 + iconXOffset, 4, symbol, 0, 0, symbol.width(), symbol.height() );
// draw shadow and text // draw shadow and text
int yText = tqgeometry.height() - height / 2; int yText = geometry.height() - height / 2;
bufferPainter.setPen( paletteBackgroundColor().dark( 115 ) ); bufferPainter.setPen( paletteBackgroundColor().dark( 115 ) );
bufferPainter.drawText( 5 + textXOffset + shadowOffset, yText + 1, message ); bufferPainter.drawText( 5 + textXOffset + shadowOffset, yText + 1, message );
bufferPainter.setPen( foregroundColor() ); bufferPainter.setPen( foregroundColor() );
@ -119,9 +119,9 @@ 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( parentWidget()->width() - tqgeometry.width() - 10, 10 ); move( parentWidget()->width() - geometry.width() - 10, 10 );
// show widget and schedule a tqrepaint // show widget and schedule a repaint
show(); show();
update(); update();
@ -168,19 +168,19 @@ int PageViewItem::pageNumber() const
return m_page->number(); return m_page->number();
} }
const TQRect& PageViewItem::tqgeometry() const const TQRect& PageViewItem::geometry() const
{ {
return m_tqgeometry; return m_geometry;
} }
int PageViewItem::width() const int PageViewItem::width() const
{ {
return m_tqgeometry.width(); return m_geometry.width();
} }
int PageViewItem::height() const int PageViewItem::height() const
{ {
return m_tqgeometry.height(); return m_geometry.height();
} }
double PageViewItem::zoomFactor() const double PageViewItem::zoomFactor() const
@ -190,18 +190,18 @@ double PageViewItem::zoomFactor() const
void PageViewItem::setGeometry( int x, int y, int width, int height ) void PageViewItem::setGeometry( int x, int y, int width, int height )
{ {
m_tqgeometry.setRect( x, y, width, height ); m_geometry.setRect( x, y, width, height );
} }
void PageViewItem::setWHZ( int w, int h, double z ) void PageViewItem::setWHZ( int w, int h, double z )
{ {
m_tqgeometry.setWidth( w ); m_geometry.setWidth( w );
m_tqgeometry.setHeight( h ); m_geometry.setHeight( h );
m_zoomFactor = z; m_zoomFactor = z;
} }
void PageViewItem::moveTo( int x, int y ) void PageViewItem::moveTo( int x, int y )
{ {
m_tqgeometry.moveLeft( x ); m_geometry.moveLeft( x );
m_tqgeometry.moveTop( y ); m_geometry.moveTop( y );
} }

@ -23,7 +23,7 @@ class KPDFPage;
/** /**
* @short PageViewItem represents graphically a kpdfpage into the PageView. * @short PageViewItem represents graphically a kpdfpage into the PageView.
* *
* It has methods for settings Item's tqgeometry and other visual properties such * It has methods for settings Item's geometry and other visual properties such
* as the individual zoom factor. * as the individual zoom factor.
*/ */
class PageViewItem class PageViewItem
@ -33,7 +33,7 @@ class PageViewItem
const KPDFPage * page() const; const KPDFPage * page() const;
int pageNumber() const; int pageNumber() const;
const TQRect& tqgeometry() const; const TQRect& geometry() const;
int width() const; int width() const;
int height() const; int height() const;
double zoomFactor() const; double zoomFactor() const;
@ -45,7 +45,7 @@ class PageViewItem
private: private:
const KPDFPage * m_page; const KPDFPage * m_page;
double m_zoomFactor; double m_zoomFactor;
TQRect m_tqgeometry; TQRect m_geometry;
}; };

@ -43,12 +43,12 @@
#define ENABLE_PROGRESS_OVERLAY #define ENABLE_PROGRESS_OVERLAY
// a frame contains a pointer to the page object, its tqgeometry and the // a frame contains a pointer to the page object, its geometry and the
// transition effect to the next frame // transition effect to the next frame
struct PresentationFrame struct PresentationFrame
{ {
const KPDFPage * page; const KPDFPage * page;
TQRect tqgeometry; TQRect geometry;
}; };
@ -56,7 +56,7 @@ PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc )
: TQDialog( parent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder), : TQDialog( parent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder),
m_pressedLink( 0 ), m_handCursor( false ), m_document( doc ), m_frameIndex( -1 ) m_pressedLink( 0 ), m_handCursor( false ), m_document( doc ), m_frameIndex( -1 )
{ {
// set look and tqgeometry // set look and geometry
setBackgroundMode( TQt::NoBackground ); setBackgroundMode( TQt::NoBackground );
m_width = -1; m_width = -1;
@ -124,7 +124,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe
{ {
PresentationFrame * frame = new PresentationFrame(); PresentationFrame * frame = new PresentationFrame();
frame->page = *setIt; frame->page = *setIt;
// calculate frame tqgeometry keeping constant aspect ratio // calculate frame geometry keeping constant aspect ratio
float pageRatio = frame->page->ratio(); float pageRatio = frame->page->ratio();
int pageWidth = m_width, int pageWidth = m_width,
pageHeight = m_height; pageHeight = m_height;
@ -132,7 +132,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe
pageWidth = (int)( (float)pageHeight / pageRatio ); pageWidth = (int)( (float)pageHeight / pageRatio );
else else
pageHeight = (int)( (float)pageWidth * pageRatio ); pageHeight = (int)( (float)pageWidth * pageRatio );
frame->tqgeometry.setRect( (m_width - pageWidth) / 2, frame->geometry.setRect( (m_width - pageWidth) / 2,
(m_height - pageHeight) / 2, (m_height - pageHeight) / 2,
pageWidth, pageHeight ); pageWidth, pageHeight );
// add the frame to the vector // add the frame to the vector
@ -145,11 +145,11 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe
if ( info ) if ( info )
{ {
if ( !info->get( "title" ).isNull() ) if ( !info->get( "title" ).isNull() )
m_metaStrings += i18n( "Title: %1" ).tqarg( info->get( "title" ) ); m_metaStrings += i18n( "Title: %1" ).arg( info->get( "title" ) );
if ( !info->get( "author" ).isNull() ) if ( !info->get( "author" ).isNull() )
m_metaStrings += i18n( "Author: %1" ).tqarg( info->get( "author" ) ); m_metaStrings += i18n( "Author: %1" ).arg( info->get( "author" ) );
} }
m_metaStrings += i18n( "Pages: %1" ).tqarg( m_document->pages() ); m_metaStrings += i18n( "Pages: %1" ).arg( m_document->pages() );
m_metaStrings += i18n( "Click to begin" ); m_metaStrings += i18n( "Click to begin" );
} }
@ -287,9 +287,9 @@ void PresentationWidget::mouseMoveEvent( TQMouseEvent * e )
else else
{ {
// show the bar if reaching top 2 pixels // show the bar if reaching top 2 pixels
if ( e->y() <= (tqgeometry().top() + 1) ) if ( e->y() <= (geometry().top() + 1) )
m_topBar->show(); m_topBar->show();
// handle "dragging the wheel" if clicking on its tqgeometry // handle "dragging the wheel" if clicking on its geometry
else if ( e->state() == Qt::LeftButton && m_overlayGeometry.contains( e->pos() ) ) else if ( e->state() == Qt::LeftButton && m_overlayGeometry.contains( e->pos() ) )
overlayClick( e->pos() ); overlayClick( e->pos() );
} }
@ -330,12 +330,12 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe )
} }
// check painting rect consistancy // check painting rect consistancy
TQRect r = pe->rect().intersect( tqgeometry() ); TQRect r = pe->rect().intersect( geometry() );
if ( r.isNull() || m_lastRenderedPixmap.isNull() ) if ( r.isNull() || m_lastRenderedPixmap.isNull() )
return; return;
// blit the pixmap to the screen // blit the pixmap to the screen
TQMemArray<TQRect> allRects = TQRegion(pe->region()).tqrects(); TQMemArray<TQRect> allRects = TQRegion(pe->region()).rects();
uint numRects = allRects.count(); uint numRects = allRects.count();
for ( uint i = 0; i < numRects; i++ ) for ( uint i = 0; i < numRects; i++ )
{ {
@ -370,18 +370,18 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe )
// </widget events> // </widget events>
const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * tqgeometry ) const const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) const
{ {
// no links on invalid pages // no links on invalid pages
if ( tqgeometry && !tqgeometry->isNull() ) if ( geometry && !geometry->isNull() )
tqgeometry->setRect( 0, 0, -1, -1 ); geometry->setRect( 0, 0, -1, -1 );
if ( m_frameIndex < 0 || m_frameIndex >= (int)m_frames.size() ) if ( m_frameIndex < 0 || m_frameIndex >= (int)m_frames.size() )
return 0; return 0;
// get frame, page and tqgeometry // get frame, page and geometry
const PresentationFrame * frame = m_frames[ m_frameIndex ]; const PresentationFrame * frame = m_frames[ m_frameIndex ];
const KPDFPage * page = frame->page; const KPDFPage * page = frame->page;
const TQRect & frameGeometry = frame->tqgeometry; const TQRect & frameGeometry = frame->geometry;
// compute normalized x and y // compute normalized x and y
double nx = (double)(x - frameGeometry.left()) / (double)frameGeometry.width(); double nx = (double)(x - frameGeometry.left()) / (double)frameGeometry.width();
@ -396,11 +396,11 @@ const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * tqgeometry
if ( !object ) if ( !object )
return 0; return 0;
// compute link tqgeometry if destination rect present // compute link geometry if destination rect present
if ( tqgeometry ) if ( geometry )
{ {
*tqgeometry = object->tqgeometry( frameGeometry.width(), frameGeometry.height() ); *geometry = object->geometry( frameGeometry.width(), frameGeometry.height() );
tqgeometry->moveBy( frameGeometry.left(), frameGeometry.top() ); geometry->moveBy( frameGeometry.left(), frameGeometry.top() );
} }
// return the link pointer // return the link pointer
@ -416,7 +416,7 @@ void PresentationWidget::testCursorOnLink( int x, int y )
// only react on changes (in/out from a link) // only react on changes (in/out from a link)
if ( (link && !m_handCursor) || (!link && m_handCursor) ) if ( (link && !m_handCursor) || (!link && m_handCursor) )
{ {
// change cursor tqshape // change cursor shape
m_handCursor = link != 0; m_handCursor = link != 0;
setCursor( m_handCursor ? KCursor::handCursor() : KCursor::arrowCursor()); setCursor( m_handCursor ? KCursor::handCursor() : KCursor::arrowCursor());
@ -451,8 +451,8 @@ void PresentationWidget::changePage( int newPage )
// check if pixmap exists or else request it // check if pixmap exists or else request it
m_frameIndex = newPage; m_frameIndex = newPage;
PresentationFrame * frame = m_frames[ m_frameIndex ]; PresentationFrame * frame = m_frames[ m_frameIndex ];
int pixW = frame->tqgeometry.width(); int pixW = frame->geometry.width();
int pixH = frame->tqgeometry.height(); int pixH = frame->geometry.height();
// if pixmap not inside the KPDFPage we request it and wait for // if pixmap not inside the KPDFPage we request it and wait for
// notifyPixmapChanged call or else we can proceed to pixmap generation // notifyPixmapChanged call or else we can proceed to pixmap generation
@ -470,16 +470,16 @@ void PresentationWidget::changePage( int newPage )
if (newPage + 1 < (int)m_document->pages()) if (newPage + 1 < (int)m_document->pages())
{ {
PresentationFrame *nextFrame = m_frames[ newPage + 1 ]; PresentationFrame *nextFrame = m_frames[ newPage + 1 ];
pixW = nextFrame->tqgeometry.width(); pixW = nextFrame->geometry.width();
pixH = nextFrame->tqgeometry.height(); pixH = nextFrame->geometry.height();
if ( !nextFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) if ( !nextFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) )
requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage + 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage + 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) );
} }
if (newPage - 1 >= 0) if (newPage - 1 >= 0)
{ {
PresentationFrame *prevFrame = m_frames[ newPage - 1 ]; PresentationFrame *prevFrame = m_frames[ newPage - 1 ];
pixW = prevFrame->tqgeometry.width(); pixW = prevFrame->geometry.width();
pixH = prevFrame->tqgeometry.height(); pixH = prevFrame->geometry.height();
if ( !prevFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) if ( !prevFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) )
requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage - 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage - 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) );
} }
@ -595,7 +595,7 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p )
PresentationFrame * frame = m_frames[ pageNum ]; PresentationFrame * frame = m_frames[ pageNum ];
// translate painter and contents rect // translate painter and contents rect
TQRect geom( frame->tqgeometry ); TQRect geom( frame->geometry );
p.translate( geom.left(), geom.top() ); p.translate( geom.left(), geom.top() );
geom.moveBy( -geom.left(), -geom.top() ); geom.moveBy( -geom.left(), -geom.top() );
@ -605,11 +605,11 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p )
&p, geom, geom.width(), geom.height() ); &p, geom, geom.width(), geom.height() );
// restore painter // restore painter
p.translate( -frame->tqgeometry.left(), -frame->tqgeometry.top() ); p.translate( -frame->geometry.left(), -frame->geometry.top() );
// fill unpainted areas with background color // fill unpainted areas with background color
TQRegion unpainted( TQRect( 0, 0, m_width, m_height ) ); TQRegion unpainted( TQRect( 0, 0, m_width, m_height ) );
TQMemArray<TQRect> rects = TQRegion(unpainted.subtract( frame->tqgeometry )).tqrects(); TQMemArray<TQRect> rects = TQRegion(unpainted.subtract( frame->geometry )).rects();
for ( uint i = 0; i < rects.count(); i++ ) for ( uint i = 0; i < rects.count(); i++ )
{ {
const TQRect & r = rects[i]; const TQRect & r = rects[i];
@ -622,7 +622,7 @@ inline int qt_div255(int x) { return (x + (x>>8) + 0x80) >> 8; }
void PresentationWidget::generateOverlay() void PresentationWidget::generateOverlay()
{ {
#ifdef ENABLE_PROGRESS_OVERLAY #ifdef ENABLE_PROGRESS_OVERLAY
// calculate overlay tqgeometry and resize pixmap if needed // calculate overlay geometry and resize pixmap if needed
int side = m_width / 16; int side = m_width / 16;
m_overlayGeometry.setRect( m_width - side - 4, 4, side, side ); m_overlayGeometry.setRect( m_width - side - 4, 4, side, side );
if ( m_lastRenderedOverlay.width() != side ) if ( m_lastRenderedOverlay.width() != side )
@ -725,7 +725,7 @@ void PresentationWidget::generateOverlay()
m_lastRenderedOverlay.convertFromImage( image ); m_lastRenderedOverlay.convertFromImage( image );
// start the autohide timer // start the autohide timer
tqrepaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line repaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line
//update( m_overlayGeometry ); //update( m_overlayGeometry );
m_overlayHideTimer->start( 2500, true ); m_overlayHideTimer->start( 2500, true );
#endif #endif
@ -963,7 +963,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const
/** ONLY the TRANSITIONS GENERATION function from here on **/ /** ONLY the TRANSITIONS GENERATION function from here on **/
void PresentationWidget::initTransition( const KPDFPageTransition *transition ) void PresentationWidget::initTransition( const KPDFPageTransition *transition )
{ {
// if it's just a 'replace' transition, tqrepaint the screen // if it's just a 'replace' transition, repaint the screen
if ( transition->type() == KPDFPageTransition::Replace ) if ( transition->type() == KPDFPageTransition::Replace )
{ {
update(); update();
@ -971,7 +971,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
} }
const bool isInward = transition->direction() == KPDFPageTransition::Inward; const bool isInward = transition->direction() == KPDFPageTransition::Inward;
const bool isHorizontal = transition->tqalignment() == KPDFPageTransition::Horizontal; const bool isHorizontal = transition->alignment() == KPDFPageTransition::Horizontal;
const float totalTime = transition->duration(); const float totalTime = transition->duration();
m_transitionRects.clear(); m_transitionRects.clear();

@ -60,7 +60,7 @@ class PresentationWidget : public TQDialog, public DocumentObserver
void paintEvent( TQPaintEvent * e ); void paintEvent( TQPaintEvent * e );
private: private:
const KPDFLink * getLink( int x, int y, TQRect * tqgeometry = 0 ) const; const KPDFLink * getLink( int x, int y, TQRect * geometry = 0 ) const;
void testCursorOnLink( int x, int y ); void testCursorOnLink( int x, int y );
void overlayClick( const TQPoint & position ); void overlayClick( const TQPoint & position );
void changePage( int newPage ); void changePage( int newPage );

@ -35,7 +35,7 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc)
// mime name based on mimetype id // mime name based on mimetype id
TQString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper(); TQString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper();
setCaption( i18n("%1 Properties").tqarg( mimeName ) ); setCaption( i18n("%1 Properties").arg( mimeName ) );
TQDomElement docElement = info->documentElement(); TQDomElement docElement = info->documentElement();
@ -50,7 +50,7 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc)
continue; continue;
// create labels and tqlayout them // create labels and tqlayout them
TQLabel *key = new TQLabel( i18n( "%1:" ).tqarg( titleString ), page ); TQLabel *key = new TQLabel( i18n( "%1:" ).arg( titleString ), page );
TQLabel *value = new KSqueezedTextLabel( valueString, page ); TQLabel *value = new KSqueezedTextLabel( valueString, page );
tqlayout->addWidget( key, row, 0, AlignRight ); tqlayout->addWidget( key, row, 0, AlignRight );
tqlayout->addWidget( value, row, 1 ); tqlayout->addWidget( value, row, 1 );

@ -199,7 +199,7 @@ void ThumbnailList::notifyPageChanged( int pageNumber, int /*changedFlags*/ )
//if ( !(changedFlags & DocumentObserver::Pixmap) ) //if ( !(changedFlags & DocumentObserver::Pixmap) )
// return; // return;
// iterate over visible items: if page(pageNumber) is one of them, tqrepaint it // iterate over visible items: if page(pageNumber) is one of them, repaint it
TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end(); TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
for ( ; vIt != vEnd; ++vIt ) for ( ; vIt != vEnd; ++vIt )
if ( (*vIt)->pageNumber() == pageNumber ) if ( (*vIt)->pageNumber() == pageNumber )
@ -362,7 +362,7 @@ void ThumbnailList::viewportResizeEvent( TQResizeEvent * e )
else if ( e->size().height() <= e->oldSize().height() ) else if ( e->size().height() <= e->oldSize().height() )
return; return;
// tqinvalidate the bookmark overlay // invalidate the bookmark overlay
if ( m_bookmarkOverlay ) if ( m_bookmarkOverlay )
{ {
delete m_bookmarkOverlay; delete m_bookmarkOverlay;

@ -27,7 +27,7 @@
#include <klocale.h> #include <klocale.h>
PMAddCommand::PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after ) PMAddCommand::PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after )
: PMCommand( i18n( "Add New %1" ).tqarg( obj->description( ) ) ) : PMCommand( i18n( "Add New %1" ).arg( obj->description( ) ) )
{ {
m_objects.append( obj ); m_objects.append( obj );
m_pParent = parent; m_pParent = parent;

@ -48,10 +48,10 @@ public:
/** /**
* Command that adds a list of new PMObjects. * Command that adds a list of new PMObjects.
* *
* The object in the list will be inserted as tqchildren of parent after * The object in the list will be inserted as children of parent after
* the object after. * the object after.
* *
* If after is 0, the objects will be inserted as first tqchildren. * If after is 0, the objects will be inserted as first children.
*/ */
PMAddCommand( const PMObjectList& list, PMObject* parent, PMObject* after ); PMAddCommand( const PMObjectList& list, PMObject* parent, PMObject* after );
/** /**

@ -177,10 +177,10 @@ void PMBicubicPatch::serialize( TQDomElement& e, TQDomDocument& doc ) const
e.setAttribute( "uvEnabled", m_uvEnabled ); e.setAttribute( "uvEnabled", m_uvEnabled );
for( i = 0; i < 16; i++ ) for( i = 0; i < 16; i++ )
e.setAttribute( TQString( "cp%1" ).tqarg( i ), m_point[i].serializeXML( ) ); e.setAttribute( TQString( "cp%1" ).arg( i ), m_point[i].serializeXML( ) );
for( i = 0; i < 4; ++i ) for( i = 0; i < 4; ++i )
e.setAttribute( TQString( "uv%1" ).tqarg( i ), m_uvVectors[i].serializeXML( ) ); e.setAttribute( TQString( "uv%1" ).arg( i ), m_uvVectors[i].serializeXML( ) );
Base::serialize( e, doc ); Base::serialize( e, doc );
} }
@ -198,7 +198,7 @@ void PMBicubicPatch::readAttributes( const PMXMLHelper& h )
for( v = 0; v < 4; v++ ) for( v = 0; v < 4; v++ )
for( u = 0; u < 4; u++ ) for( u = 0; u < 4; u++ )
m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).tqarg( u+v*4 ), m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).arg( u+v*4 ),
PMVector( o + s * u, 0, o + s * v ) ); PMVector( o + s * u, 0, o + s * v ) );
m_uvVectors[0] = h.vectorAttribute( "uv0", c_defaultUVVector0 ); m_uvVectors[0] = h.vectorAttribute( "uv0", c_defaultUVVector0 );
@ -527,7 +527,7 @@ void PMBicubicPatch::controlPoints( PMControlPointList& list )
for( v = 0; v < 4; v++ ) for( v = 0; v < 4; v++ )
for( u = 0; u < 4; u++ ) for( u = 0; u < 4; u++ )
list.append( new PM3DControlPoint( m_point[u+v*4], u+v*4, list.append( new PM3DControlPoint( m_point[u+v*4], u+v*4,
i18n( "Point (%1, %2)" ).tqarg( u ).tqarg( v ) ) ); i18n( "Point (%1, %2)" ).arg( u ).arg( v ) ) );
} }
void PMBicubicPatch::controlPointsChanged( PMControlPointList& list ) void PMBicubicPatch::controlPointsChanged( PMControlPointList& list )

@ -118,21 +118,21 @@ bool PMColorSettings::validateData( )
void PMColorSettings::applySettings( ) void PMColorSettings::applySettings( )
{ {
bool tqrepaint = false; bool repaint = false;
int i; int i;
PMRenderManager* rm = PMRenderManager::theManager( ); PMRenderManager* rm = PMRenderManager::theManager( );
if( rm->backgroundColor( ) != m_pBackgroundColor->color( ) ) if( rm->backgroundColor( ) != m_pBackgroundColor->color( ) )
{ {
rm->setBackgroundColor( m_pBackgroundColor->color( ) ); rm->setBackgroundColor( m_pBackgroundColor->color( ) );
tqrepaint = true; repaint = true;
} }
for( i = 0; i < 2; i++ ) for( i = 0; i < 2; i++ )
{ {
if( rm->graphicalObjectColor( i ) != m_pGraphicalObjectsColor[i]->color( ) ) if( rm->graphicalObjectColor( i ) != m_pGraphicalObjectsColor[i]->color( ) )
{ {
rm->setGraphicalObjectColor( i, m_pGraphicalObjectsColor[i]->color( ) ); rm->setGraphicalObjectColor( i, m_pGraphicalObjectsColor[i]->color( ) );
tqrepaint = true; repaint = true;
} }
} }
for( i = 0; i < 2; i++ ) for( i = 0; i < 2; i++ )
@ -140,7 +140,7 @@ void PMColorSettings::applySettings( )
if( rm->controlPointColor( i ) != m_pControlPointsColor[i]->color( ) ) if( rm->controlPointColor( i ) != m_pControlPointsColor[i]->color( ) )
{ {
rm->setControlPointColor( i, m_pControlPointsColor[i]->color( ) ); rm->setControlPointColor( i, m_pControlPointsColor[i]->color( ) );
tqrepaint = true; repaint = true;
} }
} }
for( i = 0; i < 3; i++ ) for( i = 0; i < 3; i++ )
@ -148,15 +148,15 @@ void PMColorSettings::applySettings( )
if( rm->axesColor( i ) != m_pAxesColor[i]->color( ) ) if( rm->axesColor( i ) != m_pAxesColor[i]->color( ) )
{ {
rm->setAxesColor( i, m_pAxesColor[i]->color( ) ); rm->setAxesColor( i, m_pAxesColor[i]->color( ) );
tqrepaint = true; repaint = true;
} }
} }
if( rm->fieldOfViewColor( ) != m_pFieldOfViewColor->color( ) ) if( rm->fieldOfViewColor( ) != m_pFieldOfViewColor->color( ) )
{ {
rm->setFieldOfViewColor( m_pFieldOfViewColor->color( ) ); rm->setFieldOfViewColor( m_pFieldOfViewColor->color( ) );
tqrepaint = true; repaint = true;
} }
if( tqrepaint ) if( repaint )
emit repaintViews( ); emit repaintViews( );
} }

@ -42,8 +42,8 @@ class PMPart;
* PMCRemove: An object was removed. A signal with this constant has * PMCRemove: An object was removed. A signal with this constant has
* to be emitted _before_ the object is removed. * to be emitted _before_ the object is removed.
* *
* PMCChildren: Some tqchildren are added or removed. Do not use. Use PMCAdd and * PMCChildren: Some children are added or removed. Do not use. Use PMCAdd and
* PMCRemove for all tqchildrens. * PMCRemove for all childrens.
* *
* PMCData: Data (for dialog views) is changed * PMCData: Data (for dialog views) is changed
* *

@ -44,7 +44,7 @@ public:
*/ */
PMCompositeObject( const PMCompositeObject& o ); PMCompositeObject( const PMCompositeObject& o );
/** /**
* Deletes the object and all tqchildren. * Deletes the object and all children.
*/ */
virtual ~PMCompositeObject( ); virtual ~PMCompositeObject( );
@ -96,7 +96,7 @@ public:
*/ */
virtual bool appendChild( PMObject* ); virtual bool appendChild( PMObject* );
/** /**
* Returns the number of tqchildren. * Returns the number of children.
*/ */
virtual int countChildren( ) const; virtual int countChildren( ) const;
/** /**

@ -28,7 +28,7 @@ PMDataChangeCommand::PMDataChangeCommand( PMMemento* memento )
TQString text = memento->originator( )->name( ); TQString text = memento->originator( )->name( );
if( text.isEmpty( ) ) if( text.isEmpty( ) )
text = memento->originator( )->description( ); text = memento->originator( )->description( );
setText( i18n( "Change %1" ).tqarg( text ) ); setText( i18n( "Change %1" ).arg( text ) );
// the data is already changed when the command is created // the data is already changed when the command is created
m_executed = true; m_executed = true;

@ -44,7 +44,7 @@ PMDeclare::PMDeclare( const PMDeclare& d )
{ {
m_id = d.m_id; // CAUTION! Duplication of the id which has to be unique m_id = d.m_id; // CAUTION! Duplication of the id which has to be unique
m_pDeclareType = 0; // will be set automatically in the m_pDeclareType = 0; // will be set automatically in the
// base constuctor when the tqchildren are copied // base constuctor when the children are copied
} }
PMMetaObject* PMDeclare::metaObject( ) const PMMetaObject* PMDeclare::metaObject( ) const

@ -27,7 +27,7 @@
#include <tqptrdict.h> #include <tqptrdict.h>
PMDeleteCommand::PMDeleteCommand( PMObject* obj ) PMDeleteCommand::PMDeleteCommand( PMObject* obj )
: PMCommand( i18n( "Delete %1" ).tqarg( obj->name( ) ) ) : PMCommand( i18n( "Delete %1" ).arg( obj->name( ) ) )
{ {
// the scene can not be deleted! // the scene can not be deleted!
if( obj->parent( ) ) if( obj->parent( ) )
@ -256,7 +256,7 @@ int PMDeleteCommand::errorFlags( PMPart* )
{ {
m_errors.prepend( i18n( "The declare \"%1\" can't be removed " m_errors.prepend( i18n( "The declare \"%1\" can't be removed "
"because of some remaining links." ) "because of some remaining links." )
.tqarg( decl->id( ) ) ); .arg( decl->id( ) ) );
PMDeleteInfo* tmp = info; PMDeleteInfo* tmp = info;
info = m_infoList.prev( ); info = m_infoList.prev( );

@ -451,17 +451,17 @@ void PMDialogEditBase::slotTexturePreview( )
str << "union {\n"; str << "union {\n";
if( s_showBox ) if( s_showBox )
{ {
str << c_boxCode.tqarg( numObjects ); str << c_boxCode.arg( numObjects );
numObjects++; numObjects++;
} }
if( s_showCylinder ) if( s_showCylinder )
{ {
str << c_cylinderCode.tqarg( numObjects ); str << c_cylinderCode.arg( numObjects );
numObjects++; numObjects++;
} }
if( s_showSphere ) if( s_showSphere )
{ {
str << c_sphereCode.tqarg( numObjects ); str << c_sphereCode.arg( numObjects );
numObjects++; numObjects++;
} }
@ -495,18 +495,18 @@ void PMDialogEditBase::slotTexturePreview( )
{ {
c1 = PMColor( s_wallColor1 ); c1 = PMColor( s_wallColor1 );
c2 = PMColor( s_wallColor2 ); c2 = PMColor( s_wallColor2 );
str << c_wallCode.tqarg( c1.serialize( true ) ).tqarg( c2.serialize( true ) ); str << c_wallCode.arg( c1.serialize( true ) ).arg( c2.serialize( true ) );
} }
if( s_showFloor ) if( s_showFloor )
{ {
c1 = PMColor( s_floorColor1 ); c1 = PMColor( s_floorColor1 );
c2 = PMColor( s_floorColor2 ); c2 = PMColor( s_floorColor2 );
str << c_floorCode.tqarg( c1.serialize( true ) ).tqarg( c2.serialize( true ) ); str << c_floorCode.arg( c1.serialize( true ) ).arg( c2.serialize( true ) );
} }
str << c_lightCode; str << c_lightCode;
str << c_cameraCode[numObjects-1]; str << c_cameraCode[numObjects-1];
str << c_globalSettingsCode.tqarg( s_previewGamma ); str << c_globalSettingsCode.arg( s_previewGamma );
// Set the render mode // Set the render mode
mode.setHeight( s_previewSize ); mode.setHeight( s_previewSize );
@ -540,7 +540,7 @@ void PMDialogEditBase::slotPreviewFinished( int exitStatus )
KMessageBox::error( this, i18n( "Povray exited abnormally with " KMessageBox::error( this, i18n( "Povray exited abnormally with "
"exit code %1.\n" "exit code %1.\n"
"See the povray output for details." ) "See the povray output for details." )
.tqarg( exitStatus ) ); .arg( exitStatus ) );
} }
else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) ) else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) )
{ {

@ -154,7 +154,7 @@ PMDockMainWindow::~PMDockMainWindow()
// kparts/dockmainwindow stuff // kparts/dockmainwindow stuff
void PMDockMainWindow::createGUI( Part * part ) void PMDockMainWindow::createGUI( Part * part )
{ {
kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").tqarg(part?part->name():"0L") << endl; kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl;
KXMLGUIFactory *factory = guiFactory(); KXMLGUIFactory *factory = guiFactory();
@ -164,7 +164,7 @@ void PMDockMainWindow::createGUI( Part * part )
if ( d->m_activePart ) if ( d->m_activePart )
{ {
kdDebug(1000) << TQString("deactivating GUI for %1").tqarg(d->m_activePart->name()) << endl; kdDebug(1000) << TQString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl;
GUIActivateEvent ev( false ); GUIActivateEvent ev( false );
TQApplication::sendEvent( d->m_activePart, &ev ); TQApplication::sendEvent( d->m_activePart, &ev );
@ -459,12 +459,12 @@ void PMDockWidgetHeader::setDragEnabled(bool b)
#ifndef NO_KDE2 #ifndef NO_KDE2
void PMDockWidgetHeader::saveConfig( KConfig* c ) void PMDockWidgetHeader::saveConfig( KConfig* c )
{ {
c->writeEntry( TQString("%1%2").tqarg(parent()->name()).tqarg(":stayButton"), stayButton->isOn() ); c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
} }
void PMDockWidgetHeader::loadConfig( KConfig* c ) void PMDockWidgetHeader::loadConfig( KConfig* c )
{ {
setDragEnabled( !c->readBoolEntry( TQString("%1%2").tqarg(parent()->name()).tqarg(":stayButton"), false ) ); setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
} }
#endif #endif
@ -584,7 +584,7 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
} }
if ( s == manager->main ){ if ( s == manager->main ){
setGeometry( TQRect(TQPoint(0,0), manager->main->tqgeometry().size()) ); setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) );
} }
if ( !s ) if ( !s )
@ -829,7 +829,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
if ( !parentDock ){ 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->geometry().size() );
if ( target->isVisibleToTLW() ) newDock->show(); if ( target->isVisibleToTLW() ) newDock->show();
} }
@ -1110,7 +1110,7 @@ void PMDockWidget::setDockTabName( PMDockTabGroup* tab )
tab->parentWidget()->setName( listOfName.utf8() ); tab->parentWidget()->setName( listOfName.utf8() );
tab->parentWidget()->setCaption( listOfCaption ); tab->parentWidget()->setCaption( listOfCaption );
tab->parentWidget()->tqrepaint( false ); // PMDockWidget->tqrepaint tab->parentWidget()->repaint( false ); // PMDockWidget->repaint
if ( tab->parentWidget()->parent() ) if ( tab->parentWidget()->parent() )
if ( tab->parentWidget()->parent()->inherits("PMDockSplitter") ) if ( tab->parentWidget()->parent()->inherits("PMDockSplitter") )
((PMDockSplitter*)(tab->parentWidget()->parent()))->updateName(); ((PMDockSplitter*)(tab->parentWidget()->parent()))->updateName();
@ -1168,13 +1168,13 @@ void PMDockWidget::loseFormerBrotherDockWidget()
TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
this, TQT_SLOT(loseFormerBrotherDockWidget()) ); this, TQT_SLOT(loseFormerBrotherDockWidget()) );
formerBrotherDockWidget = 0L; formerBrotherDockWidget = 0L;
tqrepaint(); repaint();
} }
void PMDockWidget::dockBack() void PMDockWidget::dockBack()
{ {
if( formerBrotherDockWidget) { if( formerBrotherDockWidget) {
// search all tqchildren if it tries to dock back to a child // search all children if it tries to dock back to a child
bool found = false; bool found = false;
TQObjectList* cl = queryList("PMDockWidget"); TQObjectList* cl = queryList("PMDockWidget");
TQObjectListIt it( *cl ); TQObjectListIt it( *cl );
@ -1319,18 +1319,18 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event )
TQMainWindow's tqlayout all over the place TQMainWindow's tqlayout all over the place
The first child of the mainwindow is not necessarily a meaningful The first child of the mainwindow is not necessarily a meaningful
content widget but in TQt3's TQMainWindow it can easily be a TQToolBar. content widget but in TQt3's TQMainWindow it can easily be a TQToolBar.
In short: TQMainWindow knows how to tqlayout its tqchildren, no need to In short: TQMainWindow knows how to tqlayout its children, no need to
mess that up. mess that up.
>>>>>I need this in the PMDockArea at the moment (JoWenn) >>>>>I need this in the PMDockArea at the moment (JoWenn)
if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->tqchildren() ){ if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->children() ){
#ifndef NO_KDE2 #ifndef NO_KDE2
kdDebug()<<"PMDockManager::eventFilter(): main is a PMDockArea and there are tqchildren"<<endl; kdDebug()<<"PMDockManager::eventFilter(): main is a PMDockArea and there are children"<<endl;
#endif #endif
TQWidget* fc = (TQWidget*)main->tqchildren()->getFirst(); TQWidget* fc = (TQWidget*)main->children()->getFirst();
if ( fc ) if ( fc )
fc->setGeometry( TQRect(TQPoint(0,0), main->tqgeometry().size()) ); fc->setGeometry( TQRect(TQPoint(0,0), main->geometry().size()) );
} }
*/ */
@ -1356,7 +1356,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event )
findChildDockWidget( curdw, *childDockWidgetList ); findChildDockWidget( curdw, *childDockWidgetList );
d->oldDragRect = TQRect(); d->oldDragRect = TQRect();
d->dragRect = TQRect(curdw->tqgeometry()); d->dragRect = TQRect(curdw->geometry());
TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p); d->dragRect.moveTopLeft(p);
drawDragRectangle(); drawDragRectangle();
@ -1377,7 +1377,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event )
if (d->readyToDrag) { if (d->readyToDrag) {
d->readyToDrag = false; d->readyToDrag = false;
d->oldDragRect = TQRect(); d->oldDragRect = TQRect();
d->dragRect = TQRect(curdw->tqgeometry()); d->dragRect = TQRect(curdw->geometry());
TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p); d->dragRect.moveTopLeft(p);
drawDragRectangle(); drawDragRectangle();
@ -1398,7 +1398,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event )
break; break;
} else { } else {
if (dropCancel && curdw) { if (dropCancel && curdw) {
d->dragRect = TQRect(curdw->tqgeometry()); d->dragRect = TQRect(curdw->geometry());
TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p); d->dragRect.moveTopLeft(p);
}else }else
@ -1511,7 +1511,7 @@ void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const
while ( it.current() ) { while ( it.current() ) {
if ( it.current()->isWidgetType() ) { if ( it.current()->isWidgetType() ) {
w = (TQWidget*)it.current(); w = (TQWidget*)it.current();
if ( w->isVisible() && w->tqgeometry().contains(pos) ) { if ( w->isVisible() && w->geometry().contains(pos) ) {
if ( w->inherits("PMDockWidget") ) ww = w; if ( w->inherits("PMDockWidget") ) ww = w;
findChildDockWidget( ww, w, w->mapFromParent(pos) ); findChildDockWidget( ww, w, w->mapFromParent(pos) );
return; return;
@ -1811,7 +1811,7 @@ void PMDockManager::writeConfig(TQDomElement &base)
PMDockWidget *obj = getDockWidgetFromName( nList.current() ); PMDockWidget *obj = getDockWidgetFromName( nList.current() );
if (obj->isGroup && (nameList.find( obj->firstName.latin1() ) == -1 if (obj->isGroup && (nameList.find( obj->firstName.latin1() ) == -1
|| nameList.find(obj->lastName.latin1()) == -1)) { || nameList.find(obj->lastName.latin1()) == -1)) {
// Skip until tqchildren are saved (why?) // Skip until children are saved (why?)
nList.next(); nList.next();
if ( !nList.current() ) nList.first(); if ( !nList.current() ) nList.first();
continue; continue;
@ -2039,7 +2039,7 @@ void PMDockManager::writeConfig( KConfig* c, TQString group )
c->writeEntry( cname+":type", "GROUP"); c->writeEntry( cname+":type", "GROUP");
if ( !obj->parent() ){ if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___"); c->writeEntry( cname+":parent", "___null___");
c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible()); c->writeEntry( cname+":visible", obj->isVisible());
} else { } else {
c->writeEntry( cname+":parent", "yes"); c->writeEntry( cname+":parent", "yes");
@ -2070,7 +2070,7 @@ void PMDockManager::writeConfig( KConfig* c, TQString group )
c->writeEntry( cname+":type", "TAB_GROUP"); c->writeEntry( cname+":type", "TAB_GROUP");
if ( !obj->parent() ){ if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___"); c->writeEntry( cname+":parent", "___null___");
c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible()); c->writeEntry( cname+":visible", obj->isVisible());
} else { } else {
c->writeEntry( cname+":parent", "yes"); c->writeEntry( cname+":parent", "yes");
@ -2090,7 +2090,7 @@ void PMDockManager::writeConfig( KConfig* c, TQString group )
/*************************************************************************************************/ /*************************************************************************************************/
if ( !obj->parent() ){ if ( !obj->parent() ){
c->writeEntry( cname+":type", "NULL_DOCK"); c->writeEntry( cname+":type", "NULL_DOCK");
c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible()); c->writeEntry( cname+":visible", obj->isVisible());
} else { } else {
c->writeEntry( cname+":type", "DOCK"); c->writeEntry( cname+":type", "DOCK");
@ -2200,7 +2200,7 @@ void PMDockManager::readConfig( KConfig* c, TQString group )
} }
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){ if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
TQRect r = c->readRectEntry( oname + ":tqgeometry" ); TQRect r = c->readRectEntry( oname + ":geometry" );
obj = getDockWidgetFromName( oname ); obj = getDockWidgetFromName( oname );
obj->applyToWidget( 0L ); obj->applyToWidget( 0L );
obj->setGeometry(r); obj->setGeometry(r);
@ -2481,11 +2481,11 @@ void PMDockArea::resizeEvent(TQResizeEvent *rsize)
delete list; delete list;
#if 0 #if 0
PMDockSplitter *split; PMDockSplitter *split;
// for (unsigned int i=0;i<tqchildren()->count();i++) // for (unsigned int i=0;i<children()->count();i++)
{ {
// TQPtrList<TQObject> list(tqchildren()); // TQPtrList<TQObject> list(children());
// TQObject *obj=((TQPtrList<TQObject*>)tqchildren())->at(i); // TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
TQObject *obj=tqchildren()->getFirst(); TQObject *obj=children()->getFirst();
if (split=dynamic_cast<PMDockSplitter*>(obj)) if (split=dynamic_cast<PMDockSplitter*>(obj))
{ {
split->setGeometry( TQRect(TQPoint(0,0), size() )); split->setGeometry( TQRect(TQPoint(0,0), size() ));

@ -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, parents, internal object names, orientation, * State means here to save the geometry, 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.
* *
@ -1224,7 +1224,7 @@ public:
/** /**
* Constructs a dockmainwindow. It calls its base class constructor and does additional things concerning * Constructs a dockmainwindow. It calls its base class constructor and does additional things concerning
* to the dock stuff: * to the dock stuff:
* @li information about the dock state of this' tqchildren gets initialized * @li information about the dock state of this' children gets initialized
* @li a dockmanager is created... * @li a dockmanager is created...
* @li ...and gets initialized * @li ...and gets initialized
* @li the main dockwidget is set to 0 * @li the main dockwidget is set to 0

@ -183,7 +183,7 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e)
} else { } else {
xpos = factor * checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); xpos = factor * checkValue( mapFromGlobal(mev->globalPos()).y() ) / height();
resizeEvent(0); resizeEvent(0);
divider->tqrepaint(true); divider->repaint(true);
} }
} else { } else {
if (!mOpaqueResize) { if (!mOpaqueResize) {
@ -192,7 +192,7 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e)
} else { } else {
xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width(); xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width();
resizeEvent(0); resizeEvent(0);
divider->tqrepaint(true); divider->repaint(true);
} }
} }
handled= true; handled= true;
@ -204,11 +204,11 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e)
if (orientation ==Qt::Horizontal){ if (orientation ==Qt::Horizontal){
xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height();
resizeEvent(0); resizeEvent(0);
divider->tqrepaint(true); divider->repaint(true);
} else { } else {
xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).x() ) / width(); xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).x() ) / width();
resizeEvent(0); resizeEvent(0);
divider->tqrepaint(true); divider->repaint(true);
} }
handled= true; handled= true;
break; break;
@ -221,7 +221,7 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e)
bool PMDockSplitter::event( TQEvent* e ) bool PMDockSplitter::event( TQEvent* e )
{ {
if ( e->type() == TQEvent::LayoutHint ){ if ( e->type() == TQEvent::LayoutHint ){
// change tqchildren min/max size // change children min/max size
setupMinMaxSize(); setupMinMaxSize();
setSeparatorPos(xpos); setSeparatorPos(xpos);
} }
@ -240,7 +240,7 @@ void PMDockSplitter::updateName()
TQString new_name = TQString( child0->name() ) + "," + child1->name(); TQString new_name = TQString( child0->name() ) + "," + child1->name();
parentWidget()->setName( new_name.latin1() ); parentWidget()->setName( new_name.latin1() );
parentWidget()->setCaption( child0->caption() + "," + child1->caption() ); parentWidget()->setCaption( child0->caption() + "," + child1->caption() );
parentWidget()->tqrepaint( false ); parentWidget()->repaint( false );
((PMDockWidget*)parentWidget())->firstName = child0->name(); ((PMDockWidget*)parentWidget())->firstName = child0->name();
((PMDockWidget*)parentWidget())->lastName = child1->name(); ((PMDockWidget*)parentWidget())->lastName = child1->name();
@ -328,13 +328,13 @@ void PMDockButton_Private::drawButton( TQPainter* p )
void PMDockButton_Private::enterEvent( TQEvent * ) void PMDockButton_Private::enterEvent( TQEvent * )
{ {
moveMouse = true; moveMouse = true;
tqrepaint(); repaint();
} }
void PMDockButton_Private::leaveEvent( TQEvent * ) void PMDockButton_Private::leaveEvent( TQEvent * )
{ {
moveMouse = false; moveMouse = false;
tqrepaint(); repaint();
} }
/*************************************************************************/ /*************************************************************************/

@ -431,7 +431,7 @@ void PMGLView::resizeEvent( TQResizeEvent* )
void PMGLView::paintEvent( TQPaintEvent* ) void PMGLView::paintEvent( TQPaintEvent* )
{ {
tqrepaint( ); repaint( );
} }
void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ ) void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ )
@ -480,7 +480,7 @@ void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ )
recalculateControlPointPosition( ); recalculateControlPointPosition( );
} }
m_projectionUpToDate = false; m_projectionUpToDate = false;
tqrepaint( graphicalChange ); repaint( graphicalChange );
} }
void PMGLView::enableTranslateMode( bool yes ) void PMGLView::enableTranslateMode( bool yes )
@ -900,7 +900,7 @@ void PMGLView::slotAutoScroll( )
if( m_bGraphicalChangeMode ) if( m_bGraphicalChangeMode )
graphicalChange( mapFromGlobal( TQCursor::pos( ) ) ); graphicalChange( mapFromGlobal( TQCursor::pos( ) ) );
else else
tqrepaint( ); repaint( );
m_lastAutoScrollUpdate = now; m_lastAutoScrollUpdate = now;
} }
@ -1118,7 +1118,7 @@ void PMGLView::slotRefresh( )
if( !m_pCamera ) if( !m_pCamera )
setCamera( m_pPart->firstCamera( ) ); setCamera( m_pPart->firstCamera( ) );
tqrepaint( ); repaint( );
} }
void PMGLView::slotClear( ) void PMGLView::slotClear( )
@ -1238,10 +1238,10 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode,
redraw = true; redraw = true;
if( redraw ) if( redraw )
tqrepaint( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(this) ); repaint( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(this) );
} }
void PMGLView::tqrepaint( bool graphicalChange ) void PMGLView::repaint( bool graphicalChange )
{ {
if( isValid( ) ) if( isValid( ) )
{ {
@ -1754,7 +1754,7 @@ TQString PMGLViewFactory::description( PMViewOptions* vo ) const
if( vo && vo->viewType( ) == "glview" ) if( vo && vo->viewType( ) == "glview" )
{ {
PMGLViewOptions* o = ( PMGLViewOptions* ) vo; PMGLViewOptions* o = ( PMGLViewOptions* ) vo;
return i18n( "3D View (%1)" ).tqarg( return i18n( "3D View (%1)" ).arg(
PMGLView::viewTypeAsString( o->glViewType( ) ) ); PMGLView::viewTypeAsString( o->glViewType( ) ) );
} }
return description( ); return description( );

@ -336,7 +336,7 @@ private:
/** /**
* Repaints the view * Repaints the view
*/ */
void tqrepaint( bool graphicalChange = false ); void repaint( bool graphicalChange = false );
/** /**
* Starts a graphical change * Starts a graphical change
*/ */

@ -46,7 +46,7 @@ public:
*/ */
PMGraphicalObject( const PMGraphicalObject& o ); PMGraphicalObject( const PMGraphicalObject& o );
/** /**
* Deletes the object and all tqchildren * Deletes the object and all children
*/ */
virtual ~PMGraphicalObject( ); virtual ~PMGraphicalObject( );

@ -162,7 +162,7 @@ void PMGraphicalObjectEdit::recalculateResultingVisibility( )
absoluteFound = true; absoluteFound = true;
} }
} }
m_pResultingVisibility->setText( TQString( "(%1)" ).tqarg( level ) ); m_pResultingVisibility->setText( TQString( "(%1)" ).arg( level ) );
} }
#include "pmgraphicalobjectedit.moc" #include "pmgraphicalobjectedit.moc"

@ -133,22 +133,22 @@ bool PMGridSettings::validateData( )
void PMGridSettings::applySettings( ) void PMGridSettings::applySettings( )
{ {
bool tqrepaint = false; bool repaint = false;
PMRenderManager* rm = PMRenderManager::theManager( ); PMRenderManager* rm = PMRenderManager::theManager( );
if( rm->gridColor( ) != m_pGridColor->color( ) ) if( rm->gridColor( ) != m_pGridColor->color( ) )
{ {
rm->setGridColor( m_pGridColor->color( ) ); rm->setGridColor( m_pGridColor->color( ) );
tqrepaint = true; repaint = true;
} }
if( rm->gridDistance( ) != m_pGridDistance->value( ) ) if( rm->gridDistance( ) != m_pGridDistance->value( ) )
{ {
rm->setGridDistance( m_pGridDistance->value( ) ); rm->setGridDistance( m_pGridDistance->value( ) );
tqrepaint = true; repaint = true;
} }
PMControlPoint::setMoveGrid( m_pMoveGrid->value( ) ); PMControlPoint::setMoveGrid( m_pMoveGrid->value( ) );
PMControlPoint::setScaleGrid( m_pScaleGrid->value( ) ); PMControlPoint::setScaleGrid( m_pScaleGrid->value( ) );
PMControlPoint::setRotateGrid( m_pRotateGrid->value( ) ); PMControlPoint::setRotateGrid( m_pRotateGrid->value( ) );
if( tqrepaint ) if( repaint )
emit repaintViews( ); emit repaintViews( );
} }

@ -31,7 +31,7 @@ PMInsertErrorDialog::PMInsertErrorDialog(
{ {
TQVBox* page = makeVBoxMainWidget( ); TQVBox* page = makeVBoxMainWidget( );
new TQLabel( i18n( "%1 of %2 objects couldn't be inserted." ) new TQLabel( i18n( "%1 of %2 objects couldn't be inserted." )
.tqarg( numErrors ).tqarg( numObj ), page ); .arg( numErrors ).arg( numObj ), page );
m_pDetailsLabel = new TQLabel( i18n( "Objects not inserted:" ), page ); m_pDetailsLabel = new TQLabel( i18n( "Objects not inserted:" ), page );
m_pDetailsLabel->hide( ); m_pDetailsLabel->hide( );

@ -181,15 +181,15 @@ PMRuleCondition* newCondition( TQDomElement& e,
PMRuleBase::~PMRuleBase( ) PMRuleBase::~PMRuleBase( )
{ {
m_tqchildren.setAutoDelete( true ); m_children.setAutoDelete( true );
m_tqchildren.clear( ); m_children.clear( );
} }
void PMRuleBase::countChild( const TQString& className, bool afterInsertPoint ) void PMRuleBase::countChild( const TQString& className, bool afterInsertPoint )
{ {
countChildProtected( className, afterInsertPoint ); countChildProtected( className, afterInsertPoint );
TQPtrListIterator<PMRuleBase> it( m_tqchildren ); TQPtrListIterator<PMRuleBase> it( m_children );
for( ; it.current( ); ++it ) for( ; it.current( ); ++it )
it.current( )->countChild( className, afterInsertPoint ); it.current( )->countChild( className, afterInsertPoint );
} }
@ -198,7 +198,7 @@ void PMRuleBase::reset( )
{ {
resetProtected( ); resetProtected( );
TQPtrListIterator<PMRuleBase> it( m_tqchildren ); TQPtrListIterator<PMRuleBase> it( m_children );
for( ; it.current( ); ++it ) for( ; it.current( ); ++it )
it.current( )->reset( ); it.current( )->reset( );
} }
@ -302,7 +302,7 @@ PMRuleNot::PMRuleNot( TQDomElement& e,
if( isCondition( me ) ) if( isCondition( me ) )
{ {
m_pChild = newCondition( me, globalGroups, localGroups ); m_pChild = newCondition( me, globalGroups, localGroups );
m_tqchildren.append( m_pChild ); m_children.append( m_pChild );
} }
} }
m = m.nextSibling( ); m = m.nextSibling( );
@ -330,7 +330,7 @@ PMRuleAnd::PMRuleAnd( TQDomElement& e,
if( isCondition( me ) ) if( isCondition( me ) )
{ {
PMRuleCondition* c = newCondition( me, globalGroups, localGroups ); PMRuleCondition* c = newCondition( me, globalGroups, localGroups );
m_tqchildren.append( c ); m_children.append( c );
m_conditions.append( c ); m_conditions.append( c );
} }
} }
@ -361,7 +361,7 @@ PMRuleOr::PMRuleOr( TQDomElement& e,
if( isCondition( me ) ) if( isCondition( me ) )
{ {
PMRuleCondition* c = newCondition( me, globalGroups, localGroups ); PMRuleCondition* c = newCondition( me, globalGroups, localGroups );
m_tqchildren.append( c ); m_children.append( c );
m_conditions.append( c ); m_conditions.append( c );
} }
} }
@ -533,7 +533,7 @@ PMRuleCompare::PMRuleCompare( TQDomElement& e,
if( isValue( me ) ) if( isValue( me ) )
{ {
m_pValue[i] = newValue( me, globalGroups, localGroups ); m_pValue[i] = newValue( me, globalGroups, localGroups );
m_tqchildren.append( m_pValue[i] ); m_children.append( m_pValue[i] );
i++; i++;
} }
} }
@ -745,7 +745,7 @@ PMRule::PMRule( TQDomElement& e,
else if( isCondition( me ) ) else if( isCondition( me ) )
{ {
m_pCondition = newCondition( me, globalGroups, localGroups ); m_pCondition = newCondition( me, globalGroups, localGroups );
m_tqchildren.append( m_pCondition ); m_children.append( m_pCondition );
} }
} }
m = m.nextSibling( ); m = m.nextSibling( );
@ -1006,7 +1006,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
if( targetClassList.isEmpty( ) ) if( targetClassList.isEmpty( ) )
return 0; // not rules found return 0; // not rules found
// count already inserted tqchildren // count already inserted children
TQPtrListIterator<PMRuleTargetClass> tit( targetClassList ); TQPtrListIterator<PMRuleTargetClass> tit( targetClassList );
for( ; tit.current( ); ++tit ) // ... for all target classes for( ; tit.current( ); ++tit ) // ... for all target classes
{ {

@ -154,7 +154,7 @@ public:
*/ */
TQPtrListIterator<PMRuleBase> childIterator( ) const TQPtrListIterator<PMRuleBase> childIterator( ) const
{ {
return TQPtrListIterator<PMRuleBase>( m_tqchildren ); return TQPtrListIterator<PMRuleBase>( m_children );
} }
protected: protected:
/** /**
@ -170,7 +170,7 @@ protected:
/** /**
* Add all child nodes to this list. * Add all child nodes to this list.
*/ */
TQPtrList<PMRuleBase> m_tqchildren; TQPtrList<PMRuleBase> m_children;
}; };
/** /**

@ -96,7 +96,7 @@ void PMIsoSurfaceEdit::createTopWidgets( )
hl->addWidget( new TQLabel( i18n( "Values:" ), this ) ); hl->addWidget( new TQLabel( i18n( "Values:" ), this ) );
for( i = 0; i < 3; i++ ) for( i = 0; i < 3; i++ )
{ {
hl->addWidget( new TQLabel( TQString( "P%1" ).tqarg( i ), this ) ); hl->addWidget( new TQLabel( TQString( "P%1" ).arg( i ), this ) );
hl->addWidget( m_pEvaluateValue[i] ); hl->addWidget( m_pEvaluateValue[i] );
} }

@ -549,10 +549,10 @@ void PMLathe::controlPoints( PMControlPointList& list )
lastPoint = cp; lastPoint = cp;
if( d == 0 ) if( d == 0 )
cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DXY, i, cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DXY, i,
i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); i18n( "Point %1 (xy)" ).arg( i + 1 ) );
else else
cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DZY, i, cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DZY, i,
i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); i18n( "Point %1 (xy)" ).arg( i + 1 ) );
if( i == 0 ) if( i == 0 )
firstPoint = cp; firstPoint = cp;
@ -573,10 +573,10 @@ void PMLathe::controlPoints( PMControlPointList& list )
int imod4 = i % 4; int imod4 = i % 4;
if( d == 0 ) if( d == 0 )
cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DXY, i, cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DXY, i,
i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); i18n( "Point %1 (xy)" ).arg( i + 1 ) );
else else
cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DZY, i, cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DZY, i,
i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); i18n( "Point %1 (xy)" ).arg( i + 1 ) );
switch( imod4 ) switch( imod4 )
{ {
case 0: case 0:

@ -277,7 +277,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra
if( !success ) if( !success )
{ {
KMessageBox::error( 0, i18n( "Error moving \"%1\" to \"%2\"" ).tqarg( path ).tqarg( m_path ) ); KMessageBox::error( 0, i18n( "Error moving \"%1\" to \"%2\"" ).arg( path ).arg( m_path ) );
e->ignore( ); e->ignore( );
return; return;
} }

@ -67,28 +67,28 @@ bool PMFloatEdit::isDataValid( )
if( m_bCheckLower && m_bCheckUpper ) if( m_bCheckLower && m_bCheckUpper )
KMessageBox::error( this, i18n( "Please enter a float value " KMessageBox::error( this, i18n( "Please enter a float value "
"between %1 and %2" ) "between %1 and %2" )
.tqarg( m_lowerValue ).tqarg( m_upperValue ), .arg( m_lowerValue ).arg( m_upperValue ),
i18n( "Error" ) ); i18n( "Error" ) );
else if( m_bCheckLower ) else if( m_bCheckLower )
{ {
if( m_lowerOp == OpGreaterEqual ) if( m_lowerOp == OpGreaterEqual )
KMessageBox::error( this, i18n( "Please enter a float value " KMessageBox::error( this, i18n( "Please enter a float value "
">= %1" ).tqarg( m_lowerValue ), ">= %1" ).arg( m_lowerValue ),
i18n( "Error" ) ); i18n( "Error" ) );
else else
KMessageBox::error( this, i18n( "Please enter a float value " KMessageBox::error( this, i18n( "Please enter a float value "
"> %1" ).tqarg( m_lowerValue ), "> %1" ).arg( m_lowerValue ),
i18n( "Error" ) ); i18n( "Error" ) );
} }
else else
{ {
if( m_upperOp == OpLessEqual ) if( m_upperOp == OpLessEqual )
KMessageBox::error( this, i18n( "Please enter a float value " KMessageBox::error( this, i18n( "Please enter a float value "
"<= %1" ).tqarg( m_upperValue ), "<= %1" ).arg( m_upperValue ),
i18n( "Error" ) ); i18n( "Error" ) );
else else
KMessageBox::error( this, i18n( "Please enter a float value " KMessageBox::error( this, i18n( "Please enter a float value "
"< %1" ).tqarg( m_upperValue ), "< %1" ).arg( m_upperValue ),
i18n( "Error" ) ); i18n( "Error" ) );
} }
} }
@ -183,15 +183,15 @@ bool PMIntEdit::isDataValid( )
if( m_bCheckLower && m_bCheckUpper ) if( m_bCheckLower && m_bCheckUpper )
KMessageBox::error( this, i18n( "Please enter an integer value " KMessageBox::error( this, i18n( "Please enter an integer value "
"between %1 and %2" ) "between %1 and %2" )
.tqarg( m_lowerValue ).tqarg( m_upperValue ), .arg( m_lowerValue ).arg( m_upperValue ),
i18n( "Error" ) ); i18n( "Error" ) );
else if( m_bCheckLower ) else if( m_bCheckLower )
KMessageBox::error( this, i18n( "Please enter an integer value " KMessageBox::error( this, i18n( "Please enter an integer value "
">= %1" ).tqarg( m_lowerValue ), ">= %1" ).arg( m_lowerValue ),
i18n( "Error" ) ); i18n( "Error" ) );
else else
KMessageBox::error( this, i18n( "Please enter an integer value " KMessageBox::error( this, i18n( "Please enter an integer value "
"<= %1" ).tqarg( m_upperValue ), "<= %1" ).arg( m_upperValue ),
i18n( "Error" ) ); i18n( "Error" ) );
} }
} }

@ -161,7 +161,7 @@ void PMListPatternEdit::saveContents( )
bool PMListPatternEdit::isDataValid( ) bool PMListPatternEdit::isDataValid( )
{ {
int tqchildren = 0; int children = 0;
PMObject* o; PMObject* o;
if( !m_pBrickSize->isDataValid( ) ) if( !m_pBrickSize->isDataValid( ) )
@ -172,13 +172,13 @@ bool PMListPatternEdit::isDataValid( )
// count child objects // count child objects
for( o = m_pDisplayedObject->firstChild( ); o; o = o->nextSibling( ) ) for( o = m_pDisplayedObject->firstChild( ); o; o = o->nextSibling( ) )
if( o->type( ) == m_pDisplayedObject->listObjectType( ) ) if( o->type( ) == m_pDisplayedObject->listObjectType( ) )
tqchildren++; children++;
switch( m_pTypeCombo->currentItem( ) ) switch( m_pTypeCombo->currentItem( ) )
{ {
case 0: case 0:
case 1: case 1:
if( tqchildren > 2 ) if( children > 2 )
{ {
KMessageBox::error( this, i18n( "You can have at most two child" KMessageBox::error( this, i18n( "You can have at most two child"
" items for that list type!" ), " items for that list type!" ),

@ -30,7 +30,7 @@
#include <tqptrdict.h> #include <tqptrdict.h>
PMMoveCommand::PMMoveCommand( PMObject* obj, PMObject* parent, PMObject* after ) PMMoveCommand::PMMoveCommand( PMObject* obj, PMObject* parent, PMObject* after )
: PMCommand( i18n( "Move %1" ).tqarg( obj->description( ) ) ) : PMCommand( i18n( "Move %1" ).arg( obj->description( ) ) )
{ {
m_pParent = parent; m_pParent = parent;
m_pAfter = after; m_pAfter = after;
@ -356,10 +356,10 @@ int PMMoveCommand::errorFlags( PMPart* )
{ {
if( declareInsertError ) if( declareInsertError )
m_errors.prepend( i18n( "Can't insert the declare \"%1\" at that point." ) m_errors.prepend( i18n( "Can't insert the declare \"%1\" at that point." )
.tqarg( decl->id( ) ) ); .arg( decl->id( ) ) );
else else
m_errors.prepend( i18n( "The declare \"%1\" can't be moved behind linked objects." ) m_errors.prepend( i18n( "The declare \"%1\" can't be moved behind linked objects." )
.tqarg( decl->id( ) ) ); .arg( decl->id( ) ) );
PMDeleteInfo* tmp = info; PMDeleteInfo* tmp = info;
info = m_infoList.prev( ); info = m_infoList.prev( );
@ -450,8 +450,8 @@ int PMMoveCommand::errorFlags( PMPart* )
"contains a link to the declare \"%3\" " "contains a link to the declare \"%3\" "
"and the insert point is not after " "and the insert point is not after "
"the declare." ) "the declare." )
.tqarg( obj->description( ) ).tqarg( name ) .arg( obj->description( ) ).arg( name )
.tqarg( decl->id( ) ) ); .arg( decl->id( ) ) );
} }
else else
kdError( PMArea ) << "linked is 0 in PMMoveCommand::errorFlags\n"; kdError( PMArea ) << "linked is 0 in PMMoveCommand::errorFlags\n";

@ -50,10 +50,10 @@ public:
* Command that moves a list of new PMObjects. * Command that moves a list of new PMObjects.
* The objects don't have to be siblings of each other. * The objects don't have to be siblings of each other.
* *
* The object in the list will be inserted as tqchildren of parent after * The object in the list will be inserted as children of parent after
* the object after. * the object after.
* *
* If after is 0, the objects will be inserted as first tqchildren. * If after is 0, the objects will be inserted as first children.
*/ */
PMMoveCommand( const PMObjectList& list, PMObject* parent, PMObject* after ); PMMoveCommand( const PMObjectList& list, PMObject* parent, PMObject* after );
/** /**

@ -54,7 +54,7 @@ typedef TQPtrListIterator<PMObject> PMObjectListIterator;
* Used pattern: Composite * Used pattern: Composite
* *
* All list/child functionality is disabled in this class. Objects that * All list/child functionality is disabled in this class. Objects that
* can have tqchildren has to be inherited from @ref PMCompositeObject. * can have children has to be inherited from @ref PMCompositeObject.
*/ */
class PMObject class PMObject
{ {
@ -69,7 +69,7 @@ public:
*/ */
PMObject( const PMObject& o ); PMObject( const PMObject& o );
/** /**
* Deletes the object and all tqchildren. * Deletes the object and all children.
*/ */
virtual ~PMObject( ); virtual ~PMObject( );
@ -157,7 +157,7 @@ public:
int canInsert( const TQStringList& classes, const PMObject* after ) const; int canInsert( const TQStringList& classes, const PMObject* after ) const;
/** /**
* Returns true if an insert or remove operation of tqchildren will * Returns true if an insert or remove operation of children will
* change data inside this class * change data inside this class
*/ */
virtual bool dataChangeOnInsertRemove( ) const { return false; } virtual bool dataChangeOnInsertRemove( ) const { return false; }
@ -219,7 +219,7 @@ public:
return false; return false;
} }
/** /**
* Returns the number of tqchildren. 0 in this class * Returns the number of children. 0 in this class
*/ */
virtual int countChildren( ) const { return 0; } virtual int countChildren( ) const { return 0; }
/** /**
@ -235,12 +235,12 @@ public:
/** /**
* Called when a child was removed. For classes that have to be informed * Called when a child was removed. For classes that have to be informed
* when tqchildren are removed * when children are removed
*/ */
virtual void childRemoved( PMObject* ) { }; virtual void childRemoved( PMObject* ) { };
/** /**
* Called when a child was added. For classes that have to be informed * Called when a child was added. For classes that have to be informed
* when tqchildren are added * when children are added
*/ */
virtual void childAdded( PMObject* ) { }; virtual void childAdded( PMObject* ) { };
@ -302,7 +302,7 @@ public:
* not only this object. * not only this object.
* *
* If you leave the list empty, only this object was changed. * If you leave the list empty, only this object was changed.
* If you add tqchildren or other objects to the list, add this object * If you add children or other objects to the list, add this object
* to the list, too, if it was changed! * to the list, too, if it was changed!
* *
* IMPORTANT: When you change additional objects, make sure that * IMPORTANT: When you change additional objects, make sure that
@ -402,7 +402,7 @@ public:
*/ */
bool isReadOnly( ) const; bool isReadOnly( ) const;
/** /**
* Makes this object read only, if yes == true. All tqchildren will * Makes this object read only, if yes == true. All children will
* be read only, too * be read only, too
*/ */
void setReadOnly( bool yes = true ) { m_readOnly = yes; } void setReadOnly( bool yes = true ) { m_readOnly = yes; }
@ -495,7 +495,7 @@ private:
*/ */
bool m_selected; bool m_selected;
/** /**
* true if this object is read only. All tqchildren will be read only, too * true if this object is read only. All children will be read only, too
*/ */
bool m_readOnly; bool m_readOnly;
/** /**

@ -161,7 +161,7 @@ void PMObjectLink::readAttributes( const PMXMLHelper& h )
} }
else else
h.parser( )->printError( i18n( "Declare \"%1\" has wrong type." ) h.parser( )->printError( i18n( "Declare \"%1\" has wrong type." )
.tqarg( id ) ); .arg( id ) );
} }
} }
Base::readAttributes( h ); Base::readAttributes( h );

@ -425,125 +425,125 @@ bool PMObjectSettings::validateData( )
void PMObjectSettings::applySettings( ) void PMObjectSettings::applySettings( )
{ {
bool tqrepaint = false; bool repaint = false;
PMRenderManager* rm = PMRenderManager::theManager( ); PMRenderManager* rm = PMRenderManager::theManager( );
if( rm->highDetailCameraViews( ) != m_pHighDetailCameraViews->isChecked( ) ) if( rm->highDetailCameraViews( ) != m_pHighDetailCameraViews->isChecked( ) )
{ {
rm->setHighDetailCameraViews( m_pHighDetailCameraViews->isChecked( ) ); rm->setHighDetailCameraViews( m_pHighDetailCameraViews->isChecked( ) );
tqrepaint = true; repaint = true;
} }
if( PMSphere::uSteps( ) != m_pSphereUSteps->value( ) ) if( PMSphere::uSteps( ) != m_pSphereUSteps->value( ) )
{ {
PMSphere::setUSteps( m_pSphereUSteps->value( ) ); PMSphere::setUSteps( m_pSphereUSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMSphere::vSteps( ) != m_pSphereVSteps->value( ) ) if( PMSphere::vSteps( ) != m_pSphereVSteps->value( ) )
{ {
PMSphere::setVSteps( m_pSphereVSteps->value( ) ); PMSphere::setVSteps( m_pSphereVSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMCylinder::steps( ) != m_pCylinderSteps->value( ) ) if( PMCylinder::steps( ) != m_pCylinderSteps->value( ) )
{ {
PMCylinder::setSteps( m_pCylinderSteps->value( ) ); PMCylinder::setSteps( m_pCylinderSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMCone::steps( ) != m_pConeSteps->value( ) ) if( PMCone::steps( ) != m_pConeSteps->value( ) )
{ {
PMCone::setSteps( m_pConeSteps->value( ) ); PMCone::setSteps( m_pConeSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMTorus::uSteps( ) != m_pTorusUSteps->value( ) ) if( PMTorus::uSteps( ) != m_pTorusUSteps->value( ) )
{ {
PMTorus::setUSteps( m_pTorusUSteps->value( ) ); PMTorus::setUSteps( m_pTorusUSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMTorus::vSteps( ) != m_pTorusVSteps->value( ) ) if( PMTorus::vSteps( ) != m_pTorusVSteps->value( ) )
{ {
PMTorus::setVSteps( m_pTorusVSteps->value( ) ); PMTorus::setVSteps( m_pTorusVSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMDisc::steps( ) != m_pDiscSteps->value( ) ) if( PMDisc::steps( ) != m_pDiscSteps->value( ) )
{ {
PMDisc::setSteps( m_pDiscSteps->value( ) ); PMDisc::setSteps( m_pDiscSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMBlobSphere::uSteps( ) != m_pBlobSphereUSteps->value( ) ) if( PMBlobSphere::uSteps( ) != m_pBlobSphereUSteps->value( ) )
{ {
PMBlobSphere::setUSteps( m_pBlobSphereUSteps->value( ) ); PMBlobSphere::setUSteps( m_pBlobSphereUSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMBlobSphere::vSteps( ) != m_pBlobSphereVSteps->value( ) ) if( PMBlobSphere::vSteps( ) != m_pBlobSphereVSteps->value( ) )
{ {
PMBlobSphere::setVSteps( m_pBlobSphereVSteps->value( ) ); PMBlobSphere::setVSteps( m_pBlobSphereVSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMBlobCylinder::uSteps( ) != m_pBlobCylinderUSteps->value( ) ) if( PMBlobCylinder::uSteps( ) != m_pBlobCylinderUSteps->value( ) )
{ {
PMBlobCylinder::setUSteps( m_pBlobCylinderUSteps->value( ) ); PMBlobCylinder::setUSteps( m_pBlobCylinderUSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMBlobCylinder::vSteps( ) != m_pBlobCylinderVSteps->value( ) ) if( PMBlobCylinder::vSteps( ) != m_pBlobCylinderVSteps->value( ) )
{ {
PMBlobCylinder::setVSteps( m_pBlobCylinderVSteps->value( ) ); PMBlobCylinder::setVSteps( m_pBlobCylinderVSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMPlane::planeSize( ) != m_pPlaneSize->value( ) ) if( PMPlane::planeSize( ) != m_pPlaneSize->value( ) )
{ {
PMPlane::setPlaneSize( m_pPlaneSize->value( ) ); PMPlane::setPlaneSize( m_pPlaneSize->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMLathe::sSteps( ) != m_pLatheUSteps->value( ) ) if( PMLathe::sSteps( ) != m_pLatheUSteps->value( ) )
{ {
PMLathe::setSSteps( m_pLatheUSteps->value( ) ); PMLathe::setSSteps( m_pLatheUSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMLathe::rSteps( ) != m_pLatheRSteps->value( ) ) if( PMLathe::rSteps( ) != m_pLatheRSteps->value( ) )
{ {
PMLathe::setRSteps( m_pLatheRSteps->value( ) ); PMLathe::setRSteps( m_pLatheRSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMSurfaceOfRevolution::sSteps( ) != m_pSorUSteps->value( ) ) if( PMSurfaceOfRevolution::sSteps( ) != m_pSorUSteps->value( ) )
{ {
PMSurfaceOfRevolution::setSSteps( m_pSorUSteps->value( ) ); PMSurfaceOfRevolution::setSSteps( m_pSorUSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMSurfaceOfRevolution::rSteps( ) != m_pSorRSteps->value( ) ) if( PMSurfaceOfRevolution::rSteps( ) != m_pSorRSteps->value( ) )
{ {
PMSurfaceOfRevolution::setRSteps( m_pSorRSteps->value( ) ); PMSurfaceOfRevolution::setRSteps( m_pSorRSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMPrism::sSteps( ) != m_pPrismSteps->value( ) ) if( PMPrism::sSteps( ) != m_pPrismSteps->value( ) )
{ {
PMPrism::setSSteps( m_pPrismSteps->value( ) ); PMPrism::setSSteps( m_pPrismSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMSuperquadricEllipsoid::uSteps( ) != m_pSqeUSteps->value( ) ) if( PMSuperquadricEllipsoid::uSteps( ) != m_pSqeUSteps->value( ) )
{ {
PMSuperquadricEllipsoid::setUSteps( m_pSqeUSteps->value( ) ); PMSuperquadricEllipsoid::setUSteps( m_pSqeUSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMSuperquadricEllipsoid::vSteps( ) != m_pSqeVSteps->value( ) ) if( PMSuperquadricEllipsoid::vSteps( ) != m_pSqeVSteps->value( ) )
{ {
PMSuperquadricEllipsoid::setVSteps( m_pSqeVSteps->value( ) ); PMSuperquadricEllipsoid::setVSteps( m_pSqeVSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMSphereSweep::rSteps( ) != m_pSphereSweepRSteps->value( ) ) if( PMSphereSweep::rSteps( ) != m_pSphereSweepRSteps->value( ) )
{ {
PMSphereSweep::setRSteps( m_pSphereSweepRSteps->value( ) ); PMSphereSweep::setRSteps( m_pSphereSweepRSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMSphereSweep::sSteps( ) != m_pSphereSweepSSteps->value( ) ) if( PMSphereSweep::sSteps( ) != m_pSphereSweepSSteps->value( ) )
{ {
PMSphereSweep::setSSteps( m_pSphereSweepSSteps->value( ) ); PMSphereSweep::setSSteps( m_pSphereSweepSSteps->value( ) );
tqrepaint = true; repaint = true;
} }
if( PMHeightField::variance( ) != m_pHeightFieldVariance->value( ) ) if( PMHeightField::variance( ) != m_pHeightFieldVariance->value( ) )
{ {
PMHeightField::setVariance( m_pHeightFieldVariance->value( ) ); PMHeightField::setVariance( m_pHeightFieldVariance->value( ) );
tqrepaint = true; repaint = true;
} }
if( tqrepaint ) if( repaint )
emit repaintViews( ); emit repaintViews( );
} }

@ -58,12 +58,12 @@ void PMOutputDevice::callSerialization( const PMObject* o, const PMMetaObject* m
if( mo == o->metaObject( ) ) if( mo == o->metaObject( ) )
{ {
printError( i18n( "The object \"%1\" doesn't support %2." ) printError( i18n( "The object \"%1\" doesn't support %2." )
.tqarg( o->description( ) ).tqarg( description( ) ) ); .arg( o->description( ) ).arg( description( ) ) );
} }
else else
{ {
printError( i18n( "The class \"%1\" doesn't support %2." ) printError( i18n( "The class \"%1\" doesn't support %2." )
.tqarg( o->description( ) ).tqarg( mo->className( ) ) ); .arg( o->description( ) ).arg( mo->className( ) ) );
} }
} }
} }

@ -107,7 +107,7 @@ void PMParser::printMessage( const PMPMessage messageNum )
void PMParser::printMessage( const TQString& type, const TQString& msg ) void PMParser::printMessage( const TQString& type, const TQString& msg )
{ {
if( m_lineNum >= 0 ) if( m_lineNum >= 0 )
m_messages += PMMessage( i18n( "Line %1: " ).tqarg( m_lineNum ) + type + ": " + msg ); m_messages += PMMessage( i18n( "Line %1: " ).arg( m_lineNum ) + type + ": " + msg );
else else
m_messages += PMMessage( type + ": " + msg ); m_messages += PMMessage( type + ": " + msg );
} }
@ -122,7 +122,7 @@ void PMParser::printError( const TQString& msg )
else if( m_errors == s_maxErrors ) else if( m_errors == s_maxErrors )
{ {
m_messages += PMMessage( i18n( "Maximum of %1 errors reached." ) m_messages += PMMessage( i18n( "Maximum of %1 errors reached." )
.tqarg( s_maxErrors ) ); .arg( s_maxErrors ) );
m_errors++; m_errors++;
} }
} }
@ -137,7 +137,7 @@ void PMParser::printWarning( const TQString& msg )
else if( m_warnings == s_maxWarnings ) else if( m_warnings == s_maxWarnings )
{ {
m_messages += PMMessage( i18n( "Maximum of %1 warnings reached." ) m_messages += PMMessage( i18n( "Maximum of %1 warnings reached." )
.tqarg( s_maxWarnings ) ); .arg( s_maxWarnings ) );
m_warnings++; m_warnings++;
} }
} }
@ -145,18 +145,18 @@ void PMParser::printWarning( const TQString& msg )
void PMParser::printExpected( const char c, const char* sValue ) void PMParser::printExpected( const char c, const char* sValue )
{ {
printError( i18n( "'%1' expected, found token '%2' instead." ) printError( i18n( "'%1' expected, found token '%2' instead." )
.tqarg( c ).tqarg( sValue ) ); .arg( c ).arg( sValue ) );
} }
void PMParser::printExpected( const TQString& str, const char* sValue ) void PMParser::printExpected( const TQString& str, const char* sValue )
{ {
printError( i18n( "'%1' expected, found token '%2' instead." ) printError( i18n( "'%1' expected, found token '%2' instead." )
.tqarg( str ).tqarg( sValue ) ); .arg( str ).arg( sValue ) );
} }
void PMParser::printUnexpected( const TQString& str ) void PMParser::printUnexpected( const TQString& str )
{ {
printError( i18n( "Unexpected token '%1'." ).tqarg( str ) ); printError( i18n( "Unexpected token '%1'." ).arg( str ) );
} }
void PMParser::printInfo( const TQString& msg ) void PMParser::printInfo( const TQString& msg )
@ -254,8 +254,8 @@ bool PMParser::insertChild( PMObject* child, PMObject* parent )
else else
{ {
printError( i18n( "Can't insert %1 into %2." ) printError( i18n( "Can't insert %1 into %2." )
.tqarg( child->description( ) ) .arg( child->description( ) )
.tqarg( parent->description( ) ) ); .arg( parent->description( ) ) );
} }
} }
else else
@ -270,8 +270,8 @@ bool PMParser::insertChild( PMObject* child, PMObject* parent )
else else
{ {
printError( i18n( "Can't insert %1 into %2." ) printError( i18n( "Can't insert %1 into %2." )
.tqarg( child->description( ) ) .arg( child->description( ) )
.tqarg( m_pTopParent->description( ) ) ); .arg( m_pTopParent->description( ) ) );
} }
} }
else else
@ -379,9 +379,9 @@ PMDeclare* PMParser::checkLink( const TQString& id )
s = t->find( id ); s = t->find( id );
if( !s ) if( !s )
printError( i18n( "Undefined object \"%1\"." ).tqarg( id ) ); printError( i18n( "Undefined object \"%1\"." ).arg( id ) );
else if( s->type( ) != PMSymbol::Object ) else if( s->type( ) != PMSymbol::Object )
printError( i18n( "Undefined object \"%1\"." ).tqarg( id ) ); printError( i18n( "Undefined object \"%1\"." ).arg( id ) );
else else
{ {
// the object is declared // the object is declared
@ -409,7 +409,7 @@ PMDeclare* PMParser::checkLink( const TQString& id )
if( !ok ) if( !ok )
printError( i18n( "Object \"%1\" is undefined at that point." ) printError( i18n( "Object \"%1\" is undefined at that point." )
.tqarg( id ) ); .arg( id ) );
} }
if( ok ) if( ok )

@ -82,7 +82,7 @@ public:
* Appends all parsed objects to the list. * Appends all parsed objects to the list.
* *
* parent is the object where the parsed objects will be inserted as * parent is the object where the parsed objects will be inserted as
* tqchildren behind the object after. These parameters are used to check * children behind the object after. These parameters are used to check
* the consistency of declares and links. * the consistency of declares and links.
* *
* Set parent and after to 0 if and only if a document is parsed/opened. * Set parent and after to 0 if and only if a document is parsed/opened.
@ -218,7 +218,7 @@ protected:
PMPart* m_pPart; PMPart* m_pPart;
/** /**
* parent object where the parsed top level objects * parent object where the parsed top level objects
* will be inserted _later_ (not from the parser) as tqchildren * will be inserted _later_ (not from the parser) as children
*/ */
const PMObject* m_pTopParent; const PMObject* m_pTopParent;
const PMObject* m_pAfter; const PMObject* m_pAfter;

@ -1050,7 +1050,7 @@ bool PMPart::setActiveObject( const TQString& name )
else else
objIndex = 0; objIndex = 0;
// Iterate the tqchildren for this element. We stop when there are no more siblings // Iterate the children for this element. We stop when there are no more siblings
// or the object is of the correct type and it's index count is also correct // or the object is of the correct type and it's index count is also correct
siblingIndex = 0; siblingIndex = 0;
tmpSibling = tmpObj->firstChild( ); tmpSibling = tmpObj->firstChild( );
@ -1373,10 +1373,10 @@ void PMPart::slotFileImport( )
if( newParser ) if( newParser )
{ {
if( m_pActiveObject ) if( m_pActiveObject )
insertFromParser( i18n( "Import %1" ).tqarg( selectedFormat->description( ) ), insertFromParser( i18n( "Import %1" ).arg( selectedFormat->description( ) ),
newParser, m_pActiveObject ); newParser, m_pActiveObject );
else else
insertFromParser( i18n( "Import %1" ).tqarg( selectedFormat->description( ) ), insertFromParser( i18n( "Import %1" ).arg( selectedFormat->description( ) ),
newParser, m_pScene ); newParser, m_pScene );
delete newParser; delete newParser;
} }

@ -109,7 +109,7 @@ void PMPov31SerBlob( const PMObject* object, const PMMetaObject* metaObject, PMO
dev->objectBegin( "blob" ); dev->objectBegin( "blob" );
dev->writeName( object->name( ) ); dev->writeName( object->name( ) );
dev->writeLine( TQString( "threshold %1" ).tqarg( o->threshold( ) ) ); dev->writeLine( TQString( "threshold %1" ).arg( o->threshold( ) ) );
dev->callSerialization( object, metaObject->superClass( ) ); dev->callSerialization( object, metaObject->superClass( ) );
@ -132,7 +132,7 @@ void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* metaObj
str1.setNum( o->radius( ) ); str1.setNum( o->radius( ) );
dev->writeLine( o->end1( ).serialize( ) + ", " + o->end2( ).serialize( ) dev->writeLine( o->end1( ).serialize( ) + ", " + o->end2( ).serialize( )
+ ", " + str1 + "," ); + ", " + str1 + "," );
dev->writeLine( TQString( "strength %1" ).tqarg( o->strength( ) ) ); dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) );
dev->callSerialization( object, metaObject->superClass( ) ); dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( ); dev->objectEnd( );
@ -144,8 +144,8 @@ void PMPov31SerBlobSphere( const PMObject* object, const PMMetaObject* metaObjec
dev->objectBegin( "sphere" ); dev->objectBegin( "sphere" );
dev->writeName( object->name( ) ); dev->writeName( object->name( ) );
dev->writeLine( o->centre( ).serialize( ) + TQString( ", %1," ).tqarg( o->radius( ) ) ); dev->writeLine( o->centre( ).serialize( ) + TQString( ", %1," ).arg( o->radius( ) ) );
dev->writeLine( TQString( "strength %1" ).tqarg( o->strength( ) ) ); dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) );
dev->callSerialization( object, metaObject->superClass( ) ); dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( ); dev->objectEnd( );
} }
@ -544,7 +544,7 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice*
if( text.isEmpty( ) ) if( text.isEmpty( ) )
text = o->description( ); text = o->description( );
dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
} }
} }
@ -587,7 +587,7 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice*
dev->writeLine( "fog_alt " + str ); dev->writeLine( "fog_alt " + str );
dev->writeLine( "up " + o->up( ).serialize( ) ); dev->writeLine( "up " + o->up( ).serialize( ) );
} }
// Serialize the tqchildren of this object // Serialize the children of this object
dev->callSerialization( object, object->metaObject( )->superClass( )->superClass( ) ); dev->callSerialization( object, object->metaObject( )->superClass( )->superClass( ) );
dev->objectEnd( ); dev->objectEnd( );
} }
@ -727,7 +727,7 @@ void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* metaObje
dev->writeLine( o->typeToString( o->heightFieldType( ) ) + " \"" + o->fileName( ) + "\"" ); dev->writeLine( o->typeToString( o->heightFieldType( ) ) + " \"" + o->fileName( ) + "\"" );
if( o->waterLevel( ) > 0.0 ) if( o->waterLevel( ) > 0.0 )
dev->writeLine( TQString( "water_level %1" ).tqarg( o->waterLevel( ) ) ); dev->writeLine( TQString( "water_level %1" ).arg( o->waterLevel( ) ) );
if( !o->hierarchy( ) ) if( !o->hierarchy( ) )
dev->writeLine( "hierarchy off" ); dev->writeLine( "hierarchy off" );
if( o->smooth( ) ) if( o->smooth( ) )
@ -885,15 +885,15 @@ void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* metaObj
dev->writeLine( o->algebraTypeToString( o->algebraType( ) ) ); dev->writeLine( o->algebraTypeToString( o->algebraType( ) ) );
if( o->functionType( ) == PMJuliaFractal::FTpwr ) if( o->functionType( ) == PMJuliaFractal::FTpwr )
dev->writeLine( TQString( "pwr(%1, %2)" ).tqarg( o->exponent( )[0] ). dev->writeLine( TQString( "pwr(%1, %2)" ).arg( o->exponent( )[0] ).
arg( o->exponent( )[1] ) ); arg( o->exponent( )[1] ) );
else else
dev->writeLine( o->functionTypeToString( o->functionType( ) ) ); dev->writeLine( o->functionTypeToString( o->functionType( ) ) );
dev->writeLine( TQString( "max_iteration %1" ).tqarg( o->maximumIterations( ) ) ); dev->writeLine( TQString( "max_iteration %1" ).arg( o->maximumIterations( ) ) );
dev->writeLine( TQString( "precision %1" ).tqarg( o->precision( ) ) ); dev->writeLine( TQString( "precision %1" ).arg( o->precision( ) ) );
dev->writeLine( TQString( "slice %1, %2" ).tqarg( o->sliceNormal( ).serialize( ) ) dev->writeLine( TQString( "slice %1, %2" ).arg( o->sliceNormal( ).serialize( ) )
.tqarg( o->sliceDistance( ) ) ); .arg( o->sliceDistance( ) ) );
dev->callSerialization( object, metaObject->superClass( ) ); dev->callSerialization( object, metaObject->superClass( ) );
@ -925,7 +925,7 @@ void PMPov31SerLathe( const PMObject* object, const PMMetaObject* metaObject, PM
} }
int num = o->points( ).count( ); int num = o->points( ).count( );
dev->writeLine( TQString( "%1," ).tqarg( num ) ); dev->writeLine( TQString( "%1," ).arg( num ) );
bool first = true; bool first = true;
TQValueList<PMVector> points = o->points( ); TQValueList<PMVector> points = o->points( );
@ -968,10 +968,10 @@ void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PM
if( ( o->lightType( ) == PMLight::SpotLight ) || if( ( o->lightType( ) == PMLight::SpotLight ) ||
( o->lightType( ) == PMLight::CylinderLight ) ) ( o->lightType( ) == PMLight::CylinderLight ) )
{ {
dev->writeLine( TQString( "radius %1" ).tqarg( o->radius( ) ) ); dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) );
dev->writeLine( TQString( "falloff %1" ).tqarg( o->falloff( ) ) ); dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) );
if( o->tightness( ) != c_defaultLightTightness ) if( o->tightness( ) != c_defaultLightTightness )
dev->writeLine( TQString( "tightness %1" ).tqarg( o->tightness( ) ) ); dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) );
dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) ); dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) );
} }
@ -979,17 +979,17 @@ void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PM
{ {
dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( ) dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( )
+ TQString( ", " ) + o->axis2( ).serialize( ) + TQString( ", " ) + o->axis2( ).serialize( )
+ TQString( ", %1, %2" ).tqarg( o->size1( ) ).tqarg( o->size2( ) ) ); + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) );
if( o->adaptive( ) != c_defaultLightAdaptive ) if( o->adaptive( ) != c_defaultLightAdaptive )
dev->writeLine( TQString( "adaptive %1" ).tqarg( o->adaptive( ) ) ); dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) );
if( o->jitter( ) ) if( o->jitter( ) )
dev->writeLine( TQString( "jitter" ) ); dev->writeLine( TQString( "jitter" ) );
} }
if( o->fading( ) ) if( o->fading( ) )
{ {
dev->writeLine( TQString( "fade_distance %1" ).tqarg( o->fadeDistance( ) ) ); dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) );
dev->writeLine( TQString( "fade_power %1" ).tqarg( o->fadePower( ) ) ); dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) );
} }
if( !o->mediaInteraction( ) ) if( !o->mediaInteraction( ) )
@ -1302,7 +1302,7 @@ void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* metaObjec
if( text.isEmpty( ) ) if( text.isEmpty( ) )
text = o->description( ); text = o->description( );
dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
} }
} }
@ -1501,18 +1501,18 @@ void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* metaObject,
if( o->polynomOrder( ) == 2 ) if( o->polynomOrder( ) == 2 )
{ {
dev->writeLine( TQString( "<%1, %2, %3>," ).tqarg( coefficients[0] ) dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[0] )
.tqarg( coefficients[4] ).tqarg( coefficients[7] ) ); .arg( coefficients[4] ).arg( coefficients[7] ) );
dev->writeLine( TQString( "<%1, %2, %3>," ).tqarg( coefficients[1] ) dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[1] )
.tqarg( coefficients[2] ).tqarg( coefficients[5] ) ); .arg( coefficients[2] ).arg( coefficients[5] ) );
dev->writeLine( TQString( "<%1, %2, %3>, %4" ).tqarg( coefficients[3] ) dev->writeLine( TQString( "<%1, %2, %3>, %4" ).arg( coefficients[3] )
.tqarg( coefficients[6] ).tqarg( coefficients[8] ) .arg( coefficients[6] ).arg( coefficients[8] )
.tqarg( coefficients[9] ) ); .arg( coefficients[9] ) );
} }
else else
{ {
if( o->polynomOrder( ) > 4 ) if( o->polynomOrder( ) > 4 )
dev->writeLine( TQString( "%1," ).tqarg( o->polynomOrder( ) ) ); dev->writeLine( TQString( "%1," ).arg( o->polynomOrder( ) ) );
int size = coefficients.size( ); int size = coefficients.size( );
@ -1545,14 +1545,14 @@ void PMPov31SerPovrayMatrix( const PMObject* object, const PMMetaObject*, PMOutp
{ {
PMPovrayMatrix* o = ( PMPovrayMatrix* ) object; PMPovrayMatrix* o = ( PMPovrayMatrix* ) object;
dev->writeLine( TQString( "matrix < %1, %2, %3," ).tqarg( o->values( )[0] ) dev->writeLine( TQString( "matrix < %1, %2, %3," ).arg( o->values( )[0] )
.tqarg( o->values( )[1] ).tqarg( o->values( )[2] ) ); .arg( o->values( )[1] ).arg( o->values( )[2] ) );
dev->writeLine( TQString( " %1, %2, %3," ).tqarg( o->values( )[3] ) dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[3] )
.tqarg( o->values( )[4] ).tqarg( o->values( )[5] ) ); .arg( o->values( )[4] ).arg( o->values( )[5] ) );
dev->writeLine( TQString( " %1, %2, %3," ).tqarg( o->values( )[6] ) dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[6] )
.tqarg( o->values( )[7] ).tqarg( o->values( )[8] ) ); .arg( o->values( )[7] ).arg( o->values( )[8] ) );
dev->writeLine( TQString( " %1, %2, %3 >" ).tqarg( o->values( )[9] ) dev->writeLine( TQString( " %1, %2, %3 >" ).arg( o->values( )[9] )
.tqarg( o->values( )[10] ).tqarg( o->values( )[11] ) ); .arg( o->values( )[10] ).arg( o->values( )[11] ) );
} }
void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev )
@ -1587,7 +1587,7 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM
dev->writeLine( "conic_sweep" ); dev->writeLine( "conic_sweep" );
break; break;
} }
dev->writeLine( TQString( "%1, %2," ).tqarg( o->height1( ) ).tqarg( o->height2( ) ) ); dev->writeLine( TQString( "%1, %2," ).arg( o->height1( ) ).arg( o->height2( ) ) );
// count number of points // count number of points
TQValueList< TQValueList<PMVector> > points = o->points( ); TQValueList< TQValueList<PMVector> > points = o->points( );
@ -1600,7 +1600,7 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM
else else
lines += ( *spit ).count( ) / 3 * 4; lines += ( *spit ).count( ) / 3 * 4;
} }
dev->writeLine( TQString( "%1," ).tqarg( lines ) ); dev->writeLine( TQString( "%1," ).arg( lines ) );
for( spit = points.begin( ); spit != points.end( ); ++spit ) for( spit = points.begin( ); spit != points.end( ); ++spit )
{ {
@ -1756,7 +1756,7 @@ void PMPov31SerScale( const PMObject* object, const PMMetaObject* , PMOutputDevi
if( approx( scale[0], scale[1] ) && if( approx( scale[0], scale[1] ) &&
approx( scale[1], scale[2] ) ) approx( scale[1], scale[2] ) )
dev->writeLine( TQString( "scale %1" ).tqarg( scale[0] ) ); dev->writeLine( TQString( "scale %1" ).arg( scale[0] ) );
else else
dev->writeLine( "scale " + scale.serialize( ) ); dev->writeLine( "scale " + scale.serialize( ) );
} }
@ -1821,7 +1821,7 @@ void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject*
dev->writeName( object->name( ) ); dev->writeName( object->name( ) );
int num = o->points( ).count( ); int num = o->points( ).count( );
dev->writeLine( TQString( "%1," ).tqarg( num ) ); dev->writeLine( TQString( "%1," ).arg( num ) );
bool first = true; bool first = true;
TQValueList<PMVector> points = o->points( ); TQValueList<PMVector> points = o->points( );
@ -1864,8 +1864,8 @@ void PMPov31SerSuperquadricEllipsoid( const PMObject* object, const PMMetaObject
dev->objectBegin( "superellipsoid" ); dev->objectBegin( "superellipsoid" );
dev->writeName( object->name( ) ); dev->writeName( object->name( ) );
dev->writeLine( TQString( "<%1, %2>" ).tqarg( o->eastWestExponent( ) ) dev->writeLine( TQString( "<%1, %2>" ).arg( o->eastWestExponent( ) )
.tqarg( o->northSouthExponent( ) ) ); .arg( o->northSouthExponent( ) ) );
dev->callSerialization( object, metaObject->superClass( ) ); dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( ); dev->objectEnd( );
@ -1880,7 +1880,7 @@ void PMPov31SerText( const PMObject* object, const PMMetaObject* metaObject, PMO
dev->writeName( object->name( ) ); dev->writeName( object->name( ) );
dev->writeLine( TQString( "ttf \"" ) + o->font( ) + "\"" ); dev->writeLine( TQString( "ttf \"" ) + o->font( ) + "\"" );
dev->writeLine( PMOutputDevice::escapeAndQuoteString( o->text( ) ) ); dev->writeLine( PMOutputDevice::escapeAndQuoteString( o->text( ) ) );
dev->writeLine( TQString( "%1, " ).tqarg( o->thickness( ) ) dev->writeLine( TQString( "%1, " ).arg( o->thickness( ) )
+ o->offset( ).serialize( ) ); + o->offset( ).serialize( ) );
dev->callSerialization( object, metaObject->superClass( ) ); dev->callSerialization( object, metaObject->superClass( ) );
@ -1922,7 +1922,7 @@ void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* metaObje
if( text.isEmpty( ) ) if( text.isEmpty( ) )
text = o->description( ); text = o->description( );
dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
} }
} }
@ -1950,7 +1950,7 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO
if( text.isEmpty( ) ) if( text.isEmpty( ) )
text = o->description( ); text = o->description( );
dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
} }
} }
@ -1962,7 +1962,7 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO
value = 1.0; value = 1.0;
if( it != mapValues.end( ) ) if( it != mapValues.end( ) )
value = *it; value = *it;
dev->write( TQString( "[ %1 " ).tqarg( value ) ); dev->write( TQString( "[ %1 " ).arg( value ) );
dev->serialize( c ); dev->serialize( c );
dev->writeLine( "]" ); dev->writeLine( "]" );
++it; ++it;

@ -102,8 +102,8 @@ void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObjec
} }
if( o->evaluate( ) ) if( o->evaluate( ) )
{ {
str = TQString( "%1, %2, %3" ).tqarg( o->evaluateValue( 0 ) ) str = TQString( "%1, %2, %3" ).arg( o->evaluateValue( 0 ) )
.tqarg( o->evaluateValue( 1 ) ).tqarg( o->evaluateValue( 2 ) ); .arg( o->evaluateValue( 1 ) ).arg( o->evaluateValue( 2 ) );
dev->writeLine( "evaluate " + str ); dev->writeLine( "evaluate " + str );
} }
if( o->allIntersections( ) ) if( o->allIntersections( ) )
@ -145,10 +145,10 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM
if( ( o->lightType( ) == PMLight::SpotLight ) || if( ( o->lightType( ) == PMLight::SpotLight ) ||
( o->lightType( ) == PMLight::CylinderLight ) ) ( o->lightType( ) == PMLight::CylinderLight ) )
{ {
dev->writeLine( TQString( "radius %1" ).tqarg( o->radius( ) ) ); dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) );
dev->writeLine( TQString( "falloff %1" ).tqarg( o->falloff( ) ) ); dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) );
if( o->tightness( ) != c_defaultLightTightness ) if( o->tightness( ) != c_defaultLightTightness )
dev->writeLine( TQString( "tightness %1" ).tqarg( o->tightness( ) ) ); dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) );
dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) ); dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) );
} }
@ -156,9 +156,9 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM
{ {
dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( ) dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( )
+ TQString( ", " ) + o->axis2( ).serialize( ) + TQString( ", " ) + o->axis2( ).serialize( )
+ TQString( ", %1, %2" ).tqarg( o->size1( ) ).tqarg( o->size2( ) ) ); + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) );
if( o->adaptive( ) != c_defaultLightAdaptive ) if( o->adaptive( ) != c_defaultLightAdaptive )
dev->writeLine( TQString( "adaptive %1" ).tqarg( o->adaptive( ) ) ); dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) );
if( o->jitter( ) ) if( o->jitter( ) )
dev->writeLine( TQString( "jitter" ) ); dev->writeLine( TQString( "jitter" ) );
if ( o->areaType( ) == PMLight::Circular ) if ( o->areaType( ) == PMLight::Circular )
@ -169,8 +169,8 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM
if( o->fading( ) ) if( o->fading( ) )
{ {
dev->writeLine( TQString( "fade_distance %1" ).tqarg( o->fadeDistance( ) ) ); dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) );
dev->writeLine( TQString( "fade_power %1" ).tqarg( o->fadePower( ) ) ); dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) );
} }
if( !o->mediaInteraction( ) ) if( !o->mediaInteraction( ) )

@ -384,7 +384,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent,
} }
break; break;
case TURBULENCE_TOK: case TURBULENCE_TOK:
// Search for a PMPattern in the object's tqchildren // Search for a PMPattern in the object's children
child = parent->firstChild( ); child = parent->firstChild( );
while( child && !child->isA( "Pattern" ) ) while( child && !child->isA( "Pattern" ) )
child = child->nextSibling( ); child = child->nextSibling( );
@ -408,7 +408,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent,
case SCALLOP_WAVE_TOK: case SCALLOP_WAVE_TOK:
case CUBIC_WAVE_TOK: case CUBIC_WAVE_TOK:
case POLY_WAVE_TOK: case POLY_WAVE_TOK:
// Search for a PMBlendMapModifiers in the object's tqchildren // Search for a PMBlendMapModifiers in the object's children
child = parent->firstChild( ); child = parent->firstChild( );
while( child && !child->isA( "BlendMapModifiers" ) ) while( child && !child->isA( "BlendMapModifiers" ) )
child = child->nextSibling( ); child = child->nextSibling( );
@ -972,7 +972,7 @@ bool PMPovrayParser::parseNumericItem( PMValue& v, bool checkForBool /*=false*/
else else
{ {
printError( i18n( "Undefined identifier \"%1\"." ) printError( i18n( "Undefined identifier \"%1\"." )
.tqarg( m_pScanner->sValue( ) ) ); .arg( m_pScanner->sValue( ) ) );
nextToken( ); nextToken( );
} }
break; break;
@ -2587,7 +2587,7 @@ bool PMPovrayParser::parsePolynom( PMPolynom* pNewPoly )
if( vector.size( ) != ( unsigned ) c_polynomSize[order] ) if( vector.size( ) != ( unsigned ) c_polynomSize[order] )
{ {
printError( i18n( "%1 coefficients are needed for a polynom with order %2" ) printError( i18n( "%1 coefficients are needed for a polynom with order %2" )
.tqarg( c_polynomSize[order] ).tqarg( order ) ); .arg( c_polynomSize[order] ).arg( order ) );
vector.resize( c_polynomSize[order] ); vector.resize( c_polynomSize[order] );
} }
pNewPoly->setCoefficients( vector ); pNewPoly->setCoefficients( vector );
@ -2883,7 +2883,7 @@ bool PMPovrayParser::parseLathe( PMLathe* pNewLathe )
if( nump < minp ) if( nump < minp )
printError( i18n( "At least %1 points are needed for that spline type" ) printError( i18n( "At least %1 points are needed for that spline type" )
.tqarg( minp ) ); .arg( minp ) );
else if( ( pNewLathe->splineType( ) == PMLathe::BezierSpline ) && else if( ( pNewLathe->splineType( ) == PMLathe::BezierSpline ) &&
( ( nump % 4 ) != 0 ) ) ( ( nump % 4 ) != 0 ) )
printError( i18n( "Bezier splines need 4 points for each segment" ) ); printError( i18n( "Bezier splines need 4 points for each segment" ) );
@ -3231,7 +3231,7 @@ bool PMPovrayParser::parseSor( PMSurfaceOfRevolution* pNewSor )
if( approxZero( ( *it1 )[1] - ( *it3 )[1], c_sorTolerance ) ) if( approxZero( ( *it1 )[1] - ( *it3 )[1], c_sorTolerance ) )
{ {
printError( i18n( "The v coordinate of point %1 and %2 must be different; fixed" ) printError( i18n( "The v coordinate of point %1 and %2 must be different; fixed" )
.tqarg( pnr + 1 ).tqarg( pnr + 3 ) ); .arg( pnr + 1 ).arg( pnr + 3 ) );
if( pnr == 0 ) if( pnr == 0 )
( *it1 )[1] = ( *it3 )[1] - c_sorTolerance; ( *it1 )[1] = ( *it3 )[1] - c_sorTolerance;
else else

@ -134,7 +134,7 @@ bool PMPovrayRenderWidget::render( const TQByteArray& scene,
m_image.setAlphaBuffer( m_renderMode.alpha( ) ); m_image.setAlphaBuffer( m_renderMode.alpha( ) );
m_image.fill( tqRgb( 0, 0, 0 ) ); m_image.fill( tqRgb( 0, 0, 0 ) );
m_bPixmapUpToDate = false; m_bPixmapUpToDate = false;
tqrepaint( ); repaint( );
if( !m_pProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) if( !m_pProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{ {

@ -335,7 +335,7 @@ void PMPovrayWidget::slotRenderingFinished( int returnStatus )
{ {
KMessageBox::error( this, i18n( "Povray exited abnormally.\n" KMessageBox::error( this, i18n( "Povray exited abnormally.\n"
"See the povray output for details." ) "See the povray output for details." )
.tqarg( returnStatus ) ); .arg( returnStatus ) );
} }
else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) ) else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) )
{ {
@ -405,7 +405,7 @@ void PMPovrayWidget::showSpeed( double pps )
else else
num.setNum( pps, 'g', 3 ); num.setNum( pps, 'g', 3 );
m_pProgressLabel->setText( i18n( "running, %1 pixels/second" ).tqarg( num ) ); m_pProgressLabel->setText( i18n( "running, %1 pixels/second" ).arg( num ) );
} }
#include "pmpovraywidget.moc" #include "pmpovraywidget.moc"

@ -645,7 +645,7 @@ void PMPrism::controlPoints( PMControlPointList& list )
for( i2 = 0; it2 != ( *it1 ).end( ); ++it2, ++i2 ) for( i2 = 0; it2 != ( *it1 ).end( ); ++it2, ++i2 )
{ {
cp = new PM2DControlPoint( *it2, PM2DControlPoint::PM2DXZ, i2, cp = new PM2DControlPoint( *it2, PM2DControlPoint::PM2DXZ, i2,
i18n( "Point %1.%2" ).tqarg( i1 + 1 ).tqarg( i2 + 1 ) ); i18n( "Point %1.%2" ).arg( i1 + 1 ).arg( i2 + 1 ) );
if( i2 == 0 ) if( i2 == 0 )
firstPoint = cp; firstPoint = cp;
else if( i2 == 1 ) else if( i2 == 1 )
@ -678,7 +678,7 @@ void PMPrism::controlPoints( PMControlPointList& list )
{ {
int i2mod4 = i2 % 4; int i2mod4 = i2 % 4;
cp = new PM2DControlPoint( *it2, PM2DControlPoint::PM2DXZ, i2, cp = new PM2DControlPoint( *it2, PM2DControlPoint::PM2DXZ, i2,
i18n( "Point %1.%2" ).tqarg( i1 + 1 ).tqarg( i2 + 1 ) ); i18n( "Point %1.%2" ).arg( i1 + 1 ).arg( i2 + 1 ) );
if( i2mod4 == 0 ) if( i2mod4 == 0 )
firstPoint = cp; firstPoint = cp;
if( i2mod4 == 2 ) if( i2mod4 == 2 )

@ -206,7 +206,7 @@ void PMPrismEdit::createEdits( const TQValueList< TQValueList<PMVector> >& sp )
{ {
// create all edits for one sub prism // create all edits for one sub prism
hl = new TQHBoxLayout( tvl ); hl = new TQHBoxLayout( tvl );
label = new TQLabel( i18n( "Sub prism %1:" ).tqarg( spnr + 1 ), label = new TQLabel( i18n( "Sub prism %1:" ).arg( spnr + 1 ),
m_pEditWidget ); m_pEditWidget );
hl->addWidget( label ); hl->addWidget( label );
hl->addStretch( 1 ); hl->addStretch( 1 );

@ -394,7 +394,7 @@ void PMRenderManager::renderTask( )
void PMRenderManager::renderObject( PMObject* objectToRender ) void PMRenderManager::renderObject( PMObject* objectToRender )
{ {
bool tqchildren = false; bool children = false;
PMGraphicalObject* go = 0; PMGraphicalObject* go = 0;
m_objectToRenderStack.append( objectToRender ); m_objectToRenderStack.append( objectToRender );
@ -426,8 +426,8 @@ void PMRenderManager::renderObject( PMObject* objectToRender )
{ {
PMObject* obj = 0; PMObject* obj = 0;
tqchildren = objectToRender->lastChild( ) || objectToRender->linkedObject( ); children = objectToRender->lastChild( ) || objectToRender->linkedObject( );
if( tqchildren ) if( children )
{ {
bool stop; bool stop;
@ -438,7 +438,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender )
matrix = new PMMatrix( PMMatrix::modelviewMatrix( ) ); matrix = new PMMatrix( PMMatrix::modelviewMatrix( ) );
m_matrixStack.push( matrix ); m_matrixStack.push( matrix );
// render the tqchildren and the linked object // render the children and the linked object
obj = objectToRender->lastChild( ); obj = objectToRender->lastChild( );
while( obj && !m_bStopTask && !m_bStartTask ) while( obj && !m_bStopTask && !m_bStartTask )
{ {
@ -469,7 +469,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender )
if( !m_bStopTask && !m_bStartTask ) if( !m_bStopTask && !m_bStartTask )
{ {
// tqchildren of the object are rendered // children of the object are rendered
// render the object // render the object
if( objectToRender == m_pCurrentTask->activeObject( ) ) if( objectToRender == m_pCurrentTask->activeObject( ) )
@ -538,7 +538,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender )
} }
if( !m_bStopTask && !m_bStartTask ) if( !m_bStopTask && !m_bStartTask )
{ {
if( tqchildren ) if( children )
{ {
PMMatrix* matrix = m_matrixStack.pop( ); PMMatrix* matrix = m_matrixStack.pop( );
@ -1410,7 +1410,7 @@ void PMRenderManager::renderGrid( )
glVertex2d( screenx, height/2 ); glVertex2d( screenx, height/2 );
glEnd( ); glEnd( );
TQString label = TQString( "%1" ).tqarg( x * signx, 0, 'g', 4 ); TQString label = TQString( "%1" ).arg( x * signx, 0, 'g', 4 );
if( approxZero( x ) && label.find( "e-" ) ) if( approxZero( x ) && label.find( "e-" ) )
label = "0"; label = "0";
@ -1431,7 +1431,7 @@ void PMRenderManager::renderGrid( )
glVertex2d( width/2, screeny ); glVertex2d( width/2, screeny );
glEnd( ); glEnd( );
TQString label = TQString( "%1" ).tqarg( y * signy, 0, 'g', 4 ); TQString label = TQString( "%1" ).arg( y * signy, 0, 'g', 4 );
if( approxZero( y ) && label.find( "e-" ) ) if( approxZero( y ) && label.find( "e-" ) )
label = "0"; label = "0";

@ -160,33 +160,33 @@ TQStringList PMRenderMode::commandLineSwitches( ) const
TQStringList cl; TQStringList cl;
TQString tmp; TQString tmp;
cl.append( TQString( "+W%1" ).tqarg( m_width ) ); cl.append( TQString( "+W%1" ).arg( m_width ) );
cl.append( TQString( "+H%1" ).tqarg( m_height ) ); cl.append( TQString( "+H%1" ).arg( m_height ) );
if( m_subSection ) if( m_subSection )
{ {
if( m_startRow < 1.0 ) if( m_startRow < 1.0 )
tmp.sprintf( "+SR%4.2f", m_startRow ); tmp.sprintf( "+SR%4.2f", m_startRow );
else else
tmp = TQString( "+SR%1" ).tqarg( ( int ) ( m_startRow + 0.5 ) ); tmp = TQString( "+SR%1" ).arg( ( int ) ( m_startRow + 0.5 ) );
cl.append( tmp ); cl.append( tmp );
if( m_endRow < 1.0 ) if( m_endRow < 1.0 )
tmp.sprintf( "+ER%4.2f", m_endRow ); tmp.sprintf( "+ER%4.2f", m_endRow );
else else
tmp = TQString( "+ER%1" ).tqarg( ( int ) ( m_endRow + 0.5 ) ); tmp = TQString( "+ER%1" ).arg( ( int ) ( m_endRow + 0.5 ) );
cl.append( tmp ); cl.append( tmp );
if( m_startColumn < 1.0 ) if( m_startColumn < 1.0 )
tmp.sprintf( "+SC%4.2f", m_startColumn ); tmp.sprintf( "+SC%4.2f", m_startColumn );
else else
tmp = TQString( "+SC%1" ).tqarg( ( int ) ( m_startColumn + 0.5 ) ); tmp = TQString( "+SC%1" ).arg( ( int ) ( m_startColumn + 0.5 ) );
cl.append( tmp ); cl.append( tmp );
if( m_endColumn < 1.0 ) if( m_endColumn < 1.0 )
tmp.sprintf( "+EC%4.2f", m_endColumn ); tmp.sprintf( "+EC%4.2f", m_endColumn );
else else
tmp = TQString( "+EC%1" ).tqarg( ( int ) ( m_endColumn + 0.5 ) ); tmp = TQString( "+EC%1" ).arg( ( int ) ( m_endColumn + 0.5 ) );
cl.append( tmp ); cl.append( tmp );
} }
cl.append( TQString( "+Q%1" ).tqarg( m_quality ) ); cl.append( TQString( "+Q%1" ).arg( m_quality ) );
if( m_radiosity ) if( m_radiosity )
cl.append( TQString( "+QR" ) ); cl.append( TQString( "+QR" ) );
else else
@ -195,7 +195,7 @@ TQStringList PMRenderMode::commandLineSwitches( ) const
if( m_antialiasing ) if( m_antialiasing )
{ {
cl.append( TQString( "+A" ) ); cl.append( TQString( "+A" ) );
cl.append( TQString( "+AM%1" ).tqarg( m_samplingMethod ) ); cl.append( TQString( "+AM%1" ).arg( m_samplingMethod ) );
tmp.sprintf( "+A%5.3f", m_antialiasThreshold ); tmp.sprintf( "+A%5.3f", m_antialiasThreshold );
cl.append( tmp ); cl.append( tmp );
if( m_antialiasJitter ) if( m_antialiasJitter )
@ -205,7 +205,7 @@ TQStringList PMRenderMode::commandLineSwitches( ) const
} }
else else
cl.append( TQString( "-J" ) ); cl.append( TQString( "-J" ) );
cl.append( TQString( "+R%1" ).tqarg( m_antialiasDepth ) ); cl.append( TQString( "+R%1" ).arg( m_antialiasDepth ) );
} }
else else
cl.append( TQString( "-A" ) ); cl.append( TQString( "-A" ) );

@ -577,10 +577,10 @@ void PMScanner::scanError( int c )
m_token = SCANNER_ERROR_TOK; m_token = SCANNER_ERROR_TOK;
if( isprint( c ) ) if( isprint( c ) )
m_error = i18n( "Unexpected character '%1' after \"%2\"" ) m_error = i18n( "Unexpected character '%1' after \"%2\"" )
.tqarg( ( char )c ).tqarg( m_svalue ); .arg( ( char )c ).arg( m_svalue );
else else
m_error = i18n( "Unexpected character %1 after \"%2\"" ) m_error = i18n( "Unexpected character %1 after \"%2\"" )
.tqarg( c, 4, 16 ).tqarg( m_svalue ); .arg( c, 4, 16 ).arg( m_svalue );
#ifdef PMSCAN_DEBUG #ifdef PMSCAN_DEBUG
kdDebug( PMArea ) << "Line " << m_line << ": Error " << m_error << "\n"; kdDebug( PMArea ) << "Line " << m_line << ": Error " << m_error << "\n";

@ -72,7 +72,7 @@ void PMSerializer::printError( const TQString& msg )
else if( m_errors == s_maxErrors ) else if( m_errors == s_maxErrors )
{ {
m_messages += PMMessage( i18n( "Maximum of %1 errors reached." ) m_messages += PMMessage( i18n( "Maximum of %1 errors reached." )
.tqarg( s_maxErrors ) ); .arg( s_maxErrors ) );
m_errors++; m_errors++;
} }
} }
@ -87,7 +87,7 @@ void PMSerializer::printWarning( const TQString& msg )
else if( m_warnings == s_maxWarnings ) else if( m_warnings == s_maxWarnings )
{ {
m_messages += PMMessage( i18n( "Maximum of %1 warnings reached." ) m_messages += PMMessage( i18n( "Maximum of %1 warnings reached." )
.tqarg( s_maxWarnings ) ); .arg( s_maxWarnings ) );
m_warnings++; m_warnings++;
} }
} }

@ -187,13 +187,13 @@ bool PMSettingsDialog::validateData( )
void PMSettingsDialog::saveSettings( ) void PMSettingsDialog::saveSettings( )
{ {
m_tqrepaint = false; m_repaint = false;
TQValueList<PMRegisteredSettingsPage>::const_iterator it; TQValueList<PMRegisteredSettingsPage>::const_iterator it;
for( it = m_pages.begin( ); it != m_pages.end( ); ++it ) for( it = m_pages.begin( ); it != m_pages.end( ); ++it )
( *it ).page->applySettings( ); ( *it ).page->applySettings( );
if( m_tqrepaint ) if( m_repaint )
{ {
PMRenderManager* rm = PMRenderManager::theManager( ); PMRenderManager* rm = PMRenderManager::theManager( );
rm->slotRenderingSettingsChanged( ); rm->slotRenderingSettingsChanged( );
@ -236,7 +236,7 @@ void PMSettingsDialog::registerPage( TQWidget* topPage,
void PMSettingsDialog::slotRepaint( ) void PMSettingsDialog::slotRepaint( )
{ {
m_tqrepaint = true; m_repaint = true;
} }
void PMSettingsDialog::slotShowPage( ) void PMSettingsDialog::slotShowPage( )

@ -179,7 +179,7 @@ private:
bool validateData( ); bool validateData( );
void saveSettings( ); void saveSettings( );
int findPage( const PMSettingsDialogPage* page ); int findPage( const PMSettingsDialogPage* page );
bool m_tqrepaint; bool m_repaint;
TQValueList<PMRegisteredSettingsPage> m_pages; TQValueList<PMRegisteredSettingsPage> m_pages;
PMPart* m_pPart; PMPart* m_pPart;

@ -188,7 +188,7 @@ PMDockWidget* PMShell::createView( const TQString& t, PMViewOptions* o,
PMViewFactory::theFactory( )->viewFactory( t ); PMViewFactory::theFactory( )->viewFactory( t );
m_viewNumber++; m_viewNumber++;
TQString name = TQString( "View (%1)" ).tqarg( m_viewNumber ); TQString name = TQString( "View (%1)" ).arg( m_viewNumber );
if( factory ) if( factory )
{ {
@ -231,7 +231,7 @@ PMDockWidget* PMShell::createTreeView( )
{ {
PMDockWidget* dock = 0; PMDockWidget* dock = 0;
m_numTreeViews++; m_numTreeViews++;
TQString name = TQString( "Object Tree (%1)" ).tqarg( m_numTreeViews ); TQString name = TQString( "Object Tree (%1)" ).arg( m_numTreeViews );
dock = createDockWidget( name, SmallIcon( "pmtreeview" ), dock = createDockWidget( name, SmallIcon( "pmtreeview" ),
0L, i18n( "Object Tree" ), i18n( "Object Tree" ) ); 0L, i18n( "Object Tree" ), i18n( "Object Tree" ) );
dock->setDockSite( PMDockWidget::DockFullSite ); dock->setDockSite( PMDockWidget::DockFullSite );
@ -248,7 +248,7 @@ PMDockWidget* PMShell::createDialogView( )
{ {
PMDockWidget* dock = 0; PMDockWidget* dock = 0;
m_numDialogViews++; m_numDialogViews++;
TQString name = TQString( "Object Properties (%1)" ).tqarg( m_numDialogViews ); TQString name = TQString( "Object Properties (%1)" ).arg( m_numDialogViews );
dock = createDockWidget( name, SmallIcon( "pmdialogview" ), dock = createDockWidget( name, SmallIcon( "pmdialogview" ),
0L, i18n( "Object Properties" ), i18n( "Object Properties" ) ); 0L, i18n( "Object Properties" ), i18n( "Object Properties" ) );
dock->setDockSite( PMDockWidget::DockFullSite ); dock->setDockSite( PMDockWidget::DockFullSite );
@ -265,7 +265,7 @@ PMDockWidget* PMShell::create3DView( PMGLView::PMViewType t )
{ {
PMDockWidget* dock = 0; PMDockWidget* dock = 0;
m_numGLViews++; m_numGLViews++;
TQString name = TQString( "3D View (%1)" ).tqarg( m_numGLViews ); TQString name = TQString( "3D View (%1)" ).arg( m_numGLViews );
dock = createDockWidget( name, SmallIcon( "pmglview" ), dock = createDockWidget( name, SmallIcon( "pmglview" ),
0L, i18n( "3D View" ), i18n( "3D View" ) ); 0L, i18n( "3D View" ), i18n( "3D View" ) );
dock->setDockSite( PMDockWidget::DockFullSite ); dock->setDockSite( PMDockWidget::DockFullSite );

@ -44,7 +44,7 @@ public:
PMSolidObject( const PMSolidObject& s ); PMSolidObject( const PMSolidObject& s );
/** /**
* Deletes the object and all tqchildren * Deletes the object and all children
*/ */
virtual ~PMSolidObject( ); virtual ~PMSolidObject( );
/** */ /** */

@ -421,7 +421,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list )
{ {
lastPoint = cp; lastPoint = cp;
cp = new PMSorControlPoint( lastPoint, *it, PMSorControlPoint::PM2DXY, i, cp = new PMSorControlPoint( lastPoint, *it, PMSorControlPoint::PM2DXY, i,
i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); i18n( "Point %1 (xy)" ).arg( i + 1 ) );
tmp1.append( cp ); tmp1.append( cp );
} }
@ -432,7 +432,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list )
{ {
lastPoint = cp; lastPoint = cp;
cp = new PMSorControlPoint( lastPoint, *it, PMSorControlPoint::PM2DZY, i, cp = new PMSorControlPoint( lastPoint, *it, PMSorControlPoint::PM2DZY, i,
i18n( "Point %1 (yz)" ).tqarg( i + 1 ) ); i18n( "Point %1 (yz)" ).arg( i + 1 ) );
tmp2.append( cp ); tmp2.append( cp );
} }

@ -160,7 +160,7 @@ bool PMSurfaceOfRevolutionEdit::isDataValid( )
{ {
m_pPoints->setCurrentCell( pnr, 1 ); m_pPoints->setCurrentCell( pnr, 1 );
KMessageBox::error( this, i18n( "The v coordinate of point %1 and %2 must be different." ) KMessageBox::error( this, i18n( "The v coordinate of point %1 and %2 must be different." )
.tqarg( pnr + 1 ).tqarg( pnr + 3 ), .arg( pnr + 1 ).arg( pnr + 3 ),
i18n( "Error" ) ); i18n( "Error" ) );
return false; return false;
} }

@ -434,19 +434,19 @@ void PMSphereSweep::controlPoints( PMControlPointList& list )
it != m_points.end( ) && it2 != m_radii.end( ); ++it, ++it2, ++nr ) it != m_points.end( ) && it2 != m_radii.end( ); ++it, ++it2, ++nr )
{ {
PM3DControlPoint* p = new PM3DControlPoint( *it, i++, PM3DControlPoint* p = new PM3DControlPoint( *it, i++,
i18n( "Center %1" ).tqarg( nr ) ); i18n( "Center %1" ).arg( nr ) );
list.append( p ); list.append( p );
list.append( new PMDistanceControlPoint( p, PMVector( 1.0, 0.0, 0.0 ), list.append( new PMDistanceControlPoint( p, PMVector( 1.0, 0.0, 0.0 ),
*it2, i++, *it2, i++,
i18n( "Radius %1 (x)" ).tqarg( nr ), i18n( "Radius %1 (x)" ).arg( nr ),
true ) ); true ) );
list.append( new PMDistanceControlPoint( p, PMVector( 0.0, 1.0, 0.0 ), list.append( new PMDistanceControlPoint( p, PMVector( 0.0, 1.0, 0.0 ),
*it2, i++, *it2, i++,
i18n( "Radius %1 (y)" ).tqarg( nr ), i18n( "Radius %1 (y)" ).arg( nr ),
true ) ); true ) );
list.append( new PMDistanceControlPoint( p, PMVector( 0.0, 0.0, 1.0 ), list.append( new PMDistanceControlPoint( p, PMVector( 0.0, 0.0, 1.0 ),
*it2, i++, *it2, i++,
i18n( "Radius %1 (z)" ).tqarg( nr ), i18n( "Radius %1 (z)" ).arg( nr ),
true ) ); true ) );
} }
} }

@ -94,7 +94,7 @@ TQString PMSymbolTable::findNewID( const TQString& prefix )
// find next free id // find next free id
do do
{ {
testID = prefix + TQString( "%1" ).tqarg( number ); testID = prefix + TQString( "%1" ).arg( number );
symbol = find( testID ); symbol = find( testID );
if( symbol ) if( symbol )
number++; number++;

@ -150,7 +150,7 @@ void PMTextureBase::readAttributes( const PMXMLHelper& h )
} }
else else
h.parser( )->printError( i18n( "Declare \"%1\" has wrong type." ) h.parser( )->printError( i18n( "Declare \"%1\" has wrong type." )
.tqarg( id ) ); .arg( id ) );
} }
} }
} }

@ -119,7 +119,7 @@ TQString PMTextureMapBase::valuesToString( ) const
str.setNum( *it ); str.setNum( *it );
++it; ++it;
for( ; it != m_mapValues.end( ); ++it ) for( ; it != m_mapValues.end( ); ++it )
str += TQString( " %1" ).tqarg( *it ); str += TQString( " %1" ).arg( *it );
} }
return str; return str;
} }

@ -292,7 +292,7 @@ void PMTreeView::addChildItems( PMTreeViewItem* item )
else else
// first child // first child
listItem = new PMTreeViewItem( obj, item ); listItem = new PMTreeViewItem( obj, item );
// recursive call, if child has tqchildren // recursive call, if child has children
if( obj->countChildren( ) > 0 ) if( obj->countChildren( ) > 0 )
addChildItems( listItem ); addChildItems( listItem );
} }

@ -78,7 +78,7 @@ void PMTreeViewItem::setDescriptions( )
{ {
PMTextureMapBase* tm = ( PMTextureMapBase* ) m_pObject->parent( ); PMTextureMapBase* tm = ( PMTextureMapBase* ) m_pObject->parent( );
if( m_pObject->type( ) == tm->mapType( ) ) if( m_pObject->type( ) == tm->mapType( ) )
text = TQString( "[%1] " ).tqarg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text; text = TQString( "[%1] " ).arg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text;
} }
} }
setText( 0, text ); setText( 0, text );
@ -113,5 +113,5 @@ void PMTreeViewItem::initSelection( )
{ {
TQListViewItem::setSelected( m_pObject->isSelected( ) ); TQListViewItem::setSelected( m_pObject->isSelected( ) );
// if( m_pObject->isSelected( ) ) // if( m_pObject->isSelected( ) )
// tqrepaint( ); // repaint( );
} }

@ -41,17 +41,17 @@ public:
PMTreeViewItem( PMObject* object, TQListView* parent ); PMTreeViewItem( PMObject* object, TQListView* parent );
/** /**
* Constructs a new list view item which is a child of parent and * Constructs a new list view item which is a child of parent and
* first in the parent's list of tqchildren. * first in the parent's list of children.
*/ */
PMTreeViewItem( PMObject* object, TQListViewItem* parent ); PMTreeViewItem( PMObject* object, TQListViewItem* parent );
/** /**
* Constructs a list view item which is a child of parent * Constructs a list view item which is a child of parent
* and is after after in the parent's list of tqchildren. * and is after after in the parent's list of children.
*/ */
PMTreeViewItem( PMObject* object, TQListView* parent, TQListViewItem* after ); PMTreeViewItem( PMObject* object, TQListView* parent, TQListViewItem* after );
/** /**
* Constructs a list view item which is a child of parent * Constructs a list view item which is a child of parent
* and is after after in the parent's list of tqchildren. * and is after after in the parent's list of children.
*/ */
PMTreeViewItem( PMObject* object, TQListViewItem* parent, PMTreeViewItem( PMObject* object, TQListViewItem* parent,
TQListViewItem* after ); TQListViewItem* after );
@ -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
* parents list of tqchildren * parents list of children
*/ */
virtual TQString key( int column, bool ascending ) const; virtual TQString key( int column, bool ascending ) const;
/** /**

@ -55,21 +55,21 @@ void PMTriangleEdit::createTopWidgets( )
for( i = 0; i < 3; i++ ) for( i = 0; i < 3; i++ )
{ {
m_pPoint[i] = new PMVectorEdit( "x", "y", "z", this ); m_pPoint[i] = new PMVectorEdit( "x", "y", "z", this );
gl->addWidget( new TQLabel( i18n( "Point %1:" ).tqarg( i+1 ), this ), gl->addWidget( new TQLabel( i18n( "Point %1:" ).arg( i+1 ), this ),
i * 3, 0 ); i * 3, 0 );
gl->addWidget( m_pPoint[i], i * 3, 1 ); gl->addWidget( m_pPoint[i], i * 3, 1 );
connect( m_pPoint[i], TQT_SIGNAL( dataChanged( ) ), connect( m_pPoint[i], TQT_SIGNAL( dataChanged( ) ),
TQT_SIGNAL( dataChanged( ) ) ); TQT_SIGNAL( dataChanged( ) ) );
m_pNormal[i] = new PMVectorEdit( "x", "y", "z", this ); m_pNormal[i] = new PMVectorEdit( "x", "y", "z", this );
m_pNormalLabel[i] = new TQLabel( i18n( "Normal %1:" ).tqarg( i+1 ), this ); m_pNormalLabel[i] = new TQLabel( i18n( "Normal %1:" ).arg( i+1 ), this );
gl->addWidget( m_pNormalLabel[i], i * 3 + 1, 0 ); gl->addWidget( m_pNormalLabel[i], i * 3 + 1, 0 );
gl->addWidget( m_pNormal[i], i * 3 + 1, 1 ); gl->addWidget( m_pNormal[i], i * 3 + 1, 1 );
connect( m_pNormal[i], TQT_SIGNAL( dataChanged( ) ), connect( m_pNormal[i], TQT_SIGNAL( dataChanged( ) ),
TQT_SIGNAL( dataChanged( ) ) ); TQT_SIGNAL( dataChanged( ) ) );
m_pUVVector[i] = new PMVectorEdit( "u", "v", this ); m_pUVVector[i] = new PMVectorEdit( "u", "v", this );
m_pUVVectorLabel[i] = new TQLabel( i18n( "UV vector %1:" ).tqarg( i+1 ), this ); m_pUVVectorLabel[i] = new TQLabel( i18n( "UV vector %1:" ).arg( i+1 ), this );
gl->addWidget( m_pUVVectorLabel[i], i * 3 + 2, 0 ); gl->addWidget( m_pUVVectorLabel[i], i * 3 + 2, 0 );
gl->addWidget( m_pUVVector[i], i * 3 + 2, 1 ); gl->addWidget( m_pUVVector[i], i * 3 + 2, 1 );
connect( m_pUVVector[i], TQT_SIGNAL( dataChanged( ) ), connect( m_pUVVector[i], TQT_SIGNAL( dataChanged( ) ),

@ -25,7 +25,7 @@ PMUnknownView::PMUnknownView( const TQString& viewType,
{ {
TQHBoxLayout* hl = new TQHBoxLayout( this ); TQHBoxLayout* hl = new TQHBoxLayout( this );
TQLabel* l; TQLabel* l;
l = new TQLabel( i18n( "Unknown view type \"%1\"" ).tqarg( viewType ), this ); l = new TQLabel( i18n( "Unknown view type \"%1\"" ).arg( viewType ), this );
l->setAlignment( TQt::AlignCenter ); l->setAlignment( TQt::AlignCenter );
hl->addWidget( l ); hl->addWidget( l );
m_viewType = viewType; m_viewType = viewType;

@ -53,7 +53,7 @@ void PMTableItem::paint( TQPainter* p, const TQColorGroup& cg,
else else
p->setPen( cg.text( ) ); p->setPen( cg.text( ) );
p->drawText( x + 2, 0, w - x - 4, h, p->drawText( x + 2, 0, w - x - 4, h,
wordWrap( ) ? ( tqalignment( ) | WordBreak ) : tqalignment( ), text( ) ); wordWrap( ) ? ( alignment( ) | WordBreak ) : alignment( ), text( ) );
} }
*/ */
@ -256,7 +256,7 @@ void PMVectorListEdit::setLink( int p1, int p2 )
if( p2 >= 0 ) if( p2 >= 0 )
{ {
m_disabled[p2] = true; m_disabled[p2] = true;
str = TQString( "%1 (=%2)" ).tqarg( p2 + 1 ).tqarg( p1 + 1 ); str = TQString( "%1 (=%2)" ).arg( p2 + 1 ).arg( p1 + 1 );
h->setLabel( p2, str ); h->setLabel( p2, str );
if( !isReadOnly( ) ) if( !isReadOnly( ) )
setRowReadOnly( p2, true ); setRowReadOnly( p2, true );

@ -143,7 +143,7 @@ void PMXMLParser::parseChildObjects( TQDomElement& e, PMObject* parent )
delete obj; delete obj;
} }
else if( ce.tagName( ) != "extra_data" ) else if( ce.tagName( ) != "extra_data" )
printError( i18n( "Unknown object %1" ).tqarg( ce.tagName( ) ) ); printError( i18n( "Unknown object %1" ).arg( ce.tagName( ) ) );
} }
c = c.nextSibling( ); c = c.nextSibling( );
} }

@ -165,7 +165,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){
mMenu->insertItem(SmallIcon( "help" ), KStdGuiItem::help().text(), helpMenu()); mMenu->insertItem(SmallIcon( "help" ), KStdGuiItem::help().text(), helpMenu());
mMenu->insertSeparator(); mMenu->insertSeparator();
mMenu->insertItem(SmallIcon( "exit" ), KStdGuiItem::quit().text(), kapp, TQT_SLOT(quit()), CTRL+Key_Q); mMenu->insertItem(SmallIcon( "exit" ), KStdGuiItem::quit().text(), kapp, TQT_SLOT(quit()), CTRL+Key_Q);
mLastClickPos = tqgeometry().topLeft()+TQPoint(width()/2, height()/2); mLastClickPos = geometry().topLeft()+TQPoint(width()/2, height()/2);
} }
KLineal::~KLineal(){ KLineal::~KLineal(){
@ -293,7 +293,7 @@ void KLineal::setOrientation(int inOrientation) {
mLenMenu->changeItem(FULLSCREENID, mOrientation % 2 ? i18n("&Full Screen Height") : i18n("&Full Screen Width")); mLenMenu->changeItem(FULLSCREENID, mOrientation % 2 ? i18n("&Full Screen Height") : i18n("&Full Screen Width"));
setCursor(mCurrentCursor); setCursor(mCurrentCursor);
setupBackground(); setupBackground();
tqrepaint(); repaint();
} }
void KLineal::setNorth() { void KLineal::setNorth() {
setOrientation(North); setOrientation(North);
@ -390,7 +390,7 @@ void KLineal::choseFont() {
void KLineal::setFont(TQFont &font) { void KLineal::setFont(TQFont &font) {
mScaleFont = font; mScaleFont = font;
saveSettings(); saveSettings();
tqrepaint(); repaint();
} }
@ -451,7 +451,7 @@ void KLineal::enterEvent(TQEvent * /*inEvent*/) {
* overwritten to switch the value label and line cursor off * overwritten to switch the value label and line cursor off
*/ */
void KLineal::leaveEvent(TQEvent * /*inEvent*/) { void KLineal::leaveEvent(TQEvent * /*inEvent*/) {
if (!tqgeometry().contains(TQCursor::pos())) { if (!geometry().contains(TQCursor::pos())) {
hideLabel(); hideLabel();
} }
} }
@ -569,7 +569,7 @@ void KLineal::mousePressEvent(TQMouseEvent *inEvent) {
mLastClickPos = TQCursor::pos(); mLastClickPos = TQCursor::pos();
hideLabel(); hideLabel();
TQRect gr = tqgeometry(); TQRect gr = geometry();
mDragOffset = mLastClickPos - TQPoint(gr.left(), gr.top()); mDragOffset = mLastClickPos - TQPoint(gr.left(), gr.top());
if (inEvent->button() == Qt::LeftButton) { if (inEvent->button() == Qt::LeftButton) {
if (!mDragging) { if (!mDragging) {

@ -162,7 +162,7 @@ bool KSnapshot::save( const KURL& url )
{ {
if ( KIO::NetAccess::exists( url, false, this ) ) { if ( KIO::NetAccess::exists( url, false, this ) ) {
const TQString title = i18n( "File Exists" ); const TQString title = i18n( "File Exists" );
const TQString text = i18n( "<qt>Do you really want to overwrite <b>%1</b>?</qt>" ).tqarg(url.prettyURL()); const TQString text = i18n( "<qt>Do you really want to overwrite <b>%1</b>?</qt>" ).arg(url.prettyURL());
if (KMessageBox::Continue != KMessageBox::warningContinueCancel( this, text, title, i18n("Overwrite") ) ) if (KMessageBox::Continue != KMessageBox::warningContinueCancel( this, text, title, i18n("Overwrite") ) )
{ {
return false; return false;
@ -199,7 +199,7 @@ bool KSnapshot::save( const KURL& url )
TQString caption = i18n("Unable to save image"); TQString caption = i18n("Unable to save image");
TQString text = i18n("KSnapshot was unable to save the image to\n%1.") TQString text = i18n("KSnapshot was unable to save the image to\n%1.")
.tqarg(url.prettyURL()); .arg(url.prettyURL());
KMessageBox::error(this, text, caption); KMessageBox::error(this, text, caption);
} }

@ -47,7 +47,7 @@ void KSnapshotWidget::setPreview( const TQPixmap &pm )
TQToolTip::remove( lblImage ); TQToolTip::remove( lblImage );
TQToolTip::add( lblImage, TQToolTip::add( lblImage,
TQString( "Preview of the snapshot image (%1 x %2)" ) TQString( "Preview of the snapshot image (%1 x %2)" )
.tqarg( pm.width() ).tqarg( pm.height() ) ); .arg( pm.width() ).arg( pm.height() ) );
lblImage->setPixmap( img ); lblImage->setPixmap( img );
lblImage->adjustSize(); lblImage->adjustSize();

@ -41,8 +41,8 @@ SizeTip::SizeTip( TQWidget *parent, const char *name )
void SizeTip::setTip( const TQRect &rect ) void SizeTip::setTip( const TQRect &rect )
{ {
TQString tip = TQString( "%1x%2" ).tqarg( rect.width() ) TQString tip = TQString( "%1x%2" ).arg( rect.width() )
.tqarg( rect.height() ); .arg( rect.height() );
setText( tip ); setText( tip );
adjustSize(); adjustSize();
@ -52,7 +52,7 @@ void SizeTip::setTip( const TQRect &rect )
void SizeTip::positionTip( const TQRect &rect ) void SizeTip::positionTip( const TQRect &rect )
{ {
TQRect tipRect = tqgeometry(); TQRect tipRect = geometry();
tipRect.moveTopLeft( TQPoint( 0, 0 ) ); tipRect.moveTopLeft( TQPoint( 0, 0 ) );
if ( rect.intersects( tipRect ) ) if ( rect.intersects( tipRect ) )
@ -61,7 +61,7 @@ void SizeTip::positionTip( const TQRect &rect )
tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) );
if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) )
tipRect.moveBottomRight( tqgeometry().bottomRight() ); tipRect.moveBottomRight( geometry().bottomRight() );
} }
move( tipRect.topLeft() ); move( tipRect.topLeft() );
@ -92,7 +92,7 @@ void RegionGrabber::initGrabber()
TQDesktopWidget desktopWidget; TQDesktopWidget desktopWidget;
TQRect desktopSize; TQRect desktopSize;
if ( desktopWidget.isVirtualDesktop() ) if ( desktopWidget.isVirtualDesktop() )
desktopSize = desktopWidget.tqgeometry(); desktopSize = desktopWidget.geometry();
else else
desktopSize = desktopWidget.screenGeometry( qt_xrootwin() ); desktopSize = desktopWidget.screenGeometry( qt_xrootwin() );

@ -39,7 +39,7 @@ bool operator< ( const TQRect& r1, const TQRect& r2 )
return r1.width() * r1.height() < r2.width() * r2.height(); return r1.width() * r1.height() < r2.width() * r2.height();
} }
// Recursively iterates over the window w and its tqchildren, thereby building // Recursively iterates over the window w and its children, thereby building
// a tree of window descriptors. Windows in non-viewable state or with height // a tree of window descriptors. Windows in non-viewable state or with height
// or width smaller than minSize will be ignored. // or width smaller than minSize will be ignored.
static static
@ -62,15 +62,15 @@ void getWindowsRecursive( std::vector<TQRect>& windows, Window w,
} }
Window root, parent; Window root, parent;
Window* tqchildren; Window* children;
unsigned int ntqchildren; unsigned int nchildren;
if( XQueryTree( qt_xdisplay(), w, &root, &parent, &tqchildren, &ntqchildren ) != 0 ) { if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) {
for( unsigned int i = 0; i < ntqchildren; ++i ) { for( unsigned int i = 0; i < nchildren; ++i ) {
getWindowsRecursive( windows, tqchildren[ i ], x, y, depth + 1 ); getWindowsRecursive( windows, children[ i ], x, y, depth + 1 );
} }
if( tqchildren != NULL ) if( children != NULL )
XFree( tqchildren ); XFree( children );
} }
} }
if ( depth == 0 ) if ( depth == 0 )
@ -95,16 +95,16 @@ Window findRealWindow( Window w, int depth = 0 )
return w; return w;
} }
Window root, parent; Window root, parent;
Window* tqchildren; Window* children;
unsigned int ntqchildren; unsigned int nchildren;
Window ret = None; Window ret = None;
if( XQueryTree( qt_xdisplay(), w, &root, &parent, &tqchildren, &ntqchildren ) != 0 ) { if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) {
for( unsigned int i = 0; for( unsigned int i = 0;
i < ntqchildren && ret == None; i < nchildren && ret == None;
++i ) ++i )
ret = findRealWindow( tqchildren[ i ], depth + 1 ); ret = findRealWindow( children[ i ], depth + 1 );
if( tqchildren != NULL ) if( children != NULL )
XFree( tqchildren ); XFree( children );
} }
return ret; return ret;
} }
@ -143,7 +143,7 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
int count, order; int count, order;
XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child, XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child,
ShapeBounding, &count, &order ); ShapeBounding, &count, &order );
//The ShapeBounding region is the outermost tqshape of the window; //The ShapeBounding region is the outermost shape of the window;
//ShapeBounding - ShapeClipping is defined to be the border. //ShapeBounding - ShapeClipping is defined to be the border.
//Since the border area is part of the window, we use bounding //Since the border area is part of the window, we use bounding
// to limit our work region // to limit our work region
@ -168,7 +168,7 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
//Get the masked away area. //Get the masked away area.
TQRegion maskedAway = bbox - contents; TQRegion maskedAway = bbox - contents;
TQMemArray<TQRect> maskedAwayRects = maskedAway.tqrects(); TQMemArray<TQRect> maskedAwayRects = maskedAway.rects();
//Construct a bitmap mask from the rectangles //Construct a bitmap mask from the rectangles
TQPainter p(&mask); TQPainter p(&mask);
@ -219,12 +219,12 @@ TQPixmap WindowGrabber::grabCurrent( bool includeDecorations )
Window child = windowUnderCursor( includeDecorations ); Window child = windowUnderCursor( includeDecorations );
XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth ); XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth );
Window parent; Window parent;
Window* tqchildren; Window* children;
unsigned int ntqchildren; unsigned int nchildren;
if( XQueryTree( qt_xdisplay(), child, &root, &parent, if( XQueryTree( qt_xdisplay(), child, &root, &parent,
&tqchildren, &ntqchildren ) != 0 ) { &children, &nchildren ) != 0 ) {
if( tqchildren != NULL ) if( children != NULL )
XFree( tqchildren ); XFree( children );
int newx, newy; int newx, newy;
Window dummy; Window dummy;
if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(), if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(),
@ -339,7 +339,7 @@ int WindowGrabber::windowIndex( const TQPoint &pos ) const
// Draws a border around the (child) window currently containing the pointer // Draws a border around the (child) window currently containing the pointer
void WindowGrabber::drawBorder() void WindowGrabber::drawBorder()
{ {
tqrepaint(); repaint();
if ( current >= 0 ) { if ( current >= 0 ) {
TQPainter p; TQPainter p;

@ -380,7 +380,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
params->setTextPathStartOffset(pathAdvance); params->setTextPathStartOffset(pathAdvance);
if(tp && tp->dy()->baseVal()->numberOfItems() > 0) if(tp && tp->dy()->baseVal()->numberOfItems() > 0)
pathDy += tp->dy()->baseVal()->getItem(0)->value(); pathDy += tp->dy()->baseVal()->getItem(0)->value();
TQString shift = TQString("%1%%").tqarg((pathDy / font->fontParams()->size()) * -100.0); TQString shift = TQString("%1%%").arg((pathDy / font->fontParams()->size()) * -100.0);
params->setBaselineShift(shift.latin1()); params->setBaselineShift(shift.latin1());
} }
@ -484,26 +484,26 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
// ##### // #####
void MarkerHelper::doMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle, const TQString &markerId) void MarkerHelper::doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const TQString &markerId)
{ {
SVGMarkerElementImpl *marker = dynamic_cast<SVGMarkerElementImpl *>(tqshape->ownerSVGElement()->getElementById(markerId)); SVGMarkerElementImpl *marker = dynamic_cast<SVGMarkerElementImpl *>(shape->ownerSVGElement()->getElementById(markerId));
if(marker) if(marker)
marker->draw(tqshape, x, y, style->getStrokeWidth()->baseVal()->value(), angle); marker->draw(shape, x, y, style->getStrokeWidth()->baseVal()->value(), angle);
} }
void MarkerHelper::doStartMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle) void MarkerHelper::doStartMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle)
{ {
doMarker(tqshape, style, x, y, angle, style->getStartMarker()); doMarker(shape, style, x, y, angle, style->getStartMarker());
} }
void MarkerHelper::doMidMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle) void MarkerHelper::doMidMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle)
{ {
doMarker(tqshape, style, x, y, angle, style->getMidMarker()); doMarker(shape, style, x, y, angle, style->getMidMarker());
} }
void MarkerHelper::doEndMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle) void MarkerHelper::doEndMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle)
{ {
doMarker(tqshape, style, x, y, angle, style->getEndMarker()); doMarker(shape, style, x, y, angle, style->getEndMarker());
} }
// vim:ts=4:noet // vim:ts=4:noet

@ -80,12 +80,12 @@ protected:
class MarkerHelper class MarkerHelper
{ {
protected: protected:
void doStartMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle = 0.0); void doStartMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0);
void doMidMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle = 0.0); void doMidMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0);
void doEndMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle = 0.0); void doEndMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0);
private: private:
void doMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle, const TQString &marker); void doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const TQString &marker);
}; };
class CanvasText : public CanvasItem class CanvasText : public CanvasItem

@ -362,7 +362,7 @@ T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) cons
return fontVisualParams; return fontVisualParams;
} }
void KSVGCanvas::tqinvalidate(CanvasItem *item, bool recalc) void KSVGCanvas::invalidate(CanvasItem *item, bool recalc)
{ {
if(m_chunksByItem.find(item) != m_chunksByItem.end()) if(m_chunksByItem.find(item) != m_chunksByItem.end())
{ {
@ -395,7 +395,7 @@ void KSVGCanvas::insert(CanvasItem *item, int z)
bool visible = item->isVisible(); bool visible = item->isVisible();
if(visible) if(visible)
tqinvalidate(item, false); invalidate(item, false);
if(m_immediateUpdate) if(m_immediateUpdate)
{ {
@ -462,15 +462,15 @@ void KSVGCanvas::addToChunks(CanvasItem *item)
unsigned int KSVGCanvas::setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z) unsigned int KSVGCanvas::setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
if(tqshape) if(shape)
{ {
CanvasItem *item = tqshape->item(); CanvasItem *item = shape->item();
if(item) if(item)
{ {
SVGImageElementImpl *image = dynamic_cast<SVGImageElementImpl *>(tqshape); SVGImageElementImpl *image = dynamic_cast<SVGImageElementImpl *>(shape);
if(image && image->svgImageRootElement()) if(image && image->svgImageRootElement())
{ {
@ -481,7 +481,7 @@ unsigned int KSVGCanvas::setElementItemZIndexRecursive(SVGElementImpl *element,
else else
{ {
item->setZIndex(z); item->setZIndex(z);
tqinvalidate(item, false); invalidate(item, false);
z++; z++;
} }
} }
@ -766,7 +766,7 @@ void KSVGCanvas::blit()
void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk) void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk)
{ {
TQString key = TQString("%1 %2").tqarg(chunk->x()).tqarg(chunk->y()); TQString key = TQString("%1 %2").arg(chunk->x()).arg(chunk->y());
// kdDebug(26005) << k_funcinfo << "Adding chunk : " << chunk << endl; // kdDebug(26005) << k_funcinfo << "Adding chunk : " << chunk << endl;
m_chunks.insert(key, chunk); m_chunks.insert(key, chunk);
} }
@ -774,7 +774,7 @@ void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk)
CanvasChunk *KSVGCanvas::ChunkManager::getChunk(short x, short y) const CanvasChunk *KSVGCanvas::ChunkManager::getChunk(short x, short y) const
{ {
// kdDebug(26005) << k_funcinfo << "getting chunk from : " << x << ", " << y << endl; // kdDebug(26005) << k_funcinfo << "getting chunk from : " << x << ", " << y << endl;
TQString key = TQString("%1 %2").tqarg(x).tqarg(y); TQString key = TQString("%1 %2").arg(x).arg(y);
return m_chunks[key]; return m_chunks[key];
} }

@ -75,7 +75,7 @@ public:
void update(const TQPoint &panPoint, bool erase = true); void update(const TQPoint &panPoint, bool erase = true);
void resize(unsigned int w, unsigned int h); void resize(unsigned int w, unsigned int h);
void retune(unsigned int csh, unsigned int csv); void retune(unsigned int csh, unsigned int csv);
void tqinvalidate(CanvasItem *item, bool recalc = true); void invalidate(CanvasItem *item, bool recalc = true);
CanvasItemList collisions(const TQPoint &p, bool exact = false) const; CanvasItemList collisions(const TQPoint &p, bool exact = false) const;
void setBackgroundColor(const TQColor &c) { m_backgroundColor = c; } void setBackgroundColor(const TQColor &c) { m_backgroundColor = c; }
@ -126,7 +126,7 @@ public:
T2P::FontVisualParams *fontVisualParams(SVGStylableImpl *style) const; T2P::FontVisualParams *fontVisualParams(SVGStylableImpl *style) const;
virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const { Q_UNUSED(item); return 0; } virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const { Q_UNUSED(item); return 0; }
// Assign z indices to the element and its tqchildren, starting with z, and // Assign z indices to the element and its children, starting with z, and
// return the next z value to be used. // return the next z value to be used.
unsigned int setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z); unsigned int setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z);

@ -146,13 +146,13 @@ SVGSVGElementImpl *Helper::nextSVGElement(SVGElementImpl *elem)
SVGSVGElementImpl *Helper::nextSVGElement(DOM::Node elem) SVGSVGElementImpl *Helper::nextSVGElement(DOM::Node elem)
{ {
DOM::Node foundSVG; DOM::Node foundSVG;
DOM::Node tqshape = elem.parentNode(); DOM::Node shape = elem.parentNode();
for(; !tqshape.isNull(); tqshape = tqshape.parentNode()) for(; !shape.isNull(); shape = shape.parentNode())
{ {
if(reinterpret_cast<DOM::Element &>(tqshape).nodeName() == "svg") if(reinterpret_cast<DOM::Element &>(shape).nodeName() == "svg")
{ {
foundSVG = tqshape; foundSVG = shape;
break; break;
} }
} }
@ -245,7 +245,7 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &,
SVGLengthImpl *height = SVGSVGElementImpl::createSVGLength(); SVGLengthImpl *height = SVGSVGElementImpl::createSVGLength();
width->setValueAsString(svg->getAttribute("width").string()); width->setValueAsString(svg->getAttribute("width").string());
height->setValueAsString(svg->getAttribute("height").string()); height->setValueAsString(svg->getAttribute("height").string());
TQString viewbox = TQString("0 0 %1 %2").tqarg(width->value()).tqarg(height->value()); TQString viewbox = TQString("0 0 %1 %2").arg(width->value()).arg(height->value());
//kdDebug(26001) << "VIEWBOX : " << viewbox.latin1() << endl; //kdDebug(26001) << "VIEWBOX : " << viewbox.latin1() << endl;
svg->setAttribute("viewBox", viewbox); svg->setAttribute("viewBox", viewbox);
width->deref(); width->deref();
@ -349,7 +349,7 @@ bool InputHandler::endElement(const TQString &, const TQString &, const TQString
SVGSVGElementImpl *root = Helper::self()->nextSVGElement(*m_currentNode); SVGSVGElementImpl *root = Helper::self()->nextSVGElement(*m_currentNode);
SVGElementImpl *element = root ? root->ownerDoc()->getElementFromHandle(m_currentNode->handle()) : Helper::self()->doc()->getElementFromHandle(m_currentNode->handle()); SVGElementImpl *element = root ? root->ownerDoc()->getElementFromHandle(m_currentNode->handle()) : Helper::self()->doc()->getElementFromHandle(m_currentNode->handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
@ -386,7 +386,7 @@ bool InputHandler::endElement(const TQString &, const TQString &, const TQString
if(haveCanvas && (tests ? tests->ok() : true)) if(haveCanvas && (tests ? tests->ok() : true))
{ {
if((tqshape && !tqshape->isContainer()) || (!tqshape && element)) if((shape && !shape->isContainer()) || (!shape && element))
element->createItem(); element->createItem();
} }
} }
@ -397,7 +397,7 @@ bool InputHandler::endElement(const TQString &, const TQString &, const TQString
m_noRendering = false; m_noRendering = false;
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(haveCanvas && element && style && ok && style->getDisplay() && style->getVisible() && qName == "pattern" || (tqshape && tqshape->directRender())) if(haveCanvas && element && style && ok && style->getDisplay() && style->getVisible() && qName == "pattern" || (shape && shape->directRender()))
element->createItem(); element->createItem();
} }
@ -429,7 +429,7 @@ bool InputHandler::fatalError(const TQXmlParseException &e)
Helper::self()->setErrorDescription(TQString()); Helper::self()->setErrorDescription(TQString());
} }
else else
error = TQString("[%1:%2]: FATAL ERROR: %3").tqarg(e.lineNumber()).tqarg(e.columnNumber()).tqarg(e.message()); error = TQString("[%1:%2]: FATAL ERROR: %3").arg(e.lineNumber()).arg(e.columnNumber()).arg(e.message());
kdDebug(26001) << "InputHandler::fatalError, " << error << endl; kdDebug(26001) << "InputHandler::fatalError, " << error << endl;

@ -51,7 +51,7 @@ class SVGAnimatedLength;
* point and radius. * point and radius.
* *
* For more info look here : <a href = * For more info look here : <a href =
* "http://www.w3.org/TR/SVG/tqshapes.html#CircleElement">9.3 The * "http://www.w3.org/TR/SVG/shapes.html#CircleElement">9.3 The
* 'circle' element</a>. * 'circle' element</a>.
*/ */
class SVGCircleElement : public SVGElement, class SVGCircleElement : public SVGElement,

@ -52,7 +52,7 @@ class SVGEllipseElementImpl;
* center point and two radii. * center point and two radii.
* *
* For more info look here : <a href = * For more info look here : <a href =
* "http://www.w3.org/TR/SVG/tqshapes.html#EllipseElement">9.4 The * "http://www.w3.org/TR/SVG/shapes.html#EllipseElement">9.4 The
* 'ellipse' element</a>. * 'ellipse' element</a>.
*/ */
class SVGEllipseElement : public SVGElement, class SVGEllipseElement : public SVGElement,

@ -77,7 +77,7 @@ void SVGLength::setValue(float value)
{ {
impl->setValue(value); impl->setValue(value);
// Automatic updating of the tqshape if any value is changed, imagine: // Automatic updating of the shape if any value is changed, imagine:
// SVGCircleElement c; [...] c.r().baseVal().setValue(150); // SVGCircleElement c; [...] c.r().baseVal().setValue(150);
if(impl->context() && dynamic_cast<SVGShapeImpl *>(impl->context())) if(impl->context() && dynamic_cast<SVGShapeImpl *>(impl->context()))
dynamic_cast<SVGShapeImpl *>(impl->context())->update(UPDATE_TRANSFORM, 0, 0); dynamic_cast<SVGShapeImpl *>(impl->context())->update(UPDATE_TRANSFORM, 0, 0);

@ -51,7 +51,7 @@ class SVGLineElementImpl;
* one point and ends at another. * one point and ends at another.
* *
* For more info look here : <a href = * For more info look here : <a href =
* "http://www.w3.org/TR/SVG/tqshapes.html#CircleElement">9.5 The * "http://www.w3.org/TR/SVG/shapes.html#CircleElement">9.5 The
* 'line' element</a>. * 'line' element</a>.
*/ */
class SVGLineElement : public SVGElement, class SVGLineElement : public SVGElement,

@ -66,7 +66,7 @@ public:
/** /**
* Returns the tight bounding box in current user space (i.e., after application of * Returns the tight bounding box in current user space (i.e., after application of
* the <code>transform</code> attribute, if any) on the tqgeometry of all contained graphics * the <code>transform</code> attribute, if any) on the geometry of all contained graphics
* elements, exclusive of stroke-width and filter effects). * elements, exclusive of stroke-width and filter effects).
* *
* @return An SVGRect object that defines the bounding box. * @return An SVGRect object that defines the bounding box.

@ -48,11 +48,11 @@ class SVGPointList;
class SVGPolygonElementImpl; class SVGPolygonElementImpl;
/** /**
* The <code>polygon</code> element defines a closed tqshape consisting * The <code>polygon</code> element defines a closed shape consisting
* of connected straight line segments. * of connected straight line segments.
* *
* For more info look here : <a href = * For more info look here : <a href =
* "http://www.w3.org/TR/SVG/tqshapes.html#PolylineElement">9.7 The * "http://www.w3.org/TR/SVG/shapes.html#PolylineElement">9.7 The
* 'polygon' element</a>. * 'polygon' element</a>.
*/ */
class SVGPolygonElement : public SVGElement, class SVGPolygonElement : public SVGElement,

@ -47,10 +47,10 @@ namespace KSVG
/** /**
* The <code>polyline</code> element defines a set of connected * The <code>polyline</code> element defines a set of connected
* straight line segments. Typically, <code>polyline</code> elements * straight line segments. Typically, <code>polyline</code> elements
* define open tqshapes. * define open shapes.
* *
* For more info look here : <a href = * For more info look here : <a href =
* "http://www.w3.org/TR/SVG/tqshapes.html#PolylineElement">9.6 The * "http://www.w3.org/TR/SVG/shapes.html#PolylineElement">9.6 The
* 'polyline' element</a>. * 'polyline' element</a>.
*/ */
class SVGPointList; class SVGPointList;

@ -55,7 +55,7 @@ class SVGRectElementImpl;
* for attributes <code> x </code> and <code> y</code>. * for attributes <code> x </code> and <code> y</code>.
* *
* For more info look here : <a href = * For more info look here : <a href =
* "http://www.w3.org/TR/SVG/tqshapes.html#RectElement"> 9.2 The * "http://www.w3.org/TR/SVG/shapes.html#RectElement"> 9.2 The
* 'rect' element</a>. * 'rect' element</a>.
*/ */
class SVGRectElement : public SVGElement, class SVGRectElement : public SVGElement,
@ -130,7 +130,7 @@ public:
* "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing"> Error * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing"> Error
* processing</a>). * processing</a>).
* *
* See <a href="http://www.w3.org/TR/SVG/tqshapes.html#RectElement"> * See <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement">
* 9.2 The 'rect' element </a> for info about what happens if the * 9.2 The 'rect' element </a> for info about what happens if the
* attribute is not specified. * attribute is not specified.
* *
@ -148,7 +148,7 @@ public:
* "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">Error * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">Error
* processing</a>). * processing</a>).
* *
* See <a href="http://www.w3.org/TR/SVG/tqshapes.html#RectElement"> * See <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement">
* 9.2 The 'rect' element </a> for info about what happens if the * 9.2 The 'rect' element </a> for info about what happens if the
* attribute is not specified. * attribute is not specified.
* *

@ -58,7 +58,7 @@ class SVGTextElementImpl;
* 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 masking * coordinate system transformations, painting, clipping and masking
* features that apply to tqshapes such as paths and rectangles also * features that apply to shapes such as paths and rectangles also
* apply to <code>text</code> elements. * apply to <code>text</code> elements.
* *
* It is possible to apply a gradient, pattern, clipping path, mask or * It is possible to apply a gradient, pattern, clipping path, mask or

@ -36,21 +36,21 @@ SVGContainerImpl::~SVGContainerImpl()
SVGRectImpl *SVGContainerImpl::getBBox() SVGRectImpl *SVGContainerImpl::getBBox()
{ {
// just get the union of the tqchildren bboxes // just get the union of the children bboxes
TQRect rect; TQRect rect;
DOM::Node node = firstChild(); DOM::Node node = firstChild();
for(; !node.isNull(); node = node.nextSibling()) for(; !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *elem = ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *elem = ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(elem); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(elem);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(elem); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(elem);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(elem); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(elem);
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(tqshape && style && ok && style->getVisible() && style->getDisplay()) if(shape && style && ok && style->getVisible() && style->getDisplay())
{ {
SVGRectImpl *current = tqshape->getBBox(); SVGRectImpl *current = shape->getBBox();
rect = rect.unite(current->qrect()); rect = rect.unite(current->qrect());
current->deref(); current->deref();
} }
@ -90,21 +90,21 @@ void SVGContainerImpl::update(CanvasItemUpdate reason, int param1, int param2)
for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
if(tqshape) if(shape)
tqshape->update(reason, param1, param2); shape->update(reason, param1, param2);
} }
} }
void SVGContainerImpl::tqinvalidate(KSVGCanvas *c, bool recalc) void SVGContainerImpl::invalidate(KSVGCanvas *c, bool recalc)
{ {
SVGShapeImpl::tqinvalidate(c, recalc); SVGShapeImpl::invalidate(c, recalc);
for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
if(tqshape) if(shape)
tqshape->tqinvalidate(c, recalc); shape->invalidate(c, recalc);
} }
} }
@ -114,9 +114,9 @@ void SVGContainerImpl::setReferenced(bool referenced)
for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
if(tqshape) if(shape)
tqshape->setReferenced(referenced); shape->setReferenced(referenced);
} }
} }
@ -126,9 +126,9 @@ void SVGContainerImpl::draw()
for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
if(tqshape) if(shape)
tqshape->draw(); shape->draw();
} }
} }

@ -40,7 +40,7 @@ public:
virtual void removeItem(KSVGCanvas *c); virtual void removeItem(KSVGCanvas *c);
virtual void update(CanvasItemUpdate reason, int param1, int param2); virtual void update(CanvasItemUpdate reason, int param1, int param2);
virtual void tqinvalidate(KSVGCanvas *c, bool recalc); virtual void invalidate(KSVGCanvas *c, bool recalc);
virtual void setReferenced(bool referenced); virtual void setReferenced(bool referenced);
virtual void draw(); virtual void draw();

@ -112,9 +112,9 @@ SVGDocumentImpl::~SVGDocumentImpl()
DOM::Node node = firstChild(); DOM::Node node = firstChild();
for(; !node.isNull(); node = node.nextSibling()) for(; !node.isNull(); node = node.nextSibling())
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(getElementFromHandle(node.handle())); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(getElementFromHandle(node.handle()));
if(tqshape) if(shape)
killList.append(tqshape); killList.append(shape);
} }
SVGShapeImpl *rend = 0; SVGShapeImpl *rend = 0;
@ -478,7 +478,7 @@ bool SVGDocumentImpl::dispatchRecursiveEvent(SVGEvent::EventId id, DOM::Node sta
if(element && element->hasChildNodes()) if(element && element->hasChildNodes())
{ {
// Dispatch to all tqchildren // Dispatch to all children
eventExecuted = dispatchRecursiveEvent(id, element->lastChild()) ? true : eventExecuted; eventExecuted = dispatchRecursiveEvent(id, element->lastChild()) ? true : eventExecuted;
// Dispatch, locally // Dispatch, locally

@ -169,9 +169,9 @@ void removeItem(ExecState *exec, DOM::Node &node)
SVGDocumentImpl *doc = KSVG::Window::retrieveActive(exec)->doc(); SVGDocumentImpl *doc = KSVG::Window::retrieveActive(exec)->doc();
// Update canvas // Update canvas
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle())); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle()));
if(tqshape && tqshape->item()) if(shape && shape->item())
doc->canvas()->removeItem(tqshape->item()); doc->canvas()->removeItem(shape->item());
} }
// parseXML + getURL() need all these 5 functions to work properly // parseXML + getURL() need all these 5 functions to work properly

@ -496,9 +496,9 @@ void SVGElementImpl::setAttributes(bool deep)
bool SVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev) bool SVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(this); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this);
if(tqshape) if(shape)
return tqshape->prepareMouseEvent(p, a, mev); return shape->prepareMouseEvent(p, a, mev);
return false; return false;
} }

@ -58,13 +58,13 @@ void SVGHelperImpl::updateItem(KJS::ExecState *exec, const DOM::Node node)
SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc(); SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
// Update canvas, recursively if needed // Update canvas, recursively if needed
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle())); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle()));
if(tqshape && tqshape->item()) if(shape && shape->item())
{ {
tqshape->item()->update(UPDATE_TRANSFORM); shape->item()->update(UPDATE_TRANSFORM);
tqshape->item()->draw(); shape->item()->draw();
tqshape->blit(doc->canvas()); shape->blit(doc->canvas());
} }
if(const_cast<DOM::Node &>(node).hasChildNodes()) if(const_cast<DOM::Node &>(node).hasChildNodes())

@ -320,10 +320,10 @@ void SVGImageElementImpl::removeItem(KSVGCanvas *c)
void SVGImageElementImpl::setupSVGElement(SVGSVGElementImpl *svg) void SVGImageElementImpl::setupSVGElement(SVGSVGElementImpl *svg)
{ {
// Set up the root svg for an svg image. // Set up the root svg for an svg image.
svg->setAttributeInternal("x", TQString("%1").tqarg(x()->baseVal()->value())); svg->setAttributeInternal("x", TQString("%1").arg(x()->baseVal()->value()));
svg->setAttributeInternal("y", TQString("%1").tqarg(y()->baseVal()->value())); svg->setAttributeInternal("y", TQString("%1").arg(y()->baseVal()->value()));
svg->setAttributeInternal("width", TQString("%1").tqarg(width()->baseVal()->value())); svg->setAttributeInternal("width", TQString("%1").arg(width()->baseVal()->value()));
svg->setAttributeInternal("height", TQString("%1").tqarg(height()->baseVal()->value())); svg->setAttributeInternal("height", TQString("%1").arg(height()->baseVal()->value()));
TQString par = getAttribute("preserveAspectRatio").string().stripWhiteSpace(); TQString par = getAttribute("preserveAspectRatio").string().stripWhiteSpace();
@ -408,7 +408,7 @@ void SVGImageElementImpl::setImage(TQImage *image)
if(m_item) if(m_item)
{ {
ownerDoc()->canvas()->tqinvalidate(m_item, false); ownerDoc()->canvas()->invalidate(m_item, false);
ownerDoc()->rerender(); ownerDoc()->rerender();
} }
} }
@ -508,12 +508,12 @@ void SVGImageElementImpl::applyColorProfile(SVGColorProfileElementImpl *profile,
if(image->m_image) if(image->m_image)
{ {
// Image is already painted, we apply the color profile and tqrepaint it // Image is already painted, we apply the color profile and repaint it
image->applyColorProfile(); image->applyColorProfile();
if(image->item()) if(image->item())
{ {
image->ownerDoc()->canvas()->tqinvalidate(image->item(), false); image->ownerDoc()->canvas()->invalidate(image->item(), false);
image->ownerDoc()->rerender(); image->ownerDoc()->rerender();
} }
} }

@ -86,7 +86,7 @@ public:
virtual SVGRectImpl *getBBox(); virtual SVGRectImpl *getBBox();
// Screen-space clipping tqshape // Screen-space clipping shape
KSVGPolygon clippingShape(); KSVGPolygon clippingShape();
void onScreenCTMUpdated(); void onScreenCTMUpdated();

@ -92,13 +92,13 @@ void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCT
// Notify the element // Notify the element
onScreenCTMUpdated(); onScreenCTMUpdated();
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(this); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this);
if(tqshape) if(shape)
{ {
// TODO: Update due to matrix animations // TODO: Update due to matrix animations
//if(tqshape->item()) //if(shape->item())
// tqshape->item()->update(updateReason); // shape->item()->update(updateReason);
SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this); SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this);
@ -119,9 +119,9 @@ void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM
if(m_cachedScreenCTMIsValid) if(m_cachedScreenCTMIsValid)
{ {
SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this); SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this);
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(this); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this);
if(tqshape) if(shape)
{ {
DOM::Node node = element->firstChild(); DOM::Node node = element->firstChild();
for(; !node.isNull(); node = node.nextSibling()) for(; !node.isNull(); node = node.nextSibling())
@ -184,9 +184,9 @@ Value SVGLocatableImplProtoFunc::call(ExecState *exec, Object &thisObj, const Li
return container->getBBox()->cache(exec); return container->getBBox()->cache(exec);
else else
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(obj); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(obj);
if(tqshape) if(shape)
return tqshape->getBBox()->cache(exec); return shape->getBBox()->cache(exec);
else else
return obj->getBBox()->cache(exec); return obj->getBBox()->cache(exec);
} }

@ -236,21 +236,21 @@ void SVGMarkerElementImpl::draw(SVGShapeImpl *referencingElement, double x, doub
for(; !node.isNull(); node = node.nextSibling()) for(; !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) if(element && shape && style && ok && style->getVisible() && style->getDisplay())
{ {
SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element); SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element);
if(locatable) if(locatable)
locatable->updateCachedScreenCTM(mtx); locatable->updateCachedScreenCTM(mtx);
tqshape->update(UPDATE_TRANSFORM); shape->update(UPDATE_TRANSFORM);
tqshape->setReferenced(true); shape->setReferenced(true);
tqshape->draw(); shape->draw();
tqshape->setReferenced(false); shape->setReferenced(false);
} }
} }

@ -296,22 +296,22 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) if(element && shape && style && ok && style->getVisible() && style->getDisplay())
{ {
SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element); SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element);
if(locatable) if(locatable)
locatable->updateCachedScreenCTM(baseMatrix); locatable->updateCachedScreenCTM(baseMatrix);
element->createItem(m_canvas); element->createItem(m_canvas);
if(tqshape->item()) if(shape->item())
{ {
tqshape->item()->setReferenced(true); shape->item()->setReferenced(true);
m_canvas->tqinvalidate(tqshape->item(), true); m_canvas->invalidate(shape->item(), true);
} }
} }
} }
@ -321,15 +321,15 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) if(element && shape && style && ok && style->getVisible() && style->getDisplay())
{ {
if(tqshape) if(shape)
tqshape->removeItem(m_canvas); shape->removeItem(m_canvas);
} }
} }
@ -453,17 +453,17 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
return mask; return mask;
} }
TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle) TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const TQRect& screenRectangle)
{ {
TQByteArray cumulativeMask; TQByteArray cumulativeMask;
do do
{ {
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(tqshape); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(shape);
if(style && style->hasMask()) if(style && style->hasMask())
{ {
SVGElementImpl *element = tqshape->ownerDoc()->rootElement()->getElementById(style->getMask()); SVGElementImpl *element = shape->ownerDoc()->rootElement()->getElementById(style->getMask());
if(element) if(element)
{ {
@ -471,7 +471,7 @@ TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *tqshape, const TQRec
if(maskElement) if(maskElement)
{ {
SVGMaskElementImpl::Mask mask = maskElement->createMask(tqshape); SVGMaskElementImpl::Mask mask = maskElement->createMask(shape);
if(!mask.isEmpty()) if(!mask.isEmpty())
{ {
@ -495,21 +495,21 @@ TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *tqshape, const TQRec
} }
} }
DOM::Node parentNode = tqshape->parentNode(); DOM::Node parentNode = shape->parentNode();
if(!parentNode.isNull()) if(!parentNode.isNull())
{ {
SVGElementImpl *parent = tqshape->ownerDoc()->getElementFromHandle(parentNode.handle()); SVGElementImpl *parent = shape->ownerDoc()->getElementFromHandle(parentNode.handle());
if(parent) if(parent)
tqshape = dynamic_cast<SVGShapeImpl *>(parent); shape = dynamic_cast<SVGShapeImpl *>(parent);
else else
tqshape = 0; shape = 0;
} }
else else
tqshape = 0; shape = 0;
} while(tqshape); } while(shape);
return cumulativeMask; return cumulativeMask;
} }

@ -89,10 +89,10 @@ public:
Mask createMask(SVGShapeImpl *referencingElement); Mask createMask(SVGShapeImpl *referencingElement);
// Compute the mask on a given tqshape, taking into account all masks defined // Compute the mask on a given shape, taking into account all masks defined
// on the tqshape's ancestors. This is a workaround for us not having a buffer // on the shape's ancestors. This is a workaround for us not having a buffer
// for container elements, so we can't mask containers directly. // for container elements, so we can't mask containers directly.
static TQByteArray maskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle); static TQByteArray maskRectangle(SVGShapeImpl *shape, const TQRect& screenRectangle);
private: private:
class CacheKey class CacheKey

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "A"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "A"; }
virtual TQString toString() const { return TQString("A %1 %2 %3 %4 %5 %6 %7").tqarg(m_r1).tqarg(m_r2).tqarg(m_angle).tqarg(m_largeArcFlag).tqarg(m_sweepFlag).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("A %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
void setX(double x); void setX(double x);
double x() const; double x() const;
@ -94,7 +94,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; } virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "a"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "a"; }
virtual TQString toString() const { return TQString("a %1 %2 %3 %4 %5 %6 %7").tqarg(m_r1).tqarg(m_r2).tqarg(m_angle).tqarg(m_largeArcFlag).tqarg(m_sweepFlag).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("a %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
void setX(double x); void setX(double x);
double x() const; double x() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "C"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "C"; }
virtual TQString toString() const { return TQString("C %1 %2 %3 %4 %5 %6").tqarg(m_x1).tqarg(m_y1).tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("C %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;
@ -88,7 +88,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "c"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "c"; }
virtual TQString toString() const { return TQString("c %1 %2 %3 %4 %5 %6").tqarg(m_x1).tqarg(m_y1).tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("c %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "S"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "S"; }
virtual TQString toString() const { return TQString("S %1 %2 %3 %4").tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("S %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;
@ -88,7 +88,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "s"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "s"; }
virtual TQString toString() const { return TQString("s %1 %2 %3 %4").tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("s %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "Q"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "Q"; }
virtual TQString toString() const { return TQString("Q %1 %2 %3 %4").tqarg(m_x1).tqarg(m_y1).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("Q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;
@ -80,7 +80,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_REL; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "q"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "q"; }
virtual TQString toString() const { return TQString("q %1 %2 %3 %4").tqarg(m_x1).tqarg(m_y1).tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "T"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "T"; }
virtual TQString toString() const { return TQString("T %1 %2").tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("T %1 %2").arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;
@ -80,7 +80,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL; } virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "t"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "t"; }
virtual TQString toString() const { return TQString("t %1 %2").tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("t %1 %2").arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "H"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "H"; }
virtual TQString toString() const { return TQString("H %1").tqarg(m_x); } virtual TQString toString() const { return TQString("H %1").arg(m_x); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;
@ -68,7 +68,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; } virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "h"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "h"; }
virtual TQString toString() const { return TQString("h %1").tqarg(m_x); } virtual TQString toString() const { return TQString("h %1").arg(m_x); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "L"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "L"; }
virtual TQString toString() const { return TQString("L %1 %2").tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("L %1 %2").arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;
@ -72,7 +72,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_REL; } virtual unsigned short pathSegType() const { return PATHSEG_LINETO_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "l"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "l"; }
virtual TQString toString() const { return TQString("l %1 %2").tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("l %1 %2").arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "V"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "V"; }
virtual TQString toString() const { return TQString("V %1").tqarg(m_y); } virtual TQString toString() const { return TQString("V %1").arg(m_y); }
void setY(const double &); void setY(const double &);
double y() const; double y() const;
@ -68,7 +68,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; } virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "v"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "v"; }
virtual TQString toString() const { return TQString("v %1").tqarg(m_y); } virtual TQString toString() const { return TQString("v %1").arg(m_y); }
void setY(const double &); void setY(const double &);
double y() const; double y() const;

@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; } virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "M"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "M"; }
virtual TQString toString() const { return TQString("M %1 %2").tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("M %1 %2").arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;
@ -72,7 +72,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; } virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "m"; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "m"; }
virtual TQString toString() const { return TQString("m %1 %2").tqarg(m_x).tqarg(m_y); } virtual TQString toString() const { return TQString("m %1 %2").arg(m_x).arg(m_y); }
void setX(const double &); void setX(const double &);
double x() const; double x() const;

@ -350,22 +350,22 @@ TQImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int
for(DOM::Node node = m_location->firstChild(); !node.isNull(); node = node.nextSibling()) for(DOM::Node node = m_location->firstChild(); !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) if(element && shape && style && ok && style->getVisible() && style->getDisplay())
{ {
SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element); SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element);
if(locatable) if(locatable)
locatable->updateCachedScreenCTM(baseMatrix); locatable->updateCachedScreenCTM(baseMatrix);
element->createItem(m_canvas); element->createItem(m_canvas);
if(tqshape->item()) if(shape->item())
{ {
tqshape->item()->setReferenced(true); shape->item()->setReferenced(true);
m_canvas->tqinvalidate(tqshape->item(), true); m_canvas->invalidate(shape->item(), true);
} }
} }
} }
@ -433,7 +433,7 @@ void SVGPatternElementImpl::reference(const TQString &href)
SVGHelperImpl::copyAttributes(src, this); SVGHelperImpl::copyAttributes(src, this);
// Spec: Change location to referenced element so we // Spec: Change location to referenced element so we
// can take the tqchildren elements to render from there // can take the children elements to render from there
if(m_location == this) if(m_location == this)
m_location = src; m_location = src;
} }

@ -372,18 +372,18 @@ DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementI
for(; !node.isNull(); node = node.nextSibling()) for(; !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
if(tqshape) if(shape)
{ {
if(tqshape->isContainer()) if(shape->isContainer())
// TODO : pass it on to container::getEnclosureList() which should return a NodeList // TODO : pass it on to container::getEnclosureList() which should return a NodeList
kdDebug() << "!tqshape" << endl; kdDebug() << "!shape" << endl;
else else
{ {
// TODO : add the tqshape to list if the test succeeds // TODO : add the shape to list if the test succeeds
SVGRectImpl *current = tqshape->getBBox(); SVGRectImpl *current = shape->getBBox();
if(rect->qrect().contains(current->qrect(), true)) if(rect->qrect().contains(current->qrect(), true))
kdDebug() << "tqshape : " << element->nodeName().string() << " is fully enclosed" << endl; kdDebug() << "shape : " << element->nodeName().string() << " is fully enclosed" << endl;
current->deref(); current->deref();
} }
@ -395,11 +395,11 @@ DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementI
bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl *rect) bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl *rect)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
if(!tqshape) if(!shape)
return false; return false;
SVGRectImpl *current = tqshape->getBBox(); SVGRectImpl *current = shape->getBBox();
bool result = rect->qrect().intersects(current->qrect()); bool result = rect->qrect().intersects(current->qrect());
current->deref(); current->deref();
return result; return result;
@ -407,11 +407,11 @@ bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl *
bool SVGSVGElementImpl::checkEnclosure(SVGElementImpl *element, SVGRectImpl *rect) bool SVGSVGElementImpl::checkEnclosure(SVGElementImpl *element, SVGRectImpl *rect)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
if(!tqshape) if(!shape)
return false; return false;
SVGRectImpl *current = tqshape->getBBox(); SVGRectImpl *current = shape->getBBox();
bool result = rect->qrect().contains(current->qrect()); bool result = rect->qrect().contains(current->qrect());
current->deref(); current->deref();
return result; return result;
@ -672,7 +672,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV
elem = (*it)->element(); elem = (*it)->element();
if(elem) if(elem)
{ {
// Check if mouse is over a certain tqshape... // Check if mouse is over a certain shape...
// mop: once an element has been found check eventlisteners and leave immediately // mop: once an element has been found check eventlisteners and leave immediately
ret = elem->prepareMouseEvent(p, userA, mev); ret = elem->prepareMouseEvent(p, userA, mev);
if(ret) break; if(ret) break;
@ -693,7 +693,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV
dorerender = true; // mop: if it has the event then rerender dorerender = true; // mop: if it has the event then rerender
} }
// If a mouse "moves" over a tqshape, it's also "over" the tqshape // If a mouse "moves" over a shape, it's also "over" the shape
if(mev->id() == SVGEvent::MOUSEMOVE_EVENT) if(mev->id() == SVGEvent::MOUSEMOVE_EVENT)
{ {
mev->target()->setMouseOver(true); mev->target()->setMouseOver(true);
@ -742,7 +742,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV
} }
} }
// The mouse is over a tqshape, so we have a target..we need to register that for a mouseout // The mouse is over a shape, so we have a target..we need to register that for a mouseout
ownerDoc()->setLastTarget(mev->target()); ownerDoc()->setLastTarget(mev->target());
} }

@ -125,10 +125,10 @@ void SVGShapeImpl::update(CanvasItemUpdate reason, int param1, int param2)
m_item->update(reason, param1, param2); m_item->update(reason, param1, param2);
} }
void SVGShapeImpl::tqinvalidate(KSVGCanvas *c, bool recalc) void SVGShapeImpl::invalidate(KSVGCanvas *c, bool recalc)
{ {
if(m_item && c) if(m_item && c)
c->tqinvalidate(m_item, recalc); c->invalidate(m_item, recalc);
} }
void SVGShapeImpl::setReferenced(bool referenced) void SVGShapeImpl::setReferenced(bool referenced)

@ -49,7 +49,7 @@ public:
virtual bool isContainer() const { return false; } virtual bool isContainer() const { return false; }
virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0); virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
virtual void tqinvalidate(KSVGCanvas *c, bool recalc); virtual void invalidate(KSVGCanvas *c, bool recalc);
virtual void setReferenced(bool referenced); virtual void setReferenced(bool referenced);
virtual void draw(); virtual void draw();
virtual void blit(KSVGCanvas *); virtual void blit(KSVGCanvas *);

@ -1276,16 +1276,16 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value &
if(redraw) if(redraw)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_object); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_object);
if(inherit) if(inherit)
processStyle(); processStyle();
if(tqshape && tqshape->item()) if(shape && shape->item())
{ {
if(update > -1) if(update > -1)
tqshape->item()->update(static_cast<CanvasItemUpdate>(update)); shape->item()->update(static_cast<CanvasItemUpdate>(update));
else if(m_object) else if(m_object)
m_object->ownerDoc()->canvas()->tqinvalidate(tqshape->item(), false); m_object->ownerDoc()->canvas()->invalidate(shape->item(), false);
} }
} }
} }

@ -41,13 +41,13 @@ void SVGSwitchElementImpl::createItem(KSVGCanvas *c)
for(; !node.isNull(); node = node.nextSibling()) for(; !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(element && tqshape && ok && style->getVisible() && style->getDisplay() && (tqshape->directRender() || !directRender())) if(element && shape && ok && style->getVisible() && style->getDisplay() && (shape->directRender() || !directRender()))
{ {
element->createItem(c); element->createItem(c);
break; break;

@ -101,9 +101,9 @@ void SVGTimer::notifyAll()
TQValueList<SVGElementImpl *>::iterator it2; TQValueList<SVGElementImpl *>::iterator it2;
for(it2 = elements.begin(); it2 != elements.end(); ++it2) for(it2 = elements.begin(); it2 != elements.end(); ++it2)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(*it2); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(*it2);
if(tqshape && tqshape->item()) if(shape && shape->item())
tqshape->item()->update(UPDATE_TRANSFORM); shape->item()->update(UPDATE_TRANSFORM);
} }
} }

@ -182,9 +182,9 @@ SVGRectImpl *SVGUseElementImpl::getBBox()
{ {
if(m_instanceRoot) if(m_instanceRoot)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
if(KSVG_TOKEN_NOT_PARSED(Width) && KSVG_TOKEN_NOT_PARSED(Height) && tqshape) if(KSVG_TOKEN_NOT_PARSED(Width) && KSVG_TOKEN_NOT_PARSED(Height) && shape)
return tqshape->getBBox(); return shape->getBBox();
} }
SVGRectImpl *ret = new SVGRectImpl(); SVGRectImpl *ret = new SVGRectImpl();
@ -370,19 +370,19 @@ void SVGUseElementImpl::update(CanvasItemUpdate reason, int param1, int param2)
{ {
if(m_instanceRoot) if(m_instanceRoot)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
if(tqshape) if(shape)
tqshape->update(reason, param1, param2); shape->update(reason, param1, param2);
} }
} }
void SVGUseElementImpl::tqinvalidate(KSVGCanvas *c, bool recalc) void SVGUseElementImpl::invalidate(KSVGCanvas *c, bool recalc)
{ {
if(m_instanceRoot) if(m_instanceRoot)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
if(tqshape) if(shape)
tqshape->tqinvalidate(c, recalc); shape->invalidate(c, recalc);
} }
} }
@ -390,9 +390,9 @@ void SVGUseElementImpl::setReferenced(bool referenced)
{ {
if(m_instanceRoot) if(m_instanceRoot)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
if(tqshape) if(shape)
tqshape->setReferenced(referenced); shape->setReferenced(referenced);
} }
} }
@ -400,9 +400,9 @@ void SVGUseElementImpl::draw()
{ {
if(m_instanceRoot) if(m_instanceRoot)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
if(tqshape) if(shape)
tqshape->draw(); shape->draw();
} }
} }

@ -59,7 +59,7 @@ public:
virtual void createItem(KSVGCanvas *c); virtual void createItem(KSVGCanvas *c);
virtual void removeItem(KSVGCanvas *c); virtual void removeItem(KSVGCanvas *c);
virtual void update(CanvasItemUpdate reason, int param1, int param2); virtual void update(CanvasItemUpdate reason, int param1, int param2);
virtual void tqinvalidate(KSVGCanvas *c, bool recalc); virtual void invalidate(KSVGCanvas *c, bool recalc);
virtual void setReferenced(bool referenced); virtual void setReferenced(bool referenced);
virtual void draw(); virtual void draw();

@ -133,9 +133,9 @@ DOM::DOMString SVGWindowImpl::printNode(const DOM::Node &node, unsigned short le
TQDictIterator<DOM::DOMString> it(elem->attributes()); TQDictIterator<DOM::DOMString> it(elem->attributes());
for(;it.current(); ++it) for(;it.current(); ++it)
ret += " " + it.currentKey() + "=\"" + it.current()->string() + '\"'; ret += " " + it.currentKey() + "=\"" + it.current()->string() + '\"';
if(elem->firstChild().isNull()) // no tqchildren if(elem->firstChild().isNull()) // no children
ret += " />\n"; ret += " />\n";
else // handle tqchildren else // handle children
{ {
ret += ">\n"; ret += ">\n";
for(DOM::Node child = node.firstChild();!child.isNull();child = child.nextSibling()) for(DOM::Node child = node.firstChild();!child.isNull();child = child.nextSibling())

@ -415,7 +415,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y,
* @rowstride: Rowstride of @buf buffer. * @rowstride: Rowstride of @buf buffer.
* @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing. * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
* *
* Renders the tqshape specified with @svp over the @buf RGB buffer. * Renders the shape specified with @svp over the @buf RGB buffer.
* @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height, * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height,
* of the rectangle rendered. The new pixels are stored starting at * of the rectangle rendered. The new pixels are stored starting at
* the first byte of @buf. Thus, the @x0 and @y0 parameters specify * the first byte of @buf. Thus, the @x0 and @y0 parameters specify
@ -600,7 +600,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y,
* @rowstride: Rowstride of @buf buffer. * @rowstride: Rowstride of @buf buffer.
* @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing. * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
* *
* Renders the tqshape specified with @svp over the @buf RGB buffer. * Renders the shape specified with @svp over the @buf RGB buffer.
* @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height, * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height,
* of the rectangle rendered. The new pixels are stored starting at * of the rectangle rendered. The new pixels are stored starting at
* the first byte of @buf. Thus, the @x0 and @y0 parameters specify * the first byte of @buf. Thus, the @x0 and @y0 parameters specify

@ -1103,19 +1103,19 @@ xlib_window_is_viewable (Window w)
XWindowAttributes wa; XWindowAttributes wa;
while (w != 0) { while (w != 0) {
Window parent, root, *tqchildren; Window parent, root, *children;
int ntqchildren; int nchildren;
XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa); XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa);
if (wa.map_state != IsViewable) if (wa.map_state != IsViewable)
return 0; return 0;
if (!XQueryTree (gdk_pixbuf_dpy, w, &root, if (!XQueryTree (gdk_pixbuf_dpy, w, &root,
&parent, &tqchildren, &ntqchildren)) &parent, &children, &nchildren))
return 0; return 0;
if (ntqchildren > 0) if (nchildren > 0)
XFree (tqchildren); XFree (children);
if (parent == root) if (parent == root)
return 1; return 1;

@ -239,13 +239,13 @@ void AggShape::update(CanvasItemUpdate reason, int param1, int param2)
m_fillPainter->update(m_style); m_fillPainter->update(m_style);
if(m_strokePainter) if(m_strokePainter)
m_strokePainter->update(m_style); m_strokePainter->update(m_style);
m_canvas->tqinvalidate(this, false); m_canvas->invalidate(this, false);
} }
else if(reason == UPDATE_TRANSFORM) else if(reason == UPDATE_TRANSFORM)
{ {
freeSVPs(); freeSVPs();
init(); init();
m_canvas->tqinvalidate(this, true); m_canvas->invalidate(this, true);
} }
else if(reason == UPDATE_ZOOM) else if(reason == UPDATE_ZOOM)
init(); init();
@ -257,13 +257,13 @@ void AggShape::update(CanvasItemUpdate reason, int param1, int param2)
else if(reason == UPDATE_LINEWIDTH) else if(reason == UPDATE_LINEWIDTH)
{ {
init(); init();
m_canvas->tqinvalidate(this, true); m_canvas->invalidate(this, true);
} }
} }
void AggShape::draw(SVGShapeImpl *tqshape) void AggShape::draw(SVGShapeImpl *shape)
{ {
if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !tqshape->directRender())) if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender()))
return; return;
//if(!m_strokeSVP && (!m_fillSVP || !m_style->isFilled())) //if(!m_strokeSVP && (!m_fillSVP || !m_style->isFilled()))
@ -292,14 +292,14 @@ void AggShape::draw(SVGShapeImpl *tqshape)
m_curved.approximation_scale(pow(m_transform.scale(), 0.75)); m_curved.approximation_scale(pow(m_transform.scale(), 0.75));
if(m_fillPainter) if(m_fillPainter)
m_fillPainter->draw(m_canvas, m_curved_trans, m_style, tqshape); m_fillPainter->draw(m_canvas, m_curved_trans, m_style, shape);
if(m_strokePainter) if(m_strokePainter)
m_strokePainter->draw(m_canvas, m_curved_stroked_trans, m_style, tqshape); m_strokePainter->draw(m_canvas, m_curved_stroked_trans, m_style, shape);
} }
bool AggShape::isVisible(SVGShapeImpl *tqshape) bool AggShape::isVisible(SVGShapeImpl *shape)
{ {
return m_referenced || (m_style->getVisible() && m_style->getDisplay() && tqshape->directRender()); return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender());
} }
void AggShape::calcSVPs(const SVGMatrixImpl *matrix) void AggShape::calcSVPs(const SVGMatrixImpl *matrix)
@ -376,14 +376,14 @@ void AggStrokePaintServer::update(SVGStylableImpl *style)
} }
template<class VertexSource> template<class VertexSource>
void AggStrokePaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape) void AggStrokePaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape)
{ {
canvas->m_ras.reset(); canvas->m_ras.reset();
if(style->getStrokeColor()->paintType() == SVG_PAINTTYPE_URI) if(style->getStrokeColor()->paintType() == SVG_PAINTTYPE_URI)
{ {
AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), style->getStrokeColor()->uri().string())); AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getStrokeColor()->uri().string()));
if(!pserver) return; if(!pserver) return;
pserver->setBBoxTarget(tqshape); pserver->setBBoxTarget(shape);
// TODO : Clipping // TODO : Clipping
if(!pserver->finalized()) if(!pserver->finalized())
@ -425,14 +425,14 @@ void AggFillPaintServer::update(SVGStylableImpl *style)
} }
template<class VertexSource> template<class VertexSource>
void AggFillPaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape) void AggFillPaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape)
{ {
canvas->m_ras.reset(); canvas->m_ras.reset();
if(style->getFillColor()->paintType() == SVG_PAINTTYPE_URI) if(style->getFillColor()->paintType() == SVG_PAINTTYPE_URI)
{ {
AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), style->getFillColor()->uri().string())); AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getFillColor()->uri().string()));
if(!pserver) return; if(!pserver) return;
pserver->setBBoxTarget(tqshape); pserver->setBBoxTarget(shape);
// TODO : Clipping // TODO : Clipping
if(!pserver->finalized()) if(!pserver->finalized())
@ -1166,13 +1166,13 @@ void AggText::update(CanvasItemUpdate reason, int param1, int param2)
svpelement = ++it; svpelement = ++it;
} }
m_canvas->tqinvalidate(this, false); m_canvas->invalidate(this, false);
} }
else if(reason == UPDATE_TRANSFORM) else if(reason == UPDATE_TRANSFORM)
{ {
clearCurved(); clearCurved();
init(); init();
m_canvas->tqinvalidate(this, true); m_canvas->invalidate(this, true);
} }
else if(reason == UPDATE_ZOOM) else if(reason == UPDATE_ZOOM)
{ {

@ -270,7 +270,7 @@ namespace KSVG
AggFillPaintServer(SVGStylableImpl *style); AggFillPaintServer(SVGStylableImpl *style);
void update(SVGStylableImpl *style); void update(SVGStylableImpl *style);
template<class VertexSource> template<class VertexSource>
void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape); void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape);
private: private:
agg::rgba8 m_color; agg::rgba8 m_color;
@ -282,7 +282,7 @@ namespace KSVG
AggStrokePaintServer(SVGStylableImpl *style); AggStrokePaintServer(SVGStylableImpl *style);
void update(SVGStylableImpl *style); void update(SVGStylableImpl *style);
template<class VertexSource> template<class VertexSource>
void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape); void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape);
private: private:
agg::rgba8 m_color; agg::rgba8 m_color;
@ -311,11 +311,11 @@ namespace KSVG
virtual bool fillContains(const TQPoint &p); virtual bool fillContains(const TQPoint &p);
virtual bool strokeContains(const TQPoint &p); virtual bool strokeContains(const TQPoint &p);
virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0); virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
void draw(SVGShapeImpl *tqshape); void draw(SVGShapeImpl *shape);
void calcSVPs(const SVGMatrixImpl *matrix); void calcSVPs(const SVGMatrixImpl *matrix);
virtual void init(); virtual void init();
virtual void init(const SVGMatrixImpl *); virtual void init(const SVGMatrixImpl *);
bool isVisible(SVGShapeImpl *tqshape); bool isVisible(SVGShapeImpl *shape);
void setRenderContext(RenderContext context) { m_context = context; } void setRenderContext(RenderContext context) { m_context = context; }

@ -187,15 +187,15 @@ CanvasPaintServer *LibartCanvas::createPaintServer(SVGElementImpl *pserver)
void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon) void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon)
{ {
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(style); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(style);
if(tqshape) if(shape)
{ {
if(image.depth() != 32) if(image.depth() != 32)
image = image.convertDepth(32); image = image.convertDepth(32);
ArtSVP *imageBorder = svpFromPolygon(clippingPolygon); ArtSVP *imageBorder = svpFromPolygon(clippingPolygon);
ArtSVP *clipSvp = clipSingleSVP(imageBorder, tqshape); ArtSVP *clipSvp = clipSingleSVP(imageBorder, shape);
ArtDRect bbox; ArtDRect bbox;
art_drect_svp(&bbox, clipSvp); art_drect_svp(&bbox, clipSvp);
@ -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 mask = SVGMaskElementImpl::maskRectangle(tqshape, screenBBox); TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
double affine[6]; double affine[6];
KSVGHelper::matrixToAffine(matrix, affine); KSVGHelper::matrixToAffine(matrix, affine);
@ -266,10 +266,10 @@ ArtSVP *LibartCanvas::clippingRect(const TQRect &rect, const SVGMatrixImpl *ctm)
return result; return result;
} }
ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape) ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
{ {
ArtSVP *clippedSvp = copy_svp(svp); ArtSVP *clippedSvp = copy_svp(svp);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(tqshape); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(shape);
if(style) if(style)
{ {
@ -282,7 +282,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape)
if(clipPath) if(clipPath)
{ {
LibartClipPath *lclip = dynamic_cast<LibartClipPath *>(clipPath); LibartClipPath *lclip = dynamic_cast<LibartClipPath *>(clipPath);
reinterpret_cast<SVGClipPathElementImpl *>(clipPath->element())->setBBoxTarget(tqshape); reinterpret_cast<SVGClipPathElementImpl *>(clipPath->element())->setBBoxTarget(shape);
lclip->init(); lclip->init();
@ -296,7 +296,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape)
} }
} }
SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(tqshape); SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(shape);
// Clip outer svg, unless width and height not set // Clip outer svg, unless width and height not set
if(svg && (!svg->isRootElement() || !svg->getAttribute("width").isEmpty() || !svg->getAttribute("height").isEmpty()) && !svg->getOverflow()) if(svg && (!svg->isRootElement() || !svg->getAttribute("width").isEmpty() || !svg->getAttribute("height").isEmpty()) && !svg->getOverflow())
@ -308,13 +308,13 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape)
clippedSvp = s; clippedSvp = s;
} }
if(dynamic_cast<SVGPatternElementImpl *>(tqshape) != 0) if(dynamic_cast<SVGPatternElementImpl *>(shape) != 0)
{ {
// TODO: inherit clipping paths into tile space // TODO: inherit clipping paths into tile space
} }
else if(dynamic_cast<SVGMarkerElementImpl *>(tqshape) != 0) else if(dynamic_cast<SVGMarkerElementImpl *>(shape) != 0)
{ {
SVGMarkerElementImpl *marker = static_cast<SVGMarkerElementImpl *>(tqshape); SVGMarkerElementImpl *marker = static_cast<SVGMarkerElementImpl *>(shape);
if(!marker->clipShape().isEmpty()) if(!marker->clipShape().isEmpty())
{ {
@ -329,7 +329,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape)
} }
else else
{ {
SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(tqshape); SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(shape);
DOM::Node parentNode = element->parentNode(); DOM::Node parentNode = element->parentNode();
if(!parentNode.isNull()) if(!parentNode.isNull())

@ -129,9 +129,9 @@ TQRect LibartShape::bbox() const
return rect; return rect;
} }
bool LibartShape::isVisible(SVGShapeImpl *tqshape) bool LibartShape::isVisible(SVGShapeImpl *shape)
{ {
return m_referenced || (m_style->getVisible() && m_style->getDisplay() && tqshape->directRender()); return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender());
} }
bool LibartShape::fillContains(const TQPoint &p) bool LibartShape::fillContains(const TQPoint &p)
@ -160,12 +160,12 @@ void LibartShape::update(CanvasItemUpdate reason, int param1, int param2)
m_fillPainter->update(m_style); m_fillPainter->update(m_style);
if(m_strokePainter) if(m_strokePainter)
m_strokePainter->update(m_style); m_strokePainter->update(m_style);
m_canvas->tqinvalidate(this, false); m_canvas->invalidate(this, false);
} }
else if(reason == UPDATE_TRANSFORM) else if(reason == UPDATE_TRANSFORM)
{ {
reset(); reset();
m_canvas->tqinvalidate(this, true); m_canvas->invalidate(this, true);
} }
else if(reason == UPDATE_ZOOM) else if(reason == UPDATE_ZOOM)
reset(); reset();
@ -184,13 +184,13 @@ void LibartShape::update(CanvasItemUpdate reason, int param1, int param2)
m_strokeSVP = 0; m_strokeSVP = 0;
} }
init(); init();
m_canvas->tqinvalidate(this, true); m_canvas->invalidate(this, true);
} }
} }
void LibartShape::draw(SVGShapeImpl *tqshape) void LibartShape::draw(SVGShapeImpl *shape)
{ {
if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !tqshape->directRender())) if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender()))
return; return;
bool fillOk = m_fillSVP && m_style->isFilled(); bool fillOk = m_fillSVP && m_style->isFilled();
@ -199,10 +199,10 @@ void LibartShape::draw(SVGShapeImpl *tqshape)
if(fillOk || strokeOk) if(fillOk || strokeOk)
{ {
if(m_fillPainter && m_fillSVP) if(m_fillPainter && m_fillSVP)
m_fillPainter->draw(m_canvas, m_fillSVP, m_style, tqshape); m_fillPainter->draw(m_canvas, m_fillSVP, m_style, shape);
if(m_strokePainter && m_strokeSVP) if(m_strokePainter && m_strokeSVP)
m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, tqshape); m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, shape);
} }
} }
@ -230,9 +230,9 @@ void LibartPainter::update(SVGStylableImpl *style)
} }
} }
void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape) void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape)
{ {
ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, tqshape); ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, shape);
// Clipping // Clipping
ArtDRect bbox; ArtDRect bbox;
@ -252,15 +252,15 @@ 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 mask = SVGMaskElementImpl::maskRectangle(tqshape, screenBBox); TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
if(paintType(style) == SVG_PAINTTYPE_URI) if(paintType(style) == SVG_PAINTTYPE_URI)
{ {
LibartPaintServer *pserver = static_cast<LibartPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), paintUri(style))); LibartPaintServer *pserver = static_cast<LibartPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), paintUri(style)));
if(pserver) if(pserver)
{ {
pserver->setBBoxTarget(tqshape); pserver->setBBoxTarget(shape);
if(!pserver->finalized()) if(!pserver->finalized())
pserver->finalizePaintServer(); pserver->finalizePaintServer();
pserver->render(canvas, clippedSvp, opacity(style), mask, screenBBox); pserver->render(canvas, clippedSvp, opacity(style), mask, screenBBox);
@ -1285,28 +1285,28 @@ void LibartClipPath::init()
for(; !node.isNull(); node = node.nextSibling()) for(; !node.isNull(); node = node.nextSibling())
{ {
SVGElementImpl *element = m_clipPath->ownerDoc()->getElementFromHandle(node.handle()); SVGElementImpl *element = m_clipPath->ownerDoc()->getElementFromHandle(node.handle());
SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
bool ok = tests ? tests->ok() : true; bool ok = tests ? tests->ok() : true;
if(element && tqshape && ok && !tqshape->isContainer()) if(element && shape && ok && !shape->isContainer())
{ {
LibartClipItem *clipElement = dynamic_cast<LibartClipItem *>(tqshape->item()); LibartClipItem *clipElement = dynamic_cast<LibartClipItem *>(shape->item());
if(dynamic_cast<LibartText *>(tqshape->item())) if(dynamic_cast<LibartText *>(shape->item()))
{ {
// The cast to a clipElement above is failing when it is valid. But only // The cast to a clipElement above is failing when it is valid. But only
// in the plugin - svgdisplay works fine. What's going on? (Adrian) // in the plugin - svgdisplay works fine. What's going on? (Adrian)
clipElement = dynamic_cast<LibartText *>(tqshape->item()); clipElement = dynamic_cast<LibartText *>(shape->item());
} }
if(clipElement) if(clipElement)
{ {
clipElement->setRenderContext(CLIPPING); clipElement->setRenderContext(CLIPPING);
// Push coordinate system down to tqchildren. // Push coordinate system down to children.
SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(tqshape); SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(shape);
if(locatable) if(locatable)
locatable->updateCachedScreenCTM(clipMatrix); locatable->updateCachedScreenCTM(clipMatrix);
@ -1514,13 +1514,13 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2)
fill = ++it1; fill = ++it1;
stroke = ++it2; stroke = ++it2;
} }
m_canvas->tqinvalidate(this, false); m_canvas->invalidate(this, false);
} }
else if(reason == UPDATE_TRANSFORM) else if(reason == UPDATE_TRANSFORM)
{ {
clearSVPs(); clearSVPs();
init(); init();
m_canvas->tqinvalidate(this, true); m_canvas->invalidate(this, true);
} }
else if(reason == UPDATE_ZOOM) else if(reason == UPDATE_ZOOM)
{ {
@ -2085,7 +2085,7 @@ void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB
// Here we're undoing the unit-converter's work because putting the // Here we're undoing the unit-converter's work because putting the
// bounding box transform into the matrix here lets the gradient transform // bounding box transform into the matrix here lets the gradient transform
// sit at the right point in the chain to work with bounding box coordinates. // sit at the right point in the chain to work with bounding box coordinates.
// It also produces the elliptical tqshape due to the non-uniform scaling. // It also produces the elliptical shape due to the non-uniform scaling.
SVGRectImpl *userBBox = getBBoxTarget()->getBBox(); SVGRectImpl *userBBox = getBBoxTarget()->getBBox();
double width = userBBox->width(); double width = userBBox->width();

@ -138,7 +138,7 @@ namespace KSVG
virtual ~LibartPainter() {} virtual ~LibartPainter() {}
void update(SVGStylableImpl *style); void update(SVGStylableImpl *style);
void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape); void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape);
virtual float opacity(SVGStylableImpl *style) const = 0; virtual float opacity(SVGStylableImpl *style) const = 0;
virtual unsigned short paintType(SVGStylableImpl *style) const = 0; virtual unsigned short paintType(SVGStylableImpl *style) const = 0;
@ -195,8 +195,8 @@ namespace KSVG
virtual bool fillContains(const TQPoint &p); virtual bool fillContains(const TQPoint &p);
virtual bool strokeContains(const TQPoint &p); virtual bool strokeContains(const TQPoint &p);
virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0); virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
void draw(SVGShapeImpl *tqshape); void draw(SVGShapeImpl *shape);
bool isVisible(SVGShapeImpl *tqshape); bool isVisible(SVGShapeImpl *shape);
virtual void init(); virtual void init();
virtual void init(const SVGMatrixImpl *); virtual void init(const SVGMatrixImpl *);

@ -398,7 +398,7 @@ void KSVGPlugin::update()
void KSVGPlugin::slotSetDescription(const TQString &desc) void KSVGPlugin::slotSetDescription(const TQString &desc)
{ {
ksvgd->description = desc; ksvgd->description = desc;
emit setStatusBarText(i18n("Description: %1").tqarg(desc)); emit setStatusBarText(i18n("Description: %1").arg(desc));
} }
void KSVGPlugin::slotSetTitle(const TQString &title) void KSVGPlugin::slotSetTitle(const TQString &title)
@ -409,7 +409,7 @@ void KSVGPlugin::slotSetTitle(const TQString &title)
void KSVGPlugin::slotGotURL(const TQString &text) void KSVGPlugin::slotGotURL(const TQString &text)
{ {
if(text.isNull() && !ksvgd->description.isEmpty()) if(text.isNull() && !ksvgd->description.isEmpty())
emit setStatusBarText(i18n("Description: %1").tqarg(ksvgd->description)); emit setStatusBarText(i18n("Description: %1").arg(ksvgd->description));
else else
emit setStatusBarText(text); emit setStatusBarText(text);
} }

@ -169,12 +169,12 @@ script-handle-03-t x
script-handle-04-t x script-handle-04-t x
[SHAPES] [SHAPES]
tqshapes-circle-01-t x shapes-circle-01-t x
tqshapes-ellipse-01-t x shapes-ellipse-01-t x
tqshapes-line-01-t x shapes-line-01-t x
tqshapes-polygon-01-t x shapes-polygon-01-t x
tqshapes-polyline-01-t x shapes-polyline-01-t x
tqshapes-rect-01-t x shapes-rect-01-t x
[STRUCT] [STRUCT]
struct-cond-01-t x struct-cond-01-t x

@ -112,7 +112,7 @@ path-lines-BE-01.svg: x
Group 16: [Rendering] - 21.09.2003 Group 16: [Rendering] - 21.09.2003
rendering-orderGr-BE-01.svg: x rendering-orderGr-BE-01.svg: x
rendering-tqshape-BE-03.svg: x rendering-shape-BE-03.svg: x
rendering-text-BE-02.svg: x rendering-text-BE-02.svg: x
Group 17: [Script] - 21.09.2003 Group 17: [Script] - 21.09.2003
@ -120,12 +120,12 @@ script-eventDom-BE-01.svg: x
script-uiEvents-BE-02.svg: x script-uiEvents-BE-02.svg: x
Group 18: [Shapes] - 21.09.2003 Group 18: [Shapes] - 21.09.2003
tqshapes-circle-BE-03.svg: x shapes-circle-BE-03.svg: x
tqshapes-ellipse-BE-02.svg: x shapes-ellipse-BE-02.svg: x
tqshapes-line-BE-04.svg: x shapes-line-BE-04.svg: x
tqshapes-polygon-BE-05.svg: x shapes-polygon-BE-05.svg: x
tqshapes-polyline-BE-06.svg: x shapes-polyline-BE-06.svg: x
tqshapes-rect-BE-01.svg: x shapes-rect-BE-01.svg: x
Group 19: [Structure] - 21.09.2003 Group 19: [Structure] - 21.09.2003
structure-allElem-BE-09.svg: x structure-allElem-BE-09.svg: x
@ -146,8 +146,8 @@ style-selector-BE-02.svg: o
style-selector-BE-03.svg: o style-selector-BE-03.svg: o
Group 21: [Text] - 29.09.2003 Group 21: [Text] - 29.09.2003
text-tqalignment-BE-10.svg: x text-alignment-BE-10.svg: x
text-tqalignment-BE-11.svg: x text-alignment-BE-11.svg: x
text-altGlyph-BE-07.svg: o FONTS SUPPORT MISSING text-altGlyph-BE-07.svg: o FONTS SUPPORT MISSING
text-decoration-BE-12.svg: x text-decoration-BE-12.svg: x
text-extTref-BE-18.svg: x text-extTref-BE-18.svg: x

@ -13,12 +13,12 @@ function bbox_loop(drawit, number)
for(var i = 0; i < number; i++) for(var i = 0; i < number; i++)
{ {
var tqshape = doc.getElementById("test-" + i); var shape = doc.getElementById("test-" + i);
var bbox = tqshape.getBBox(); var bbox = shape.getBBox();
if(drawit == "true") if(drawit == "true")
{ {
draw_it(doc, bbox, tqshape, i + 1); draw_it(doc, bbox, shape, i + 1);
} }
else else
{ {
@ -27,13 +27,13 @@ function bbox_loop(drawit, number)
} }
} }
function do_string(tqshape, number) function do_string(shape, number)
{ {
var string = "\nShape " + number + "\nX = " + tqshape.x + "\nY = " + tqshape.y + "\nW = " + tqshape.width + "\nH = " + shape.height; var string = "\nShape " + number + "\nX = " + shape.x + "\nY = " + shape.y + "\nW = " + shape.width + "\nH = " + shape.height;
alert(string); alert(string);
} }
function draw_it(doc, bbox, tqshape, number) function draw_it(doc, bbox, shape, number)
{ {
var element = doc.createElement("rect"); var element = doc.createElement("rect");
element.setAttribute("x", bbox.x); element.setAttribute("x", bbox.x);
@ -45,7 +45,7 @@ function draw_it(doc, bbox, tqshape, number)
element.setAttribute("stroke-width", "3"); element.setAttribute("stroke-width", "3");
element.setAttribute("id", "bbox" + number); element.setAttribute("id", "bbox" + number);
tqshape.getParentNode().appendChild(element); shape.getParentNode().appendChild(element);
} }
function gen_buttons(evt, number) function gen_buttons(evt, number)

@ -84,7 +84,7 @@ bool AboutWidget::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( e->type() == TQEvent::MouseButtonPress ) { if ( e->type() == TQEvent::MouseButtonPress ) {
TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent *ev = TQT_TQMOUSEEVENT( e );
if ( !m_homepage->tqgeometry().contains( ev->pos() ) ) { if ( !m_homepage->geometry().contains( ev->pos() ) ) {
deleteLater(); deleteLater();
return true; return true;
} }

@ -310,8 +310,8 @@ void ImageWindow::updateGeometry( int imWidth, int imHeight )
TQString caption = i18n( "Filename (Imagewidth x Imageheight)", TQString caption = i18n( "Filename (Imagewidth x Imageheight)",
"%3 (%1 x %2)" ); "%3 (%1 x %2)" );
caption = caption.tqarg( m_kuim->originalWidth() ). caption = caption.arg( m_kuim->originalWidth() ).
tqarg( m_kuim->originalHeight() ).tqarg( m_kuim->url().prettyURL() ); arg( m_kuim->originalHeight() ).arg( m_kuim->url().prettyURL() );
setCaption( kapp->makeStdCaption( caption ) ); setCaption( kapp->makeStdCaption( caption ) );
} }
@ -403,7 +403,7 @@ void ImageWindow::scrollImage( int x, int y, bool restrict )
// XUnmapWindow(); // XUnmapWindow();
// XSetWindowBackgroundPixmap() // XSetWindowBackgroundPixmap()
// resize window to fit image size, center image // resize window to fit image size, center image
// XClearWindow(); // tqrepaint // XClearWindow(); // repaint
// XMapWindow(), XSync(); // XMapWindow(), XSync();
// //
bool ImageWindow::showNextImage( const KURL& url ) bool ImageWindow::showNextImage( const KURL& url )
@ -412,7 +412,7 @@ bool ImageWindow::showNextImage( const KURL& url )
switch ( file->waitForDownload( this ) ) { switch ( file->waitForDownload( this ) ) {
case KuickFile::ERROR: case KuickFile::ERROR:
{ {
TQString tmp = i18n("Unable to download the image from %1.").tqarg(url.prettyURL()); TQString tmp = i18n("Unable to download the image from %1.").arg(url.prettyURL());
emit sigImageError( file, tmp ); emit sigImageError( file, tmp );
return false; return false;
} }
@ -430,7 +430,7 @@ bool ImageWindow::showNextImage( KuickFile *file )
if ( !loadImage( file ) ) { if ( !loadImage( file ) ) {
TQString tmp = i18n("Unable to load the image %1.\n" TQString tmp = i18n("Unable to load the image %1.\n"
"Perhaps the file format is unsupported or " "Perhaps the file format is unsupported or "
"your Imlib is not installed properly.").tqarg(file->url().prettyURL()); "your Imlib is not installed properly.").arg(file->url().prettyURL());
emit sigImageError( file, tmp ); emit sigImageError( file, tmp );
return false; return false;
} }
@ -1203,7 +1203,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
return KMessageBox::warningContinueCancel( return KMessageBox::warningContinueCancel(
this, this,
i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?") i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?")
.tqarg( newWidth ).tqarg( newHeight ), .arg( newWidth ).arg( newHeight ),
TQString(), TQString(),
KStdGuiItem::cont(), KStdGuiItem::cont(),
"ImageWindow_confirm_very_large_window" "ImageWindow_confirm_very_large_window"

@ -475,7 +475,7 @@ void ImlibWidget::setBackgroundColor( const TQColor& color )
{ {
myBackgroundColor = color; myBackgroundColor = color;
setPalette( TQPalette( myBackgroundColor )); setPalette( TQPalette( myBackgroundColor ));
tqrepaint( false); // FIXME - false? necessary at all? repaint( false); // FIXME - false? necessary at all?
} }
const TQColor& ImlibWidget::backgroundColor() const const TQColor& ImlibWidget::backgroundColor() const
@ -515,7 +515,7 @@ void ImlibWidget::setBusyCursor()
void ImlibWidget::restoreCursor() void ImlibWidget::restoreCursor()
{ {
if ( cursor().shape() == KCursor::waitCursor().tqshape() ) // only if nobody changed the cursor in the meantime! if ( cursor().shape() == KCursor::waitCursor().shape() ) // only if nobody changed the cursor in the meantime!
setCursor( m_oldCursor ); setCursor( m_oldCursor );
} }

@ -106,8 +106,8 @@ KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent )
KProgressDialog *dialog = new KProgressDialog( parent ); KProgressDialog *dialog = new KProgressDialog( parent );
dialog->setModal( true ); dialog->setModal( true );
dialog->setCaption( i18n("Downloading %1...").tqarg( m_url.fileName() ) ); dialog->setCaption( i18n("Downloading %1...").arg( m_url.fileName() ) );
dialog->setLabel( i18n("Please wait while downloading\n%1").tqarg( m_url.prettyURL() )); dialog->setLabel( i18n("Please wait while downloading\n%1").arg( m_url.prettyURL() ));
dialog->setAllowCancel( true ); dialog->setAllowCancel( true );
dialog->setAutoClose( true ); dialog->setAutoClose( true );

@ -133,7 +133,7 @@ KuickShow::KuickShow( const char *name )
if ( KMessageBox::warningYesNo( if ( KMessageBox::warningYesNo(
this, this,
i18n("Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", i18n("Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.",
"Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).tqarg(KStdGuiItem::no().plainText()), "Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).arg(KStdGuiItem::no().plainText()),
i18n("Display Multiple Images?")) i18n("Display Multiple Images?"))
!= KMessageBox::Yes ) != KMessageBox::Yes )
{ {
@ -253,7 +253,7 @@ void KuickShow::initGUI( const KURL& startDir )
coll, "kuick_print" ); coll, "kuick_print" );
print->setText( i18n("Print Image...") ); print->setText( i18n("Print Image...") );
KAction *configure = new KAction( i18n("Configure %1...").tqarg( KGlobal::instance()->aboutData()->programName() ), "configure", KAction *configure = new KAction( i18n("Configure %1...").arg( KGlobal::instance()->aboutData()->programName() ), "configure",
KShortcut(), KShortcut(),
TQT_TQOBJECT(this), TQT_SLOT( configuration() ), TQT_TQOBJECT(this), TQT_SLOT( configuration() ),
coll, "kuick_configure" ); coll, "kuick_configure" );
@ -552,7 +552,7 @@ bool KuickShow::showImage( const KFileItem *fi,
this, TQT_SLOT (slotTrashCurrentImage (ImageWindow *))); this, TQT_SLOT (slotTrashCurrentImage (ImageWindow *)));
if ( s_viewers.count() == 1 && moveToTopLeft ) { if ( s_viewers.count() == 1 && moveToTopLeft ) {
// we have to move to 0x0 before showing _and_ // we have to move to 0x0 before showing _and_
// after showing, otherwise we get some bogus tqgeometry() // after showing, otherwise we get some bogus geometry()
m_viewer->move( Kuick::workArea().topLeft() ); m_viewer->move( Kuick::workArea().topLeft() );
} }
@ -641,7 +641,7 @@ void KuickShow::performDeleteCurrentImage(TQWidget *parent)
if (KMessageBox::warningContinueCancel( if (KMessageBox::warningContinueCancel(
parent, parent,
i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()), i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()),
i18n("Delete File"), i18n("Delete File"),
KStdGuiItem::del(), KStdGuiItem::del(),
"Kuick_delete_current_image") "Kuick_delete_current_image")
@ -666,7 +666,7 @@ void KuickShow::performTrashCurrentImage(TQWidget *parent)
if (KMessageBox::warningContinueCancel( if (KMessageBox::warningContinueCancel(
parent, parent,
i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()), i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()),
i18n("Trash File"), i18n("Trash File"),
KGuiItem(i18n("to trash", "&Trash"),"edittrash"), KGuiItem(i18n("to trash", "&Trash"),"edittrash"),
"Kuick_trash_current_image") "Kuick_trash_current_image")

@ -52,7 +52,7 @@ bool Printing::printImage( ImageWindow& imageWin, TQWidget *parent )
KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page")); KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page"));
if ( printer.setup( parent, i18n("Print %1").tqarg(printer.docName().section('/', -1)) ) ) if ( printer.setup( parent, i18n("Print %1").arg(printer.docName().section('/', -1)) ) )
{ {
KTempFile tmpFile( TQString(), ".png" ); KTempFile tmpFile( TQString(), ".png" );
if ( tmpFile.status() == 0 ) if ( tmpFile.status() == 0 )
@ -109,7 +109,7 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f); bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f);
TQSize imagesize = image.size(); TQSize imagesize = image.size();
if ( shrinkToFit && (image.width() > w || image.height() > h) ) { if ( shrinkToFit && (image.width() > w || image.height() > h) ) {
imagesize.tqscale( w, h, TQSize::ScaleMin ); imagesize.scale( w, h, TQSize::ScaleMin );
} }
@ -117,28 +117,28 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
// align image // align image
// //
bool ok = false; bool ok = false;
int tqalignment = printer.option("app-kuickshow-tqalignment").toInt( &ok ); int alignment = printer.option("app-kuickshow-alignment").toInt( &ok );
if ( !ok ) if ( !ok )
tqalignment = TQt::AlignCenter; // default alignment = TQt::AlignCenter; // default
int x = 0; int x = 0;
int y = 0; int y = 0;
// ### need a GUI for this in KuickPrintDialogPage! // ### need a GUI for this in KuickPrintDialogPage!
// x - tqalignment // x - alignment
if ( tqalignment & TQt::AlignHCenter ) if ( alignment & TQt::AlignHCenter )
x = (w - imagesize.width())/2; x = (w - imagesize.width())/2;
else if ( tqalignment & TQt::AlignLeft ) else if ( alignment & TQt::AlignLeft )
x = 0; x = 0;
else if ( tqalignment & TQt::AlignRight ) else if ( alignment & TQt::AlignRight )
x = w - imagesize.width(); x = w - imagesize.width();
// y - tqalignment // y - alignment
if ( tqalignment & TQt::AlignVCenter ) if ( alignment & TQt::AlignVCenter )
y = (h - imagesize.height())/2; y = (h - imagesize.height())/2;
else if ( tqalignment & TQt::AlignTop ) else if ( alignment & TQt::AlignTop )
y = 0; y = 0;
else if ( tqalignment & TQt::AlignBottom ) else if ( alignment & TQt::AlignBottom )
y = h - imagesize.height(); y = h - imagesize.height();
// //
@ -258,7 +258,7 @@ void KuickPrintDialogPage::getOptions( TQMap<TQString,TQString>& opts,
TQString t = "true"; TQString t = "true";
TQString f = "false"; TQString f = "false";
// ### opts["app-kuickshow-tqalignment"] = ; // ### opts["app-kuickshow-alignment"] = ;
opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f; opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f;
opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f; opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f;
opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f; opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f;

@ -120,7 +120,7 @@ KView::KView()
// create status bar (hidden by default) // create status bar (hidden by default)
statusBar()->insertItem( "", STATUSBAR_SPEED_ID, 0, true ); statusBar()->insertItem( "", STATUSBAR_SPEED_ID, 0, true );
statusBar()->setItemFixed( STATUSBAR_SPEED_ID, statusBar()->setItemFixed( STATUSBAR_SPEED_ID,
8 + fontMetrics().width( i18n( "%1/s" ).tqarg( KIO::convertSize( 999000 ) ) ) ); 8 + fontMetrics().width( i18n( "%1/s" ).arg( KIO::convertSize( 999000 ) ) ) );
statusBar()->insertItem( "", STATUSBAR_CURSOR_ID, 0, true ); statusBar()->insertItem( "", STATUSBAR_CURSOR_ID, 0, true );
statusBar()->setItemFixed( STATUSBAR_CURSOR_ID, 8 + fontMetrics().width( "8888, 8888" ) ); statusBar()->setItemFixed( STATUSBAR_CURSOR_ID, 8 + fontMetrics().width( "8888, 8888" ) );
statusBar()->insertItem( "", STATUSBAR_SIZE_ID, 0, true ); statusBar()->insertItem( "", STATUSBAR_SIZE_ID, 0, true );
@ -262,7 +262,7 @@ bool KView::eventFilter( TQObject * obj, TQEvent * ev )
void KView::imageSizeChanged( const TQSize & /*size*/ ) void KView::imageSizeChanged( const TQSize & /*size*/ )
{ {
TQSize size = m_pCanvas->imageSize(); TQSize size = m_pCanvas->imageSize();
statusBar()->changeItem( TQString( "%1 x %2" ).tqarg( size.width() ).tqarg( size.height() ), STATUSBAR_SIZE_ID ); statusBar()->changeItem( TQString( "%1 x %2" ).arg( size.width() ).arg( size.height() ), STATUSBAR_SIZE_ID );
handleResize(); handleResize();
} }
@ -272,7 +272,7 @@ void KView::selectionChanged( const TQRect & rect )
if( rect.isNull() ) if( rect.isNull() )
statusBar()->changeItem( TQString(), STATUSBAR_SELECTION_ID ); statusBar()->changeItem( TQString(), STATUSBAR_SELECTION_ID );
else else
statusBar()->changeItem( TQString( "%1, %2 - %3 x %4" ).tqarg( rect.x() ).tqarg( rect.y() ).tqarg( rect.width() ).tqarg( rect.height() ), STATUSBAR_SELECTION_ID ); statusBar()->changeItem( TQString( "%1, %2 - %3 x %4" ).arg( rect.x() ).arg( rect.y() ).arg( rect.width() ).arg( rect.height() ), STATUSBAR_SELECTION_ID );
action( "crop" )->setEnabled( ! rect.isNull() ); action( "crop" )->setEnabled( ! rect.isNull() );
} }
@ -466,7 +466,7 @@ void KView::speedProgress( KIO::Job *, unsigned long bytesPerSecond )
TQString sizeStr; TQString sizeStr;
if( bytesPerSecond > 0 ) if( bytesPerSecond > 0 )
sizeStr = i18n( "%1/s" ).tqarg( KIO::convertSize( bytesPerSecond ) ); sizeStr = i18n( "%1/s" ).arg( KIO::convertSize( bytesPerSecond ) );
else else
sizeStr = i18n( "Stalled" ); sizeStr = i18n( "Stalled" );
@ -483,7 +483,7 @@ void KView::slotSetStatusBarText( const TQString & msg )
void KView::cursorPos( const TQPoint & pos ) void KView::cursorPos( const TQPoint & pos )
{ {
statusBar()->changeItem( TQString( "%1, %2" ).tqarg( pos.x() ).tqarg( pos.y() ), STATUSBAR_CURSOR_ID ); statusBar()->changeItem( TQString( "%1, %2" ).arg( pos.x() ).arg( pos.y() ), STATUSBAR_CURSOR_ID );
} }
void KView::setupActions( TQObject * partobject ) void KView::setupActions( TQObject * partobject )
@ -614,7 +614,7 @@ void KView::fitWindowToImage()
winsize.setWidth( workarea.width() ); winsize.setWidth( workarea.width() );
} }
TQRect winrect( tqgeometry() ); TQRect winrect( geometry() );
winrect.setSize( winsize ); winrect.setSize( winsize );
int xdiff = winrect.x() + winrect.width() - workarea.x() - workarea.width(); int xdiff = winrect.x() + winrect.width() - workarea.x() - workarea.width();

@ -587,7 +587,7 @@ void KImageCanvas::slotUpdateImage()
void KImageCanvas::mouseMoveEvent( TQMouseEvent * ) void KImageCanvas::mouseMoveEvent( TQMouseEvent * )
{ {
if( m_cursor.tqshape() == TQt::BlankCursor ) if( m_cursor.shape() == TQt::BlankCursor )
{ {
m_cursor.setShape( Qt::CrossCursor ); m_cursor.setShape( Qt::CrossCursor );
viewport()->setCursor( m_cursor ); viewport()->setCursor( m_cursor );

@ -207,7 +207,7 @@ void KImageHolder::eraseSelect()
inner.rBottom() -= 1; inner.rBottom() -= 1;
r -= inner; r -= inner;
TQMemArray<TQRect> rects = r.tqrects(); TQMemArray<TQRect> rects = r.rects();
if( m_pDoubleBuffer ) if( m_pDoubleBuffer )
for( unsigned int i = 0; i < rects.size(); ++i ) for( unsigned int i = 0; i < rects.size(); ++i )

@ -68,7 +68,7 @@ void KViewKonqExtension::print()
printer.addDialogPage( new ImageSettings ); printer.addDialogPage( new ImageSettings );
printer.setDocName( "KView: " + m_pViewer->url().fileName( false ) ); printer.setDocName( "KView: " + m_pViewer->url().fileName( false ) );
if ( !printer.setup( ((KViewViewer *)parent())->widget(), i18n("Print %1").tqarg(m_pViewer->url().fileName( false )) ) ) if ( !printer.setup( ((KViewViewer *)parent())->widget(), i18n("Print %1").arg(m_pViewer->url().fileName( false )) ) )
return; return;
TQPainter painter; TQPainter painter;

@ -397,7 +397,7 @@ bool KViewViewer::openFile()
} }
else else
{ {
emit setStatusBarText( i18n( "Unknown image format: %1" ).tqarg( m_url.prettyURL() ) ); emit setStatusBarText( i18n( "Unknown image format: %1" ).arg( m_url.prettyURL() ) );
return false; return false;
} }
} }
@ -406,12 +406,12 @@ bool KViewViewer::openFile()
kdDebug( 4610 ) << k_funcinfo << " load from file: " << m_file << endl; kdDebug( 4610 ) << k_funcinfo << " load from file: " << m_file << endl;
if( ! TQFile::exists( m_file ) ) if( ! TQFile::exists( m_file ) )
{ {
emit setStatusBarText( i18n( "No such file: %1" ).tqarg( m_file ) ); emit setStatusBarText( i18n( "No such file: %1" ).arg( m_file ) );
return false; return false;
} }
if( TQImage::imageFormat( m_file ) == 0 ) if( TQImage::imageFormat( m_file ) == 0 )
{ {
emit setStatusBarText( i18n( "Unknown image format: %1" ).tqarg( m_file ) ); emit setStatusBarText( i18n( "Unknown image format: %1" ).arg( m_file ) );
return false; return false;
} }
// determine Mime Type // determine Mime Type
@ -567,7 +567,7 @@ void KViewViewer::writeSettings()
void KViewViewer::zoomChanged( double zoom ) void KViewViewer::zoomChanged( double zoom )
{ {
kdDebug( 4610 ) << k_funcinfo << endl; kdDebug( 4610 ) << k_funcinfo << endl;
emit setWindowCaption( m_sCaption + TQString( " (%1%)" ).tqarg( zoom * 100, 0, 'f', 0 ) ); emit setWindowCaption( m_sCaption + TQString( " (%1%)" ).arg( zoom * 100, 0, 'f', 0 ) );
updateZoomMenu( zoom ); updateZoomMenu( zoom );
} }
@ -685,7 +685,7 @@ void KViewViewer::updateZoomMenu( double zoom )
} }
// first look if it's a new value (not in the list yet) // first look if it's a new value (not in the list yet)
TQString z = TQString( "%1%" ).tqarg( zoom * 100, 0, 'f', 0 ); TQString z = TQString( "%1%" ).arg( zoom * 100, 0, 'f', 0 );
TQStringList items = m_paZoom->items(); TQStringList items = m_paZoom->items();
int idx = items.findIndex( z ); int idx = items.findIndex( z );
if( -1 == idx ) if( -1 == idx )
@ -803,12 +803,12 @@ void KViewViewer::slotFileDirty( const TQString & )
if( isModified() && isReadWrite() ) if( isModified() && isReadWrite() )
{ {
KPassivePopup * pop = new KPassivePopup( m_pParentWidget ); KPassivePopup * pop = new KPassivePopup( m_pParentWidget );
TQVBox * vb = pop->standardView( i18n( "Load changed image? - %1" ).tqarg( kapp->aboutData()->programName() ), TQVBox * vb = pop->standardView( i18n( "Load changed image? - %1" ).arg( kapp->aboutData()->programName() ),
TQString(), kapp->miniIcon() ); TQString(), kapp->miniIcon() );
( void )new TQLabel( i18n( "The image %1 which you have modified has changed on disk.\n" ( void )new TQLabel( i18n( "The image %1 which you have modified has changed on disk.\n"
"Do you want to reload the file and lose your changes?\n" "Do you want to reload the file and lose your changes?\n"
"If you don't and subsequently save the image, you will lose the\n" "If you don't and subsequently save the image, you will lose the\n"
"changes that have already been saved." ).tqarg( url().fileName() ), vb ); "changes that have already been saved." ).arg( url().fileName() ), vb );
TQWidget * hb = new TQWidget( vb ); TQWidget * hb = new TQWidget( vb );
TQHBoxLayout * tqlayout = new TQHBoxLayout( hb ); TQHBoxLayout * tqlayout = new TQHBoxLayout( hb );
tqlayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); tqlayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );

@ -412,7 +412,7 @@ void KViewPresenter::loadList()
TQString tempfile; TQString tempfile;
if( ! KIO::NetAccess::download( url, tempfile, m_pViewer->widget() ) ) if( ! KIO::NetAccess::download( url, tempfile, m_pViewer->widget() ) )
{ {
KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).tqarg( url.prettyURL() ) ); KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).arg( url.prettyURL() ) );
return; return;
} }
TQFile file( tempfile ); TQFile file( tempfile );
@ -442,7 +442,7 @@ void KViewPresenter::loadList()
} }
else else
{ {
KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).tqarg( url.prettyURL() ) ); KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).arg( url.prettyURL() ) );
} }
file.close(); file.close();
} }

@ -147,7 +147,7 @@ void DocumentWidget::timerEvent( TQTimerEvent *e )
animationCounter = 0; animationCounter = 0;
} }
tqrepaint(flashRect, false); repaint(flashRect, false);
} }
@ -160,7 +160,7 @@ void DocumentWidget::flash(int fo)
animationCounter = 10; animationCounter = 10;
TQRect flashRect = linkFlashRect(); TQRect flashRect = linkFlashRect();
flashRect.addCoords(-1, -1, 1, 1); flashRect.addCoords(-1, -1, 1, 1);
tqrepaint(flashRect, false); repaint(flashRect, false);
} }
animationCounter = 0; animationCounter = 0;
flashOffset = fo; flashOffset = fo;
@ -273,7 +273,7 @@ void DocumentWidget::paintEvent(TQPaintEvent *e)
return; return;
} }
TQMemArray<TQRect> damagedRects = TQRegion(e->region()).tqrects(); TQMemArray<TQRect> damagedRects = TQRegion(e->region()).rects();
for (unsigned int i = 0; i < damagedRects.count(); i++) for (unsigned int i = 0; i < damagedRects.count(); i++)
{ {
// Paint the page where it intersects with the damaged area. // Paint the page where it intersects with the damaged area.
@ -345,7 +345,7 @@ void DocumentWidget::paintEvent(TQPaintEvent *e)
p.setBrush(white); p.setBrush(white);
p.setRasterOp(TQt::XorROP); p.setRasterOp(TQt::XorROP);
TQMemArray<TQRect> selectionRects = selectedRegion.tqrects(); TQMemArray<TQRect> selectionRects = selectedRegion.rects();
for (unsigned int i = 0; i < selectionRects.count(); i++) for (unsigned int i = 0; i < selectionRects.count(); i++)
p.drawRect(selectionRects[i]); p.drawRect(selectionRects[i]);
@ -545,7 +545,7 @@ void DocumentWidget::mouseMoveEvent ( TQMouseEvent * e )
if ( link.startsWith("#") ) if ( link.startsWith("#") )
link = link.remove(0,1); link = link.remove(0,1);
emit setStatusBarText( i18n("Link to %1").tqarg(link) ); emit setStatusBarText( i18n("Link to %1").arg(link) );
indexOfUnderlinedLink = i; indexOfUnderlinedLink = i;
if (KVSPrefs::underlineLinks() == KVSPrefs::EnumUnderlineLinks::OnlyOnHover && if (KVSPrefs::underlineLinks() == KVSPrefs::EnumUnderlineLinks::OnlyOnHover &&
@ -661,10 +661,10 @@ void DocumentWidget::updateSelection(const TextSelection& newTextSelection)
selectedRegion = newlySelectedRegion; selectedRegion = newlySelectedRegion;
TQMemArray<TQRect> rectangles = updateRegion.tqrects(); TQMemArray<TQRect> rectangles = updateRegion.rects();
for (unsigned int i = 0; i < rectangles.count(); i++) for (unsigned int i = 0; i < rectangles.count(); i++)
{ {
tqrepaint(rectangles[i]); repaint(rectangles[i]);
} }
} }
} }

@ -166,7 +166,7 @@ void KMultiPage::slotSave()
fileName = fileName+ending; fileName = fileName+ending;
if (TQFile(fileName).exists()) { if (TQFile(fileName).exists()) {
int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Shall I overwrite that file?").tqarg(fileName), int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Shall I overwrite that file?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite")); i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel) if (r == KMessageBox::Cancel)
return; return;
@ -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(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) { if ( printer->setup(parentWdg, i18n("Print %1").arg(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())
@ -1427,7 +1427,7 @@ void KMultiPage::findNextText()
if (i != 0) if (i != 0)
{ {
setStatusBarText(i18n("Search page %1 of %2").tqarg(pageNumber).tqarg(numberOfPages())); setStatusBarText(i18n("Search page %1 of %2").arg(pageNumber).arg(numberOfPages()));
kapp->processEvents(); kapp->processEvents();
} }
@ -1474,7 +1474,7 @@ void KMultiPage::findNextText()
int answ = KMessageBox::questionYesNo(scrollView(), int answ = KMessageBox::questionYesNo(scrollView(),
i18n("<qt>The search string <strong>%1</strong> could not be found by the " i18n("<qt>The search string <strong>%1</strong> could not be found by the "
"end of the document. Should the search be restarted from the beginning " "end of the document. Should the search be restarted from the beginning "
"of the document?</qt>").tqarg(searchText), "of the document?</qt>").arg(searchText),
i18n("Text Not Found"), KStdGuiItem::cont(), KStdGuiItem::cancel()); i18n("Text Not Found"), KStdGuiItem::cont(), KStdGuiItem::cancel());
if (answ != KMessageBox::Yes) if (answ != KMessageBox::Yes)
@ -1499,7 +1499,7 @@ void KMultiPage::findNextText()
} }
} }
KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").tqarg(searchText)); KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").arg(searchText));
setStatusBarText(TQString()); setStatusBarText(TQString());
searchInProgress = false; searchInProgress = false;
if (!cachedPage) if (!cachedPage)
@ -1569,7 +1569,7 @@ void KMultiPage::findPrevText()
if (i != 0) if (i != 0)
{ {
setStatusBarText(i18n("Search page %1 of %2").tqarg(pageNumber).tqarg(numberOfPages())); setStatusBarText(i18n("Search page %1 of %2").arg(pageNumber).arg(numberOfPages()));
kapp->processEvents(); kapp->processEvents();
} }
@ -1616,7 +1616,7 @@ void KMultiPage::findPrevText()
int answ = KMessageBox::questionYesNo(scrollView(), int answ = KMessageBox::questionYesNo(scrollView(),
i18n("<qt>The search string <strong>%1</strong> could not be found by the " i18n("<qt>The search string <strong>%1</strong> could not be found by the "
"beginning of the document. Should the search be restarted from the end " "beginning of the document. Should the search be restarted from the end "
"of the document?</qt>").tqarg(searchText), "of the document?</qt>").arg(searchText),
i18n("Text Not Found"), KStdGuiItem::cont(), KStdGuiItem::cancel()); i18n("Text Not Found"), KStdGuiItem::cont(), KStdGuiItem::cancel());
if (answ != KMessageBox::Yes) if (answ != KMessageBox::Yes)
@ -1641,7 +1641,7 @@ void KMultiPage::findPrevText()
} }
} }
KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").tqarg(searchText)); KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").arg(searchText));
setStatusBarText(TQString()); setStatusBarText(TQString());
searchInProgress = false; searchInProgress = false;
if (!cachedPage) if (!cachedPage)
@ -1710,7 +1710,7 @@ void KMultiPage::reload()
pageCache->clear(); pageCache->clear();
pageCache->deselectText(); pageCache->deselectText();
document_history.clear(); document_history.clear();
emit setStatusBarText(i18n("Reloading file %1").tqarg(m_file)); emit setStatusBarText(i18n("Reloading file %1").arg(m_file));
TQ_INT32 pg = currentPageNumber(); TQ_INT32 pg = currentPageNumber();
killTimer(timer_id); killTimer(timer_id);
@ -1746,7 +1746,7 @@ bool KMultiPage::openFile()
pageCache->deselectText(); pageCache->deselectText();
document_history.clear(); document_history.clear();
pageCache->clear(); pageCache->clear();
emit setStatusBarText(i18n("Loading file %1").tqarg(m_file)); emit setStatusBarText(i18n("Loading file %1").arg(m_file));
bool r = renderer->setFile(m_file, m_url); bool r = renderer->setFile(m_file, m_url);
@ -1887,9 +1887,9 @@ KPrinter *KMultiPage::getPrinter(bool enablePageSizeFeatures)
} else } else
it++; it++;
if (endval == val) if (endval == val)
range += TQString("%1").tqarg(val); range += TQString("%1").arg(val);
else else
range += TQString("%1-%2").tqarg(val).tqarg(endval); range += TQString("%1-%2").arg(val).arg(endval);
} while (it != selectedPageNo.end() ); } while (it != selectedPageNo.end() );
printer->setOption( "kde-range", range ); printer->setOption( "kde-range", range );
} }
@ -1912,7 +1912,7 @@ void KMultiPage::doExportText()
if (finfo.exists()) if (finfo.exists())
{ {
int r = KMessageBox::warningContinueCancel (scrollView(), int r = KMessageBox::warningContinueCancel (scrollView(),
i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite")); i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel) if (r == KMessageBox::Cancel)

@ -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(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) )) { if (!printer->setup(parentWdg, i18n("Print %1").arg(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(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) )) { if (!printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1)) )) {
delete printer; delete printer;
return; return;
} }

@ -98,7 +98,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p
offers = KTrader::self()->query( offers = KTrader::self()->query(
TQString::fromLatin1("KViewShell/MultiPage" ), TQString::fromLatin1("KViewShell/MultiPage" ),
TQString("([X-KDE-MultiPageVersion] == %1) and " TQString("([X-KDE-MultiPageVersion] == %1) and "
"([X-KDE-MimeTypes] == '%2')").tqarg(MULTIPAGE_VERSION).tqarg(defaultMimeType)); "([X-KDE-MimeTypes] == '%2')").arg(MULTIPAGE_VERSION).arg(defaultMimeType));
} }
// If no default MimeType is given or no MultiPage has been found, try to load the Empty MultiPage. // If no default MimeType is given or no MultiPage has been found, try to load the Empty MultiPage.
@ -107,7 +107,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p
offers = KTrader::self()->query( offers = KTrader::self()->query(
TQString::fromLatin1("KViewShell/MultiPage" ), TQString::fromLatin1("KViewShell/MultiPage" ),
TQString("([X-KDE-MultiPageVersion] == %1) and " TQString("([X-KDE-MultiPageVersion] == %1) and "
"([X-KDE-EmptyMultiPage] == 1)").tqarg(MULTIPAGE_VERSION)); "([X-KDE-EmptyMultiPage] == 1)").arg(MULTIPAGE_VERSION));
} }
// If still no MultiPage has been found, report an error and abort. // If still no MultiPage has been found, report an error and abort.
@ -137,7 +137,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p
break; break;
case KParts::ComponentFactory::ErrNoLibrary: case KParts::ComponentFactory::ErrNoLibrary:
reason = i18n("<qt><p>The specified library <b>%1</b> could not be loaded. The error message returned was:</p>" reason = i18n("<qt><p>The specified library <b>%1</b> could not be loaded. The error message returned was:</p>"
"<p><b>%2</b></p></qt>").tqarg(service->library()).tqarg(KLibLoader::self()->lastErrorMessage()); "<p><b>%2</b></p></qt>").arg(service->library()).arg(KLibLoader::self()->lastErrorMessage());
break; break;
case KParts::ComponentFactory::ErrNoFactory: case KParts::ComponentFactory::ErrNoFactory:
reason = i18n("<qt>The library does not export a factory for creating components.</qt>"); reason = i18n("<qt>The library does not export a factory for creating components.</qt>");
@ -155,7 +155,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p
"question. If that does not help, you could file an error report, either to the " "question. If that does not help, you could file an error report, either to the "
"provider of your software (e.g. the vendor of your Linux distribution), or " "provider of your software (e.g. the vendor of your Linux distribution), or "
"directly to the authors of the software. The entry <b>Report Bug...</b> in the " "directly to the authors of the software. The entry <b>Report Bug...</b> in the "
"<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").tqarg(m_file).tqarg(service->library()); "<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").arg(m_file).arg(service->library());
TQString caption = i18n("Error Initializing Software Component"); TQString caption = i18n("Error Initializing Software Component");
KMessageBox::detailedError(mainWidget, text, reason, caption); KMessageBox::detailedError(mainWidget, text, reason, caption);
emit setStatusBarText(TQString()); emit setStatusBarText(TQString());
@ -420,9 +420,9 @@ TQString KViewPart::pageSizeDescription()
TQString size = " "; TQString size = " ";
if (s.formatNumber() == -1) { if (s.formatNumber() == -1) {
if (KGlobal::locale()-> measureSystem() == KLocale::Metric) if (KGlobal::locale()-> measureSystem() == KLocale::Metric)
size += TQString("%1x%2 mm").tqarg(s.width().getLength_in_mm(), 0, 'f', 0).tqarg(s.height().getLength_in_mm(), 0, 'f', 0); size += TQString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0);
else else
size += TQString("%1x%2 in").tqarg(s.width().getLength_in_inch(), 0, 'g', 2).tqarg(s.height().getLength_in_inch(), 0, 'g', 2); size += TQString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2);
} else { } else {
size += s.formatName() + "/"; size += s.formatName() + "/";
if (s.getOrientation() == 0) if (s.getOrientation() == 0)
@ -472,7 +472,7 @@ TQStringList KViewPart::supportedMimeTypes()
// Search for service // Search for service
KTrader::OfferList offers = KTrader::self()->query( KTrader::OfferList offers = KTrader::self()->query(
TQString::fromLatin1("KViewShell/MultiPage"), TQString::fromLatin1("KViewShell/MultiPage"),
TQString("([X-KDE-MultiPageVersion] == %1)").tqarg(MULTIPAGE_VERSION) TQString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION)
); );
if (!offers.isEmpty()) if (!offers.isEmpty())
@ -517,7 +517,7 @@ TQStringList KViewPart::fileFormats() const
// Search for service // Search for service
KTrader::OfferList offers = KTrader::self()->query( KTrader::OfferList offers = KTrader::self()->query(
TQString::fromLatin1("KViewShell/MultiPage"), TQString::fromLatin1("KViewShell/MultiPage"),
TQString("([X-KDE-MultiPageVersion] == %1)").tqarg(MULTIPAGE_VERSION) TQString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION)
); );
if (!offers.isEmpty()) if (!offers.isEmpty())
@ -642,7 +642,7 @@ bool KViewPart::openFile()
// If we still have not found a file. Show an error message and return. // If we still have not found a file. Show an error message and return.
if (!fi.exists()) if (!fi.exists())
{ {
KMessageBox::error(mainWidget, i18n("<qt>File <nobr><strong>%1</strong></nobr> does not exist.</qt>").tqarg(m_file)); KMessageBox::error(mainWidget, i18n("<qt>File <nobr><strong>%1</strong></nobr> does not exist.</qt>").arg(m_file));
emit setStatusBarText(TQString()); emit setStatusBarText(TQString());
return false; return false;
} }
@ -651,7 +651,7 @@ bool KViewPart::openFile()
// Set the window caption now, before we do any uncompression and generation of temporary files. // Set the window caption now, before we do any uncompression and generation of temporary files.
tmpFileURL.setPath(m_file); tmpFileURL.setPath(m_file);
emit setStatusBarText(i18n("Loading '%1'...").tqarg(tmpFileURL.prettyURL())); emit setStatusBarText(i18n("Loading '%1'...").arg(tmpFileURL.prettyURL()));
emit setWindowCaption( tmpFileURL.prettyURL() ); // set Window caption WITHOUT the reference part! emit setWindowCaption( tmpFileURL.prettyURL() ); // set Window caption WITHOUT the reference part!
// Check if the file is compressed // Check if the file is compressed
@ -678,7 +678,7 @@ bool KViewPart::openFile()
if(tmpUnzipped->status() != 0) if(tmpUnzipped->status() != 0)
{ {
KMessageBox::error(mainWidget, i18n("<qt><strong>File Error!</strong> Could not create temporary file " KMessageBox::error(mainWidget, i18n("<qt><strong>File Error!</strong> Could not create temporary file "
"<nobr><strong>%1</strong></nobr>.</qt>").tqarg(strerror(tmpUnzipped->status()))); "<nobr><strong>%1</strong></nobr>.</qt>").arg(strerror(tmpUnzipped->status())));
emit setWindowCaption(TQString()); emit setWindowCaption(TQString());
emit setStatusBarText(TQString()); emit setStatusBarText(TQString());
return false; return false;
@ -700,7 +700,7 @@ bool KViewPart::openFile()
{ {
KMessageBox::detailedError(mainWidget, i18n("<qt><strong>File Error!</strong> Could not open the file " KMessageBox::detailedError(mainWidget, i18n("<qt><strong>File Error!</strong> Could not open the file "
"<nobr><strong>%1</strong></nobr> for uncompression. " "<nobr><strong>%1</strong></nobr> for uncompression. "
"The file will not be loaded.</qt>").tqarg(m_file), "The file will not be loaded.</qt>").arg(m_file),
i18n("<qt>This error typically occurs if you do not have enough permissions to read the file. " i18n("<qt>This error typically occurs if you do not have enough permissions to read the file. "
"You can check ownership and permissions if you right-click on the file in the Konqueror " "You can check ownership and permissions if you right-click on the file in the Konqueror "
"file manager and then choose the 'Properties' menu.</qt>")); "file manager and then choose the 'Properties' menu.</qt>"));
@ -712,7 +712,7 @@ bool KViewPart::openFile()
KProgressDialog* prog = new KProgressDialog(0L, "uncompress-progress", KProgressDialog* prog = new KProgressDialog(0L, "uncompress-progress",
i18n("Uncompressing..."), i18n("Uncompressing..."),
i18n("<qt>Uncompressing the file <nobr><strong>%1</strong></nobr>. Please wait.</qt>").tqarg(m_file)); i18n("<qt>Uncompressing the file <nobr><strong>%1</strong></nobr>. Please wait.</qt>").arg(m_file));
prog->progressBar()->setTotalSteps((int) fi.size()/1024); prog->progressBar()->setTotalSteps((int) fi.size()/1024);
prog->progressBar()->setProgress(0); prog->progressBar()->setProgress(0);
@ -746,7 +746,7 @@ bool KViewPart::openFile()
if ((read != 0) || (tmpUnzipped->file()->size() == 0)) if ((read != 0) || (tmpUnzipped->file()->size() == 0))
{ {
KMessageBox::detailedError(mainWidget, i18n("<qt><strong>File Error!</strong> Could not uncompress " KMessageBox::detailedError(mainWidget, i18n("<qt><strong>File Error!</strong> Could not uncompress "
"the file <nobr><strong>%1</strong></nobr>. The file will not be loaded.</qt>").tqarg( m_file ), "the file <nobr><strong>%1</strong></nobr>. The file will not be loaded.</qt>").arg( m_file ),
i18n("<qt>This error typically occurs if the file is corrupt. " i18n("<qt>This error typically occurs if the file is corrupt. "
"If you want to be sure, try to decompress the file manually using command-line tools.</qt>")); "If you want to be sure, try to decompress the file manually using command-line tools.</qt>"));
emit setWindowCaption(TQString()); emit setWindowCaption(TQString());
@ -770,13 +770,13 @@ bool KViewPart::openFile()
KTrader::OfferList offers = KTrader::self()->query( KTrader::OfferList offers = KTrader::self()->query(
TQString::fromLatin1("KViewShell/MultiPage" ), TQString::fromLatin1("KViewShell/MultiPage" ),
TQString("([X-KDE-MultiPageVersion] == %1) and " TQString("([X-KDE-MultiPageVersion] == %1) and "
"([X-KDE-MimeTypes] == '%2')").tqarg(MULTIPAGE_VERSION).tqarg(mimetype->name())); "([X-KDE-MimeTypes] == '%2')").arg(MULTIPAGE_VERSION).arg(mimetype->name()));
if (offers.isEmpty()) { if (offers.isEmpty()) {
KMessageBox::detailedError(mainWidget, i18n("<qt>The document <b>%1</b> cannot be shown because " KMessageBox::detailedError(mainWidget, i18n("<qt>The document <b>%1</b> cannot be shown because "
"its file type is not supported.</qt>").tqarg(m_file), "its file type is not supported.</qt>").arg(m_file),
i18n("<qt>The file has mime type <b>%1</b> which is not supported by " i18n("<qt>The file has mime type <b>%1</b> which is not supported by "
"any of the installed KViewShell plugins.</qt>").tqarg(mimetype->name())); "any of the installed KViewShell plugins.</qt>").arg(mimetype->name()));
emit setWindowCaption(TQString()); emit setWindowCaption(TQString());
emit setStatusBarText(TQString()); emit setStatusBarText(TQString());
return false; return false;
@ -813,7 +813,7 @@ bool KViewPart::openFile()
reason = i18n("<qt>The specified service provides no shared library.</qt>"); reason = i18n("<qt>The specified service provides no shared library.</qt>");
break; break;
case KParts::ComponentFactory::ErrNoLibrary: case KParts::ComponentFactory::ErrNoLibrary:
reason = i18n("<qt><p>The specified library <b>%1</b> could not be loaded. The error message returned was:</p> <p><b>%2</b></p></qt>").tqarg(service->library()).tqarg(KLibLoader::self()->lastErrorMessage()); reason = i18n("<qt><p>The specified library <b>%1</b> could not be loaded. The error message returned was:</p> <p><b>%2</b></p></qt>").arg(service->library()).arg(KLibLoader::self()->lastErrorMessage());
break; break;
case KParts::ComponentFactory::ErrNoFactory: case KParts::ComponentFactory::ErrNoFactory:
reason = i18n("<qt>The library does not export a factory for creating components.</qt>"); reason = i18n("<qt>The library does not export a factory for creating components.</qt>");
@ -832,7 +832,7 @@ bool KViewPart::openFile()
"question. If that does not help, you could file an error report, either to the " "question. If that does not help, you could file an error report, either to the "
"provider of your software (e.g. the vendor of your Linux distribution), or " "provider of your software (e.g. the vendor of your Linux distribution), or "
"directly to the authors of the software. The entry <b>Report Bug...</b> in the " "directly to the authors of the software. The entry <b>Report Bug...</b> in the "
"<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").tqarg(m_file).tqarg(service->library()).tqarg(mimetype->name()); "<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").arg(m_file).arg(service->library()).arg(mimetype->name());
TQString caption = i18n("Error Initializing Software Component"); TQString caption = i18n("Error Initializing Software Component");
if (reason.isEmpty()) if (reason.isEmpty())
KMessageBox::error(mainWidget, text, caption); KMessageBox::error(mainWidget, text, caption);
@ -900,7 +900,7 @@ bool KViewPart::openFile()
} }
checkActions(); checkActions();
emit zoomChanged(TQString("%1%").tqarg((int)(_zoomVal.value()*100.0+0.5))); emit zoomChanged(TQString("%1%").arg((int)(_zoomVal.value()*100.0+0.5)));
emit setStatusBarText(TQString()); emit setStatusBarText(TQString());
return r; return r;
} }
@ -994,7 +994,7 @@ void KViewPart::pageInfo(int numpages, int currentpage)
updateZoomLevel(); updateZoomLevel();
// ATTN: The string here must be the same as in setPage() below // ATTN: The string here must be the same as in setPage() below
TQString pageString = i18n("Page %1 of %2").tqarg(currentpage).tqarg(numpages); TQString pageString = i18n("Page %1 of %2").arg(currentpage).arg(numpages);
if (pageChangeIsConnected) { if (pageChangeIsConnected) {
emit pageChanged(pageString); emit pageChanged(pageString);
emit sizeChanged(pageSizeDescription()); emit sizeChanged(pageSizeDescription());
@ -1397,7 +1397,7 @@ void KViewPart::setStatusBarTextFromMultiPage( const TQString &msg )
{ {
int currentPage = multiPage->currentPageNumber(); int currentPage = multiPage->currentPageNumber();
int numberOfPages = multiPage->numberOfPages(); int numberOfPages = multiPage->numberOfPages();
emit setStatusBarText(i18n("Page %1 of %2").tqarg(currentPage).tqarg(numberOfPages)); emit setStatusBarText(i18n("Page %1 of %2").arg(currentPage).arg(numberOfPages));
} }
} }
else else

@ -88,13 +88,13 @@ int main(int argc, char **argv)
KURL url(args->url(0)); KURL url(args->url(0));
if (!args->url(0).isValid()) { if (!args->url(0).isValid()) {
kdError(1223) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; kdError(1223) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl;
return -1; return -1;
} }
if (!args->url(0).isLocalFile()) { if (!args->url(0).isLocalFile()) {
kdError(1223) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " kdError(1223) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local "
"files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl;
return -1; return -1;
} }

@ -69,7 +69,7 @@ ThumbnailWidget::ThumbnailWidget(MarkListWidget* _parent, const PageNumber& _pag
void ThumbnailWidget::paintEvent(TQPaintEvent* e) void ThumbnailWidget::paintEvent(TQPaintEvent* e)
{ {
// Only tqrepaint if the widget is really visible. We need to check this because TQt // Only repaint if the widget is really visible. We need to check this because TQt
// sends paintEvents to all widgets that have ever been visible in the Scrollview // sends paintEvents to all widgets that have ever been visible in the Scrollview
// whenever the ScrollView is resized. This also increases the percieved performance // whenever the ScrollView is resized. This also increases the percieved performance
// only thumbnails that are really needed are rendered. // only thumbnails that are really needed are rendered.
@ -185,7 +185,7 @@ MarkListWidget::MarkListWidget(TQWidget* _parent, MarkList* _markList, const Pag
TQToolTip::add(checkBox, i18n("Select for printing")); TQToolTip::add(checkBox, i18n("Select for printing"));
bottomLayout->addWidget(checkBox, 0, TQt::AlignAuto); bottomLayout->addWidget(checkBox, 0, TQt::AlignAuto);
pageLabel = new TQLabel(TQString("%1").tqarg(pageNumber), this); pageLabel = new TQLabel(TQString("%1").arg(pageNumber), this);
bottomLayout->addWidget(pageLabel, 1); bottomLayout->addWidget(pageLabel, 1);
_backgroundColor = KGlobalSettings::baseColor(); _backgroundColor = KGlobalSettings::baseColor();

@ -304,7 +304,7 @@ TQString pageSize::serialize() const
if ((currentSize >= 0) && (fabs(staticList[currentSize].height-pageHeight.getLength_in_mm()) <= 0.5)) if ((currentSize >= 0) && (fabs(staticList[currentSize].height-pageHeight.getLength_in_mm()) <= 0.5))
return staticList[currentSize].name; return staticList[currentSize].name;
else else
return TQString("%1x%2").tqarg(pageWidth.getLength_in_mm()).tqarg(pageHeight.getLength_in_mm()); return TQString("%1x%2").arg(pageWidth.getLength_in_mm()).arg(pageHeight.getLength_in_mm());
} }

@ -499,10 +499,10 @@ void PageView::viewportPaintEvent(TQPaintEvent* e)
DocumentWidget* item = widgetList->at(i); DocumentWidget* item = widgetList->at(i);
// Check if the Widget needs to be updated. // Check if the Widget needs to be updated.
if (!item->tqgeometry().intersects(e->rect())) if (!item->geometry().intersects(e->rect()))
continue; continue;
TQRect widgetGeometry = item->tqgeometry(); TQRect widgetGeometry = item->geometry();
// Draw the widget. // Draw the widget.
if (e->rect().intersects(widgetGeometry)) if (e->rect().intersects(widgetGeometry))
@ -521,7 +521,7 @@ void PageView::viewportPaintEvent(TQPaintEvent* e)
// Paint the background. // Paint the background.
TQPainter p(viewport()); TQPainter p(viewport());
TQMemArray<TQRect> backgroundRects = backgroundArea.tqrects(); TQMemArray<TQRect> backgroundRects = backgroundArea.rects();
for (unsigned int i = 0; i < backgroundRects.count(); i++) for (unsigned int i = 0; i < backgroundRects.count(); i++)
p.fillRect(backgroundRects[i], colorGroup().mid()); p.fillRect(backgroundRects[i], colorGroup().mid());

@ -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(parentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) { if ( printer->setup(parentWdg, i18n("Print %1").arg(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(parentWdg, 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?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite")); i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel) if (r == KMessageBox::Cancel)
return; return;
@ -345,7 +345,7 @@ void DjVuMultiPage::slotSave()
/* /*
if (!djvuRenderer.save(fileName) == false) if (!djvuRenderer.save(fileName) == false)
KMessageBox::error( parentWdg, 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>").arg(fileName),
i18n("File Error")); i18n("File Error"));
*/ */

@ -271,7 +271,7 @@ bool DjVuRenderer::setFile(const TQString &fname, const KURL &)
TQString filename = fi.absFilePath(); TQString filename = fi.absFilePath();
if (!fi.exists() || fi.isDir()) { if (!fi.exists() || fi.isDir()) {
KMessageBox::error( parentWidget, 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>").arg(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.
return false; return false;
@ -293,7 +293,7 @@ bool DjVuRenderer::setFile(const TQString &fname, const KURL &)
if (!document) if (!document)
{ {
KMessageBox::error( parentWidget, 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>").arg(filename),
i18n("File Error")); i18n("File Error"));
clear(); clear();
@ -348,7 +348,7 @@ void DjVuRenderer::getAnnotations(RenderedDocumentPage* page, GP<DjVuImage> djvu
for (GPosition pos = map; pos; ++pos) for (GPosition pos = map; pos; ++pos)
{ {
// Currently we only support rectangular links // Currently we only support rectangular links
if (!map[pos]->get_tqshape_type() == GMapArea::RECT) if (!map[pos]->get_shape_type() == GMapArea::RECT)
continue; continue;
GRect rect = map[pos]->get_bound_rect(); GRect rect = map[pos]->get_bound_rect();
@ -461,7 +461,7 @@ GP<DjVuTXT> DjVuRenderer::getText(PageNumber pageNumber)
void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, TQSize& djvuPageSize) void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, TQSize& djvuPageSize)
{ {
if (zone.tqchildren.isempty()) if (zone.children.isempty())
{ {
int pageWidth = page->width(); int pageWidth = page->width();
int pageHeight = page->height(); int pageHeight = page->height();
@ -481,9 +481,9 @@ void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& tex
} }
else else
{ {
for (GPosition pos=zone.tqchildren; pos; ++pos) for (GPosition pos=zone.children; pos; ++pos)
{ {
fillInText(page, text, zone.tqchildren[pos], djvuPageSize); fillInText(page, text, zone.children[pos], djvuPageSize);
} }
} }
} }
@ -657,7 +657,7 @@ void DjVuRenderer::deletePages(TQ_UINT16 from, TQ_UINT16 to)
for(TQ_UINT16 i=from; i<=to; i++) { for(TQ_UINT16 i=from; i<=to; i++) {
document_new->remove_page(from-1); document_new->remove_page(from-1);
pdialog->progressBar()->setProgress(i-from); pdialog->progressBar()->setProgress(i-from);
pdialog->progressBar()->setFormat(i18n("deleting page %1").tqarg(i)); pdialog->progressBar()->setFormat(i18n("deleting page %1").arg(i));
kapp->processEvents(); kapp->processEvents();
} }
delete pdialog; delete pdialog;
@ -705,7 +705,7 @@ void DjVuRenderer::printerInfoCallBack(int page_num, int page_count, int, DjVuTo
KProgressDialog *pdialog = (KProgressDialog *)pd; KProgressDialog *pdialog = (KProgressDialog *)pd;
pdialog->progressBar()->setProgress(page_count); pdialog->progressBar()->setProgress(page_count);
pdialog->progressBar()->setFormat(i18n("processing page %1").tqarg(page_num+1)); pdialog->progressBar()->setFormat(i18n("processing page %1").arg(page_num+1));
pdialog->show(); pdialog->show();
if (pdialog->wasCancelled()) if (pdialog->wasCancelled())

@ -147,13 +147,13 @@ DjVmNav::DjVuBookMark::encode(const GP<ByteStream> &gstr)
ByteStream &bs=*gstr; ByteStream &bs=*gstr;
#ifdef DJVMNAV_WITH_256LIMIT #ifdef DJVMNAV_WITH_256LIMIT
if (count>255) if (count>255)
G_THROW("Excessive number of tqchildren in bookmark tree"); G_THROW("Excessive number of children in bookmark tree");
bs.write8(count); bs.write8(count);
textsize = displayname.length(); textsize = displayname.length();
bs.write24( textsize ); bs.write24( textsize );
#else #else
if (count>65535) if (count>65535)
G_THROW("Excessive number of tqchildren in bookmark tree"); G_THROW("Excessive number of children in bookmark tree");
bs.write8( count & 0xff ); bs.write8( count & 0xff );
bs.write8( (count>>8) & 0xff ); bs.write8( (count>>8) & 0xff );
textsize = displayname.length(); textsize = displayname.length();

@ -115,7 +115,7 @@ private:
/** The DjVuBookMark. /** The DjVuBookMark.
Each entry in the Navigation chunk (NAVM) is a bookmark. A bookmark Each entry in the Navigation chunk (NAVM) is a bookmark. A bookmark
contains a count of immediate tqchildren, a display string and a url. contains a count of immediate children, a display string and a url.
**/ **/
class DjVmNav::DjVuBookMark : public GPEnabled class DjVmNav::DjVuBookMark : public GPEnabled
@ -131,7 +131,7 @@ public:
void encode(const GP<ByteStream> &stream); void encode(const GP<ByteStream> &stream);
void dump(const GP<ByteStream> &stream); void dump(const GP<ByteStream> &stream);
void decode(const GP<ByteStream> &stream); void decode(const GP<ByteStream> &stream);
int count; // count of immediate tqchildren. int count; // count of immediate children.
GUTF8String displayname; // example: "Section 3.5 - Encryption" GUTF8String displayname; // example: "Section 3.5 - Encryption"
GUTF8String url; // url, may be blank or relative. GUTF8String url; // url, may be blank or relative.
}; };

@ -978,16 +978,16 @@ DjVuANT::get_mode(GLParser & parser)
return retval; return retval;
} }
static inline DjVuANT::tqalignment static inline DjVuANT::alignment
legal_halign(const int i) legal_halign(const int i)
{ {
DjVuANT::tqalignment retval; DjVuANT::alignment retval;
switch((DjVuANT::tqalignment)i) switch((DjVuANT::alignment)i)
{ {
case DjVuANT::ALIGN_LEFT: case DjVuANT::ALIGN_LEFT:
case DjVuANT::ALIGN_CENTER: case DjVuANT::ALIGN_CENTER:
case DjVuANT::ALIGN_RIGHT: case DjVuANT::ALIGN_RIGHT:
retval=(DjVuANT::tqalignment)i; retval=(DjVuANT::alignment)i;
break; break;
default: default:
retval=DjVuANT::ALIGN_UNSPEC; retval=DjVuANT::ALIGN_UNSPEC;
@ -996,16 +996,16 @@ legal_halign(const int i)
return retval; return retval;
} }
static inline DjVuANT::tqalignment static inline DjVuANT::alignment
legal_valign(const int i) legal_valign(const int i)
{ {
DjVuANT::tqalignment retval; DjVuANT::alignment retval;
switch((DjVuANT::tqalignment)i) switch((DjVuANT::alignment)i)
{ {
case DjVuANT::ALIGN_CENTER: case DjVuANT::ALIGN_CENTER:
case DjVuANT::ALIGN_TOP: case DjVuANT::ALIGN_TOP:
case DjVuANT::ALIGN_BOTTOM: case DjVuANT::ALIGN_BOTTOM:
retval=(DjVuANT::tqalignment)i; retval=(DjVuANT::alignment)i;
break; break;
default: default:
retval=DjVuANT::ALIGN_UNSPEC; retval=DjVuANT::ALIGN_UNSPEC;
@ -1014,12 +1014,12 @@ legal_valign(const int i)
return retval; return retval;
} }
DjVuANT::tqalignment DjVuANT::alignment
DjVuANT::get_hor_align(GLParser & parser) DjVuANT::get_hor_align(GLParser & parser)
{ {
DEBUG_MSG("DjVuAnt::get_hor_align(): getting hor page alignemnt ...\n"); DEBUG_MSG("DjVuAnt::get_hor_align(): getting hor page alignemnt ...\n");
DEBUG_MAKE_INDENT(3); DEBUG_MAKE_INDENT(3);
tqalignment retval=ALIGN_UNSPEC; alignment retval=ALIGN_UNSPEC;
G_TRY G_TRY
{ {
GP<GLObject> obj=parser.get_object(ALIGN_TAG); GP<GLObject> obj=parser.get_object(ALIGN_TAG);
@ -1030,7 +1030,7 @@ DjVuANT::get_hor_align(GLParser & parser)
for(int i=(int)ALIGN_UNSPEC;(i<align_strings_size);++i) for(int i=(int)ALIGN_UNSPEC;(i<align_strings_size);++i)
{ {
const tqalignment j=legal_halign(i); const alignment j=legal_halign(i);
if((i == (int)j)&&(align == align_strings[i])) if((i == (int)j)&&(align == align_strings[i]))
{ {
retval=j; retval=j;
@ -1048,18 +1048,18 @@ DjVuANT::get_hor_align(GLParser & parser)
#ifndef NDEBUG #ifndef NDEBUG
if(retval == ALIGN_UNSPEC) if(retval == ALIGN_UNSPEC)
{ {
DEBUG_MSG("resetting tqalignment to ALIGN_UNSPEC\n"); DEBUG_MSG("resetting alignment to ALIGN_UNSPEC\n");
} }
#endif // NDEBUG #endif // NDEBUG
return retval; return retval;
} }
DjVuANT::tqalignment DjVuANT::alignment
DjVuANT::get_ver_align(GLParser & parser) DjVuANT::get_ver_align(GLParser & parser)
{ {
DEBUG_MSG("DjVuAnt::get_ver_align(): getting vert page alignemnt ...\n"); DEBUG_MSG("DjVuAnt::get_ver_align(): getting vert page alignemnt ...\n");
DEBUG_MAKE_INDENT(3); DEBUG_MAKE_INDENT(3);
tqalignment retval=ALIGN_UNSPEC; alignment retval=ALIGN_UNSPEC;
G_TRY G_TRY
{ {
GP<GLObject> obj=parser.get_object(ALIGN_TAG); GP<GLObject> obj=parser.get_object(ALIGN_TAG);
@ -1069,7 +1069,7 @@ DjVuANT::get_ver_align(GLParser & parser)
DEBUG_MSG("ver_align='" << align << "'\n"); DEBUG_MSG("ver_align='" << align << "'\n");
for(int i=(int)ALIGN_UNSPEC;(i<align_strings_size);++i) for(int i=(int)ALIGN_UNSPEC;(i<align_strings_size);++i)
{ {
const tqalignment j=legal_valign(i); const alignment j=legal_valign(i);
if((i == (int)j)&&(align == align_strings[i])) if((i == (int)j)&&(align == align_strings[i]))
{ {
retval=j; retval=j;
@ -1087,7 +1087,7 @@ DjVuANT::get_ver_align(GLParser & parser)
#ifndef NDEBUG #ifndef NDEBUG
if(retval == ALIGN_UNSPEC) if(retval == ALIGN_UNSPEC)
{ {
DEBUG_MSG("resetting tqalignment to ALIGN_UNSPEC\n"); DEBUG_MSG("resetting alignment to ALIGN_UNSPEC\n");
} }
#endif // NDEBUG #endif // NDEBUG
return retval; return retval;
@ -1166,38 +1166,38 @@ DjVuANT::get_map_areas(GLParser & parser)
DEBUG_MSG("found maparea '" << comment << "' (" << DEBUG_MSG("found maparea '" << comment << "' (" <<
url << ":" << target << ")\n"); url << ":" << target << ")\n");
GLObject * tqshape=obj[2]; GLObject * shape=obj[2];
GP<GMapArea> map_area; GP<GMapArea> map_area;
if (tqshape->get_type()==GLObject::LIST) if (shape->get_type()==GLObject::LIST)
{ {
if (tqshape->get_name()==GMapArea::RECT_TAG) if (shape->get_name()==GMapArea::RECT_TAG)
{ {
DEBUG_MSG("it's a rectangle.\n"); DEBUG_MSG("it's a rectangle.\n");
GRect grect((*tqshape)[0]->get_number(), GRect grect((*shape)[0]->get_number(),
(*tqshape)[1]->get_number(), (*shape)[1]->get_number(),
(*tqshape)[2]->get_number(), (*shape)[2]->get_number(),
(*tqshape)[3]->get_number()); (*shape)[3]->get_number());
GP<GMapRect> map_rect=GMapRect::create(grect); GP<GMapRect> map_rect=GMapRect::create(grect);
map_area=(GMapRect *)map_rect; map_area=(GMapRect *)map_rect;
} else if (tqshape->get_name()==GMapArea::POLY_TAG) } else if (shape->get_name()==GMapArea::POLY_TAG)
{ {
DEBUG_MSG("it's a polygon.\n"); DEBUG_MSG("it's a polygon.\n");
int points=tqshape->get_list().size()/2; int points=shape->get_list().size()/2;
GTArray<int> xx(points-1), yy(points-1); GTArray<int> xx(points-1), yy(points-1);
for(int i=0;i<points;i++) for(int i=0;i<points;i++)
{ {
xx[i]=(*tqshape)[2*i]->get_number(); xx[i]=(*shape)[2*i]->get_number();
yy[i]=(*tqshape)[2*i+1]->get_number(); yy[i]=(*shape)[2*i+1]->get_number();
} }
GP<GMapPoly> map_poly=GMapPoly::create(xx,yy,points); GP<GMapPoly> map_poly=GMapPoly::create(xx,yy,points);
map_area=(GMapPoly *)map_poly; map_area=(GMapPoly *)map_poly;
} else if (tqshape->get_name()==GMapArea::OVAL_TAG) } else if (shape->get_name()==GMapArea::OVAL_TAG)
{ {
DEBUG_MSG("it's an ellipse.\n"); DEBUG_MSG("it's an ellipse.\n");
GRect grect((*tqshape)[0]->get_number(), GRect grect((*shape)[0]->get_number(),
(*tqshape)[1]->get_number(), (*shape)[1]->get_number(),
(*tqshape)[2]->get_number(), (*shape)[2]->get_number(),
(*tqshape)[3]->get_number()); (*shape)[3]->get_number());
GP<GMapOval> map_oval=GMapOval::create(grect); GP<GMapOval> map_oval=GMapOval::create(grect);
map_area=(GMapOval *)map_oval; map_area=(GMapOval *)map_oval;
} }

@ -104,7 +104,7 @@ class ByteStream;
// -------- DJVUANT -------- // -------- DJVUANT --------
/** This class contains some trivial annotations of the page or of the /** This class contains some trivial annotations of the page or of the
document such as page border color, page tqalignment, initial zoom and document such as page border color, page alignment, initial zoom and
display mode, hyperlinks and highlighted areas. All this information is display mode, hyperlinks and highlighted areas. All this information is
put inside a textual chunk #ANTa# in pseudo-lisp format. Decoding and put inside a textual chunk #ANTa# in pseudo-lisp format. Decoding and
encoding are normally done by \Ref{DjVuANT::decode}() and encoding are normally done by \Ref{DjVuANT::decode}() and
@ -120,7 +120,7 @@ public:
enum { MODE_UNSPEC=0, MODE_COLOR, MODE_FORE, MODE_BACK, MODE_BW }; enum { MODE_UNSPEC=0, MODE_COLOR, MODE_FORE, MODE_BACK, MODE_BW };
enum { ZOOM_STRETCH=-4, ZOOM_ONE2ONE=-3, ZOOM_WIDTH=-2, enum { ZOOM_STRETCH=-4, ZOOM_ONE2ONE=-3, ZOOM_WIDTH=-2,
ZOOM_PAGE=-1, ZOOM_UNSPEC=0 }; ZOOM_PAGE=-1, ZOOM_UNSPEC=0 };
enum tqalignment { ALIGN_UNSPEC=0, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, enum alignment { ALIGN_UNSPEC=0, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT,
ALIGN_TOP, ALIGN_BOTTOM }; ALIGN_TOP, ALIGN_BOTTOM };
/// Creates an empty annotation object. /// Creates an empty annotation object.
@ -152,12 +152,12 @@ public:
special cases. special cases.
\end{description} */ \end{description} */
int mode; int mode;
/**Qt::Horizontal page tqalignment. Possible values are #ALIGN_LEFT#, /**Qt::Horizontal page alignment. Possible values are #ALIGN_LEFT#,
#ALIGN_CENTER#, #ALIGN_RIGHT# and #ALIGN_UNSPEC#. */ #ALIGN_CENTER#, #ALIGN_RIGHT# and #ALIGN_UNSPEC#. */
tqalignment hor_align; alignment hor_align;
/**Qt::Vertical page tqalignment. Possible values are #ALIGN_TOP#, /**Qt::Vertical page alignment. Possible values are #ALIGN_TOP#,
#ALIGN_CENTER#, #ALIGN_BOTTOM# and #ALIGN_UNSPEC#. */ #ALIGN_CENTER#, #ALIGN_BOTTOM# and #ALIGN_UNSPEC#. */
tqalignment ver_align; alignment ver_align;
/** List of defined map areas. They may be just areas of highlighting /** List of defined map areas. They may be just areas of highlighting
or hyperlink. Please refer to \Ref{GMapArea}, \Ref{GMapRect}, or hyperlink. Please refer to \Ref{GMapArea}, \Ref{GMapRect},
\Ref{GMapPoly} and \Ref{GMapOval} for details. */ \Ref{GMapPoly} and \Ref{GMapOval} for details. */
@ -213,8 +213,8 @@ private:
static unsigned long int get_bg_color(class GLParser & parser); static unsigned long int get_bg_color(class GLParser & parser);
static int get_zoom(class GLParser & parser); static int get_zoom(class GLParser & parser);
static int get_mode(class GLParser & parser); static int get_mode(class GLParser & parser);
static tqalignment get_hor_align(class GLParser & parser); static alignment get_hor_align(class GLParser & parser);
static tqalignment get_ver_align(class GLParser & parser); static alignment get_ver_align(class GLParser & parser);
static GPList<GMapArea> get_map_areas(class GLParser & parser); static GPList<GMapArea> get_map_areas(class GLParser & parser);
#ifndef NO_METADATA_IN_ANT_CHUNK #ifndef NO_METADATA_IN_ANT_CHUNK
static GMap<GUTF8String, GUTF8String>get_metadata(GLParser & parser); static GMap<GUTF8String, GUTF8String>get_metadata(GLParser & parser);

@ -651,7 +651,7 @@ DjVuDocEditor::insert_file(const GP<DataPool> &file_pool,
// Good. Before we continue with the included files we want to // Good. Before we continue with the included files we want to
// complete insertion of this one. Notice, that insertion of // complete insertion of this one. Notice, that insertion of
// tqchildren may fail, in which case we will have to modify // children may fail, in which case we will have to modify
// data for this file to get rid of invalid INCL // data for this file to get rid of invalid INCL
// Create a file record with the chosen ID // Create a file record with the chosen ID
@ -994,7 +994,7 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref,
// We will accumulate errors here. // We will accumulate errors here.
GUTF8String errors; GUTF8String errors;
// Now modify the ref_map and process tqchildren if necessary // Now modify the ref_map and process children if necessary
GP<DjVuFile> file=get_djvu_file(id); GP<DjVuFile> file=get_djvu_file(id);
if (file) if (file)
{ {

@ -419,7 +419,7 @@ DjVuFile::notify_file_flags_changed(const DjVuFile * src,
{ {
if (src!=this && are_incl_files_created() && is_data_present()) if (src!=this && are_incl_files_created() && is_data_present())
{ {
// Check if all tqchildren have data // Check if all children have data
bool all=true; bool all=true;
{ {
GCriticalSectionLock lock(&inc_files_lock); GCriticalSectionLock lock(&inc_files_lock);
@ -488,7 +488,7 @@ DjVuFile::decode_func(void)
while(wait_for_finish(0)) while(wait_for_finish(0))
continue; continue;
DEBUG_MSG("waiting for tqchildren termination\n"); DEBUG_MSG("waiting for children termination\n");
// Check for termination status // Check for termination status
GCriticalSectionLock lock(&inc_files_lock); GCriticalSectionLock lock(&inc_files_lock);
for(GPosition pos=inc_files_list;pos;++pos) for(GPosition pos=inc_files_list;pos;++pos)
@ -928,7 +928,7 @@ DjVuFile::decode_chunk( const GUTF8String &id, const GP<ByteStream> &gbs,
GP<JB2Dict> fgjd = JB2Dict::create(); GP<JB2Dict> fgjd = JB2Dict::create();
fgjd->decode(gbs); fgjd->decode(gbs);
this->fgjd = fgjd; this->fgjd = fgjd;
desc.format( ERR_MSG("DjVuFile.tqshape_dict") "\t%d", fgjd->get_tqshape_count() ); desc.format( ERR_MSG("DjVuFile.shape_dict") "\t%d", fgjd->get_shape_count() );
} }
// Sjbz (JB2 encoded mask) // Sjbz (JB2 encoded mask)

@ -134,7 +134,7 @@ class DjVuNavDir;
{\bf Inclusion} is also a new feature specifically designed for a {\bf Inclusion} is also a new feature specifically designed for a
multipage document. Indeed, inside a given document there can be a lot multipage document. Indeed, inside a given document there can be a lot
of things shared between its pages. Examples can be the document of things shared between its pages. Examples can be the document
annotation (\Ref{DjVuAnno}) and other things like shared tqshapes and annotation (\Ref{DjVuAnno}) and other things like shared shapes and
dictionary (to be implemented). To avoid putting these chunks into dictionary (to be implemented). To avoid putting these chunks into
every page, we have invented new chunk called #INCL# which purpose is every page, we have invented new chunk called #INCL# which purpose is
to make the decoder open the specified file and decode it. to make the decoder open the specified file and decode it.
@ -217,7 +217,7 @@ public:
GP<GPixmap> bgpm; GP<GPixmap> bgpm;
/// Pointer to the mask of foreground component of DjVu image (JB2 encoded). /// Pointer to the mask of foreground component of DjVu image (JB2 encoded).
GP<JB2Image> fgjb; GP<JB2Image> fgjb;
/// Pointer to the optional tqshape dictionary for the mask (JB2 encoded). /// Pointer to the optional shape dictionary for the mask (JB2 encoded).
GP<JB2Dict> fgjd; GP<JB2Dict> fgjd;
/// Pointer to a colors layer for the foreground component of DjVu image. /// Pointer to a colors layer for the foreground component of DjVu image.
GP<GPixmap> fgpm; GP<GPixmap> fgpm;
@ -648,7 +648,7 @@ private:
const GP<ByteStream> &str, bool djvi, bool djvu, bool iw44); const GP<ByteStream> &str, bool djvi, bool djvu, bool iw44);
int get_dpi(int w, int h); int get_dpi(int w, int h);
// Functions dealing with the tqshape directory (fgjd) // Functions dealing with the shape directory (fgjd)
static GP<JB2Dict> static_get_fgjd(void *); static GP<JB2Dict> static_get_fgjd(void *);
GP<JB2Dict> get_fgjd(int block=0); GP<JB2Dict> get_fgjd(int block=0);

@ -848,17 +848,17 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect,
for (int blitno = 0; blitno < jimg->get_blit_count(); blitno++) for (int blitno = 0; blitno < jimg->get_blit_count(); blitno++)
{ {
const JB2Blit *pblit = jimg->get_blit(blitno); const JB2Blit *pblit = jimg->get_blit(blitno);
const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno); const JB2Shape &pshape = jimg->get_shape(pblit->shapeno);
if (ptqshape.bits && if (pshape.bits &&
pblit->left <= rect.xmax * subsample && pblit->left <= rect.xmax * subsample &&
pblit->bottom <= rect.ymax * subsample && pblit->bottom <= rect.ymax * subsample &&
pblit->left + (int)ptqshape.bits->columns() >= rect.xmin * subsample && pblit->left + (int)pshape.bits->columns() >= rect.xmin * subsample &&
pblit->bottom + (int)ptqshape.bits->rows() >= rect.ymin * subsample ) pblit->bottom + (int)pshape.bits->rows() >= rect.ymin * subsample )
{ {
// Record component list // Record component list
if (fgbc) components.append(blitno); if (fgbc) components.append(blitno);
// Blit // Blit
bm->blit(ptqshape.bits, bm->blit(pshape.bits,
pblit->left - rxmin, pblit->bottom - rymin, pblit->left - rxmin, pblit->bottom - rymin,
subsample); subsample);
} }
@ -902,9 +902,9 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect,
lastx = pblit->left; lastx = pblit->left;
if (fg->colordata[blitno] == colorindex) if (fg->colordata[blitno] == colorindex)
{ {
const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno); const JB2Shape &pshape = jimg->get_shape(pblit->shapeno);
GRect rect(pblit->left, pblit->bottom, GRect rect(pblit->left, pblit->bottom,
ptqshape.bits->columns(), ptqshape.bits->rows()); pshape.bits->columns(), pshape.bits->rows());
comprect.recthull(comprect, rect); comprect.recthull(comprect, rect);
compset.insert_before(nullpos, components, pos); compset.insert_before(nullpos, components, pos);
continue; continue;
@ -927,8 +927,8 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect,
{ {
int blitno = compset[pos]; int blitno = compset[pos];
const JB2Blit *pblit = jimg->get_blit(blitno); const JB2Blit *pblit = jimg->get_blit(blitno);
const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno); const JB2Shape &pshape = jimg->get_shape(pblit->shapeno);
bm->blit(ptqshape.bits, bm->blit(pshape.bits,
pblit->left - rxmin, pblit->bottom - rymin, pblit->left - rxmin, pblit->bottom - rymin,
subsample); subsample);
} }

@ -353,7 +353,7 @@ public:
GP<GPixmap> get_pixmap(const GRect &rect, const GRect &all, double gamma=0) const; GP<GPixmap> get_pixmap(const GRect &rect, const GRect &all, double gamma=0) const;
/** Renders the mask of the foreground layer of the DjVu image. This /** Renders the mask of the foreground layer of the DjVu image. This
functions is a wrapper for \Ref{JB2Image::get_bitmap}. Argument #align# functions is a wrapper for \Ref{JB2Image::get_bitmap}. Argument #align#
specified the tqalignment of the rows of the returned images. Setting specified the alignment of the rows of the returned images. Setting
#align# to #4#, for instance, will adjust the bitmap border in order to #align# to #4#, for instance, will adjust the bitmap border in order to
make sure that each row of the returned image starts on a word (four make sure that each row of the returned image starts on a word (four
byte) boundary. This function returns a null pointer if there is not byte) boundary. This function returns a null pointer if there is not

@ -213,7 +213,7 @@ public:
@param source The sender of the request */ @param source The sender of the request */
virtual void notify_redisplay(const class DjVuImage * source); virtual void notify_redisplay(const class DjVuImage * source);
/** This notification is sent by \ref{DjVuImage} when its tqgeometry /** This notification is sent by \ref{DjVuImage} when its geometry
has been changed as a result of decoding. It may be used to has been changed as a result of decoding. It may be used to
implement progressive redisplay. */ implement progressive redisplay. */
virtual void notify_retqlayout(const class DjVuImage * source); virtual void notify_retqlayout(const class DjVuImage * source);

@ -108,8 +108,8 @@ DjVuTXT::Zone::append_child()
empty.text_start = 0; empty.text_start = 0;
empty.text_length = 0; empty.text_length = 0;
empty.zone_parent=this; empty.zone_parent=this;
tqchildren.append(empty); children.append(empty);
return & tqchildren[tqchildren.lastpos()]; return & children[children.lastpos()];
} }
void void
@ -117,8 +117,8 @@ DjVuTXT::Zone::cleartext()
{ {
text_start = 0; text_start = 0;
text_length = 0; text_length = 0;
for (GPosition i=tqchildren; i; ++i) for (GPosition i=children; i; ++i)
tqchildren[i].cleartext(); children[i].cleartext();
} }
void void
@ -128,8 +128,8 @@ DjVuTXT::Zone::normtext(const char *instr, GUTF8String &outstr)
{ {
// Descend collecting text below // Descend collecting text below
text_start = outstr.length(); text_start = outstr.length();
for (GPosition i=tqchildren; i; ++i) for (GPosition i=children; i; ++i)
tqchildren[i].normtext(instr, outstr); children[i].normtext(instr, outstr);
text_length = outstr.length() - text_start; text_length = outstr.length() - text_start;
// Ignore empty zones // Ignore empty zones
if (text_length == 0) if (text_length == 0)
@ -142,8 +142,8 @@ DjVuTXT::Zone::normtext(const char *instr, GUTF8String &outstr)
outstr = outstr + GUTF8String(instr+text_start, text_length); outstr = outstr + GUTF8String(instr+text_start, text_length);
text_start = new_start; text_start = new_start;
// Clear textual information on lower level nodes // Clear textual information on lower level nodes
for (GPosition i=tqchildren; i; ++i) for (GPosition i=children; i; ++i)
tqchildren[i].cleartext(); children[i].cleartext();
} }
// Determine standard separator // Determine standard separator
char sep; char sep;
@ -174,8 +174,8 @@ unsigned int
DjVuTXT::Zone::memuse() const DjVuTXT::Zone::memuse() const
{ {
int memuse = sizeof(*this); int memuse = sizeof(*this);
for (GPosition i=tqchildren; i; ++i) for (GPosition i=children; i; ++i)
memuse += tqchildren[i].memuse(); memuse += children[i].memuse();
return memuse; return memuse;
} }
@ -228,15 +228,15 @@ DjVuTXT::Zone::encode(
// Encode text info // Encode text info
bs.write16(0x8000+start); bs.write16(0x8000+start);
bs.write24(text_length); bs.write24(text_length);
// Encode number of tqchildren // Encode number of children
bs.write24(tqchildren.size()); bs.write24(children.size());
const Zone * prev_child=0; const Zone * prev_child=0;
// Encode all tqchildren // Encode all children
for (GPosition i=tqchildren; i; ++i) for (GPosition i=children; i; ++i)
{ {
tqchildren[i].encode(gbs, this, prev_child); children[i].encode(gbs, this, prev_child);
prev_child=&tqchildren[i]; prev_child=&children[i];
} }
} }
#endif #endif
@ -280,16 +280,16 @@ DjVuTXT::Zone::decode(const GP<ByteStream> &gbs, int maxtext,
text_start+=parent->text_start; text_start+=parent->text_start;
} }
rect=GRect(x, y, width, height); rect=GRect(x, y, width, height);
// Get tqchildren size // Get children size
int size = bs.read24(); int size = bs.read24();
// Checks // Checks
if (rect.isempty() || text_start<0 || text_start+text_length>maxtext ) if (rect.isempty() || text_start<0 || text_start+text_length>maxtext )
G_THROW( ERR_MSG("DjVuText.corrupt_text") ); G_THROW( ERR_MSG("DjVuText.corrupt_text") );
// Process tqchildren // Process children
const Zone * prev_child=0; const Zone * prev_child=0;
tqchildren.empty(); children.empty();
while (size-- > 0) while (size-- > 0)
{ {
Zone *z = append_child(); Zone *z = append_child();
@ -311,7 +311,7 @@ DjVuTXT::has_valid_zones() const
{ {
if (!textUTF8) if (!textUTF8)
return false; return false;
if (page_zone.tqchildren.isempty() || page_zone.rect.isempty()) if (page_zone.children.isempty() || page_zone.rect.isempty())
return false; return false;
return true; return true;
} }
@ -382,7 +382,7 @@ void
DjVuTXT::Zone::get_text_with_rect(const GRect &box, DjVuTXT::Zone::get_text_with_rect(const GRect &box,
int &string_start, int &string_end) const int &string_start, int &string_end) const
{ {
GPosition pos=tqchildren; GPosition pos=children;
if(pos?box.contains(rect):intersects_zone(box,rect)) if(pos?box.contains(rect):intersects_zone(box,rect))
{ {
const int text_end=text_start+text_length; const int text_end=text_start+text_length;
@ -401,7 +401,7 @@ DjVuTXT::Zone::get_text_with_rect(const GRect &box,
{ {
do do
{ {
tqchildren[pos].get_text_with_rect(box,string_start,string_end); children[pos].get_text_with_rect(box,string_start,string_end);
} while(++pos); } while(++pos);
} }
} }
@ -419,18 +419,18 @@ DjVuTXT::Zone::find_zones(GList<Zone *> &list,
} }
else if(text_start < string_end) else if(text_start < string_end)
{ {
if (tqchildren.size()) if (children.size())
for (GPosition pos=tqchildren; pos; ++pos) for (GPosition pos=children; pos; ++pos)
tqchildren[pos].find_zones(list,string_start,string_end); children[pos].find_zones(list,string_start,string_end);
else else
list.append(const_cast<Zone *>(this)); list.append(const_cast<Zone *>(this));
} }
} }
else if( text_end > string_start) else if( text_end > string_start)
{ {
if (tqchildren.size()) if (children.size())
for (GPosition pos=tqchildren; pos; ++pos) for (GPosition pos=children; pos; ++pos)
tqchildren[pos].find_zones(list,string_start,string_end); children[pos].find_zones(list,string_start,string_end);
else else
list.append(const_cast<Zone *>(this)); list.append(const_cast<Zone *>(this));
} }
@ -439,11 +439,11 @@ DjVuTXT::Zone::find_zones(GList<Zone *> &list,
void void
DjVuTXT::Zone::get_smallest(GList<GRect> &list) const DjVuTXT::Zone::get_smallest(GList<GRect> &list) const
{ {
GPosition pos=tqchildren; GPosition pos=children;
if(pos) if(pos)
{ {
do { do {
tqchildren[pos].get_smallest(list); children[pos].get_smallest(list);
} while (++pos); } while (++pos);
} }
else else
@ -455,11 +455,11 @@ DjVuTXT::Zone::get_smallest(GList<GRect> &list) const
void void
DjVuTXT::Zone::get_smallest(GList<GRect> &list, const int padding) const DjVuTXT::Zone::get_smallest(GList<GRect> &list, const int padding) const
{ {
GPosition pos=tqchildren; GPosition pos=children;
if(pos) if(pos)
{ {
do { do {
tqchildren[pos].get_smallest(list,padding); children[pos].get_smallest(list,padding);
} while (++pos); } while (++pos);
} }
else if(zone_parent && zone_parent->ztype >= PARAGRAPH) else if(zone_parent && zone_parent->ztype >= PARAGRAPH)
@ -493,17 +493,17 @@ DjVuTXT::get_zones(int zone_type, const Zone *parent,
for( int cur_ztype=zone->ztype; cur_ztype<zone_type; ++cur_ztype ) for( int cur_ztype=zone->ztype; cur_ztype<zone_type; ++cur_ztype )
{ {
GPosition pos; GPosition pos;
for(pos=zone->tqchildren; pos; ++pos) for(pos=zone->children; pos; ++pos)
{ {
Zone *zcur=(Zone *)&zone->tqchildren[pos]; Zone *zcur=(Zone *)&zone->children[pos];
if ( zcur->ztype == zone_type ) if ( zcur->ztype == zone_type )
{ {
GPosition zpos=zone_list; GPosition zpos=zone_list;
if ( !zone_list.search(zcur,zpos) ) if ( !zone_list.search(zcur,zpos) )
zone_list.append(zcur); zone_list.append(zcur);
} }
else if ( zone->tqchildren[pos].ztype < zone_type ) else if ( zone->children[pos].ztype < zone_type )
get_zones(zone_type, &zone->tqchildren[pos], zone_list); get_zones(zone_type, &zone->children[pos], zone_list);
} }
} }
} }
@ -864,7 +864,7 @@ static void
writeText( ByteStream & str_out, writeText( ByteStream & str_out,
const GUTF8String &textUTF8, const GUTF8String &textUTF8,
const DjVuTXT::ZoneType zlayer, const DjVuTXT::ZoneType zlayer,
const GList<DjVuTXT::Zone> &tqchildren, const GList<DjVuTXT::Zone> &children,
const int WindowHeight ) const int WindowHeight )
{ {
// assert( txt->has_valid_zones() ); // assert( txt->has_valid_zones() );
@ -873,12 +873,12 @@ writeText( ByteStream & str_out,
// Beginning tags for missing layers // Beginning tags for missing layers
int layer=(int)zlayer; int layer=(int)zlayer;
// Output the next layer // Output the next layer
for(GPosition pos=tqchildren ; pos ; ++pos ) for(GPosition pos=children ; pos ; ++pos )
{ {
str_out.writestring(tolayer(layer,tqchildren[pos].ztype)); str_out.writestring(tolayer(layer,children[pos].ztype));
writeText( str_out, writeText( str_out,
textUTF8, textUTF8,
tqchildren[pos], children[pos],
WindowHeight ); WindowHeight );
} }
str_out.writestring(tolayer(layer,zlayer)); str_out.writestring(tolayer(layer,zlayer));
@ -893,7 +893,7 @@ writeText( ByteStream & str_out,
// DEBUG_MSG( "--zonetype=" << zone.ztype << "\n" ); // DEBUG_MSG( "--zonetype=" << zone.ztype << "\n" );
const GUTF8String xindent(indent( 2 * zone.ztype + 2 )); const GUTF8String xindent(indent( 2 * zone.ztype + 2 ));
GPosition pos=zone.tqchildren; GPosition pos=zone.children;
// Build attribute string // Build attribute string
if( ! pos ) if( ! pos )
{ {
@ -908,7 +908,7 @@ writeText( ByteStream & str_out,
str_out.writestring(end_tag(zone.ztype)); str_out.writestring(end_tag(zone.ztype));
} else } else
{ {
writeText(str_out,textUTF8,zone.ztype,zone.tqchildren,WindowHeight); writeText(str_out,textUTF8,zone.ztype,zone.children,WindowHeight);
} }
} }
@ -917,7 +917,7 @@ DjVuTXT::writeText(ByteStream &str_out,const int height) const
{ {
if(has_valid_zones()) if(has_valid_zones())
{ {
::writeText(str_out,textUTF8,DjVuTXT::PAGE,page_zone.tqchildren,height); ::writeText(str_out,textUTF8,DjVuTXT::PAGE,page_zone.children,height);
}else }else
{ {
str_out.writestring(start_tag(DjVuTXT::PAGE)); str_out.writestring(start_tag(DjVuTXT::PAGE));

@ -133,8 +133,8 @@ public:
int text_start; int text_start;
/** Length of the zone text in string #textUTF8#. */ /** Length of the zone text in string #textUTF8#. */
int text_length; int text_length;
/** List of tqchildren zone. */ /** List of children zone. */
GList<Zone> tqchildren; GList<Zone> children;
/** Appends another subzone inside this zone. The new zone is initialized /** Appends another subzone inside this zone. The new zone is initialized
with an empty rectangle, empty text, and has the same type as this with an empty rectangle, empty text, and has the same type as this
zone. */ zone. */

@ -953,14 +953,14 @@ print_fg_2layer(ByteStream &str,
if (options.get_color()) if (options.get_color())
{ {
write(str,"/%d %d %d %f %f %f c\n", write(str,"/%d %d %d %f %f %f c\n",
blit->tqshapeno, blit->shapeno,
blit->left-currentx, blit->bottom-currenty, blit->left-currentx, blit->bottom-currenty,
ramp[p.r]/255.0, ramp[p.g]/255.0, ramp[p.b]/255.0); ramp[p.r]/255.0, ramp[p.g]/255.0, ramp[p.b]/255.0);
} }
else else
{ {
write(str,"/%d %d %d %f c\n", write(str,"/%d %d %d %f c\n",
blit->tqshapeno, blit->shapeno,
blit->left-currentx, blit->bottom-currenty, blit->left-currentx, blit->bottom-currenty,
ramp[GRAY(p.r, p.g, p.b)]/255.0); ramp[GRAY(p.r, p.g, p.b)]/255.0);
} }
@ -968,7 +968,7 @@ print_fg_2layer(ByteStream &str,
else else
{ {
write(str,"/%d %d %d s\n", write(str,"/%d %d %d s\n",
blit->tqshapeno, blit->shapeno,
blit->left-currentx, blit->bottom-currenty); blit->left-currentx, blit->bottom-currenty);
} }
currentx = blit->left; currentx = blit->left;
@ -1047,8 +1047,8 @@ print_fg_3layer(ByteStream &str,
{ {
JB2Blit *blit = jb2->get_blit(current_blit); JB2Blit *blit = jb2->get_blit(current_blit);
GRect rect2(blit->left, blit->bottom, GRect rect2(blit->left, blit->bottom,
jb2->get_tqshape(blit->tqshapeno).bits->columns(), jb2->get_shape(blit->shapeno).bits->columns(),
jb2->get_tqshape(blit->tqshapeno).bits->rows()); jb2->get_shape(blit->shapeno).bits->rows());
if (rect2.intersect(rect1,rect2)) if (rect2.intersect(rect1,rect2))
break; break;
} }
@ -1087,12 +1087,12 @@ print_fg_3layer(ByteStream &str,
{ {
JB2Blit *blit = jb2->get_blit(current_blit); JB2Blit *blit = jb2->get_blit(current_blit);
GRect rect2(blit->left, blit->bottom, GRect rect2(blit->left, blit->bottom,
jb2->get_tqshape(blit->tqshapeno).bits->columns(), jb2->get_shape(blit->shapeno).bits->columns(),
jb2->get_tqshape(blit->tqshapeno).bits->rows()); jb2->get_shape(blit->shapeno).bits->rows());
if (rect2.intersect(rect1,rect2)) if (rect2.intersect(rect1,rect2))
{ {
write(str,"/%d %d %d s\n", write(str,"/%d %d %d s\n",
blit->tqshapeno, blit->shapeno,
blit->left-currentx, blit->bottom-currenty); blit->left-currentx, blit->bottom-currenty);
currentx = blit->left; currentx = blit->left;
currenty = blit->bottom; currenty = blit->bottom;
@ -1113,27 +1113,27 @@ print_fg(ByteStream &str,
GP<JB2Image> jb2=dimg->get_fgjb(); GP<JB2Image> jb2=dimg->get_fgjb();
if (! jb2) return; if (! jb2) return;
int num_blits = jb2->get_blit_count(); int num_blits = jb2->get_blit_count();
int num_tqshapes = jb2->get_tqshape_count(); int num_shapes = jb2->get_shape_count();
unsigned char *dict_tqshapes = 0; unsigned char *dict_shapes = 0;
unsigned char *blit_list = 0; unsigned char *blit_list = 0;
GPBuffer<unsigned char> gdict_tqshapes(dict_tqshapes,num_tqshapes); GPBuffer<unsigned char> gdict_shapes(dict_shapes,num_shapes);
GPBuffer<unsigned char> gblit_list(blit_list,num_blits); GPBuffer<unsigned char> gblit_list(blit_list,num_blits);
for(int i=0; i<num_tqshapes; i++) for(int i=0; i<num_shapes; i++)
{ {
dict_tqshapes[i]=0; dict_shapes[i]=0;
} }
for(int current_blit=0; current_blit<num_blits; current_blit++) for(int current_blit=0; current_blit<num_blits; current_blit++)
{ {
JB2Blit *blit = jb2->get_blit(current_blit); JB2Blit *blit = jb2->get_blit(current_blit);
JB2Shape *tqshape = & jb2->get_tqshape(blit->tqshapeno); JB2Shape *shape = & jb2->get_shape(blit->shapeno);
blit_list[current_blit] = 0; blit_list[current_blit] = 0;
if (! tqshape->bits) if (! shape->bits)
continue; continue;
GRect rect2(blit->left, blit->bottom, GRect rect2(blit->left, blit->bottom,
tqshape->bits->columns(), tqshape->bits->rows()); shape->bits->columns(), shape->bits->rows());
if (rect2.intersect(rect2, prn_rect)) if (rect2.intersect(rect2, prn_rect))
{ {
dict_tqshapes[blit->tqshapeno] = 1; dict_shapes[blit->shapeno] = 1;
blit_list[current_blit] = 1; blit_list[current_blit] = 1;
} }
} }
@ -1152,13 +1152,13 @@ print_fg(ByteStream &str,
"0 1 1 {Encoding exch /.notdef put} for \n" "0 1 1 {Encoding exch /.notdef put} for \n"
"CharStrings begin\n" "CharStrings begin\n"
"/.notdef {} def\n", "/.notdef {} def\n",
num_tqshapes+1); num_shapes+1);
for(int current_tqshape=0; current_tqshape<num_tqshapes; current_tqshape++) for(int current_shape=0; current_shape<num_shapes; current_shape++)
{ {
if (dict_tqshapes[current_tqshape]) if (dict_shapes[current_shape])
{ {
JB2Shape *tqshape = & jb2->get_tqshape(current_tqshape); JB2Shape *shape = & jb2->get_shape(current_shape);
GP<GBitmap> bitmap = tqshape->bits; GP<GBitmap> bitmap = shape->bits;
int rows = bitmap->rows(); int rows = bitmap->rows();
int columns = bitmap->columns(); int columns = bitmap->columns();
int nbytes = (columns+7)/8*rows+1; int nbytes = (columns+7)/8*rows+1;
@ -1173,7 +1173,7 @@ print_fg(ByteStream &str,
GPBuffer<unsigned char> gs_start(s_start,nbytes); GPBuffer<unsigned char> gs_start(s_start,nbytes);
unsigned char *s_ascii; unsigned char *s_ascii;
GPBuffer<unsigned char> gs_ascii(s_ascii,nbytes*2); GPBuffer<unsigned char> gs_ascii(s_ascii,nbytes*2);
write(str,"/%d {",current_tqshape); write(str,"/%d {",current_shape);
unsigned char *s = s_start; unsigned char *s = s_start;
for(int current_row=0; current_row<rows; current_row++) for(int current_row=0; current_row<rows; current_row++)
@ -1942,8 +1942,8 @@ print_txt_sub(DjVuTXT &txt, DjVuTXT::Zone &zone,
default: default:
separator = 0; break; separator = 0; break;
} }
// Zone tqchildren // Zone children
if (zone.tqchildren.isempty()) if (zone.children.isempty())
{ {
const char *data = (const char*)txt.textUTF8 + zone.text_start; const char *data = (const char*)txt.textUTF8 + zone.text_start;
int length = zone.text_length; int length = zone.text_length;
@ -1968,8 +1968,8 @@ print_txt_sub(DjVuTXT &txt, DjVuTXT::Zone &zone,
message.format("%d F\n",zone.rect.ymax-zone.rect.ymin); message.format("%d F\n",zone.rect.ymax-zone.rect.ymin);
out.write((const char*)message,message.length()); out.write((const char*)message,message.length());
} }
for (GPosition pos=zone.tqchildren; pos; ++pos) for (GPosition pos=zone.children; pos; ++pos)
print_txt_sub(txt, zone.tqchildren[pos], out,lastx,lasty); print_txt_sub(txt, zone.children[pos], out,lastx,lasty);
} }
} }

@ -365,7 +365,7 @@ public:
discussion, the position is (#x/subsample#,#y/subsample#). In other discussion, the position is (#x/subsample#,#y/subsample#). In other
words, you can position the blit with a sub-pixel resolution. The words, you can position the blit with a sub-pixel resolution. The
resulting anti-aliasing changes are paramount to the image quality. */ resulting anti-aliasing changes are paramount to the image quality. */
void blit(const GBitmap *tqshape, int x, int y, int subsample); void blit(const GBitmap *shape, int x, int y, int subsample);
//@} //@}
/** @name Saving images. /** @name Saving images.

@ -953,7 +953,7 @@ static GUTF8String
GMapArea2xmltag(const GMapArea &area,const GUTF8String &coords) GMapArea2xmltag(const GMapArea &area,const GUTF8String &coords)
{ {
GUTF8String retval("<AREA coords=\"" GUTF8String retval("<AREA coords=\""
+coords+"\" tqshape=\""+area.get_tqshape_name()+"\" " +coords+"\" shape=\""+area.get_shape_name()+"\" "
+"alt=\""+area.comment.toEscaped()+"\" "); +"alt=\""+area.comment.toEscaped()+"\" ");
if(area.url.length()) if(area.url.length())
{ {

@ -86,12 +86,12 @@ namespace DJVU {
The currently supported areas can be rectangular (\Ref{GMapRect}), The currently supported areas can be rectangular (\Ref{GMapRect}),
elliptical (\Ref{GMapOval}) and polygonal (\Ref{GMapPoly}). Every elliptical (\Ref{GMapOval}) and polygonal (\Ref{GMapPoly}). Every
map area besides the definition of its tqshape contains information map area besides the definition of its shape contains information
about display style and optional {\bf URL}, which it may refer to. about display style and optional {\bf URL}, which it may refer to.
If this {\bf URL} is not empty then the map area will work like a If this {\bf URL} is not empty then the map area will work like a
hyperlink. hyperlink.
The classes also implement some useful functions to ease tqgeometry The classes also implement some useful functions to ease geometry
manipulations manipulations
@memo Definition of base map area classes @memo Definition of base map area classes
@ -247,10 +247,10 @@ public:
virtual GUTF8String get_xmltag(const int height) const=0; virtual GUTF8String get_xmltag(const int height) const=0;
/// Virtual function returning the tqshape type. /// Virtual function returning the shape type.
virtual MapAreaType const get_tqshape_type( void ) const { return UNKNOWN; }; virtual MapAreaType const get_shape_type( void ) const { return UNKNOWN; };
/// Virtual function returning the tqshape name. /// Virtual function returning the shape name.
virtual char const * const get_tqshape_name(void) const=0; virtual char const * const get_shape_name(void) const=0;
/// Virtual function generating a copy of this object /// Virtual function generating a copy of this object
virtual GP<GMapArea> get_copy(void) const=0; virtual GP<GMapArea> get_copy(void) const=0;
/// Virtual function generating a list of defining coordinates /// Virtual function generating a list of defining coordinates
@ -305,7 +305,7 @@ public:
/// Returns the height of the rectangle /// Returns the height of the rectangle
int get_height(void) const { return ymax-ymin; } int get_height(void) const { return ymax-ymin; }
/// Changes the #GMapRect#'s tqgeometry /// Changes the #GMapRect#'s geometry
GMapRect & operator=(const GRect & rect); GMapRect & operator=(const GRect & rect);
/// Returns \Ref{GRect} describing the map area's rectangle /// Returns \Ref{GRect} describing the map area's rectangle
@ -313,9 +313,9 @@ public:
virtual GUTF8String get_xmltag(const int height) const; virtual GUTF8String get_xmltag(const int height) const;
/// Returns MapRect /// Returns MapRect
virtual MapAreaType const get_tqshape_type( void ) const { return RECT; }; virtual MapAreaType const get_shape_type( void ) const { return RECT; };
/// Returns #"rect"# /// Returns #"rect"#
virtual char const * const get_tqshape_name(void) const; virtual char const * const get_shape_name(void) const;
/// Returns a copy of the rectangle /// Returns a copy of the rectangle
virtual GP<GMapArea> get_copy(void) const; virtual GP<GMapArea> get_copy(void) const;
/// Virtual function maps rectangle from one area to another using mapper /// Virtual function maps rectangle from one area to another using mapper
@ -392,9 +392,9 @@ public:
virtual GUTF8String get_xmltag(const int height) const; virtual GUTF8String get_xmltag(const int height) const;
/// Returns MapPoly /// Returns MapPoly
virtual MapAreaType const get_tqshape_type( void ) const { return POLY; }; virtual MapAreaType const get_shape_type( void ) const { return POLY; };
/// Returns #"poly"# all the time /// Returns #"poly"# all the time
virtual char const * const get_tqshape_name(void) const; virtual char const * const get_shape_name(void) const;
/// Returns a copy of the polygon /// Returns a copy of the polygon
virtual GP<GMapArea> get_copy(void) const; virtual GP<GMapArea> get_copy(void) const;
/// Virtual function generating a list of defining coordinates /// Virtual function generating a list of defining coordinates
@ -458,9 +458,9 @@ public:
virtual GUTF8String get_xmltag(const int height) const; virtual GUTF8String get_xmltag(const int height) const;
/// Returns MapOval /// Returns MapOval
virtual MapAreaType const get_tqshape_type( void ) const { return OVAL; }; virtual MapAreaType const get_shape_type( void ) const { return OVAL; };
/// Returns #"oval"# /// Returns #"oval"#
virtual char const * const get_tqshape_name(void) const; virtual char const * const get_shape_name(void) const;
/// Returns a copy of the oval /// Returns a copy of the oval
virtual GP<GMapArea> get_copy(void) const; virtual GP<GMapArea> get_copy(void) const;
/// Virtual function maps oval from one area to another using mapper /// Virtual function maps oval from one area to another using mapper
@ -509,7 +509,7 @@ inline char const * const
GMapRect::gma_check_object(void) const{ return ""; } GMapRect::gma_check_object(void) const{ return ""; }
inline char const * const inline char const * const
GMapRect::get_tqshape_name(void) const { return RECT_TAG; } GMapRect::get_shape_name(void) const { return RECT_TAG; }
inline int inline int
GMapPoly::get_points_num(void) const { return points; } GMapPoly::get_points_num(void) const { return points; }
@ -524,7 +524,7 @@ inline int
GMapPoly::get_y(int i) const { return yy[i]; } GMapPoly::get_y(int i) const { return yy[i]; }
inline char const * const inline char const * const
GMapPoly::get_tqshape_name(void) const { return POLY_TAG; } GMapPoly::get_shape_name(void) const { return POLY_TAG; }
inline int inline int
GMapOval::get_a(void) const { return a; } GMapOval::get_a(void) const { return a; }
@ -551,7 +551,7 @@ inline int
GMapOval::gma_get_ymax(void) const { return ymax; } GMapOval::gma_get_ymax(void) const { return ymax; }
inline char const * const inline char const * const
GMapOval::get_tqshape_name(void) const { return OVAL_TAG; } GMapOval::get_shape_name(void) const { return OVAL_TAG; }
//@} //@}

@ -638,7 +638,7 @@ IW44Image::Map::alloc(int n)
short ** short **
IW44Image::Map::allocp(int n) IW44Image::Map::allocp(int n)
{ {
// Allocate enough room for pointers plus tqalignment // Allocate enough room for pointers plus alignment
short *p = alloc( (n+1) * sizeof(short*) / sizeof(short) ); short *p = alloc( (n+1) * sizeof(short*) / sizeof(short) );
// Align on pointer size // Align on pointer size
while ( ((long)p) & (sizeof(short*)-1) ) while ( ((long)p) & (sizeof(short*)-1) )

@ -618,7 +618,7 @@ public:
int pixsep=1, int fast=0); int pixsep=1, int fast=0);
// array of blocks // array of blocks
IW44Image::Block *blocks; IW44Image::Block *blocks;
// tqgeometry // geometry
int iw, ih; int iw, ih;
int bw, bh; int bw, bh;
int nb; int nb;

@ -104,13 +104,13 @@ public:
protected: protected:
void CodeNum(const int num, const int lo, const int hi, NumContext &ctx); void CodeNum(const int num, const int lo, const int hi, NumContext &ctx);
void encode_libonly_tqshape(const GP<JB2Image> &jim, int tqshapeno); void encode_libonly_shape(const GP<JB2Image> &jim, int shapeno);
// virtual // virtual
bool CodeBit(const bool bit, BitContext &ctx); bool CodeBit(const bool bit, BitContext &ctx);
void code_comment(GUTF8String &comment); void code_comment(GUTF8String &comment);
void code_record_type(int &rectype); void code_record_type(int &rectype);
int code_match_index(int &index, JB2Dict &jim); int code_match_index(int &index, JB2Dict &jim);
void code_inherited_tqshape_count(JB2Dict &jim); void code_inherited_shape_count(JB2Dict &jim);
void code_image_size(JB2Dict &jim); void code_image_size(JB2Dict &jim);
void code_image_size(JB2Image &jim); void code_image_size(JB2Image &jim);
void code_absolute_location(JB2Blit *jblt, int rows, int columns); void code_absolute_location(JB2Blit *jblt, int rows, int columns);
@ -228,18 +228,18 @@ JB2Dict::JB2Codec::Encode::code_record_type(int &rectype)
int int
JB2Dict::JB2Codec::Encode::code_match_index(int &index, JB2Dict &jim) JB2Dict::JB2Codec::Encode::code_match_index(int &index, JB2Dict &jim)
{ {
int match=tqshape2lib[index]; int match=shape2lib[index];
CodeNum(match, 0, lib2tqshape.hbound(), dist_match_index); CodeNum(match, 0, lib2shape.hbound(), dist_match_index);
return match; return match;
} }
// CODE PAIRS // CODE PAIRS
void void
JB2Dict::JB2Codec::Encode::code_inherited_tqshape_count(JB2Dict &jim) JB2Dict::JB2Codec::Encode::code_inherited_shape_count(JB2Dict &jim)
{ {
CodeNum(jim.get_inherited_tqshape_count(), CodeNum(jim.get_inherited_shape_count(),
0, BIGPOSITIVE, inherited_tqshape_count_dist); 0, BIGPOSITIVE, inherited_shape_count_dist);
} }
void void
@ -360,12 +360,12 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Dict> &gjim)
// ------------------------- // -------------------------
// THIS IS THE ENCODING PART // THIS IS THE ENCODING PART
// ------------------------- // -------------------------
int firsttqshape = jim.get_inherited_tqshape_count(); int firstshape = jim.get_inherited_shape_count();
int ntqshape = jim.get_tqshape_count(); int nshape = jim.get_shape_count();
init_library(jim); init_library(jim);
// Code headers. // Code headers.
int rectype = RETQUIRED_DICT_OR_RESET; int rectype = RETQUIRED_DICT_OR_RESET;
if (jim.get_inherited_tqshape_count() > 0) if (jim.get_inherited_shape_count() > 0)
code_record(rectype, gjim, 0); code_record(rectype, gjim, 0);
rectype = START_OF_DATA; rectype = START_OF_DATA;
code_record(rectype, gjim, 0); code_record(rectype, gjim, 0);
@ -373,18 +373,18 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Dict> &gjim)
rectype = PRESERVED_COMMENT; rectype = PRESERVED_COMMENT;
if (!! jim.comment) if (!! jim.comment)
code_record(rectype, gjim, 0); code_record(rectype, gjim, 0);
// Encode every tqshape // Encode every shape
int tqshapeno; int shapeno;
DJVU_PROGRESS_TASK(jb2code,"jb2 encode", ntqshape-firsttqshape); DJVU_PROGRESS_TASK(jb2code,"jb2 encode", nshape-firstshape);
for (tqshapeno=firsttqshape; tqshapeno<ntqshape; tqshapeno++) for (shapeno=firstshape; shapeno<nshape; shapeno++)
{ {
DJVU_PROGRESS_RUN(jb2code, (tqshapeno-firsttqshape)|0xff); DJVU_PROGRESS_RUN(jb2code, (shapeno-firstshape)|0xff);
// Code tqshape // Code shape
JB2Shape &jshp = jim.get_tqshape(tqshapeno); JB2Shape &jshp = jim.get_shape(shapeno);
rectype=(jshp.parent >= 0) rectype=(jshp.parent >= 0)
?MATCHED_REFINE_LIBRARY_ONLY:NEW_MARK_LIBRARY_ONLY; ?MATCHED_REFINE_LIBRARY_ONLY:NEW_MARK_LIBRARY_ONLY;
code_record(rectype, gjim, &jshp); code_record(rectype, gjim, &jshp);
add_library(tqshapeno, jshp); add_library(shapeno, jshp);
// Check numcoder status // Check numcoder status
if (cur_ncell > CELLCHUNK) if (cur_ncell > CELLCHUNK)
{ {
@ -413,35 +413,35 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim)
// ------------------------- // -------------------------
int i; int i;
init_library(jim); init_library(jim);
int firsttqshape = jim.get_inherited_tqshape_count(); int firstshape = jim.get_inherited_shape_count();
int ntqshape = jim.get_tqshape_count(); int nshape = jim.get_shape_count();
int nblit = jim.get_blit_count(); int nblit = jim.get_blit_count();
// Initialize tqshape2lib // Initialize shape2lib
tqshape2lib.resize(0,ntqshape-1); shape2lib.resize(0,nshape-1);
for (i=firsttqshape; i<ntqshape; i++) for (i=firstshape; i<nshape; i++)
tqshape2lib[i] = -1; shape2lib[i] = -1;
// Determine tqshapes that go into library (tqshapeno>=firsttqshape) // Determine shapes that go into library (shapeno>=firstshape)
// tqshape2lib is -2 if used by one blit // shape2lib is -2 if used by one blit
// tqshape2lib is -3 if used by more than one blit // shape2lib is -3 if used by more than one blit
// tqshape2lib is -4 if used as a parent // shape2lib is -4 if used as a parent
for (i=0; i<nblit; i++) for (i=0; i<nblit; i++)
{ {
JB2Blit *jblt = jim.get_blit(i); JB2Blit *jblt = jim.get_blit(i);
int tqshapeno = jblt->tqshapeno; int shapeno = jblt->shapeno;
if (tqshapeno < firsttqshape) if (shapeno < firstshape)
continue; continue;
if (tqshape2lib[tqshapeno] >= -2) if (shape2lib[shapeno] >= -2)
tqshape2lib[tqshapeno] -= 1; shape2lib[shapeno] -= 1;
tqshapeno = jim.get_tqshape(tqshapeno).parent; shapeno = jim.get_shape(shapeno).parent;
while (tqshapeno>=firsttqshape && tqshape2lib[tqshapeno]>=-3) while (shapeno>=firstshape && shape2lib[shapeno]>=-3)
{ {
tqshape2lib[tqshapeno] = -4; shape2lib[shapeno] = -4;
tqshapeno = jim.get_tqshape(tqshapeno).parent; shapeno = jim.get_shape(shapeno).parent;
} }
} }
// Code headers. // Code headers.
int rectype = RETQUIRED_DICT_OR_RESET; int rectype = RETQUIRED_DICT_OR_RESET;
if (jim.get_inherited_tqshape_count() > 0) if (jim.get_inherited_shape_count() > 0)
code_record(rectype, gjim, 0, 0); code_record(rectype, gjim, 0, 0);
rectype = START_OF_DATA; rectype = START_OF_DATA;
code_record(rectype, gjim, 0, 0); code_record(rectype, gjim, 0, 0);
@ -456,20 +456,20 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim)
{ {
DJVU_PROGRESS_RUN(jb2code, blitno|0xff); DJVU_PROGRESS_RUN(jb2code, blitno|0xff);
JB2Blit *jblt = jim.get_blit(blitno); JB2Blit *jblt = jim.get_blit(blitno);
int tqshapeno = jblt->tqshapeno; int shapeno = jblt->shapeno;
JB2Shape &jshp = jim.get_tqshape(tqshapeno); JB2Shape &jshp = jim.get_shape(shapeno);
// Tests if tqshape exists in library // Tests if shape exists in library
if (tqshape2lib[tqshapeno] >= 0) if (shape2lib[shapeno] >= 0)
{ {
int rectype = MATCHED_COPY; int rectype = MATCHED_COPY;
code_record(rectype, gjim, 0, jblt); code_record(rectype, gjim, 0, jblt);
} }
// Avoid coding null tqshapes/blits // Avoid coding null shapes/blits
else if (jshp.bits) else if (jshp.bits)
{ {
// Make sure all parents have been coded // Make sure all parents have been coded
if (jshp.parent>=0 && tqshape2lib[jshp.parent]<0) if (jshp.parent>=0 && shape2lib[jshp.parent]<0)
encode_libonly_tqshape(gjim, jshp.parent); encode_libonly_shape(gjim, jshp.parent);
// Allocate library entry when needed // Allocate library entry when needed
#define LIBRARY_CONTAINS_ALL #define LIBRARY_CONTAINS_ALL
int libraryp = 0; int libraryp = 0;
@ -478,7 +478,7 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim)
libraryp = 1; libraryp = 1;
#endif #endif
#ifdef LIBRARY_CONTAINS_SHARED // worse #ifdef LIBRARY_CONTAINS_SHARED // worse
if (tqshape2lib[tqshapeno] <= -3) if (shape2lib[shapeno] <= -3)
libraryp = 1; libraryp = 1;
#endif #endif
#ifdef LIBRARY_CONTAINS_ALL // better #ifdef LIBRARY_CONTAINS_ALL // better
@ -500,9 +500,9 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim)
int rectype = (libraryp ? MATCHED_REFINE : MATCHED_REFINE_IMAGE_ONLY); int rectype = (libraryp ? MATCHED_REFINE : MATCHED_REFINE_IMAGE_ONLY);
code_record(rectype, gjim, &jshp, jblt); code_record(rectype, gjim, &jshp, jblt);
} }
// Add tqshape to library // Add shape to library
if (libraryp) if (libraryp)
add_library(tqshapeno, jshp); add_library(shapeno, jshp);
} }
// Check numcoder status // Check numcoder status
if (cur_ncell > CELLCHUNK) if (cur_ncell > CELLCHUNK)
@ -522,27 +522,27 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim)
//////////////////////////////////////// ////////////////////////////////////////
void void
JB2Dict::JB2Codec::Encode::encode_libonly_tqshape( JB2Dict::JB2Codec::Encode::encode_libonly_shape(
const GP<JB2Image> &gjim, int tqshapeno ) const GP<JB2Image> &gjim, int shapeno )
{ {
if(!gjim) if(!gjim)
{ {
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
} }
JB2Image &jim=*gjim; JB2Image &jim=*gjim;
// Recursively encode parent tqshape // Recursively encode parent shape
JB2Shape &jshp = jim.get_tqshape(tqshapeno); JB2Shape &jshp = jim.get_shape(shapeno);
if (jshp.parent>=0 && tqshape2lib[jshp.parent]<0) if (jshp.parent>=0 && shape2lib[jshp.parent]<0)
encode_libonly_tqshape(gjim, jshp.parent); encode_libonly_shape(gjim, jshp.parent);
// Test that library tqshape must be encoded // Test that library shape must be encoded
if (tqshape2lib[tqshapeno] < 0) if (shape2lib[shapeno] < 0)
{ {
// Code library entry // Code library entry
int rectype=(jshp.parent >= 0) int rectype=(jshp.parent >= 0)
?NEW_MARK_LIBRARY_ONLY:MATCHED_REFINE_LIBRARY_ONLY; ?NEW_MARK_LIBRARY_ONLY:MATCHED_REFINE_LIBRARY_ONLY;
code_record(rectype, gjim, &jshp, 0); code_record(rectype, gjim, &jshp, 0);
// Add tqshape to library // Add shape to library
add_library(tqshapeno, jshp); add_library(shapeno, jshp);
// Check numcoder status // Check numcoder status
if (cur_ncell > CELLCHUNK) if (cur_ncell > CELLCHUNK)
{ {

@ -110,7 +110,7 @@ protected:
void code_comment(GUTF8String &comment); void code_comment(GUTF8String &comment);
void code_record_type(int &rectype); void code_record_type(int &rectype);
int code_match_index(int &index, JB2Dict &jim); int code_match_index(int &index, JB2Dict &jim);
void code_inherited_tqshape_count(JB2Dict &jim); void code_inherited_shape_count(JB2Dict &jim);
void code_image_size(JB2Dict &jim); void code_image_size(JB2Dict &jim);
void code_image_size(JB2Image &jim); void code_image_size(JB2Image &jim);
void code_absolute_location(JB2Blit *jblt, int rows, int columns); void code_absolute_location(JB2Blit *jblt, int rows, int columns);
@ -136,28 +136,28 @@ private:
JB2Dict::JB2Dict() JB2Dict::JB2Dict()
: inherited_tqshapes(0) : inherited_shapes(0)
{ {
} }
void void
JB2Dict::init() JB2Dict::init()
{ {
inherited_tqshapes = 0; inherited_shapes = 0;
inherited_dict = 0; inherited_dict = 0;
tqshapes.empty(); shapes.empty();
} }
JB2Shape & JB2Shape &
JB2Dict::get_tqshape(const int tqshapeno) JB2Dict::get_shape(const int shapeno)
{ {
JB2Shape *retval; JB2Shape *retval;
if(tqshapeno >= inherited_tqshapes) if(shapeno >= inherited_shapes)
{ {
retval=&tqshapes[tqshapeno - inherited_tqshapes]; retval=&shapes[shapeno - inherited_shapes];
}else if(inherited_dict) }else if(inherited_dict)
{ {
retval=&(inherited_dict->get_tqshape(tqshapeno)); retval=&(inherited_dict->get_shape(shapeno));
}else }else
{ {
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
@ -166,15 +166,15 @@ JB2Dict::get_tqshape(const int tqshapeno)
} }
const JB2Shape & const JB2Shape &
JB2Dict::get_tqshape(const int tqshapeno) const JB2Dict::get_shape(const int shapeno) const
{ {
const JB2Shape *retval; const JB2Shape *retval;
if(tqshapeno >= inherited_tqshapes) if(shapeno >= inherited_shapes)
{ {
retval=&tqshapes[tqshapeno - inherited_tqshapes]; retval=&shapes[shapeno - inherited_shapes];
}else if(inherited_dict) }else if(inherited_dict)
{ {
retval=&(inherited_dict->get_tqshape(tqshapeno)); retval=&(inherited_dict->get_shape(shapeno));
}else }else
{ {
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
@ -185,16 +185,16 @@ JB2Dict::get_tqshape(const int tqshapeno) const
void void
JB2Dict::set_inherited_dict(const GP<JB2Dict> &dict) JB2Dict::set_inherited_dict(const GP<JB2Dict> &dict)
{ {
if (tqshapes.size() > 0) if (shapes.size() > 0)
G_THROW( ERR_MSG("JB2Image.cant_set") ); G_THROW( ERR_MSG("JB2Image.cant_set") );
if (inherited_dict) if (inherited_dict)
G_THROW( ERR_MSG("JB2Image.cant_change") ); G_THROW( ERR_MSG("JB2Image.cant_change") );
inherited_dict = dict; inherited_dict = dict;
inherited_tqshapes = dict->get_tqshape_count(); inherited_shapes = dict->get_shape_count();
// Make sure that inherited bitmaps are marked as shared // Make sure that inherited bitmaps are marked as shared
for (int i=0; i<inherited_tqshapes; i++) for (int i=0; i<inherited_shapes; i++)
{ {
JB2Shape &jshp = dict->get_tqshape(i); JB2Shape &jshp = dict->get_shape(i);
if (jshp.bits) jshp.bits->share(); if (jshp.bits) jshp.bits->share();
} }
} }
@ -202,30 +202,30 @@ JB2Dict::set_inherited_dict(const GP<JB2Dict> &dict)
void void
JB2Dict::compress() JB2Dict::compress()
{ {
for (int i=tqshapes.lbound(); i<=tqshapes.hbound(); i++) for (int i=shapes.lbound(); i<=shapes.hbound(); i++)
tqshapes[i].bits->compress(); shapes[i].bits->compress();
} }
unsigned int unsigned int
JB2Dict::get_memory_usage() const JB2Dict::get_memory_usage() const
{ {
unsigned int usage = sizeof(JB2Dict); unsigned int usage = sizeof(JB2Dict);
usage += sizeof(JB2Shape) * tqshapes.size(); usage += sizeof(JB2Shape) * shapes.size();
for (int i=tqshapes.lbound(); i<=tqshapes.hbound(); i++) for (int i=shapes.lbound(); i<=shapes.hbound(); i++)
if (tqshapes[i].bits) if (shapes[i].bits)
usage += tqshapes[i].bits->get_memory_usage(); usage += shapes[i].bits->get_memory_usage();
return usage; return usage;
} }
int int
JB2Dict::add_tqshape(const JB2Shape &tqshape) JB2Dict::add_shape(const JB2Shape &shape)
{ {
if (tqshape.parent >= get_tqshape_count()) if (shape.parent >= get_shape_count())
G_THROW( ERR_MSG("JB2Image.bad_parent_tqshape") ); G_THROW( ERR_MSG("JB2Image.bad_parent_shape") );
int index = tqshapes.size(); int index = shapes.size();
tqshapes.touch(index); shapes.touch(index);
tqshapes[index] = tqshape; shapes[index] = shape;
return index + inherited_tqshapes; return index + inherited_shapes;
} }
void void
@ -277,8 +277,8 @@ JB2Image::set_dimension(int awidth, int aheight)
int int
JB2Image::add_blit(const JB2Blit &blit) JB2Image::add_blit(const JB2Blit &blit)
{ {
if (blit.tqshapeno >= (unsigned int)get_tqshape_count()) if (blit.shapeno >= (unsigned int)get_shape_count())
G_THROW( ERR_MSG("JB2Image.bad_tqshape") ); G_THROW( ERR_MSG("JB2Image.bad_shape") );
int index = blits.size(); int index = blits.size();
blits.touch(index); blits.touch(index);
blits[index] = blit; blits[index] = blit;
@ -298,9 +298,9 @@ JB2Image::get_bitmap(int subsample, int align) const
for (int blitno = 0; blitno < get_blit_count(); blitno++) for (int blitno = 0; blitno < get_blit_count(); blitno++)
{ {
const JB2Blit *pblit = get_blit(blitno); const JB2Blit *pblit = get_blit(blitno);
const JB2Shape &ptqshape = get_tqshape(pblit->tqshapeno); const JB2Shape &pshape = get_shape(pblit->shapeno);
if (ptqshape.bits) if (pshape.bits)
bm->blit(ptqshape.bits, pblit->left, pblit->bottom, subsample); bm->blit(pshape.bits, pblit->left, pblit->bottom, subsample);
} }
return bm; return bm;
} }
@ -320,9 +320,9 @@ JB2Image::get_bitmap(const GRect &rect, int subsample, int align, int dispy) con
for (int blitno = 0; blitno < get_blit_count(); blitno++) for (int blitno = 0; blitno < get_blit_count(); blitno++)
{ {
const JB2Blit *pblit = get_blit(blitno); const JB2Blit *pblit = get_blit(blitno);
const JB2Shape &ptqshape = get_tqshape(pblit->tqshapeno); const JB2Shape &pshape = get_shape(pblit->shapeno);
if (ptqshape.bits) if (pshape.bits)
bm->blit(ptqshape.bits, pblit->left-rxmin, pblit->bottom-rymin+dispy, subsample); bm->blit(pshape.bits, pblit->left-rxmin, pblit->bottom-rymin+dispy, subsample);
} }
return bm; return bm;
} }
@ -397,7 +397,7 @@ JB2Dict::JB2Codec::JB2Codec(const bool xencoding)
abs_size_x(0), abs_size_x(0),
abs_size_y(0), abs_size_y(0),
image_size_dist(0), image_size_dist(0),
inherited_tqshape_count_dist(0), inherited_shape_count_dist(0),
offset_type_dist(0), offset_type_dist(0),
rel_loc_x_current(0), rel_loc_x_current(0),
rel_loc_x_last(0), rel_loc_x_last(0),
@ -428,7 +428,7 @@ JB2Dict::JB2Codec::reset_numcoder()
abs_size_x = 0; abs_size_x = 0;
abs_size_y = 0; abs_size_y = 0;
image_size_dist = 0; image_size_dist = 0;
inherited_tqshape_count_dist = 0; inherited_shape_count_dist = 0;
rel_loc_x_current = 0; rel_loc_x_current = 0;
rel_loc_x_last = 0; rel_loc_x_last = 0;
rel_loc_y_current = 0; rel_loc_y_current = 0;
@ -573,27 +573,27 @@ JB2Dict::JB2Codec::Decode::code_comment(GUTF8String &comment)
void void
JB2Dict::JB2Codec::init_library(JB2Dict &jim) JB2Dict::JB2Codec::init_library(JB2Dict &jim)
{ {
int ntqshape = jim.get_inherited_tqshape_count(); int nshape = jim.get_inherited_shape_count();
tqshape2lib.resize(0,ntqshape-1); shape2lib.resize(0,nshape-1);
lib2tqshape.resize(0,ntqshape-1); lib2shape.resize(0,nshape-1);
libinfo.resize(0,ntqshape-1); libinfo.resize(0,nshape-1);
for (int i=0; i<ntqshape; i++) for (int i=0; i<nshape; i++)
{ {
tqshape2lib[i] = i; shape2lib[i] = i;
lib2tqshape[i] = i; lib2shape[i] = i;
JB2Shape &jshp = jim.get_tqshape(i); JB2Shape &jshp = jim.get_shape(i);
libinfo[i].compute_bounding_box(*(jshp.bits)); libinfo[i].compute_bounding_box(*(jshp.bits));
} }
} }
int int
JB2Dict::JB2Codec::add_library(const int tqshapeno, JB2Shape &jshp) JB2Dict::JB2Codec::add_library(const int shapeno, JB2Shape &jshp)
{ {
const int libno = lib2tqshape.hbound() + 1; const int libno = lib2shape.hbound() + 1;
lib2tqshape.touch(libno); lib2shape.touch(libno);
lib2tqshape[libno] = tqshapeno; lib2shape[libno] = shapeno;
tqshape2lib.touch(tqshapeno); shape2lib.touch(shapeno);
tqshape2lib[tqshapeno] = libno; shape2lib[shapeno] = libno;
libinfo.touch(libno); libinfo.touch(libno);
libinfo[libno].compute_bounding_box(*(jshp.bits)); libinfo[libno].compute_bounding_box(*(jshp.bits));
return libno; return libno;
@ -611,8 +611,8 @@ JB2Dict::JB2Codec::Decode::code_record_type(int &rectype)
int int
JB2Dict::JB2Codec::Decode::code_match_index(int &index, JB2Dict &) JB2Dict::JB2Codec::Decode::code_match_index(int &index, JB2Dict &)
{ {
int match=CodeNum(0, lib2tqshape.hbound(), dist_match_index); int match=CodeNum(0, lib2shape.hbound(), dist_match_index);
index = lib2tqshape[match]; index = lib2shape[match];
return match; return match;
} }
@ -638,9 +638,9 @@ JB2Dict::JB2Codec::update_short_list(const int v)
void void
JB2Dict::JB2Codec::Decode::code_inherited_tqshape_count(JB2Dict &jim) JB2Dict::JB2Codec::Decode::code_inherited_shape_count(JB2Dict &jim)
{ {
int size=CodeNum(0, BIGPOSITIVE, inherited_tqshape_count_dist); int size=CodeNum(0, BIGPOSITIVE, inherited_shape_count_dist);
{ {
GP<JB2Dict> dict = jim.get_inherited_dict(); GP<JB2Dict> dict = jim.get_inherited_dict();
if (!dict && size>0) if (!dict && size>0)
@ -653,7 +653,7 @@ JB2Dict::JB2Codec::Decode::code_inherited_tqshape_count(JB2Dict &jim)
} }
if (!dict && size>0) if (!dict && size>0)
G_THROW( ERR_MSG("JB2Image.need_dict") ); G_THROW( ERR_MSG("JB2Image.need_dict") );
if (dict && size!=dict->get_tqshape_count()) if (dict && size!=dict->get_shape_count())
G_THROW( ERR_MSG("JB2Image.bad_dict") ); G_THROW( ERR_MSG("JB2Image.bad_dict") );
} }
} }
@ -927,7 +927,7 @@ JB2Dict::JB2Codec::code_record(
{ {
GP<GBitmap> cbm; GP<GBitmap> cbm;
GP<GBitmap> bm; GP<GBitmap> bm;
int tqshapeno = -1; int shapeno = -1;
// Code record type // Code record type
code_record_type(rectype); code_record_type(rectype);
@ -983,7 +983,7 @@ JB2Dict::JB2Codec::code_record(
JB2Dict &jim=*gjim; JB2Dict &jim=*gjim;
JB2Shape &jshp=*xjshp; JB2Shape &jshp=*xjshp;
int match = code_match_index (jshp.parent, jim); int match = code_match_index (jshp.parent, jim);
cbm = jim.get_tqshape(jshp.parent).bits; cbm = jim.get_shape(jshp.parent).bits;
LibRect &l = libinfo[match]; LibRect &l = libinfo[match];
code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4);
code_bitmap_by_cross_coding (*bm, cbm, jshp.parent); code_bitmap_by_cross_coding (*bm, cbm, jshp.parent);
@ -1003,12 +1003,12 @@ JB2Dict::JB2Codec::code_record(
{ {
if (! gotstartrecordp) if (! gotstartrecordp)
{ {
// Indicates need for a tqshape dictionary // Indicates need for a shape dictionary
if(!gjim) if(!gjim)
{ {
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
} }
code_inherited_tqshape_count(*gjim); code_inherited_shape_count(*gjim);
}else }else
// Reset all numerical contexts to zero // Reset all numerical contexts to zero
reset_numcoder(); reset_numcoder();
@ -1026,7 +1026,7 @@ JB2Dict::JB2Codec::code_record(
// Post-coding action // Post-coding action
if (!encoding) if (!encoding)
{ {
// add tqshape to dictionary // add shape to dictionary
switch(rectype) switch(rectype)
{ {
case NEW_MARK_LIBRARY_ONLY: case NEW_MARK_LIBRARY_ONLY:
@ -1037,8 +1037,8 @@ JB2Dict::JB2Codec::code_record(
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
} }
JB2Shape &jshp=*xjshp; JB2Shape &jshp=*xjshp;
tqshapeno = gjim->add_tqshape(jshp); shapeno = gjim->add_shape(jshp);
add_library(tqshapeno, jshp); add_library(shapeno, jshp);
break; break;
} }
} }
@ -1064,10 +1064,10 @@ JB2Dict::JB2Codec::Decode::code(const GP<JB2Dict> &gjim)
// THIS IS THE DECODING PART // THIS IS THE DECODING PART
// ------------------------- // -------------------------
int rectype; int rectype;
JB2Shape tmptqshape; JB2Shape tmpshape;
do do
{ {
code_record(rectype, gjim, &tmptqshape); code_record(rectype, gjim, &tmpshape);
} }
while(rectype != END_OF_DATA); while(rectype != END_OF_DATA);
if (!gotstartrecordp) if (!gotstartrecordp)
@ -1085,7 +1085,7 @@ JB2Dict::JB2Codec::code_record(
{ {
GP<GBitmap> bm; GP<GBitmap> bm;
GP<GBitmap> cbm; GP<GBitmap> cbm;
int tqshapeno = -1; int shapeno = -1;
int match; int match;
// Code record type // Code record type
@ -1163,7 +1163,7 @@ JB2Dict::JB2Codec::code_record(
JB2Shape &jshp=*xjshp; JB2Shape &jshp=*xjshp;
JB2Image &jim=*gjim; JB2Image &jim=*gjim;
match = code_match_index (jshp.parent, jim); match = code_match_index (jshp.parent, jim);
cbm = jim.get_tqshape(jshp.parent).bits; cbm = jim.get_shape(jshp.parent).bits;
LibRect &l = libinfo[match]; LibRect &l = libinfo[match];
code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4);
code_bitmap_by_cross_coding (*bm, cbm, match); code_bitmap_by_cross_coding (*bm, cbm, match);
@ -1179,7 +1179,7 @@ JB2Dict::JB2Codec::code_record(
JB2Image &jim=*gjim; JB2Image &jim=*gjim;
JB2Shape &jshp=*xjshp; JB2Shape &jshp=*xjshp;
match = code_match_index (jshp.parent, jim); match = code_match_index (jshp.parent, jim);
cbm = jim.get_tqshape(jshp.parent).bits; cbm = jim.get_shape(jshp.parent).bits;
LibRect &l = libinfo[match]; LibRect &l = libinfo[match];
code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4);
break; break;
@ -1193,7 +1193,7 @@ JB2Dict::JB2Codec::code_record(
JB2Image &jim=*gjim; JB2Image &jim=*gjim;
JB2Shape &jshp=*xjshp; JB2Shape &jshp=*xjshp;
match = code_match_index (jshp.parent, jim); match = code_match_index (jshp.parent, jim);
cbm = jim.get_tqshape(jshp.parent).bits; cbm = jim.get_shape(jshp.parent).bits;
LibRect &l = libinfo[match]; LibRect &l = libinfo[match];
code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4);
code_bitmap_by_cross_coding (*bm, cbm, match); code_bitmap_by_cross_coding (*bm, cbm, match);
@ -1203,15 +1203,15 @@ JB2Dict::JB2Codec::code_record(
case MATCHED_COPY: case MATCHED_COPY:
{ {
int temp; int temp;
if (encoding) temp = jblt->tqshapeno; if (encoding) temp = jblt->shapeno;
if(!gjim) if(!gjim)
{ {
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
} }
JB2Image &jim=*gjim; JB2Image &jim=*gjim;
match = code_match_index (temp, jim); match = code_match_index (temp, jim);
if (!encoding) jblt->tqshapeno = temp; if (!encoding) jblt->shapeno = temp;
bm = jim.get_tqshape(jblt->tqshapeno).bits; bm = jim.get_shape(jblt->shapeno).bits;
LibRect &l = libinfo[match]; LibRect &l = libinfo[match];
jblt->left += l.left; jblt->left += l.left;
jblt->bottom += l.bottom; jblt->bottom += l.bottom;
@ -1248,8 +1248,8 @@ JB2Dict::JB2Codec::code_record(
} }
JB2Image &jim=*gjim; JB2Image &jim=*gjim;
if (! gotstartrecordp) if (! gotstartrecordp)
// Indicates need for a tqshape dictionary // Indicates need for a shape dictionary
code_inherited_tqshape_count(jim); code_inherited_shape_count(jim);
else else
// Reset all numerical contexts to zero // Reset all numerical contexts to zero
reset_numcoder(); reset_numcoder();
@ -1268,7 +1268,7 @@ JB2Dict::JB2Codec::code_record(
// Post-coding action // Post-coding action
if (!encoding) if (!encoding)
{ {
// add tqshape to image // add shape to image
switch(rectype) switch(rectype)
{ {
case NEW_MARK: case NEW_MARK:
@ -1284,13 +1284,13 @@ JB2Dict::JB2Codec::code_record(
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
} }
JB2Shape &jshp=*xjshp; JB2Shape &jshp=*xjshp;
tqshapeno = gjim->add_tqshape(jshp); shapeno = gjim->add_shape(jshp);
tqshape2lib.touch(tqshapeno); shape2lib.touch(shapeno);
tqshape2lib[tqshapeno] = -1; shape2lib[shapeno] = -1;
break; break;
} }
} }
// add tqshape to library // add shape to library
switch(rectype) switch(rectype)
{ {
case NEW_MARK: case NEW_MARK:
@ -1301,7 +1301,7 @@ JB2Dict::JB2Codec::code_record(
{ {
G_THROW( ERR_MSG("JB2Image.bad_number") ); G_THROW( ERR_MSG("JB2Image.bad_number") );
} }
add_library(tqshapeno, *xjshp); add_library(shapeno, *xjshp);
break; break;
} }
// make sure everything is compacted // make sure everything is compacted
@ -1316,7 +1316,7 @@ JB2Dict::JB2Codec::code_record(
case MATCHED_REFINE: case MATCHED_REFINE:
case MATCHED_REFINE_IMAGE_ONLY: case MATCHED_REFINE_IMAGE_ONLY:
case NON_MARK_DATA: case NON_MARK_DATA:
jblt->tqshapeno = tqshapeno; jblt->shapeno = shapeno;
case MATCHED_COPY: case MATCHED_COPY:
if(!gjim) if(!gjim)
{ {
@ -1344,10 +1344,10 @@ JB2Dict::JB2Codec::Decode::code(const GP<JB2Image> &gjim)
// ------------------------- // -------------------------
int rectype; int rectype;
JB2Blit tmpblit; JB2Blit tmpblit;
JB2Shape tmptqshape; JB2Shape tmpshape;
do do
{ {
code_record(rectype, gjim, &tmptqshape, &tmpblit); code_record(rectype, gjim, &tmpshape, &tmpblit);
} }
while(rectype!=END_OF_DATA); while(rectype!=END_OF_DATA);
if (!gotstartrecordp) if (!gotstartrecordp)

@ -83,47 +83,47 @@
be implemented in the future. be implemented in the future.
{\bf JB2 Images} --- Class \Ref{JB2Image} is the central data structure {\bf JB2 Images} --- Class \Ref{JB2Image} is the central data structure
implemented here. A #JB2Image# is composed of an array of tqshapes implemented here. A #JB2Image# is composed of an array of shapes
and an array of blits. Each tqshape contains a small bitmap representing an and an array of blits. Each shape contains a small bitmap representing an
elementary blob of ink, such as a character or a segment of line art. elementary blob of ink, such as a character or a segment of line art.
Each blit instructs the decoder to render a particular tqshape at a Each blit instructs the decoder to render a particular shape at a
specified position in the image. Some compression is already achieved specified position in the image. Some compression is already achieved
because several blits can refer to the same tqshape. A tqshape can also because several blits can refer to the same shape. A shape can also
contain a pointer to a parent tqshape. Additional compression is achieved contain a pointer to a parent shape. Additional compression is achieved
when both tqshapes are similar because each tqshape is encoded using the when both shapes are similar because each shape is encoded using the
parent tqshape as a model. A #"O"# tqshape for instance could be a parent for parent shape as a model. A #"O"# shape for instance could be a parent for
both a #"C"# tqshape and a #"Q"# tqshape. both a #"C"# shape and a #"Q"# shape.
{\bf JB2 Dictionary} --- Class \Ref{JB2Dict} is a peculiar kind of {\bf JB2 Dictionary} --- Class \Ref{JB2Dict} is a peculiar kind of
JB2Image which only contains an array of tqshapes. These tqshapes can be JB2Image which only contains an array of shapes. These shapes can be
referenced from another JB2Dict/JB2Image. This is arranged by setting the referenced from another JB2Dict/JB2Image. This is arranged by setting the
``inherited dictionary'' of a JB2Dict/JB2Image using function ``inherited dictionary'' of a JB2Dict/JB2Image using function
\Ref{JB2Dict::set_inherited_dict}. Several JB2Images can use tqshapes from a \Ref{JB2Dict::set_inherited_dict}. Several JB2Images can use shapes from a
same JB2Dict encoded separately. This is how several pages of a same same JB2Dict encoded separately. This is how several pages of a same
document can share information. document can share information.
{\bf Decoding JB2 data} --- The first step for decoding JB2 data consists of {\bf Decoding JB2 data} --- The first step for decoding JB2 data consists of
creating an empty #JB2Image# object. Function \Ref{JB2Image::decode} then creating an empty #JB2Image# object. Function \Ref{JB2Image::decode} then
reads the data and populates the #JB2Image# with the tqshapes and the blits. reads the data and populates the #JB2Image# with the shapes and the blits.
Function \Ref{JB2Image::get_bitmap} finally produces an anti-aliased image. Function \Ref{JB2Image::get_bitmap} finally produces an anti-aliased image.
{\bf Encoding JB2 data} --- The first step for decoding JB2 data also {\bf Encoding JB2 data} --- The first step for decoding JB2 data also
consists of creating an empty #JB2Image# object. You must then use consists of creating an empty #JB2Image# object. You must then use
functions \Ref{JB2Image::add_tqshape} and \Ref{JB2Image::add_blit} to functions \Ref{JB2Image::add_shape} and \Ref{JB2Image::add_blit} to
populate the #JB2Image# object. Function \Ref{JB2Image::encode} finally populate the #JB2Image# object. Function \Ref{JB2Image::encode} finally
produces the JB2 data. Function #encode# sequentially encodes the blits produces the JB2 data. Function #encode# sequentially encodes the blits
and the necessary tqshapes. The compression ratio depends on several and the necessary shapes. The compression ratio depends on several
factors: factors:
\begin{itemize} \begin{itemize}
\item Blits should reuse tqshapes as often as possible. \item Blits should reuse shapes as often as possible.
\item Blits should be sorted in reading order because this facilitates \item Blits should be sorted in reading order because this facilitates
the prediction of the blit coordinates. the prediction of the blit coordinates.
\item Shapes should be sorted according to the order of first appearance \item Shapes should be sorted according to the order of first appearance
in the sequence of blits because this facilitates the prediction of the in the sequence of blits because this facilitates the prediction of the
tqshape indices. shape indices.
\item Shapes should be compared to all previous tqshapes in the tqshape array. \item Shapes should be compared to all previous shapes in the shape array.
The tqshape parent pointer should be set to a suitable parent tqshape if The shape parent pointer should be set to a suitable parent shape if
such a parent tqshape exists. The parent tqshape should have almost the such a parent shape exists. The parent shape should have almost the
same size and the same pixels. same size and the same pixels.
\end{itemize} \end{itemize}
All this is quite easy to achieve in the case of an electronically All this is quite easy to achieve in the case of an electronically
@ -131,16 +131,16 @@
characters are and where they are located. If you only have a scanned characters are and where they are located. If you only have a scanned
image however you must first locate the characters (connected component image however you must first locate the characters (connected component
analysis) and cut the remaining pieces of ink into smaller blobs. analysis) and cut the remaining pieces of ink into smaller blobs.
Ordering the blits and matching the tqshapes is then an essentially Ordering the blits and matching the shapes is then an essentially
heuristic process. Although the quality of the heuristics substantially heuristic process. Although the quality of the heuristics substantially
effects the file size, misordering blits or mismatching tqshapes never effects the file size, misordering blits or mismatching shapes never
effects the quality of the image. The last refinement consists in effects the quality of the image. The last refinement consists in
smoothing the tqshapes in order to reduce the noise and maximize the smoothing the shapes in order to reduce the noise and maximize the
similarities between tqshapes. similarities between shapes.
{\bf JB2 extensions} --- Two extensions of the JB2 {\bf JB2 extensions} --- Two extensions of the JB2
encoding format have been introduced with DjVu files version 21. The first encoding format have been introduced with DjVu files version 21. The first
extension addresses the shared tqshape dictionaries. The second extension extension addresses the shared shape dictionaries. The second extension
bounds the number of probability contexts used for coding numbers. bounds the number of probability contexts used for coding numbers.
Both extensions maintain backward compatibility with JB2 as Both extensions maintain backward compatibility with JB2 as
described in the ICFDD proposal. A more complete discussion described in the ICFDD proposal. A more complete discussion
@ -190,10 +190,10 @@ class ByteStream;
/** Blit data structure. A #JB2Image# contains an array of #JB2Blit# data /** Blit data structure. A #JB2Image# contains an array of #JB2Blit# data
structures. Each array entry instructs the decoder to render a particular structures. Each array entry instructs the decoder to render a particular
tqshape at a particular location. Members #left# and #bottom# specify the shape at a particular location. Members #left# and #bottom# specify the
coordinates of the bottom left corner of the tqshape bitmap. All coordinates of the bottom left corner of the shape bitmap. All
coordinates are relative to the bottom left corner of the image. Member coordinates are relative to the bottom left corner of the image. Member
#tqshapeno# is the subscript of the tqshape to be rendered. */ #shapeno# is the subscript of the shape to be rendered. */
class JB2Blit { class JB2Blit {
public: public:
@ -201,31 +201,31 @@ public:
unsigned short left; unsigned short left;
/**Qt::Vertical coordinate of the blit. */ /**Qt::Vertical coordinate of the blit. */
unsigned short bottom; unsigned short bottom;
/** Index of the tqshape to blit. */ /** Index of the shape to blit. */
unsigned int tqshapeno; unsigned int shapeno;
}; };
/** Shape data structure. A #JB2Image# contains an array of #JB2Shape# data /** Shape data structure. A #JB2Image# contains an array of #JB2Shape# data
structures. Each array entry represents an elementary blob of ink such as structures. Each array entry represents an elementary blob of ink such as
a character or a segment of line art. Member #bits# points to a bilevel a character or a segment of line art. Member #bits# points to a bilevel
image representing the tqshape pixels. Member #parent# is the subscript of image representing the shape pixels. Member #parent# is the subscript of
the parent tqshape. */ the parent shape. */
class JB2Shape class JB2Shape
{ {
public: public:
/** Subscript of the parent tqshape. The parent tqshape must always be located /** Subscript of the parent shape. The parent shape must always be located
before the current tqshape in the tqshape array. A negative value indicates before the current shape in the shape array. A negative value indicates
that this shape.has no parent. Any negative values smaller than #-1# that this shape.has no parent. Any negative values smaller than #-1#
further indicates that this tqshape does not look like a character. This further indicates that this shape does not look like a character. This
is used to enable a few internal optimizations. This information is is used to enable a few internal optimizations. This information is
saved into the JB2 file, but the actual value of the #parent# variable saved into the JB2 file, but the actual value of the #parent# variable
is not. */ is not. */
int parent; int parent;
/** Bilevel image of the tqshape pixels. This must be a pointer to a bilevel /** Bilevel image of the shape pixels. This must be a pointer to a bilevel
#GBitmap# image. This pointer can also be null. The encoder will just #GBitmap# image. This pointer can also be null. The encoder will just
silently discard all blits referring to a tqshape containing a null silently discard all blits referring to a shape containing a null
bitmap. */ bitmap. */
GP<GBitmap> bits; GP<GBitmap> bits;
/** Private user data. This long word is provided as a convenience for users /** Private user data. This long word is provided as a convenience for users
@ -238,14 +238,14 @@ public:
/** JB2 Dictionary callback. /** JB2 Dictionary callback.
The decoding function call this callback function when they discover that The decoding function call this callback function when they discover that
the current JB2Image or JB2Dict needs a pre-existing tqshape dictionary. the current JB2Image or JB2Dict needs a pre-existing shape dictionary.
The callback function must return a pointer to the dictionary or NULL The callback function must return a pointer to the dictionary or NULL
if none is found. */ if none is found. */
typedef GP<JB2Dict> JB2DecoderCallback ( void* ); typedef GP<JB2Dict> JB2DecoderCallback ( void* );
/** Dictionary of JB2 tqshapes. */ /** Dictionary of JB2 shapes. */
class JB2Dict : public GPEnabled class JB2Dict : public GPEnabled
{ {
@ -257,43 +257,43 @@ public:
// CONSTRUCTION // CONSTRUCTION
/** Default creator. Constructs an empty #JB2Dict# object. You can then /** Default creator. Constructs an empty #JB2Dict# object. You can then
call the decoding function #decode#. You can also manually set the call the decoding function #decode#. You can also manually set the
image size using #add_tqshape#. */ image size using #add_shape#. */
static GP<JB2Dict> create(void); static GP<JB2Dict> create(void);
// INITIALIZATION // INITIALIZATION
/** Resets the #JB2Image# object. This function reinitializes both the tqshape /** Resets the #JB2Image# object. This function reinitializes both the shape
and the blit arrays. All allocated memory is freed. */ and the blit arrays. All allocated memory is freed. */
void init(void); void init(void);
// INHERITED // INHERITED
/** Returns the inherited dictionary. */ /** Returns the inherited dictionary. */
GP<JB2Dict> get_inherited_dict(void) const; GP<JB2Dict> get_inherited_dict(void) const;
/** Returns the number of inherited tqshapes. */ /** Returns the number of inherited shapes. */
int get_inherited_tqshape_count(void) const; int get_inherited_shape_count(void) const;
/** Sets the inherited dictionary. */ /** Sets the inherited dictionary. */
void set_inherited_dict(const GP<JB2Dict> &dict); void set_inherited_dict(const GP<JB2Dict> &dict);
// ACCESSING THE SHAPE LIBRARY // ACCESSING THE SHAPE LIBRARY
/** Returns the total number of tqshapes. /** Returns the total number of shapes.
Shape indices range from #0# to #get_tqshape_count()-1#. */ Shape indices range from #0# to #get_shape_count()-1#. */
int get_tqshape_count(void) const; int get_shape_count(void) const;
/** Returns a pointer to tqshape #tqshapeno#. /** Returns a pointer to shape #shapeno#.
The returned pointer directly points into the tqshape array. The returned pointer directly points into the shape array.
This pointer can be used for reading or writing the tqshape data. */ This pointer can be used for reading or writing the shape data. */
JB2Shape &get_tqshape(const int tqshapeno); JB2Shape &get_shape(const int shapeno);
/** Returns a constant pointer to tqshape #tqshapeno#. /** Returns a constant pointer to shape #shapeno#.
The returned pointer directly points into the tqshape array. The returned pointer directly points into the shape array.
This pointer can only be used for reading the tqshape data. */ This pointer can only be used for reading the shape data. */
const JB2Shape &get_tqshape(const int tqshapeno) const; const JB2Shape &get_shape(const int shapeno) const;
/** Appends a tqshape to the tqshape array. This function appends a copy of /** Appends a shape to the shape array. This function appends a copy of
tqshape #tqshape# to the tqshape array and returns the subscript of the new shape #shape# to the shape array and returns the subscript of the new
tqshape. The subscript of the parent tqshape #tqshape.parent# must shape. The subscript of the parent shape #shape.parent# must
actually designate an already existing tqshape. */ actually designate an already existing shape. */
int add_tqshape(const JB2Shape &tqshape); int add_shape(const JB2Shape &shape);
// MEMORY OPTIMIZATION // MEMORY OPTIMIZATION
/** Compresses all tqshape bitmaps. This function reduces the memory required /** Compresses all shape bitmaps. This function reduces the memory required
by the #JB2Image# by calling \Ref{GBitmap::compress} on all tqshapes by the #JB2Image# by calling \Ref{GBitmap::compress} on all shapes
bitmaps. This function is best called after decoding a #JB2Image#, bitmaps. This function is best called after decoding a #JB2Image#,
because function \Ref{get_bitmap} can directly use the compressed because function \Ref{get_bitmap} can directly use the compressed
bitmaps. */ bitmaps. */
@ -307,9 +307,9 @@ public:
This function generates the JB2 data stream without any header. */ This function generates the JB2 data stream without any header. */
void encode(const GP<ByteStream> &gbs) const; void encode(const GP<ByteStream> &gbs) const;
/** Decodes JB2 data from ByteStream #bs#. This function decodes the image /** Decodes JB2 data from ByteStream #bs#. This function decodes the image
size and populates the tqshape and blit arrays. The callback function size and populates the shape and blit arrays. The callback function
#cb# is called when the decoder determines that the ByteStream data #cb# is called when the decoder determines that the ByteStream data
requires a tqshape dictionary which has not been set with requires a shape dictionary which has not been set with
\Ref{JB2Dict::set_inherited_dict}. The callback receives argument #arg# \Ref{JB2Dict::set_inherited_dict}. The callback receives argument #arg#
and must return a suitable dictionary which will be installed as the and must return a suitable dictionary which will be installed as the
inherited dictionary. The callback should return null if no such inherited dictionary. The callback should return null if no such
@ -322,15 +322,15 @@ public:
GUTF8String comment; GUTF8String comment;
private: private:
int inherited_tqshapes; int inherited_shapes;
GP<JB2Dict> inherited_dict; GP<JB2Dict> inherited_dict;
GArray<JB2Shape> tqshapes; GArray<JB2Shape> shapes;
}; };
/** Main JB2 data structure. Each #JB2Image# consists of an array of tqshapes /** Main JB2 data structure. Each #JB2Image# consists of an array of shapes
and an array of blits. These arrays can be populated by hand using and an array of blits. These arrays can be populated by hand using
functions \Ref{add_tqshape} and \Ref{add_blit}, or by decoding JB2 data functions \Ref{add_shape} and \Ref{add_blit}, or by decoding JB2 data
using function \Ref{decode}. You can then use function \Ref{get_bitmap} using function \Ref{decode}. You can then use function \Ref{get_bitmap}
to render anti-aliased images, or use function \Ref{encode} to generate to render anti-aliased images, or use function \Ref{encode} to generate
JB2 data. */ JB2 data. */
@ -343,12 +343,12 @@ public:
/** Creates an empty #JB2Image# object. You can then /** Creates an empty #JB2Image# object. You can then
call the decoding function #decode#. You can also manually set the call the decoding function #decode#. You can also manually set the
image size using #set_dimension# and populate the tqshape and blit arrays image size using #set_dimension# and populate the shape and blit arrays
using #add_tqshape# and #add_blit#. */ using #add_shape# and #add_blit#. */
static GP<JB2Image> create(void) { return new JB2Image(); } static GP<JB2Image> create(void) { return new JB2Image(); }
// INITIALIZATION // INITIALIZATION
/** Resets the #JB2Image# object. This function reinitializes both the tqshape /** Resets the #JB2Image# object. This function reinitializes both the shape
and the blit arrays. All allocated memory is freed. */ and the blit arrays. All allocated memory is freed. */
void init(void); void init(void);
@ -370,7 +370,7 @@ public:
JB2Image as a bilevel or gray level image. Argument #subsample# JB2Image as a bilevel or gray level image. Argument #subsample#
specifies the desired subsampling ratio in range #1# to #15#. The specifies the desired subsampling ratio in range #1# to #15#. The
returned image uses #1+subsample^2# gray levels for representing returned image uses #1+subsample^2# gray levels for representing
anti-aliased edges. Argument #align# specified the tqalignment of the anti-aliased edges. Argument #align# specified the alignment of the
rows of the returned images. Setting #align# to #4#, for instance, will rows of the returned images. Setting #align# to #4#, for instance, will
adjust the bitmap border in order to make sure that each row of the adjust the bitmap border in order to make sure that each row of the
returned image starts on a word (four byte) boundary. */ returned image starts on a word (four byte) boundary. */
@ -380,7 +380,7 @@ public:
this function first renders the full JB2Image with subsampling ratio this function first renders the full JB2Image with subsampling ratio
#subsample# and then extracts rectangle #rect# in the subsampled image. #subsample# and then extracts rectangle #rect# in the subsampled image.
Both operations of course are efficiently performed simultaneously. Both operations of course are efficiently performed simultaneously.
Argument #align# specified the tqalignment of the rows of the returned Argument #align# specified the alignment of the rows of the returned
images, as explained above. Argument #dispy# should remain null. */ images, as explained above. Argument #dispy# should remain null. */
GP<GBitmap> get_bitmap(const GRect &rect, int subsample=1, int align=1, int dispy=0) const; GP<GBitmap> get_bitmap(const GRect &rect, int subsample=1, int align=1, int dispy=0) const;
@ -393,13 +393,13 @@ public:
This pointer can be used for reading or writing the blit data. */ This pointer can be used for reading or writing the blit data. */
JB2Blit *get_blit(int blitno); JB2Blit *get_blit(int blitno);
/** Returns a constant pointer to blit #blitno#. /** Returns a constant pointer to blit #blitno#.
The returned pointer directly points into the tqshape array. The returned pointer directly points into the shape array.
This pointer can only be used for reading the tqshape data. */ This pointer can only be used for reading the shape data. */
const JB2Blit *get_blit(int blitno) const; const JB2Blit *get_blit(int blitno) const;
/** Appends a blit to the blit array. This function appends a copy of blit /** Appends a blit to the blit array. This function appends a copy of blit
#blit# to the blit array and returns the subscript of the new blit. The #blit# to the blit array and returns the subscript of the new blit. The
tqshape subscript #blit.tqshapeno# must actually designate an already shape subscript #blit.shapeno# must actually designate an already
existing tqshape. */ existing shape. */
int add_blit(const JB2Blit &blit); int add_blit(const JB2Blit &blit);
// MEMORY OPTIMIZATION // MEMORY OPTIMIZATION
@ -412,9 +412,9 @@ public:
This function generates the JB2 data stream without any header. */ This function generates the JB2 data stream without any header. */
void encode(const GP<ByteStream> &gbs) const; void encode(const GP<ByteStream> &gbs) const;
/** Decodes JB2 data from ByteStream #bs#. This function decodes the image /** Decodes JB2 data from ByteStream #bs#. This function decodes the image
size and populates the tqshape and blit arrays. The callback function size and populates the shape and blit arrays. The callback function
#cb# is called when the decoder determines that the ByteStream data #cb# is called when the decoder determines that the ByteStream data
requires a tqshape dictionary which has not been set with requires a shape dictionary which has not been set with
\Ref{JB2Dict::set_inherited_dict}. The callback receives argument #arg# \Ref{JB2Dict::set_inherited_dict}. The callback receives argument #arg#
and must return a suitable dictionary which will be installed as the and must return a suitable dictionary which will be installed as the
inherited dictionary. The callback should return null if no such inherited dictionary. The callback should return null if no such
@ -438,15 +438,15 @@ public:
// JB2DICT INLINE FUNCTIONS // JB2DICT INLINE FUNCTIONS
inline int inline int
JB2Dict::get_tqshape_count(void) const JB2Dict::get_shape_count(void) const
{ {
return inherited_tqshapes + tqshapes.size(); return inherited_shapes + shapes.size();
} }
inline int inline int
JB2Dict::get_inherited_tqshape_count(void) const JB2Dict::get_inherited_shape_count(void) const
{ {
return inherited_tqshapes; return inherited_shapes;
} }
inline GP<JB2Dict> inline GP<JB2Dict>
@ -612,7 +612,7 @@ protected:
void reset_numcoder(void); void reset_numcoder(void);
inline void code_eventual_lossless_refinement(void); inline void code_eventual_lossless_refinement(void);
void init_library(JB2Dict &jim); void init_library(JB2Dict &jim);
int add_library(const int tqshapeno, JB2Shape &jshp); int add_library(const int shapeno, JB2Shape &jshp);
void code_relative_location(JB2Blit *jblt, int rows, int columns); void code_relative_location(JB2Blit *jblt, int rows, int columns);
void code_bitmap_directly (GBitmap &bm); void code_bitmap_directly (GBitmap &bm);
void code_bitmap_by_cross_coding (GBitmap &bm, GP<GBitmap> &cbm, const int libno); void code_bitmap_by_cross_coding (GBitmap &bm, GP<GBitmap> &cbm, const int libno);
@ -640,7 +640,7 @@ protected:
virtual void code_comment(GUTF8String &comment) = 0; virtual void code_comment(GUTF8String &comment) = 0;
virtual void code_record_type(int &rectype) = 0; virtual void code_record_type(int &rectype) = 0;
virtual int code_match_index(int &index, JB2Dict &jim)=0; virtual int code_match_index(int &index, JB2Dict &jim)=0;
virtual void code_inherited_tqshape_count(JB2Dict &jim)=0; virtual void code_inherited_shape_count(JB2Dict &jim)=0;
virtual void code_image_size(JB2Dict &jim); virtual void code_image_size(JB2Dict &jim);
virtual void code_image_size(JB2Image &jim); virtual void code_image_size(JB2Image &jim);
virtual void code_absolute_location(JB2Blit *jblt, int rows, int columns)=0; virtual void code_absolute_location(JB2Blit *jblt, int rows, int columns)=0;
@ -678,8 +678,8 @@ protected:
NumContext dist_match_index; NumContext dist_match_index;
BitContext dist_refinement_flag; BitContext dist_refinement_flag;
// Library // Library
GTArray<int> tqshape2lib; GTArray<int> shape2lib;
GTArray<int> lib2tqshape; GTArray<int> lib2shape;
GTArray<LibRect> libinfo; GTArray<LibRect> libinfo;
// Code pairs // Code pairs
NumContext abs_loc_x; NumContext abs_loc_x;
@ -687,7 +687,7 @@ protected:
NumContext abs_size_x; NumContext abs_size_x;
NumContext abs_size_y; NumContext abs_size_y;
NumContext image_size_dist; NumContext image_size_dist;
NumContext inherited_tqshape_count_dist; NumContext inherited_shape_count_dist;
BitContext offset_type_dist; BitContext offset_type_dist;
NumContext rel_loc_x_current; NumContext rel_loc_x_current;
NumContext rel_loc_x_last; NumContext rel_loc_x_last;

@ -933,16 +933,16 @@ MMRDecoder::decode(GP<ByteStream> gbs)
// Insert blocks into JB2Image // Insert blocks into JB2Image
for (int b=0; b<blocksperline; b++) for (int b=0; b<blocksperline; b++)
{ {
JB2Shape tqshape; JB2Shape shape;
tqshape.bits = blocks[b]; shape.bits = blocks[b];
if (tqshape.bits) if (shape.bits)
{ {
tqshape.parent = -1; shape.parent = -1;
tqshape.bits->compress(); shape.bits->compress();
JB2Blit blit; JB2Blit blit;
blit.left = b*blocksize; blit.left = b*blocksize;
blit.bottom = line+1; blit.bottom = line+1;
blit.tqshapeno = jimg->add_tqshape(tqshape); blit.shapeno = jimg->add_shape(shape);
jimg->add_blit(blit); jimg->add_blit(blit);
} }
} }

@ -373,20 +373,20 @@ lt_XMLParser::Impl::ChangeAnno(
} }
} }
} }
GUTF8String tqshape; GUTF8String shape;
{ {
GPosition tqshape_pos=args.contains("tqshape"); GPosition shape_pos=args.contains("shape");
if(tqshape_pos) if(shape_pos)
{ {
tqshape=args[tqshape_pos]; shape=args[shape_pos];
} }
} }
GP<GMapArea> a; GP<GMapArea> a;
if(tqshape == "default") if(shape == "default")
{ {
GRect rect(0,0,w,h); GRect rect(0,0,w,h);
a=GMapRect::create(rect); a=GMapRect::create(rect);
}else if(!tqshape.length() || tqshape == "rect") }else if(!shape.length() || shape == "rect")
{ {
int xx[4]; int xx[4];
int i=0; int i=0;
@ -420,7 +420,7 @@ lt_XMLParser::Impl::ChangeAnno(
} }
GRect rect(xmin,ymin,xmax-xmin,ymax-ymin); GRect rect(xmin,ymin,xmax-xmin,ymax-ymin);
a=GMapRect::create(rect); a=GMapRect::create(rect);
}else if(tqshape == "circle") }else if(shape == "circle")
{ {
int xx[4]; int xx[4];
int i=0; int i=0;
@ -440,7 +440,7 @@ lt_XMLParser::Impl::ChangeAnno(
int x=xx[0],y=xx[1],rx=xx[2],ry=(h-xx[3])-1; int x=xx[0],y=xx[1],rx=xx[2],ry=(h-xx[3])-1;
GRect rect(x-rx,y-ry,2*rx,2*ry); GRect rect(x-rx,y-ry,2*rx,2*ry);
a=GMapOval::create(rect); a=GMapOval::create(rect);
}else if(tqshape == "oval") }else if(shape == "oval")
{ {
int xx[4]; int xx[4];
int i=0; int i=0;
@ -474,7 +474,7 @@ lt_XMLParser::Impl::ChangeAnno(
} }
GRect rect(xmin,ymin,xmax-xmin,ymax-ymin); GRect rect(xmin,ymin,xmax-xmin,ymax-ymin);
a=GMapOval::create(rect); a=GMapOval::create(rect);
}else if(tqshape == "poly") }else if(shape == "poly")
{ {
GP<GMapPoly> p=GMapPoly::create(); GP<GMapPoly> p=GMapPoly::create();
for(GPosition poly_pos=coords;poly_pos;++poly_pos) for(GPosition poly_pos=coords;poly_pos;++poly_pos)
@ -489,7 +489,7 @@ lt_XMLParser::Impl::ChangeAnno(
a=p; a=p;
}else }else
{ {
G_THROW( ( ERR_MSG("XMLAnno.unknown_tqshape") "\t")+tqshape ); G_THROW( ( ERR_MSG("XMLAnno.unknown_shape") "\t")+shape );
} }
if(a) if(a)
{ {

@ -28,7 +28,7 @@ Zoom::Zoom()
_zoomValue = 1.0; _zoomValue = 1.0;
valNo = 6; // 1.0 is 6rd entry in the list valNo = 6; // 1.0 is 6rd entry in the list
for(int i=0; zoomVals[i] != 0; i++) for(int i=0; zoomVals[i] != 0; i++)
valueNames << TQString("%1%").tqarg(zoomVals[i]); valueNames << TQString("%1%").arg(zoomVals[i]);
} }
@ -49,7 +49,7 @@ void Zoom::setZoomValue(const TQString &cval)
else { else {
emit(zoomNamesChanged(valueNames)); emit(zoomNamesChanged(valueNames));
emit(valNoChanged(valNo)); emit(valNoChanged(valNo));
emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
} }
} }
@ -64,7 +64,7 @@ void Zoom::setZoomFitWidth(float zoom)
valNo = 0; valNo = 0;
emit(valNoChanged(valNo)); emit(valNoChanged(valNo));
emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
} }
void Zoom::setZoomFitHeight(float zoom) void Zoom::setZoomFitHeight(float zoom)
@ -78,7 +78,7 @@ void Zoom::setZoomFitHeight(float zoom)
valNo = 1; valNo = 1;
emit(valNoChanged(valNo)); emit(valNoChanged(valNo));
emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
} }
void Zoom::setZoomFitPage(float zoom) void Zoom::setZoomFitPage(float zoom)
@ -92,7 +92,7 @@ void Zoom::setZoomFitPage(float zoom)
valNo = 2; valNo = 2;
emit(valNoChanged(valNo)); emit(valNoChanged(valNo));
emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
} }
void Zoom::setZoomValue(float f) void Zoom::setZoomValue(float f)
@ -117,19 +117,19 @@ void Zoom::setZoomValue(float f)
flag = true; flag = true;
valNo = i + 3; valNo = i + 3;
if (fabs(_zoomValue-zoomVals[i]) > 0.01) if (fabs(_zoomValue-zoomVals[i]) > 0.01)
valueNames << TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)); valueNames << TQString("%1%").arg((int)(_zoomValue*100.0+0.5));
} }
valueNames << TQString("%1%").tqarg((int)(zoomVals[i]*100.0+0.5)); valueNames << TQString("%1%").arg((int)(zoomVals[i]*100.0+0.5));
} }
if (flag == false) { if (flag == false) {
valNo = valueNames.size(); valNo = valueNames.size();
valueNames << TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)); valueNames << TQString("%1%").arg((int)(_zoomValue*100.0+0.5));
} }
emit(zoomNamesChanged(valueNames)); emit(zoomNamesChanged(valueNames));
emit(valNoChanged(valNo)); emit(valNoChanged(valNo));
emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
} }
float Zoom::zoomIn() float Zoom::zoomIn()

@ -152,7 +152,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources,
TQStringList::ConstIterator it2 = hrSources.begin(); TQStringList::ConstIterator it2 = hrSources.begin();
for ( ; it.current(); ++it, ++it2 ) for ( ; it.current(); ++it, ++it2 )
{ {
TQString text = TQString::fromLatin1("&%1. %2\n%3").tqarg(1+nr).tqarg( TQString::fromLocal8Bit(*it) ).tqarg( *it2 ); TQString text = TQString::fromLatin1("&%1. %2\n%3").arg(1+nr).arg( TQString::fromLocal8Bit(*it) ).arg( *it2 );
TQRadioButton *rb = new TQRadioButton( text, selectBox ); TQRadioButton *rb = new TQRadioButton( text, selectBox );
selectBox->insert( rb ); selectBox->insert( rb );

@ -35,7 +35,7 @@ DispGamma::~DispGamma()
void DispGamma::resizeEvent (TQResizeEvent* ) void DispGamma::resizeEvent (TQResizeEvent* )
{ {
tqrepaint(); repaint();
} }
void DispGamma::paintEvent( TQPaintEvent *ev ) void DispGamma::paintEvent( TQPaintEvent *ev )

@ -47,7 +47,7 @@ GammaDialog::GammaDialog( TQWidget *parent ) :
gtDisp->setValueRef( gt->getArrayPtr() ); gtDisp->setValueRef( gt->getArrayPtr() );
gtDisp->resize( 280, 280 ); gtDisp->resize( 280, 280 );
connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( tqrepaint())); connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( repaint()));
// setCaption( i18n( "Gamma Table" )); // setCaption( i18n( "Gamma Table" ));

@ -226,9 +226,9 @@ void ImageCanvas::newImage( TQImage *new_image )
} }
kdDebug(29000) << "going to tqrepaint!" << endl; kdDebug(29000) << "going to repaint!" << endl;
tqrepaint( true ); repaint( true );
kdDebug(29000) << "tqrepaint ok" << endl; kdDebug(29000) << "repaint ok" << endl;
} }
TQSize ImageCanvas::sizeHint() const TQSize ImageCanvas::sizeHint() const
@ -295,7 +295,7 @@ void ImageCanvas::handle_popup( int item )
default: break; default: break;
} }
update_scaled_pixmap(); update_scaled_pixmap();
tqrepaint(); repaint();
} }
@ -1022,7 +1022,7 @@ const TQString ImageCanvas::imageInfoString( int w, int h, int d )
else else
return TQString("-"); return TQString("-");
} }
return i18n("%1x%2 pixel, %3 bit").tqarg(w).tqarg(h).tqarg(d); return i18n("%1x%2 pixel, %3 bit").arg(w).arg(h).arg(d);
} }
@ -1043,7 +1043,7 @@ const TQString ImageCanvas::scaleKindString()
return i18n("Fit Height"); return i18n("Fit Height");
break; break;
case ZOOM: case ZOOM:
return i18n("Zoom to %1 %%").tqarg( TQString::number(getScaleFactor())); return i18n("Zoom to %1 %%").arg( TQString::number(getScaleFactor()));
break; break;
default: default:
return i18n("Unknown scaling!"); return i18n("Unknown scaling!");

@ -121,7 +121,7 @@ public slots:
void toggleAspect( int aspect_in_mind ) void toggleAspect( int aspect_in_mind )
{ {
maintain_aspect = aspect_in_mind; maintain_aspect = aspect_in_mind;
tqrepaint(); repaint();
} }
virtual TQSize sizeHint() const; virtual TQSize sizeHint() const;
void newImage( TQImage* ); void newImage( TQImage* );

@ -53,7 +53,7 @@ KScanSlider::KScanSlider( TQWidget *parent, const TQString& text,
this, TQT_SLOT(slRevertValue())); this, TQT_SLOT(slRevertValue()));
TQToolTip::add( m_stdButt, TQToolTip::add( m_stdButt,
i18n( "Revert value back to its standard value %1" ).tqarg( stdValue )); i18n( "Revert value back to its standard value %1" ).arg( stdValue ));
hb->addWidget( m_stdButt, 0 ); hb->addWidget( m_stdButt, 0 );
hb->addSpacing( 4 ); hb->addSpacing( 4 );
} }

@ -141,7 +141,7 @@ Previewer::Previewer(TQWidget *parent, const char *name )
img_canvas->setDefaultScaleKind( ImageCanvas::DYNAMIC ); img_canvas->setDefaultScaleKind( ImageCanvas::DYNAMIC );
img_canvas->enableContextMenu(true); img_canvas->enableContextMenu(true);
img_canvas->tqrepaint(); img_canvas->repaint();
tqlayout->addWidget( img_canvas, 6 ); tqlayout->addWidget( img_canvas, 6 );
/* Actions for the previewer zoom */ /* Actions for the previewer zoom */
@ -477,11 +477,11 @@ void Previewer::slNewDimen(TQRect r)
selectionHeightMm = (overallHeight / 1000 * r.height()); selectionHeightMm = (overallHeight / 1000 * r.height());
TQString s; TQString s;
s = i18n("width %1 mm").tqarg( int(selectionWidthMm)); s = i18n("width %1 mm").arg( int(selectionWidthMm));
emit(setScanWidth(s)); emit(setScanWidth(s));
kdDebug(29000) << "Setting new Dimension " << s << endl; kdDebug(29000) << "Setting new Dimension " << s << endl;
s = i18n("height %1 mm").tqarg(int(selectionHeightMm)); s = i18n("height %1 mm").arg(int(selectionHeightMm));
emit(setScanHeight(s)); emit(setScanHeight(s));
recalcFileSize( ); recalcFileSize( );

@ -314,7 +314,7 @@ bool ScanDialog::setup()
kfg->setGroup( GROUP_STARTUP ); kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */ /* Since this is a vertical splitter, only the width is important */
TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
kdDebug(29000) << "Read Splitter-Sizes " << key << endl; kdDebug(29000) << "Read Splitter-Sizes " << key << endl;
splitter->setSizes( kfg->readIntListEntry( key )); splitter->setSizes( kfg->readIntListEntry( key ));
} }
@ -336,7 +336,7 @@ void ScanDialog::slotClose()
kfg->setGroup( GROUP_STARTUP ); kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */ /* Since this is a vertical splitter, only the width is important */
TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
kfg->writeEntry( key, splitter->sizes(), true, true); kfg->writeEntry( key, splitter->sizes(), true, true);
} }
} }

@ -79,7 +79,7 @@ void SizeIndicator::setSizeInByte( long newSize )
fwidth = 2; fwidth = 2;
} }
t = unit.tqarg( sizer, fwidth, 'f', precision); t = unit.arg( sizer, fwidth, 'f', precision);
setText(t); setText(t);
} }

Loading…
Cancel
Save