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.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kdm/kfrontend/themer/kdmitem.cpp b/kdm/kfrontend/themer/kdmitem.cpp
index 1233a96d2..a171bd1bb 100644
--- a/kdm/kfrontend/themer/kdmitem.cpp
+++ b/kdm/kfrontend/themer/kdmitem.cpp
@@ -66,7 +66,7 @@ KdmItem::KdmItem( TQWidget *parent, const TQDomNode &node, const char *name )
void
KdmItem::init( const TQDomNode &node, const char * )
{
- // Set default tqlayout for every item
+ // Set default layout for every item
currentManager = MNone;
pos.x = pos.y = 0;
pos.width = pos.height = 1;
@@ -146,7 +146,7 @@ KdmItem::show( bool force )
if (myWidget)
myWidget->show();
- // XXX showing of tqlayouts not implemented, prolly pointless anyway
+ // XXX showing of layouts not implemented, prolly pointless anyway
needUpdate();
}
@@ -170,7 +170,7 @@ KdmItem::hide( bool force )
if (myWidget)
myWidget->hide();
- // XXX hiding of tqlayouts not implemented, prolly pointless anyway
+ // XXX hiding of layouts not implemented, prolly pointless anyway
needUpdate();
}
@@ -236,14 +236,14 @@ KdmItem::setLayoutItem( TQLayoutItem *item )
// XXX hiding not supported - it think it's pointless here
if (myLayoutItem->widget())
connect( myLayoutItem->widget(), TQT_SIGNAL(destroyed()),
- TQT_SLOT(tqlayoutItemGone()) );
- else if (myLayoutItem->tqlayout())
- connect( myLayoutItem->tqlayout(), TQT_SIGNAL(destroyed()),
- TQT_SLOT(tqlayoutItemGone()) );
+ TQT_SLOT(layoutItemGone()) );
+ else if (myLayoutItem->layout())
+ connect( myLayoutItem->layout(), TQT_SIGNAL(destroyed()),
+ TQT_SLOT(layoutItemGone()) );
}
void
-KdmItem::tqlayoutItemGone()
+KdmItem::layoutItemGone()
{
myLayoutItem = 0;
}
@@ -278,7 +278,7 @@ KdmItem::setGeometry( const TQRect &newGeometry, bool force )
if (fixedManager && !fixedManager->isEmpty())
fixedManager->update( newGeometry, force );
- // TODO send *selective* tqrepaint signal
+ // TODO send *selective* repaint 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->tqgeometry() << " " << area << " " << myWidget->size() << endl;
- bitBlt( &copy, TQPoint( 0, 0), p->device(), myWidget->tqgeometry(), Qt::CopyROP );
+ kdDebug() << myWidget->geometry() << " " << area << " " << myWidget->size() << endl;
+ bitBlt( &copy, TQPoint( 0, 0), p->device(), myWidget->geometry(), Qt::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.tqcontains( x, y )) {
+ if (area.contains( x, y )) {
if (released && oldState == Sactive) {
if (buttonParent)
emit activated( id );
@@ -415,12 +415,12 @@ KdmItem::statusChanged()
// BEGIN protected inheritable
QSize
-KdmItem::tqsizeHint()
+KdmItem::sizeHint()
{
if (myWidget)
return myWidget->size();
if (myLayoutItem)
- return myLayoutItem->tqsizeHint();
+ return myLayoutItem->sizeHint();
int w = pos.wType == DTpixel ? kAbs( pos.width ) : -1,
h = pos.hType == DTpixel ? kAbs( pos.height ) : -1;
return TQSize( w, h );
@@ -429,7 +429,7 @@ KdmItem::tqsizeHint()
QRect
KdmItem::placementHint( const TQRect &parentRect )
{
- TQSize hintedSize = tqsizeHint();
+ TQSize hintedSize = sizeHint();
TQSize boxHint;
int x = parentRect.left(),
@@ -446,7 +446,7 @@ KdmItem::placementHint( const TQRect &parentRect )
else {
if (!boxManager)
return parentRect;
- boxHint = boxManager->tqsizeHint();
+ boxHint = boxManager->sizeHint();
}
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 += tqRound( parentRect.width() / 100.0 * pos.x );
+ x += qRound( 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 += tqRound( parentRect.height() / 100.0 * pos.y );
+ y += qRound( 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 = tqRound( parentRect.width() / 100.0 * pos.width );
+ w = qRound( 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 = tqRound( parentRect.height() / 100.0 * pos.height );
+ h = qRound( 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 = tqRound(float(hintedSize.width() * h) / hintedSize.height());
+ w = qRound(float(hintedSize.width() * h) / hintedSize.height());
}
// defaults to center
@@ -559,7 +559,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType )
dType = DTpercent;
TQString sCopy = s;
sCopy.remove( p, 1 );
- sCopy.tqreplace( ',', '.' );
+ sCopy.replace( ',', '.' );
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.tqreplace( ',', '.' );
+ sCopy.replace( ',', '.' );
val = (int)sCopy.toDouble();
}
}
@@ -614,7 +614,7 @@ KdmItem::setFixedLayout( const TQDomNode &node )
}
TQWidget *
-KdmItem::tqparentWidget() const
+KdmItem::parentWidget() const
{
if (myWidget)
return myWidget;
@@ -623,7 +623,7 @@ KdmItem::tqparentWidget() const
if (parent()->qt_cast("TQWidget"))
return (TQWidget*)parent();
- return ((KdmItem*)parent())->tqparentWidget();
+ return ((KdmItem*)parent())->parentWidget();
}
#include "kdmitem.moc"