summaryrefslogtreecommitdiffstats
path: root/kdvi
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kdvi
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdvi')
-rw-r--r--kdvi/TeXFont.h10
-rw-r--r--kdvi/TeXFontDefinition.cpp16
-rw-r--r--kdvi/TeXFontDefinition.h14
-rw-r--r--kdvi/TeXFont_PFB.cpp64
-rw-r--r--kdvi/TeXFont_PFB.h6
-rw-r--r--kdvi/TeXFont_PK.cpp106
-rw-r--r--kdvi/TeXFont_PK.h4
-rw-r--r--kdvi/TeXFont_TFM.cpp24
-rw-r--r--kdvi/TeXFont_TFM.h10
-rw-r--r--kdvi/bigEndianByteReader.cpp28
-rw-r--r--kdvi/bigEndianByteReader.h16
-rw-r--r--kdvi/dviFile.cpp44
-rw-r--r--kdvi/dviFile.h28
-rw-r--r--kdvi/dviPageCache.h1
-rw-r--r--kdvi/dviRenderer.cpp110
-rw-r--r--kdvi/dviRenderer.h27
-rw-r--r--kdvi/dviRenderer_draw.cpp26
-rw-r--r--kdvi/dviRenderer_export.cpp74
-rw-r--r--kdvi/dviRenderer_prescan.cpp132
-rw-r--r--kdvi/dviWidget.cpp14
-rw-r--r--kdvi/dviWidget.h3
-rw-r--r--kdvi/dvisourcesplitter.cpp4
-rw-r--r--kdvi/dvisourcesplitter.h4
-rw-r--r--kdvi/examples/dvistd0.dvibin141240 -> 141242 bytes
-rw-r--r--kdvi/fontEncoding.cpp4
-rw-r--r--kdvi/fontEncoding.h4
-rw-r--r--kdvi/fontEncodingPool.cpp2
-rw-r--r--kdvi/fontMap.cpp22
-rw-r--r--kdvi/fontMap.h10
-rw-r--r--kdvi/fontpool.cpp82
-rw-r--r--kdvi/fontpool.h11
-rw-r--r--kdvi/fontprogress.cpp14
-rw-r--r--kdvi/fontprogress.h5
-rw-r--r--kdvi/glyph.h6
-rw-r--r--kdvi/infodialog.cpp32
-rw-r--r--kdvi/infodialog.h3
-rw-r--r--kdvi/kdvi_multipage.cpp26
-rw-r--r--kdvi/kdvi_multipage.h3
-rw-r--r--kdvi/main.cpp6
-rw-r--r--kdvi/optionDialogFontsWidget.cpp6
-rw-r--r--kdvi/optionDialogFontsWidget.h3
-rw-r--r--kdvi/optionDialogFontsWidget_base.ui14
-rw-r--r--kdvi/optionDialogSpecialWidget.cpp6
-rw-r--r--kdvi/optionDialogSpecialWidget.h3
-rw-r--r--kdvi/optionDialogSpecialWidget_base.ui20
-rw-r--r--kdvi/prebookmark.h6
-rw-r--r--kdvi/psgs.cpp66
-rw-r--r--kdvi/psgs.h3
-rw-r--r--kdvi/psheader.txt6
-rw-r--r--kdvi/renderedDviPagePixmap.h1
-rw-r--r--kdvi/special.cpp60
-rw-r--r--kdvi/vf.cpp16
52 files changed, 608 insertions, 597 deletions
diff --git a/kdvi/TeXFont.h b/kdvi/TeXFont.h
index d3ee51af..518c0d0f 100644
--- a/kdvi/TeXFont.h
+++ b/kdvi/TeXFont.h
@@ -17,8 +17,8 @@ class TeXFont {
public:
TeXFont(TeXFontDefinition *_parent)
{
- parent = _parent;
- errorMessage = TQString::null;
+ tqparent = _parent;
+ errorMessage = TQString();
};
virtual ~TeXFont();
@@ -29,12 +29,12 @@ class TeXFont {
glyphtable[i].shrunkenCharacter.resize(0, 0);
};
- virtual glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black) = 0;
+ virtual glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black) = 0;
// Checksum of the font. Used e.g. by PK fonts. This field is filled
// in by the constructor, or set to 0.0, if the font format does not
// contain checksums.
- Q_UINT32 checksum;
+ TQ_UINT32 checksum;
// If the font or if some glyphs could not be loaded, error messages
// will be put here.
@@ -42,7 +42,7 @@ class TeXFont {
protected:
glyph glyphtable[TeXFontDefinition::max_num_of_chars_in_font];
- TeXFontDefinition *parent;
+ TeXFontDefinition *tqparent;
};
#endif
diff --git a/kdvi/TeXFontDefinition.cpp b/kdvi/TeXFontDefinition.cpp
index 03dd1b72..c89aa59d 100644
--- a/kdvi/TeXFontDefinition.cpp
+++ b/kdvi/TeXFontDefinition.cpp
@@ -31,7 +31,7 @@ extern const int MFResolutions[];
// #define DEBUG_FONT
-TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units,
+TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, TQ_UINT32 chk, TQ_INT32 _scaled_size_in_DVI_units,
class fontPool *pool, double _enlargement)
{
#ifdef DEBUG_FONT
@@ -46,7 +46,7 @@ TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResoluti
checksum = chk;
flags = TeXFontDefinition::FONT_IN_USE;
file = 0;
- filename = TQString::null;
+ filename = TQString();
scaled_size_in_DVI_units = _scaled_size_in_DVI_units;
macrotable = 0;
@@ -93,8 +93,8 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname)
flags |= TeXFontDefinition::FONT_LOADED;
filename = fname;
#ifdef HAVE_FREETYPE
- fullFontName = TQString::null;
- fullEncodingName = TQString::null;
+ fullFontName = TQString();
+ fullEncodingName = TQString();
#endif
file = fopen(TQFile::encodeName(filename), "r");
@@ -105,7 +105,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname)
TQString filename_test(font_pool->getExtraSearchPath() + "/" + filename);
file = fopen( TQFile::encodeName(filename_test), "r");
if (file == 0) {
- kdError(4300) << i18n("Cannot find font %1, file %2.").arg(fontname).arg(filename) << endl;
+ kdError(4300) << i18n("Cannot find font %1, file %2.").tqarg(fontname).tqarg(filename) << endl;
return;
} else
filename = filename_test;
@@ -121,7 +121,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname)
font = new TeXFont_PK(this);
set_char_p = &dviRenderer::set_char;
if ((checksum != 0) && (checksum != font->checksum))
- kdWarning(4300) << i18n("Checksum mismatch for font file %1").arg(filename) << endl;
+ kdWarning(4300) << i18n("Checksum mismatch for font file %1").tqarg(filename) << endl;
fontTypeName = "TeX PK";
return;
}
@@ -169,7 +169,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname)
#else
// If we don't have the FreeType library, we should never have
// reached this point. Complain, and leave this font blank
- kdError(4300) << i18n("Cannot recognize format for font file %1").arg(filename) << endl;
+ kdError(4300) << i18n("Cannot recognize format for font file %1").tqarg(filename) << endl;
#endif
}
@@ -195,7 +195,7 @@ void TeXFontDefinition::reset()
vf_table.clear();
}
- filename = TQString::null;
+ filename = TQString();
flags = TeXFontDefinition::FONT_IN_USE;
set_char_p = &dviRenderer::set_empty_char;
}
diff --git a/kdvi/TeXFontDefinition.h b/kdvi/TeXFontDefinition.h
index d64e6d59..9097b2cb 100644
--- a/kdvi/TeXFontDefinition.h
+++ b/kdvi/TeXFontDefinition.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
/*
- * The layout of a font information block.
+ * The tqlayout of a font information block.
* There is one of these for every loaded font or magnification thereof.
* Duplicates are eliminated: this is necessary because of possible recursion
* in virtual fonts.
@@ -35,7 +35,7 @@ class macro {
unsigned char *pos; /* address of first byte of macro */
unsigned char *end; /* address of last+1 byte */
- Q_INT32 dvi_advance_in_units_of_design_size_by_2e20; /* DVI units to move reference point */
+ TQ_INT32 dvi_advance_in_units_of_design_size_by_2e20; /* DVI units to move reference point */
bool free_me; // if memory at pos should be returned on destruction
};
@@ -56,7 +56,7 @@ class TeXFontDefinition {
};
- TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units,
+ TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, TQ_UINT32 chk, TQ_INT32 _scaled_size_in_DVI_units,
class fontPool *pool, double _enlargement);
~TeXFontDefinition();
@@ -74,7 +74,7 @@ class TeXFontDefinition {
TQString fontname; // name of font, such as "cmr10"
unsigned char flags; // flags byte (see values below)
double enlargement;
- Q_INT32 scaled_size_in_DVI_units; // Scaled size from the font definition command; in DVI units
+ TQ_INT32 scaled_size_in_DVI_units; // Scaled size from the font definition command; in DVI units
set_char_proc set_char_p; // proc used to set char
// Resolution of the display device (resolution will usually be
@@ -100,20 +100,20 @@ class TeXFontDefinition {
/** For FREETYPE fonts, which use a map file, this field will
contain the full name of the font (e.g. 'Computer Modern'). If
the name does not exist, or cannot be found, this field will be
- TQString::null. Only subclasses of TeXFont should write into this
+ TQString(). Only subclasses of TeXFont should write into this
field. */
TQString fullFontName;
/** For FREETYPE fonts, which use a map file, this field will
contain the full name of the font encoding (e.g. 'TexBase1'). If
the encoding name does not exist, or cannot be found, this field
- will be TQString::null. Only subclasses of TeXFont should write
+ will be TQString(). Only subclasses of TeXFont should write
into this field. */
TQString fullEncodingName;
#endif
private:
- Q_UINT32 checksum;
+ TQ_UINT32 checksum;
/** This will be set to a human-readable description of the font,
e.g. "virtual" or "TeX PK", or "Type 1" */
diff --git a/kdvi/TeXFont_PFB.cpp b/kdvi/TeXFont_PFB.cpp
index 2b3883fe..a017259d 100644
--- a/kdvi/TeXFont_PFB.cpp
+++ b/kdvi/TeXFont_PFB.cpp
@@ -26,28 +26,28 @@
//#define DEBUG_PFB 1
-TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double slant)
- : TeXFont(parent)
+TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *tqparent, fontEncoding *enc, double slant)
+ : TeXFont(tqparent)
{
#ifdef DEBUG_PFB
if (enc != 0)
- kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=" << enc->encodingFullName << " )" << endl;
+ kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( tqparent=" << tqparent << ", encoding=" << enc->encodingFullName << " )" << endl;
else
- kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=0 )" << endl;
+ kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( tqparent=" << tqparent << ", encoding=0 )" << endl;
#endif
fatalErrorInFontLoading = false;
- int error = FT_New_Face( parent->font_pool->FreeType_library, parent->filename.local8Bit(), 0, &face );
+ int error = FT_New_Face( tqparent->font_pool->FreeType_library, tqparent->filename.local8Bit(), 0, &face );
if ( error == FT_Err_Unknown_File_Format ) {
- errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").arg(parent->filename);
+ errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").tqarg(tqparent->filename);
kdError(4300) << errorMessage << endl;
fatalErrorInFontLoading = true;
return;
} else
if ( error ) {
- errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").arg(parent->filename);
+ errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").tqarg(tqparent->filename);
kdError(4300) << errorMessage << endl;
fatalErrorInFontLoading = true;
return;
@@ -66,7 +66,7 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
}
if (face->family_name != 0)
- parent->fullFontName = face->family_name;
+ tqparent->fullFontName = face->family_name;
// Finally, we need to set up the charMap array, which maps TeX
// character codes to glyph indices in the font. (Remark: the
@@ -74,8 +74,8 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
// TeX is only able to address character codes 0-255 while
// e.g. Type1 fonts may contain several thousands of characters)
if (enc != 0) {
- parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "Encoding" ));
- parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "encoding" ));
+ tqparent->fullEncodingName = enc->encodingFullName.remove(TQString::tqfromLatin1( "Encoding" ));
+ tqparent->fullEncodingName = enc->encodingFullName.remove(TQString::tqfromLatin1( "encoding" ));
// An encoding vector is given for this font, i.e. an array of
// character names (such as: 'parenleft' or 'dotlessj'). We use
@@ -138,7 +138,7 @@ TeXFont_PFB::~TeXFont_PFB()
}
-glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color)
+glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const TQColor& color)
{
#ifdef DEBUG_PFB
kdDebug(4300) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
@@ -159,16 +159,16 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
if ((generateCharacterPixmap == true) && ((g->shrunkenCharacter.isNull()) || (color != g->color)) ) {
int error;
- unsigned int res = (unsigned int)(parent->displayResolution_in_dpi/parent->enlargement +0.5);
+ unsigned int res = (unsigned int)(tqparent->displayResolution_in_dpi/tqparent->enlargement +0.5);
g->color = color;
// Character height in 1/64th of points (reminder: 1 pt = 1/72 inch)
// Only approximate, may vary from file to file!!!! @@@@@
- 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*tqparent->scaled_size_in_DVI_units*tqparent->font_pool->getCMperDVIunit())/2.54 + 0.5 );
error = FT_Set_Char_Size(face, 0, characterSize_in_printers_points_by_64, res, res );
if (error) {
- TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").arg(parent->filename);
+ TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").tqarg(tqparent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
@@ -178,13 +178,13 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
}
// load glyph image into the slot and erase the previous one
- if (parent->font_pool->getUseFontHints() == true)
+ if (tqparent->font_pool->getUseFontHints() == true)
error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_DEFAULT );
else
error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_HINTING );
if (error) {
- TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
+ TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
@@ -196,7 +196,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
// convert to an anti-aliased bitmap
error = FT_Render_Glyph( face->glyph, ft_render_mode_normal );
if (error) {
- TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
+ TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
@@ -209,8 +209,8 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
if ((slot->bitmap.width == 0) || (slot->bitmap.rows == 0)) {
if (errorMessage.isEmpty())
- errorMessage = i18n("Glyph #%1 is empty.").arg(ch);
- kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").arg(ch).arg(parent->filename) << endl;
+ errorMessage = i18n("Glyph #%1 is empty.").tqarg(ch);
+ kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").tqarg(ch).tqarg(tqparent->filename) << endl;
g->shrunkenCharacter.resize( 15, 15 );
g->shrunkenCharacter.fill(TQColor(255, 0, 0));
g->x2 = 0;
@@ -219,9 +219,9 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
TQImage imgi(slot->bitmap.width, slot->bitmap.rows, 32);
imgi.setAlphaBuffer(true);
- // Do QPixmaps fully support the alpha channel? If yes, we use
+ // Do TQPixmaps fully support the alpha channel? If yes, we use
// that. Otherwise, use other routines as a fallback
- if (parent->font_pool->QPixmapSupportsAlpha) {
+ if (tqparent->font_pool->TQPixmapSupportsAlpha) {
// If the alpha channel is properly supported, we set the
// character glyph to a colored rectangle, and define the
// character outline only using the alpha channel. That
@@ -239,7 +239,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
}
} else {
// If the alpha channel is not supported... QT seems to turn
- // the alpha channel into a crude bitmap which is used to mask
+ // the alpha channel into a crude bitmap which is used to tqmask
// the resulting TQPixmap. In this case, we define the
// character outline using the image data, and use the alpha
// channel only to store "maximally opaque" or "completely
@@ -248,18 +248,18 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
// quality is still sufficient for most purposes. One notable
// exception is output from the gftodvi program, which will be
// partially unreadable.
- Q_UINT16 rInv = 0xFF - color.red();
- Q_UINT16 gInv = 0xFF - color.green();
- Q_UINT16 bInv = 0xFF - color.blue();
+ TQ_UINT16 rInv = 0xFF - color.red();
+ TQ_UINT16 gInv = 0xFF - color.green();
+ TQ_UINT16 bInv = 0xFF - color.blue();
- for(Q_UINT16 y=0; y<slot->bitmap.rows; y++) {
- Q_UINT8 *srcScanLine = slot->bitmap.buffer + y*slot->bitmap.pitch;
+ for(TQ_UINT16 y=0; y<slot->bitmap.rows; y++) {
+ TQ_UINT8 *srcScanLine = slot->bitmap.buffer + y*slot->bitmap.pitch;
unsigned int *destScanLine = (unsigned int *)imgi.scanLine(y);
- for(Q_UINT16 col=0; col<slot->bitmap.width; col++) {
- Q_UINT16 data = *srcScanLine;
+ for(TQ_UINT16 col=0; col<slot->bitmap.width; col++) {
+ TQ_UINT16 data = *srcScanLine;
// The value stored in "data" now has the following meaning:
// data = 0 -> white; data = 0xff -> use "color"
- *destScanLine = qRgba(0xFF - (rInv*data + 0x7F) / 0xFF,
+ *destScanLine = tqRgba(0xFF - (rInv*data + 0x7F) / 0xFF,
0xFF - (gInv*data + 0x7F) / 0xFF,
0xFF - (bInv*data + 0x7F) / 0xFF,
(data > 0x03) ? 0xff : 0x00);
@@ -279,13 +279,13 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ
if (g->dvi_advance_in_units_of_design_size_by_2e20 == 0) {
int error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_SCALE);
if (error) {
- TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
+ TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
g->dvi_advance_in_units_of_design_size_by_2e20 = 1;
}
- g->dvi_advance_in_units_of_design_size_by_2e20 = (Q_INT32)(((Q_INT64)(1<<20) * (Q_INT64)face->glyph->metrics.horiAdvance) / (Q_INT64)face->units_per_EM);
+ g->dvi_advance_in_units_of_design_size_by_2e20 = (TQ_INT32)(((TQ_INT64)(1<<20) * (TQ_INT64)face->glyph->metrics.horiAdvance) / (TQ_INT64)face->units_per_EM);
}
return g;
diff --git a/kdvi/TeXFont_PFB.h b/kdvi/TeXFont_PFB.h
index 4e2d8122..45d94be4 100644
--- a/kdvi/TeXFont_PFB.h
+++ b/kdvi/TeXFont_PFB.h
@@ -23,15 +23,15 @@ class glyph;
class TeXFont_PFB : public TeXFont {
public:
- TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc=0, double slant=0.0 );
+ TeXFont_PFB(TeXFontDefinition *tqparent, fontEncoding *enc=0, double slant=0.0 );
~TeXFont_PFB();
- glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black);
+ glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black);
private:
FT_Face face;
bool fatalErrorInFontLoading;
- Q_UINT16 charMap[256];
+ TQ_UINT16 charMap[256];
// This matrix is used internally to describes the slant, if
// nonzero. Otherwise, this is undefined.
diff --git a/kdvi/TeXFont_PK.cpp b/kdvi/TeXFont_PK.cpp
index 7e1ce60d..562c40f9 100644
--- a/kdvi/TeXFont_PK.cpp
+++ b/kdvi/TeXFont_PK.cpp
@@ -80,18 +80,18 @@ extern void oops(TQString message);
-TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
- : TeXFont(parent)
+TeXFont_PK::TeXFont_PK(TeXFontDefinition *tqparent)
+ : TeXFont(tqparent)
{
#ifdef DEBUG_PK
- kdDebug(4300) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")" << endl;
+ kdDebug(4300) << "TeXFont_PK::TeXFont_PK( tqparent=" << tqparent << ")" << endl;
#endif
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
characterBitmaps[i] = 0;
- file = fopen(TQFile::encodeName(parent->filename), "r");
+ file = fopen(TQFile::encodeName(tqparent->filename), "r");
if (file == 0)
- kdError(4300) << i18n("Cannot open font file %1.").arg(parent->filename) << endl;
+ kdError(4300) << i18n("Cannot open font file %1.").tqarg(tqparent->filename) << endl;
#ifdef DEBUG_PK
else
kdDebug(4300) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl;
@@ -116,7 +116,7 @@ TeXFont_PK::~TeXFont_PK()
}
-glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color)
+glyph* TeXFont_PK::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const TQColor& color)
{
#ifdef DEBUG_PK
kdDebug(4300) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
@@ -136,7 +136,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
// If the character is not defined in the PK file, mark the
// character as missing, and print an error message
if (g->addr == 0) {
- kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").arg(ch).arg(parent->filename) << endl;
+ kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").tqarg(ch).tqarg(tqparent->filename) << endl;
g->addr = -1;
return g;
}
@@ -163,7 +163,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
((g->shrunkenCharacter.isNull()) || (color != g->color)) &&
(characterBitmaps[ch]->w != 0)) {
g->color = color;
- double shrinkFactor = 1200 / parent->displayResolution_in_dpi;
+ double shrinkFactor = 1200 / tqparent->displayResolution_in_dpi;
// All is fine? Then we rescale the bitmap in order to produce the
// required pixmap. Rescaling a character, however, is an art
@@ -209,10 +209,10 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
// Turn the image into 8 bit
TQByteArray translated(characterBitmaps[ch]->w * characterBitmaps[ch]->h);
- Q_UINT8 *data = (Q_UINT8 *)translated.data();
+ TQ_UINT8 *data = (TQ_UINT8 *)translated.data();
for(int x=0; x<characterBitmaps[ch]->w; x++)
for(int y=0; y<characterBitmaps[ch]->h; y++) {
- Q_UINT8 bit = *(characterBitmaps[ch]->bits + characterBitmaps[ch]->bytes_wide*y + (x >> 3));
+ TQ_UINT8 bit = *(characterBitmaps[ch]->bits + characterBitmaps[ch]->bytes_wide*y + (x >> 3));
bit = bit >> (x & 7);
bit = bit & 1;
data[characterBitmaps[ch]->w*y + x] = bit;
@@ -220,7 +220,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
// Now shrink the image. We shrink the X-direction first
TQByteArray xshrunk(shrunk_width*characterBitmaps[ch]->h);
- Q_UINT8 *xdata = (Q_UINT8 *)xshrunk.data();
+ TQ_UINT8 *xdata = (TQ_UINT8 *)xshrunk.data();
// Do the shrinking. The pixel (x,y) that we want to calculate
// corresponds to the line segment from
@@ -231,7 +231,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
for(int y=0; y<characterBitmaps[ch]->h; y++)
for(int x=0; x<shrunk_width; x++) {
- Q_UINT32 value = 0;
+ TQ_UINT32 value = 0;
double destStartX = shrinkFactor*x+srcXTrans;
double destEndX = shrinkFactor*(x+1)+srcXTrans;
for(int srcX=(int)ceil(destStartX); srcX<floor(destEndX); srcX++)
@@ -239,19 +239,19 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
value += data[characterBitmaps[ch]->w*y + srcX] * 255;
if (destStartX >= 0.0)
- value += (Q_UINT32) (255.0*(ceil(destStartX)-destStartX) * data[characterBitmaps[ch]->w*y + (int)floor(destStartX)]);
+ value += (TQ_UINT32) (255.0*(ceil(destStartX)-destStartX) * data[characterBitmaps[ch]->w*y + (int)floor(destStartX)]);
if (floor(destEndX) < characterBitmaps[ch]->w)
- value += (Q_UINT32) (255.0*(destEndX-floor(destEndX)) * data[characterBitmaps[ch]->w*y + (int)floor(destEndX)]);
+ value += (TQ_UINT32) (255.0*(destEndX-floor(destEndX)) * data[characterBitmaps[ch]->w*y + (int)floor(destEndX)]);
xdata[shrunk_width*y + x] = (int)(value/shrinkFactor + 0.5);
}
// Now shrink the Y-direction
TQByteArray xyshrunk(shrunk_width*shrunk_height);
- Q_UINT8 *xydata = (Q_UINT8 *)xyshrunk.data();
+ TQ_UINT8 *xydata = (TQ_UINT8 *)xyshrunk.data();
for(int x=0; x<shrunk_width; x++)
for(int y=0; y<shrunk_height; y++) {
- Q_UINT32 value = 0;
+ TQ_UINT32 value = 0;
double destStartY = shrinkFactor*y+srcYTrans;
double destEndY = shrinkFactor*(y+1)+srcYTrans;
for(int srcY=(int)ceil(destStartY); srcY<floor(destEndY); srcY++)
@@ -259,31 +259,31 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
value += xdata[shrunk_width*srcY + x];
if (destStartY >= 0.0)
- value += (Q_UINT32) ((ceil(destStartY)-destStartY) * xdata[shrunk_width*(int)floor(destStartY) + x]);
+ value += (TQ_UINT32) ((ceil(destStartY)-destStartY) * xdata[shrunk_width*(int)floor(destStartY) + x]);
if (floor(destEndY) < characterBitmaps[ch]->h)
- value += (Q_UINT32) ((destEndY-floor(destEndY)) * xdata[shrunk_width*(int)floor(destEndY) + x]);
+ value += (TQ_UINT32) ((destEndY-floor(destEndY)) * xdata[shrunk_width*(int)floor(destEndY) + x]);
xydata[shrunk_width*y + x] = (int)(value/shrinkFactor);
}
TQImage im32(shrunk_width, shrunk_height, 32);
im32.setAlphaBuffer(true);
- // Do QPixmaps fully support the alpha channel? If yes, we use
+ // Do TQPixmaps fully support the alpha channel? If yes, we use
// that. Otherwise, use other routines as a fallback
- if (parent->font_pool->QPixmapSupportsAlpha) {
+ if (tqparent->font_pool->TQPixmapSupportsAlpha) {
// If the alpha channel is properly supported, we set the
// character glyph to a colored rectangle, and define the
// character outline only using the alpha channel. That ensures
// good quality rendering for overlapping characters.
- im32.fill(qRgb(color.red(), color.green(), color.blue()));
- for(Q_UINT16 y=0; y<shrunk_height; y++) {
- Q_UINT8 *destScanLine = (Q_UINT8 *)im32.scanLine(y);
- for(Q_UINT16 col=0; col<shrunk_width; col++)
+ im32.fill(tqRgb(color.red(), color.green(), color.blue()));
+ for(TQ_UINT16 y=0; y<shrunk_height; y++) {
+ TQ_UINT8 *destScanLine = (TQ_UINT8 *)im32.scanLine(y);
+ for(TQ_UINT16 col=0; col<shrunk_width; col++)
destScanLine[4*col+3] = xydata[shrunk_width*y + col];
}
} else {
// If the alpha channel is not supported... QT seems to turn the
- // alpha channel into a crude bitmap which is used to mask the
+ // alpha channel into a crude bitmap which is used to tqmask the
// resulting TQPixmap. In this case, we define the character
// outline using the image data, and use the alpha channel only
// to store "maximally opaque" or "completely transparent"
@@ -291,18 +291,18 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
// are no longer correctly drawn, but quality is still
// sufficient for most purposes. One notable exception is output
// from the gftodvi program, which will be partially unreadable.
- Q_UINT16 rInv = 0xFF - color.red();
- Q_UINT16 gInv = 0xFF - color.green();
- Q_UINT16 bInv = 0xFF - color.blue();
+ TQ_UINT16 rInv = 0xFF - color.red();
+ TQ_UINT16 gInv = 0xFF - color.green();
+ TQ_UINT16 bInv = 0xFF - color.blue();
- Q_UINT8 *srcScanLine = xydata;
- for(Q_UINT16 y=0; y<shrunk_height; y++) {
+ TQ_UINT8 *srcScanLine = xydata;
+ for(TQ_UINT16 y=0; y<shrunk_height; y++) {
unsigned int *destScanLine = (unsigned int *)im32.scanLine(y);
- for(Q_UINT16 col=0; col<shrunk_width; col++) {
- Q_UINT16 data = *srcScanLine;
+ for(TQ_UINT16 col=0; col<shrunk_width; col++) {
+ TQ_UINT16 data = *srcScanLine;
// The value stored in "data" now has the following meaning:
// data = 0 -> white; data = 0xff -> use "color"
- *destScanLine = qRgba(0xFF - (rInv*data + 0x7F) / 0xFF,
+ *destScanLine = tqRgba(0xFF - (rInv*data + 0x7F) / 0xFF,
0xFF - (gInv*data + 0x7F) / 0xFF,
0xFF - (bInv*data + 0x7F) / 0xFF,
(data > 0x03) ? 0xff : 0x00);
@@ -320,8 +320,8 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC
-#define ADD(a, b) ((Q_UINT32 *) (((char *) a) + b))
-#define SUB(a, b) ((Q_UINT32 *) (((char *) a) - b))
+#define ADD(a, b) ((TQ_UINT32 *) (((char *) a) + b))
+#define SUB(a, b) ((TQ_UINT32 *) (((char *) a) - b))
@@ -347,7 +347,7 @@ static const uchar bitflip[256] = {
15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255
};
-static Q_UINT32 bit_masks[33] = {
+static TQ_UINT32 bit_tqmasks[33] = {
0x0, 0x1, 0x3, 0x7,
0xf, 0x1f, 0x3f, 0x7f,
0xff, 0x1ff, 0x3ff, 0x7ff,
@@ -454,7 +454,7 @@ void TeXFont_PK::PK_skip_specials()
case PK_NOOP :
break;
default :
- oops(i18n("Unexpected %1 in PK file %2").arg(PK_flag_byte).arg(parent->filename) );
+ oops(i18n("Unexpected %1 in PK file %2").tqarg(PK_flag_byte).tqarg(tqparent->filename) );
break;
}
}
@@ -477,11 +477,11 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
int n;
int row_bit_pos;
bool paint_switch;
- Q_UINT32 *cp;
+ TQ_UINT32 *cp;
register struct glyph *g;
register FILE *fp = file;
long fpwidth;
- Q_UINT32 word = 0;
+ TQ_UINT32 word = 0;
int word_weight, bytes_wide;
int rows_left, h_bit, count;
@@ -521,7 +521,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
w = num(fp, n);
h = num(fp, n);
if (w > 0x7fff || h > 0x7fff)
- oops(i18n("The character %1 is too large in file %2").arg(ch).arg(parent->filename));
+ oops(i18n("The character %1 is too large in file %2").tqarg(ch).tqarg(tqparent->filename));
characterBitmaps[ch]->w = w;
characterBitmaps[ch]->h = h;
}
@@ -537,7 +537,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
characterBitmaps[ch]->bits = new char[size != 0 ? size : 1];
}
- cp = (Q_UINT32 *) characterBitmaps[ch]->bits;
+ cp = (TQ_UINT32 *) characterBitmaps[ch]->bits;
/*
* read character data into *cp
@@ -595,12 +595,12 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
h_bit -= count;
word_weight -= count;
if (paint_switch)
- word |= bit_masks[count] << word_weight;
+ word |= bit_tqmasks[count] << word_weight;
count = 0;
} else
if (count >= h_bit && h_bit <= word_weight) {
if (paint_switch)
- word |= bit_masks[h_bit] << (word_weight - h_bit);
+ word |= bit_tqmasks[h_bit] << (word_weight - h_bit);
*cp++ = word;
/* "output" row(s) */
for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) {
@@ -615,7 +615,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
h_bit = characterBitmaps[ch]->w;
} else {
if (paint_switch)
- word |= bit_masks[word_weight];
+ word |= bit_tqmasks[word_weight];
*cp++ = word;
word = 0;
count -= word_weight;
@@ -625,10 +625,10 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
}
paint_switch = 1 - paint_switch;
}
- if (cp != ((Q_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h)))
- oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename));
+ 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(tqparent->filename));
if (rows_left != 0 || h_bit != characterBitmaps[ch]->w)
- oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename));
+ oops(i18n("Bad pk file (%1), too many bits").tqarg(tqparent->filename));
}
// The data in the bitmap is now in the processor's bit order,
@@ -679,14 +679,14 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
while (count > 0) {
if (count < word_weight && count < h_bit) {
if (paint_switch)
- word |= bit_masks[count] << (32 - word_weight);
+ word |= bit_tqmasks[count] << (32 - word_weight);
h_bit -= count;
word_weight -= count;
count = 0;
} else
if (count >= h_bit && h_bit <= word_weight) {
if (paint_switch)
- word |= bit_masks[h_bit] << (32 - word_weight);
+ word |= bit_tqmasks[h_bit] << (32 - word_weight);
*cp++ = word;
/* "output" row(s) */
for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) {
@@ -701,7 +701,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
h_bit = characterBitmaps[ch]->w;
} else {
if (paint_switch)
- word |= bit_masks[word_weight] << (32 - word_weight);
+ word |= bit_tqmasks[word_weight] << (32 - word_weight);
*cp++ = word;
word = 0;
count -= word_weight;
@@ -711,10 +711,10 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
}
paint_switch = 1 - paint_switch;
}
- if (cp != ((Q_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h)))
- oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename));
+ 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(tqparent->filename));
if (rows_left != 0 || h_bit != characterBitmaps[ch]->w)
- oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename));
+ oops(i18n("Bad pk file (%1), too many bits").tqarg(tqparent->filename));
}
} // endif: big or small Endian?
}
diff --git a/kdvi/TeXFont_PK.h b/kdvi/TeXFont_PK.h
index 80a0c0e1..68935d16 100644
--- a/kdvi/TeXFont_PK.h
+++ b/kdvi/TeXFont_PK.h
@@ -9,10 +9,10 @@ class glyph;
class TeXFont_PK : public TeXFont {
public:
- TeXFont_PK(TeXFontDefinition *parent);
+ TeXFont_PK(TeXFontDefinition *tqparent);
~TeXFont_PK();
- glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black);
+ glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black);
private:
FILE *file; // open font file or NULL
diff --git a/kdvi/TeXFont_TFM.cpp b/kdvi/TeXFont_TFM.cpp
index c8268f01..ebd1b7f5 100644
--- a/kdvi/TeXFont_TFM.cpp
+++ b/kdvi/TeXFont_TFM.cpp
@@ -21,14 +21,14 @@
//#define DEBUG_TFM
-TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
- : TeXFont(parent)
+TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *tqparent)
+ : TeXFont(tqparent)
{
#ifdef DEBUG_TFM
- kdDebug(4300) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )" << endl;
+ kdDebug(4300) << "TeXFont_TFM::TeXFont_TFM( tqparent=" << tqparent << " )" << endl;
#endif
- TQFile file( parent->filename );
+ TQFile file( tqparent->filename );
if ( !file.open( IO_ReadOnly ) ) {
kdError(4300) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file" << endl;
return;
@@ -37,7 +37,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
// Data from the very beginning of the TFM file, as specified in
// "The DVI Driver Standard, Level 0", section D.2.1
- Q_UINT16 lf, lh, bc, ec, nw, nh, nd;
+ TQ_UINT16 lf, lh, bc, ec, nw, nh, nd;
stream >> lf >> lh >> bc >> ec >> nw >> nh >> nd;
#ifdef DEBUG_TFM
kdDebug(4300) << "lf= " << lf << endl
@@ -49,7 +49,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
<< "nd= " << nd << endl;
#endif
if ((bc > ec) || (ec >= TeXFontDefinition::max_num_of_chars_in_font)) {
- kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid bc and ec entries." << endl;
+ kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid bc and ec entries." << endl;
file.close();
return;
}
@@ -94,10 +94,10 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
for(unsigned int characterCode=bc; characterCode<ec; characterCode++) {
glyph *g = glyphtable+characterCode;
- Q_UINT8 byte;
+ TQ_UINT8 byte;
stream >> byte;
if (byte >= nw)
- kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
+ kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid Char-Info table." << endl;
else {
characterWidth_in_units_of_design_size[characterCode] = widthTable_in_units_of_design_size[byte];
g->dvi_advance_in_units_of_design_size_by_2e20 = widthTable_in_units_of_design_size[byte].value;
@@ -106,7 +106,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
stream >> byte;
byte = byte >> 4;
if (byte >= nh)
- kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
+ kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid Char-Info table." << endl;
else
characterHeight_in_units_of_design_size[characterCode] = heightTable_in_units_of_design_size[byte];
@@ -122,7 +122,7 @@ TeXFont_TFM::~TeXFont_TFM()
}
-glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixmap, const TQColor& color)
+glyph *TeXFont_TFM::getGlyph(TQ_UINT16 characterCode, bool generateCharacterPixmap, const TQColor& color)
{
#ifdef DEBUG_TFM
kdDebug(4300) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
@@ -139,10 +139,10 @@ glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixma
if ((generateCharacterPixmap == true) && ((g->shrunkenCharacter.isNull()) || (color != g->color)) ) {
g->color = color;
- Q_UINT16 pixelWidth = (Q_UINT16)(parent->displayResolution_in_dpi *
+ TQ_UINT16 pixelWidth = (TQ_UINT16)(tqparent->displayResolution_in_dpi *
design_size_in_TeX_points.toDouble() *
characterWidth_in_units_of_design_size[characterCode].toDouble() * 100.0/7227.0 + 0.5);
- Q_UINT16 pixelHeight = (Q_UINT16)(parent->displayResolution_in_dpi *
+ TQ_UINT16 pixelHeight = (TQ_UINT16)(tqparent->displayResolution_in_dpi *
design_size_in_TeX_points.toDouble() *
characterHeight_in_units_of_design_size[characterCode].toDouble() * 100.0/7227.0 + 0.5);
diff --git a/kdvi/TeXFont_TFM.h b/kdvi/TeXFont_TFM.h
index 737c8bed..9a3639e0 100644
--- a/kdvi/TeXFont_TFM.h
+++ b/kdvi/TeXFont_TFM.h
@@ -14,19 +14,19 @@
class fix_word {
public:
- void fromINT32(Q_INT32 val) {value = val;}
- void fromDouble(double val) {value = (Q_INT32)(val * (1<<20) + 0.5);}
+ void fromINT32(TQ_INT32 val) {value = val;}
+ void fromDouble(double val) {value = (TQ_INT32)(val * (1<<20) + 0.5);}
double toDouble() {return (double(value)) / (double(1<<20));}
- Q_INT32 value;
+ TQ_INT32 value;
};
class TeXFont_TFM : public TeXFont {
public:
- TeXFont_TFM(TeXFontDefinition *parent);
+ TeXFont_TFM(TeXFontDefinition *tqparent);
~TeXFont_TFM();
- glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black);
+ glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black);
private:
fix_word characterWidth_in_units_of_design_size[256];
diff --git a/kdvi/bigEndianByteReader.cpp b/kdvi/bigEndianByteReader.cpp
index 63d11f83..aa55bdd8 100644
--- a/kdvi/bigEndianByteReader.cpp
+++ b/kdvi/bigEndianByteReader.cpp
@@ -14,7 +14,7 @@
//#define DEBUG_ENDIANREADER
-Q_UINT8 bigEndianByteReader::readUINT8()
+TQ_UINT8 bigEndianByteReader::readUINT8()
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
@@ -30,27 +30,27 @@ Q_UINT8 bigEndianByteReader::readUINT8()
return *(command_pointer++);
}
-Q_UINT16 bigEndianByteReader::readUINT16()
+TQ_UINT16 bigEndianByteReader::readUINT16()
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
if (command_pointer >= end_pointer)
return EOP;
- Q_UINT16 a;
+ TQ_UINT16 a;
a = *(command_pointer++);
a = (a << 8) | *(command_pointer++);
return a;
}
-Q_UINT32 bigEndianByteReader::readUINT32()
+TQ_UINT32 bigEndianByteReader::readUINT32()
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
if (command_pointer >= end_pointer)
return EOP;
- Q_UINT32 a;
+ TQ_UINT32 a;
a = *(command_pointer++);
a = (a << 8) | *(command_pointer++);
a = (a << 8) | *(command_pointer++);
@@ -58,33 +58,33 @@ Q_UINT32 bigEndianByteReader::readUINT32()
return a;
}
-void bigEndianByteReader::writeUINT32(Q_UINT32 a)
+void bigEndianByteReader::writeUINT32(TQ_UINT32 a)
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
if (command_pointer >= end_pointer)
return;
- command_pointer[3] = (Q_UINT8)(a & 0xFF);
+ command_pointer[3] = (TQ_UINT8)(a & 0xFF);
a = a >> 8;
- command_pointer[2] = (Q_UINT8)(a & 0xFF);
+ command_pointer[2] = (TQ_UINT8)(a & 0xFF);
a = a >> 8;
- command_pointer[1] = (Q_UINT8)(a & 0xFF);
+ command_pointer[1] = (TQ_UINT8)(a & 0xFF);
a = a >> 8;
- command_pointer[0] = (Q_UINT8)(a & 0xFF);
+ command_pointer[0] = (TQ_UINT8)(a & 0xFF);
command_pointer += 4;
return;
}
-Q_UINT32 bigEndianByteReader::readUINT(Q_UINT8 size)
+TQ_UINT32 bigEndianByteReader::readUINT(TQ_UINT8 size)
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
if (command_pointer >= end_pointer)
return EOP;
- Q_UINT32 a = 0;
+ TQ_UINT32 a = 0;
while (size > 0) {
a = (a << 8) + *(command_pointer++);
size--;
@@ -92,14 +92,14 @@ Q_UINT32 bigEndianByteReader::readUINT(Q_UINT8 size)
return a;
}
-Q_INT32 bigEndianByteReader::readINT(Q_UINT8 length)
+TQ_INT32 bigEndianByteReader::readINT(TQ_UINT8 length)
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
if (command_pointer >= end_pointer)
return EOP;
- Q_INT32 a = *(command_pointer++);
+ TQ_INT32 a = *(command_pointer++);
if (a & 0x80)
a -= 0x100;
diff --git a/kdvi/bigEndianByteReader.h b/kdvi/bigEndianByteReader.h
index 06ef1b13..269d97d1 100644
--- a/kdvi/bigEndianByteReader.h
+++ b/kdvi/bigEndianByteReader.h
@@ -24,38 +24,38 @@ class bigEndianByteReader {
public:
/** Set this pointer to the location where the number resides which
you want to read. */
- Q_UINT8 * command_pointer;
+ TQ_UINT8 * command_pointer;
/** This pointer marks the end of the memory area where bytes can be
read. It should point to the first byte which CANNOT be
read. The idea is to have a safety net which protects us against
SEGFAULTs. This is also used in virtual fonts, where the macro
does not have an EOP command at the end of the macro. */
- Q_UINT8 * end_pointer;
+ TQ_UINT8 * end_pointer;
/** If command_pointer >= end_pointer, this method return EOP (=140)
and exists. Otherwise, the method returns the unsigned byte
and increases the command_pointer by one. */
- Q_UINT8 readUINT8();
+ TQ_UINT8 readUINT8();
/** Similar to the method above, only that the method reads a big
endian 2-byte word and increases the pointer by two. */
- Q_UINT16 readUINT16();
+ TQ_UINT16 readUINT16();
/** Similar to the method above, only that the method reads a big
endian 4-byte word and increases the pointer by four. */
- Q_UINT32 readUINT32();
+ TQ_UINT32 readUINT32();
- void writeUINT32(Q_UINT32 a);
+ void writeUINT32(TQ_UINT32 a);
/** Similar to the method above, only that the method reads a big
endian number of length size, where 1 <= size <= 4. Note that
the value 3 is allowed (and is acually used in DVI files)!!! */
- Q_UINT32 readUINT(Q_UINT8 size);
+ TQ_UINT32 readUINT(TQ_UINT8 size);
/** Similar to the method above, only that the method reads a SIGNED
number */
- Q_INT32 readINT(Q_UINT8);
+ TQ_INT32 readINT(TQ_UINT8);
};
diff --git a/kdvi/dviFile.cpp b/kdvi/dviFile.cpp
index 336507db..db365482 100644
--- a/kdvi/dviFile.cpp
+++ b/kdvi/dviFile.cpp
@@ -71,7 +71,7 @@ extern "C" {
dvifile::dvifile(const dvifile *old, fontPool *fp)
{
- errorMsg = TQString::null;
+ errorMsg = TQString();
errorCounter = 0;
page_offset = 0;
suggestedPageSize = 0;
@@ -107,7 +107,7 @@ void dvifile::process_preamble()
{
command_pointer = dvi_Data();
- Q_UINT8 magic_number = readUINT8();
+ TQ_UINT8 magic_number = readUINT8();
if (magic_number != PRE) {
errorMsg = i18n("The DVI file does not start with the preamble.");
return;
@@ -124,8 +124,8 @@ void dvifile::process_preamble()
how many centimeters there are in one TeX unit, as explained in
section A.3 of the DVI driver standard, Level 0, published by
the TUG DVI driver standards committee. */
- Q_UINT32 numerator = readUINT32();
- Q_UINT32 denominator = readUINT32();
+ TQ_UINT32 numerator = readUINT32();
+ TQ_UINT32 denominator = readUINT32();
_magnification = readUINT32();
cmPerDVIunit = (double(numerator) / double(denominator)) * (double(_magnification) / 1000.0) * (1.0 / 1e5);
@@ -165,7 +165,7 @@ void dvifile::find_postamble()
void dvifile::read_postamble()
{
- Q_UINT8 magic_byte = readUINT8();
+ TQ_UINT8 magic_byte = readUINT8();
if (magic_byte != POST) {
errorMsg = i18n("The postamble does not begin with the POST command.");
return;
@@ -181,17 +181,17 @@ void dvifile::read_postamble()
total_pages = readUINT16();
// As a next step, read the font definitions.
- Q_UINT8 cmnd = readUINT8();
+ TQ_UINT8 cmnd = readUINT8();
while (cmnd >= FNTDEF1 && cmnd <= FNTDEF4) {
- Q_UINT32 TeXnumber = readUINT(cmnd-FNTDEF1+1);
- Q_UINT32 checksum = readUINT32(); // Checksum of the font, as found by TeX in the TFM file
+ TQ_UINT32 TeXnumber = readUINT(cmnd-FNTDEF1+1);
+ TQ_UINT32 checksum = readUINT32(); // Checksum of the font, as found by TeX in the TFM file
// Read scale and design factor, and the name of the font. All
// these are explained in section A.4 of the DVI driver standard,
// Level 0, published by the TUG DVI driver standards committee
- Q_UINT32 scale = readUINT32();
- Q_UINT32 design = readUINT32();
- Q_UINT16 len = readUINT8() + readUINT8(); // Length of the font name, including the directory name
+ TQ_UINT32 scale = readUINT32();
+ TQ_UINT32 design = readUINT32();
+ TQ_UINT16 len = readUINT8() + readUINT8(); // Length of the font name, including the directory name
char *fontname = new char[len + 1];
strncpy(fontname, (char *)command_pointer, len );
fontname[len] = '\0';
@@ -248,7 +248,7 @@ void dvifile::prepare_pages()
page_offset[total_pages] = beginning_of_postamble;
- Q_UINT16 i = total_pages-1;
+ TQ_UINT16 i = total_pages-1;
page_offset[i] = last_page_offset;
// Follow back pointers through pages in the DVI file, storing the
@@ -256,7 +256,7 @@ void dvifile::prepare_pages()
while (i > 0) {
command_pointer = dvi_Data() + page_offset[i--];
if (readUINT8() != BOP) {
- errorMsg = i18n("The page %1 does not start with the BOP command.").arg(i+1);
+ errorMsg = i18n("The page %1 does not start with the BOP command.").tqarg(i+1);
return;
}
command_pointer += 10 * 4;
@@ -273,7 +273,7 @@ dvifile::dvifile(const TQString& fname, fontPool* pool)
kdDebug(4300) << "init_dvi_file: " << fname << endl;
#endif
- errorMsg = TQString::null;
+ errorMsg = TQString();
errorCounter = 0;
page_offset = 0;
suggestedPageSize = 0;
@@ -340,10 +340,10 @@ void dvifile::renumber()
bool bigEndian;
qSysInfo (&wordSize, &bigEndian);
- for(Q_UINT32 i=1; i<=total_pages; i++) {
- Q_UINT8 *ptr = dviData.data() + page_offset[i-1]+1;
- Q_UINT8 *num = (Q_UINT8 *)&i;
- for(Q_UINT8 j=0; j<4; j++)
+ for(TQ_UINT32 i=1; i<=total_pages; i++) {
+ TQ_UINT8 *ptr = dviData.data() + page_offset[i-1]+1;
+ TQ_UINT8 *num = (TQ_UINT8 *)&i;
+ for(TQ_UINT8 j=0; j<4; j++)
if (bigEndian) {
*(ptr++) = num[0];
*(ptr++) = num[1];
@@ -362,14 +362,14 @@ void dvifile::renumber()
TQString dvifile::convertPDFtoPS(const TQString &PDFFilename)
{
// Check if the PDFFile is known
- TQMap<TQString, TQString>::Iterator it = convertedFiles.find(PDFFilename);
+ TQMap<TQString, TQString>::Iterator it = convertedFiles.tqfind(PDFFilename);
if (it != convertedFiles.end()) {
// PDF-File is known. Good.
return it.data();
}
// Get the name of a temporary file
- KTempFile tmpfile(TQString::null, ".ps");
+ KTempFile tmpfile(TQString(), ".ps");
TQString convertedFileName = tmpfile.name();
tmpfile.close();
tmpfile.unlink();
@@ -378,9 +378,9 @@ TQString dvifile::convertPDFtoPS(const TQString &PDFFilename)
KProcIO proc;
proc << "pdf2ps" << PDFFilename << convertedFileName;
if (proc.start(KProcess::Block) == false)
- convertedFileName = TQString::null; // Indicates that conversion failed, won't try again.
+ convertedFileName = TQString(); // Indicates that conversion failed, won't try again.
if (!TQFile::exists(convertedFileName))
- convertedFileName = TQString::null; // Indicates that conversion failed, won't try again.
+ convertedFileName = TQString(); // Indicates that conversion failed, won't try again.
// Save name of converted file to buffer, so PDF file won't be
// converted again, and files can be deleted when *this is
diff --git a/kdvi/dviFile.h b/kdvi/dviFile.h
index 59ffe65c..b82d19de 100644
--- a/kdvi/dviFile.h
+++ b/kdvi/dviFile.h
@@ -35,15 +35,15 @@ class dvifile : public bigEndianByteReader
fontPool * font_pool;
TQString filename;
TQString generatorString;
- Q_UINT16 total_pages;
- TQMemArray<Q_UINT32> page_offset;
+ TQ_UINT16 total_pages;
+ TQMemArray<TQ_UINT32> page_offset;
/** Saves the DVI file. Returns true on success. */
bool saveAs(const TQString &filename);
// Returns a pointer to the DVI file's data, or 0 if no data has yet
// been allocated.
- Q_UINT8 * dvi_Data() {return dviData.data();}
+ TQ_UINT8 * dvi_Data() {return dviData.data();}
TQIODevice::Offset size_of_file;
TQString errorMsg;
@@ -51,14 +51,14 @@ class dvifile : public bigEndianByteReader
/** This field is set to zero when the DVI file is constructed, and
will be modified during the prescan phase (at this time the
prescan code still resides in the dviRenderer class) */
- Q_UINT16 numberOfExternalPSFiles;
+ TQ_UINT16 numberOfExternalPSFiles;
/** This field is set to zero when the DVI file is constructed, and
will be modified during the prescan phase (at this time the
prescan code still resides in the dviRenderer class) */
- Q_UINT16 numberOfExternalNONPSFiles;
+ TQ_UINT16 numberOfExternalNONPSFiles;
- Q_UINT32 beginning_of_postamble;
+ TQ_UINT32 beginning_of_postamble;
/** This flag is set to "true" during the construction of the
dvifile, and is never changed afterwards by the dvifile
@@ -76,20 +76,20 @@ class dvifile : public bigEndianByteReader
/** Returns the magnification of the DVI file, as described in the
DVI Standard. */
- Q_UINT32 getMagnification() const {return _magnification;}
+ TQ_UINT32 getMagnification() const {return _magnification;}
/** This member is set to zero on construction and can be used by
other software to count error messages that were printed when
the DVI-file was processed. Suggested application: limit the
number of error messages to, say, 25. */
- Q_UINT8 errorCounter;
+ TQ_UINT8 errorCounter;
/** Papersize information read from the dvi-File */
pageSize *suggestedPageSize;
/** Sets new DVI data; all old data is erased. EXPERIMENTAL, use
with care. */
- void setNewData(const TQMemArray<Q_UINT8>& newData) {dviData = newData;}
+ void setNewData(const TQMemArray<TQ_UINT8>& newData) {dviData = newData;}
/** Page numbers that appear in a DVI document need not be
ordered. Worse, page numbers need not be unique. This method
@@ -112,7 +112,7 @@ class dvifile : public bigEndianByteReader
name, the method will then NOT convert the file, but simply return
the name from the buffer
- @returns The name of the PS file, or TQString::null on failure.
+ @returns The name of the PS file, or TQString() on failure.
*/
TQString convertPDFtoPS(const TQString &PDFFilename);
@@ -129,19 +129,19 @@ class dvifile : public bigEndianByteReader
/** Offset in DVI file of last page, set in read_postamble(). */
- Q_UINT32 last_page_offset;
- Q_UINT32 _magnification;
+ TQ_UINT32 last_page_offset;
+ TQ_UINT32 _magnification;
double cmPerDVIunit;
- TQMemArray<Q_UINT8> dviData;
+ TQMemArray<TQ_UINT8> dviData;
/** Map of filenames for converted PDF files
This map contains names of PDF files that were converted to
PostScript. The key is the name of the PDF file, the data the name
- of the associated PS file, or TQString::null, if the file could not
+ of the associated PS file, or TQString(), if the file could not
be converted. The PS files are deleted when the DVI-file is
destructed. */
TQMap<TQString, TQString> convertedFiles;
diff --git a/kdvi/dviPageCache.h b/kdvi/dviPageCache.h
index a28052c5..41a1c173 100644
--- a/kdvi/dviPageCache.h
+++ b/kdvi/dviPageCache.h
@@ -27,6 +27,7 @@
class DVIPageCache : public DocumentPageCache
{
Q_OBJECT
+ TQ_OBJECT
public:
DVIPageCache();
diff --git a/kdvi/dviRenderer.cpp b/kdvi/dviRenderer.cpp
index 2e0b0512..5133b2ab 100644
--- a/kdvi/dviRenderer.cpp
+++ b/kdvi/dviRenderer.cpp
@@ -71,7 +71,7 @@ dviRenderer::dviRenderer(TQWidget *par)
: DocumentRenderer(par), info(new infoDialog(par))
{
#ifdef DEBUG_DVIRENDERER
- kdDebug(4300) << "dviRenderer( parent=" << par << " )" << endl;
+ kdDebug(4300) << "dviRenderer( tqparent=" << par << " )" << endl;
#endif
// initialize the dvi machinery
@@ -79,7 +79,7 @@ dviRenderer::dviRenderer(TQWidget *par)
connect(&font_pool, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) );
- parentWidget = par;
+ tqparentWidget = par;
shrinkfactor = 3;
current_page = 0;
resolutionInDPI = 0.0;
@@ -193,12 +193,12 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page)
// Reset colors
colorStack.clear();
- globalColor = Qt::black;
+ globalColor = TQt::black;
TQApplication::setOverrideCursor( waitCursor );
foreGroundPainter = page->getPainter();
if (foreGroundPainter != 0) {
- errorMsg = TQString::null;
+ errorMsg = TQString();
draw_page();
page->returnPainter(foreGroundPainter);
}
@@ -206,11 +206,11 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page)
page->isEmpty = false;
if (errorMsg.isEmpty() != true) {
- KMessageBox::detailedError(parentWidget,
+ KMessageBox::detailedError(tqparentWidget,
i18n("<qt><strong>File corruption!</strong> KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>"),
errorMsg, i18n("DVI File Error"));
- errorMsg = TQString::null;
+ errorMsg = TQString();
currentlyDrawnPage = 0;
mutex.unlock();
return;
@@ -260,7 +260,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
if (showMsg) {
KDialogBase *dialog= new KDialogBase(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes,
- parentWidget, "information", true, true,KStdGuiItem::ok() );
+ tqparentWidget, "information", true, true,KStdGuiItem::ok() );
TQVBox *topcontents = new TQVBox (dialog);
topcontents->setSpacing(KDialog::spacingHint()*2);
@@ -277,7 +277,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
TQLabel *label2 = new TQLabel( i18n("<qt>This DVI file contains source file information. You may click into the text with the "
"middle mouse button, and an editor will open the TeX-source file immediately.</qt>"),
contents);
- label2->setMinimumSize(label2->sizeHint());
+ label2->setMinimumSize(label2->tqsizeHint());
lay->add( label2 );
lay->addStretch(1);
TQSize extraSize = TQSize(50,30);
@@ -311,8 +311,8 @@ void dviRenderer::embedPostScript()
if (!dviFile)
return;
- embedPS_progress = new KProgressDialog(parentWidget, "embedPSProgressDialog",
- i18n("Embedding PostScript Files"), TQString::null, true);
+ embedPS_progress = new KProgressDialog(tqparentWidget, "embedPSProgressDialog",
+ i18n("Embedding PostScript Files"), TQString(), true);
if (!embedPS_progress)
return;
embedPS_progress->setAllowCancel(false);
@@ -323,8 +323,8 @@ void dviRenderer::embedPostScript()
embedPS_numOfProgressedFiles = 0;
- Q_UINT16 currPageSav = current_page;
- errorMsg = TQString::null;
+ TQ_UINT16 currPageSav = current_page;
+ errorMsg = TQString();
for(current_page=0; current_page < dviFile->total_pages; current_page++) {
if (current_page < dviFile->total_pages) {
command_pointer = dviFile->dvi_Data() + dviFile->page_offset[current_page];
@@ -342,12 +342,12 @@ void dviRenderer::embedPostScript()
if (!errorMsg.isEmpty()) {
errorMsg = "<qt>" + errorMsg + "</qt>";
- KMessageBox::detailedError(parentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg);
- errorMsg = TQString::null;
+ KMessageBox::detailedError(tqparentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg);
+ errorMsg = TQString();
} else
- KMessageBox::information(parentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You "
+ KMessageBox::information(tqparentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You "
"will probably want to save the DVI file now.") + "</qt>",
- TQString::null, "embeddingDone");
+ TQString(), "embeddingDone");
// Prescan phase starts here
#ifdef PERFORMANCE_MEASUREMENT
@@ -435,9 +435,9 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// Make sure the file actually exists.
if (!fi.exists() || fi.isDir()) {
- KMessageBox::error( parentWidget,
+ KMessageBox::error( tqparentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist. "
- "KDVI already tried to add the ending '.dvi'.</qt>").arg(filename),
+ "KDVI already tried to add the ending '.dvi'.</qt>").tqarg(filename),
i18n("File Error!"));
return false;
}
@@ -448,21 +448,21 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
// the multipage.
TQString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() );
if (mimetype != "application/x-dvi") {
- KMessageBox::sorry( parentWidget,
+ KMessageBox::sorry( tqparentWidget,
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>" )
- .arg( fname )
- .arg( mimetype ) );
+ .tqarg( fname )
+ .tqarg( mimetype ) );
return false;
}
// Check if the file is a valid DVI file.
if (!isValidFile(filename))
{
- KMessageBox::sorry( parentWidget,
+ KMessageBox::sorry( tqparentWidget,
i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>")
- .arg( fname ) );
+ .tqarg( fname ) );
return false;
}
@@ -477,7 +477,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
if ((dviFile_new->dvi_Data() == NULL)||(dviFile_new->errorMsg.isEmpty() != true)) {
TQApplication::restoreOverrideCursor();
if (dviFile_new->errorMsg.isEmpty() != true)
- KMessageBox::detailedError(parentWidget,
+ KMessageBox::detailedError(tqparentWidget,
i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>"),
dviFile_new->errorMsg, i18n("DVI File Error"));
@@ -507,7 +507,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
TQString includePath;
if (!baseURL.isLocalFile()) {
includePath = filename;
- includePath.truncate(includePath.findRev('/'));
+ includePath.truncate(includePath.tqfindRev('/'));
}
PS_interface->setIncludePath(includePath);
@@ -538,7 +538,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base)
preScanTimer.start();
#endif
dviFile->numberOfExternalPSFiles = 0;
- Q_UINT16 currPageSav = current_page;
+ TQ_UINT16 currPageSav = current_page;
prebookmarks.clear();
for(current_page=0; current_page < dviFile->total_pages; current_page++) {
@@ -629,19 +629,19 @@ Anchor dviRenderer::parseReference(const TQString &reference)
// points to line number 1111 in the file "Filename". KDVI then
// looks for source specials of the form "src:xxxxFilename", and
// tries to find the special with the biggest xxxx
- if (reference.find("src:",0,false) == 0) {
+ if (reference.tqfind("src:",0,false) == 0) {
// Extract the file name and the numeral part from the reference string
DVI_SourceFileSplitter splitter(reference, dviFile->filename);
- Q_UINT32 refLineNumber = splitter.line();
+ TQ_UINT32 refLineNumber = splitter.line();
TQString refFileName = splitter.filePath();
if (sourceHyperLinkAnchors.isEmpty()) {
- KMessageBox::sorry(parentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to "
+ KMessageBox::sorry(tqparentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to "
"line %1 in the TeX-file <strong>%2</strong>. It seems, however, that the DVI file "
"does not contain the necessary source file information. "
"We refer to the manual of KDVI for a detailed explanation on how to include this "
- "information. Press the F1 key to open the manual.</qt>").arg(refLineNumber).arg(refFileName),
+ "information. Press the F1 key to open the manual.</qt>").tqarg(refLineNumber).tqarg(refFileName),
i18n("Could Not Find Reference"));
mutex.unlock();
return Anchor();
@@ -651,7 +651,7 @@ Anchor dviRenderer::parseReference(const TQString &reference)
// whose line number is the biggest among those that are smaller
// than the refLineNumber. That way, the position in the DVI file
// which is highlighted is always a little further up than the
- // position in the editor, e.g. if the DVI file contains
+ // position in the editor, e.g. if the DVI file tqcontains
// positional information at the beginning of every paragraph,
// KDVI jumps to the beginning of the paragraph that the cursor is
// in, and never to the next paragraph. If source file anchors for
@@ -680,8 +680,8 @@ Anchor dviRenderer::parseReference(const TQString &reference)
return Anchor(bestMatch->page, bestMatch->distance_from_top);
} else
if (anchorForRefFileFound == false)
- 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>").arg(refLineNumber).arg(refFileName),
+ KMessageBox::sorry(tqparentWidget, i18n("<qt>KDVI was not able to locate the place in the DVI file which corresponds to "
+ "line %1 in the TeX-file <strong>%2</strong>.</qt>").tqarg(refLineNumber).tqarg(refFileName),
i18n( "Could Not Find Reference" ));
else {
mutex.unlock();
@@ -715,7 +715,7 @@ void dviRenderer::setResolution(double resolution_in_DPI)
void dviRenderer::clearStatusBar()
{
- emit setStatusBarText( TQString::null );
+ emit setStatusBarText( TQString() );
}
@@ -733,9 +733,9 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
TQString TeXfile = splitter.filePath();
if ( ! splitter.fileExists() )
{
- KMessageBox::sorry(parentWidget, TQString("<qt>") +
+ KMessageBox::sorry(tqparentWidget, TQString("<qt>") +
i18n("The DVI-file refers to the TeX-file "
- "<strong>%1</strong> which could not be found.").arg(KShellProcess::quote(TeXfile)) +
+ "<strong>%1</strong> which could not be found.").tqarg(KShellProcess::quote(TeXfile)) +
TQString("</qt>"),
i18n( "Could Not Find File" ));
return;
@@ -743,7 +743,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
TQString command = editorCommand;
if (command.isEmpty() == true) {
- int r = KMessageBox::warningContinueCancel(parentWidget, TQString("<qt>") +
+ int r = KMessageBox::warningContinueCancel(tqparentWidget, TQString("<qt>") +
i18n("You have not yet specified an editor for inverse search. "
"Please choose your favorite editor in the "
"<strong>DVI options dialog</strong> "
@@ -756,7 +756,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
else
return;
}
- command = command.replace( "%l", TQString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) );
+ command = command.tqreplace( "%l", TQString::number(splitter.line()) ).tqreplace( "%f", KShellProcess::quote(TeXfile) );
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "Calling program: " << command << endl;
@@ -767,8 +767,8 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
// henceforth dimiss the output of the older programm. "If it
// hasn't failed until now, we don't care."
if (proc != 0) {
- qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
- qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
+ tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
+ tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
proc = 0;
}
@@ -778,15 +778,15 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
kdError(4300) << "Could not allocate ShellProcess for the editor command." << endl;
return;
}
- qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(editorCommand_terminated(KProcess *)));
+ tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
+ tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
+ tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(editorCommand_terminated(KProcess *)));
// Merge the editor-specific editor message here.
export_errorString = i18n("<qt>The external program<br><br><tt><strong>%1</strong></tt><br/><br/>which was used to call the editor "
"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 "
"manual for KDVI contains a detailed explanation how to set up your editor for use with KDVI, "
- "and a list of common problems.</qt>").arg(command);
+ "and a list of common problems.</qt>").tqarg(command);
info->clear(i18n("Starting the editor..."));
@@ -804,33 +804,33 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
}
-TQString dviRenderer::PDFencodingToQString(const TQString& _pdfstring)
+TQString dviRenderer::PDFencodingToTQString(const TQString& _pdfstring)
{
// This method locates special PDF characters in a string and
// replaces them by UTF8. See Section 3.2.3 of the PDF reference
// guide for information.
TQString pdfstring = _pdfstring;
- pdfstring = pdfstring.replace("\\n", "\n");
- pdfstring = pdfstring.replace("\\r", "\n");
- pdfstring = pdfstring.replace("\\t", "\t");
- pdfstring = pdfstring.replace("\\f", "\f");
- pdfstring = pdfstring.replace("\\(", "(");
- pdfstring = pdfstring.replace("\\)", ")");
- pdfstring = pdfstring.replace("\\\\", "\\");
+ pdfstring = pdfstring.tqreplace("\\n", "\n");
+ pdfstring = pdfstring.tqreplace("\\r", "\n");
+ pdfstring = pdfstring.tqreplace("\\t", "\t");
+ pdfstring = pdfstring.tqreplace("\\f", "\f");
+ pdfstring = pdfstring.tqreplace("\\(", "(");
+ pdfstring = pdfstring.tqreplace("\\)", ")");
+ pdfstring = pdfstring.tqreplace("\\\\", "\\");
// Now replace octal character codes with the characters they encode
int pos;
TQRegExp rx( "(\\\\)(\\d\\d\\d)" ); // matches "\xyz" where x,y,z are numbers
while((pos = rx.search( pdfstring )) != -1) {
- pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8)));
+ pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8)));
}
rx.setPattern( "(\\\\)(\\d\\d)" ); // matches "\xy" where x,y are numbers
while((pos = rx.search( pdfstring )) != -1) {
- pdfstring = pdfstring.replace(pos, 3, TQChar(rx.cap(2).toInt(0,8)));
+ pdfstring = pdfstring.tqreplace(pos, 3, TQChar(rx.cap(2).toInt(0,8)));
}
rx.setPattern( "(\\\\)(\\d)" ); // matches "\x" where x is a number
while((pos = rx.search( pdfstring )) != -1) {
- pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8)));
+ pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8)));
}
return pdfstring;
}
diff --git a/kdvi/dviRenderer.h b/kdvi/dviRenderer.h
index 863a2786..6d71b1ed 100644
--- a/kdvi/dviRenderer.h
+++ b/kdvi/dviRenderer.h
@@ -41,13 +41,13 @@ extern const int MFResolutions[];
class DVI_SourceFileAnchor {
public:
DVI_SourceFileAnchor() {}
- DVI_SourceFileAnchor(const TQString& name, Q_UINT32 ln, Q_UINT32 pg, const Length& _distance_from_top)
+ DVI_SourceFileAnchor(const TQString& name, TQ_UINT32 ln, TQ_UINT32 pg, const Length& _distance_from_top)
: fileName(name), line(ln), page(pg),
distance_from_top(_distance_from_top) {}
TQString fileName;
- Q_UINT32 line;
- Q_UINT32 page;
+ TQ_UINT32 line;
+ TQ_UINT32 page;
Length distance_from_top;
};
@@ -69,7 +69,7 @@ struct framedata {
/* this information is saved when using virtual fonts */
typedef void (dviRenderer::*set_char_proc)(unsigned int, unsigned int);
-typedef void (dviRenderer::*parseSpecials)(char *, Q_UINT8 *);
+typedef void (dviRenderer::*parseSpecials)(char *, TQ_UINT8 *);
struct drawinf {
struct framedata data;
@@ -85,9 +85,10 @@ struct drawinf {
class dviRenderer : public DocumentRenderer, bigEndianByteReader
{
Q_OBJECT
+ TQ_OBJECT
public:
- dviRenderer(TQWidget *parent);
+ dviRenderer(TQWidget *tqparent);
~dviRenderer();
virtual bool setFile(const TQString &fname, const KURL &base);
@@ -127,7 +128,7 @@ public:
void draw_page();
public slots:
- void exportPS(const TQString& fname = TQString::null, const TQString& options = TQString::null, KPrinter* printer = 0);
+ void exportPS(const TQString& fname = TQString(), const TQString& options = TQString(), KPrinter* printer = 0);
void exportPDF();
void showInfo();
@@ -136,7 +137,7 @@ public slots:
void embedPostScript();
void abortExternalProgramm();
- /** simply emits "setStatusBarText( TQString::null )". This is used
+ /** simply emits "setStatusBarText( TQString() )". This is used
in dviRenderer::mouseMoveEvent(), see the explanation there. */
void clearStatusBar();
@@ -179,7 +180,7 @@ private:
/* This method locates special PDF characters in a string and
replaces them by UTF8. See Section 3.2.3 of the PDF reference
guide for information */
- TQString PDFencodingToQString(const TQString& pdfstring);
+ TQString PDFencodingToTQString(const TQString& pdfstring);
void setResolution(double resolution_in_DPI);
@@ -190,9 +191,9 @@ private:
// @@@ explanation
void prescan(parseSpecials specialParser);
- void prescan_embedPS(char *cp, Q_UINT8 *);
- void prescan_removePageSizeInfo(char *cp, Q_UINT8 *);
- void prescan_parseSpecials(char *cp, Q_UINT8 *);
+ void prescan_embedPS(char *cp, TQ_UINT8 *);
+ void prescan_removePageSizeInfo(char *cp, TQ_UINT8 *);
+ void prescan_parseSpecials(char *cp, TQ_UINT8 *);
void prescan_ParsePapersizeSpecial(const TQString& cp);
void prescan_ParseBackgroundSpecial(const TQString& cp);
void prescan_ParseHTMLAnchorSpecial(const TQString& cp);
@@ -211,7 +212,7 @@ private:
/** Utility fields used by the embedPostScript method*/
KProgressDialog *embedPS_progress;
- Q_UINT16 embedPS_numOfProgressedFiles;
+ TQ_UINT16 embedPS_numOfProgressedFiles;
/** Shrink factor. Units are not quite clear */
double shrinkfactor;
@@ -291,7 +292,7 @@ private:
/** Data required for handling TPIC specials */
float penWidth_in_mInch;
TQPointArray TPIC_path;
- Q_UINT16 number_of_elements_in_path;
+ TQ_UINT16 number_of_elements_in_path;
struct drawinf currinf;
RenderedDocumentPage* currentlyDrawnPage;
diff --git a/kdvi/dviRenderer_draw.cpp b/kdvi/dviRenderer_draw.cpp
index 6983c372..af79b09a 100644
--- a/kdvi/dviRenderer_draw.cpp
+++ b/kdvi/dviRenderer_draw.cpp
@@ -235,8 +235,8 @@ void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch)
currinf.fonttable = &(currinf.fontp->vf_table);
currinf._virtual = currinf.fontp;
- Q_UINT8 *command_ptr_sav = command_pointer;
- Q_UINT8 *end_ptr_sav = end_pointer;
+ TQ_UINT8 *command_ptr_sav = command_pointer;
+ TQ_UINT8 *end_ptr_sav = end_pointer;
command_pointer = m->pos;
end_pointer = m->end;
draw_part(currinf.fontp->scaled_size_in_DVI_units*(dviFile->getCmPerDVIunit() * 1200.0 / 2.54)/16.0, true);
@@ -278,8 +278,8 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
kdDebug(4300) << "draw_part" << endl;
#endif
- Q_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0;
- Q_UINT8 ch;
+ TQ_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0;
+ TQ_UINT8 ch;
currinf.fontp = NULL;
currinf.set_char_p = &dviRenderer::set_no_char;
@@ -290,14 +290,14 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
(this->*currinf.set_char_p)(ch, ch);
} else
if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) {
- currinf.fontp = currinf.fonttable->find(ch - FNTNUM0);
+ currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0);
if (currinf.fontp == NULL) {
- errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0);
+ errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0);
return;
}
currinf.set_char_p = currinf.fontp->set_char_p;
} else {
- Q_INT32 a, b;
+ TQ_INT32 a, b;
switch (ch) {
case SET1:
@@ -453,7 +453,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
case DOWN3:
case DOWN4:
{
- Q_INT32 DDtmp = readINT(ch - DOWN1 + 1);
+ TQ_INT32 DDtmp = readINT(ch - DOWN1 + 1);
if ((is_vfmacro == false) &&
(currinf.fontp != 0) &&
(abs(DDtmp) >= 5*(currinf.fontp->scaled_size_in_DVI_units/6)) &&
@@ -511,7 +511,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
case FNT1:
case FNT2:
case FNT3:
- currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1));
+ currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1));
if (currinf.fontp == NULL) {
errorMsg = i18n("The DVI code referred to a font which was not previously defined.");
return;
@@ -520,7 +520,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
break;
case FNT4:
- currinf.fontp = currinf.fonttable->find(readINT(ch - FNT1 + 1));
+ currinf.fontp = currinf.fonttable->tqfind(readINT(ch - FNT1 + 1));
if (currinf.fontp == NULL) {
errorMsg = i18n("The DVI code referred to a font which was not previously defined.");
return;
@@ -553,8 +553,8 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
case FNTDEF4:
command_pointer += 12 + ch - FNTDEF1 + 1;
{
- Q_UINT8 tempa = readUINT8();
- Q_UINT8 tempb = readUINT8();
+ TQ_UINT8 tempa = readUINT8();
+ TQ_UINT8 tempb = readUINT8();
command_pointer += tempa + tempb;
}
break;
@@ -567,7 +567,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
break;
default:
- errorMsg = i18n("The unknown op-code %1 was encountered.").arg(ch);
+ errorMsg = i18n("The unknown op-code %1 was encountered.").tqarg(ch);
return;
} /* end switch*/
} /* end else (ch not a SETCHAR or FNTNUM) */
diff --git a/kdvi/dviRenderer_export.cpp b/kdvi/dviRenderer_export.cpp
index 7b875b45..2e862803 100644
--- a/kdvi/dviRenderer_export.cpp
+++ b/kdvi/dviRenderer_export.cpp
@@ -61,8 +61,8 @@ void dviRenderer::exportPDF()
// has been called meanwhile. See also the exportPS method.
if (proc != 0) {
// Make sure all further output of the programm is ignored
- qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
- qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
+ tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
+ tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
proc = 0;
}
@@ -94,33 +94,33 @@ void dviRenderer::exportPDF()
// Generate a suggestion for a reasonable file name
TQString suggestedName = dviFile->filename;
- suggestedName = suggestedName.left(suggestedName.find(".")) + ".pdf";
+ suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".pdf";
- TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), parentWidget, i18n("Export File As"));
+ TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), tqparentWidget, i18n("Export File As"));
if (fileName.isEmpty())
return;
TQFileInfo finfo(fileName);
if (finfo.exists()) {
- int r = KMessageBox::warningContinueCancel (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName),
+ int r = KMessageBox::warningContinueCancel (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName),
i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel)
return;
}
// Initialize the progress dialog
- progress = new fontProgressDialog( TQString::null,
+ progress = new fontProgressDialog( TQString(),
i18n("Using dvipdfm to export the file to PDF"),
- TQString::null,
+ TQString(),
i18n("KDVI is currently using the external program 'dvipdfm' to "
"convert your DVI-file to PDF. Sometimes that can take "
"a while because dvipdfm needs to generate its own bitmap fonts "
"Please be patient."),
i18n("Waiting for dvipdfm to finish..."),
- parentWidget, i18n("dvipdfm progress dialog"), false );
+ tqparentWidget, i18n("dvipdfm progress dialog"), false );
if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages );
- qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm()));
+ tqApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm()));
}
proc = new KShellProcess();
@@ -128,21 +128,21 @@ void dviRenderer::exportPDF()
kdError(4300) << "Could not allocate ShellProcess for the dvipdfm command." << endl;
return;
}
- qApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 );
+ tqApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 );
- qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *)));
+ tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
+ tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
+ tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *)));
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 "
"find in the File-Menu for a precise error report.</qt>") ;
- info->clear(i18n("Export: %1 to PDF").arg(KShellProcess::quote(dviFile->filename)));
+ info->clear(i18n("Export: %1 to PDF").tqarg(KShellProcess::quote(dviFile->filename)));
proc->clearArguments();
finfo.setFile(dviFile->filename);
- *proc << TQString("cd %1; dvipdfm").arg(KShellProcess::quote(finfo.dirPath(true)));
- *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
+ *proc << TQString("cd %1; dvipdfm").tqarg(KShellProcess::quote(finfo.dirPath(true)));
+ *proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName));
*proc << KShellProcess::quote(dviFile->filename);
proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) {
@@ -167,8 +167,8 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
// enough to ignore the exit status of the editor if another command
// has been called meanwhile. See also the exportPDF method.
if (proc != 0) {
- qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
- qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
+ tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
+ tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
proc = 0;
}
@@ -177,7 +177,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
return;
if (dviFile->numberOfExternalNONPSFiles != 0) {
- KMessageBox::sorry( parentWidget,
+ KMessageBox::sorry( tqparentWidget,
i18n("<qt><P>This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the "
"<strong>dvips</strong> program that KDVI uses interally to print or to export to PostScript. The functionality that "
"you require is therefore unavailable in this version of KDVI.</p>"
@@ -193,14 +193,14 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
if (fname.isEmpty()) {
// Generate a suggestion for a reasonable file name
TQString suggestedName = dviFile->filename;
- suggestedName = suggestedName.left(suggestedName.find(".")) + ".ps";
+ suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".ps";
- fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), parentWidget, i18n("Export File As"));
+ fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), tqparentWidget, i18n("Export File As"));
if (fileName.isEmpty())
return;
TQFileInfo finfo(fileName);
if (finfo.exists()) {
- int r = KMessageBox::warningYesNo (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName),
+ int r = KMessageBox::warningYesNo (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName),
i18n("Overwrite File"));
if (r == KMessageBox::No)
return;
@@ -211,19 +211,19 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
export_printer = printer;
// Initialize the progress dialog
- progress = new fontProgressDialog( TQString::null,
+ progress = new fontProgressDialog( TQString(),
i18n("Using dvips to export the file to PostScript"),
- TQString::null,
+ TQString(),
i18n("KDVI is currently using the external program 'dvips' to "
"convert your DVI-file to PostScript. Sometimes that can take "
"a while because dvips needs to generate its own bitmap fonts "
"Please be patient."),
i18n("Waiting for dvips to finish..."),
- parentWidget, i18n("dvips progress dialog"), false );
+ tqparentWidget, i18n("dvips progress dialog"), false );
if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages );
- qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm()));
+ tqApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm()));
}
// There is a major problem with dvips, at least 5.86 and lower: the
@@ -263,10 +263,10 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
newFile.renumber();
// Remove any page size information from the file
- Q_UINT16 currPageSav = current_page;
+ TQ_UINT16 currPageSav = current_page;
dvifile *dvsav = dviFile;
dviFile = &newFile;
- errorMsg = TQString::null;
+ errorMsg = TQString();
for(current_page=0; current_page < newFile.total_pages; current_page++) {
@@ -294,23 +294,23 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
return;
}
- qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *)));
+ tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
+ tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int)));
+ tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *)));
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 "
"find in the File-Menu for a precise error report.</qt>") ;
- info->clear(i18n("Export: %1 to PostScript").arg(KShellProcess::quote(dviFile->filename)));
+ info->clear(i18n("Export: %1 to PostScript").tqarg(KShellProcess::quote(dviFile->filename)));
proc->clearArguments();
TQFileInfo finfo(dviFile->filename);
- *proc << TQString("cd %1; dvips").arg(KShellProcess::quote(finfo.dirPath(true)));
+ *proc << TQString("cd %1; dvips").tqarg(KShellProcess::quote(finfo.dirPath(true)));
if (printer == 0)
*proc << "-z"; // export Hyperlinks
if (options.isEmpty() == false)
*proc << options;
- *proc << TQString("%1").arg(KShellProcess::quote(sourceFileName));
- *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
+ *proc << TQString("%1").tqarg(KShellProcess::quote(sourceFileName));
+ *proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName));
proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) {
kdError(4300) << "dvips failed to start" << endl;
@@ -341,7 +341,7 @@ void dviRenderer::dvips_terminated(KProcess *sproc)
// export_errorString, does not correspond to sproc. In that case,
// we ingore the return status silently.
if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0))
- KMessageBox::error( parentWidget, export_errorString );
+ KMessageBox::error( tqparentWidget, export_errorString );
if (export_printer != 0)
export_printer->printFiles( TQStringList(export_fileName), true );
@@ -359,7 +359,7 @@ void dviRenderer::editorCommand_terminated(KProcess *sproc)
// export_errorString, does not correspond to sproc. In that case,
// we ingore the return status silently.
if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0))
- KMessageBox::error( parentWidget, export_errorString );
+ KMessageBox::error( tqparentWidget, export_errorString );
// Let's hope that this is not all too nasty... killing a
// KShellProcess from a slot that was called from the KShellProcess
diff --git a/kdvi/dviRenderer_prescan.cpp b/kdvi/dviRenderer_prescan.cpp
index d0c35bbd..5ed49ebc 100644
--- a/kdvi/dviRenderer_prescan.cpp
+++ b/kdvi/dviRenderer_prescan.cpp
@@ -40,7 +40,7 @@ extern void parse_special_argument(const TQString& strg, const char* argument_na
//#define DEBUG_PRESCAN
-void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
+void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand)
{
#ifdef DEBUG_PRESCAN
kdDebug(4300) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
@@ -60,7 +60,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
// (already the simplifyWhiteSpace() above is wrong). If you have
// files like this, go away.
TQString EPSfilename = include_command;
- EPSfilename.truncate(EPSfilename.find(' '));
+ EPSfilename.truncate(EPSfilename.tqfind(' '));
// Strip enclosing quotation marks which are included by some LaTeX
// macro packages (but not by others). This probably means that
@@ -84,8 +84,8 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
TQString originalFName = EPSfilename;
- embedPS_progress->setLabel(i18n("Embedding %1").arg(EPSfilename));
- qApp->processEvents();
+ embedPS_progress->setLabel(i18n("Embedding %1").tqarg(EPSfilename));
+ tqApp->processEvents();
// Now locate the Gfx file on the hard disk...
@@ -97,14 +97,14 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
if (!TQFile::exists(EPSfilename)) {
// Find the number of the page
- Q_UINT32 currentOffset = beginningOfSpecialCommand - dviFile->dvi_Data();
- Q_UINT16 page;
+ TQ_UINT32 currentOffset = beginningOfSpecialCommand - dviFile->dvi_Data();
+ TQ_UINT16 page;
for(page=0; page < dviFile->total_pages; page++)
if ((dviFile->page_offset[page] <= currentOffset) && (currentOffset <= dviFile->page_offset[page+1]))
break;
- errorMsg += i18n("Page %1: The PostScript file <strong>%2</strong> could not be found.<br>").arg(page+1).arg(originalFName);
+ errorMsg += i18n("Page %1: The PostScript file <strong>%2</strong> could not be found.<br>").tqarg(page+1).tqarg(originalFName);
embedPS_progress->progressBar()->advance(1);
- qApp->processEvents();
+ tqApp->processEvents();
return;
}
@@ -118,7 +118,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
int angle = 0;
// just to avoid ambiguities; the filename could contain keywords
- include_command = include_command.mid(include_command.find(' '));
+ include_command = include_command.mid(include_command.tqfind(' '));
parse_special_argument(include_command, "llx=", &llx);
parse_special_argument(include_command, "lly=", &lly);
@@ -128,16 +128,16 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
parse_special_argument(include_command, "rhi=", &rhi);
parse_special_argument(include_command, "angle=", &angle);
- int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise
+ int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise
// Generate the PostScript commands to be included
- TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").arg(llx).arg(lly).arg(urx).arg(ury);
+ TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury);
if (rwi != 0)
- PS.append( TQString(" %1 @rwi").arg(rwi) );
+ PS.append( TQString(" %1 @rwi").tqarg(rwi) );
if (rhi != 0)
- PS.append( TQString(" %1 @rhi").arg(rhi) );
+ PS.append( TQString(" %1 @rhi").tqarg(rhi) );
if (angle != 0)
- PS.append( TQString(" %1 @angle").arg(angle) );
+ PS.append( TQString(" %1 @angle").tqarg(angle) );
if (clip != -1)
PS.append(" @clip");
PS.append( " @setspecial\n" );
@@ -156,13 +156,13 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
_isModified = true;
- Q_UINT32 lengthOfOldSpecial = command_pointer - beginningOfSpecialCommand;
- Q_UINT32 lengthOfNewSpecial = PS.length()+5;
+ TQ_UINT32 lengthOfOldSpecial = command_pointer - beginningOfSpecialCommand;
+ TQ_UINT32 lengthOfNewSpecial = PS.length()+5;
- TQMemArray<Q_UINT8> newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial);
+ TQMemArray<TQ_UINT8> newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial);
- Q_UINT8 *commandPtrSav = command_pointer;
- Q_UINT8 *endPtrSav = end_pointer;
+ TQ_UINT8 *commandPtrSav = command_pointer;
+ TQ_UINT8 *endPtrSav = end_pointer;
end_pointer = newDVI.data() + dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial;
memcpy(newDVI.data(), dviFile->dvi_Data(), beginningOfSpecialCommand-dviFile->dvi_Data());
command_pointer = newDVI.data()+(beginningOfSpecialCommand-dviFile->dvi_Data());
@@ -176,12 +176,12 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
// Adjust page pointers in the DVI file
dviFile->size_of_file = dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial;
end_pointer = newDVI.data() + dviFile->size_of_file;
- Q_UINT32 currentOffset = beginningOfSpecialCommand-dviFile->dvi_Data();
- for(Q_UINT16 i=0; i < dviFile->total_pages; i++) {
+ TQ_UINT32 currentOffset = beginningOfSpecialCommand-dviFile->dvi_Data();
+ for(TQ_UINT16 i=0; i < dviFile->total_pages; i++) {
if (dviFile->page_offset[i] > currentOffset) {
dviFile->page_offset[i] = dviFile->page_offset[i] + lengthOfNewSpecial-lengthOfOldSpecial;
command_pointer = dviFile->page_offset[i] + newDVI.data() + 4*10 + 1;
- Q_UINT32 a = readUINT32();
+ TQ_UINT32 a = readUINT32();
if (a > currentOffset) {
a = a + lengthOfNewSpecial-lengthOfOldSpecial;
command_pointer = dviFile->page_offset[i] + newDVI.data() + 4*10 + 1;
@@ -195,7 +195,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
dviFile->page_offset[dviFile->total_pages] = dviFile->beginning_of_postamble;
command_pointer = newDVI.data() + dviFile->beginning_of_postamble + 1;
- Q_UINT32 a = readUINT32();
+ TQ_UINT32 a = readUINT32();
if (a > currentOffset) {
a = a + lengthOfNewSpecial - lengthOfOldSpecial;
command_pointer = newDVI.data() + dviFile->beginning_of_postamble + 1;
@@ -219,12 +219,12 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
dviFile->setNewData(newDVI);
embedPS_progress->progressBar()->advance(1);
- qApp->processEvents();
+ tqApp->processEvents();
return;
}
-void dviRenderer::prescan_removePageSizeInfo(char *cp, Q_UINT8 *beginningOfSpecialCommand)
+void dviRenderer::prescan_removePageSizeInfo(char *cp, TQ_UINT8 *beginningOfSpecialCommand)
{
#ifdef DEBUG_PRESCAN
kdDebug(4300) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
@@ -234,7 +234,7 @@ void dviRenderer::prescan_removePageSizeInfo(char *cp, Q_UINT8 *beginningOfSpeci
if (strncasecmp(cp, "papersize=", 10) != 0)
return;
- for (Q_UINT8 *ptr=beginningOfSpecialCommand; ptr<command_pointer; ptr++)
+ for (TQ_UINT8 *ptr=beginningOfSpecialCommand; ptr<command_pointer; ptr++)
*ptr = NOP;
}
@@ -252,7 +252,7 @@ void dviRenderer::prescan_ParsePapersizeSpecial(const TQString& _cp)
dviFile->suggestedPageSize = new pageSize;
dviFile->suggestedPageSize->setPageSize(cp);
} else
- printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").arg(cp));
+ printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").tqarg(cp));
return;
}
@@ -262,7 +262,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp)
{
TQColor col = parseColorSpecification(cp.stripWhiteSpace());
if (col.isValid())
- for(Q_UINT16 page=current_page; page < dviFile->total_pages; page++)
+ for(TQ_UINT16 page=current_page; page < dviFile->total_pages; page++)
PS_interface->setBackgroundColor(page, col);
return;
}
@@ -271,7 +271,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp)
void dviRenderer::prescan_ParseHTMLAnchorSpecial(const TQString& _cp)
{
TQString cp = _cp;
- cp.truncate(cp.find('"'));
+ cp.truncate(cp.tqfind('"'));
Length l;
l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor));
anchorList[cp] = Anchor(current_page+1, l);
@@ -297,7 +297,7 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const TQString& cp)
}
if (TQFile::exists(_file))
- PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").arg(_file) );
+ PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").tqarg(_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_V = (currinf.data.dvi_v*300.0)/1200 - 300;
- PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) );
PostScriptOutPutString->append( " @beginspecial @setspecial \n" );
PostScriptOutPutString->append( cp );
PostScriptOutPutString->append( " @endspecial \n" );
@@ -355,15 +355,15 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp)
if (cp.startsWith("ps:SDict begin /product where{pop product(Distiller)"))
return; // hyperref tries to work around Distiller bug
if (cp.startsWith("ps:SDict begin [") && cp.endsWith(" pdfmark end")) { // hyperref definition of link/anchor/bookmark/etc
- if (cp.contains("/DEST")) { // The PostScript code defines an anchor
+ if (cp.tqcontains("/DEST")) { // The PostScript code defines an anchor
TQString anchorName = cp.section('(', 1, 1).section(')', 0, 0);
Length l;
l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor));
anchorList[anchorName] = Anchor(current_page+1, l);
}
// The PostScript code defines a bookmark
- if (cp.contains("/Dest") && cp.contains("/Title"))
- prebookmarks.append(PreBookmark(PDFencodingToQString(cp.section('(', 2, 2).section(')', 0, 0)),
+ if (cp.tqcontains("/Dest") && cp.tqcontains("/Title"))
+ prebookmarks.append(PreBookmark(PDFencodingToTQString(cp.section('(', 2, 2).section(')', 0, 0)),
cp.section('(', 1, 1).section(')', 0, 0),
cp.section('-', 1, 1).section(' ', 0, 0).toUInt()
));
@@ -374,18 +374,18 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp)
double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300;
double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300;
- if (cp.find("ps::[begin]", 0, false) == 0) {
- PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
- PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(11)) );
+ if (cp.tqfind("ps::[begin]", 0, false) == 0) {
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(11)) );
} else {
- if (cp.find("ps::[end]", 0, false) == 0) {
- PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(9)) );
+ if (cp.tqfind("ps::[end]", 0, false) == 0) {
+ PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(9)) );
} else {
- if (cp.find("ps::", 0, false) == 0) {
- PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(4)) );
+ if (cp.tqfind("ps::", 0, false) == 0) {
+ PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(4)) );
} else {
- PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
- PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(3)) );
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(3)) );
}
}
}
@@ -406,7 +406,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp)
// (already the simplifyWhiteSpace() above is wrong). If you have
// files like this, go away.
TQString EPSfilename = include_command;
- EPSfilename.truncate(EPSfilename.find(' '));
+ EPSfilename.truncate(EPSfilename.tqfind(' '));
// Strip enclosing quotation marks which are included by some LaTeX
// macro packages (but not by others). This probably means that
@@ -444,7 +444,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp)
int angle = 0;
// just to avoid ambiguities; the filename could contain keywords
- include_command = include_command.mid(include_command.find(' '));
+ include_command = include_command.mid(include_command.tqfind(' '));
parse_special_argument(include_command, "llx=", &llx);
parse_special_argument(include_command, "lly=", &lly);
@@ -454,27 +454,27 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp)
parse_special_argument(include_command, "rhi=", &rhi);
parse_special_argument(include_command, "angle=", &angle);
- int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise
+ int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise
if (TQFile::exists(EPSfilename)) {
double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300;
double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300;
- PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) );
PostScriptOutPutString->append( "@beginspecial " );
- PostScriptOutPutString->append( TQString(" %1 @llx").arg(llx) );
- PostScriptOutPutString->append( TQString(" %1 @lly").arg(lly) );
- PostScriptOutPutString->append( TQString(" %1 @urx").arg(urx) );
- PostScriptOutPutString->append( TQString(" %1 @ury").arg(ury) );
+ PostScriptOutPutString->append( TQString(" %1 @llx").tqarg(llx) );
+ PostScriptOutPutString->append( TQString(" %1 @lly").tqarg(lly) );
+ PostScriptOutPutString->append( TQString(" %1 @urx").tqarg(urx) );
+ PostScriptOutPutString->append( TQString(" %1 @ury").tqarg(ury) );
if (rwi != 0)
- PostScriptOutPutString->append( TQString(" %1 @rwi").arg(rwi) );
+ PostScriptOutPutString->append( TQString(" %1 @rwi").tqarg(rwi) );
if (rhi != 0)
- PostScriptOutPutString->append( TQString(" %1 @rhi").arg(rhi) );
+ PostScriptOutPutString->append( TQString(" %1 @rhi").tqarg(rhi) );
if (angle != 0)
- PostScriptOutPutString->append( TQString(" %1 @angle").arg(angle) );
+ PostScriptOutPutString->append( TQString(" %1 @angle").tqarg(angle) );
if (clip != -1)
PostScriptOutPutString->append(" @clip");
PostScriptOutPutString->append( " @setspecial \n" );
- PostScriptOutPutString->append( TQString(" (%1) run\n").arg(EPSfilename) );
+ PostScriptOutPutString->append( TQString(" (%1) run\n").tqarg(EPSfilename) );
PostScriptOutPutString->append( "@endspecial \n" );
}
@@ -490,11 +490,11 @@ void dviRenderer::prescan_ParseSourceSpecial(const TQString& cp)
// "src:123file.tex" to positions in the DVI file
// extract the file name and the numeral part from the string
- Q_UINT32 j;
+ TQ_UINT32 j;
for(j=0;j<cp.length();j++)
if (!cp.at(j).isNumber())
break;
- Q_UINT32 sourceLineNumber = cp.left(j).toUInt();
+ TQ_UINT32 sourceLineNumber = cp.left(j).toUInt();
TQFileInfo fi1(dviFile->filename);
TQString sourceFileName = TQFileInfo(fi1.dir(), cp.mid(j).stripWhiteSpace()).absFilePath();
Length l;
@@ -504,7 +504,7 @@ void dviRenderer::prescan_ParseSourceSpecial(const TQString& cp)
}
-void dviRenderer::prescan_parseSpecials(char *cp, Q_UINT8 *)
+void dviRenderer::prescan_parseSpecials(char *cp, TQ_UINT8 *)
{
TQString special_command(cp);
@@ -613,8 +613,8 @@ void dviRenderer::prescan(parseSpecials specialParser)
if (resolutionInDPI == 0.0)
setResolution(100);
- Q_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0;
- Q_UINT8 ch;
+ TQ_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0;
+ TQ_UINT8 ch;
double fontPixelPerDVIunit = dviFile->getCmPerDVIunit() * 1200.0/2.54;
stack.clear();
@@ -631,9 +631,9 @@ void dviRenderer::prescan(parseSpecials specialParser)
}
if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) {
- currinf.fontp = currinf.fonttable->find(ch - FNTNUM0);
+ currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0);
if (currinf.fontp == NULL) {
- errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0);
+ errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0);
return;
}
currinf.set_char_p = currinf.fontp->set_char_p;
@@ -641,7 +641,7 @@ void dviRenderer::prescan(parseSpecials specialParser)
}
- Q_INT32 a, b;
+ TQ_INT32 a, b;
switch (ch) {
case SET1:
@@ -718,7 +718,7 @@ void dviRenderer::prescan(parseSpecials specialParser)
case DOWN3:
case DOWN4:
{
- Q_INT32 DDtmp = readINT(ch - DOWN1 + 1);
+ TQ_INT32 DDtmp = readINT(ch - DOWN1 + 1);
currinf.data.dvi_v += ((long) (DDtmp * 65536.0*fontPixelPerDVIunit))/65536;
currinf.data.pxl_v = int(currinf.data.dvi_v/shrinkfactor);
}
@@ -750,7 +750,7 @@ void dviRenderer::prescan(parseSpecials specialParser)
case FNT2:
case FNT3:
case FNT4:
- currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1));
+ currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1));
if (currinf.fontp == NULL)
return;
currinf.set_char_p = currinf.fontp->set_char_p;
@@ -761,7 +761,7 @@ void dviRenderer::prescan(parseSpecials specialParser)
case XXX3:
case XXX4:
{
- Q_UINT8 *beginningOfSpecialCommand = command_pointer-1;
+ TQ_UINT8 *beginningOfSpecialCommand = command_pointer-1;
a = readUINT(ch - XXX1 + 1);
if (a > 0) {
char *cmd = new char[a+1];
diff --git a/kdvi/dviWidget.cpp b/kdvi/dviWidget.cpp
index ddcac8e6..321f0f57 100644
--- a/kdvi/dviWidget.cpp
+++ b/kdvi/dviWidget.cpp
@@ -22,8 +22,8 @@
#include "renderedDviPagePixmap.h"
#include "selection.h"
-DVIWidget::DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name)
- : DocumentWidget(parent, sv, cache, name)
+DVIWidget::DVIWidget(TQWidget* tqparent, PageView* sv, DocumentPageCache* cache, const char* name)
+ : DocumentWidget(tqparent, sv, cache, name)
{
}
@@ -45,7 +45,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e)
// Check if the mouse is pressed on a source-hyperlink
// source hyperlinks can be invoked with the Middle Mousebutton or alternatively
// with Control+Left Mousebutton
- if ((e->button() == MidButton || (e->button() == LeftButton && (e->state() & ControlButton)))
+ if ((e->button() == Qt::MidButton || (e->button() == Qt::LeftButton && (e->state() & ControlButton)))
&& (pageData->sourceHyperLinkList.size() > 0))
{
int minIndex = 0;
@@ -53,7 +53,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e)
for(unsigned int i=0; i<pageData->sourceHyperLinkList.size(); i++)
{
- if (pageData->sourceHyperLinkList[i].box.contains(e->pos()))
+ if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos()))
{
emit(SRCLink(pageData->sourceHyperLinkList[i].linkText, e, this));
e->accept();
@@ -74,7 +74,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e)
e->accept();
}
- // Call implementation from parent
+ // Call implementation from tqparent
DocumentWidget::mousePressEvent(e);
}
@@ -99,7 +99,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e)
// Check if the cursor hovers over a sourceHyperlink.
for(unsigned int i=0; i<pageData->sourceHyperLinkList.size(); i++) {
- if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) {
+ if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) {
clearStatusBarTimer.stop();
// The macro-package srcltx gives a special like "src:99 test.tex"
@@ -112,7 +112,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e)
if (cp[i].isDigit() == false)
break;
- emit setStatusBarText( i18n("line %1 of %2").arg(cp.left(i)).arg(cp.mid(i).simplifyWhiteSpace()) );
+ emit setStatusBarText( i18n("line %1 of %2").tqarg(cp.left(i)).tqarg(cp.mid(i).simplifyWhiteSpace()) );
return;
}
}
diff --git a/kdvi/dviWidget.h b/kdvi/dviWidget.h
index 5867b39e..864bb526 100644
--- a/kdvi/dviWidget.h
+++ b/kdvi/dviWidget.h
@@ -23,9 +23,10 @@ class textSelection;
class DVIWidget : public DocumentWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name);
+ DVIWidget(TQWidget* tqparent, PageView* sv, DocumentPageCache* cache, const char* name);
signals:
void SRCLink(const TQString&, TQMouseEvent* e, DocumentWidget*);
diff --git a/kdvi/dvisourcesplitter.cpp b/kdvi/dvisourcesplitter.cpp
index e0d17aa1..baa0269a 100644
--- a/kdvi/dvisourcesplitter.cpp
+++ b/kdvi/dvisourcesplitter.cpp
@@ -31,7 +31,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const TQString &srclink, const TQ
if ( filepart.left(4) == "src:" ) filepart = srclink.mid(4);
//split first
- Q_UINT32 max = filepart.length(), i = 0;
+ TQ_UINT32 max = filepart.length(), i = 0;
for(i=0; i<max; ++i) if ( !filepart[i].isDigit()) break;
linepart = filepart.left(i);
filepart = filepart.mid(i);
@@ -62,7 +62,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const TQString &srclink, const TQ
{
TQFileInfo tempInfo(m_fileInfo);
TQString tempFileName = tempInfo.fileName();
- Q_UINT32 index, maxindex = linepart.length();
+ TQ_UINT32 index, maxindex = linepart.length();
bool found = false;
for ( index = 1; index < maxindex; ++index)
{
diff --git a/kdvi/dvisourcesplitter.h b/kdvi/dvisourcesplitter.h
index 5253ce4a..35b84e7a 100644
--- a/kdvi/dvisourcesplitter.h
+++ b/kdvi/dvisourcesplitter.h
@@ -24,11 +24,11 @@ public:
TQString filePath() { return m_fileInfo.absFilePath(); }
bool fileExists() { return m_fileInfo.exists(); }
- Q_UINT32 line() { return m_line; }
+ TQ_UINT32 line() { return m_line; }
private:
TQFileInfo m_fileInfo;
- Q_UINT32 m_line;
+ TQ_UINT32 m_line;
bool m_exists;
};
#endif
diff --git a/kdvi/examples/dvistd0.dvi b/kdvi/examples/dvistd0.dvi
index ef73e604..654b617b 100644
--- a/kdvi/examples/dvistd0.dvi
+++ b/kdvi/examples/dvistd0.dvi
Binary files differ
diff --git a/kdvi/fontEncoding.cpp b/kdvi/fontEncoding.cpp
index 9f2d4de2..62905030 100644
--- a/kdvi/fontEncoding.cpp
+++ b/kdvi/fontEncoding.cpp
@@ -36,7 +36,7 @@ fontEncoding::fontEncoding(const TQString &encName)
encFileName = encFileName.stripWhiteSpace();
if (encFileName.isEmpty()) {
- kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl;
+ kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").tqarg(encName) << endl;
return;
}
@@ -76,7 +76,7 @@ fontEncoding::fontEncoding(const TQString &encName)
for(; i<256; i++)
glyphNameVector[i] = ".notdef";
} else {
- kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl;
+ kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").tqarg(encFileName) << endl;
return;
}
diff --git a/kdvi/fontEncoding.h b/kdvi/fontEncoding.h
index 8ce0d18b..b70cfdc5 100644
--- a/kdvi/fontEncoding.h
+++ b/kdvi/fontEncoding.h
@@ -20,7 +20,7 @@
* 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
* then locate the associated PK font file (e.g. cmr10.600pk), load
- * it, and retrieve the character shaped.
+ * it, and retrieve the character tqshaped.
*
* 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
@@ -48,7 +48,7 @@
* a different name and with a different encoding ---the map file
* (fontMap.h) can probably see to that.
*
- * Summing up: this class contains 256 glyph names read from an
+ * Summing up: this class tqcontains 256 glyph names read from an
* encoding file during the construction of this class.
*
* @author Stefan Kebekus <kebekus@kde.org>
diff --git a/kdvi/fontEncodingPool.cpp b/kdvi/fontEncodingPool.cpp
index 59b38167..4c00256f 100644
--- a/kdvi/fontEncodingPool.cpp
+++ b/kdvi/fontEncodingPool.cpp
@@ -18,7 +18,7 @@ fontEncodingPool::fontEncodingPool()
fontEncoding *fontEncodingPool::findByName(const TQString &name)
{
- fontEncoding *ptr = dictionary.find( name );
+ fontEncoding *ptr = dictionary.tqfind( name );
if (ptr == 0) {
ptr = new fontEncoding(name);
diff --git a/kdvi/fontMap.cpp b/kdvi/fontMap.cpp
index 66d230d7..b285018b 100644
--- a/kdvi/fontMap.cpp
+++ b/kdvi/fontMap.cpp
@@ -26,7 +26,7 @@ fontMap::fontMap()
// has, like kdvi (and unlike dvips), no built-in fonts.
// Finding ps2pk.map is not easy. In teTeX < 3.0, the kpsewhich
- // program REQUIRES the option "--format=dvips config". In teTeX =
+ // program RETQUIRES the option "--format=dvips config". In teTeX =
// 3.0, the option "--format=map" MUST be used. Since there is no
// way to give both options at the same time, there is seemingly no
// other way than to try both options one after another. We use the
@@ -78,7 +78,7 @@ fontMap::fontMap()
encodingName = encodingName.mid(1);
double slant = 0.0;
- int i = line.find("SlantFont");
+ int i = line.tqfind("SlantFont");
if (i >= 0) {
bool ok;
slant = line.left(i).section(' ', -1, -1 ,TQString::SectionSkipEmpty).toDouble(&ok);
@@ -94,11 +94,11 @@ fontMap::fontMap()
if (encodingName.endsWith(".enc"))
entry.fontEncoding = encodingName;
else
- entry.fontEncoding = TQString::null;
+ entry.fontEncoding = TQString();
}
file.close();
} else
- kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl;
+ kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").tqarg(map_fileName) << endl;
#ifdef DEBUG_FONTMAP
kdDebug(4300) << "FontMap file parsed. Results:" << endl;
@@ -115,40 +115,40 @@ fontMap::fontMap()
const TQString &fontMap::findFileName(const TQString &TeXName)
{
- TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName);
if (it != fontMapEntries.end())
return it.data().fontFileName;
else
- return TQString::null;
+ return TQString();
}
const TQString &fontMap::findFontName(const TQString &TeXName)
{
- TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName);
if (it != fontMapEntries.end())
return it.data().fullFontName;
else
- return TQString::null;
+ return TQString();
}
const TQString &fontMap::findEncoding(const TQString &TeXName)
{
- TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName);
if (it != fontMapEntries.end())
return it.data().fontEncoding;
else
- return TQString::null;
+ return TQString();
}
double fontMap::findSlant(const TQString &TeXName)
{
- TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName);
if (it != fontMapEntries.end())
return it.data().slant;
diff --git a/kdvi/fontMap.h b/kdvi/fontMap.h
index 3e0177a8..6a719ea6 100644
--- a/kdvi/fontMap.h
+++ b/kdvi/fontMap.h
@@ -13,7 +13,7 @@
#include <tqstring.h>
/**
- * This class represents one line of a font map file, and contains
+ * This class represents one line of a font map file, and tqcontains
* three pieces of information about a font: its file name, the full
* name of the font, and the encoding.
*
@@ -55,7 +55,7 @@ class fontMapEntry {
* 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
* 'cmr10'. The DVI previewer would then locate the associated PK font
- * file, load it, and retrieve the character shaped. Happy times, they
+ * file, load it, and retrieve the character tqshaped. Happy times, they
* were.
*
* Today TeX is also used to access Type1 and TrueType fonts, which do
@@ -92,17 +92,17 @@ class fontMap {
/** find the name of a font file (e.g. 'ubkd8a.pfb') from a TeX font
name (e.g. 'rpbkd'). This method return a reference to
- TQString::null if the font could not be found. */
+ TQString() if the font could not be found. */
const TQString &findFileName(const TQString &TeXName);
/** find the name of a font (e.g. 'URWBookmanL-DemiBold') from a TeX
font name (e.g. 'rpbkd'). This method return a reference to
- TQString::null if the font could not be found. */
+ TQString() if the font could not be found. */
const TQString &findFontName(const TQString &TeXName);
/** find the name of an encoding file for a font (e.g. '8r') from a
TeX font name (e.g. 'rpbkd'). This method return a reference to
- TQString::null if the font could not be found. */
+ TQString() if the font could not be found. */
const TQString &findEncoding(const TQString &TeXName);
/** This method finds the slant of a font. Returns 0.0 if no slant
diff --git a/kdvi/fontpool.cpp b/kdvi/fontpool.cpp
index fecd2b0b..32b75afd 100644
--- a/kdvi/fontpool.cpp
+++ b/kdvi/fontpool.cpp
@@ -46,7 +46,7 @@ fontPool::fontPool()
i18n( "KDVI is currently generating bitmap fonts..." ),
i18n( "Aborts the font generation. Don't do this." ),
i18n( "KDVI is currently generating bitmap fonts which are needed to display your document. "
- "For this, KDVI uses a number of external programs, such as MetaFont. You can find "
+ "For this, KDVI uses a number of external programs, such as MetaFont. You can tqfind "
"the output of these programs later in the document info dialog." ),
i18n( "KDVI is generating fonts. Please wait." ),
0 )
@@ -60,7 +60,7 @@ fontPool::fontPool()
displayResolution_in_dpi = 100.0; // A not-too-bad-default
useFontHints = true;
CMperDVIunit = 0;
- extraSearchPath = TQString::null;
+ extraSearchPath = TQString();
fontList.setAutoDelete(true);
@@ -77,30 +77,30 @@ fontPool::fontPool()
// pixmaps. Experiments show that --depending of the configuration
// of QT at compile and runtime or the availability of the XFt
// extension, alpha channels are either supported, or silently
- // converted to 1-bit masks.
+ // converted to 1-bit tqmasks.
TQImage start(1, 1, 32); // Generate a 1x1 image, black with alpha=0x10
start.setAlphaBuffer(true);
- Q_UINT32 *destScanLine = (Q_UINT32 *)start.scanLine(0);
+ TQ_UINT32 *destScanLine = (TQ_UINT32 *)start.scanLine(0);
*destScanLine = 0x80000000;
TQPixmap intermediate(start);
TQPixmap dest(1,1);
- dest.fill(Qt::white);
+ dest.fill(TQt::white);
TQPainter paint( &dest );
paint.drawPixmap(0, 0, intermediate);
paint.end();
start = dest.convertToImage().convertDepth(32);
- Q_UINT8 result = *(start.scanLine(0)) & 0xff;
+ TQ_UINT8 result = *(start.scanLine(0)) & 0xff;
if ((result == 0xff) || (result == 0x00)) {
#ifdef DEBUG_FONTPOOL
kdDebug(4300) << "fontPool::fontPool(): TQPixmap does not support the alpha channel" << endl;
#endif
- QPixmapSupportsAlpha = false;
+ TQPixmapSupportsAlpha = false;
} else {
#ifdef DEBUG_FONTPOOL
kdDebug(4300) << "fontPool::fontPool(): TQPixmap supports the alpha channel" << endl;
#endif
- QPixmapSupportsAlpha = true;
+ TQPixmapSupportsAlpha = true;
}
}
@@ -137,7 +137,7 @@ void fontPool::setParameters( bool _useFontHints )
}
-TeXFontDefinition* fontPool::appendx(const TQString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement)
+TeXFontDefinition* fontPool::appendx(const TQString& fontname, TQ_UINT32 checksum, TQ_UINT32 scale, double enlargement)
{
// Reuse font if possible: check if a font with that name and
// natural resolution is already in the fontpool, and use that, if
@@ -187,12 +187,12 @@ TQString fontPool::status()
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>")
- .arg(i18n("TeX Name"))
- .arg(i18n("Family"))
- .arg(i18n("Zoom"))
- .arg(i18n("Type"))
- .arg(i18n("Encoding"))
- .arg(i18n("Comment")) );
+ .tqarg(i18n("TeX Name"))
+ .tqarg(i18n("Family"))
+ .tqarg(i18n("Zoom"))
+ .tqarg(i18n("Type"))
+ .tqarg(i18n("Encoding"))
+ .tqarg(i18n("Comment")) );
TeXFontDefinition *fontp = fontList.first();
while ( fontp != 0 ) {
@@ -210,12 +210,12 @@ TQString fontPool::status()
#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>")
- .arg(fontp->fontname)
- .arg(fontp->getFullFontName())
- .arg((int)(fontp->enlargement*100 + 0.5))
- .arg(fontp->getFontTypeName())
- .arg(encoding)
- .arg(errMsg);
+ .tqarg(fontp->fontname)
+ .tqarg(fontp->getFullFontName())
+ .tqarg((int)(fontp->enlargement*100 + 0.5))
+ .tqarg(fontp->getFontTypeName())
+ .tqarg(encoding)
+ .tqarg(errMsg);
#endif
fontp=fontList.next();
@@ -252,7 +252,7 @@ bool fontPool::areFontsLocated()
void fontPool::locateFonts()
{
- kpsewhichOutput = TQString::null;
+ kpsewhichOutput = TQString();
// First, we try and find those fonts which exist on disk
// already. If virtual fonts are found, they will add new fonts to
@@ -280,7 +280,7 @@ void fontPool::locateFonts()
// present an error message to the user.
if (!areFontsLocated()) {
markFontsAsLocated();
- TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
+ TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").tqarg(getenv("PATH")).tqarg(kpsewhichOutput);
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. "
"Your document might be unreadable.</p></qt>"),
@@ -304,7 +304,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// If PK fonts are generated, the kpsewhich command will re-route
// the output of MetaFont into its stderr. Here we make sure this
// output is intercepted and parsed.
- qApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ tqApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
this, TQT_SLOT(mf_output_receiver(KProcess *, char *, int)));
@@ -323,24 +323,24 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
shellProcessCmdLine += "--no-mktex pk";
// Names of fonts that shall be located
- Q_UINT16 numFontsInJob = 0;
+ TQ_UINT16 numFontsInJob = 0;
TeXFontDefinition *fontp = fontList.first();
while ( fontp != 0 ) {
if (!fontp->isLocated()) {
numFontsInJob++;
if (locateTFMonly == true)
- shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").arg(fontp->fontname));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").tqarg(fontp->fontname));
else {
#ifdef HAVE_FREETYPE
if (FreeType_could_be_loaded == true) {
const TQString &filename = fontsByTeXName.findFileName(fontp->fontname);
if (!filename.isEmpty())
- shellProcessCmdLine += KShellProcess::quote(TQString("%1").arg(filename));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1").tqarg(filename));
}
#endif
- shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").arg(fontp->fontname));
- shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").arg(fontp->fontname));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").tqarg(fontp->fontname));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").tqarg(fontp->fontname));
}
}
fontp=fontList.next();
@@ -352,7 +352,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
progress.setTotalSteps(numFontsInJob, &kpsewhichIO);
// Now run... kpsewhich. In case of error, kick up a fuss.
- MetafontOutput = TQString::null;
+ MetafontOutput = TQString();
kpsewhichOutput += "<p><b>"+shellProcessCmdLine.join(" ")+"</b></p>";
kpsewhichIO << shellProcessCmdLine;
TQString importanceOfKPSEWHICH = i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files "
@@ -363,7 +363,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
"and your document might by unreadable. If this error is reproducable "
"please report the issue to the KDVI developers using the 'Help' menu.<p>" );
TQApplication::restoreOverrideCursor();
- KMessageBox::error( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg),
+ KMessageBox::error( 0, TQString("<qt>%1%2</qt>").tqarg(importanceOfKPSEWHICH).tqarg(msg),
i18n("Problem locating fonts - KDVI") );
markFontsAsLocated();
return;
@@ -374,7 +374,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// updated. This is important, e.g. for the progress dialog that is
// shown when PK fonts are generated by MetaFont.
while(kpsewhichIO.wait(1) == false)
- qApp->processEvents();
+ tqApp->processEvents();
progress.hide();
// Handle fatal errors.
@@ -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). "
"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>");
- TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
+ TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").tqarg(getenv("PATH")).tqarg(kpsewhichOutput);
- KMessageBox::detailedError( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg), details,
+ KMessageBox::detailedError( 0, TQString("<qt>%1%2</qt>").tqarg(importanceOfKPSEWHICH).tqarg(msg), details,
i18n("Problem locating fonts - KDVI") );
// This makes sure the we don't try to run kpsewhich again
markFontsAsLocated();
@@ -558,36 +558,36 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen)
// We'd like to print only full lines of text.
int numleft;
bool show_prog = false;
- while( (numleft = MetafontOutput.find('\n')) != -1) {
+ while( (numleft = MetafontOutput.tqfind('\n')) != -1) {
TQString line = MetafontOutput.left(numleft+1);
#ifdef DEBUG_FONTPOOL
kdDebug(4300) << "MF OUTPUT RECEIVED: " << line;
#endif
// Search for a line which marks the beginning of a MetaFont run
// and show the progress dialog at the end of this method.
- if (line.find("kpathsea:") == 0)
+ if (line.tqfind("kpathsea:") == 0)
show_prog = true;
// If the Output of the kpsewhich program contains a line starting
// with "kpathsea:", this means that a new MetaFont-run has been
// started. We filter these lines out and update the display
// accordingly.
- int startlineindex = line.find("kpathsea:");
+ int startlineindex = line.tqfind("kpathsea:");
if (startlineindex != -1) {
- int endstartline = line.find("\n",startlineindex);
+ int endstartline = line.tqfind("\n",startlineindex);
TQString startLine = line.mid(startlineindex,endstartline-startlineindex);
// The last word in the startline is the name of the font which we
// are generating. The second-to-last word is the resolution in
// dots per inch. Display this info in the text label below the
// progress bar.
- int lastblank = startLine.findRev(' ');
+ int lastblank = startLine.tqfindRev(' ');
TQString fontName = startLine.mid(lastblank+1);
- int secondblank = startLine.findRev(' ',lastblank-1);
+ int secondblank = startLine.tqfindRev(' ',lastblank-1);
TQString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1);
progress.show();
- progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").arg(fontName).arg(dpi) );
+ progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").tqarg(fontName).tqarg(dpi) );
}
MetafontOutput = MetafontOutput.remove(0,numleft+1);
}
diff --git a/kdvi/fontpool.h b/kdvi/fontpool.h
index 3edcaffe..753f95e1 100644
--- a/kdvi/fontpool.h
+++ b/kdvi/fontpool.h
@@ -38,6 +38,7 @@ class KShellProcess;
class fontPool : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
// Default constructor.
@@ -78,7 +79,7 @@ public:
// called. Since this is done using a concurrently running process,
// there is no guarantee that the loading is already performed when
// the method returns.
- TeXFontDefinition* appendx(const TQString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement);
+ TeXFontDefinition* appendx(const TQString& fontname, TQ_UINT32 checksum, TQ_UINT32 scale, double enlargement);
// Returns a string in a very basic HTML format which describes the
// fonts in the pool.
@@ -124,10 +125,10 @@ public:
channel of pixmaps. Experiments show that --depending of the
configuration of QT at compile and runtime or the availability
of the XFt extension, alpha channels are either supported, or
- silently converted to 1-bit masks. The redering routines in the
+ silently converted to 1-bit tqmasks. The redering routines in the
TeXFont implementation use this flag to choose the apropriate
drawing routines for the different setups. */
- bool QPixmapSupportsAlpha;
+ bool TQPixmapSupportsAlpha;
signals:
/** Passed through to the top-level kpart. */
@@ -178,13 +179,13 @@ private:
void locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFound=0);
// This TQString is used internally by the mf_output_receiver()
- // method. This string is set to TQString::null in locateFonts(bool,
+ // method. This string is set to TQString() in locateFonts(bool,
// bool, bool *). Values are set and read by the
// mf_output_receiver(...) method
TQString MetafontOutput;
// This TQString is used to collect the output of kpsewhich and
- // MetaFont. The string is set to TQString::null in the
+ // MetaFont. The string is set to TQString() in the
// locateFonts()-method, and content is gathered by the
// mf_output_receiver(). This string is used by locateFonts() and
// locateFonts(bool, bool, bool *) to display error messages.
diff --git a/kdvi/fontprogress.cpp b/kdvi/fontprogress.cpp
index e5e34270..19fe63cd 100644
--- a/kdvi/fontprogress.cpp
+++ b/kdvi/fontprogress.cpp
@@ -22,11 +22,11 @@
#include <tqvbox.h>
/*
- * Constructs a fontProgressDialog which is a child of 'parent', with the
+ * Constructs a fontProgressDialog which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*/
-fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, TQWidget* parent, const TQString& name, bool progressbar)
- : KDialogBase( parent, "Font Generation Progress Dialog", true, name, Cancel, Cancel, true )
+fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, TQWidget* tqparent, const TQString& name, bool progressbar)
+ : KDialogBase( tqparent, "Font Generation Progress Dialog", true, name, Cancel, Cancel, true )
{
setCursor( TQCursor( 3 ) );
@@ -42,7 +42,7 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString
TQVBox *page = makeVBoxMainWidget();
TextLabel1 = new TQLabel( label, page, "TextLabel2" );
- TextLabel1->setAlignment( int( TQLabel::AlignCenter ) );
+ TextLabel1->tqsetAlignment( int( TQLabel::AlignCenter ) );
TQWhatsThis::add( TextLabel1, whatsThis );
TQToolTip::add( TextLabel1, ttip );
@@ -55,13 +55,13 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString
ProgressBar1 = NULL;
TextLabel2 = new TQLabel( "", page, "TextLabel2" );
- TextLabel2->setAlignment( int( TQLabel::AlignCenter ) );
+ TextLabel2->tqsetAlignment( int( TQLabel::AlignCenter ) );
TQWhatsThis::add( TextLabel2, whatsThis );
TQToolTip::add( TextLabel2, ttip );
progress = 0;
procIO = 0;
- qApp->connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(killProcIO()));
+ tqApp->connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(killProcIO()));
}
@@ -71,7 +71,7 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString
fontProgressDialog::~fontProgressDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
diff --git a/kdvi/fontprogress.h b/kdvi/fontprogress.h
index 6f4267cc..6c19520c 100644
--- a/kdvi/fontprogress.h
+++ b/kdvi/fontprogress.h
@@ -31,10 +31,11 @@ class TQLabel;
class fontProgressDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
fontProgressDialog( const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip,
- TQWidget* parent = 0, const TQString &name = 0, bool progressbar=true );
+ TQWidget* tqparent = 0, const TQString &name = 0, bool progressbar=true );
~fontProgressDialog();
/** The number of steps already done is increased, the text received
@@ -43,7 +44,7 @@ public:
/** Used to initialize the progress bar. If the argument proc is
non-zero, the associated process will be killed when the "abort"
- button is pressed. The FontProgress uses a QGuarderPtr
+ button is pressed. The FontProgress uses a TQGuarderPtr
internally, so it is save to delete the KProcIO anytime. */
void setTotalSteps(int, KProcIO *proc=0);
diff --git a/kdvi/glyph.h b/kdvi/glyph.h
index 65f86327..2265c6df 100644
--- a/kdvi/glyph.h
+++ b/kdvi/glyph.h
@@ -8,8 +8,8 @@
struct bitmap {
- Q_UINT16 w, h; /* width and height in pixels */
- Q_UINT16 bytes_wide; /* scan-line width in bytes */
+ TQ_UINT16 w, h; /* width and height in pixels */
+ TQ_UINT16 bytes_wide; /* scan-line width in bytes */
char *bits; /* pointer to the bits */
};
@@ -24,7 +24,7 @@ class glyph {
TQColor color;
// DVI units to move reference point
- Q_INT32 dvi_advance_in_units_of_design_size_by_2e20;
+ TQ_INT32 dvi_advance_in_units_of_design_size_by_2e20;
// x and y offset in pixels
short x, y;
diff --git a/kdvi/infodialog.cpp b/kdvi/infodialog.cpp
index 91de53d3..b287a390 100644
--- a/kdvi/infodialog.cpp
+++ b/kdvi/infodialog.cpp
@@ -21,8 +21,8 @@
#include "fontpool.h"
#include "infodialog.h"
-infoDialog::infoDialog( TQWidget* parent )
- : KDialogBase( Tabbed, i18n("Document Info"), Ok, Ok, parent, "Document Info", false, false)
+infoDialog::infoDialog( TQWidget* tqparent )
+ : KDialogBase( Tabbed, i18n("Document Info"), Ok, Ok, tqparent, "Document Info", false, false)
{
TQFrame *page1 = addPage( i18n("DVI File") );
TQVBoxLayout *topLayout1 = new TQVBoxLayout( page1, 0, 6 );
@@ -51,8 +51,8 @@ infoDialog::infoDialog( TQWidget* parent )
topLayout3->addWidget( TextLabel3 );
MFOutputReceived = false;
- headline = TQString::null;
- pool = TQString::null;
+ headline = TQString();
+ pool = TQString();
}
@@ -64,17 +64,17 @@ void infoDialog::setDVIData(dvifile *dviFile)
text = i18n("There is no DVI file loaded at the moment.");
else {
text.append("<table WIDTH=\"100%\" NOSAVE >");
- text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Filename")).arg(dviFile->filename));
+ text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("Filename")).tqarg(dviFile->filename));
TQFile file(dviFile->filename);
if (file.exists())
- text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("File Size")).arg(KIO::convertSize(file.size())));
+ text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("File Size")).tqarg(KIO::convertSize(file.size())));
else
- 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>%1</td></tr>").tqarg(i18n("The file does no longer exist.")));
text.append(TQString("<tr><td><b> </b></td> <td> </td></tr>"));
- 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>").arg(i18n("Generator/Date")).arg(dviFile->generatorString));
+ 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>").tqarg(i18n("Generator/Date")).tqarg(dviFile->generatorString));
} // else (dviFile == NULL)
TextLabel1->setText( text );
@@ -89,17 +89,17 @@ void infoDialog::setFontInfo(fontPool *fp)
void infoDialog::outputReceiver(const TQString& _op)
{
TQString op = _op;
- op = op.replace( TQRegExp("<"), "&lt;" );
+ op = op.tqreplace( TQRegExp("<"), "&lt;" );
if (MFOutputReceived == false) {
TextLabel3->setText("<b>"+headline+"</b><br>");
- headline = TQString::null;
+ headline = TQString();
}
// It seems that the TQTextView wants that we append only full lines.
// We see to that.
pool = pool+op;
- int idx = pool.findRev("\n");
+ int idx = pool.tqfindRev("\n");
while(idx != -1) {
TQString line = pool.left(idx);
@@ -108,9 +108,9 @@ void infoDialog::outputReceiver(const TQString& _op)
// If the Output of the kpsewhich program contains a line starting
// with "kpathsea:", this means that a new MetaFont-run has been
// started. We filter these lines out and print them in boldface.
- int startlineindex = line.find("kpathsea:");
+ int startlineindex = line.tqfind("kpathsea:");
if (startlineindex != -1) {
- int endstartline = line.find("\n",startlineindex);
+ int endstartline = line.tqfind("\n",startlineindex);
TQString startLine = line.mid(startlineindex,endstartline-startlineindex);
if (MFOutputReceived)
TextLabel3->append("<hr>\n<b>"+startLine+"</b>");
@@ -119,7 +119,7 @@ void infoDialog::outputReceiver(const TQString& _op)
TextLabel3->append(line.mid(endstartline));
} else
TextLabel3->append(line);
- idx = pool.findRev("\n");
+ idx = pool.tqfindRev("\n");
}
MFOutputReceived = true;
@@ -128,7 +128,7 @@ void infoDialog::outputReceiver(const TQString& _op)
void infoDialog::clear(const TQString& op)
{
headline = op;
- pool = TQString::null;
+ pool = TQString();
MFOutputReceived = false;
}
#include "infodialog.moc"
diff --git a/kdvi/infodialog.h b/kdvi/infodialog.h
index 8b3ea7d2..d7f37e56 100644
--- a/kdvi/infodialog.h
+++ b/kdvi/infodialog.h
@@ -20,9 +20,10 @@ class TQWidget;
class infoDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- infoDialog( TQWidget* parent = 0 );
+ infoDialog( TQWidget* tqparent = 0 );
/** This method is used to set the data coming from the DVI
file. Note that 0 is a permissible argument, that just means:
diff --git a/kdvi/kdvi_multipage.cpp b/kdvi/kdvi_multipage.cpp
index 8a7b1f59..b1995b88 100644
--- a/kdvi/kdvi_multipage.cpp
+++ b/kdvi/kdvi_multipage.cpp
@@ -49,9 +49,9 @@ K_EXPORT_COMPONENT_FACTORY(kdvipart, KDVIMultiPageFactory)
-KDVIMultiPage::KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+KDVIMultiPage::KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args)
- : KMultiPage(parentWidget, widgetName, parent, name), DVIRenderer(parentWidget)
+ : KMultiPage(tqparentWidget, widgetName, tqparent, name), DVIRenderer(tqparentWidget)
{
Q_UNUSED(args);
#ifdef PERFORMANCE_MEASUREMENT
@@ -141,27 +141,27 @@ void KDVIMultiPage::slotSave()
// Try to guess the proper ending...
TQString formats;
TQString ending;
- int rindex = m_file.findRev(".");
+ int rindex = m_file.tqfindRev(".");
if (rindex == -1) {
- ending = TQString::null;
- formats = TQString::null;
+ ending = TQString();
+ formats = TQString();
} else {
ending = m_file.mid(rindex); // e.g. ".dvi"
formats = fileFormats().grep(ending).join("\n");
}
- TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As"));
+ TQString fileName = KFileDialog::getSaveFileName(TQString(), formats, 0, i18n("Save File As"));
if (fileName.isEmpty())
return;
// Add the ending to the filename. I hope the user likes it that
// way.
- if (!ending.isEmpty() && fileName.find(ending) == -1)
+ if (!ending.isEmpty() && fileName.tqfind(ending) == -1)
fileName = fileName+ending;
if (TQFile(fileName).exists()) {
- int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName),
+ int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName),
i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel)
return;
@@ -213,7 +213,7 @@ void KDVIMultiPage::addConfigDialogs(KConfigDialog* configDialog)
void KDVIMultiPage::preferencesChanged()
{
- // Call method from parent class
+ // Call method from tqparent class
KMultiPage::preferencesChanged();
#ifdef KDVI_MULTIPAGE_DEBUG
kdDebug(4300) << "preferencesChanged" << endl;
@@ -239,7 +239,7 @@ void KDVIMultiPage::print()
// Show the printer options dialog. Return immediately if the user
// aborts.
- if (!printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1)) ))
+ if (!printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) ))
return;
// This funny method call is necessary for the KPrinter to return
@@ -256,7 +256,7 @@ void KDVIMultiPage::print()
// Turn the results of the options requestor into a list arguments
// which are used by dvips.
- TQString dvips_options = TQString::null;
+ TQString dvips_options = TQString();
// Print in reverse order.
if ( printer->pageOrder() == KPrinter::LastPageFirst )
dvips_options += "-r ";
@@ -365,7 +365,7 @@ void KDVIMultiPage::print()
default:
break;
}
- // Orientation
+ // Qt::Orientation
if ( printer->orientation() == KPrinter::Landscape )
dvips_options += "-t landscape ";
@@ -379,7 +379,7 @@ void KDVIMultiPage::print()
dvips_options += TQString(",");
else
commaflag = 1;
- dvips_options += TQString("%1").arg(*it);
+ dvips_options += TQString("%1").tqarg(*it);
}
// Now print. For that, export the DVI-File to PostScript. Note that
diff --git a/kdvi/kdvi_multipage.h b/kdvi/kdvi_multipage.h
index c3e60aea..cbc7d125 100644
--- a/kdvi/kdvi_multipage.h
+++ b/kdvi/kdvi_multipage.h
@@ -12,9 +12,10 @@ class KPrinter;
class KDVIMultiPage : public KMultiPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent,
const char *name, const TQStringList& args = TQStringList());
virtual ~KDVIMultiPage();
diff --git a/kdvi/main.cpp b/kdvi/main.cpp
index af7bc928..50221ebe 100644
--- a/kdvi/main.cpp
+++ b/kdvi/main.cpp
@@ -77,14 +77,14 @@ int main(int argc, char** argv)
if (!url.isValid())
{
- kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl;
+ kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl;
return -1;
}
if (!url.isLocalFile())
{
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.")).arg(args->arg(0)) << endl;
+ "files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl;
return -1;
}
@@ -98,7 +98,7 @@ int main(int argc, char** argv)
QCStringList apps = app.dcopClient()->registeredApplications();
for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it )
{
- if ((*it).find("kviewshell") == 0)
+ if ((*it).tqfind("kviewshell") == 0)
{
TQByteArray data, replyData;
TQCString replyType;
diff --git a/kdvi/optionDialogFontsWidget.cpp b/kdvi/optionDialogFontsWidget.cpp
index 14a72ee2..60a52c66 100644
--- a/kdvi/optionDialogFontsWidget.cpp
+++ b/kdvi/optionDialogFontsWidget.cpp
@@ -21,10 +21,10 @@
#include "optionDialogFontsWidget.h"
-// Constructs a optionDialogWidget_base which is a child of 'parent', with
+// Constructs a optionDialogWidget_base which is a child of 'tqparent', with
// the name 'name' and widget flags set to 'f'.
-optionDialogFontsWidget::optionDialogFontsWidget( TQWidget* parent, const char* name, WFlags fl )
- : optionDialogFontsWidget_base( parent, name, fl )
+optionDialogFontsWidget::optionDialogFontsWidget( TQWidget* tqparent, const char* name, WFlags fl )
+ : optionDialogFontsWidget_base( tqparent, name, fl )
{
#ifndef HAVE_FREETYPE
kcfg_UseType1Fonts->setChecked(false);
diff --git a/kdvi/optionDialogFontsWidget.h b/kdvi/optionDialogFontsWidget.h
index f7ad740f..ce8c85f3 100644
--- a/kdvi/optionDialogFontsWidget.h
+++ b/kdvi/optionDialogFontsWidget.h
@@ -15,9 +15,10 @@
class optionDialogFontsWidget : public optionDialogFontsWidget_base
{
Q_OBJECT
+ TQ_OBJECT
public:
- optionDialogFontsWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ optionDialogFontsWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~optionDialogFontsWidget();
};
diff --git a/kdvi/optionDialogFontsWidget_base.ui b/kdvi/optionDialogFontsWidget_base.ui
index da4ca601..22f7a119 100644
--- a/kdvi/optionDialogFontsWidget_base.ui
+++ b/kdvi/optionDialogFontsWidget_base.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>optionDialogFontsWidget_base</class>
<author>Stefan Kebekus</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>optionDialogFontsWidget_base</cstring>
</property>
@@ -20,7 +20,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_UseFontHints</cstring>
</property>
@@ -44,7 +44,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>121</height>
@@ -56,9 +56,9 @@
<includes>
<include location="global" impldecl="in implementation">kdialog.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot>buttonGroup1_clicked(int)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>
diff --git a/kdvi/optionDialogSpecialWidget.cpp b/kdvi/optionDialogSpecialWidget.cpp
index 1b61e4a5..6c27b019 100644
--- a/kdvi/optionDialogSpecialWidget.cpp
+++ b/kdvi/optionDialogSpecialWidget.cpp
@@ -23,10 +23,10 @@
#include "prefs.h"
-// Constructs a optionDialogWidget_base which is a child of 'parent', with
+// Constructs a optionDialogWidget_base which is a child of 'tqparent', with
// the name 'name' and widget flags set to 'f'.
-optionDialogSpecialWidget::optionDialogSpecialWidget( TQWidget* parent, const char* name, WFlags fl )
- : optionDialogSpecialWidget_base( parent, name, fl )
+optionDialogSpecialWidget::optionDialogSpecialWidget( TQWidget* tqparent, const char* name, WFlags fl )
+ : optionDialogSpecialWidget_base( tqparent, name, fl )
{
// Set up the list of known and supported editors
editorNameString += i18n("User-Defined Editor");
diff --git a/kdvi/optionDialogSpecialWidget.h b/kdvi/optionDialogSpecialWidget.h
index 0bdca8dd..42c16c27 100644
--- a/kdvi/optionDialogSpecialWidget.h
+++ b/kdvi/optionDialogSpecialWidget.h
@@ -15,9 +15,10 @@
class optionDialogSpecialWidget : public optionDialogSpecialWidget_base
{
Q_OBJECT
+ TQ_OBJECT
public:
- optionDialogSpecialWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ optionDialogSpecialWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~optionDialogSpecialWidget();
public slots:
diff --git a/kdvi/optionDialogSpecialWidget_base.ui b/kdvi/optionDialogSpecialWidget_base.ui
index 7aa36a26..62cb4f6d 100644
--- a/kdvi/optionDialogSpecialWidget_base.ui
+++ b/kdvi/optionDialogSpecialWidget_base.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>optionDialogSpecialWidget_base</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>optionDialogSpecialWidget_base</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_ShowPS</cstring>
</property>
@@ -33,7 +33,7 @@
<string>Some DVI files contain PostScript graphics. If enabled, KDVI will use the Ghostview PostScript interpreter to display these. You probably want to enable this option, unless you have a DVI-file whose PostScript part is broken, or too large for your machine.</string>
</property>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup3</cstring>
</property>
@@ -64,7 +64,7 @@
&lt;p&gt;Check the KDVI manual to see how to prepare DVI files which support the inverse search.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -80,7 +80,7 @@
<string>Description:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -96,7 +96,7 @@
<string>Shell command:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>editorDescription</cstring>
</property>
@@ -138,7 +138,7 @@
<string>If you are using inverse search, KDVI uses this command line to start the editor. The field '%f' is replaced with the filename, and '%l' is replaced with the line number.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -169,7 +169,7 @@
<property name="text">
<string>What is 'inverse search'? </string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
<property name="url" stdset="0">
@@ -186,7 +186,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>390</width>
<height>21</height>
@@ -199,7 +199,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kdvi/prebookmark.h b/kdvi/prebookmark.h
index ef637a60..412652b9 100644
--- a/kdvi/prebookmark.h
+++ b/kdvi/prebookmark.h
@@ -34,8 +34,8 @@ the DVI prescan routines.
class PreBookmark
{
public:
- PreBookmark(const TQString& t, const TQString& a, Q_UINT16 n) {title=t; anchorName=a; noOfChildren=n;}
- PreBookmark() {title=TQString::null; anchorName=TQString::null; noOfChildren=0;}
+ PreBookmark(const TQString& t, const TQString& a, TQ_UINT16 n) {title=t; anchorName=a; noOfChildren=n;}
+ PreBookmark() {title=TQString(); anchorName=TQString(); noOfChildren=0;}
// Title of the bookmark
TQString title;
@@ -44,7 +44,7 @@ class PreBookmark
TQString anchorName;
// Number of subordinate bookmarks
- Q_UINT16 noOfChildren;
+ TQ_UINT16 noOfChildren;
};
#endif
diff --git a/kdvi/psgs.cpp b/kdvi/psgs.cpp
index 2c745a7c..31f9bfdc 100644
--- a/kdvi/psgs.cpp
+++ b/kdvi/psgs.cpp
@@ -28,8 +28,8 @@ extern const char psheader[];
pageInfo::pageInfo(const TQString& _PostScriptString) {
PostScriptString = new TQString(_PostScriptString);
- background = Qt::white;
- permanentBackground = Qt::white;
+ background = TQt::white;
+ permanentBackground = TQt::white;
}
@@ -64,14 +64,14 @@ void ghostscript_interface::setPostScript(const PageNumber& page, const TQString
kdDebug(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl;
#endif
- if (pageList.find(page) == 0) {
+ if (pageList.tqfind(page) == 0) {
pageInfo *info = new pageInfo(PostScript);
// Check if dict is big enough
if (pageList.count() > pageList.size() -2)
pageList.resize(pageList.size()*2);
pageList.insert(page, info);
} else
- *(pageList.find(page)->PostScriptString) = PostScript;
+ *(pageList.tqfind(page)->PostScriptString) = PostScript;
}
@@ -88,8 +88,8 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC
kdDebug(4300) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl;
#endif
- if (pageList.find(page) == 0) {
- pageInfo *info = new pageInfo(TQString::null);
+ if (pageList.tqfind(page) == 0) {
+ pageInfo *info = new pageInfo(TQString());
info->background = background_color;
if (permanent)
info->permanentBackground = background_color;
@@ -98,9 +98,9 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC
pageList.resize(pageList.size()*2);
pageList.insert(page, info);
} else {
- pageList.find(page)->background = background_color;
+ pageList.tqfind(page)->background = background_color;
if (permanent)
- pageList.find(page)->permanentBackground = background_color;
+ pageList.tqfind(page)->permanentBackground = background_color;
}
}
@@ -109,10 +109,10 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page)
#ifdef DEBUG_PSGS
kdDebug(4300) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl;
#endif
- if (pageList.find(page) == 0)
+ if (pageList.tqfind(page) == 0)
return;
- pageInfo *info = pageList.find(page);
+ pageInfo *info = pageList.tqfind(page);
info->background = info->permanentBackground;
}
@@ -124,10 +124,10 @@ TQColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const
kdDebug(4300) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl;
#endif
- if (pageList.find(page) == 0)
- return Qt::white;
+ if (pageList.tqfind(page) == 0)
+ return TQt::white;
else
- return pageList.find(page)->background;
+ return pageList.tqfind(page)->background;
}
@@ -151,11 +151,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
emit(setStatusBarText(i18n("Generating PostScript graphics...")));
- pageInfo *info = pageList.find(page);
+ pageInfo *info = pageList.tqfind(page);
// Generate a PNG-file
// Step 1: Write the PostScriptString to a File
- KTempFile PSfile(TQString::null,".ps");
+ KTempFile PSfile(TQString(),".ps");
TQTextStream& os = *PSfile.textStream();
os << "%!PS-Adobe-2.0\n"
@@ -165,18 +165,18 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
<< "%%PageOrder: Ascend\n"
// HSize and VSize in 1/72 inch
<< "%%BoundingBox: 0 0 "
- << (Q_INT32)(72*(pixel_page_w/resolution)) << ' '
- << (Q_INT32)(72*(pixel_page_h/resolution)) << '\n'
+ << (TQ_INT32)(72*(pixel_page_w/resolution)) << ' '
+ << (TQ_INT32)(72*(pixel_page_h/resolution)) << '\n'
<< "%%EndComments\n"
<< "%!\n"
<< psheader
<< "TeXDict begin "
// HSize in (1/(65781.76*72))inch
- << (Q_INT32)(72*65781*(pixel_page_w/resolution)) << ' '
+ << (TQ_INT32)(72*65781*(pixel_page_w/resolution)) << ' '
// VSize in (1/(65781.76*72))inch
- << (Q_INT32)(72*65781*(pixel_page_h/resolution)) << ' '
+ << (TQ_INT32)(72*65781*(pixel_page_h/resolution)) << ' '
// Magnification
- << (Q_INT32)(magnification)
+ << (TQ_INT32)(magnification)
// dpi and vdpi
<< " 300 300"
// Name
@@ -189,7 +189,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
if (PostScriptHeaderString->latin1() != NULL)
os << PostScriptHeaderString->latin1();
- if (info->background != Qt::white) {
+ if (info->background != TQt::white) {
TQString colorCommand = TQString("gsave %1 %2 %3 setrgbcolor clippath fill grestore\n").
arg(info->background.red()/255.0).
arg(info->background.green()/255.0).
@@ -211,11 +211,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
TQStringList argus;
argus << "gs";
argus << "-dSAFER" << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNOPAUSE" << "-dBATCH";
- argus << TQString("-sDEVICE=%1").arg(*gsDevice);
- argus << TQString("-sOutputFile=%1").arg(filename);
- argus << TQString("-sExtraIncludePath=%1").arg(includePath);
- argus << TQString("-g%1x%2").arg(pixel_page_w).arg(pixel_page_h); // page size in pixels
- argus << TQString("-r%1").arg(resolution); // resolution in dpi
+ argus << TQString("-sDEVICE=%1").tqarg(*gsDevice);
+ argus << TQString("-sOutputFile=%1").tqarg(filename);
+ argus << TQString("-sExtraIncludePath=%1").tqarg(includePath);
+ argus << TQString("-g%1x%2").tqarg(pixel_page_w).tqarg(pixel_page_h); // page size in pixels
+ argus << TQString("-r%1").tqarg(resolution); // resolution in dpi
argus << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe";
argus << "-f" << PSfile.name();
@@ -239,9 +239,9 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
// ghostscript. If so, try again with another device.
TQString GSoutput;
while(proc.readln(GSoutput) != -1) {
- if (GSoutput.contains("Unknown device")) {
+ if (GSoutput.tqcontains("Unknown device")) {
kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support "
- "the '%1' ghostview device driver.").arg(*gsDevice) << endl;
+ "the '%1' ghostview device driver.").tqarg(*gsDevice) << endl;
knownDevices.remove(gsDevice);
gsDevice = knownDevices.begin();
if (knownDevices.isEmpty())
@@ -267,14 +267,14 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
"drivers. Note that KDVI needs to be restarted to re-enable PostScript support."
"</p></qt>"));
else {
- kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice) << endl;
+ kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").tqarg(*gsDevice) << endl;
gs_generate_graphics_file(page, filename, magnification);
}
return;
}
}
}
- emit(setStatusBarText(TQString::null));
+ emit(setStatusBarText(TQString()));
}
@@ -293,7 +293,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma
pixel_page_w = paint->viewport().width();
pixel_page_h = paint->viewport().height();
- pageInfo *info = pageList.find(page);
+ pageInfo *info = pageList.tqfind(page);
// No PostScript? Then return immediately.
if ((info == 0) || (info->PostScriptString->isEmpty())) {
@@ -303,7 +303,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma
return;
}
- KTempFile gfxFile(TQString::null, ".png");
+ KTempFile gfxFile(TQString(), ".png");
gfxFile.setAutoDelete(1);
gfxFile.close(); // we are want the filename, not the file
@@ -317,7 +317,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma
TQString ghostscript_interface::locateEPSfile(const TQString &filename, const KURL &base)
{
- // If the base URL indicates that the DVI file is local, try to find
+ // If the base URL indicates that the DVI file is local, try to tqfind
// the graphics file in the directory where the DVI file resides
if (base.isLocalFile()) {
TQString path = base.path(); // -> "/bar/foo.dvi"
diff --git a/kdvi/psgs.h b/kdvi/psgs.h
index c1062f13..01b5aa96 100644
--- a/kdvi/psgs.h
+++ b/kdvi/psgs.h
@@ -34,6 +34,7 @@ public:
class ghostscript_interface : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
ghostscript_interface();
@@ -62,7 +63,7 @@ public:
void graphics(const PageNumber& page, double dpi, long magnification, TQPainter* paint);
// Returns the background color for a certain page. If no color was
- // set, Qt::white is returned.
+ // set, TQt::white is returned.
TQColor getBackgroundColor(const PageNumber& page) const;
TQString *PostScriptHeaderString;
diff --git a/kdvi/psheader.txt b/kdvi/psheader.txt
index f5e543d1..244e4a3b 100644
--- a/kdvi/psheader.txt
+++ b/kdvi/psheader.txt
@@ -21,7 +21,7 @@ B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
-rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagetqmask restore}B/G{{id gp get/gp
gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
@@ -45,9 +45,9 @@ index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
(LaserWriter 16/600)]{A length product length le{A length product exch 0
exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
-end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagetqmask
grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
-imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+imagetqmask grestore}}ifelse B/QV{gsave newpath transform round exch round
exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
diff --git a/kdvi/renderedDviPagePixmap.h b/kdvi/renderedDviPagePixmap.h
index c618806b..9abff270 100644
--- a/kdvi/renderedDviPagePixmap.h
+++ b/kdvi/renderedDviPagePixmap.h
@@ -30,6 +30,7 @@
class RenderedDviPagePixmap : public RenderedDocumentPagePixmap
{
Q_OBJECT
+ TQ_OBJECT
public:
RenderedDviPagePixmap();
diff --git a/kdvi/special.cpp b/kdvi/special.cpp
index 9f7eeb3d..94a7a5ca 100644
--- a/kdvi/special.cpp
+++ b/kdvi/special.cpp
@@ -120,7 +120,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec)
TQString specType = colorSpec.section(' ', 0, 0);
- if (specType.find("rgb", false) == 0) {
+ if (specType.tqfind("rgb", false) == 0) {
bool ok;
double r = colorSpec.section(' ', 1, 1).toDouble(&ok);
@@ -138,7 +138,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec)
return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5));
}
- if (specType.find("hsb", false) == 0) {
+ if (specType.tqfind("hsb", false) == 0) {
bool ok;
double h = colorSpec.section(' ', 1, 1).toDouble(&ok);
@@ -156,7 +156,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec)
return TQColor((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5), TQColor::Hsv);
}
- if (specType.find("cmyk", false) == 0) {
+ if (specType.tqfind("cmyk", false) == 0) {
bool ok;
double c = colorSpec.section(' ', 1, 1).toDouble(&ok);
@@ -189,7 +189,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec)
return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5));
}
- if (specType.find("gray", false) == 0) {
+ if (specType.tqfind("gray", false) == 0) {
bool ok;
double g = colorSpec.section(' ', 1, 1).toDouble(&ok);
@@ -200,7 +200,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec)
}
// Check if the color is one of the known named colors.
- TQMap<TQString, TQColor>::Iterator f = namedColors.find(specType);
+ TQMap<TQString, TQColor>::Iterator f = namedColors.tqfind(specType);
if (f != namedColors.end())
return *f;
@@ -222,7 +222,7 @@ void dviRenderer::color_special(const TQString& _cp)
// Take color off the stack
if (colorStack.isEmpty())
printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Color pop command issued when the color stack is empty." ).
- arg(dviFile->filename).arg(current_page));
+ tqarg(dviFile->filename).tqarg(current_page));
else
colorStack.pop();
return;
@@ -235,7 +235,7 @@ void dviRenderer::color_special(const TQString& _cp)
if (col.isValid())
colorStack.push(col);
else
- colorStack.push(Qt::black);
+ colorStack.push(TQt::black);
return;
}
@@ -246,7 +246,7 @@ void dviRenderer::color_special(const TQString& _cp)
if (col.isValid())
globalColor = col;
else
- globalColor = Qt::black;
+ globalColor = TQt::black;
return;
}
@@ -254,7 +254,7 @@ void dviRenderer::color_special(const TQString& _cp)
void dviRenderer::html_href_special(const TQString& _cp)
{
TQString cp = _cp;
- cp.truncate(cp.find('"'));
+ cp.truncate(cp.tqfind('"'));
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "HTML-special, href " << cp.latin1() << endl;
@@ -292,10 +292,10 @@ void dviRenderer::source_special(const TQString& cp)
void parse_special_argument(const TQString& strg, const char* argument_name, int* variable)
{
- int index = strg.find(argument_name);
+ int index = strg.tqfind(argument_name);
if (index >= 0) {
TQString tmp = strg.mid(index + strlen(argument_name));
- index = tmp.find(' ');
+ index = tmp.tqfind(' ');
if (index >= 0)
tmp.truncate(index);
@@ -308,7 +308,7 @@ void parse_special_argument(const TQString& strg, const char* argument_name, int
// Maybe we should open a dialog here.
kdError(4300) << i18n("Malformed parameter in the epsf special command.\n"
"Expected a float to follow %1 in %2")
- .arg(argument_name).arg(strg) << endl;
+ .tqarg(argument_name).tqarg(strg) << endl;
}
}
@@ -327,7 +327,7 @@ void dviRenderer::epsf_special(const TQString& cp)
// (already the simplifyWhiteSpace() above is wrong). If you have
// files like this, go away.
TQString EPSfilename_orig = include_command;
- EPSfilename_orig.truncate(EPSfilename_orig.find(' '));
+ EPSfilename_orig.truncate(EPSfilename_orig.tqfind(' '));
// Strip enclosing quotation marks which are included by some LaTeX
// macro packages (but not by others). This probably means that
@@ -348,7 +348,7 @@ void dviRenderer::epsf_special(const TQString& cp)
int angle = 0;
// just to avoid ambiguities; the filename could contain keywords
- include_command = include_command.mid(include_command.find(' '));
+ include_command = include_command.mid(include_command.tqfind(' '));
parse_special_argument(include_command, "llx=", &llx);
parse_special_argument(include_command, "lly=", &lly);
@@ -420,19 +420,19 @@ void dviRenderer::epsf_special(const TQString& cp)
foreGroundPainter->save();
if (TQFile::exists(EPSfilename))
- foreGroundPainter->setBrush(Qt::lightGray);
+ foreGroundPainter->setBrush(TQt::lightGray);
else
- foreGroundPainter->setBrush(Qt::red);
- foreGroundPainter->setPen(Qt::black);
+ foreGroundPainter->setBrush(TQt::red);
+ foreGroundPainter->setPen(TQt::black);
foreGroundPainter->drawRoundRect(bbox, 2, 2);
TQFont f = foreGroundPainter->font();
f.setPointSize(8);
foreGroundPainter->setFont(f);
if (TQFile::exists(EPSfilename))
- foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename_orig, -1);
+ foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), EPSfilename_orig, -1);
else
- foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter),
- i18n("File not found: \n %1").arg(EPSfilename_orig), -1);
+ foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter),
+ i18n("File not found: \n %1").tqarg(EPSfilename_orig), -1);
foreGroundPainter->restore();
}
@@ -451,9 +451,9 @@ void dviRenderer::TPIC_flushPath_special()
return;
}
- TQPen pen(Qt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches
+ TQPen pen(TQt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches
foreGroundPainter->setPen(pen);
- foreGroundPainter->drawPolyline(TPIC_path, 0, number_of_elements_in_path);
+ foreGroundPainter->tqdrawPolyline(TPIC_path, 0, number_of_elements_in_path);
number_of_elements_in_path = 0;
}
@@ -469,12 +469,12 @@ void dviRenderer::TPIC_addPath_special(const TQString& cp)
bool ok;
float xKoord = cp_noWhiteSpace.section(' ', 0, 0).toFloat(&ok);
if (ok == false) {
- printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").arg(cp) );
+ printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").tqarg(cp) );
return;
}
float yKoord = cp_noWhiteSpace.section(' ', 1, 1).toFloat(&ok);
if (ok == false) {
- printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").arg(cp) );
+ printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").tqarg(cp) );
return;
}
@@ -502,7 +502,7 @@ void dviRenderer::TPIC_setPen_special(const TQString& cp)
bool ok;
penWidth_in_mInch = cp.stripWhiteSpace().toFloat(&ok);
if (ok == false) {
- printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").arg(cp) );
+ printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").tqarg(cp) );
penWidth_in_mInch = 0.0;
return;
}
@@ -650,11 +650,11 @@ void dviRenderer::applicationDoSpecial(char *cp)
// line break is encountered)
if (special_command.startsWith("ps:SDict begin [") && special_command.endsWith(" pdfmark end")) {
if (!currentlyDrawnPage->hyperLinkList.isEmpty()) {
- // Parse the PostScript literal text string inside parentheses
+ // Parse the PostScript literal text string inside tqparentheses
// and store it into 'targetName'. The scanner works
// according to "PostScript language reference, third edition"
// - Sec. 3.2.2. The specification is implemented completely:
- // balanced parentheses and all escape sequences are
+ // balanced tqparentheses and all escape sequences are
// considered.
TQString tmpTargetName = special_command.section('(', 1);
TQString targetName;
@@ -670,7 +670,7 @@ void dviRenderer::applicationDoSpecial(char *cp)
break;
targetName += tmpTargetName[i];
}
- targetName = PDFencodingToQString(targetName);
+ targetName = PDFencodingToTQString(targetName);
TQValueVector<Hyperlink>::iterator it;
for( it = currentlyDrawnPage->hyperLinkList.begin(); it != currentlyDrawnPage->hyperLinkList.end(); ++it )
@@ -700,7 +700,7 @@ void dviRenderer::applicationDoSpecial(char *cp)
foreGroundPainter->translate(-x,-y);
} else
printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Could not interpret angle in text rotation special." ).
- arg(dviFile->filename).arg(current_page));
+ tqarg(dviFile->filename).tqarg(current_page));
}
// 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) )
return;
- printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").arg(special_command));
+ printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").tqarg(special_command));
return;
}
diff --git a/kdvi/vf.cpp b/kdvi/vf.cpp
index 679aa9e0..b6da55c0 100644
--- a/kdvi/vf.cpp
+++ b/kdvi/vf.cpp
@@ -80,7 +80,7 @@ void TeXFontDefinition::read_VF_index()
#endif
// Read preamble.
fseek(VF_file, (long) one(VF_file), 1); /* skip comment */
- Q_UINT32 file_checksum = four(VF_file);
+ TQ_UINT32 file_checksum = four(VF_file);
if (file_checksum && checksum && file_checksum != checksum)
kdError(4300) << i18n("Checksum mismatch") << "(dvi = " << checksum << "u, vf = " << file_checksum <<
@@ -91,11 +91,11 @@ void TeXFontDefinition::read_VF_index()
first_font = NULL;
while ((cmnd = one(VF_file)) >= FNTDEF1 && cmnd <= FNTDEF4) {
int TeXnumber = num(VF_file, (int) cmnd - FNTDEF1 + 1);
- Q_UINT32 checksum = four(VF_file);
- Q_UINT32 scale = four(VF_file);
- Q_UINT32 design = four(VF_file);
+ TQ_UINT32 checksum = four(VF_file);
+ TQ_UINT32 scale = four(VF_file);
+ TQ_UINT32 design = four(VF_file);
Q_UNUSED(design);
- Q_UINT16 len = one(VF_file) + one(VF_file); /* sequence point in the middle */
+ TQ_UINT16 len = one(VF_file) + one(VF_file); /* sequence point in the middle */
char *fontname = new char[len + 1];
fread(fontname, sizeof(char), len, VF_file);
fontname[len] = '\0';
@@ -111,8 +111,8 @@ void TeXFontDefinition::read_VF_index()
// imposes. One obtains the enlargement by dividing 2^20.
double enlargement_factor = double(scale)/(1<<20) * enlargement;
- // TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (Q_UINT32)(scaled_size_in_DVI_units*enlargement_factor), enlargement_factor);
- TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (Q_UINT32)((double(scale)/(1<<20))*scaled_size_in_DVI_units), enlargement_factor);
+ // TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (TQ_UINT32)(scaled_size_in_DVI_units*enlargement_factor), enlargement_factor);
+ TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (TQ_UINT32)((double(scale)/(1<<20))*scaled_size_in_DVI_units), enlargement_factor);
// Insert font in dictionary and make sure the dictionary is big
// enough.
@@ -177,7 +177,7 @@ void TeXFontDefinition::read_VF_index()
}
}
if (cmnd != POST)
- oops(i18n("Wrong command byte found in VF macro list: %1").arg(cmnd));
+ oops(i18n("Wrong command byte found in VF macro list: %1").tqarg(cmnd));
fclose (VF_file);
file = NULL;