From fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 04:10:07 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1212480 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdm/kfrontend/themer/kdmitem.cpp | 50 +++++++++++++++++++------------------- kdm/kfrontend/themer/kdmitem.h | 38 ++++++++++++++--------------- kdm/kfrontend/themer/kdmlabel.cpp | 10 ++++---- kdm/kfrontend/themer/kdmlabel.h | 2 +- kdm/kfrontend/themer/kdmlayout.cpp | 32 ++++++++++++------------ kdm/kfrontend/themer/kdmlayout.h | 14 +++++------ kdm/kfrontend/themer/kdmpixmap.cpp | 14 +++++------ kdm/kfrontend/themer/kdmpixmap.h | 2 +- kdm/kfrontend/themer/kdmrect.cpp | 2 +- kdm/kfrontend/themer/kdmthemer.cpp | 2 +- kdm/kfrontend/themer/kdmthemer.h | 4 +-- 11 files changed, 85 insertions(+), 85 deletions(-) (limited to 'kdm/kfrontend/themer') 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( ©, TQPoint( 0, 0), p->device(), myWidget->tqgeometry(), Qt::CopyROP ); + kdDebug() << myWidget->geometry() << " " << area << " " << myWidget->size() << endl; + bitBlt( ©, 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" diff --git a/kdm/kfrontend/themer/kdmitem.h b/kdm/kfrontend/themer/kdmitem.h index 975033b33..230ed71c4 100644 --- a/kdm/kfrontend/themer/kdmitem.h +++ b/kdm/kfrontend/themer/kdmitem.h @@ -52,14 +52,14 @@ class TQLayoutItem; */ /** - * A note on tqlayouting - how does it work? - * - settqgeometry is called by parent (passing the new tqgeometry) - * - item changes its tqgeometry + * A note on layouting - how does it work? + * - setgeometry is called by parent (passing the new geometry) + * - item changes its geometry * - 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 - * tqgeometry should be equal or similar to parent's tqgeometry. + * geometry should be equal or similar to parent's geometry. * - 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 tqgeometry hint (and we'll give item the whole + * - S = get child's geometry 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 tqgeometry of an item and its children (even if fixed - * or boxed ones). Note that this will generate tqrepaint signals + * Fixup the geometry of an item and its children (even if fixed + * or boxed ones). Note that this will generate repaint 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 tqrepaint. + * Update representation of contents and repaint. */ virtual void update(); @@ -120,22 +120,22 @@ public: void mouseEvent( int x, int y, bool pressed = false, bool released = false ); /** - * Similar to tqsizeHint(..), this returns the area of the item + * Similar to sizeHint(..), this returns the area of the item * given the @p parentGeometry. The default implementation - * 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. + * 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. */ virtual TQRect placementHint( const TQRect &parentGeometry ); /** - * Create the box tqlayout manager; next children will be - * managed by the box tqlayouter + * Create the box layout manager; next children will be + * managed by the box layouter */ void setBoxLayout( const TQDomNode &node = TQDomNode() ); /** - * Create the fixed tqlayout manager; next children will be + * Create the fixed layout 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 *tqparentWidget() const; + TQWidget *parentWidget() const; TQString getId() const { return id; } signals: @@ -172,7 +172,7 @@ signals: protected slots: void widgetGone(); - void tqlayoutItemGone(); + void layoutItemGone(); 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 tqsizeHint(); + virtual TQSize sizeHint(); /** * 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 tqrepaint. + * handle item's repaint. */ virtual void statusChanged(); diff --git a/kdm/kfrontend/themer/kdmlabel.cpp b/kdm/kfrontend/themer/kdmlabel.cpp index fb6a03b91..e83ae9dc7 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(tqparentWidget()); - myAccel->insertItem(ALT + UNICODE_ACCEL + cText.at(cAccel).lower().tqunicode()); + myAccel = new TQAccel(parentWidget()); + myAccel->insertItem(ALT + UNICODE_ACCEL + cText.at(cAccel).lower().unicode()); connect(myAccel, TQT_SIGNAL(activated(int)), TQT_SLOT(slotAccel())); } } @@ -138,7 +138,7 @@ KdmLabel::setText( const TQString &txt ) } QSize -KdmLabel::tqsizeHint() +KdmLabel::sizeHint() { // choose the correct label class struct LabelStruct::LabelClass *l = &label.normal; @@ -250,7 +250,7 @@ KdmLabel::lookupText( const TQString &t ) { TQString text = t; - text.tqreplace( '_', '&' ); + text.replace( '_', '&' ); TQMap 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::tqcurrentDateTime(), false, false ); + m['c'] = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false, false ); return KMacroExpander::expandMacros( text, m ); } diff --git a/kdm/kfrontend/themer/kdmlabel.h b/kdm/kfrontend/themer/kdmlabel.h index 33ce1cc00..1ec2f88ec 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 tqsizeHint(); + virtual TQSize sizeHint(); // 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 bc1a059c5..b17d2e7b7 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 tqlayout children if the parent rectangle is not valid + // I can't layout 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 tqlayout children if the parent rectangle is not valid + // I can't layout 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()) -// tqsizeHint(); +// sizeHint(); // kdDebug() << this << " hintedSize " << hintedSize << endl; @@ -114,30 +114,30 @@ KdmLayoutBox::update( const TQRect &parentGeometry, bool force ) if ((*it)->isExplicitlyHidden()) continue; - TQRect temp = childrenRect, tqitemRect; + TQRect temp = childrenRect, itemRect; if (box.isVertical) { temp.setHeight( 0 ); - tqitemRect = (*it)->placementHint( temp ); - temp.setHeight( tqitemRect.height() ); - childrenRect.setTop( childrenRect.top() + tqitemRect.size().height() + box.spacing ); + itemRect = (*it)->placementHint( temp ); + temp.setHeight( itemRect.height() ); + childrenRect.setTop( childrenRect.top() + itemRect.size().height() + box.spacing ); } else { temp.setWidth( 0 ); - tqitemRect = (*it)->placementHint( temp ); - kdDebug() << this << " placementHint " << *it << " " << temp << " " << tqitemRect << endl; - temp.setWidth( tqitemRect.width() ); - childrenRect.setLeft( childrenRect.left() + tqitemRect.size().width() + box.spacing ); + itemRect = (*it)->placementHint( temp ); + kdDebug() << this << " placementHint " << *it << " " << temp << " " << itemRect << endl; + temp.setWidth( itemRect.width() ); + childrenRect.setLeft( childrenRect.left() + itemRect.size().width() + box.spacing ); kdDebug() << timestamp() << " childrenRect after " << *it << " " << childrenRect << endl; } - tqitemRect = (*it)->placementHint( temp ); - kdDebug() << this << " placementHint2 " << *it << " " << temp << " " << tqitemRect << endl; - (*it)->setGeometry( tqitemRect, force ); + itemRect = (*it)->placementHint( temp ); + kdDebug() << this << " placementHint2 " << *it << " " << temp << " " << itemRect << endl; + (*it)->setGeometry( itemRect, force ); } } } -//FIXME truly experimental (is so close to greeter_tqgeometry.c) +//FIXME truly experimental (is so close to greeter_geometry.c) QSize -KdmLayoutBox::tqsizeHint() +KdmLayoutBox::sizeHint() { // 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 75e90d573..4c73e9a1b 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 tqlayouter + // Return false if any item are managed by this layouter bool isEmpty() { return m_children.isEmpty(); } - // Updates the tqlayout of all items knowing that the parent - // has the @p parentGeometry tqgeometry + // Updates the layout of all items knowing that the parent + // has the @p parentGeometry geometry // virtual void update( const TQRect &parentGeometry ) = 0; protected: @@ -59,8 +59,8 @@ class KdmLayoutFixed : public KdmLayout { public: KdmLayoutFixed( const TQDomNode &node ); - // Updates the tqlayout of all boxed items knowing that the parent - // has the @p parentGeometry tqgeometry + // Updates the layout of all boxed items knowing that the parent + // has the @p parentGeometry geometry void update( const TQRect &parentGeometry, bool force ); }; @@ -74,13 +74,13 @@ class KdmLayoutBox : public KdmLayout { public: KdmLayoutBox( const TQDomNode &node ); - // Updates the tqlayout of all boxed items knowing that they + // Updates the layout 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 tqsizeHint(); + TQSize sizeHint(); private: struct { diff --git a/kdm/kfrontend/themer/kdmpixmap.cpp b/kdm/kfrontend/themer/kdmpixmap.cpp index ce7ef8e07..0fcbc065c 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::tqsizeHint() +KdmPixmap::sizeHint() { // choose the correct pixmap class PixmapStruct::PixmapClass * pClass = &pixmap.normal; @@ -108,7 +108,7 @@ KdmPixmap::tqsizeHint() // use the pixmap size as the size hint if (!pClass->pixmap.isNull()) return pClass->pixmap.size(); - return KdmItem::tqsizeHint(); + return KdmItem::sizeHint(); } 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( 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 ); + 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 ); } } diff --git a/kdm/kfrontend/themer/kdmpixmap.h b/kdm/kfrontend/themer/kdmpixmap.h index d49394bc9..a12c9fea4 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 tqsizeHint(); + virtual TQSize sizeHint(); // 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 5a252151c..1d854d213 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->tqlayout())) { + else if ((l = li->layout())) { 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 16d9e4f86..9e6db33db 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.tqcontains(id)) + if (!_pluginsLogin.contains(id)) continue; } diff --git a/kdm/kfrontend/themer/kdmthemer.h b/kdm/kfrontend/themer/kdmthemer.h index 0c4cd3753..6dc2318dd 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 tqsizeHint to the widget (parent size) + * Gives a sizeHint to the widget (parent size) */ - //TQSize tqsizeHint() const{ return tqparentWidget()->size(); } + //TQSize sizeHint() const{ return parentWidget()->size(); } /* * Takes a shot of the current widget -- cgit v1.2.1