summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopeteonlinestatusmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/kopeteonlinestatusmanager.cpp')
-rw-r--r--kopete/libkopete/kopeteonlinestatusmanager.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kopete/libkopete/kopeteonlinestatusmanager.cpp b/kopete/libkopete/kopeteonlinestatusmanager.cpp
index 27fa0db1..c0cef12f 100644
--- a/kopete/libkopete/kopeteonlinestatusmanager.cpp
+++ b/kopete/libkopete/kopeteonlinestatusmanager.cpp
@@ -49,7 +49,7 @@ class OnlineStatusManager::Private
typedef TQMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ;
TQPixmap *nullPixmap;
- TQMap<Protocol* , ProtocolMap > registeredStatus;
+ TQMap<Protocol* , ProtocolMap > registeredtqStatus;
TQDict< TQPixmap > iconCache;
};
@@ -89,10 +89,10 @@ void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, cons
s.caption=caption;
s.categories=categories;
s.options=options;
- d->registeredStatus[status.protocol()].insert(status, s );
+ d->registeredtqStatus[status.protocol()].insert(status, s );
}
-OnlineStatus OnlineStatusManager::onlineStatus(Protocol * protocol, Categories category) const
+OnlineStatus OnlineStatusManager::onlinetqStatus(Protocol * protocol, Categories category) const
{
/* Each category has a number which is a power of two, so it is possible to have several categories per online status
* the logaritm in base two if this number, which represent the bit which is equal to 1 in the number is chosen to be in a tree
@@ -103,10 +103,10 @@ OnlineStatus OnlineStatusManager::onlineStatus(Protocol * protocol, Categories c
* 4 5 6 7
* /\ / \ / \ / \
* 8 9 10 11 12 13 14 15
- * To get the parent of a key, one just divide per two the number
+ * To get the tqparent of a key, one just divide per two the number
*/
- Private::ProtocolMap protocolMap=d->registeredStatus[protocol];
+ Private::ProtocolMap protocolMap=d->registeredtqStatus[protocol];
int categ_nb=-1; //the logaritm of category
uint category_=category;
@@ -137,13 +137,13 @@ TQString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const
{
// create a 'fingerprint' to use as a hash key
// fingerprint consists of description/icon name/color/overlay name/size/idle state
- return TQString::fromLatin1("%1/%2/%3/%4/%5/%6")
- .arg( statusFor.description() )
- .arg( icon )
- .arg( color.name() )
- .arg( statusFor.overlayIcons().join( TQString::fromLatin1( "," ) ) )
- .arg( size )
- .arg( idle ? 'i' : 'a' );
+ return TQString::tqfromLatin1("%1/%2/%3/%4/%5/%6")
+ .tqarg( statusFor.description() )
+ .tqarg( icon )
+ .tqarg( color.name() )
+ .tqarg( statusFor.overlayIcons().join( TQString::tqfromLatin1( "," ) ) )
+ .tqarg( size )
+ .tqarg( idle ? 'i' : 'a' );
}
TQPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle)
@@ -151,7 +151,7 @@ TQPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor
TQString fp = fingerprint( statusFor, icon, size, color, idle );
// look it up in the cache
- TQPixmap *theIcon= d->iconCache.find( fp );
+ TQPixmap *theIcon= d->iconCache.tqfind( fp );
if ( !theIcon )
{
// cache miss
@@ -165,7 +165,7 @@ TQPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor
TQPixmap OnlineStatusManager::cacheLookupByMimeSource( const TQString &mimeSource )
{
// look it up in the cache
- const TQPixmap *theIcon= d->iconCache.find( mimeSource );
+ const TQPixmap *theIcon= d->iconCache.tqfind( mimeSource );
if ( !theIcon )
{
// need to return an invalid pixmap
@@ -201,23 +201,23 @@ static void blendOnLower( const TQImage &upper_, TQImage &lower, const TQPoint &
for ( int j = cy; j < ch; ++j )
{
- QRgb *u = (QRgb*)upper.scanLine(j - cy);
- QRgb *l = (QRgb*)lower.scanLine(j) + cx;
+ TQRgb *u = (TQRgb*)upper.scanLine(j - cy);
+ TQRgb *l = (TQRgb*)lower.scanLine(j) + cx;
for( int k = cx; k < cw; ++u, ++l, ++k )
{
- int ua = qAlpha(*u);
+ int ua = tqAlpha(*u);
if ( !ua )
continue;
- int la = qAlpha(*l);
+ int la = tqAlpha(*l);
int d = ua * m + la * (m - ua);
- uchar r = uchar( ( qRed(*u) * ua * m + qRed(*l) * la * (m - ua) ) / d );
- uchar g = uchar( ( qGreen(*u) * ua * m + qGreen(*l) * la * (m - ua) ) / d );
- uchar b = uchar( ( qBlue(*u) * ua * m + qBlue(*l) * la * (m - ua) ) / d );
+ uchar r = uchar( ( tqRed(*u) * ua * m + tqRed(*l) * la * (m - ua) ) / d );
+ uchar g = uchar( ( tqGreen(*u) * ua * m + tqGreen(*l) * la * (m - ua) ) / d );
+ uchar b = uchar( ( tqBlue(*u) * ua * m + tqBlue(*l) * la * (m - ua) ) / d );
uchar a = uchar( ( ua * ua * m + la * la * (m - ua) ) / d );
- *l = qRgba( r, g, b, a );
+ *l = tqRgba( r, g, b, a );
}
}
}
@@ -236,11 +236,11 @@ static TQRect getBoundingBox( const TQImage& image )
int y1 = height - 1;
for ( int j = 0; j < height; ++j )
{
- QRgb *i = (QRgb*)image.scanLine(j);
+ TQRgb *i = (TQRgb*)image.scanLine(j);
for( int k = 0; k < width; ++i, ++k )
{
- if ( qAlpha(*i) )
+ if ( tqAlpha(*i) )
{
x1 = std::min( x1, k );
y1 = std::min( y1, j );
@@ -255,11 +255,11 @@ static TQRect getBoundingBox( const TQImage& image )
int y2 = 0;
for ( int j = height-1; j >= 0; --j )
{
- QRgb *i = (QRgb*)image.scanLine(j) + width-1;
+ TQRgb *i = (TQRgb*)image.scanLine(j) + width-1;
for( int k = width-1; k >= 0; --i, --k )
{
- if ( qAlpha(*i) )
+ if ( tqAlpha(*i) )
{
x2 = std::max( x2, k );
y2 = std::max( y2, j );
@@ -335,12 +335,12 @@ TQPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const
if ( !overlay.isNull() )
{
// we want to preserve the alpha channels of both basis and overlay.
- // there's no way to do this in Qt. In fact, there's no way to do this
+ // there's no way to do this in TQt. In fact, there's no way to do this
// in KDE since KImageEffect is so badly broken.
TQImage basisImage = basis->convertToImage();
TQImage overlayImage = overlay.convertToImage();
TQPoint offset;
- if ( (*it).endsWith( TQString::fromLatin1( "_overlay" ) ) )
+ if ( (*it).endsWith( TQString::tqfromLatin1( "_overlay" ) ) )
{
// it is possible to have more than one overlay icon
// to avoid overlapping we place them in different corners
@@ -368,9 +368,9 @@ TQPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const
return basis;
}
-void OnlineStatusManager::createAccountStatusActions( Account *account , KActionMenu *parent)
+void OnlineStatusManager::createAccountStatusActions( Account *account , KActionMenu *tqparent)
{
- Private::ProtocolMap protocolMap=d->registeredStatus[account->protocol()];
+ Private::ProtocolMap protocolMap=d->registeredtqStatus[account->protocol()];
Private::ProtocolMap::Iterator it;
for ( it = --protocolMap.end(); it != protocolMap.end(); --it )
{
@@ -383,7 +383,7 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction
KAction *action;
// Any existing actions owned by the account are reused by recovering them
- // from the parent's child list.
+ // from the tqparent's child list.
// The description of the onlinestatus is used as the qobject name
// This is safe as long as OnlineStatus are immutable
TQCString actionName = status.description().ascii();
@@ -409,15 +409,15 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction
action->setEnabled(false);
#endif
- if(parent)
- parent->insert(action);
+ if(tqparent)
+ tqparent->insert(action);
}
}
-OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *parent, const char *name)
- : KAction( text, pix, KShortcut() , parent, name) , m_status(status)
+OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *tqparent, const char *name)
+ : KAction( text, pix, KShortcut() , tqparent, name) , m_status(status)
{
connect(this,TQT_SIGNAL(activated()),this,TQT_SLOT(slotActivated()));
}