From 8155225c9be993acc0512956416d195edfef4eb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Jan 2011 01:42:14 +0000 Subject: Enable compilation with TQt for Qt4 3.4.0 TP2 This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/background/bgadvanced.cpp | 8 ++-- kcontrol/background/bgadvanced_ui.ui | 46 ++++++++++----------- kcontrol/background/bgdialog.cpp | 42 +++++++++---------- kcontrol/background/bgdialog_ui.ui | 78 +++++++++++++++++------------------ kcontrol/background/bghash.h | 4 +- kcontrol/background/bgmonitor.cpp | 8 ++-- kcontrol/background/bgmonitor.h | 6 +-- kcontrol/background/bgrender.cpp | 48 ++++++++++----------- kcontrol/background/bgsettings.cpp | 30 +++++++------- kcontrol/background/bgwallpaper.h | 2 +- kcontrol/background/bgwallpaper_ui.ui | 28 ++++++------- kcontrol/background/main.cpp | 2 +- 12 files changed, 151 insertions(+), 151 deletions(-) (limited to 'kcontrol/background') diff --git a/kcontrol/background/bgadvanced.cpp b/kcontrol/background/bgadvanced.cpp index e1f9ece96..644cfc9df 100644 --- a/kcontrol/background/bgadvanced.cpp +++ b/kcontrol/background/bgadvanced.cpp @@ -240,7 +240,7 @@ void BGAdvancedDialog::updateUI() void BGAdvancedDialog::removeProgram(const TQString &name) { - if (m_programItems.find(name)) + if (m_programItems.tqfind(name)) { delete m_programItems[name]; m_programItems.remove(name); @@ -265,7 +265,7 @@ void BGAdvancedDialog::addProgram(const TQString &name) void BGAdvancedDialog::selectProgram(const TQString &name) { - if (m_programItems.find(name)) + if (m_programItems.tqfind(name)) { TQListViewItem *item = m_programItems[name]; dlg->m_listPrograms->ensureItemVisible(item); @@ -432,9 +432,9 @@ KProgramEditDialog::KProgramEditDialog(const TQString &program, TQWidget *parent m_RefreshEdit->setRange(5, 60); m_RefreshEdit->setSteps(5, 10); m_RefreshEdit->setSuffix(i18n(" min")); - m_RefreshEdit->setFixedSize(m_RefreshEdit->sizeHint()); + m_RefreshEdit->setFixedSize(m_RefreshEdit->tqsizeHint()); lbl->setBuddy(m_RefreshEdit); - grid->addWidget(m_RefreshEdit, 5, 1, AlignLeft); + grid->addWidget(m_RefreshEdit, 5, 1, Qt::AlignLeft); m_Program = program; if (m_Program.isEmpty()) { diff --git a/kcontrol/background/bgadvanced_ui.ui b/kcontrol/background/bgadvanced_ui.ui index 6aa3d436a..55dbc384e 100644 --- a/kcontrol/background/bgadvanced_ui.ui +++ b/kcontrol/background/bgadvanced_ui.ui @@ -1,6 +1,6 @@ BGAdvancedBase - + BGAdvancedBase @@ -19,7 +19,7 @@ 0 - + m_groupProgram @@ -33,7 +33,7 @@ 11 - + m_buttonAdd @@ -50,7 +50,7 @@ </qt> - + m_buttonRemove @@ -64,7 +64,7 @@ Click here to remove programs from this list. Please note that it does not remove the program from your system, it only removes it from the available options in the background drawing programs list. - + m_buttonModify @@ -91,14 +91,14 @@ Expanding - + 20 20 - + Program @@ -138,7 +138,7 @@ false - + 400 0 @@ -156,7 +156,7 @@ You can also remove programs from this list clicking on the <b>Remove</ </qt> - + m_cbProgram @@ -169,7 +169,7 @@ You can also remove programs from this list clicking on the <b>Remove</ - + m_groupIconText @@ -199,7 +199,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Click here to change the color of the desktop font. - + textLabel6 @@ -223,7 +223,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Expanding - + 220 20 @@ -244,7 +244,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Click here to select the solid background color. Choose a different color from the background text color to assure readability. - + m_cbSolidTextBackground @@ -255,7 +255,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Check here if you want to use a solid background color. This is useful to ensure that the desktop text will be identifiable against all background colors and wallpapers, or in other words, that a background or wallpaper will not make a desktop text of a similar color difficult to read. - + m_cbShadow @@ -266,7 +266,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Check here to enable a shadow outline around the desktop font. This also improves the readability of the desktop text against backgrounds of a similar color. - + textLabel6_2 @@ -280,7 +280,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Choose here the maximum number of text lines below an icon on the desktop. Longer text will be truncated at the end of the last line. - + m_spinTextLines @@ -294,7 +294,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Choose here the maximum number of text lines below an icon on the desktop. Longer text will be truncated at the end of the last line. - + m_spinTextWidth @@ -314,7 +314,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Choose here the maximum width of text lines (in pixel) below an icon on the desktop. If set to 'Auto' a default width based on the current font is used. - + textLabel6_2_2 @@ -330,7 +330,7 @@ You can also remove programs from this list clicking on the <b>Remove</ - + m_groupCache @@ -344,7 +344,7 @@ You can also remove programs from this list clicking on the <b>Remove</ 11 - + m_lblCache @@ -355,7 +355,7 @@ You can also remove programs from this list clicking on the <b>Remove</ In this box you can enter how much memory KDE should use for caching the background(s). If you have different backgrounds for the different desktops caching can make switching desktops smoother at the expense of higher memory use. - + m_spinCache @@ -376,7 +376,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Expanding - + 20 20 @@ -395,7 +395,7 @@ You can also remove programs from this list clicking on the <b>Remove</ Expanding - + 20 16 diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp index 8294f53a3..b166704ad 100644 --- a/kcontrol/background/bgdialog.cpp +++ b/kcontrol/background/bgdialog.cpp @@ -75,7 +75,7 @@ BGDialog::BGDialog(TQWidget* parent, KConfig* _config, bool _multidesktop) m_previewUpdates = true; KWinModule *m_kwin; - m_kwin = new KWinModule(this); + m_kwin = new KWinModule(TQT_TQOBJECT(this)); m_curDesk = m_kwin->currentDesktop(); TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop())); m_useViewports = s.width() * s.height() > 1; @@ -142,7 +142,7 @@ BGDialog::BGDialog(TQWidget* parent, KConfig* _config, bool _multidesktop) } // background image settings - TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen")); + TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("fileopen")); TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_urlWallpaperButton->setIconSet( iconSet ); m_urlWallpaperButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); @@ -257,7 +257,7 @@ BGDialog::BGDialog(TQWidget* parent, KConfig* _config, bool _multidesktop) updateUI(); #if (QT_VERSION-0 >= 0x030200) - connect( qApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized())); // RANDR support + connect( tqApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized())); // RANDR support #endif } @@ -405,7 +405,7 @@ void BGDialog::slotIdentifyScreens() // Taken from PositionTab::showIdentify in kdebase/kcontrol/kicker/positiontab_impl.cpp for(unsigned s = 0; s < m_numScreens; s++) { - TQLabel *screenLabel = new TQLabel(0,"Screen Identify", WDestructiveClose | WStyle_Customize | WX11BypassWM); + TQLabel *screenLabel = new TQLabel(0,"Screen Identify", (WFlags)(WDestructiveClose | WStyle_Customize | WX11BypassWM)); TQFont identifyFont(KGlobalSettings::generalFont()); identifyFont.setPixelSize(100); @@ -414,14 +414,14 @@ void BGDialog::slotIdentifyScreens() screenLabel->setFrameStyle(TQFrame::Panel); screenLabel->setFrameShadow(TQFrame::Plain); - screenLabel->setAlignment(Qt::AlignCenter); + screenLabel->tqsetAlignment(Qt::AlignCenter); screenLabel->setNum(int(s + 1)); // BUGLET: we should not allow the identification to be entered again // until the timer fires. TQTimer::singleShot(1500, screenLabel, TQT_SLOT(close())); TQPoint screenCenter(TQApplication::desktop()->screenGeometry(s).center()); - TQRect targetGeometry(TQPoint(0,0),screenLabel->sizeHint()); + TQRect targetGeometry(TQPoint(0,0),screenLabel->tqsizeHint()); targetGeometry.moveCenter(screenCenter); screenLabel->setGeometry(targetGeometry); @@ -441,14 +441,14 @@ void BGDialog::initUI() else { for (unsigned i = 0; i < (m_numDesks/m_numViewports); ++i) { for (unsigned j = 0; j < m_numViewports; ++j) { - m_comboDesktop->insertItem(i18n("Desktop %1 Viewport %2").arg(i+1).arg(j+1)); + m_comboDesktop->insertItem(i18n("Desktop %1 Viewport %2").tqarg(i+1).tqarg(j+1)); } } } // Screens for (unsigned i = 0; i < m_numScreens; ++i) - m_comboScreen->insertItem( i18n("Screen %1").arg(TQString::number(i+1)) ); + m_comboScreen->insertItem( i18n("Screen %1").tqarg(TQString::number(i+1)) ); // Patterns m_comboPattern->insertItem(i18n("Single Color")); @@ -510,7 +510,7 @@ void BGDialog::loadWallpaperFilesList() { KSimpleConfig fileConfig(*it); fileConfig.setGroup("Wallpaper"); - int slash = (*it).findRev('/') + 1; + int slash = (*it).tqfindRev('/') + 1; TQString directory = (*it).left(slash); TQString imageCaption = fileConfig.readEntry("Name"); @@ -524,14 +524,14 @@ void BGDialog::loadWallpaperFilesList() { if (imageCaption.isEmpty()) { imageCaption = fileName; - imageCaption.replace('_', ' '); + imageCaption.tqreplace('_', ' '); imageCaption = KStringHandler::capwords(imageCaption); } // avoid name collisions TQString rs = imageCaption; TQString lrs = rs.lower(); - for (int n = 1; papers.find(lrs) != papers.end(); ++n) + for (int n = 1; papers.tqfind(lrs) != papers.end(); ++n) { rs = imageCaption + " (" + TQString::number(n) + ')'; lrs = rs.lower(); @@ -562,8 +562,8 @@ void BGDialog::loadWallpaperFilesList() { if (imageCaption.isEmpty()) { - int slash = (*it).findRev('/') + 1; - int endDot = (*it).findRev('.'); + int slash = (*it).tqfindRev('/') + 1; + int endDot = (*it).tqfindRev('.'); // strip the extension if it exists if (endDot != -1 && endDot > slash) @@ -571,14 +571,14 @@ void BGDialog::loadWallpaperFilesList() { else imageCaption = (*it).mid(slash); - imageCaption.replace('_', ' '); + imageCaption.tqreplace('_', ' '); imageCaption = KStringHandler::capwords(imageCaption); } // avoid name collisions TQString rs = imageCaption; TQString lrs = rs.lower(); - for (int n = 1; papers.find(lrs) != papers.end(); ++n) + for (int n = 1; papers.tqfind(lrs) != papers.end(); ++n) { rs = imageCaption + " (" + TQString::number(n) + ')'; lrs = rs.lower(); @@ -606,12 +606,12 @@ void BGDialog::setWallpaper(const TQString &s) KComboBox *comboWallpaper = m_urlWallpaperBox; comboWallpaper->blockSignals(true); - if (m_wallpaper.find(s) == m_wallpaper.end()) + if (m_wallpaper.tqfind(s) == m_wallpaper.end()) { int i = comboWallpaper->count(); TQString imageCaption; - int slash = s.findRev('/') + 1; - int endDot = s.findRev('.'); + int slash = s.tqfindRev('/') + 1; + int endDot = s.tqfindRev('.'); // strip the extension if it exists if (endDot != -1 && endDot > slash) @@ -750,7 +750,7 @@ void BGDialog::updateUI() case KBackgroundSettings::Pattern: { - int i = m_patterns.findIndex(r->KBackgroundPattern::name()); + int i = m_patterns.tqfindIndex(r->KBackgroundPattern::name()); if (i >= 0) m_comboPattern->setCurrentItem(NR_PREDEF_PATTERNS+i); else @@ -1004,7 +1004,7 @@ void BGDialog::slotSetupMulti() { KBackgroundRenderer *r = eRenderer(); - BGMultiWallpaperDialog dlg(r, topLevelWidget()); + BGMultiWallpaperDialog dlg(r, tqtopLevelWidget()); if (dlg.exec() == TQDialog::Accepted) { r->stop(); m_slideShowRandom = r->multiWallpaperMode(); @@ -1182,7 +1182,7 @@ void BGDialog::slotAdvanced() KBackgroundRenderer *r = eRenderer(); m_previewUpdates = false; - BGAdvancedDialog dlg(r, topLevelWidget(), m_multidesktop); + BGAdvancedDialog dlg(r, tqtopLevelWidget(), m_multidesktop); if (!m_pMonitorArrangement->isEnabled()) { dlg.makeReadOnly(); diff --git a/kcontrol/background/bgdialog_ui.ui b/kcontrol/background/bgdialog_ui.ui index 7cc6571d5..c3d1a0344 100644 --- a/kcontrol/background/bgdialog_ui.ui +++ b/kcontrol/background/bgdialog_ui.ui @@ -1,6 +1,6 @@ BGDialog_UI - + BGDialog_UI @@ -20,7 +20,7 @@ 1 - + m_pDesktopLabel @@ -105,14 +105,14 @@ Expanding - + 0 0 - + layout36 @@ -120,7 +120,7 @@ unnamed - + m_screenArrangement @@ -132,14 +132,14 @@ 0 - + 100 0 - + layout35 @@ -161,14 +161,14 @@ Minimum - + 4 20 - + m_buttonIdentifyScreens @@ -197,7 +197,7 @@ Minimum - + 4 20 @@ -219,14 +219,14 @@ Minimum - + 4 20 - + m_buttonAdvanced @@ -255,7 +255,7 @@ Minimum - + 4 20 @@ -277,14 +277,14 @@ Minimum - + 4 20 - + m_buttonGetNew @@ -313,7 +313,7 @@ Minimum - + 4 20 @@ -333,7 +333,7 @@ MinimumExpanding - + 20 0 @@ -342,7 +342,7 @@ - + groupBox3 @@ -353,7 +353,7 @@ unnamed - + m_lblWallpaperPos @@ -376,7 +376,7 @@ </ul></qt> - + m_comboBlend @@ -384,7 +384,7 @@ If you have selected to use a background picture you can choose various methods of blending the background colors with the picture. The default option of "No Blending" means that the picture simply obscures the background colors below. - + layout31 @@ -416,7 +416,7 @@ - + m_lblColors @@ -427,7 +427,7 @@ m_comboPattern - + m_lblBlending @@ -438,7 +438,7 @@ m_comboBlend - + layout23 @@ -446,7 +446,7 @@ unnamed - + m_lblBlendBalance @@ -460,7 +460,7 @@ You can use this slider to control the degree of blending. You can experiment by moving the slider and looking at the effects in the preview image. - + m_sliderBlend @@ -488,7 +488,7 @@ - + m_cbBlendReverse @@ -499,7 +499,7 @@ For some types of blending, you can reverse the role of the background and the picture by checking this option. - + m_comboPattern @@ -522,7 +522,7 @@ Fixed - + 120 10 @@ -539,14 +539,14 @@ Fixed - + 130 10 - + m_comboWallpaperPos @@ -565,7 +565,7 @@ - + m_buttonGroupBackground @@ -576,7 +576,7 @@ unnamed - + m_radioNoPicture @@ -584,7 +584,7 @@ &No picture - + m_radioSlideShow @@ -592,7 +592,7 @@ &Slide show: - + m_radioPicture @@ -613,14 +613,14 @@ Expanding - + 260 20 - + m_buttonSetupWallpapers @@ -641,14 +641,14 @@ Expanding - + 110 16 - + m_urlWallpaperButton diff --git a/kcontrol/background/bghash.h b/kcontrol/background/bghash.h index ab13daf90..61e9d7300 100644 --- a/kcontrol/background/bghash.h +++ b/kcontrol/background/bghash.h @@ -5,10 +5,10 @@ * TQString -> int hash. From Qt's TQGDict::hashKeyString(). */ -static int QHash(TQString key) +static int TQHash(TQString key) { int g, h = 0; - const TQChar *p = key.unicode(); + const TQChar *p = key.tqunicode(); for (unsigned i=0; i < key.length(); i++) { h = (h << 4) + p[i].cell(); if ((g = (h & 0xf0000000))) diff --git a/kcontrol/background/bgmonitor.cpp b/kcontrol/background/bgmonitor.cpp index f78a7b616..696edc56c 100644 --- a/kcontrol/background/bgmonitor.cpp +++ b/kcontrol/background/bgmonitor.cpp @@ -157,7 +157,7 @@ void BGMonitorArrangement::setPixmap( const KPixmap & pm ) BGMonitorLabel::BGMonitorLabel(TQWidget *parent, const char *name) : TQLabel(parent, name) { - setAlignment(AlignCenter); + tqsetAlignment(AlignCenter); setScaledContents(true); setPixmap( TQPixmap( locate("data", "kcontrol/pics/monitor.png") ) ); m_pBGMonitor = new BGMonitor(this); @@ -168,8 +168,8 @@ BGMonitorLabel::BGMonitorLabel(TQWidget *parent, const char *name) void BGMonitorLabel::updateMonitorGeometry() { - double scaleX = double(width()) / double(sizeHint().width()); - double scaleY = double(height()) / double(sizeHint().height()); + double scaleX = double(width()) / double(tqsizeHint().width()); + double scaleY = double(height()) / double(tqsizeHint().height()); kdDebug() << k_funcinfo << " Setting geometry to " << TQRect( int(23*scaleX), int(14*scaleY), int(151*scaleX), int(115*scaleY) ) << endl; m_pBGMonitor->setGeometry( int(23*scaleX), int(14*scaleY), int(151*scaleX), int(115*scaleY) ); @@ -189,7 +189,7 @@ void BGMonitorLabel::resizeEvent( TQResizeEvent * e ) BGMonitor::BGMonitor(TQWidget *parent, const char *name) : TQLabel(parent, name) { - setAlignment(AlignCenter); + tqsetAlignment(AlignCenter); setScaledContents(true); setAcceptDrops(true); } diff --git a/kcontrol/background/bgmonitor.h b/kcontrol/background/bgmonitor.h index 92cf5eef4..4a86ea3d2 100644 --- a/kcontrol/background/bgmonitor.h +++ b/kcontrol/background/bgmonitor.h @@ -37,7 +37,7 @@ class KPixmap; * This class arranges and resizes a set of monitor images according to the * monitor geometries. */ -class BGMonitorArrangement : public QWidget +class BGMonitorArrangement : public TQWidget { Q_OBJECT public: @@ -72,7 +72,7 @@ protected: /** * Contains a BGMonitor. */ -class BGMonitorLabel : public QLabel +class BGMonitorLabel : public TQLabel { public: BGMonitorLabel(TQWidget *parent, const char *name=0L); @@ -93,7 +93,7 @@ protected: /** * This class handles drops on the preview monitor. */ -class BGMonitor : public QLabel +class BGMonitor : public TQLabel { Q_OBJECT public: diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp index f11363982..7fd5cffd8 100644 --- a/kcontrol/background/bgrender.cpp +++ b/kcontrol/background/bgrender.cpp @@ -124,32 +124,32 @@ TQString KBackgroundRenderer::buildCommand() if (cmd.isEmpty()) return TQString(); - while ((pos = cmd.find('%', pos)) != -1) { + while ((pos = cmd.tqfind('%', pos)) != -1) { if (pos == (int) (cmd.length() - 1)) break; - switch (cmd.at(pos+1).latin1()) { + switch (cmd.tqat(pos+1).latin1()) { case 'f': createTempFile(); - cmd.replace(pos, 2, KShellProcess::quote(m_Tempfile->name())); + cmd.tqreplace(pos, 2, KShellProcess::quote(m_Tempfile->name())); pos += m_Tempfile->name().length() - 2; break; case 'x': num.setNum(m_Size.width()); - cmd.replace(pos, 2, num); + cmd.tqreplace(pos, 2, num); pos += num.length() - 2; break; case 'y': num.setNum(m_Size.height()); - cmd.replace(pos, 2, num); + cmd.tqreplace(pos, 2, num); pos += num.length() - 2; break; case '%': - cmd.replace(pos, 2, "%"); + cmd.tqreplace(pos, 2, "%"); pos--; break; default: @@ -191,7 +191,7 @@ int KBackgroundRenderer::doBackground(bool quit) int tile_val = TQPixmap::defaultDepth() >= 24 ? 1 : 2; // some dithering may be needed even with bpb==15/16, so don't use tileWidth==1 // for them - // with tileWidth>2, repainting the desktop causes nasty effect (XFree86 4.1.0 ) + // with tileWidth>2, tqrepainting the desktop causes nasty effect (XFree86 4.1.0 ) if( XQueryBestTile( qt_xdisplay(), qt_xrootwin(), tile_val, tile_val, &tileWidth, &tileHeight ) != Success ) tileWidth = tileHeight = tile_val; // some defaults @@ -383,7 +383,7 @@ wp_load: wpmode = NoWallpaper; goto wp_out; } - m_Wallpaper = m_Wallpaper.convertDepth(32, DiffuseAlphaDither); + m_Wallpaper = m_Wallpaper.convertDepth(32, Qt::DiffuseAlphaDither); // If we're previewing, scale the wallpaper down to make the preview // look more like the real desktop. @@ -584,7 +584,7 @@ void KBackgroundRenderer::fastWallpaperBlend() m_Pixmap.convertFromImage( m_Wallpaper ); return; } - else if( m_WallpaperRect.contains( TQRect( TQPoint( 0, 0 ), m_Size )) + else if( m_WallpaperRect.tqcontains( TQRect( TQPoint( 0, 0 ), m_Size )) && !m_Wallpaper.hasAlphaBuffer()) // wallpaper covers all and no blending m_Pixmap = TQPixmap( m_Size ); else if (m_Background.size() == m_Size) @@ -627,7 +627,7 @@ void KBackgroundRenderer::fullWallpaperBlend() m_Image = m_Background.copy(); if (m_Image.depth() < 32) - m_Image = m_Image.convertDepth(32, DiffuseAlphaDither); + m_Image = m_Image.convertDepth(32, Qt::DiffuseAlphaDither); } else { m_Image.create(w, h, 32); @@ -724,16 +724,16 @@ void KBackgroundRenderer::blend(TQImage& dst, TQRect dr, const TQImage& src, TQP for (y = 0; y < dr.height(); y++) { if (dst.scanLine(dr.y() + y) && src.scanLine(soffs.y() + y)) { - QRgb *b, *d; + TQRgb *b, *d; for (x = 0; x < dr.width(); x++) { - b = reinterpret_cast(dst.scanLine(dr.y() + y) - + (dr.x() + x) * sizeof(QRgb)); - d = reinterpret_cast(src.scanLine(soffs.y() + y) - + (soffs.x() + x) * sizeof(QRgb)); - a = (qAlpha(*d) * blendFactor) / 100; - *b = qRgb(qRed(*b) - (((qRed(*b) - qRed(*d)) * a) >> 8), - qGreen(*b) - (((qGreen(*b) - qGreen(*d)) * a) >> 8), - qBlue(*b) - (((qBlue(*b) - qBlue(*d)) * a) >> 8)); + b = reinterpret_cast(dst.scanLine(dr.y() + y) + + (dr.x() + x) * sizeof(TQRgb)); + d = reinterpret_cast(const_cast(src).scanLine(soffs.y() + y) + + (soffs.x() + x) * sizeof(TQRgb)); + a = (tqAlpha(*d) * blendFactor) / 100; + *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8), + tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8), + tqBlue(*b) - (((tqBlue(*b) - tqBlue(*d)) * a) >> 8)); } } } @@ -996,13 +996,13 @@ void KBackgroundRenderer::saveCacheFile() m_Image.save( f, "PNG" ); // remove old entries from the cache TQDir dir( locateLocal( "cache", "background/" )); - if( const QFileInfoList* list = dir.entryInfoList( "*.png", TQDir::Files, TQDir::Time | TQDir::Reversed )) { + if( const TQFileInfoList* list = dir.entryInfoList( "*.png", TQDir::Files, TQDir::Time | TQDir::Reversed )) { int size = 0; - for( QFileInfoListIterator it( *list ); + for( TQFileInfoListIterator it( *list ); TQFileInfo* info = it.current(); ++it ) size += info->size(); - for( QFileInfoListIterator it( *list ); + for( TQFileInfoListIterator it( *list ); TQFileInfo* info = it.current(); ++it ) { if( size < 8 * 1024 * 1024 ) @@ -1129,7 +1129,7 @@ int KVirtualBGRenderer::hash() fp += m_renderer[i]->fingerprint(); } //kdDebug() << k_funcinfo << " fp=\""<readEntry("Comment"); if (m_Comment.isEmpty()) - m_Comment = m_File.mid(m_File.findRev('/')+1); + m_Comment = m_File.mid(m_File.tqfindRev('/')+1); } @@ -172,7 +172,7 @@ TQString KBackgroundPattern::fingerprint() int KBackgroundPattern::hash() { if (hashdirty) { - m_Hash = QHash(fingerprint()); + m_Hash = TQHash(fingerprint()); hashdirty = false; } return m_Hash; @@ -190,10 +190,10 @@ TQStringList KBackgroundPattern::list() TQStringList::Iterator it; for (it=lst.begin(); it!=lst.end(); ++it) { // Strip path and suffix - int pos = (*it).findRev('/'); + int pos = (*it).tqfindRev('/'); if (pos != -1) (*it) = (*it).mid(pos+1); - pos = (*it).findRev('.'); + pos = (*it).tqfindRev('.'); if (pos != -1) (*it) = (*it).left(pos); } @@ -383,7 +383,7 @@ TQString KBackgroundProgram::fingerprint() int KBackgroundProgram::hash() { if (hashdirty) { - m_Hash = QHash(fingerprint()); + m_Hash = TQHash(fingerprint()); hashdirty = false; } return m_Hash; @@ -401,10 +401,10 @@ TQStringList KBackgroundProgram::list() TQStringList::Iterator it; for (it=lst.begin(); it!=lst.end(); ++it) { // Strip path and suffix - int pos = (*it).findRev('/'); + int pos = (*it).tqfindRev('/'); if (pos != -1) (*it) = (*it).mid(pos+1); - pos = (*it).findRev('.'); + pos = (*it).tqfindRev('.'); if (pos != -1) (*it) = (*it).left(pos); } @@ -665,7 +665,7 @@ void KBackgroundSettings::setWallpaperList(TQStringList list) } updateWallpaperFiles(); // Try to keep the current wallpaper (-1 to set position to one before it) - m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName) - 1; + m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName) - 1; changeWallpaper(m_CurrentWallpaper < 0); } @@ -751,7 +751,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_BackgroundMode = defBackgroundMode; s = m_pConfig->readEntry("BackgroundMode", "invalid"); - if (m_BMMap.contains(s)) { + if (m_BMMap.tqcontains(s)) { int mode = m_BMMap[s]; // consistency check if ( ((mode != Pattern) && (mode != Program)) || @@ -763,7 +763,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_BlendMode = defBlendMode; s = m_pConfig->readEntry("BlendMode", "invalid"); - if (m_BlMMap.contains(s)) { + if (m_BlMMap.tqcontains(s)) { m_BlendMode = m_BlMMap[s]; } @@ -784,14 +784,14 @@ void KBackgroundSettings::readSettings(bool reparse) m_MultiMode = defMultiMode; s = m_pConfig->readEntry("MultiWallpaperMode"); - if (m_MMMap.contains(s)) { + if (m_MMMap.tqcontains(s)) { int mode = m_MMMap[s]; m_MultiMode = mode; } updateWallpaperFiles(); if( !m_CurrentWallpaperName.isEmpty()) - m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName); + m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName); if(m_CurrentWallpaper < 0) m_CurrentWallpaper = 0; @@ -799,7 +799,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_WallpaperMode = defWallpaperMode; m_Wallpaper = m_pConfig->readPathEntry("Wallpaper"); s = m_pConfig->readEntry("WallpaperMode", "invalid"); - if (m_WMMap.contains(s)) { + if (m_WMMap.tqcontains(s)) { int mode = m_WMMap[s]; // consistency check. if ((mode == NoWallpaper) || !m_Wallpaper.isEmpty() || (m_MultiMode == InOrder || m_MultiMode == Random)) @@ -1029,7 +1029,7 @@ TQString KBackgroundSettings::fingerprint() s += TQString("wm:%1;").arg(m_WallpaperMode); if (m_WallpaperMode != NoWallpaper) { - Q_UINT32 rh = KGlobal::dirs()->calcResourceHash("wallpaper", currentWallpaper(), false); + TQ_UINT32 rh = KGlobal::dirs()->calcResourceHash("wallpaper", currentWallpaper(), false); s += TQString("wp:%2:%1;").arg(rh).arg(currentWallpaper()); } @@ -1048,7 +1048,7 @@ TQString KBackgroundSettings::fingerprint() int KBackgroundSettings::hash() { if (hashdirty) { - m_Hash = QHash(fingerprint()); + m_Hash = TQHash(fingerprint()); hashdirty = false; } return m_Hash; diff --git a/kcontrol/background/bgwallpaper.h b/kcontrol/background/bgwallpaper.h index d2771c884..dfee2066e 100644 --- a/kcontrol/background/bgwallpaper.h +++ b/kcontrol/background/bgwallpaper.h @@ -31,7 +31,7 @@ class BGMultiWallpaperBase; class KBackgroundSettings; -class BGMultiWallpaperList : public QListBox +class BGMultiWallpaperList : public TQListBox { public: BGMultiWallpaperList(TQWidget *parent, const char *name); diff --git a/kcontrol/background/bgwallpaper_ui.ui b/kcontrol/background/bgwallpaper_ui.ui index c3d9a9a40..130157c08 100644 --- a/kcontrol/background/bgwallpaper_ui.ui +++ b/kcontrol/background/bgwallpaper_ui.ui @@ -1,6 +1,6 @@ BGMultiWallpaperBase - + BGMultiWallPaperBase @@ -19,7 +19,7 @@ 0 - + textLabel2 @@ -27,7 +27,7 @@ Show the following pictures: - + m_cbRandom @@ -35,7 +35,7 @@ &Show pictures in random order - + layout3 @@ -43,7 +43,7 @@ unnamed - + textLabel1 @@ -54,7 +54,7 @@ m_spinInterval - + m_spinInterval @@ -69,7 +69,7 @@ Expanding - + 20 20 @@ -78,7 +78,7 @@ - + layout4 @@ -98,14 +98,14 @@ 0 - + 300 100 - + m_buttonAdd @@ -123,14 +123,14 @@ Expanding - + 20 20 - + m_buttonRemove @@ -138,7 +138,7 @@ &Remove - + m_buttonMoveDown @@ -146,7 +146,7 @@ Move &Down - + m_buttonMoveUp diff --git a/kcontrol/background/main.cpp b/kcontrol/background/main.cpp index da77d7cda..321eef90a 100644 --- a/kcontrol/background/main.cpp +++ b/kcontrol/background/main.cpp @@ -113,7 +113,7 @@ void KBackground::save() else appname.sprintf("kdesktop-screen-%d", screen_number); - client->send(appname, "KBackgroundIface", "configure()", ""); + client->send(appname, "KBackgroundIface", "configure()", TQString("")); } void KBackground::defaults() -- cgit v1.2.1