summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjfont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/kjofol-skin/kjfont.cpp')
-rw-r--r--noatun/modules/kjofol-skin/kjfont.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/noatun/modules/kjofol-skin/kjfont.cpp b/noatun/modules/kjofol-skin/kjfont.cpp
index c6b16b77..cf82fa43 100644
--- a/noatun/modules/kjofol-skin/kjfont.cpp
+++ b/noatun/modules/kjofol-skin/kjfont.cpp
@@ -23,9 +23,9 @@
* KJFont
*******************************************/
-KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0)
+KJFont::KJFont(const TQString &prefix, KJLoader *tqparent) : mTextMask(0), mTransparentRGB(0)
{
-// kdDebug(66666) << "KJFont::KJFont(const TQString &prefix, KJLoader *parent)" << prefix.latin1() << endl;
+// kdDebug(66666) << "KJFont::KJFont(const TQString &prefix, KJLoader *tqparent)" << prefix.latin1() << endl;
if (prefix=="timefont")
{
@@ -47,12 +47,12 @@ KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransp
mNullChar=' ';
}
- mText = parent->pixmap(parent->item(prefix+"image")[1]);
+ mText = tqparent->pixmap(tqparent->item(prefix+"image")[1]);
- if ( parent->exist(prefix+"size") )
+ if ( tqparent->exist(prefix+"size") )
{
- mWidth = parent->item(prefix+"size")[1].toInt();
- mHeight = parent->item(prefix+"size")[2].toInt();
+ mWidth = tqparent->item(prefix+"size")[1].toInt();
+ mHeight = tqparent->item(prefix+"size")[2].toInt();
}
else // try to load the font even we are missing important settings
{ // this still can cause crashes!
@@ -73,13 +73,13 @@ KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransp
mHeight = mText.height();
// Stupid Skin authors tend to forget keys :/
- if ( parent->exist(prefix+"spacing") )
- mSpacing = parent->item(prefix+"spacing")[1].toInt();
+ if ( tqparent->exist(prefix+"spacing") )
+ mSpacing = tqparent->item(prefix+"spacing")[1].toInt();
else
mSpacing = 0; // FIXME: What's default for this in kjöfol???
- if ( parent->exist(prefix+"transparent") )
- mTransparent = (bool)parent->item(prefix+"transparent")[1].toInt();
+ if ( tqparent->exist(prefix+"transparent") )
+ mTransparent = (bool)tqparent->item(prefix+"transparent")[1].toInt();
else
mTransparent = true; // transparency seems to be default in kjöfol
@@ -88,7 +88,7 @@ KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransp
{
TQImage ibackground = mText.convertToImage();
mTransparentRGB = ibackground.pixel( ibackground.width()-1, ibackground.height()-1 );
-// kdDebug(66666) << "color (" << qRed(mTransparentRGB) << "," << qGreen(mTransparentRGB) << "," << qBlue(mTransparentRGB) << ") will be transparent for " << prefix.latin1() << endl;
+// kdDebug(66666) << "color (" << tqRed(mTransparentRGB) << "," << tqGreen(mTransparentRGB) << "," << tqBlue(mTransparentRGB) << ") will be transparent for " << prefix.latin1() << endl;
mTextMask = KJWidget::getMask(ibackground,mTransparentRGB);
}
@@ -153,8 +153,8 @@ TQPixmap KJFont::drawSysFont(const TQCString &s, int wide, const TQPoint &pos) c
TQBitmap regionMask(
(stringWidth > wide ? stringWidth : wide),
- mHeight, true); // fully transparent mask
- TQPainter mp(&regionMask); // mask painter
+ mHeight, true); // fully transparent tqmask
+ TQPainter mp(&regionMask); // tqmask painter
// kdDebug(66666) << "region; w=" << region.width() << ", h=" << region.height() << endl;
@@ -163,25 +163,25 @@ TQPixmap KJFont::drawSysFont(const TQCString &s, int wide, const TQPoint &pos) c
if ( stringWidth < wide )
{
freeSpace = wide - stringWidth;
- mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
+ mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 );
to += TQPoint ( (freeSpace/2), 0 );
// kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl;
}
rp.setFont(sysFont);
rp.setPen(sysFontColor);
- rp.drawText(to.x(), to.y(), region.width()-freeSpace, mHeight, Qt::AlignLeft|Qt::AlignTop, string);
+ rp.drawText(to.x(), to.y(), region.width()-freeSpace, mHeight, TQt::AlignLeft|TQt::AlignTop, string);
mp.setFont(sysFont);
- mp.setPen(Qt::color1);
- mp.drawText(to.x(), to.y(), region.width()-freeSpace, mHeight, Qt::AlignLeft|Qt::AlignTop, string);
+ mp.setPen(TQt::color1);
+ mp.drawText(to.x(), to.y(), region.width()-freeSpace, mHeight, TQt::AlignLeft|TQt::AlignTop, string);
to += TQPoint(region.width()-freeSpace,0);
// kdDebug(66666) << "text width=" << region.width()-freeSpace << endl;
if (freeSpace > 0)
{
- mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
+ mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 );
to += TQPoint ( (freeSpace/2), 0 );
// kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl;
}
@@ -206,8 +206,8 @@ TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &p
TQBitmap regionMask(
(string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide
? string.length()*mWidth+string.length()*mSpacing : wide),
- mHeight, true); // fully transparent mask
- TQPainter mask( &regionMask );
+ mHeight, true); // fully transparent tqmask
+ TQPainter tqmask( &regionMask );
// kdDebug(66666) << "draw: {" << str << "}" << endl;
@@ -216,7 +216,7 @@ TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &p
if ( string.length()*mWidth+string.length()*mSpacing < (unsigned int)wide )
{
freeSpace = wide - string.length()*mWidth+string.length()*mSpacing;
- mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
+ tqmask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 );
to += TQPoint ( (freeSpace/2), 0 );
}
@@ -234,14 +234,14 @@ TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &p
// draw according to "spacing"
if ( (charPos < string.length()-1) && mSpacing > 0 )
{ // make the spacing-area transparent
- mask.fillRect ( to.x(), 0, mSpacing, mHeight, Qt::color0 );
+ tqmask.fillRect ( to.x(), 0, mSpacing, mHeight, TQt::color0 );
to += TQPoint ( mSpacing, 0 );
}
}
if (freeSpace > 0)
{
- mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
+ tqmask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, TQt::color0 );
to += TQPoint ( (freeSpace/2), 0 );
}
@@ -258,17 +258,17 @@ void KJFont::drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to,
int xs=mWidth;
int ys=mHeight;
- bitBlt(dev, to, &mText, TQRect(x,y,xs,ys), Qt::CopyROP);
+ bitBlt(dev, to, &mText, TQRect(x,y,xs,ys), TQt::CopyROP);
- // bitBlt mask for transparency
+ // bitBlt tqmask for transparency
if ( mTransparent )
{
- bitBlt(devMask, to, &mTextMask, TQRect(x,y,xs,ys), Qt::OrROP);
+ bitBlt(devMask, to, &mTextMask, TQRect(x,y,xs,ys), TQt::OrROP);
}
- else // fill mask
+ else // fill tqmask
{
TQPainter tempPainter (devMask);
- tempPainter.fillRect ( to.x(), 0, xs,ys, Qt::color1 );
+ tempPainter.fillRect ( to.x(), 0, xs,ys, TQt::color1 );
}
}