summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/themer/kdmitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdm/kfrontend/themer/kdmitem.cpp')
-rw-r--r--kdm/kfrontend/themer/kdmitem.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kdm/kfrontend/themer/kdmitem.cpp b/kdm/kfrontend/themer/kdmitem.cpp
index a171bd1bb..3d81de58a 100644
--- a/kdm/kfrontend/themer/kdmitem.cpp
+++ b/kdm/kfrontend/themer/kdmitem.cpp
@@ -214,7 +214,7 @@ KdmItem::setWidget( TQWidget *widget )
myWidget->show();
// Remove borders so that it blends nicely with the theme background
- TQFrame* frame = ::qt_cast<TQFrame *>( widget );
+ TQFrame* frame = ::tqqt_cast<TQFrame *>( widget );
if (frame)
frame->setFrameStyle( TQFrame::NoFrame );
@@ -278,7 +278,7 @@ KdmItem::setGeometry( const TQRect &newGeometry, bool force )
if (fixedManager && !fixedManager->isEmpty())
fixedManager->update( newGeometry, force );
- // TODO send *selective* repaint signal
+ // TODO send *selective* tqrepaint signal
}
void
@@ -295,8 +295,8 @@ KdmItem::paint( TQPainter *p, const TQRect &rect )
// Maybe set a darker version of the background instead of an exact copy?
if ( myWidget && myWidget->isA( "KListView" ) ) {
TQPixmap copy( myWidget->size() );
- kdDebug() << myWidget->geometry() << " " << area << " " << myWidget->size() << endl;
- bitBlt( &copy, TQPoint( 0, 0), p->device(), myWidget->geometry(), Qt::CopyROP );
+ kdDebug() << myWidget->tqgeometry() << " " << area << " " << myWidget->size() << endl;
+ bitBlt( &copy, TQPoint( 0, 0), p->device(), myWidget->geometry(), TQt::CopyROP );
// Lighten it slightly
TQImage lightVersion;
lightVersion = copy.convertToImage();
@@ -368,7 +368,7 @@ KdmItem::mouseEvent( int x, int y, bool pressed, bool released )
}
ItemState oldState = state;
- if (area.contains( x, y )) {
+ if (area.tqcontains( x, y )) {
if (released && oldState == Sactive) {
if (buttonParent)
emit activated( id );
@@ -414,22 +414,22 @@ KdmItem::statusChanged()
// BEGIN protected inheritable
-QSize
-KdmItem::sizeHint()
+TQSize
+KdmItem::tqsizeHint()
{
if (myWidget)
return myWidget->size();
if (myLayoutItem)
- return myLayoutItem->sizeHint();
+ return myLayoutItem->tqsizeHint();
int w = pos.wType == DTpixel ? kAbs( pos.width ) : -1,
h = pos.hType == DTpixel ? kAbs( pos.height ) : -1;
return TQSize( w, h );
}
-QRect
+TQRect
KdmItem::placementHint( const TQRect &parentRect )
{
- TQSize hintedSize = sizeHint();
+ TQSize hintedSize = tqsizeHint();
TQSize boxHint;
int x = parentRect.left(),
@@ -446,7 +446,7 @@ KdmItem::placementHint( const TQRect &parentRect )
else {
if (!boxManager)
return parentRect;
- boxHint = boxManager->sizeHint();
+ boxHint = boxManager->tqsizeHint();
}
kdDebug() << timestamp() << " boxHint " << boxHint << endl;
}
@@ -456,21 +456,21 @@ KdmItem::placementHint( const TQRect &parentRect )
else if (pos.xType == DTnpixel)
x = parentRect.right() - pos.x;
else if (pos.xType == DTpercent)
- x += qRound( parentRect.width() / 100.0 * pos.x );
+ x += tqRound( parentRect.width() / 100.0 * pos.x );
if (pos.yType == DTpixel)
y += pos.y;
else if (pos.yType == DTnpixel)
y = parentRect.bottom() - pos.y;
else if (pos.yType == DTpercent)
- y += qRound( parentRect.height() / 100.0 * pos.y );
+ y += tqRound( parentRect.height() / 100.0 * pos.y );
if (pos.wType == DTpixel)
w = pos.width;
else if (pos.wType == DTnpixel)
w -= pos.width;
else if (pos.wType == DTpercent)
- w = qRound( parentRect.width() / 100.0 * pos.width );
+ w = tqRound( parentRect.width() / 100.0 * pos.width );
else if (pos.wType == DTbox)
w = boxHint.width();
else if (hintedSize.width() > 0)
@@ -483,7 +483,7 @@ KdmItem::placementHint( const TQRect &parentRect )
else if (pos.hType == DTnpixel)
h -= pos.height;
else if (pos.hType == DTpercent)
- h = qRound( parentRect.height() / 100.0 * pos.height );
+ h = tqRound( parentRect.height() / 100.0 * pos.height );
else if (pos.hType == DTbox)
h = boxHint.height();
else if (hintedSize.height() > 0) {
@@ -496,7 +496,7 @@ KdmItem::placementHint( const TQRect &parentRect )
// we choose to take the hinted size, but it's better to listen to the aspect ratio
if (pos.wType == DTnone && pos.hType != DTnone && h && w) {
- w = qRound(float(hintedSize.width() * h) / hintedSize.height());
+ w = tqRound(float(hintedSize.width() * h) / hintedSize.height());
}
// defaults to center
@@ -504,13 +504,13 @@ KdmItem::placementHint( const TQRect &parentRect )
// anchor the rect to an edge / corner
if (pos.anchor.length() > 0 && pos.anchor.length() < 3) {
- if (pos.anchor.find( 'n' ) >= 0)
+ if (pos.anchor.tqfind( 'n' ) >= 0)
dy = 0;
- if (pos.anchor.find( 's' ) >= 0)
+ if (pos.anchor.tqfind( 's' ) >= 0)
dy = -h;
- if (pos.anchor.find( 'w' ) >= 0)
+ if (pos.anchor.tqfind( 'w' ) >= 0)
dx = 0;
- if (pos.anchor.find( 'e' ) >= 0)
+ if (pos.anchor.tqfind( 'e' ) >= 0)
dx = -w;
}
// KdmItem *p = static_cast<KdmItem*>( parent() );
@@ -555,11 +555,11 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType )
if (s == "box") { // box value
dType = DTbox;
val = 0;
- } else if ((p = s.find( '%' )) >= 0) { // percent value
+ } else if ((p = s.tqfind( '%' )) >= 0) { // percent value
dType = DTpercent;
TQString sCopy = s;
sCopy.remove( p, 1 );
- sCopy.replace( ',', '.' );
+ sCopy.tqreplace( ',', '.' );
val = (int)sCopy.toDouble();
} else { // int value
dType = DTpixel;
@@ -568,7 +568,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType )
sCopy.remove( 0, 1 );
dType = DTnpixel;
}
- sCopy.replace( ',', '.' );
+ sCopy.tqreplace( ',', '.' );
val = (int)sCopy.toDouble();
}
}
@@ -576,7 +576,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType )
void
KdmItem::parseFont( const TQString &s, TQFont &font )
{
- int splitAt = s.findRev( ' ' );
+ int splitAt = s.tqfindRev( ' ' );
if (splitAt < 1)
return;
font.setFamily( s.left( splitAt ) );
@@ -614,16 +614,16 @@ KdmItem::setFixedLayout( const TQDomNode &node )
}
TQWidget *
-KdmItem::parentWidget() const
+KdmItem::tqparentWidget() const
{
if (myWidget)
return myWidget;
if (!this->parent())
return 0;
- if (parent()->qt_cast("TQWidget"))
+ if (tqparent()->tqqt_cast("TQWidget"))
return (TQWidget*)parent();
- return ((KdmItem*)parent())->parentWidget();
+ return ((KdmItem*)parent())->tqparentWidget();
}
#include "kdmitem.moc"