diff options
Diffstat (limited to 'kdm/kfrontend/themer')
-rw-r--r-- | kdm/kfrontend/themer/kdmitem.cpp | 50 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmitem.h | 38 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmlabel.cpp | 10 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmlabel.h | 2 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmlayout.cpp | 32 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmlayout.h | 14 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmpixmap.cpp | 14 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmpixmap.h | 2 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmrect.cpp | 2 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmthemer.cpp | 2 | ||||
-rw-r--r-- | kdm/kfrontend/themer/kdmthemer.h | 4 |
11 files changed, 85 insertions, 85 deletions
diff --git a/kdm/kfrontend/themer/kdmitem.cpp b/kdm/kfrontend/themer/kdmitem.cpp index a171bd1bb..1233a96d2 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 layout for every item + // Set default tqlayout 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 layouts not implemented, prolly pointless anyway + // XXX showing of tqlayouts not implemented, prolly pointless anyway needUpdate(); } @@ -170,7 +170,7 @@ KdmItem::hide( bool force ) if (myWidget) myWidget->hide(); - // XXX hiding of layouts not implemented, prolly pointless anyway + // XXX hiding of tqlayouts 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(layoutItemGone()) ); - else if (myLayoutItem->layout()) - connect( myLayoutItem->layout(), TQT_SIGNAL(destroyed()), - TQT_SLOT(layoutItemGone()) ); + TQT_SLOT(tqlayoutItemGone()) ); + else if (myLayoutItem->tqlayout()) + connect( myLayoutItem->tqlayout(), TQT_SIGNAL(destroyed()), + TQT_SLOT(tqlayoutItemGone()) ); } void -KdmItem::layoutItemGone() +KdmItem::tqlayoutItemGone() { myLayoutItem = 0; } @@ -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( ©, TQPoint( 0, 0), p->device(), myWidget->geometry(), Qt::CopyROP ); + kdDebug() << myWidget->tqgeometry() << " " << area << " " << myWidget->size() << endl; + bitBlt( ©, TQPoint( 0, 0), p->device(), myWidget->tqgeometry(), 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.contains( x, y )) { + if (area.tqcontains( x, y )) { if (released && oldState == Sactive) { if (buttonParent) emit activated( id ); @@ -415,12 +415,12 @@ KdmItem::statusChanged() // BEGIN protected inheritable QSize -KdmItem::sizeHint() +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 ); @@ -429,7 +429,7 @@ KdmItem::sizeHint() QRect 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 @@ -559,7 +559,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType ) 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(); } } @@ -614,7 +614,7 @@ KdmItem::setFixedLayout( const TQDomNode &node ) } TQWidget * -KdmItem::parentWidget() const +KdmItem::tqparentWidget() const { if (myWidget) return myWidget; @@ -623,7 +623,7 @@ KdmItem::parentWidget() const if (parent()->qt_cast("TQWidget")) return (TQWidget*)parent(); - return ((KdmItem*)parent())->parentWidget(); + return ((KdmItem*)parent())->tqparentWidget(); } #include "kdmitem.moc" diff --git a/kdm/kfrontend/themer/kdmitem.h b/kdm/kfrontend/themer/kdmitem.h index 230ed71c4..975033b33 100644 --- a/kdm/kfrontend/themer/kdmitem.h +++ b/kdm/kfrontend/themer/kdmitem.h @@ -52,14 +52,14 @@ class TQLayoutItem; */ /** - * A note on layouting - how does it work? - * - setgeometry is called by parent (passing the new geometry) - * - item changes its geometry + * A note on tqlayouting - how does it work? + * - settqgeometry is called by parent (passing the new tqgeometry) + * - item changes its tqgeometry * - if item embeds a widget, reposition it too * - call children's box manager. box->update( my geom ) * - sum up the whole space taken by children (via *hint calls) if * needed for box width / height computation. note that the computed - * geometry should be equal or similar to parent's geometry. + * tqgeometry should be equal or similar to parent's tqgeometry. * - pad the rectangle bounding box' contents * - for every child * - if vertical @@ -74,7 +74,7 @@ class TQLayoutItem; * and insertion entry points are vertical lines * - call to children's fix manager. fixed->update( my geom ) * - for every child - * - S = get child's geometry hint (and we'll give item the whole + * - S = get child's tqgeometry hint (and we'll give item the whole * space it needs, without constraints) * - call to child->setGeometry( S ) * - TODO: send a selective redraw signal also merging children's areas @@ -95,8 +95,8 @@ public: virtual ~KdmItem(); /** - * Fixup the geometry of an item and its children (even if fixed - * or boxed ones). Note that this will generate repaint signals + * Fixup the tqgeometry of an item and its children (even if fixed + * or boxed ones). Note that this will generate tqrepaint signals * when needed. The default implementation should fit all needs. */ virtual void setGeometry( const TQRect &newGeometry, bool force ); @@ -109,7 +109,7 @@ public: void paint( TQPainter *painter, const TQRect &boundaries ); /** - * Update representation of contents and repaint. + * Update representation of contents and tqrepaint. */ virtual void update(); @@ -120,22 +120,22 @@ public: void mouseEvent( int x, int y, bool pressed = false, bool released = false ); /** - * Similar to sizeHint(..), this returns the area of the item + * Similar to tqsizeHint(..), this returns the area of the item * given the @p parentGeometry. The default implementation - * takes into account geometric constraints and layoutings. - * @param parentGeometry the geometry of the caller item or a - * null rect if the geometry of the parent is not yet defined. + * takes into account geometric constraints and tqlayoutings. + * @param parentGeometry the tqgeometry of the caller item or a + * null rect if the tqgeometry of the parent is not yet defined. */ virtual TQRect placementHint( const TQRect &parentGeometry ); /** - * Create the box layout manager; next children will be - * managed by the box layouter + * Create the box tqlayout manager; next children will be + * managed by the box tqlayouter */ void setBoxLayout( const TQDomNode &node = TQDomNode() ); /** - * Create the fixed layout manager; next children will be + * Create the fixed tqlayout manager; next children will be * in fixed position relative to this item */ void setFixedLayout( const TQDomNode &node = TQDomNode() ); @@ -163,7 +163,7 @@ public: bool isExplicitlyHidden() const { return isShown == ExplicitlyHidden; } TQRect rect() const { return area; } - TQWidget *parentWidget() const; + TQWidget *tqparentWidget() const; TQString getId() const { return id; } signals: @@ -172,7 +172,7 @@ signals: protected slots: void widgetGone(); - void layoutItemGone(); + void tqlayoutItemGone(); protected: /** @@ -181,7 +181,7 @@ protected: * @return (-1,-1) if no size can be determined (so it should * default to parent's size). */ - virtual TQSize sizeHint(); + virtual TQSize tqsizeHint(); /** * Low level graphical function to paint the item. @@ -195,7 +195,7 @@ protected: /** * Called when item changes its 'state' variable. This must - * handle item's repaint. + * handle item's tqrepaint. */ virtual void statusChanged(); diff --git a/kdm/kfrontend/themer/kdmlabel.cpp b/kdm/kfrontend/themer/kdmlabel.cpp index e83ae9dc7..fb6a03b91 100644 --- a/kdm/kfrontend/themer/kdmlabel.cpp +++ b/kdm/kfrontend/themer/kdmlabel.cpp @@ -115,8 +115,8 @@ KdmLabel::setTextInt( const TQString &txt) myAccel = 0; if (cAccel != -1) { cText.remove('&'); - myAccel = new TQAccel(parentWidget()); - myAccel->insertItem(ALT + UNICODE_ACCEL + cText.at(cAccel).lower().unicode()); + myAccel = new TQAccel(tqparentWidget()); + myAccel->insertItem(ALT + UNICODE_ACCEL + cText.at(cAccel).lower().tqunicode()); connect(myAccel, TQT_SIGNAL(activated(int)), TQT_SLOT(slotAccel())); } } @@ -138,7 +138,7 @@ KdmLabel::setText( const TQString &txt ) } QSize -KdmLabel::sizeHint() +KdmLabel::tqsizeHint() { // choose the correct label class struct LabelStruct::LabelClass *l = &label.normal; @@ -250,7 +250,7 @@ KdmLabel::lookupText( const TQString &t ) { TQString text = t; - text.replace( '_', '&' ); + text.tqreplace( '_', '&' ); TQMap<TQChar,TQString> m; struct utsname uts; @@ -268,7 +268,7 @@ KdmLabel::lookupText( const TQString &t ) m['s'] = KThemedGreeter::timedUser; // xgettext:no-c-format KGlobal::locale()->setDateFormat( i18n("date format", "%a %d %B") ); - m['c'] = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false, false ); + m['c'] = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), false, false ); return KMacroExpander::expandMacros( text, m ); } diff --git a/kdm/kfrontend/themer/kdmlabel.h b/kdm/kfrontend/themer/kdmlabel.h index 1ec2f88ec..33ce1cc00 100644 --- a/kdm/kfrontend/themer/kdmlabel.h +++ b/kdm/kfrontend/themer/kdmlabel.h @@ -42,7 +42,7 @@ public: protected: // reimplemented; returns the minimum size of rendered text - virtual TQSize sizeHint(); + virtual TQSize tqsizeHint(); // draw the label virtual void drawContents( TQPainter *p, const TQRect &r ); diff --git a/kdm/kfrontend/themer/kdmlayout.cpp b/kdm/kfrontend/themer/kdmlayout.cpp index b17d2e7b7..bc1a059c5 100644 --- a/kdm/kfrontend/themer/kdmlayout.cpp +++ b/kdm/kfrontend/themer/kdmlayout.cpp @@ -38,7 +38,7 @@ KdmLayoutFixed::update( const TQRect &parentGeometry, bool force ) { kdDebug() << timestamp() << " KdmLayoutFixed::update " << parentGeometry << endl; - // I can't layout children if the parent rectangle is not valid + // I can't tqlayout children if the parent rectangle is not valid if (parentGeometry.width() < 0 || parentGeometry.height() < 0) { kdDebug() << timestamp() << " invalid\n"; return; @@ -67,14 +67,14 @@ KdmLayoutBox::update( const TQRect &parentGeometry, bool force ) { kdDebug() << this << " update " << parentGeometry << endl; - // I can't layout children if the parent rectangle is not valid + // I can't tqlayout children if the parent rectangle is not valid if (!parentGeometry.isValid() || parentGeometry.isEmpty()) return; // Check if box size was computed. If not compute it // TODO check if this prevents updating changing items // if (!hintedSize.isValid()) -// sizeHint(); +// tqsizeHint(); // kdDebug() << this << " hintedSize " << hintedSize << endl; @@ -114,30 +114,30 @@ KdmLayoutBox::update( const TQRect &parentGeometry, bool force ) if ((*it)->isExplicitlyHidden()) continue; - TQRect temp = childrenRect, itemRect; + TQRect temp = childrenRect, tqitemRect; if (box.isVertical) { temp.setHeight( 0 ); - itemRect = (*it)->placementHint( temp ); - temp.setHeight( itemRect.height() ); - childrenRect.setTop( childrenRect.top() + itemRect.size().height() + box.spacing ); + tqitemRect = (*it)->placementHint( temp ); + temp.setHeight( tqitemRect.height() ); + childrenRect.setTop( childrenRect.top() + tqitemRect.size().height() + box.spacing ); } else { temp.setWidth( 0 ); - itemRect = (*it)->placementHint( temp ); - kdDebug() << this << " placementHint " << *it << " " << temp << " " << itemRect << endl; - temp.setWidth( itemRect.width() ); - childrenRect.setLeft( childrenRect.left() + itemRect.size().width() + box.spacing ); + tqitemRect = (*it)->placementHint( temp ); + kdDebug() << this << " placementHint " << *it << " " << temp << " " << tqitemRect << endl; + temp.setWidth( tqitemRect.width() ); + childrenRect.setLeft( childrenRect.left() + tqitemRect.size().width() + box.spacing ); kdDebug() << timestamp() << " childrenRect after " << *it << " " << childrenRect << endl; } - itemRect = (*it)->placementHint( temp ); - kdDebug() << this << " placementHint2 " << *it << " " << temp << " " << itemRect << endl; - (*it)->setGeometry( itemRect, force ); + tqitemRect = (*it)->placementHint( temp ); + kdDebug() << this << " placementHint2 " << *it << " " << temp << " " << tqitemRect << endl; + (*it)->setGeometry( tqitemRect, force ); } } } -//FIXME truly experimental (is so close to greeter_geometry.c) +//FIXME truly experimental (is so close to greeter_tqgeometry.c) QSize -KdmLayoutBox::sizeHint() +KdmLayoutBox::tqsizeHint() { // Sum up area taken by children int w = 0, h = 0; diff --git a/kdm/kfrontend/themer/kdmlayout.h b/kdm/kfrontend/themer/kdmlayout.h index 4c73e9a1b..75e90d573 100644 --- a/kdm/kfrontend/themer/kdmlayout.h +++ b/kdm/kfrontend/themer/kdmlayout.h @@ -43,11 +43,11 @@ public: // Adds an item that will be managed void addItem( KdmItem *item ) { m_children.append( item ); } - // Return false if any item are managed by this layouter + // Return false if any item are managed by this tqlayouter bool isEmpty() { return m_children.isEmpty(); } - // Updates the layout of all items knowing that the parent - // has the @p parentGeometry geometry + // Updates the tqlayout of all items knowing that the parent + // has the @p parentGeometry tqgeometry // virtual void update( const TQRect &parentGeometry ) = 0; protected: @@ -59,8 +59,8 @@ class KdmLayoutFixed : public KdmLayout { public: KdmLayoutFixed( const TQDomNode &node ); - // Updates the layout of all boxed items knowing that the parent - // has the @p parentGeometry geometry + // Updates the tqlayout of all boxed items knowing that the parent + // has the @p parentGeometry tqgeometry void update( const TQRect &parentGeometry, bool force ); }; @@ -74,13 +74,13 @@ class KdmLayoutBox : public KdmLayout { public: KdmLayoutBox( const TQDomNode &node ); - // Updates the layout of all boxed items knowing that they + // Updates the tqlayout of all boxed items knowing that they // should fit into @p parentGeometry container void update( const TQRect &parentGeometry, bool force ); // Computes the size hint of the box, telling which is the // smallest size inside which boxed items will fit - TQSize sizeHint(); + TQSize tqsizeHint(); private: struct { diff --git a/kdm/kfrontend/themer/kdmpixmap.cpp b/kdm/kfrontend/themer/kdmpixmap.cpp index 0fcbc065c..ce7ef8e07 100644 --- a/kdm/kfrontend/themer/kdmpixmap.cpp +++ b/kdm/kfrontend/themer/kdmpixmap.cpp @@ -97,7 +97,7 @@ KdmPixmap::KdmPixmap( KdmItem *parent, const TQDomNode &node, const char *name ) } QSize -KdmPixmap::sizeHint() +KdmPixmap::tqsizeHint() { // choose the correct pixmap class PixmapStruct::PixmapClass * pClass = &pixmap.normal; @@ -108,7 +108,7 @@ KdmPixmap::sizeHint() // use the pixmap size as the size hint if (!pClass->pixmap.isNull()) return pClass->pixmap.size(); - return KdmItem::sizeHint(); + return KdmItem::tqsizeHint(); } void @@ -268,11 +268,11 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r ) QRgb *ls = (QRgb *)scaledImage.scanLine( y ); for (int x = 0; x < w; ++x) { QRgb l = ls[x]; - int r = int( qRed( l ) * tint_red ); - int g = int( qGreen( l ) * tint_green ); - int b = int( qBlue( l ) * tint_blue ); - int a = int( qAlpha( l ) * tint_alpha ); - ls[x] = qRgba( r, g, b, a ); + int r = int( tqRed( l ) * tint_red ); + int g = int( tqGreen( l ) * tint_green ); + int b = int( tqBlue( l ) * tint_blue ); + int a = int( tqAlpha( l ) * tint_alpha ); + ls[x] = tqRgba( r, g, b, a ); } } diff --git a/kdm/kfrontend/themer/kdmpixmap.h b/kdm/kfrontend/themer/kdmpixmap.h index a12c9fea4..d49394bc9 100644 --- a/kdm/kfrontend/themer/kdmpixmap.h +++ b/kdm/kfrontend/themer/kdmpixmap.h @@ -42,7 +42,7 @@ public: protected: // reimplemented; returns the size of loaded pixmap - virtual TQSize sizeHint(); + virtual TQSize tqsizeHint(); // draw the pixmap virtual void drawContents( TQPainter *p, const TQRect &r ); diff --git a/kdm/kfrontend/themer/kdmrect.cpp b/kdm/kfrontend/themer/kdmrect.cpp index 1d854d213..5a252151c 100644 --- a/kdm/kfrontend/themer/kdmrect.cpp +++ b/kdm/kfrontend/themer/kdmrect.cpp @@ -141,7 +141,7 @@ KdmRect::recursiveSetAttribs( TQLayoutItem *li ) if ((w = li->widget())) setAttribs( w ); - else if ((l = li->layout())) { + else if ((l = li->tqlayout())) { TQLayoutIterator it = l->iterator(); for (TQLayoutItem *itm = it.current(); itm; itm = ++it) recursiveSetAttribs( itm ); diff --git a/kdm/kfrontend/themer/kdmthemer.cpp b/kdm/kfrontend/themer/kdmthemer.cpp index 9e6db33db..16d9e4f86 100644 --- a/kdm/kfrontend/themer/kdmthemer.cpp +++ b/kdm/kfrontend/themer/kdmthemer.cpp @@ -223,7 +223,7 @@ KdmThemer::generateItems( KdmItem *parent, const TQDomNode &node ) TQString id = el.attribute("id"); if (id.startsWith("plugin-specific-")) { id = id.mid(strlen("plugin-specific-")); - if (!_pluginsLogin.contains(id)) + if (!_pluginsLogin.tqcontains(id)) continue; } diff --git a/kdm/kfrontend/themer/kdmthemer.h b/kdm/kfrontend/themer/kdmthemer.h index 6dc2318dd..0c4cd3753 100644 --- a/kdm/kfrontend/themer/kdmthemer.h +++ b/kdm/kfrontend/themer/kdmthemer.h @@ -60,9 +60,9 @@ public: bool isOK() { return rootItem != 0; } /* - * Gives a sizeHint to the widget (parent size) + * Gives a tqsizeHint to the widget (parent size) */ - //TQSize sizeHint() const{ return parentWidget()->size(); } + //TQSize tqsizeHint() const{ return tqparentWidget()->size(); } /* * Takes a shot of the current widget |