From 13281e2856a2ef43bbab78c5528470309c23aa77 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:48:49 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kutils/kcmodulecontainer.cpp | 2 +- kutils/kcmoduleloader.cpp | 2 +- kutils/kcmoduleproxy.cpp | 8 +-- kutils/kcmultidialog.cpp | 2 +- kutils/kfind.cpp | 2 +- kutils/kfinddialog.cpp | 20 +++--- kutils/kmultitabbar.cpp | 124 +++++++++++++++++----------------- kutils/kmultitabbar.h | 2 +- kutils/kpluginselector.cpp | 6 +- kutils/kreplace.cpp | 2 +- kutils/kreplace.h | 2 +- kutils/kreplacedialog.cpp | 2 +- kutils/ksettings/componentsdialog.cpp | 2 +- kutils/ksettings/pluginpage.cpp | 2 +- 14 files changed, 89 insertions(+), 89 deletions(-) (limited to 'kutils') diff --git a/kutils/kcmodulecontainer.cpp b/kutils/kcmodulecontainer.cpp index c613e4385..2377d1be1 100644 --- a/kutils/kcmodulecontainer.cpp +++ b/kutils/kcmodulecontainer.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include #include diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp index 642e6f1bc..5f3a98cb2 100644 --- a/kutils/kcmoduleloader.cpp +++ b/kutils/kcmoduleloader.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp index b9f297d6e..182c7514b 100644 --- a/kutils/kcmoduleproxy.cpp +++ b/kutils/kcmoduleproxy.cpp @@ -24,10 +24,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -311,7 +311,7 @@ void KCModuleProxy::runAsRoot() TQPalette pal( red ); pal.setColor( TQColorGroup::Background, - tqcolorGroup().background() ); + colorGroup().background() ); d->embedFrame->setPalette( pal ); d->embedFrame->setLineWidth( 2 ); d->embedFrame->setMidLineWidth( 2 ); @@ -416,7 +416,7 @@ void KCModuleProxy::rootExited() /* Such that the "ordinary" module loads again */ d->rootMode = false; - d->topLayout->tqinvalidate(); + d->topLayout->invalidate(); TQShowEvent ev; showEvent( &ev ); diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp index 768f787fe..b5f67684c 100644 --- a/kutils/kcmultidialog.cpp +++ b/kutils/kcmultidialog.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/kutils/kfind.cpp b/kutils/kfind.cpp index 7b2da6899..f0f55cbc6 100644 --- a/kutils/kfind.cpp +++ b/kutils/kfind.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kutils/kfinddialog.cpp b/kutils/kfinddialog.cpp index 4bf564b2e..7a8913679 100644 --- a/kutils/kfinddialog.cpp +++ b/kutils/kfinddialog.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -117,9 +117,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha topLayout->setMargin( 0 ); m_findGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page); - m_findGrp->tqlayout()->setSpacing( KDialog::spacingHint() ); - // m_findGrp->tqlayout()->setMargin( KDialog::marginHint() ); - m_findLayout = new TQGridLayout(m_findGrp->tqlayout()); + m_findGrp->layout()->setSpacing( KDialog::spacingHint() ); + // m_findGrp->layout()->setMargin( KDialog::marginHint() ); + m_findLayout = new TQGridLayout(m_findGrp->layout()); m_findLayout->setSpacing( KDialog::spacingHint() ); // m_findLayout->setMargin( KDialog::marginHint() ); @@ -138,9 +138,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha topLayout->addWidget(m_findGrp); m_replaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page); - m_replaceGrp->tqlayout()->setSpacing( KDialog::spacingHint() ); - // m_replaceGrp->tqlayout()->setMargin( KDialog::marginHint() ); - m_replaceLayout = new TQGridLayout(m_replaceGrp->tqlayout()); + m_replaceGrp->layout()->setSpacing( KDialog::spacingHint() ); + // m_replaceGrp->layout()->setMargin( KDialog::marginHint() ); + m_replaceLayout = new TQGridLayout(m_replaceGrp->layout()); m_replaceLayout->setSpacing( KDialog::spacingHint() ); // m_replaceLayout->setMargin( KDialog::marginHint() ); @@ -159,9 +159,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha topLayout->addWidget(m_replaceGrp); m_optionGrp = new TQGroupBox(0, Qt::Vertical, i18n("Options"), page); - m_optionGrp->tqlayout()->setSpacing(KDialog::spacingHint()); - // m_optionGrp->tqlayout()->setMargin(KDialog::marginHint()); - optionsLayout = new TQGridLayout(m_optionGrp->tqlayout()); + m_optionGrp->layout()->setSpacing(KDialog::spacingHint()); + // m_optionGrp->layout()->setMargin(KDialog::marginHint()); + optionsLayout = new TQGridLayout(m_optionGrp->layout()); optionsLayout->setSpacing( KDialog::spacingHint() ); // optionsLayout->setMargin( KDialog::marginHint() ); diff --git a/kutils/kmultitabbar.cpp b/kutils/kmultitabbar.cpp index 9c47e87e8..2d1043fbe 100644 --- a/kutils/kmultitabbar.cpp +++ b/kutils/kmultitabbar.cpp @@ -28,7 +28,7 @@ #include "kmultitabbar_p.moc" #include #include -#include +#include #include #include #include @@ -82,7 +82,7 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) { m_style=style; for (uint i=0;isetStyle(m_style); + m_tabs.at(i)->setStyle(m_style); if ( (m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON ) ) { @@ -106,11 +106,11 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) } addChild(box); for (uint i=0;iadd(m_tabs.tqat(i)); + mainLayout->add(m_tabs.at(i)); mainLayout->setAutoAdd(true); } - viewport()->tqrepaint(); + viewport()->repaint(); } void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph ) @@ -120,9 +120,9 @@ void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clip if (m_position==KMultiTabBar::Right) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height()); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(1,0,1,viewport()->height()); @@ -130,28 +130,28 @@ void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clip else if (m_position==KMultiTabBar::Left) { - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(23,0,23,viewport()->height()); paint->drawLine(22,0,22,viewport()->height()); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height()); } else if (m_position==KMultiTabBar::Bottom) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,viewport()->width(),0); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(0,1,viewport()->width(),1); } else { - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(0,23,viewport()->width(),23); paint->drawLine(0,22,viewport()->width(),22); -/* paint->setPen(tqcolorGroup().shadow()); +/* paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height());*/ } @@ -175,7 +175,7 @@ void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev) uint ulen=0;\ diff=0; \ for (uint i2=i;i2neededSize();\ + uint l1=m_tabs.at(i2)->neededSize();\ if ((ulen+l1)>space){\ if (ulen==0) diff=0;\ else diff=((float)(space-ulen))/(i2-i);\ @@ -208,7 +208,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { const uint tabCount=m_tabs.count(); for (uint i=0;ineededSize(); + tmp+=m_tabs.at(i)->neededSize(); if (tmp>space) { if (cnt>1)i--; else if (i==(tabCount-1)) break; @@ -232,7 +232,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { //kdDebug()<<"m_lines recalculated="<neededSize()+diff; if (tmp>space) { @@ -258,7 +258,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { //kdDebug()<<"starting new line:"<neededSize()<<"/"<neededSize()<<"/"<drawPixmap(0,0,pixmap); break; } -// tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), -// tqcolorGroup(),TQStyle::Style_Enabled); +// tqstyle().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), +// colorGroup(),TQStyle::Style_Enabled); } @@ -678,58 +678,58 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) TQPixmap pixmap; if ( iconSet()) pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ); - paint->fillRect(0, 0, 24, 24, tqcolorGroup().background()); + paint->fillRect(0, 0, 24, 24, colorGroup().background()); if (!isOn()) { if (m_position==KMultiTabBar::Right) { - paint->fillRect(0,0,21,21,TQBrush(tqcolorGroup().background())); + paint->fillRect(0,0,21,21,TQBrush(colorGroup().background())); - paint->setPen(tqcolorGroup().background().dark(150)); + paint->setPen(colorGroup().background().dark(150)); paint->drawLine(0,22,23,22); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,23); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(1,0,1,23); } else if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top)) { - paint->fillRect(0,1,23,22,TQBrush(tqcolorGroup().background())); + paint->fillRect(0,1,23,22,TQBrush(colorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(23,0,23,23); - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(0,22,23,22); paint->drawLine(0,23,23,23); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,23,0); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(0,1,23,1); } else { - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(0,23,23,23); - paint->fillRect(0,0,23,21,TQBrush(tqcolorGroup().background())); + paint->fillRect(0,0,23,21,TQBrush(colorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(23,0,23,23); paint->drawLine(22,0,22,23); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,23); } @@ -740,12 +740,12 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) { if (m_position==KMultiTabBar::Right) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,height()-1,23,height()-1); paint->drawLine(0,height()-2,23,height()-2); paint->drawLine(23,0,23,height()-1); paint->drawLine(22,0,22,height()-1); - paint->fillRect(0,0,21,height()-3,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,21,height()-3,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) @@ -755,9 +755,9 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) TQPixmap tpixmap(height()-25-3, width()-2); TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light())); - painter.setPen(tqcolorGroup().text()); + painter.setPen(colorGroup().text()); painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(90); @@ -769,25 +769,25 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) else if (m_position==KMultiTabBar::Top) { - paint->fillRect(0,0,width()-1,23,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,width()-1,23,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { - paint->setPen(tqcolorGroup().text()); + paint->setPen(colorGroup().text()); paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } } else if (m_position==KMultiTabBar::Bottom) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,23,width()-1,23); paint->drawLine(0,22,width()-1,22); - paint->fillRect(0,0,width()-1,21,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,width()-1,21,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { - paint->setPen(tqcolorGroup().text()); + paint->setPen(colorGroup().text()); paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } @@ -796,10 +796,10 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,height()-1,23,height()-1); paint->drawLine(0,height()-2,23,height()-2); - paint->fillRect(0,0,23,height()-3,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,23,height()-3,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { @@ -809,9 +809,9 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) TQPixmap tpixmap(height()-25-3, width()-2); TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light())); - painter.setPen(tqcolorGroup().text()); + painter.setPen(colorGroup().text()); painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(-90); @@ -923,7 +923,7 @@ void KMultiTabBar::removeButton(int id) { for (uint pos=0;posid()==id) + if (m_buttons.at(pos)->id()==id) { m_buttons.take(pos)->deleteLater(); break; @@ -978,7 +978,7 @@ void KMultiTabBar::setPosition(KMultiTabBarPosition pos) m_position=pos; m_internal->setPosition(pos); for (uint i=0;isetPosition(pos); + m_buttons.at(i)->setPosition(pos); } KMultiTabBar::KMultiTabBarPosition KMultiTabBar::position() const @@ -988,8 +988,8 @@ KMultiTabBar::KMultiTabBarPosition KMultiTabBar::position() const void KMultiTabBar::fontChange(const TQFont& /* oldFont */) { for (uint i=0;icount();i++) - tabs()->tqat(i)->resize(); - tqrepaint(); + tabs()->at(i)->resize(); + repaint(); } TQPtrList* KMultiTabBar::tabs() {return m_internal->tabs();} diff --git a/kutils/kmultitabbar.h b/kutils/kmultitabbar.h index ffc3fca5f..1e3ed5b59 100644 --- a/kutils/kmultitabbar.h +++ b/kutils/kmultitabbar.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp index 585a02b6f..1ba9f89c3 100644 --- a/kutils/kpluginselector.cpp +++ b/kutils/kpluginselector.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -115,8 +115,8 @@ void KPluginListViewToolTip::maybeTip( const TQPoint &pos ) "License:%4" ).arg( item->pluginInfo()->comment(), item->pluginInfo()->author(), item->pluginInfo()->version(), item->pluginInfo()->license() ); - //kdDebug( 702 ) << k_funcinfo << "Adding tooltip: tqitemRect: " << tqitemRect << ", tooltip: " << toolTip << endl; - tip( m_listView->tqitemRect( item ), toolTip ); + //kdDebug( 702 ) << k_funcinfo << "Adding tooltip: itemRect: " << itemRect << ", tooltip: " << toolTip << endl; + tip( m_listView->itemRect( item ), toolTip ); } struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate diff --git a/kutils/kreplace.cpp b/kutils/kreplace.cpp index 204384ae3..f825e93cc 100644 --- a/kutils/kreplace.cpp +++ b/kutils/kreplace.cpp @@ -50,7 +50,7 @@ KReplaceNextDialog::KReplaceNextDialog(TQWidget *parent) : { m_mainLabel = new TQLabel( this ); setMainWidget( m_mainLabel ); - resize(tqminimumSize()); + resize(minimumSize()); } void KReplaceNextDialog::setLabel( const TQString& pattern, const TQString& replacement ) diff --git a/kutils/kreplace.h b/kutils/kreplace.h index d4e9792e2..ea385189b 100644 --- a/kutils/kreplace.h +++ b/kutils/kreplace.h @@ -238,7 +238,7 @@ signals: * * Extra care must be taken to properly implement the "no prompt-on-replace" case. * For instance highlight isn't emitted in that case (some code might rely on it), - * and for performance reasons one should tqrepaint after replace() ONLY if + * and for performance reasons one should repaint after replace() ONLY if * prompt-on-replace was selected. * * @param text The text, in which the replacement has already been done. diff --git a/kutils/kreplacedialog.cpp b/kutils/kreplacedialog.cpp index 88c006b4d..8f1df2ed1 100644 --- a/kutils/kreplacedialog.cpp +++ b/kutils/kreplacedialog.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kutils/ksettings/componentsdialog.cpp b/kutils/ksettings/componentsdialog.cpp index 097d1f6d7..5328e9704 100644 --- a/kutils/ksettings/componentsdialog.cpp +++ b/kutils/ksettings/componentsdialog.cpp @@ -19,7 +19,7 @@ #include "ksettings/componentsdialog.h" #include -#include +#include #include #include #include diff --git a/kutils/ksettings/pluginpage.cpp b/kutils/ksettings/pluginpage.cpp index 99ea904f2..f1f220d36 100644 --- a/kutils/ksettings/pluginpage.cpp +++ b/kutils/ksettings/pluginpage.cpp @@ -19,7 +19,7 @@ #include "ksettings/pluginpage.h" #include "kpluginselector.h" -#include +#include #include #include "ksettings/dispatcher.h" -- cgit v1.2.1