diff options
Diffstat (limited to 'kwin4/kwin4/kspritecache.cpp')
-rw-r--r-- | kwin4/kwin4/kspritecache.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kwin4/kwin4/kspritecache.cpp b/kwin4/kwin4/kspritecache.cpp index d8ab3b9b..342369c9 100644 --- a/kwin4/kwin4/kspritecache.cpp +++ b/kwin4/kwin4/kspritecache.cpp @@ -27,8 +27,8 @@ // KSprite #include <math.h> -KSpriteCache::KSpriteCache(TQString grafixdir, TQObject* parent,const char * name) - : TQObject(parent,name) +KSpriteCache::KSpriteCache(TQString grafixdir, TQObject* tqparent,const char * name) + : TQObject(tqparent,name) { kdDebug(11002) << "KSpriteCache:: grafixdir=" << grafixdir << endl; mConfig=0; @@ -90,7 +90,7 @@ void KSpriteCache::deleteAllItems() void KSpriteCache::deleteItem(TQString s,int no) { TQCanvasItem *item; - TQString name=s+TQString("_%1").arg(no); + TQString name=s+TQString("_%1").tqarg(no); //kdDebug(11002) << "KSpriteCache::deleteItem name=" << name << endl; item=mItemDict[name]; if (item) @@ -122,7 +122,7 @@ void KSpriteCache::deleteItem(TQCanvasItem *item) TQCanvasItem *KSpriteCache::getItem(TQString name,int no) { - TQString dictname=name+TQString("_%1").arg(no); + TQString dictname=name+TQString("_%1").tqarg(no); TQCanvasItem *item=mItemDict[dictname]; //kdDebug(11002) << " -> getItem("<<name<<","<<no<<") =>"<<dictname<<endl; // Directly found item @@ -155,7 +155,7 @@ TQCanvasItem *KSpriteCache::getItem(TQString name,int no) return item; } -TQPixmap * KSpriteCache::loadPixmap(TQString file,TQString mask,TQString dir) +TQPixmap * KSpriteCache::loadPixmap(TQString file,TQString tqmask,TQString dir) { TQPixmap *newP=new TQPixmap; bool result1=false; @@ -165,21 +165,21 @@ TQPixmap * KSpriteCache::loadPixmap(TQString file,TQString mask,TQString dir) { result1=newP->load(dir+file); } - if (result1 && !mask.isNull()) + if (result1 && !tqmask.isNull()) { - TQBitmap bitmask; - if (mask==TQString("auto")) // self mask..slow but quick to create + TQBitmap bittqmask; + if (tqmask==TQString("auto")) // self tqmask..slow but quick to create { newP->setMask( newP->createHeuristicMask() ); result2=true; } else { - result2=bitmask.load(dir+mask); - if (result2) newP->setMask(bitmask); + result2=bittqmask.load(dir+tqmask); + if (result2) newP->setMask(bittqmask); } } - //kdDebug(11002) << "KSpriteCache::loadPixmap: file="<<file<<" mask="<<mask<<" result1="<<result1<<" result2="<<result2<<endl; + //kdDebug(11002) << "KSpriteCache::loadPixmap: file="<<file<<" tqmask="<<tqmask<<" result1="<<result1<<" result2="<<result2<<endl; return newP; } @@ -197,7 +197,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString na // Append default entry (empty string) if (operationList.count()==0) { - operationList.append(TQString::null); + operationList.append(TQString()); } @@ -221,7 +221,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString na //kdDebug(11002) << " Reading " << number << " frames " << endl; TQString pixfile=config->readPathEntry(name+"file"); - TQString maskfile=config->readPathEntry(name+"mask"); + TQString tqmaskfile=config->readPathEntry(name+"tqmask"); // Load a given set of images or replace a %d by a sequence if there are // less image names than number given @@ -230,12 +230,12 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString na // Read images for (unsigned int i=0;i<number;i++) { - TQString tmpfile,tmpmask; + TQString tmpfile,tmptqmask; tmpfile.sprintf(pixfile.latin1(),i); - tmpmask.sprintf(maskfile.latin1(),i); + tmptqmask.sprintf(tqmaskfile.latin1(),i); - pixmap=loadPixmap(tmpfile,tmpmask); - if (!pixmap) kdError() << "Could not create pixmap="<<tmpfile << " with mask " << tmpmask << endl; + pixmap=loadPixmap(tmpfile,tmptqmask); + if (!pixmap) kdError() << "Could not create pixmap="<<tmpfile << " with tqmask " << tmptqmask << endl; else { applyFilter(pixmap,config,name); @@ -255,9 +255,9 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString na double step; if (number>1) step=(100.0-finalscale)/100.0/(double)(number-1); else step=1.0; - //kdDebug(11002) << " Scaling " << number << " pics axis="<<axis<<" final="<<finalscale<<" file="<<pixfile<< " mask="<<maskfile<<endl; + //kdDebug(11002) << " Scaling " << number << " pics axis="<<axis<<" final="<<finalscale<<" file="<<pixfile<< " tqmask="<<tqmaskfile<<endl; - pixmap=loadPixmap(pixfile,maskfile); + pixmap=loadPixmap(pixfile,tqmaskfile); for (unsigned int j=0;j<(unsigned int)number;j++) { TQWMatrix matrix; @@ -340,7 +340,7 @@ void KSpriteCache::changeHSV(TQPixmap *pixmap,int dh,int ds,int dv) { for (int x=0;x<img.width();x++) { - QRgb pix=img.pixel(x,y); + TQRgb pix=img.pixel(x,y); TQColor col(pix); col.hsv(&h,&s,&v); if (col==black) continue; // speed up? @@ -348,7 +348,7 @@ void KSpriteCache::changeHSV(TQPixmap *pixmap,int dh,int ds,int dv) s=((unsigned int)(s+ds)%256); v=((unsigned int)(v+dv)%256); col.setHsv(h,s,v); - img.setPixel(x,y,qRgba(col.red(),col.green(),col.blue(),qAlpha(pix))); + img.setPixel(x,y,tqRgba(col.red(),col.green(),col.blue(),tqAlpha(pix))); } } pixmap->convertFromImage(img); // slow @@ -365,12 +365,12 @@ void KSpriteCache::changeGrey(TQPixmap *pixmap,int lighter) { for (int x=0;x<img.width();x++) { - QRgb pix=img.pixel(x,y); - int gray=qGray(qRed(pix),qGreen(pix),qBlue(pix)); + TQRgb pix=img.pixel(x,y); + int gray=tqGray(tqRed(pix),tqGreen(pix),tqBlue(pix)); TQColor col(gray,gray,gray); if (lighter>0) col=col.light(lighter); if (lighter<0) col=col.dark(-lighter); - img.setPixel(x,y,qRgba(col.red(),col.green(),col.blue(),qAlpha(pix))); + img.setPixel(x,y,tqRgba(col.red(),col.green(),col.blue(),tqAlpha(pix))); } } pixmap->convertFromImage(img); // slow @@ -496,7 +496,7 @@ void KSpriteCache::createAnimations(KConfig *config,KSprite *sprite) if (!sprite) return ; for (int i=0;i<1000;i++) { - TQString anim=TQString("anim%1").arg(i); + TQString anim=TQString("anim%1").tqarg(i); if (config->hasKey(anim)) { //kdDebug(11002) << "Found animation key " << anim << endl; |