diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:32:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:32:40 -0600 |
commit | 984c25aa6969e55896e9a13c8e7f7b8a58991a4e (patch) | |
tree | 3653d4ee49b0adf405ff17e0ecdc99bc6f10c1bf /tdeui | |
parent | 56160bf4dfe503631ef6373367b281f081bab2b4 (diff) | |
download | tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.tar.gz tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'tdeui')
84 files changed, 538 insertions, 538 deletions
diff --git a/tdeui/kaboutdialog.cpp b/tdeui/kaboutdialog.cpp index e59d808c9..c7aaca01a 100644 --- a/tdeui/kaboutdialog.cpp +++ b/tdeui/kaboutdialog.cpp @@ -429,7 +429,7 @@ void KAboutContainerBase::show( void ) TQSize KAboutContainerBase::sizeHint( void ) const { - return tqminimumSize().expandedTo( TQSize( TQWidget::sizeHint().width(), 0 ) ); + return minimumSize().expandedTo( TQSize( TQWidget::sizeHint().width(), 0 ) ); } void KAboutContainerBase::fontChange( const TQFont &/*oldFont*/ ) @@ -828,7 +828,7 @@ TQSize KAboutContainer::sizeHint( void ) const ++numChild; TQWidget* const w= TQT_TQWIDGET(o); - TQSize s = w->tqminimumSize(); + TQSize s = w->minimumSize(); if( s.isEmpty() ) { s = w->minimumSizeHint(); diff --git a/tdeui/kaboutkde.cpp b/tdeui/kaboutkde.cpp index 7ac9b7193..1973c316b 100644 --- a/tdeui/kaboutkde.cpp +++ b/tdeui/kaboutkde.cpp @@ -27,7 +27,7 @@ KAboutKDE::KAboutKDE( TQWidget *parent, const char *name, bool modal ) - :KAboutDialog( KAboutDialog::AbtKDEStandard, TQString::tqfromLatin1("TDE"), + :KAboutDialog( KAboutDialog::AbtKDEStandard, TQString::fromLatin1("TDE"), KDialogBase::Help|KDialogBase::Close, KDialogBase::Close, parent, name, modal ) { @@ -75,13 +75,13 @@ KAboutKDE::KAboutKDE( TQWidget *parent, const char *name, bool modal ) "donation, using one of the ways described at " "<a href=\"http://www.trinitydesktop.org/donate.php\">http://www.trinitydesktop.org/donate.php</a>." "<br><br>Thank you very much in advance for your support!"); - setHelp( TQString::tqfromLatin1("khelpcenter/main.html"), TQString::null ); + setHelp( TQString::fromLatin1("khelpcenter/main.html"), TQString::null ); setTitle(i18n("Trinity Desktop Environment. Release %1"). - arg(TQString::tqfromLatin1(TDE_VERSION_STRING)) ); + arg(TQString::fromLatin1(TDE_VERSION_STRING)) ); addTextPage( i18n("About Trinity","&About"), text1, true ); addTextPage( i18n("&Report Bugs or Wishes"), text2, true ); addTextPage( i18n("&Join the Trinity Team"), text3, true ); addTextPage( i18n("&Support Trinity"), text4, true ); - setImage( locate( "data", TQString::tqfromLatin1("tdeui/pics/aboutkde.png")) ); + setImage( locate( "data", TQString::fromLatin1("tdeui/pics/aboutkde.png")) ); setImageBackgroundColor( white ); } diff --git a/tdeui/kaction.cpp b/tdeui/kaction.cpp index 6a0ad7812..270c00ec4 100644 --- a/tdeui/kaction.cpp +++ b/tdeui/kaction.cpp @@ -810,7 +810,7 @@ void KAction::unplugAccel() void KAction::plugMainWindowAccel( TQWidget *w ) { - // Note: tqtopLevelWidget() stops too early, we can't use it. + // Note: topLevelWidget() stops too early, we can't use it. TQWidget * tl = w; TQWidget * n; while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store @@ -1039,7 +1039,7 @@ TQString KAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!d->iconName().isEmpty()) - return TQString::tqfromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text); + return TQString::fromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text); return text; } diff --git a/tdeui/kactionclasses.cpp b/tdeui/kactionclasses.cpp index f9acb0ea9..8c3453fb3 100644 --- a/tdeui/kactionclasses.cpp +++ b/tdeui/kactionclasses.cpp @@ -1626,7 +1626,7 @@ void KFontSizeAction::init() setEditable( true ); TQFontDatabase fontDB; - TQValueList<int> sizes = fontDB.tqstandardSizes(); + TQValueList<int> sizes = fontDB.standardSizes(); TQStringList lst; for ( TQValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it ) lst.append( TQString::number( *it ) ); @@ -2021,7 +2021,7 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) return -1; if ( !m_toolBar ) { - // Note: tqtopLevelWidget() stops too early, we can't use it. + // Note: topLevelWidget() stops too early, we can't use it. TQWidget * tl = w; TQWidget * n; while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store diff --git a/tdeui/kactioncollection.cpp b/tdeui/kactioncollection.cpp index 69a87eaee..23cc55917 100644 --- a/tdeui/kactioncollection.cpp +++ b/tdeui/kactioncollection.cpp @@ -713,8 +713,8 @@ bool KActionShortcutList::save() const if( m_actions.xmlFile().isEmpty() ) return writeSettings(); - TQString attrShortcut = TQString::tqfromLatin1("shortcut"); - TQString attrAccel = TQString::tqfromLatin1("accel"); // Depricated attribute + TQString attrShortcut = TQString::fromLatin1("shortcut"); + TQString attrAccel = TQString::fromLatin1("accel"); // Depricated attribute // Read XML file TQString sXml( KXMLGUIFactory::readConfigFile( xmlFile, false, instance() ) ); diff --git a/tdeui/kactivelabel.cpp b/tdeui/kactivelabel.cpp index f0398c1b7..72e72b677 100644 --- a/tdeui/kactivelabel.cpp +++ b/tdeui/kactivelabel.cpp @@ -113,7 +113,7 @@ void KActiveLabel::keyPressEvent( TQKeyEvent *e ) TQSize KActiveLabel::minimumSizeHint() const { - TQSize ms = tqminimumSize(); + TQSize ms = minimumSize(); if ((ms.width() > 0) && (ms.height() > 0)) return ms; diff --git a/tdeui/karrowbutton.cpp b/tdeui/karrowbutton.cpp index 4d166b7b3..d691b6cfa 100644 --- a/tdeui/karrowbutton.cpp +++ b/tdeui/karrowbutton.cpp @@ -62,9 +62,9 @@ void KArrowButton::drawButton(TQPainter *p) const unsigned int arrowSize = 8; const unsigned int margin = 2; - p->fillRect( rect(), tqcolorGroup().brush( TQColorGroup::Background ) ); + p->fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) ); tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ), - tqcolorGroup(), + colorGroup(), isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Default, TQStyleOption( 2, 0 ) ); @@ -104,7 +104,7 @@ void KArrowButton::drawButton(TQPainter *p) if ( isDown() ) flags |= TQStyle::Style_Down; tqstyle().tqdrawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ), - tqcolorGroup(), flags ); + colorGroup(), flags ); } void KArrowButton::virtual_hook( int, void* ) diff --git a/tdeui/kauthicon.cpp b/tdeui/kauthicon.cpp index 647009f25..d4c18a114 100644 --- a/tdeui/kauthicon.cpp +++ b/tdeui/kauthicon.cpp @@ -134,7 +134,7 @@ KAuthIcon::~KAuthIcon() TQSize KAuthIcon::sizeHint() const { - return layout->tqminimumSize(); + return layout->minimumSize(); } diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index d122d2e02..a1dceb94d 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -88,7 +88,7 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD TQWidget * parent = plainPage(); d->submitBugButton = 0; - //if ( m_aboutData->bugAddress() == TQString::tqfromLatin1("submit@bugs.pearsoncomputing.net") ) + //if ( m_aboutData->bugAddress() == TQString::fromLatin1("submit@bugs.pearsoncomputing.net") ) //{ // // This is a core KDE application -> redirect to the web form // Always redirect to the Web form for Trinity @@ -153,7 +153,7 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD TQWhatsThis::add( d->appcombo, qwtstr ); d->appcombo->insertStrList((const char**)packages); connect(d->appcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(appChanged(int))); - d->appname = TQString::tqfromLatin1( m_aboutData + d->appname = TQString::fromLatin1( m_aboutData ? m_aboutData->productName() : tqApp->name() ); glay->addWidget( d->appcombo, row, 1 ); @@ -179,8 +179,8 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD m_strVersion = m_aboutData->version(); else m_strVersion = i18n("no version set (programmer error!)"); - d->kde_version = TQString::tqfromLatin1( TDE_VERSION_STRING ); - d->kde_version += ", " + TQString::tqfromLatin1( KDE_DISTRIBUTION_TEXT ); + d->kde_version = TQString::fromLatin1( TDE_VERSION_STRING ); + d->kde_version += ", " + TQString::fromLatin1( KDE_DISTRIBUTION_TEXT ); if ( !d->submitBugButton ) m_strVersion += " " + d->kde_version; m_version = new TQLabel( m_strVersion, parent ); @@ -193,16 +193,16 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD struct utsname unameBuf; uname( &unameBuf ); - d->os = TQString::tqfromLatin1( unameBuf.sysname ) + - " (" + TQString::tqfromLatin1( unameBuf.machine ) + ") " - "release " + TQString::tqfromLatin1( unameBuf.release ); + d->os = TQString::fromLatin1( unameBuf.sysname ) + + " (" + TQString::fromLatin1( unameBuf.machine ) + ") " + "release " + TQString::fromLatin1( unameBuf.release ); tmpLabel = new TQLabel(d->os, parent); glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 ); tmpLabel = new TQLabel(i18n("Compiler:"), parent); glay->addWidget( tmpLabel, ++row, 0 ); - tmpLabel = new TQLabel(TQString::tqfromLatin1(KDE_COMPILER_VERSION), parent); + tmpLabel = new TQLabel(TQString::fromLatin1(KDE_COMPILER_VERSION), parent); glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 ); if ( !d->submitBugButton ) @@ -311,7 +311,7 @@ void KBugReport::slotConfigureEmail() { if (m_process) return; m_process = new KProcess; - *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount"); + *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(slotSetFrom())); if (!m_process->start()) { @@ -330,24 +330,24 @@ void KBugReport::slotSetFrom() m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::tqfromLatin1("emaildefaults") ); + KConfig emailConf( TQString::fromLatin1("emaildefaults") ); // find out the default profile - emailConf.setGroup( TQString::tqfromLatin1("Defaults") ); - TQString profile = TQString::tqfromLatin1("PROFILE_"); - profile += emailConf.readEntry( TQString::tqfromLatin1("Profile"), - TQString::tqfromLatin1("Default") ); + emailConf.setGroup( TQString::fromLatin1("Defaults") ); + TQString profile = TQString::fromLatin1("PROFILE_"); + profile += emailConf.readEntry( TQString::fromLatin1("Profile"), + TQString::fromLatin1("Default") ); emailConf.setGroup( profile ); - TQString fromaddr = emailConf.readEntry( TQString::tqfromLatin1("EmailAddress") ); + TQString fromaddr = emailConf.readEntry( TQString::fromLatin1("EmailAddress") ); if (fromaddr.isEmpty()) { struct passwd *p; p = getpwuid(getuid()); - fromaddr = TQString::tqfromLatin1(p->pw_name); + fromaddr = TQString::fromLatin1(p->pw_name); } else { - TQString name = emailConf.readEntry( TQString::tqfromLatin1("FullName")); + TQString name = emailConf.readEntry( TQString::fromLatin1("FullName")); if (!name.isEmpty()) - fromaddr = name + TQString::tqfromLatin1(" <") + fromaddr + TQString::tqfromLatin1(">"); + fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">"); } m_from->setText( fromaddr ); } @@ -438,9 +438,9 @@ TQString KBugReport::text() const { kdDebug() << m_bgSeverity->selected()->name() << endl; // Prepend the pseudo-headers to the contents of the mail - TQString severity = TQString::tqfromLatin1(m_bgSeverity->selected()->name()); + TQString severity = TQString::fromLatin1(m_bgSeverity->selected()->name()); TQString appname = d->appcombo->currentText(); - TQString os = TQString::tqfromLatin1("OS: %1 (%2)\n"). + TQString os = TQString::fromLatin1("OS: %1 (%2)\n"). arg(KDE_COMPILING_OS). arg(KDE_DISTRIBUTION_TEXT); TQString bodyText; @@ -452,25 +452,25 @@ TQString KBugReport::text() const bodyText += line; } - if (severity == TQString::tqfromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) { + if (severity == TQString::fromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) { // Case 1 : i18n bug - TQString package = TQString::tqfromLatin1("i18n_%1").arg(KGlobal::locale()->language()); - package = package.replace(TQString::tqfromLatin1("_"), TQString::tqfromLatin1("-")); - return TQString::tqfromLatin1("Package: %1").arg(package) + - TQString::tqfromLatin1("\n" + TQString package = TQString::fromLatin1("i18n_%1").arg(KGlobal::locale()->language()); + package = package.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-")); + return TQString::fromLatin1("Package: %1").arg(package) + + TQString::fromLatin1("\n" "Application: %1\n" // not really i18n's version, so better here IMHO "Version: %2\n").arg(appname).arg(m_strVersion)+ - os+TQString::tqfromLatin1("\n")+bodyText; + os+TQString::fromLatin1("\n")+bodyText; } else { - appname = appname.replace(TQString::tqfromLatin1("_"), TQString::tqfromLatin1("-")); + appname = appname.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-")); // Case 2 : normal bug - return TQString::tqfromLatin1("Package: %1\n" + return TQString::fromLatin1("Package: %1\n" "Version: %2\n" "Severity: %3\n") .arg(appname).arg(m_strVersion).arg(severity)+ - TQString::tqfromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+ - os+TQString::tqfromLatin1("\n")+bodyText; + TQString::fromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+ + os+TQString::fromLatin1("\n")+bodyText; } } @@ -478,12 +478,12 @@ bool KBugReport::sendBugReport() { TQString recipient ( m_aboutData ? m_aboutData->bugAddress() : - TQString::tqfromLatin1("submit@bugs.pearsoncomputing.net") ); + TQString::fromLatin1("submit@bugs.pearsoncomputing.net") ); TQString command; command = locate("exe", "ksendbugmail"); if (command.isEmpty()) - command = KStandardDirs::findExe( TQString::tqfromLatin1("ksendbugmail") ); + command = KStandardDirs::findExe( TQString::fromLatin1("ksendbugmail") ); KTempFile outputfile; outputfile.close(); diff --git a/tdeui/kbuttonbox.cpp b/tdeui/kbuttonbox.cpp index 11a8e2818..6351c512d 100644 --- a/tdeui/kbuttonbox.cpp +++ b/tdeui/kbuttonbox.cpp @@ -356,7 +356,7 @@ TQSizePolicy KButtonBox::sizePolicy() const */ TQSize KButtonBox::buttonSizeHint(TQPushButton *b) const { TQSize s = b->sizeHint(); - const TQSize ms = b->tqminimumSize(); + const TQSize ms = b->minimumSize(); if(s.width() < minButtonWidth) s.setWidth(minButtonWidth); diff --git a/tdeui/kcharselect.cpp b/tdeui/kcharselect.cpp index 3a5ababce..f20fdc004 100644 --- a/tdeui/kcharselect.cpp +++ b/tdeui/kcharselect.cpp @@ -66,7 +66,7 @@ KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQ : TQGridView( parent, name ), vFont( _font ), vChr( _chr ), vTableNum( _tableNum ), vPos( 0, 0 ), focusItem( _chr ), focusPos( 0, 0 ), d(0) { - setBackgroundColor( tqcolorGroup().base() ); + setBackgroundColor( colorGroup().base() ); setCellWidth( 20 ); setCellHeight( 25 ); @@ -156,25 +156,25 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col ) c += col; if ( c == vChr.tqunicode() ) { - p->setBrush( TQBrush( tqcolorGroup().highlight() ) ); + p->setBrush( TQBrush( colorGroup().highlight() ) ); p->setPen( NoPen ); p->drawRect( 0, 0, w, h ); - p->setPen( tqcolorGroup().highlightedText() ); + p->setPen( colorGroup().highlightedText() ); vPos = TQPoint( col, row ); } else { TQFontMetrics fm = TQFontMetrics( font ); if( fm.inFont( c ) ) - p->setBrush( TQBrush( tqcolorGroup().base() ) ); + p->setBrush( TQBrush( colorGroup().base() ) ); else - p->setBrush( TQBrush( tqcolorGroup().button() ) ); + p->setBrush( TQBrush( colorGroup().button() ) ); p->setPen( NoPen ); p->drawRect( 0, 0, w, h ); - p->setPen( tqcolorGroup().text() ); + p->setPen( colorGroup().text() ); } if ( c == focusItem.tqunicode() && hasFocus() ) { tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ), - tqcolorGroup() ); + colorGroup() ); focusPos = TQPoint( col, row ); } @@ -182,7 +182,7 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col ) p->drawText( 0, 0, x2, y2, AlignHCenter | AlignVCenter, TQString( TQChar( c ) ) ); - p->setPen( tqcolorGroup().text() ); + p->setPen( colorGroup().text() ); p->drawLine( x2, 0, x2, y2 ); p->drawLine( 0, y2, x2, y2 ); diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index d985c8e91..640b9c7ac 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -35,10 +35,10 @@ KContextMenuManager* KContextMenuManager::manager = 0; KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name ) : TQObject( parent, name) { - KConfigGroupSaver saver ( KGlobal::config(), TQString::tqfromLatin1("Shortcuts") ) ; - menuKey = KShortcut( saver.config()->readEntry(TQString::tqfromLatin1("PopupContextMenu"), TQString::tqfromLatin1("Menu") ) ).keyCodeQt(); - saver.config()->setGroup( TQString::tqfromLatin1("ContextMenus") ) ; - showOnPress = saver.config()->readBoolEntry(TQString::tqfromLatin1("ShowOnPress"), true ); + KConfigGroupSaver saver ( KGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; + menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); + saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ; + showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true ); } KContextMenuManager::~KContextMenuManager() diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index 34227a8fb..e697276d8 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -108,25 +108,25 @@ void KColorButton::drawButtonLabel( TQPainter *painter ) TQRect r = tqstyle().subRect( TQStyle::SR_PushButtonContents, this ); r.rect(&x, &y, &w, &h); - int margin = tqstyle().tqpixelMetric( TQStyle::PM_ButtonMargin, this ); + int margin = tqstyle().pixelMetric( TQStyle::PM_ButtonMargin, this ); x += margin; y += margin; w -= 2*margin; h -= 2*margin; if (isOn() || isDown()) { - x += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); - y += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical, this ); + x += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); + y += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical, this ); } TQColor fillCol = isEnabled() ? col : backgroundColor(); - qDrawShadePanel( painter, x, y, w, h, tqcolorGroup(), true, 1, NULL); + qDrawShadePanel( painter, x, y, w, h, colorGroup(), true, 1, NULL); if ( fillCol.isValid() ) painter->fillRect( x+1, y+1, w-2, h-2, fillCol ); if ( hasFocus() ) { TQRect focusRect = tqstyle().subRect( TQStyle::SR_PushButtonFocusRect, this ); - tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, tqcolorGroup() ); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() ); } } diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index a7a8540ce..efdad2385 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -376,7 +376,7 @@ void KColorCells::paintCell( TQPainter *painter, int row, int col ) if (shade) { qDrawShadePanel( painter, 1, 1, cellWidth()-2, - cellHeight()-2, tqcolorGroup(), true, 1, &brush ); + cellHeight()-2, colorGroup(), true, 1, &brush ); w = 2; } TQColor color = colors[ row * numCols() + col ]; @@ -1143,7 +1143,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) d->htmlName = new KLineEdit( page ); d->htmlName->setMaxLength( 13 ); // Qt's TQColor allows 12 hexa-digits d->htmlName->setText("#FFFFFF"); // But HTML uses only 6, so do not worry about the size - w = d->htmlName->fontMetrics().width(TQString::tqfromLatin1("#DDDDDDD")); + w = d->htmlName->fontMetrics().width(TQString::fromLatin1("#DDDDDDD")); d->htmlName->setFixedWidth(w); l_grid->addWidget(TQT_TQWIDGET(d->htmlName), 1, 2, Qt::AlignLeft); diff --git a/tdeui/kcolordrag.cpp b/tdeui/kcolordrag.cpp index 3beed82ca..be1e93aec 100644 --- a/tdeui/kcolordrag.cpp +++ b/tdeui/kcolordrag.cpp @@ -92,7 +92,7 @@ KColorDrag::decode( TQMimeSource *e, TQColor &color) return true; TQByteArray data = e->encodedData( text_mime_string); - TQString colorName = TQString::tqfromLatin1(data.data(), data.size()); + TQString colorName = TQString::fromLatin1(data.data(), data.size()); if ((colorName.length() < 4) || (colorName[0] != '#')) return false; color.setNamedColor(colorName); diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index 5907c4ba0..094e581be 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -370,9 +370,9 @@ KCursorPrivate::KCursorPrivate() hideCursorDelay = 5000; // 5s default value KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::tqfromLatin1("KDE") ); + KConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); enabled = kc->readBoolEntry( - TQString::tqfromLatin1("Autohiding cursor enabled"), true ); + TQString::fromLatin1("Autohiding cursor enabled"), true ); } KCursorPrivate::~KCursorPrivate() diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index 77ff907d7..82775be4f 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -175,17 +175,17 @@ void KDatePicker::init( const TQDate &dt ) line->installEventFilter( this ); if ( TQApplication::reverseLayout() ) { - yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); - monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); + yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); + monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); } else { - yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); - monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); + yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); + monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); } connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate))); connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot())); @@ -529,7 +529,7 @@ KDatePicker::setCloseButton( bool enable ) TQToolTip::add(d->closeButton, i18n("Close")); d->closeButton->setPixmap( SmallIcon("remove") ); connect( d->closeButton, TQT_SIGNAL( clicked() ), - tqtopLevelWidget(), TQT_SLOT( close() ) ); + topLevelWidget(), TQT_SLOT( close() ) ); } else { delete d->closeButton; diff --git a/tdeui/kdatepicker.h b/tdeui/kdatepicker.h index 381095c49..f1a5fd9a6 100644 --- a/tdeui/kdatepicker.h +++ b/tdeui/kdatepicker.h @@ -136,7 +136,7 @@ public: /** * By calling this method with @p enable = true, KDatePicker will show * a little close-button in the upper button-row. Clicking the - * close-button will cause the KDatePicker's tqtopLevelWidget()'s close() + * close-button will cause the KDatePicker's topLevelWidget()'s close() * method being called. This is mostly useful for toplevel datepickers * without a window manager decoration. * @see hasCloseButton diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index e139ffd90..69fbc083b 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -233,7 +233,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) ( daynum == 6 && calendar->calendarName() == "gregorian" ) ) normalday=false; - TQBrush brushInvertTitle(tqcolorGroup().base()); + TQBrush brushInvertTitle(colorGroup().base()); TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) ); TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) ); if (!normalday) @@ -250,7 +250,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) } painter->drawText(0, 0, w, h-1, AlignCenter, calendar->weekDayName(daynum, true), -1, &rect); - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); painter->moveTo(0, h-1); painter->lineTo(w-1, h-1); // ----- draw the weekday: @@ -267,7 +267,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) // ° painting a day of the previous month or // ° painting a day of the following month // TODO: don't hardcode gray here! Use a color with less contrast to the background than normal text. - painter->setPen( tqcolorGroup().mid() ); + painter->setPen( colorGroup().mid() ); // painter->setPen(gray); } else { // paint a day of the current month if ( d->useCustomColors ) @@ -292,9 +292,9 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) } painter->setPen( mode->fgColor ); } else - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); } else //if ( firstWeekDay < 4 ) // <- this doesn' make sense at all! - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); } pen=painter->pen(); @@ -308,25 +308,25 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) // draw the currently selected date if (isEnabled()) { - painter->setPen(tqcolorGroup().highlight()); - painter->setBrush(tqcolorGroup().highlight()); + painter->setPen(colorGroup().highlight()); + painter->setBrush(colorGroup().highlight()); } else { - painter->setPen(tqcolorGroup().text()); - painter->setBrush(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); + painter->setBrush(colorGroup().text()); } - pen=TQPen(tqcolorGroup().highlightedText()); + pen=TQPen(colorGroup().highlightedText()); } else { painter->setBrush(paletteBackgroundColor()); painter->setPen(paletteBackgroundColor()); -// painter->setBrush(tqcolorGroup().base()); -// painter->setPen(tqcolorGroup().base()); +// painter->setBrush(colorGroup().base()); +// painter->setPen(colorGroup().base()); } if ( pCellDate == TQDate::currentDate() ) { - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); } if ( paintRect ) painter->drawRect(0, 0, w, h); @@ -439,7 +439,7 @@ KDateTable::setFontSize(int size) maxCell.setHeight(QMAX(maxCell.height(), rect.height())); } // ----- compare with a real wide number and add some space: - rect=metrics.boundingRect(TQString::tqfromLatin1("88")); + rect=metrics.boundingRect(TQString::fromLatin1("88")); maxCell.setWidth(QMAX(maxCell.width()+2, rect.width())); maxCell.setHeight(QMAX(maxCell.height()+4, rect.height())); } diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index 959de3cc1..a0832b4e4 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -405,7 +405,7 @@ KSMModalDialog::KSMModalDialog(TQWidget* parent) TQFrame* frame = new TQFrame( this ); frame->setFrameStyle( TQFrame::NoFrame ); - frame->setLineWidth( tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) ); + frame->setLineWidth( tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) ); // we need to set the minimum size for the window frame->setMinimumWidth(400); vbox->addWidget( frame ); diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index 93d1cb58e..1fb00aa6d 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -454,7 +454,7 @@ TQSize KDialogBase::minimumSizeHint() const // if( mUrlHelp ) { - s2 = mUrlHelp->tqminimumSize() + zeroByS; + s2 = mUrlHelp->minimumSize() + zeroByS; } s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); @@ -469,7 +469,7 @@ TQSize KDialogBase::minimumSizeHint() const else if( mMainWidget ) { s2 = mMainWidget->sizeHint() + zeroByS; - s2 = s2.expandedTo( mMainWidget->tqminimumSize() ); + s2 = s2.expandedTo( mMainWidget->minimumSize() ); s2 = s2.expandedTo( mMainWidget->minimumSizeHint() ); if( s2.isEmpty() ) { @@ -486,7 +486,7 @@ TQSize KDialogBase::minimumSizeHint() const if (d->detailsWidget && d->bDetails) { s2 = d->detailsWidget->sizeHint() + zeroByS; - s2 = s2.expandedTo( d->detailsWidget->tqminimumSize() ); + s2 = s2.expandedTo( d->detailsWidget->minimumSize() ); s2 = s2.expandedTo( d->detailsWidget->minimumSizeHint() ); s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); @@ -497,7 +497,7 @@ TQSize KDialogBase::minimumSizeHint() const // if( mActionSep ) { - s1.rheight() += mActionSep->tqminimumSize().height() + s; + s1.rheight() += mActionSep->minimumSize().height() + s; } // @@ -505,7 +505,7 @@ TQSize KDialogBase::minimumSizeHint() const // if( d->mButton.box ) { - s2 = d->mButton.box->tqminimumSize(); + s2 = d->mButton.box->minimumSize(); if( mButtonOrientation == Qt::Horizontal ) { s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); @@ -1492,10 +1492,10 @@ TQRect KDialogBase::getContentsRect() const r.setLeft( marginHint() ); r.setTop( marginHint() + (mUrlHelp ? mUrlHelp->height() : 0) ); r.setRight( width() - marginHint() ); - int h = (!mActionSep ? 0 : mActionSep->tqminimumSize().height()+marginHint()); + int h = (!mActionSep ? 0 : mActionSep->minimumSize().height()+marginHint()); if( d->mButton.box ) { - r.setBottom( height() - d->mButton.box->tqminimumSize().height() - h ); + r.setBottom( height() - d->mButton.box->minimumSize().height() - h ); } else { @@ -1513,14 +1513,14 @@ void KDialogBase::getBorderWidths(int& ulx, int& uly, int& lrx, int& lry) const uly = marginHint(); if( mUrlHelp ) { - uly += mUrlHelp->tqminimumSize().height(); + uly += mUrlHelp->minimumSize().height(); } lrx = marginHint(); - lry = d->mButton.box ? d->mButton.box->tqminimumSize().height() : 0; + lry = d->mButton.box ? d->mButton.box->minimumSize().height() : 0; if( mActionSep ) { - lry += mActionSep->tqminimumSize().height() + marginHint(); + lry += mActionSep->minimumSize().height() + marginHint(); } } @@ -1755,8 +1755,8 @@ TQSize KDialogBase::configDialogSize( KConfig& config, h = sizeHint().height(); KConfigGroupSaver cs(&config, groupName); - w = config.readNumEntry( TQString::tqfromLatin1("Width %1").arg( desk.width()), w ); - h = config.readNumEntry( TQString::tqfromLatin1("Height %1").arg( desk.height()), h ); + w = config.readNumEntry( TQString::fromLatin1("Width %1").arg( desk.width()), w ); + h = config.readNumEntry( TQString::fromLatin1("Height %1").arg( desk.height()), h ); return TQSize( w, h ); } @@ -1777,9 +1777,9 @@ void KDialogBase::saveDialogSize( KConfig& config, const TQString& groupName, KConfigGroupSaver cs(&config, groupName); TQSize sizeToSave = size(); - config.writeEntry( TQString::tqfromLatin1("Width %1").arg( desk.width()), + config.writeEntry( TQString::fromLatin1("Width %1").arg( desk.width()), TQString::number( sizeToSave.width()), true, global); - config.writeEntry( TQString::tqfromLatin1("Height %1").arg( desk.height()), + config.writeEntry( TQString::fromLatin1("Height %1").arg( desk.height()), TQString::number( sizeToSave.height()), true, global); } diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 005f76b4b..219cfd0f6 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -203,7 +203,7 @@ void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) paint.begin( this ); - tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); + tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } @@ -266,7 +266,7 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) layout->addWidget( closeButton ); layout->activate(); d->dummy->hide(); - drag->setFixedHeight( layout->tqminimumSize().height() ); + drag->setFixedHeight( layout->minimumSize().height() ); } void KDockWidgetHeader::setTopLevel( bool isTopLevel ) @@ -343,7 +343,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd ) if (dontShowDummy) d->dummy->hide(); else d->dummy->show(); layout->addWidget( closeButton ); layout->activate(); - kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<layout->tqminimumSize().height()<<endl; + kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<layout->minimumSize().height()<<endl; //FIXME somebody left this here, but we don't know what the hell it's for. drag->setFixedHeight( closeButton->height()); // /*layout->minimumS*/sizeHint().height() ); } @@ -378,7 +378,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { if (dontShowDummy) d->dummy->hide(); else d->dummy->show(); layout->addWidget( closeButton ); layout->activate(); - drag->setFixedHeight( layout->tqminimumSize().height() ); + drag->setFixedHeight( layout->minimumSize().height() ); } void KDockWidgetHeader::removeButton(KDockButton_Private* btn) { @@ -574,7 +574,7 @@ void KDockWidget::paintEvent(TQPaintEvent* pe) TQWidget::paintEvent(pe); TQPainter paint; paint.begin( this ); - tqstyle().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); + tqstyle().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } @@ -601,7 +601,7 @@ void KDockWidget::mousePressEvent(TQMouseEvent* mme) int styleheight; TQPoint mp; mp=mme->pos(); - styleheight=2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this); + styleheight=2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -689,7 +689,7 @@ void KDockWidget::mouseMoveEvent(TQMouseEvent* mme) int styleheight; TQPoint mp; mp=mme->pos(); - styleheight=2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this); + styleheight=2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -791,7 +791,7 @@ void KDockWidget::updateHeader() header->setTopLevel( true ); header->show(); #ifdef BORDERLESS_WINDOWS - layout->setMargin(2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this)); + layout->setMargin(2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this)); setMouseTracking(true); #endif } @@ -1850,7 +1850,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) return 0L; } #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) - p = p->tqtopLevelWidget(); + p = p->topLevelWidget(); #endif TQWidget* w = 0L; findChildDockWidget( w, p, p->mapFromGlobal(pos) ); @@ -2105,7 +2105,7 @@ static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagNam static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b) { - return createStringEntry(doc, tagName, TQString::tqfromLatin1(b? "true" : "false")); + return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false")); } @@ -2144,7 +2144,7 @@ static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName, TQStrListIterator it(list); for (; it.current(); ++it) { TQDomElement subel = doc.createElement(subTagName); - subel.appendChild(doc.createTextNode(TQString::tqfromLatin1(it.current()))); + subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current()))); el.appendChild(subel); } @@ -2214,7 +2214,7 @@ void KDockManager::writeConfig(TQDomElement &base) KDockWidget *obj1; while ( (obj1=(KDockWidget*)it.current()) ) { if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) ) - mainWidgetStr = TQString::tqfromLatin1(obj1->name()); + mainWidgetStr = TQString::fromLatin1(obj1->name()); nList.append(obj1->name()); ++it; } @@ -2279,7 +2279,7 @@ void KDockManager::writeConfig(TQDomElement &base) } } - groupEl.appendChild(createStringEntry(doc, "name", TQString::tqfromLatin1(obj->name()))); + groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name()))); groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent())); if ( !obj->parent() ) { groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); @@ -2994,14 +2994,14 @@ void KDockManager::drawDragRectangle() KDockMainWindow* pMain = 0L; KDockWidget* pTLDockWdg = 0L; TQWidget* topWdg; - if (pDockWdgAtRect->tqtopLevelWidget() == main) { + if (pDockWdgAtRect->topLevelWidget() == main) { isOverMainWdg = true; topWdg = pMain = (KDockMainWindow*) main; unclipped = pMain->testWFlags( WPaintUnclipped ); pMain->setWFlags( WPaintUnclipped ); } else { - topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->tqtopLevelWidget(); + topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->topLevelWidget(); unclipped = pTLDockWdg->testWFlags( WPaintUnclipped ); pTLDockWdg->setWFlags( WPaintUnclipped ); } diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index c084dff5b..b2b740ca6 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -452,7 +452,7 @@ public: */ KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = TQString::null, - const TQString& strTabPageLabel = TQString::tqfromLatin1( " " ), WFlags f = 0); + const TQString& strTabPageLabel = TQString::fromLatin1( " " ), WFlags f = 0); /** * Destructs a dockwidget. @@ -1377,7 +1377,7 @@ public: * @return a pointer to the new created dockwidget */ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, - const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::tqfromLatin1( " " ) ); + const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) ); /** * Saves the current dock window layout into a DOM tree below the given element. @@ -1503,7 +1503,7 @@ public: KDockWidget* getMainDockWidget(){ return mainDockWidget; } KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, - const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::tqfromLatin1( " " ) ); + const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) ); void writeDockConfig(TQDomElement &base); void readDockConfig(TQDomElement &base); diff --git a/tdeui/kdockwidget_private.cpp b/tdeui/kdockwidget_private.cpp index 55ffc6229..c7838d4d9 100644 --- a/tdeui/kdockwidget_private.cpp +++ b/tdeui/kdockwidget_private.cpp @@ -497,8 +497,8 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) switch (e->type()) { case TQEvent::MouseMove: mev= (TQMouseEvent*)e; - child0->tqsetUpdatesEnabled(mOpaqueResize); - child1->tqsetUpdatesEnabled(mOpaqueResize); + child0->setUpdatesEnabled(mOpaqueResize); + child1->setUpdatesEnabled(mOpaqueResize); if (m_orientation == Qt::Horizontal) { if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) { @@ -536,8 +536,8 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) handled= true; break; case TQEvent::MouseButtonRelease: - child0->tqsetUpdatesEnabled(true); - child1->tqsetUpdatesEnabled(true); + child0->setUpdatesEnabled(true); + child1->setUpdatesEnabled(true); mev= (TQMouseEvent*)e; if (m_orientation == Qt::Horizontal){ if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) @@ -634,7 +634,7 @@ KDockButton_Private::~KDockButton_Private() void KDockButton_Private::drawButton( TQPainter* p ) { - p->fillRect( 0,0, width(), height(), TQBrush(tqcolorGroup().brush(TQColorGroup::Background)) ); + p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) ); p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() ); if ( moveMouse && !isDown() ){ p->setPen( white ); @@ -642,12 +642,12 @@ void KDockButton_Private::drawButton( TQPainter* p ) p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); - p->setPen( tqcolorGroup().dark() ); + p->setPen( colorGroup().dark() ); p->lineTo( width() - 1, height() - 1 ); p->lineTo( 0, height() - 1 ); } if ( isOn() || isDown() ){ - p->setPen( tqcolorGroup().dark() ); + p->setPen( colorGroup().dark() ); p->moveTo( 0, height() - 1 ); p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); diff --git a/tdeui/kdualcolorbutton.cpp b/tdeui/kdualcolorbutton.cpp index 64624df82..27cd28f43 100644 --- a/tdeui/kdualcolorbutton.cpp +++ b/tdeui/kdualcolorbutton.cpp @@ -152,13 +152,13 @@ void KDualColorButton::paintEvent(TQPaintEvent *) TQPainter p(this); metrics(fgRect, bgRect); - TQBrush defBrush = tqcolorGroup().brush(TQColorGroup::Button); + TQBrush defBrush = colorGroup().brush(TQColorGroup::Button); - qDrawShadeRect(&p, bgRect, tqcolorGroup(), curColor == Background, 2, 0, + qDrawShadeRect(&p, bgRect, colorGroup(), curColor == Background, 2, 0, isEnabled() ? &bg : &defBrush); - qDrawShadeRect(&p, fgRect, tqcolorGroup(), curColor == Foreground, 2, 0, + qDrawShadeRect(&p, fgRect, colorGroup(), curColor == Foreground, 2, 0, isEnabled() ? &fg : &defBrush); - p.setPen(tqcolorGroup().shadow()); + p.setPen(colorGroup().shadow()); p.drawPixmap(fgRect.right()+2, 0, *arrowBitmap); p.drawPixmap(0, fgRect.bottom()+2, *resetPixmap); diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index fe886f434..3e03fc019 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -164,7 +164,7 @@ KEdit::cleanWhiteSpace() if (line.isEmpty()) { if (addSpace) - newText += TQString::tqfromLatin1("\n\n"); + newText += TQString::fromLatin1("\n\n"); if (firstLine) { if (firstChar.isSpace()) diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index 664e206bd..418fb755d 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -378,7 +378,7 @@ const char *KEditToolbar::s_defaultToolbar = 0L; KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), - m_widget(new KEditToolbarWidget(TQString::tqfromLatin1(s_defaultToolbar), collection, file, global, this)) + m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), collection, file, global, this)) { init(); d->m_global = global; @@ -400,7 +400,7 @@ KEditToolbar::KEditToolbar(const TQString& defaultToolbar, KActionCollection *co KEditToolbar::KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), - m_widget(new KEditToolbarWidget(TQString::tqfromLatin1(s_defaultToolbar), factory, this)) + m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), factory, this)) { init(); d->m_factory = factory; @@ -467,7 +467,7 @@ void KEditToolbar::slotDefault() if (TQDir::isRelativePath(file)) { const KInstance *instance = client->instance() ? client->instance() : KGlobal::instance(); - file = locateLocal("data", TQString::tqfromLatin1( instance->instanceName() + '/' ) + file); + file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' ) + file); } else { @@ -488,7 +488,7 @@ void KEditToolbar::slotDefault() int slash = d->m_file.findRev('/')+1; if (slash) d->m_file = d->m_file.mid(slash); - TQString xml_file = locateLocal("data", TQString::tqfromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file); + TQString xml_file = locateLocal("data", TQString::fromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file); if ( TQFile::exists( xml_file ) ) if ( !TQFile::remove( xml_file ) ) @@ -816,7 +816,7 @@ void KEditToolbarWidget::setupLayout() // "change icon" button d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this ); - TQString kdialogExe = KStandardDirs::findExe(TQString::tqfromLatin1("kdialog")); + TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); d->m_hasKDialog = !kdialogExe.isEmpty(); d->m_changeIcon->setEnabled( d->m_hasKDialog ); @@ -975,7 +975,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) if (it.tagName() == tagSeparator) { ToolbarItem *act = new ToolbarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), TQString::null); - bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == TQString::tqfromLatin1("true") ); + bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == TQString::fromLatin1("true") ); if(isLineSep) act->setText(1, LINESEPARATORSTRING); else @@ -1382,10 +1382,10 @@ void KEditToolbarWidget::slotChangeIcon() return; d->m_kdialogProcess = new KProcIO; - TQString kdialogExe = KStandardDirs::findExe(TQString::tqfromLatin1("kdialog")); + TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); (*d->m_kdialogProcess) << kdialogExe; (*d->m_kdialogProcess) << "--embed"; - (*d->m_kdialogProcess) << TQString::number( (ulong)tqtopLevelWidget()->winId() ); + (*d->m_kdialogProcess) << TQString::number( (ulong)topLevelWidget()->winId() ); (*d->m_kdialogProcess) << "--geticon"; (*d->m_kdialogProcess) << "Toolbar"; (*d->m_kdialogProcess) << "Actions"; diff --git a/tdeui/kfontcombo.cpp b/tdeui/kfontcombo.cpp index e62360521..9ef3af912 100644 --- a/tdeui/kfontcombo.cpp +++ b/tdeui/kfontcombo.cpp @@ -132,7 +132,7 @@ void KFontListItem::paint(TQPainter *p) if (m_canPaintName) p->setFont(*m_font); else - t = TQString::tqfromLatin1("(%1)").arg(m_fontName); + t = TQString::fromLatin1("(%1)").arg(m_fontName); } TQFontMetrics fm(p->fontMetrics()); p->drawText(3, (m_combo->d->lineSpacing + fm.ascent() + fm.leading() / 2) / 2, t); diff --git a/tdeui/kfontdialog.cpp b/tdeui/kfontdialog.cpp index a5609a81e..147b63901 100644 --- a/tdeui/kfontdialog.cpp +++ b/tdeui/kfontdialog.cpp @@ -331,8 +331,8 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, setSizeIsRelative( *sizeIsRelativeState ); KConfig *config = KGlobal::config(); - KConfigGroupSaver saver(config, TQString::tqfromLatin1("General")); - showXLFDArea(config->readBoolEntry(TQString::tqfromLatin1("fontSelectorShowXLFD"), false)); + KConfigGroupSaver saver(config, TQString::fromLatin1("General")); + showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } KFontChooser::~KFontChooser() @@ -526,7 +526,7 @@ void KFontChooser::style_chosen_slot(const TQString& style) fillSizeList(); } else { // is bitmap font. //sampleEdit->setPaletteBackgroundPixmap( BitmapPixmap ); // TODO - TQValueList<int> sizes = dbase.tqsmoothSizes(familyListBox->currentText(), currentStyles[currentStyle]); + TQValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]); if(sizes.count() > 0) { TQValueList<int>::iterator it; diff=1000; @@ -681,13 +681,13 @@ void KFontChooser::addFont( TQStringList &list, const char *xfont ) if ( !ptr ) return; - TQString font = TQString::tqfromLatin1(ptr + 1); + TQString font = TQString::fromLatin1(ptr + 1); int pos; if ( ( pos = font.find( '-' ) ) > 0 ) { font.truncate( pos ); - if ( font.find( TQString::tqfromLatin1("open look"), 0, false ) >= 0 ) + if ( font.find( TQString::fromLatin1("open look"), 0, false ) >= 0 ) return; TQStringList::Iterator it = list.begin(); diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 663838fa8..330362d45 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -119,7 +119,7 @@ KPopupMenu* KHelpMenu::menu() // compatible. // const KAboutData *aboutData = d->mAboutData ? d->mAboutData : KGlobal::instance()->aboutData(); - TQString appName = (aboutData)? aboutData->programName() : TQString::tqfromLatin1(tqApp->name()); + TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(tqApp->name()); mMenu = new KPopupMenu(); connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed())); diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp index 6d3f51a2b..a26519729 100644 --- a/tdeui/kiconview.cpp +++ b/tdeui/kiconview.cpp @@ -184,7 +184,7 @@ void KIconView::slotAutoSelect() bool select = !m_pCurrentItem->isSelected(); bool update = viewport()->isUpdatesEnabled(); - viewport()->tqsetUpdatesEnabled( false ); + viewport()->setUpdatesEnabled( false ); //Calculate the smallest rectangle that contains the current Item //and the one that got the autoselect event @@ -216,7 +216,7 @@ void KIconView::slotAutoSelect() } blockSignals( block ); - viewport()->tqsetUpdatesEnabled( update ); + viewport()->setUpdatesEnabled( update ); repaintContents( redraw, false ); emit selectionChanged(); @@ -485,7 +485,7 @@ void KIconViewItem::calcRect( const TQString& text_ ) KIconView *view = static_cast<KIconView *>(iconView()); TQRect itemIconRect = pixmapRect(); TQRect itemTextRect = textRect(); - TQRect tqitemRect = rect(); + TQRect itemRect = rect(); int pw = 0; int ph = 0; @@ -507,9 +507,9 @@ void KIconViewItem::calcRect( const TQString& text_ ) itemIconRect.setWidth( pw ); #if 1 // FIXME // There is a bug in Qt which prevents the item from being placed - // properly when the pixmapRect is not at the top of the tqitemRect, so we + // properly when the pixmapRect is not at the top of the itemRect, so we // have to increase the height of the pixmapRect and leave it at the top - // of the tqitemRect... + // of the itemRect... if ( d && !d->m_pixmapSize.isNull() ) itemIconRect.setHeight( d->m_pixmapSize.height() + 2 ); else @@ -574,8 +574,8 @@ void KIconViewItem::calcRect( const TQString& text_ ) h = itemTextRect.height() + itemIconRect.height() + 1; } - tqitemRect.setWidth( w ); - tqitemRect.setHeight( h ); + itemRect.setWidth( w ); + itemRect.setHeight( h ); int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() itemTextRect = TQRect( ( width - itemTextRect.width() ) / 2, height - itemTextRect.height(), @@ -597,8 +597,8 @@ void KIconViewItem::calcRect( const TQString& text_ ) h = QMAX( itemTextRect.height(), itemIconRect.height() ); w = itemTextRect.width() + itemIconRect.width() + 1; - tqitemRect.setWidth( w ); - tqitemRect.setHeight( h ); + itemRect.setWidth( w ); + itemRect.setHeight( h ); int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() @@ -621,8 +621,8 @@ void KIconViewItem::calcRect( const TQString& text_ ) setPixmapRect( itemIconRect ); if ( itemTextRect != textRect() ) setTextRect( itemTextRect ); - if ( tqitemRect != rect() ) - setItemRect( tqitemRect ); + if ( itemRect != rect() ) + setItemRect( itemRect ); // Done by setPixmapRect, setTextRect and setItemRect ! [and useless if no rect changed] //view->updateItemContainer( this ); @@ -680,7 +680,7 @@ void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg ) #if 1 // FIXME // Move the pixmap manually because the pixmapRect is at the - // top of the tqitemRect + // top of the itemRect // (won't be needed anymore in future versions of qt) if ( d && !d->m_pixmapSize.isNull() ) { diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index 584780c8e..0bf5199ff 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -542,7 +542,7 @@ bool KJanusWidget::setSwallowedWidget( TQWidget *widget ) } gbox->addWidget(widget, 0, 0 ); gbox->activate(); - mSwallowPage->setMinimumSize( widget->tqminimumSize() ); + mSwallowPage->setMinimumSize( widget->minimumSize() ); } return true; @@ -769,20 +769,20 @@ TQSize KJanusWidget::minimumSizeHint() const if( mFace == TreeList ) { - s1.rwidth() += tqstyle().tqpixelMetric( TQStyle::PM_SplitterWidth ); - s2 = mTreeList->tqminimumSize(); + s1.rwidth() += tqstyle().pixelMetric( TQStyle::PM_SplitterWidth ); + s2 = mTreeList->minimumSize(); } else { mIconList->updateMinimumHeight(); mIconList->updateWidth(); - s2 = mIconList->tqminimumSize(); + s2 = mIconList->minimumSize(); } if( mTitleLabel->isVisible() ) { s3 += mTitleLabel->sizeHint(); - s3.rheight() += mTitleSep->tqminimumSize().height(); + s3.rheight() += mTitleSep->minimumSize().height(); } // @@ -799,7 +799,7 @@ TQSize KJanusWidget::minimumSizeHint() const } else if( mFace == Swallow ) { - return mSwallowPage->tqminimumSize(); + return mSwallowPage->minimumSize(); } else if( mFace == Plain ) { @@ -1074,13 +1074,13 @@ void KJanusWidget::IconListItem::highlight( bool erase ) // For now, always disable highlighting erase = true; - TQRect r = listBox()->tqitemRect( this ); + TQRect r = listBox()->itemRect( this ); r.addCoords( 1, 1, -1, -1 ); TQPainter p( listBox()->viewport() ); p.setClipRegion( r ); - const TQColorGroup &cg = listBox()->tqcolorGroup(); + const TQColorGroup &cg = listBox()->colorGroup(); if ( erase ) { p.setPen( cg.base() ); @@ -1129,7 +1129,7 @@ const TQPixmap &KJanusWidget::IconListItem::defaultPixmap() void KJanusWidget::IconListItem::paint( TQPainter *painter ) { - TQRect itemPaintRegion( listBox()->tqitemRect( this ) ); + TQRect itemPaintRegion( listBox()->itemRect( this ) ); TQRect r( 1, 1, itemPaintRegion.width() - 2, itemPaintRegion.height() - 2); if ( isSelected() ) @@ -1137,7 +1137,7 @@ void KJanusWidget::IconListItem::paint( TQPainter *painter ) painter->eraseRect( r ); painter->save(); - painter->setPen( listBox()->tqcolorGroup().highlight().dark( 160 ) ); + painter->setPen( listBox()->colorGroup().highlight().dark( 160 ) ); painter->drawRect( r ); painter->restore(); } diff --git a/tdeui/kjanuswidget.h b/tdeui/kjanuswidget.h index 4ddc8be17..8cc0c667c 100644 --- a/tdeui/kjanuswidget.h +++ b/tdeui/kjanuswidget.h @@ -50,7 +50,7 @@ class KGuiItem; * This class provides KJanusWidget::TreeList, KJanusWidget::IconList, * KJanusWidget::Tabbed, KJanusWidget::Plain and KJanusWidget::Swallow layouts. * - * For all modes it is important that you specify the TQWidget::tqminimumSize() + * For all modes it is important that you specify the TQWidget::minimumSize() * on the page, plain widget or the swallowed widget. If you use a QLayout * on the page, plain widget or the swallowed widget this will be taken care * of automatically. The size is used when the KJanusWidget determines its diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index ee26cc6de..7a51d47f0 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -85,7 +85,7 @@ void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) d->bQtShortcut = bQtShortcut; m_cut = cut; TQString keyStr = m_cut.toString(); - keyStr.replace('&', TQString::tqfromLatin1("&&")); + keyStr.replace('&', TQString::fromLatin1("&&")); setText( keyStr.isEmpty() ? i18n("None") : keyStr ); } @@ -146,11 +146,11 @@ void KKeyButton::drawButton( TQPainter *painter ) painter->setClipping( false ); if( width() > 12 && height() > 8 ) qDrawShadePanel( painter, 6, 4, width() - 12, height() - 8, - tqcolorGroup(), true, 1, 0L ); + colorGroup(), true, 1, 0L ); if ( m_bEditing ) { - painter->setPen( tqcolorGroup().base() ); - painter->setBrush( tqcolorGroup().base() ); + painter->setPen( colorGroup().base() ); + painter->setBrush( colorGroup().base() ); } else { @@ -162,7 +162,7 @@ void KKeyButton::drawButton( TQPainter *painter ) drawButtonLabel( painter ); - painter->setPen( tqcolorGroup().text() ); + painter->setPen( colorGroup().text() ); painter->setBrush( NoBrush ); if( hasFocus() || m_bEditing ) { diff --git a/tdeui/klanguagebutton.cpp b/tdeui/klanguagebutton.cpp index bfc160c8e..07cdc6db3 100644 --- a/tdeui/klanguagebutton.cpp +++ b/tdeui/klanguagebutton.cpp @@ -131,12 +131,12 @@ KLanguageButton::~KLanguageButton() void KLanguageButton::insertLanguage( const TQString& path, const TQString& name, const TQString&, const TQString &submenu, int index ) { - TQString output = name + TQString::tqfromLatin1( " (" ) + path + - TQString::tqfromLatin1( ")" ); + TQString output = name + TQString::fromLatin1( " (" ) + path + + TQString::fromLatin1( ")" ); #if 0 // Nooooo ! Country != language TQPixmap flag( locate( "locale", sub + path + - TQString::tqfromLatin1( "/flag.png" ) ) ); + TQString::fromLatin1( "/flag.png" ) ) ); #endif insertItem( output, path, submenu, index ); } diff --git a/tdeui/kled.cpp b/tdeui/kled.cpp index b78b06a38..71b6e00c1 100644 --- a/tdeui/kled.cpp +++ b/tdeui/kled.cpp @@ -229,7 +229,7 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp brush.setColor( color ); pen.setWidth( scale ); - color = tqcolorGroup().dark(); + color = colorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing @@ -325,7 +325,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp // avoid that the border can be erased by the bright spot of the LED pen.setWidth( 2 * scale + 1 ); - color = tqcolorGroup().dark(); + color = colorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing brush.setStyle( Qt::NoBrush ); // Switch off the brush @@ -428,7 +428,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // drawing the shadow border at 45° (45*16 = 720). int angle = -720; - color = tqcolorGroup().light(); + color = colorGroup().light(); for ( int arc = 120; arc < 2880; arc += 240 ) { pen.setColor( color ); diff --git a/tdeui/klistbox.cpp b/tdeui/klistbox.cpp index 30d418daf..13c5ab325 100644 --- a/tdeui/klistbox.cpp +++ b/tdeui/klistbox.cpp @@ -133,7 +133,7 @@ void KListBox::slotAutoSelect() bool select = !m_pCurrentItem->isSelected(); bool update = viewport()->isUpdatesEnabled(); - viewport()->tqsetUpdatesEnabled( false ); + viewport()->setUpdatesEnabled( false ); bool down = index( previousItem ) < index( m_pCurrentItem ); TQListBoxItem* it = down ? previousItem : m_pCurrentItem; @@ -150,7 +150,7 @@ void KListBox::slotAutoSelect() } blockSignals( block ); - viewport()->tqsetUpdatesEnabled( update ); + viewport()->setUpdatesEnabled( update ); triggerUpdate( false ); emit selectionChanged(); diff --git a/tdeui/klistview.cpp b/tdeui/klistview.cpp index e7b13325d..197d90acd 100644 --- a/tdeui/klistview.cpp +++ b/tdeui/klistview.cpp @@ -197,7 +197,7 @@ void KListViewLineEdit::load(TQListViewItem *i, int c) item=i; col=c; - TQRect rect(p->tqitemRect(i)); + TQRect rect(p->itemRect(i)); setText(item->text(c)); home( true ); @@ -621,7 +621,7 @@ void KListView::slotAutoSelect() bool select = !d->pCurrentItem->isSelected(); bool update = viewport()->isUpdatesEnabled(); - viewport()->tqsetUpdatesEnabled( false ); + viewport()->setUpdatesEnabled( false ); bool down = previousItem->itemPos() < d->pCurrentItem->itemPos(); TQListViewItemIterator lit( down ? previousItem : d->pCurrentItem ); @@ -638,7 +638,7 @@ void KListView::slotAutoSelect() } blockSignals( block ); - viewport()->tqsetUpdatesEnabled( update ); + viewport()->setUpdatesEnabled( update ); triggerUpdate(); emit selectionChanged(); @@ -1067,7 +1067,7 @@ void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListView else { // Get the closest item before us ('atpos' or the one above, if any) - if (p.y() - tqitemRect(atpos).topLeft().y() < (atpos->height()/2)) + if (p.y() - itemRect(atpos).topLeft().y() < (atpos->height()/2)) above = atpos->itemAbove(); else above = atpos; @@ -1327,12 +1327,12 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, it = it->firstChild(); } - insertmarker = tqitemRect (it ? it : after); + insertmarker = itemRect (it ? it : after); level = after->depth(); } else if (parent) { - insertmarker = tqitemRect (parent); + insertmarker = itemRect (parent); level = parent->depth() + 1; } insertmarker.setLeft( treeStepSize() * ( level + (rootIsDecorated() ? 1 : 0) ) + itemMargin() ); @@ -1355,11 +1355,11 @@ TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) if (item) { - r = tqitemRect(item); + r = itemRect(item); r.setLeft(r.left()+(item->depth()+(rootIsDecorated() ? 1 : 0))*treeStepSize()); if (painter) - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, tqcolorGroup(), - TQStyle::Style_FocusAtBorder, tqcolorGroup().highlight()); + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(), + TQStyle::Style_FocusAtBorder, colorGroup().highlight()); } return r; @@ -1808,9 +1808,9 @@ void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) TQRect ir; if (repaintItem1) - ir = ir.unite( tqitemRect(repaintItem1) ); + ir = ir.unite( itemRect(repaintItem1) ); if (repaintItem2) - ir = ir.unite( tqitemRect(repaintItem2) ); + ir = ir.unite( itemRect(repaintItem2) ); if ( !ir.isEmpty() ) { // rectangle to be repainted @@ -1895,7 +1895,7 @@ void KListView::emitContextMenu (KListView*, TQListViewItem* i) TQPoint p; if (i) - p = viewport()->mapToGlobal(tqitemRect(i).center()); + p = viewport()->mapToGlobal(itemRect(i).center()); else p = mapToGlobal(rect().center()); @@ -1940,7 +1940,7 @@ void KListView::viewportPaintEvent(TQPaintEvent *e) TQPainter painter(viewport()); // This is where we actually draw the drop-highlighter - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, tqcolorGroup(), + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(), TQStyle::Style_FocusAtBorder); } d->painting = false; @@ -2231,7 +2231,7 @@ const TQColor &KListViewItem::backgroundColor() { if (isAlternate()) return static_cast< KListView* >(listView())->alternateBackground(); - return listView()->viewport()->tqcolorGroup().base(); + return listView()->viewport()->colorGroup().base(); } TQColor KListViewItem::backgroundColor(int column) @@ -2239,7 +2239,7 @@ TQColor KListViewItem::backgroundColor(int column) KListView* view = static_cast< KListView* >(listView()); TQColor color = isAlternate() ? view->alternateBackground() : - view->viewport()->tqcolorGroup().base(); + view->viewport()->colorGroup().base(); // calculate a different color if the current column is sorted (only if more than 1 column) if ( (view->columns() > 1) && view->shadeSortColumn() && (column == view->columnSorted()) ) diff --git a/tdeui/klistview.h b/tdeui/klistview.h index 07b514457..4795299ed 100644 --- a/tdeui/klistview.h +++ b/tdeui/klistview.h @@ -685,7 +685,7 @@ protected: */ inline bool below (TQListViewItem* i, const TQPoint& p) { - return below (tqitemRect(i), contentsToViewport(p)); + return below (itemRect(i), contentsToViewport(p)); } /** diff --git a/tdeui/klistviewsearchline.cpp b/tdeui/klistviewsearchline.cpp index fb02a8259..7f96ed94d 100644 --- a/tdeui/klistviewsearchline.cpp +++ b/tdeui/klistviewsearchline.cpp @@ -145,7 +145,7 @@ void KListViewSearchLine::updateSearch(const TQString &s) it.current() && !currentItem; ++it) { - if(d->listView->tqitemRect(it.current()).isValid()) + if(d->listView->itemRect(it.current()).isValid()) currentItem = it.current(); } } @@ -302,7 +302,7 @@ void KListViewSearchLine::activateSearch() void KListViewSearchLine::itemAdded(TQListViewItem *item) const { - item->tqsetVisible(itemMatches(item, text())); + item->setVisible(itemMatches(item, text())); } void KListViewSearchLine::listViewDeleted() @@ -347,9 +347,9 @@ void KListViewSearchLine::checkItemParentsNotVisible() { TQListViewItem *item = it.current(); if(itemMatches(item, d->search)) - item->tqsetVisible(true); + item->setVisible(true); else - item->tqsetVisible(false); + item->setVisible(false); } } @@ -381,23 +381,23 @@ bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListVi visible = true; if (highestHiddenParent) { - highestHiddenParent->tqsetVisible(true); - // Calling tqsetVisible on our ancestor will unhide all its descendents. Hide the ones + highestHiddenParent->setVisible(true); + // Calling setVisible on our ancestor will unhide all its descendents. Hide the ones // before us that should not be shown. for(TQListViewItem *hide = first; hide != item; hide = hide->nextSibling()) - hide->tqsetVisible(false); + hide->setVisible(false); highestHiddenParent = 0; - // If we matched, than none of our children matched, yet the tqsetVisible() call on our + // If we matched, than none of our children matched, yet the setVisible() call on our // ancestor unhid them, undo the damage: if(!childMatch) for(TQListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling()) - hide->tqsetVisible(false); + hide->setVisible(false); } else - item->tqsetVisible(true); + item->setVisible(true); } else - item->tqsetVisible(false); + item->setVisible(false); } return visible; } diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp index e7d5469dc..17df3855e 100644 --- a/tdeui/kmainwindow.cpp +++ b/tdeui/kmainwindow.cpp @@ -105,8 +105,8 @@ public: n++; it.current()->savePropertiesInternal(config, n); } - config->setGroup(TQString::tqfromLatin1("Number")); - config->writeEntry(TQString::tqfromLatin1("NumberOfWindows"), n ); + config->setGroup(TQString::fromLatin1("Number")); + config->writeEntry(TQString::fromLatin1("NumberOfWindows"), n ); return true; } @@ -212,7 +212,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) unusedNumber = 0; // add numbers only when needed } for(;;) { - TQWidgetList* list = kapp->tqtopLevelWidgets(); + TQWidgetList* list = kapp->topLevelWidgets(); TQWidgetListIt it( *list ); bool found = false; for( TQWidget* w = it.current(); @@ -286,8 +286,8 @@ void KMainWindow::parseGeometry(bool parsewidth) int w, h; int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h); if (parsewidth) { - TQSize minSize = tqminimumSize(); - TQSize maxSize = tqmaximumSize(); + TQSize minSize = minimumSize(); + TQSize maxSize = maximumSize(); if ( !(m & WidthValue) ) w = width(); if ( !(m & HeightValue) ) @@ -356,8 +356,8 @@ bool KMainWindow::canBeRestored( int number ) KConfig *config = kapp->sessionConfig(); if ( !config ) return false; - config->setGroup( TQString::tqfromLatin1("Number") ); - int n = config->readNumEntry( TQString::tqfromLatin1("NumberOfWindows") , 1 ); + config->setGroup( TQString::fromLatin1("Number") ); + int n = config->readNumEntry( TQString::fromLatin1("NumberOfWindows") , 1 ); return number >= 1 && number <= n; } @@ -370,12 +370,12 @@ const TQString KMainWindow::classNameOfToplevel( int number ) return TQString::null; TQString s; s.setNum( number ); - s.prepend( TQString::tqfromLatin1("WindowProperties") ); + s.prepend( TQString::fromLatin1("WindowProperties") ); config->setGroup( s ); - if ( !config->hasKey( TQString::tqfromLatin1("ClassName") ) ) + if ( !config->hasKey( TQString::fromLatin1("ClassName") ) ) return TQString::null; else - return config->readEntry( TQString::tqfromLatin1("ClassName") ); + return config->readEntry( TQString::fromLatin1("ClassName") ); } void KMainWindow::show() @@ -491,7 +491,7 @@ void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xm void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) { // disabling the updates prevents unnecessary redraws - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); // just in case we are rebuilding, let's remove our old client guiFactory()->removeClient( this ); @@ -564,7 +564,7 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) conserveMemory(); } - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); updateGeometry(); } @@ -696,13 +696,13 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number ) TQString s; s.setNum(number); - s.prepend(TQString::tqfromLatin1("WindowProperties")); + s.prepend(TQString::fromLatin1("WindowProperties")); config->setGroup(s); // store objectName, className, Width and Height for later restoring // (Only useful for session management) - config->writeEntry(TQString::tqfromLatin1("ObjectName"), name()); - config->writeEntry(TQString::tqfromLatin1("ClassName"), className()); + config->writeEntry(TQString::fromLatin1("ObjectName"), name()); + config->writeEntry(TQString::fromLatin1("ClassName"), className()); saveMainWindowSettings(config); // Menubar, statusbar and Toolbar settings. @@ -738,7 +738,7 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &config TQMenuBar* mb = internalMenuBar(); if (mb) { - TQString MenuBar = TQString::tqfromLatin1("MenuBar"); + TQString MenuBar = TQString::fromLatin1("MenuBar"); if(!config->hasDefault("MenuBar") && !mb->isHidden() ) config->revertToDefault("MenuBar"); else @@ -810,13 +810,13 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) // in order they are in toolbar list TQString s; s.setNum(number); - s.prepend(TQString::tqfromLatin1("WindowProperties")); + s.prepend(TQString::fromLatin1("WindowProperties")); config->setGroup(s); // restore the object name (window role) - if ( config->hasKey(TQString::tqfromLatin1("ObjectName" )) ) - setName( config->readEntry(TQString::tqfromLatin1("ObjectName")).latin1()); // latin1 is right here + if ( config->hasKey(TQString::fromLatin1("ObjectName" )) ) + setName( config->readEntry(TQString::fromLatin1("ObjectName")).latin1()); // latin1 is right here applyMainWindowSettings(config); // Menubar, statusbar and toolbar settings. @@ -918,8 +918,8 @@ void KMainWindow::saveWindowSize( KConfig * config ) const #endif TQRect size( desk.width(), w, desk.height(), h ); bool defaultSize = (size == d->defaultWindowSize); - TQString widthString = TQString::tqfromLatin1("Width %1").arg(desk.width()); - TQString heightString = TQString::tqfromLatin1("Height %1").arg(desk.height()); + TQString widthString = TQString::fromLatin1("Width %1").arg(desk.width()); + TQString heightString = TQString::fromLatin1("Height %1").arg(desk.height()); if (!config->hasDefault(widthString) && defaultSize) config->revertToDefault(widthString); else @@ -941,16 +941,16 @@ void KMainWindow::restoreWindowSize( KConfig * config ) TQRect desk = TQApplication::desktop()->screenGeometry(scnum); if ( d->defaultWindowSize.isNull() ) // only once d->defaultWindowSize = TQRect(desk.width(), width(), desk.height(), height()); // store default values - TQSize size( config->readNumEntry( TQString::tqfromLatin1("Width %1").arg(desk.width()), 0 ), - config->readNumEntry( TQString::tqfromLatin1("Height %1").arg(desk.height()), 0 ) ); + TQSize size( config->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 0 ), + config->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 0 ) ); if (size.isEmpty()) { // try the KDE 2.0 way - size = TQSize( config->readNumEntry( TQString::tqfromLatin1("Width"), 0 ), - config->readNumEntry( TQString::tqfromLatin1("Height"), 0 ) ); + size = TQSize( config->readNumEntry( TQString::fromLatin1("Width"), 0 ), + config->readNumEntry( TQString::fromLatin1("Height"), 0 ) ); if (!size.isEmpty()) { // make sure the other resolutions don't get old settings - config->writeEntry( TQString::tqfromLatin1("Width"), 0 ); - config->writeEntry( TQString::tqfromLatin1("Height"), 0 ); + config->writeEntry( TQString::fromLatin1("Width"), 0 ); + config->writeEntry( TQString::fromLatin1("Height"), 0 ); } } if ( !size.isEmpty() ) { @@ -1197,7 +1197,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) break; case KToolBar::Flat: - size += TQSize(0, 3+kapp->tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent )); + size += TQSize(0, 3+kapp->tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); break; default: @@ -1207,7 +1207,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) KMenuBar *mb = internalMenuBar(); if (mb && !mb->isHidden()) { size += TQSize(0,mb->heightForWidth(size.width())); - if (tqstyle().tqstyleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this)) + if (tqstyle().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this)) size += TQSize( 0, dockWindowsMovable() ? 1 : 2); } TQStatusBar *sb = internalStatusBar(); diff --git a/tdeui/kmainwindow.h b/tdeui/kmainwindow.h index 8fb99fb2e..8aba596f1 100644 --- a/tdeui/kmainwindow.h +++ b/tdeui/kmainwindow.h @@ -455,7 +455,7 @@ public: * "virtual TQSize sizeHint() const;" to specify a default size rather * than letting TQWidget::adjust use the default size of 0x0. */ - void setAutoSaveSettings( const TQString & groupName = TQString::tqfromLatin1("MainWindow"), + void setAutoSaveSettings( const TQString & groupName = TQString::fromLatin1("MainWindow"), bool saveWindowSize = true ); /** @@ -1036,7 +1036,7 @@ template <typename T> inline void kRestoreMainWindows() { for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { const TQString className = KMainWindow::classNameOfToplevel( n ); - if ( className == TQString::tqfromLatin1( T::staticMetaObject()->className() ) ) + if ( className == TQString::fromLatin1( T::staticMetaObject()->className() ) ) (new T)->restore( n ); } } @@ -1048,9 +1048,9 @@ inline void kRestoreMainWindows() { classNames[1] = T1::staticMetaObject()->className(); for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { const TQString className = KMainWindow::classNameOfToplevel( n ); - if ( className == TQString::tqfromLatin1( classNames[0] ) ) + if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); - else if ( className == TQString::tqfromLatin1( classNames[1] ) ) + else if ( className == TQString::fromLatin1( classNames[1] ) ) (new T1)->restore( n ); } } @@ -1063,11 +1063,11 @@ inline void kRestoreMainWindows() { classNames[2] = T2::staticMetaObject()->className(); for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { const TQString className = KMainWindow::classNameOfToplevel( n ); - if ( className == TQString::tqfromLatin1( classNames[0] ) ) + if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); - else if ( className == TQString::tqfromLatin1( classNames[1] ) ) + else if ( className == TQString::fromLatin1( classNames[1] ) ) (new T1)->restore( n ); - else if ( className == TQString::tqfromLatin1( classNames[2] ) ) + else if ( className == TQString::fromLatin1( classNames[2] ) ) (new T2)->restore( n ); } } diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index b8f0f3326..2e98f85cc 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -168,7 +168,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) d->wasTopLevel = top_level; if( parentWidget() - && parentWidget()->tqtopLevelWidget()->isFullScreen()) + && parentWidget()->topLevelWidget()->isFullScreen()) top_level = false; if ( isTopLevelMenu() == top_level ) @@ -193,7 +193,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) #ifdef Q_WS_X11 KWin::setType( winId(), NET::TopMenu ); if( parentWidget()) - XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #endif TQMenuBar::setFrameStyle( NoFrame ); TQMenuBar::setLineWidth( 0 ); @@ -244,13 +244,13 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) { if ( d->topLevel ) { - if ( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->tqtopLevelWidget()) ) + if ( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget()) ) { if( ev->type() == TQEvent::Resize ) return false; // ignore resizing of parent, TQMenuBar would try to adjust size if ( ev->type() == TQEvent::Accel || ev->type() == TQEvent::AccelAvailable ) { - if ( TQApplication::sendEvent( tqtopLevelWidget(), ev ) ) + if ( TQApplication::sendEvent( topLevelWidget(), ev ) ) return true; } if(ev->type() == TQEvent::ShowFullScreen ) @@ -260,7 +260,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()) && ev->type() == TQEvent::Reparent ) { #ifdef Q_WS_X11 - XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? #endif @@ -271,7 +271,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) if( ev->type() == TQEvent::Show ) { #ifdef Q_WS_X11 - XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? #endif @@ -283,10 +283,10 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) } else { - if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->tqtopLevelWidget())) + if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget())) { if( ev->type() == TQEvent::WindowStateChange - && !parentWidget()->tqtopLevelWidget()->isFullScreen() ) + && !parentWidget()->topLevelWidget()->isFullScreen() ) setTopLevelMenuInternal( d->wasTopLevel ); } } @@ -506,14 +506,14 @@ void KMenuBar::drawContents( TQPainter* p ) BackgroundMode bg_mode = backgroundMode(); BackgroundOrigin bg_origin = backgroundOrigin(); - tqsetUpdatesEnabled(false); + setUpdatesEnabled(false); setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); p->eraseRect( rect() ); erase(); - TQColorGroup g = tqcolorGroup(); + TQColorGroup g = colorGroup(); bool e; for ( int i=0; i<(int)count(); i++ ) @@ -522,7 +522,7 @@ void KMenuBar::drawContents( TQPainter* p ) if ( !mi->text().isNull() || mi->pixmap() ) { - TQRect r = tqitemRect(i); + TQRect r = itemRect(i); if(r.isEmpty() || !mi->isVisible()) continue; @@ -548,7 +548,7 @@ void KMenuBar::drawContents( TQPainter* p ) flags |= TQStyle::Style_Down; flags |= TQStyle::Style_HasFocus; - tqstyle().tqdrawControl(TQStyle::CE_MenuBarItem, p, this, + tqstyle().drawControl(TQStyle::CE_MenuBarItem, p, this, r, g, flags, TQStyleOption(mi)); } else @@ -561,7 +561,7 @@ void KMenuBar::drawContents( TQPainter* p ) setBackgroundOrigin(bg_origin); setBackgroundMode(bg_mode); - tqsetUpdatesEnabled(up_enabled); + setUpdatesEnabled(up_enabled); } } diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index 43284076c..8ffdc0e6d 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -288,7 +288,7 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, btn->setFocus(); if ( (options & KMessageBox::Notify) ) - sendNotification( text, strlist, notifyType, dialog->tqtopLevelWidget()->winId()); + sendNotification( text, strlist, notifyType, dialog->topLevelWidget()->winId()); if (KMessageBox_queue) { @@ -342,7 +342,7 @@ KMessageBox::shouldBeShownYesNo(const TQString &dontShowAgainName, ButtonCode &result) { if ( dontShowAgainName.isEmpty() ) return true; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); TQString dontAsk = config->readEntry(dontShowAgainName).lower(); @@ -361,7 +361,7 @@ bool KMessageBox::shouldBeShownContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return true; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); return config->readBoolEntry(dontShowAgainName, true); @@ -372,7 +372,7 @@ KMessageBox::saveDontShowAgainYesNo(const TQString &dontShowAgainName, ButtonCode result) { if ( dontShowAgainName.isEmpty() ) return; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no", true, (dontShowAgainName[0] == ':')); @@ -383,7 +383,7 @@ void KMessageBox::saveDontShowAgainContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, false, true, (dontShowAgainName[0] == ':')); @@ -936,7 +936,7 @@ void KMessageBox::enableAllMessages() { KConfig *config = againConfig ? againConfig : KGlobal::config(); - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; @@ -956,7 +956,7 @@ void KMessageBox::enableMessage(const TQString &dontShowAgainName) { KConfig *config = againConfig ? againConfig : KGlobal::config(); - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; diff --git a/tdeui/knumvalidator.cpp b/tdeui/knumvalidator.cpp index 5ab97e840..fdc51022c 100644 --- a/tdeui/knumvalidator.cpp +++ b/tdeui/knumvalidator.cpp @@ -67,7 +67,7 @@ TQValidator::State KIntValidator::validate ( TQString &str, int & ) const if (_base > 10) newStr = newStr.upper(); - if (newStr == TQString::tqfromLatin1("-")) // a special case + if (newStr == TQString::fromLatin1("-")) // a special case if ((_min || _max) && _min >= 0) ok = false; else @@ -209,12 +209,12 @@ TQValidator::State KFloatValidator::validate ( TQString &str, int & ) const TQString newStr; newStr = str.stripWhiteSpace(); - if (newStr == TQString::tqfromLatin1("-")) // a special case + if (newStr == TQString::fromLatin1("-")) // a special case if ((_min || _max) && _min >= 0) ok = false; else return TQValidator::Acceptable; - else if (newStr == TQString::tqfromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case + else if (newStr == TQString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case return TQValidator::Acceptable; else if (newStr.length()) { diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 8d024ac32..cdd238706 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -187,9 +187,9 @@ void KPasswordEdit::erase() void KPasswordEdit::focusInEvent(TQFocusEvent *e) { const TQString txt = text(); - tqsetUpdatesEnabled(false); + setUpdatesEnabled(false); TQLineEdit::focusInEvent(e); - tqsetUpdatesEnabled(true); + setUpdatesEnabled(true); setText(txt); } diff --git a/tdeui/kpopupmenu.cpp b/tdeui/kpopupmenu.cpp index 7ca5ea21f..d0ebf25f3 100644 --- a/tdeui/kpopupmenu.cpp +++ b/tdeui/kpopupmenu.cpp @@ -117,7 +117,7 @@ void KPopupTitle::paintEvent(TQPaintEvent *) TQSize KPopupTitle::sizeHint() const { - return tqminimumSize(); + return minimumSize(); } class KPopupMenu::KPopupMenuPrivate diff --git a/tdeui/kprogress.cpp b/tdeui/kprogress.cpp index 34bc211d4..9b72dcf2c 100644 --- a/tdeui/kprogress.cpp +++ b/tdeui/kprogress.cpp @@ -132,9 +132,9 @@ bool KProgress::setIndicator(TQString &indicator, int progress, int totalSteps) if (!totalSteps) return false; TQString newString(mFormat); - newString.replace(TQString::tqfromLatin1("%v"), + newString.replace(TQString::fromLatin1("%v"), TQString::number(progress)); - newString.replace(TQString::tqfromLatin1("%m"), + newString.replace(TQString::fromLatin1("%m"), TQString::number(totalSteps)); if (totalSteps > INT_MAX / 1000) { @@ -142,7 +142,7 @@ bool KProgress::setIndicator(TQString &indicator, int progress, int totalSteps) totalSteps /= 1000; } - newString.replace(TQString::tqfromLatin1("%p"), + newString.replace(TQString::fromLatin1("%p"), TQString::number((progress * 100) / totalSteps)); if (newString != indicator) diff --git a/tdeui/krootpixmap.cpp b/tdeui/krootpixmap.cpp index b87e887d7..8bcd7827b 100644 --- a/tdeui/krootpixmap.cpp +++ b/tdeui/krootpixmap.cpp @@ -77,7 +77,7 @@ void KRootPixmap::init() connect(d->twin, TQT_SIGNAL(currentDesktopChanged(int)), TQT_SLOT(desktopChanged(int))); #endif - d->toplevel = m_pWidget->tqtopLevelWidget(); + d->toplevel = m_pWidget->topLevelWidget(); d->toplevel->installEventFilter(this); m_pWidget->installEventFilter(this); } @@ -170,7 +170,7 @@ bool KRootPixmap::eventFilter(TQObject *, TQEvent *event) case TQEvent::Reparent: d->toplevel->removeEventFilter(this); - d->toplevel = m_pWidget->tqtopLevelWidget(); + d->toplevel = m_pWidget->topLevelWidget(); d->toplevel->installEventFilter(this); break; @@ -188,7 +188,7 @@ void KRootPixmap::desktopChanged(int desktop) return; #ifdef Q_WS_X11 - if (KWin::windowInfo(m_pWidget->tqtopLevelWidget()->winId()).desktop() == NET::OnAllDesktops && + if (KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop() == NET::OnAllDesktops && pixmapName(m_Desk) != pixmapName(desktop)) #endif tqrepaint(true); @@ -198,7 +198,7 @@ void KRootPixmap::desktopChanged( WId window, unsigned int properties ) { #ifdef Q_WS_X11 if( !(properties & NET::WMDesktop) || - (window != m_pWidget->tqtopLevelWidget()->winId())) + (window != m_pWidget->topLevelWidget()->winId())) return; #endif @@ -233,7 +233,7 @@ void KRootPixmap::tqrepaint(bool force) } m_Rect = TQRect(p1, p2); #ifdef Q_WS_X11 - m_Desk = KWin::windowInfo(m_pWidget->tqtopLevelWidget()->winId()).desktop(); + m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop(); if (m_Desk == NET::OnAllDesktops) m_Desk = currentDesktop(); diff --git a/tdeui/kruler.cpp b/tdeui/kruler.cpp index 56d3703d8..e9651424b 100644 --- a/tdeui/kruler.cpp +++ b/tdeui/kruler.cpp @@ -432,19 +432,19 @@ KRuler::setRulerMetricStyle(KRuler::MetricStyle style) } switch (style) { case Pixel: - setEndLabel(TQString::tqfromLatin1("pixel")); + setEndLabel(TQString::fromLatin1("pixel")); break; case Inch: - setEndLabel(TQString::tqfromLatin1("inch")); + setEndLabel(TQString::fromLatin1("inch")); break; case Millimetres: - setEndLabel(TQString::tqfromLatin1("mm")); + setEndLabel(TQString::fromLatin1("mm")); break; case Centimetres: - setEndLabel(TQString::tqfromLatin1("cm")); + setEndLabel(TQString::fromLatin1("cm")); break; case Metres: - setEndLabel(TQString::tqfromLatin1("m")); + setEndLabel(TQString::fromLatin1("m")); default: /* never reached, see above switch */ /* empty command */; } diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index aa2b62d49..5ca0c2b85 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -363,8 +363,8 @@ KSpellConfig::interpret( TQString &fname, TQString &lname, } //We have explicitly chosen English as the default here. - if ( ( KGlobal::locale()->language() == TQString::tqfromLatin1("C") && - lname==TQString::tqfromLatin1("en") ) || + if ( ( KGlobal::locale()->language() == TQString::fromLatin1("C") && + lname==TQString::fromLatin1("en") ) || KGlobal::locale()->language() == lname ) return true; diff --git a/tdeui/kselect.cpp b/tdeui/kselect.cpp index 8801f5570..367ebdb1b 100644 --- a/tdeui/kselect.cpp +++ b/tdeui/kselect.cpp @@ -53,7 +53,7 @@ KXYSelector::~KXYSelector() void KXYSelector::setRange( int _minX, int _minY, int _maxX, int _maxY ) { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); px = w; py = w; minX = _minX; @@ -74,7 +74,7 @@ void KXYSelector::setYValue( int _yPos ) void KXYSelector::setValues( int _xPos, int _yPos ) { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) w = 5; xPos = _xPos; @@ -98,7 +98,7 @@ void KXYSelector::setValues( int _xPos, int _yPos ) TQRect KXYSelector::contentsRect() const { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) { w = 5; } @@ -113,7 +113,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev ) TQRect paintRect = ev->rect(); TQRect borderRect = rect(); - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) { w = 5 - w; } @@ -123,7 +123,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev ) painter.begin( this ); tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, - borderRect, tqcolorGroup(), + borderRect, colorGroup(), TQStyle::Style_Sunken); drawContents( &painter ); @@ -150,7 +150,7 @@ void KXYSelector::mouseMoveEvent( TQMouseEvent *e ) { int xVal, yVal; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); valuesFromPosition( e->pos().x() - w, e->pos().y() - w, xVal, yVal ); setValues( xVal, yVal ); @@ -170,7 +170,7 @@ void KXYSelector::wheelEvent( TQWheelEvent *e ) void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) w = 5; xVal = ( (maxX-minX) * (x-w) ) / ( width()-2*w ); yVal = maxY - ( ( (maxY-minY) * (y-w) ) / ( height()-2*w ) ); @@ -188,7 +188,7 @@ void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const void KXYSelector::setPosition( int xp, int yp ) { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) w = 5; if ( xp < w ) xp = w; @@ -256,7 +256,7 @@ KSelector::~KSelector() TQRect KSelector::contentsRect() const { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; if ( orientation() == Qt::Vertical ) return TQRect( w, iw, width() - w * 2 - 5, height() - 2 * iw ); @@ -267,7 +267,7 @@ TQRect KSelector::contentsRect() const void KSelector::paintEvent( TQPaintEvent * ) { TQPainter painter; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; painter.begin( this ); @@ -282,7 +282,7 @@ void KSelector::paintEvent( TQPaintEvent * ) else r.addCoords(iw - w, 0, w - iw, -iw); tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, - r, tqcolorGroup(), + r, colorGroup(), TQStyle::Style_Sunken); } @@ -329,7 +329,7 @@ void KSelector::valueChange() void KSelector::moveArrow( const TQPoint &pos ) { int val; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; if ( orientation() == Qt::Vertical ) @@ -346,7 +346,7 @@ TQPoint KSelector::calcArrowPos( int val ) { TQPoint p; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; if ( orientation() == Qt::Vertical ) { @@ -374,7 +374,7 @@ void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) TQPointArray array(3); painter->setPen( TQPen() ); - painter->setBrush( TQBrush( tqcolorGroup().buttonText() ) ); + painter->setBrush( TQBrush( colorGroup().buttonText() ) ); array.setPoint( 0, pos.x()+0, pos.y()+0 ); array.setPoint( 1, pos.x()+5, pos.y()+5 ); if ( orientation() == Qt::Vertical ) diff --git a/tdeui/kselect.h b/tdeui/kselect.h index cc011dcfe..58efab293 100644 --- a/tdeui/kselect.h +++ b/tdeui/kselect.h @@ -351,7 +351,7 @@ public: protected: virtual void drawContents( TQPainter * ); - virtual TQSize tqminimumSize() const + virtual TQSize minimumSize() const { return sizeHint(); } private: diff --git a/tdeui/kseparator.cpp b/tdeui/kseparator.cpp index 07d143266..2f3a1cde8 100644 --- a/tdeui/kseparator.cpp +++ b/tdeui/kseparator.cpp @@ -83,7 +83,7 @@ void KSeparator::drawFrame(TQPainter *p) { TQPoint p1, p2; TQRect r = frameRect(); - const TQColorGroup & g = tqcolorGroup(); + const TQColorGroup & g = colorGroup(); if ( frameStyle() & HLine ) { p1 = TQPoint( r.x(), r.height()/2 ); diff --git a/tdeui/kshortcutdialog.cpp b/tdeui/kshortcutdialog.cpp index fbdd46519..27d721626 100644 --- a/tdeui/kshortcutdialog.cpp +++ b/tdeui/kshortcutdialog.cpp @@ -169,8 +169,8 @@ void KShortcutDialog::updateShortcutDisplay() this->setFocus(); } - s[0].replace('&', TQString::tqfromLatin1("&&")); - s[1].replace('&', TQString::tqfromLatin1("&&")); + s[0].replace('&', TQString::fromLatin1("&&")); + s[1].replace('&', TQString::fromLatin1("&&")); m_simple->m_txtShortcut->setText( s[0] ); m_adv->m_txtPrimary->setText( s[0] ); diff --git a/tdeui/kspell.cpp b/tdeui/kspell.cpp index 9ca882962..aa65dc484 100644 --- a/tdeui/kspell.cpp +++ b/tdeui/kspell.cpp @@ -1220,10 +1220,10 @@ void KSpell::dialog( const TQString & word, TQStringList & sugg, const char *_sl TQString marker( "_MARKER_" ); tmpBuf.replace( lastpos, word.length(), marker ); TQString context = tmpBuf.mid(QMAX(lastpos-18,0), 2*18+marker.length()); - context.replace( '\n',TQString::tqfromLatin1(" ")); - context.replace( '<', TQString::tqfromLatin1("<") ); - context.replace( '>', TQString::tqfromLatin1(">") ); - context.replace( marker, TQString::tqfromLatin1("<b>%1</b>").arg( word ) ); + context.replace( '\n',TQString::fromLatin1(" ")); + context.replace( '<', TQString::fromLatin1("<") ); + context.replace( '>', TQString::fromLatin1(">") ); + context.replace( marker, TQString::fromLatin1("<b>%1</b>").arg( word ) ); context = "<qt>" + context + "</qt>"; ksdlg->init( word, &sugg, context ); diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index 696f1294c..b70c8ae9c 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -65,8 +65,8 @@ KStatusBar::KStatusBar( TQWidget *parent, const char *name ) // ...but off by default (sven) KConfig *config = KGlobal::config(); TQString group(config->group()); - config->setGroup(TQString::tqfromLatin1("StatusBar style")); - bool grip_enabled = config->readBoolEntry(TQString::tqfromLatin1("SizeGripEnabled"), false); + config->setGroup(TQString::fromLatin1("StatusBar style")); + bool grip_enabled = config->readBoolEntry(TQString::fromLatin1("SizeGripEnabled"), false); setSizeGripEnabled(grip_enabled); config->setGroup(group); } diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index e9a87d71d..e1adac16a 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -72,7 +72,7 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch else aboutData = KGlobal::instance()->aboutData(); */ - TQString appName = (aboutData) ? aboutData->programName() : TQString::tqfromLatin1(tqApp->name()); + TQString appName = (aboutData) ? aboutData->programName() : TQString::fromLatin1(tqApp->name()); sLabel = i18n(pInfo->psLabel).arg(appName); } break; diff --git a/tdeui/kstdguiitem.cpp b/tdeui/kstdguiitem.cpp index fa9d99341..2367804a8 100644 --- a/tdeui/kstdguiitem.cpp +++ b/tdeui/kstdguiitem.cpp @@ -62,34 +62,34 @@ KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum ) TQString KStdGuiItem::stdItem( StdItem ui_enum ) { switch (ui_enum ) { - case Ok : return TQString::tqfromLatin1("ok"); - case Cancel : return TQString::tqfromLatin1("cancel"); - case Yes : return TQString::tqfromLatin1("yes"); - case No : return TQString::tqfromLatin1("no"); - case Discard : return TQString::tqfromLatin1("discard"); - case Save : return TQString::tqfromLatin1("save"); - case DontSave : return TQString::tqfromLatin1("dontSave"); - case SaveAs : return TQString::tqfromLatin1("saveAs"); - case Apply : return TQString::tqfromLatin1("apply"); - case Help : return TQString::tqfromLatin1("help"); - case Close : return TQString::tqfromLatin1("close"); - case Defaults : return TQString::tqfromLatin1("defaults"); - case Back : return TQString::tqfromLatin1("back"); - case Forward : return TQString::tqfromLatin1("forward"); - case Print : return TQString::tqfromLatin1("print"); - case Continue : return TQString::tqfromLatin1("continue"); - case Open : return TQString::tqfromLatin1("open"); - case Quit : return TQString::tqfromLatin1("quit"); - case AdminMode: return TQString::tqfromLatin1("adminMode"); - case Delete : return TQString::tqfromLatin1("delete"); - case Insert : return TQString::tqfromLatin1("insert"); - case Find : return TQString::tqfromLatin1("find"); - case Stop : return TQString::tqfromLatin1("stop"); - case Add : return TQString::tqfromLatin1("add"); - case Remove : return TQString::tqfromLatin1("remove"); - case Test : return TQString::tqfromLatin1("test"); - case Properties : return TQString::tqfromLatin1("properties"); - case Overwrite : return TQString::tqfromLatin1("overwrite"); + case Ok : return TQString::fromLatin1("ok"); + case Cancel : return TQString::fromLatin1("cancel"); + case Yes : return TQString::fromLatin1("yes"); + case No : return TQString::fromLatin1("no"); + case Discard : return TQString::fromLatin1("discard"); + case Save : return TQString::fromLatin1("save"); + case DontSave : return TQString::fromLatin1("dontSave"); + case SaveAs : return TQString::fromLatin1("saveAs"); + case Apply : return TQString::fromLatin1("apply"); + case Help : return TQString::fromLatin1("help"); + case Close : return TQString::fromLatin1("close"); + case Defaults : return TQString::fromLatin1("defaults"); + case Back : return TQString::fromLatin1("back"); + case Forward : return TQString::fromLatin1("forward"); + case Print : return TQString::fromLatin1("print"); + case Continue : return TQString::fromLatin1("continue"); + case Open : return TQString::fromLatin1("open"); + case Quit : return TQString::fromLatin1("quit"); + case AdminMode: return TQString::fromLatin1("adminMode"); + case Delete : return TQString::fromLatin1("delete"); + case Insert : return TQString::fromLatin1("insert"); + case Find : return TQString::fromLatin1("find"); + case Stop : return TQString::fromLatin1("stop"); + case Add : return TQString::fromLatin1("add"); + case Remove : return TQString::fromLatin1("remove"); + case Test : return TQString::fromLatin1("test"); + case Properties : return TQString::fromLatin1("properties"); + case Overwrite : return TQString::fromLatin1("overwrite"); default : return TQString::null; }; } diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 5e334ac11..e118fcd74 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -148,14 +148,14 @@ int KSyntaxHighlighter::highlightParagraph( const TQString &text, int ) } TQString simplified = text; - simplified = TQString(simplified.replace( TQRegExp( "\\s" ), TQString() )).replace( '|', TQString::tqfromLatin1(">") ); - while ( simplified.startsWith( TQString::tqfromLatin1(">>>>") ) ) + simplified = TQString(simplified.replace( TQRegExp( "\\s" ), TQString() )).replace( '|', TQString::fromLatin1(">") ); + while ( simplified.startsWith( TQString::fromLatin1(">>>>") ) ) simplified = simplified.mid(3); - if ( simplified.startsWith( TQString::tqfromLatin1(">>>") ) || simplified.startsWith( TQString::tqfromLatin1("> > >") ) ) + if ( simplified.startsWith( TQString::fromLatin1(">>>") ) || simplified.startsWith( TQString::fromLatin1("> > >") ) ) setFormat( 0, text.length(), d->col2 ); - else if ( simplified.startsWith( TQString::tqfromLatin1(">>") ) || simplified.startsWith( TQString::tqfromLatin1("> >") ) ) + else if ( simplified.startsWith( TQString::fromLatin1(">>") ) || simplified.startsWith( TQString::fromLatin1("> >") ) ) setFormat( 0, text.length(), d->col3 ); - else if ( simplified.startsWith( TQString::tqfromLatin1(">") ) ) + else if ( simplified.startsWith( TQString::fromLatin1(">") ) ) setFormat( 0, text.length(), d->col4 ); else setFormat( 0, text.length(), d->col5 ); diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index dec85b7e8..b35924375 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -69,7 +69,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) d->actionCollection = new KActionCollection(this); #ifdef Q_WS_X11 - KWin::setSystemTrayWindowFor( winId(), parent?parent->tqtopLevelWidget()->winId(): qt_xrootwin() ); + KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): qt_xrootwin() ); #endif setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); diff --git a/tdeui/ktabbar.cpp b/tdeui/ktabbar.cpp index eed23ebfe..cfc6ce481 100644 --- a/tdeui/ktabbar.cpp +++ b/tdeui/ktabbar.cpp @@ -172,8 +172,8 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) int xoff = 0, yoff = 0; // The additional offsets were found by try and error, TODO: find the rational behind them if ( t == tab( currentTab() ) ) { - xoff = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3; - yoff = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4; + xoff = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3; + yoff = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4; } else { xoff = 7; @@ -303,7 +303,7 @@ const TQColor &KTabBar::tabColor( int id ) const if ( mTabColors.contains( id ) ) return mTabColors[id]; - return tqcolorGroup().foreground(); + return colorGroup().foreground(); } int KTabBar::insertTab( TQTab *t, int index ) @@ -341,8 +341,8 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br, r.setLeft( r.left() + pixw + 4 ); r.setRight( r.right() + 2 ); - int inactiveXShift = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ); - int inactiveYShift = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ); + int inactiveXShift = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ); + int inactiveYShift = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ); int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2; @@ -358,11 +358,11 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br, if ( has_focus ) flags |= TQStyle::Style_HasFocus; - TQColorGroup cg( tqcolorGroup() ); + TQColorGroup cg( colorGroup() ); if ( mTabColors.contains( t->identifier() ) ) cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] ); - tqstyle().tqdrawControl( TQStyle::CE_TabBarLabel, p, this, r, + tqstyle().drawControl( TQStyle::CE_TabBarLabel, p, this, r, t->isEnabled() ? cg : tqpalette().disabled(), flags, TQStyleOption(t) ); } diff --git a/tdeui/ktabctl.cpp b/tdeui/ktabctl.cpp index 204a0979e..dc31a5a0f 100644 --- a/tdeui/ktabctl.cpp +++ b/tdeui/ktabctl.cpp @@ -104,7 +104,7 @@ bool KTabCtl::isTabEnabled(const TQString& name) unsigned int i; for(i = 0; i < pages.size(); i++) - if (TQString::tqfromLatin1(pages[i]->name()) == name) + if (TQString::fromLatin1(pages[i]->name()) == name) return tabs->isTabEnabled(i); /* return the enabled status */ return false; /* tab does not exist */ } @@ -117,7 +117,7 @@ void KTabCtl::setTabEnabled(const TQString& name, bool state) return; for (i = 0; i < pages.size(); i++) - if (TQString::tqfromLatin1(pages[i]->name()) == name) + if (TQString::fromLatin1(pages[i]->name()) == name) tabs->setTabEnabled(i, state); } @@ -138,14 +138,14 @@ void KTabCtl::setSizes() * check the actual minimum and maximum sizes */ - if (pages[i]->tqmaximumSize().height() < max.height()) - max.setHeight(pages[i]->tqmaximumSize().height()); - if (pages[i]->tqmaximumSize().width() < max.width()) - max.setWidth( pages[i]->tqmaximumSize().width()); - if ( pages[i]->tqminimumSize().height() > min.height()) - min.setHeight( pages[i]->tqminimumSize().height()); - if ( pages[i]->tqminimumSize().width() > min.width()) - min.setWidth( pages[i]->tqminimumSize().width()); + if (pages[i]->maximumSize().height() < max.height()) + max.setHeight(pages[i]->maximumSize().height()); + if (pages[i]->maximumSize().width() < max.width()) + max.setWidth( pages[i]->maximumSize().width()); + if ( pages[i]->minimumSize().height() > min.height()) + min.setHeight( pages[i]->minimumSize().height()); + if ( pages[i]->minimumSize().width() > min.width()) + min.setWidth( pages[i]->minimumSize().width()); } // BL: min and max are sizes of children, not tabcontrol @@ -251,16 +251,16 @@ void KTabCtl::paintEvent(TQPaintEvent *) int x1 = getChildRect().right() + 2; int x0 = getChildRect().left() - 1; - p.setPen(tqcolorGroup().light()); + p.setPen(colorGroup().light()); p.drawLine(x0, y0 - 1, x1 - 1, y0 - 1); /* 1st top line */ - p.setPen(tqcolorGroup().midlight()); + p.setPen(colorGroup().midlight()); p.drawLine(x0, y0, x1 - 1, y0); /* 2nd top line */ - p.setPen(tqcolorGroup().light()); + p.setPen(colorGroup().light()); p.drawLine(x0, y0 + 1, x0, y1); /* left line */ p.setPen(black); p.drawLine(x1, y1, x0, y1); /* bottom line */ p.drawLine(x1, y1 - 1, x1, y0); - p.setPen(tqcolorGroup().dark()); + p.setPen(colorGroup().dark()); p.drawLine(x0 + 1, y1 - 1, x1 - 1, y1 - 1); /* bottom */ p.drawLine(x1 - 1, y1 - 2, x1 - 1, y0 + 1); p.end(); diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp index 36410921e..7423a126f 100644 --- a/tdeui/ktabwidget.cpp +++ b/tdeui/ktabwidget.cpp @@ -163,8 +163,8 @@ bool KTabWidget::tabCloseActivatePrevious() const unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength ) { int hframe, overlap; - hframe = tabBar()->tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() ); - overlap = tabBar()->tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() ); + hframe = tabBar()->tqstyle().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() ); + overlap = tabBar()->tqstyle().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() ); TQFontMetrics fm = tabBar()->fontMetrics(); int x = 0; diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index 73bbf3c5f..be8e2925f 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -182,7 +182,7 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) // ignore Ctrl-Return so that KDialogs can close the dialog else if ( e->state() == ControlButton && (e->key() == Key_Return || e->key() == Key_Enter) && - tqtopLevelWidget()->inherits( "KDialog" ) ) + topLevelWidget()->inherits( "KDialog" ) ) { e->ignore(); return; diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index 70290f62c..3be1d57e6 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -59,7 +59,7 @@ KTipDatabase::KTipDatabase(const TQString &_tipFile) { TQString tipFile = _tipFile; if (tipFile.isEmpty()) - tipFile = TQString::tqfromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"; + tipFile = TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"; loadTips(tipFile); @@ -72,7 +72,7 @@ KTipDatabase::KTipDatabase( const TQStringList& tipsFiles ) { if ( tipsFiles.isEmpty() || ( ( tipsFiles.count() == 1 ) && tipsFiles.first().isEmpty() ) ) { - addTips(TQString::tqfromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"); + addTips(TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"); } else { @@ -347,10 +347,10 @@ void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bo const int oneDay = 24*60*60; TQDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown"); // Show tip roughly once a week - if (lastShown.secsTo(TQDateTime::tqcurrentDateTime()) < (oneDay + (kapp->random() % (10*oneDay)))) + if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay)))) return; } - configGroup.writeEntry("TipLastShown", TQDateTime::tqcurrentDateTime()); + configGroup.writeEntry("TipLastShown", TQDateTime::currentDateTime()); kapp->config()->sync(); if (!hasLastShown) return; // Don't show tip on first start @@ -384,7 +384,7 @@ static TQString fixTip(TQString tip) void KTipDialog::prevTip() { mDatabase->prevTip(); - TQString currentTip = TQString::tqfromLatin1( + TQString currentTip = TQString::fromLatin1( "<qt text=\"%1\" bgcolor=\"%2\">%3</qt>") .arg(mTextColor.name()) .arg(mBaseColor.name()) @@ -399,7 +399,7 @@ static TQString fixTip(TQString tip) void KTipDialog::nextTip() { mDatabase->nextTip(); - TQString currentTip = TQString::tqfromLatin1( + TQString currentTip = TQString::fromLatin1( "<qt text=\"%1\" bgcolor=\"%2\">%3</qt>") .arg(mTextColor.name()) .arg(mBaseColor.name()) diff --git a/tdeui/ktoolbar.cpp b/tdeui/ktoolbar.cpp index ee531e102..2a9a56ef3 100644 --- a/tdeui/ktoolbar.cpp +++ b/tdeui/ktoolbar.cpp @@ -170,7 +170,7 @@ void KToolBarSeparator::drawContents( TQPainter* p ) flags = flags | TQStyle::Style_Horizontal; tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, p, - contentsRect(), tqcolorGroup(), flags); + contentsRect(), colorGroup(), flags); } else { TQFrame::drawContents(p); } @@ -183,7 +183,7 @@ void KToolBarSeparator::styleChange( TQStyle& ) TQSize KToolBarSeparator::sizeHint() const { - int dim = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); + int dim = tqstyle().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); } @@ -193,7 +193,7 @@ TQSizePolicy KToolBarSeparator::sizePolicy() const } KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) - : TQToolBar( TQString::tqfromLatin1( name ), + : TQToolBar( TQString::fromLatin1( name ), tqt_dynamic_cast<TQMainWindow*>(parent), parent, false, name ? name : "mainToolBar") @@ -202,7 +202,7 @@ KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool re } KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) - : TQToolBar( TQString::tqfromLatin1( name ), + : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") { @@ -210,7 +210,7 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, } KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) - : TQToolBar( TQString::tqfromLatin1( name ), + : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") { @@ -856,11 +856,11 @@ void KToolBar::setIconText(IconText icontext, bool update) // ugly hack to force a TQMainWindow::triggerLayout( true ) TQMainWindow *mw = mainWindow(); if ( mw ) { - mw->tqsetUpdatesEnabled( false ); + mw->setUpdatesEnabled( false ); // mw->setToolBarsMovable( !mw->toolBarsMovable() ); // Old way // mw->setToolBarsMovable( !mw->toolBarsMovable() ); mw->setCentralWidget(mw->centralWidget()); // This is a faster hack - mw->tqsetUpdatesEnabled( true ); + mw->setUpdatesEnabled( true ); } } @@ -894,11 +894,11 @@ void KToolBar::setIconSize(int size, bool update) // ugly hack to force a TQMainWindow::triggerLayout( true ) if ( mainWindow() ) { TQMainWindow *mw = mainWindow(); - mw->tqsetUpdatesEnabled( false ); + mw->setUpdatesEnabled( false ); // mw->setToolBarsMovable( !mw->toolBarsMovable() ); // Old way // mw->setToolBarsMovable( !mw->toolBarsMovable() ); mw->setCentralWidget(mw->centralWidget()); // This is a faster hack - mw->tqsetUpdatesEnabled( true ); + mw->setUpdatesEnabled( true ); } } @@ -1358,12 +1358,12 @@ TQSize KToolBar::sizeHint() const for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); - if ( w->tqsizePolicy().horData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().horData() == TQSizePolicy::Ignored ) sh.setWidth( 1 ); - if ( w->tqsizePolicy().verData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().verData() == TQSizePolicy::Ignored ) sh.setHeight( 1 ); - sh = sh.boundedTo( w->tqmaximumSize() ) - .expandedTo( w->tqminimumSize() ).expandedTo( TQSize(1, 1) ); + sh = sh.boundedTo( w->maximumSize() ) + .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) ); minSize = minSize.expandedTo(TQSize(0, sh.height())); minSize += TQSize(sh.width()+1, 0); @@ -1371,7 +1371,7 @@ TQSize KToolBar::sizeHint() const minSize += TQSize(2, 0); // A little bit extra spacing behind it. } - minSize += TQSize(TQApplication::tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0); + minSize += TQSize(TQApplication::tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0); minSize += TQSize(margin*2, margin*2); break; @@ -1380,17 +1380,17 @@ TQSize KToolBar::sizeHint() const for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); - if ( w->tqsizePolicy().horData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().horData() == TQSizePolicy::Ignored ) sh.setWidth( 1 ); - if ( w->tqsizePolicy().verData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().verData() == TQSizePolicy::Ignored ) sh.setHeight( 1 ); - sh = sh.boundedTo( w->tqmaximumSize() ) - .expandedTo( w->tqminimumSize() ).expandedTo( TQSize(1, 1) ); + sh = sh.boundedTo( w->maximumSize() ) + .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) ); minSize = minSize.expandedTo(TQSize(sh.width(), 0)); minSize += TQSize(0, sh.height()+1); } - minSize += TQSize(0, TQApplication::tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent )); + minSize += TQSize(0, TQApplication::tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); minSize += TQSize(margin*2, margin*2); break; @@ -1401,7 +1401,7 @@ TQSize KToolBar::sizeHint() const return minSize; } -TQSize KToolBar::tqminimumSize() const +TQSize KToolBar::minimumSize() const { return minimumSizeHint(); } @@ -1429,7 +1429,7 @@ void KToolBar::show() void KToolBar::resizeEvent( TQResizeEvent *e ) { bool b = isUpdatesEnabled(); - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); TQToolBar::resizeEvent( e ); if (b) { @@ -1446,7 +1446,7 @@ void KToolBar::resizeEvent( TQResizeEvent *e ) } // else { // printf("[WARNING] In KToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); -// tqsetUpdatesEnabled( true ); +// setUpdatesEnabled( true ); // } } @@ -1486,25 +1486,25 @@ void KToolBar::slotAppearanceChanged() //static bool KToolBar::highlightSetting() { - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - return KGlobal::config()->readBoolEntry(TQString::tqfromLatin1("Highlighting"),true); + return KGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true); } //static bool KToolBar::transparentSetting() { - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - return KGlobal::config()->readBoolEntry(TQString::tqfromLatin1("TransparentMoving"),true); + return KGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true); } //static KToolBar::IconText KToolBar::iconTextSetting() { - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - TQString icontext = KGlobal::config()->readEntry(TQString::tqfromLatin1("IconText"),TQString::tqfromLatin1("IconOnly")); + TQString icontext = KGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly")); if ( icontext == "IconTextRight" ) return IconTextRight; else if ( icontext == "IconTextBottom" ) @@ -1546,7 +1546,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG TQString iconText = d->IconTextDefault; // this is the first iteration - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); { // start block for KConfigGroupSaver KConfigGroupSaver saver(gconfig, grpToolbar); @@ -1732,14 +1732,14 @@ bool KToolBar::event( TQEvent *e ) void KToolBar::slotRepaint() { - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); // Send a resizeEvent to update the "toolbar extension arrow" // (The button you get when your toolbar-items don't fit in // the available space) TQResizeEvent ev(size(), size()); resizeEvent(&ev); TQApplication::sendPostedEvents( this, TQEvent::LayoutHint ); - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); tqrepaint( true ); } diff --git a/tdeui/ktoolbar.h b/tdeui/ktoolbar.h index 96d0872bc..bbf0bfc65 100644 --- a/tdeui/ktoolbar.h +++ b/tdeui/ktoolbar.h @@ -947,7 +947,7 @@ public: bool highlight() const; TQSize sizeHint() const; TQSize minimumSizeHint() const; - TQSize tqminimumSize() const; + TQSize minimumSize() const; void hide(); void show(); diff --git a/tdeui/ktoolbarbutton.cpp b/tdeui/ktoolbarbutton.cpp index b7801a2f8..5e89c175a 100644 --- a/tdeui/ktoolbarbutton.cpp +++ b/tdeui/ktoolbarbutton.cpp @@ -263,7 +263,7 @@ void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) return; TQString txt(text); - if (txt.endsWith(TQString::tqfromLatin1("..."))) + if (txt.endsWith(TQString::fromLatin1("..."))) txt.truncate(txt.length() - 3); TQToolButton::setTextLabel(txt, tipToo); @@ -494,8 +494,8 @@ void KToolBarButton::drawButton( TQPainter *_painter ) if (hasFocus()) flags |= TQStyle::Style_HasFocus; // Draw a styled toolbutton - tqstyle().tqdrawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(), - tqcolorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption()); + tqstyle().drawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(), + colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption()); int dx, dy; TQFont tmp_font(KGlobalSettings::toolBarFont()); @@ -513,7 +513,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) { dx = ( width() - pixmap.width() ) / 2; dy = ( height() - pixmap.height() ) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -531,7 +531,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) { dx = 4; dy = ( height() - pixmap.height() ) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -547,7 +547,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) else dx = 4; dy = 0; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -562,7 +562,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textFlags = AlignVCenter|AlignLeft; dx = (width() - fm.width(textLabel())) / 2; dy = (height() - fm.lineSpacing()) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -580,7 +580,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) { dx = (width() - pixmap.width()) / 2; dy = (height() - fm.lineSpacing() - pixmap.height()) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -594,7 +594,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) dx = (width() - fm.width(textLabel())) / 2; dy = height() - fm.lineSpacing() - 4; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -612,7 +612,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) else if(d->m_isRaised) _painter->setPen(KGlobalSettings::toolBarHighlightColor()); else - _painter->setPen( tqcolorGroup().buttonText() ); + _painter->setPen( colorGroup().buttonText() ); _painter->drawText(textRect, textFlags, textLabel()); } @@ -624,7 +624,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, - TQRect(width()-7, height()-7, 7, 7), tqcolorGroup(), + TQRect(width()-7, height()-7, 7, 7), colorGroup(), arrowFlags, TQStyleOption() ); } } @@ -744,7 +744,7 @@ TQSize KToolBarButton::minimumSizeHint() const return d->size; } -TQSize KToolBarButton::tqminimumSize() const +TQSize KToolBarButton::minimumSize() const { return d->size; } diff --git a/tdeui/ktoolbarbutton.h b/tdeui/ktoolbarbutton.h index 9f02a1f6b..e1da25ae8 100644 --- a/tdeui/ktoolbarbutton.h +++ b/tdeui/ktoolbarbutton.h @@ -294,7 +294,7 @@ protected: void showMenu(); TQSize sizeHint() const; TQSize minimumSizeHint() const; - TQSize tqminimumSize() const; + TQSize minimumSize() const; /// @since 3.1 bool isRaised() const; diff --git a/tdeui/ktoolbarhandler.cpp b/tdeui/ktoolbarhandler.cpp index 34bfe7046..bdeba7281 100644 --- a/tdeui/ktoolbarhandler.cpp +++ b/tdeui/ktoolbarhandler.cpp @@ -209,7 +209,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) if ( domDocument().documentElement().isNull() ) { - TQString completeDescription = TQString::tqfromLatin1( guiDescription ) + TQString completeDescription = TQString::fromLatin1( guiDescription ) .arg( actionListName ); setXML( completeDescription, false /*merge*/ ); diff --git a/tdeui/ktoolbarlabelaction.cpp b/tdeui/ktoolbarlabelaction.cpp index 8fb5a1341..b86906e57 100644 --- a/tdeui/ktoolbarlabelaction.cpp +++ b/tdeui/ktoolbarlabelaction.cpp @@ -68,7 +68,7 @@ KToolBarLabelAction::KToolBarLabelAction(TQLabel* label, : KWidgetAction(label, label->text(), cut, receiver, slot, parent, name), d(new KToolBarLabelActionPrivate) { - Q_ASSERT(TQString::tqfromLatin1("kde toolbar widget") == label->name()); + Q_ASSERT(TQString::fromLatin1("kde toolbar widget") == label->name()); init(); } diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index f9f5591ce..8a996fe5b 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -367,7 +367,7 @@ bool KURLLabel::event (TQEvent *e) if (result && hasFocus()) { TQPainter p(this); TQRect r( activeRect() ); - tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, tqcolorGroup() ); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() ); } return result; } diff --git a/tdeui/kwhatsthismanager.cpp b/tdeui/kwhatsthismanager.cpp index b7873ed0e..2f4d1750f 100644 --- a/tdeui/kwhatsthismanager.cpp +++ b/tdeui/kwhatsthismanager.cpp @@ -68,11 +68,11 @@ bool KWhatsThisUndefined::clicked (const TQString& href) body . append ("Widget text: '" + (m_widget -> property ("text") . toString ()) + "'\n"); TQString dsc = TQString ("current --> ") + m_widget -> name (); dsc . append (TQString (" (") + m_widget -> className () + ")\n"); - for (w = m_widget; w && w != m_widget -> tqtopLevelWidget (); w = w -> parentWidget ()) { + for (w = m_widget; w && w != m_widget -> topLevelWidget (); w = w -> parentWidget ()) { dsc . append (w -> name ()); dsc . append (TQString (" (") + w -> className () + ")\n"); } - w = m_widget -> tqtopLevelWidget (); + w = m_widget -> topLevelWidget (); if (w) { dsc . append ("toplevel --> "); dsc . append (w -> name ()); diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index 123d85b2c..c31242ff1 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -70,24 +70,24 @@ KXMLGUIBuilder::KXMLGUIBuilder( TQWidget *widget ) d = new KXMLGUIBuilderPrivate; d->m_widget = widget; - d->tagMainWindow = TQString::tqfromLatin1( "mainwindow" ); - d->tagMenuBar = TQString::tqfromLatin1( "menubar" ); - d->tagMenu = TQString::tqfromLatin1( "menu" ); - d->tagToolBar = TQString::tqfromLatin1( "toolbar" ); - d->tagStatusBar = TQString::tqfromLatin1( "statusbar" ); + d->tagMainWindow = TQString::fromLatin1( "mainwindow" ); + d->tagMenuBar = TQString::fromLatin1( "menubar" ); + d->tagMenu = TQString::fromLatin1( "menu" ); + d->tagToolBar = TQString::fromLatin1( "toolbar" ); + d->tagStatusBar = TQString::fromLatin1( "statusbar" ); - d->tagSeparator = TQString::tqfromLatin1( "separator" ); - d->tagTearOffHandle = TQString::tqfromLatin1( "tearoffhandle" ); - d->tagMenuTitle = TQString::tqfromLatin1( "title" ); + d->tagSeparator = TQString::fromLatin1( "separator" ); + d->tagTearOffHandle = TQString::fromLatin1( "tearoffhandle" ); + d->tagMenuTitle = TQString::fromLatin1( "title" ); - d->attrName = TQString::tqfromLatin1( "name" ); - d->attrLineSeparator = TQString::tqfromLatin1( "lineseparator" ); + d->attrName = TQString::fromLatin1( "name" ); + d->attrLineSeparator = TQString::fromLatin1( "lineseparator" ); - d->attrText1 = TQString::tqfromLatin1( "text" ); - d->attrText2 = TQString::tqfromLatin1( "Text" ); - d->attrContext = TQString::tqfromLatin1( "context" ); + d->attrText1 = TQString::fromLatin1( "text" ); + d->attrText2 = TQString::fromLatin1( "Text" ); + d->attrContext = TQString::fromLatin1( "context" ); - d->attrIcon = TQString::tqfromLatin1( "icon" ); + d->attrIcon = TQString::fromLatin1( "icon" ); d->m_instance = 0; d->m_client = 0; @@ -332,7 +332,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo TQDomAttr attr = attributes.item( i ).toAttr(); if ( attr.name().lower() == d->attrLineSeparator && - attr.value().lower() == TQString::tqfromLatin1("false") ) + attr.value().lower() == TQString::fromLatin1("false") ) { isLineSep = false; break; diff --git a/tdeui/kxmlguiclient.cpp b/tdeui/kxmlguiclient.cpp index dd7458ede..63da79fc6 100644 --- a/tdeui/kxmlguiclient.cpp +++ b/tdeui/kxmlguiclient.cpp @@ -143,7 +143,7 @@ TQString KXMLGUIClient::localXMLFile() const if ( !TQDir::isRelativePath(d->m_xmlFile) ) return TQString::null; // can't save anything here - return locateLocal( "data", TQString::tqfromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile ); + return locateLocal( "data", TQString::fromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile ); } @@ -178,7 +178,7 @@ void KXMLGUIClient::setXMLFile( const TQString& _file, bool merge, bool setXMLDo { TQString doc; - TQString filter = TQString::tqfromLatin1( instance()->instanceName() + '/' ) + _file; + TQString filter = TQString::fromLatin1( instance()->instanceName() + '/' ) + _file; TQStringList allFiles = instance()->dirs()->findAllResources( "data", filter ) + instance()->dirs()->findAllResources( "data", _file ); @@ -699,7 +699,7 @@ TQString KXMLGUIClient::findMostRecentXMLFile( const TQStringList &files, TQStri else { TQString f = (*local).file; - TQString backup = f + TQString::tqfromLatin1( ".backup" ); + TQString backup = f + TQString::fromLatin1( ".backup" ); TQDir dir; dir.rename( f, backup ); } diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 2714b1207..a8c437571 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -110,7 +110,7 @@ TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_nu xml_file = filename; else { - xml_file = locate("data", TQString::tqfromLatin1(instance->instanceName() + '/' ) + filename); + xml_file = locate("data", TQString::fromLatin1(instance->instanceName() + '/' ) + filename); if ( !TQFile::exists( xml_file ) ) xml_file = locate( "data", filename ); } @@ -120,7 +120,7 @@ TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_nu { kdError(240) << "No such XML file " << filename << endl; if ( never_null ) - return TQString::tqfromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" ); + return TQString::fromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" ); else return TQString::null; } @@ -146,7 +146,7 @@ bool KXMLGUIFactory::saveConfigFile( const TQDomDocument& doc, TQString xml_file(filename); if (TQDir::isRelativePath(xml_file)) - xml_file = locateLocal("data", TQString::tqfromLatin1( instance->instanceName() + '/' ) + xml_file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' ) + filename); TQFile file( xml_file ); @@ -566,7 +566,7 @@ int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSe TQDomElement KXMLGUIFactory::actionPropertiesElement( TQDomDocument& doc ) { - const TQString tagActionProp = TQString::tqfromLatin1("ActionProperties"); + const TQString tagActionProp = TQString::fromLatin1("ActionProperties"); // first, lets see if we have existing properties TQDomElement elem; TQDomNode it = doc.documentElement().firstChild(); diff --git a/tdeui/qxembed.cpp b/tdeui/qxembed.cpp index e0ce2166b..95bd1bc9b 100644 --- a/tdeui/qxembed.cpp +++ b/tdeui/qxembed.cpp @@ -310,8 +310,8 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // active and has just been given the Qt focus (L0614) or // because the widget already had the Qt focus and just became // active (L0615). - if ( TQT_BASE_OBJECT(tqApp->tqfocusWidget()) == TQT_BASE_OBJECT(o) && - ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->topData()->embedded ) { + if ( TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && + ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { TQFocusEvent* fe = (TQFocusEvent*) e; if ( obeyFocus || fe->reason() != TQFocusEvent::ActiveWindow /*|| fe->reason() == TQFocusEvent::Mouse || fe->reason() == TQFocusEvent::Shortcut*/ ) { @@ -320,11 +320,11 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // activity in the client. The XEMBED_REQUEST_FOCUS message causes // the embedding widget to take the Qt focus (L2085). #ifdef USE_QT4 - WId window = ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->effectiveWinId(); + WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->effectiveWinId(); #else // USE_QT4 - WId window = ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->topData()->parentWinId; + WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->parentWinId; #endif // USE_QT4 - focusMap->remove( tqApp->tqfocusWidget()->tqtopLevelWidget() ); + focusMap->remove( tqApp->focusWidget()->topLevelWidget() ); sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else if ( fe->reason() == TQFocusEvent::ActiveWindow ) { // L0615: Both the embedder and the embedded client became active. @@ -332,20 +332,20 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // So we clear the Qt focus for now. If indeed the QXEmbed widget // has the focus, it will receive a FocusIn message (L1530) and // tell us to restore the focus (L0680, L0683). - focusMap->remove( tqApp->tqfocusWidget()->tqtopLevelWidget() ); - focusMap->insert( tqApp->tqfocusWidget()->tqtopLevelWidget(), - new TQGuardedPtr<TQWidget>(tqApp->tqfocusWidget()->tqtopLevelWidget()->tqfocusWidget() ) ); - // L0616: tqApp->tqfocusWidget() might belong to a modal dialog and not be - // equal to tqApp->tqfocusWidget()->tqtopLevelWidget()->tqfocusWidget() ! - tqApp->tqfocusWidget()->clearFocus(); + focusMap->remove( tqApp->focusWidget()->topLevelWidget() ); + focusMap->insert( tqApp->focusWidget()->topLevelWidget(), + new TQGuardedPtr<TQWidget>(tqApp->focusWidget()->topLevelWidget()->focusWidget() ) ); + // L0616: tqApp->focusWidget() might belong to a modal dialog and not be + // equal to tqApp->focusWidget()->topLevelWidget()->focusWidget() ! + tqApp->focusWidget()->clearFocus(); // L0617: ??? [why not {obeyFocus=false; return true;} here?] } obeyFocus = false; } break; case TQEvent::KeyPress: - if (TQT_BASE_OBJECT(tqApp->tqfocusWidget()) == TQT_BASE_OBJECT(o) && - ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->topData()->embedded ) { + if (TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && + ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { // L0620: The following code replaces the Qt code that // handles focus focus changes with the tab key. See the // XEMBED specification for details. The keypress event @@ -359,7 +359,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // (L0653, L0654) which then performs tab navigation // (L2081). TQKeyEvent *k = (TQKeyEvent *)e; - TQWidget *w = tqApp->tqfocusWidget(); + TQWidget *w = tqApp->focusWidget(); // L0621: The following tests are copied from TQWidget::event(). bool res = false; bool tabForward = true; @@ -387,19 +387,19 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // Now check whether we have been looping around. TQFocusData *fd = ((QPublicWidget*)w)->focusData(); #ifdef USE_QT4 - WId window = ((QPublicWidget*)w->tqtopLevelWidget())->effectiveWinId(); + WId window = ((QPublicWidget*)w->topLevelWidget())->effectiveWinId(); #else // USE_QT4 - WId window = ((QPublicWidget*)w->tqtopLevelWidget())->topData()->parentWinId; + WId window = ((QPublicWidget*)w->topLevelWidget())->topData()->parentWinId; #endif // USE_QT4 TQWidget *cw = 0; TQWidget *fw = fd->home(); if (tabForward && window) { - while (cw != w && cw != fw && cw != w->tqtopLevelWidget()) + while (cw != w && cw != fw && cw != w->topLevelWidget()) cw = fd->prev(); if (cw != w) sendXEmbedMessage( window, XEMBED_FOCUS_NEXT ); } else if (window) { - while (cw != w && cw != fw && cw != w->tqtopLevelWidget()) + while (cw != w && cw != fw && cw != w->topLevelWidget()) cw = fd->next(); if (cw != w) sendXEmbedMessage( window, XEMBED_FOCUS_PREV ); @@ -443,7 +443,7 @@ static int qxembed_x11_event_filter( XEvent* e) switch ( message) { case XEMBED_EMBEDDED_NOTIFY: { // L0675: We just have been embedded into a XEMBED aware widget. - TQTLWExtra *extra = ((QPublicWidget*)w->tqtopLevelWidget())->topData(); + TQTLWExtra *extra = ((QPublicWidget*)w->topLevelWidget())->topData(); extra->embedded = 1; #ifdef USE_QT4 // [FIXME] @@ -451,7 +451,7 @@ static int qxembed_x11_event_filter( XEvent* e) #else // USE_QT4 extra->parentWinId = e->xclient.data.l[3]; #endif // USE_QT4 - w->tqtopLevelWidget()->show(); + w->topLevelWidget()->show(); break; } case XEMBED_WINDOW_ACTIVATE: { @@ -464,7 +464,7 @@ static int qxembed_x11_event_filter( XEvent* e) memset(&ev, 0, sizeof(ev)); ev.xfocus.display = qt_xdisplay(); ev.xfocus.type = XFocusIn; - ev.xfocus.window = w->tqtopLevelWidget()->winId(); + ev.xfocus.window = w->topLevelWidget()->winId(); ev.xfocus.mode = NotifyNormal; ev.xfocus.detail = NotifyAncestor; tqApp->x11ProcessEvent( &ev ); @@ -478,7 +478,7 @@ static int qxembed_x11_event_filter( XEvent* e) memset(&ev, 0, sizeof(ev)); ev.xfocus.display = qt_xdisplay(); ev.xfocus.type = XFocusOut; - ev.xfocus.window = w->tqtopLevelWidget()->winId(); + ev.xfocus.window = w->topLevelWidget()->winId(); ev.xfocus.mode = NotifyNormal; ev.xfocus.detail = NotifyAncestor; tqApp->x11ProcessEvent( &ev ); @@ -489,11 +489,11 @@ static int qxembed_x11_event_filter( XEvent* e) { // L0681: Search saved focus widget. TQWidget* focusCurrent = 0; - TQGuardedPtr<TQWidget>* fw = focusMap->find( w->tqtopLevelWidget() ); + TQGuardedPtr<TQWidget>* fw = focusMap->find( w->topLevelWidget() ); if ( fw ) { focusCurrent = *fw; // L0682: Remove it from the map - focusMap->remove( w->tqtopLevelWidget() ); + focusMap->remove( w->topLevelWidget() ); } switch ( detail ) { case XEMBED_FOCUS_CURRENT: @@ -503,19 +503,19 @@ static int qxembed_x11_event_filter( XEvent* e) if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( focusCurrent )) emb->updateEmbeddedFocus( true ); } - else if ( !w->tqtopLevelWidget()->tqfocusWidget() ) - w->tqtopLevelWidget()->setFocus(); + else if ( !w->topLevelWidget()->focusWidget() ) + w->topLevelWidget()->setFocus(); break; case XEMBED_FOCUS_FIRST: { // L0684: Search first widget in tab chain #ifdef USE_QT4 - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(true); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); #else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Tab ); - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(true); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); TQFocusEvent::resetReason(); #endif // USE_QT4 } @@ -524,12 +524,12 @@ static int qxembed_x11_event_filter( XEvent* e) { // L0686: Search last widget in tab chain #ifdef USE_QT4 - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(false); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); #else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Backtab ); - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(false); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); TQFocusEvent::resetReason(); #endif // USE_QT4 } @@ -543,12 +543,12 @@ static int qxembed_x11_event_filter( XEvent* e) // L0688: Embedding application takes the focus away // We first record what the focus widget was // and clear the Qt focus. - if ( w->tqtopLevelWidget()->tqfocusWidget() ) { - if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( w->tqtopLevelWidget()->tqfocusWidget())) + if ( w->topLevelWidget()->focusWidget() ) { + if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget())) emb->updateEmbeddedFocus( false ); - focusMap->insert( w->tqtopLevelWidget(), - new TQGuardedPtr<TQWidget>(w->tqtopLevelWidget()->tqfocusWidget() ) ); - w->tqtopLevelWidget()->tqfocusWidget()->clearFocus(); + focusMap->insert( w->topLevelWidget(), + new TQGuardedPtr<TQWidget>(w->topLevelWidget()->focusWidget() ) ); + w->topLevelWidget()->focusWidget()->clearFocus(); } break; default: @@ -651,7 +651,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f) // whole embedding application. They compete between themselves and // against Qt (L0690, L0914, L1040, L1310, L1510, L1580). // This would be much simpler if implemented within Qt. - d->focusProxy = new TQWidget( tqtopLevelWidget(), "xembed_focus" ); + d->focusProxy = new TQWidget( topLevelWidget(), "xembed_focus" ); d->focusProxy->setGeometry( -1, -1, 1, 1 ); d->focusProxy->show(); // make sure it's shown - for XSetInputFocus @@ -686,13 +686,13 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f) // L0913: all application events pass through eventFilter(). // This is mostly used to force the X11 focus on the // proxy focus window. See L1300. - tqtopLevelWidget()->installEventFilter( this ); + topLevelWidget()->installEventFilter( this ); tqApp->installEventFilter( this ); // L0914: Start moving the X11 focus on the focus proxy window. // See L1581 to know why we do not use isActiveWindow(). - if ( tqApp->activeWindow() == tqtopLevelWidget() ) - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) + if ( tqApp->activeWindow() == topLevelWidget() ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(), RevertToParent, GET_QT_X_TIME() ); // L0915: ??? [drag&drop?] @@ -746,7 +746,7 @@ QXEmbed::~QXEmbed() int revert; XGetInputFocus( qt_xdisplay(), &focus, &revert ); if( focus == d->focusProxy->winId()) - XSetInputFocus( qt_xdisplay(), tqtopLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() ); + XSetInputFocus( qt_xdisplay(), topLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() ); // L01045: Delete our private data. delete d; } @@ -810,10 +810,10 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) switch ( e->type() ) { case TQEvent::WindowActivate: - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(tqtopLevelWidget()) ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { // L1310: Qt thinks the application window has just been activated. // Make sure the X11 focus is on the focus proxy window. See L0686. - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) if (! hasFocus() ) XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(), RevertToParent, GET_QT_X_TIME() ); @@ -826,7 +826,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) } break; case TQEvent::WindowDeactivate: - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(tqtopLevelWidget()) ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { if (d->xplain) // L1321: Activation has changed. Grab state might change. See L2800. checkGrab(); @@ -838,7 +838,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) case TQEvent::Move: { TQWidget* pos = this; - while( TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(o) && TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(tqtopLevelWidget())) + while( TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(o) && TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(topLevelWidget())) pos = pos->parentWidget(); if( TQT_BASE_OBJECT(pos) == TQT_BASE_OBJECT(o) ) { // L1390: Send fake configure notify events whenever the @@ -894,8 +894,8 @@ void QXEmbed::focusInEvent( TQFocusEvent * e ){ return; // L1510: This is a good time to set the X11 focus on the focus proxy window. // Except if the the embedding application itself is embedded into another. - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) - if ( tqApp->activeWindow() == tqtopLevelWidget() ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) + if ( tqApp->activeWindow() == topLevelWidget() ) // L1511: Alter X focus only when window is active. // This is dual safety here because FocusIn implies this. // But see L1581 for an example where this really matters. @@ -943,8 +943,8 @@ void QXEmbed::focusOutEvent( TQFocusEvent * ){ // is properly set to the X11 focus widget. We do this because // the client application might have moved the X11 focus after // receiving the fake focus messages. - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) - if ( tqApp->activeWindow() == tqtopLevelWidget() ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) + if ( tqApp->activeWindow() == topLevelWidget() ) // L1581: Alter X focus only when window is active. // The test above is not the same as isActiveWindow(). // Function isActiveWindow() also returns true when a modal @@ -1210,13 +1210,13 @@ bool QXEmbed::x11Event( XEvent* e) break; // L2085: The client asks for the focus. case XEMBED_REQUEST_FOCUS: - if( ((QPublicWidget*)tqtopLevelWidget())->topData()->embedded ) { - focusMap->remove( tqtopLevelWidget() ); - focusMap->insert( tqtopLevelWidget(), new TQGuardedPtr<TQWidget>( this )); + if( ((QPublicWidget*)topLevelWidget())->topData()->embedded ) { + focusMap->remove( topLevelWidget() ); + focusMap->insert( topLevelWidget(), new TQGuardedPtr<TQWidget>( this )); #ifdef USE_QT4 - WId window = ((QPublicWidget*)tqtopLevelWidget())->effectiveWinId(); + WId window = ((QPublicWidget*)topLevelWidget())->effectiveWinId(); #else // USE_QT4 - WId window = ((QPublicWidget*)tqtopLevelWidget())->topData()->parentWinId; + WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId; #endif // USE_QT4 sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else { diff --git a/tdeui/tests/kdialogbasetest.cpp b/tdeui/tests/kdialogbasetest.cpp index 35da840a1..07e8a8ca9 100644 --- a/tdeui/tests/kdialogbasetest.cpp +++ b/tdeui/tests/kdialogbasetest.cpp @@ -64,7 +64,7 @@ int main(int argc, char** argv) widget may change before the dialog is shown. Additionally, setting a help chapter may cause a need for adjustment since it modifies the height of the upper frame. */ - dialog.resize(dialog.tqminimumSize()); + dialog.resize(dialog.minimumSize()); /* The dialog object is used just as any other TQDialog: */ if(dialog.exec()) { diff --git a/tdeui/tests/kdockwidgetdemo.cpp b/tdeui/tests/kdockwidgetdemo.cpp index 9b65db594..b4d1bd30b 100644 --- a/tdeui/tests/kdockwidgetdemo.cpp +++ b/tdeui/tests/kdockwidgetdemo.cpp @@ -82,7 +82,7 @@ SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const :TQDialog(0L,name,true) { KConfig* config = kapp->config(); - config->setGroup( TQString::tqfromLatin1("SFileDialogData:") + name ); + config->setGroup( TQString::fromLatin1("SFileDialogData:") + name ); if ( initially.isNull() ){ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() ); } @@ -643,7 +643,7 @@ void Directory::setOpen( bool o ) return; } - listView()->tqsetUpdatesEnabled( false ); + listView()->setUpdatesEnabled( false ); const QFileInfoList * files = thisDir.entryInfoList(); if ( files ){ QFileInfoListIterator it( *files ); @@ -654,7 +654,7 @@ void Directory::setOpen( bool o ) (void)new Directory( this, f->fileName() ); } } - listView()->tqsetUpdatesEnabled( true ); + listView()->setUpdatesEnabled( true ); } TQListViewItem::setOpen( o ); } @@ -777,13 +777,13 @@ int main(int argc, char* argv[]) { #endif #if 0 - qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::tqfromLatin1("All (*)"), - TQString::tqfromLatin1("DockWidget Demo"), "dialog1" ) ); + qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::fromLatin1("All (*)"), + TQString::fromLatin1("DockWidget Demo"), "dialog1" ) ); #endif #if 1 - TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::tqfromLatin1("All (*)"), - TQString::tqfromLatin1("DockWidget Demo"), "dialog1" ); + TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::fromLatin1("All (*)"), + TQString::fromLatin1("DockWidget Demo"), "dialog1" ); TQStringList::Iterator it = s.begin(); for ( ; it != s.end(); ++it ){ qDebug( "%s", (*it).local8Bit().data() ); diff --git a/tdeui/tests/kdualcolortest.cpp b/tdeui/tests/kdualcolortest.cpp index 942d52f8d..2060a9842 100644 --- a/tdeui/tests/kdualcolortest.cpp +++ b/tdeui/tests/kdualcolortest.cpp @@ -10,8 +10,8 @@ KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name) { lbl = new TQLabel("Testing, testing, 1, 2, 3...", this); KDualColorButton *colorBtn = - new KDualColorButton(lbl->tqcolorGroup().text(), - lbl->tqcolorGroup().background(), this); + new KDualColorButton(lbl->colorGroup().text(), + lbl->colorGroup().background(), this); connect(colorBtn, TQT_SIGNAL(fgChanged(const TQColor &)), TQT_SLOT(slotFgChanged(const TQColor &))); connect(colorBtn, TQT_SIGNAL(bgChanged(const TQColor &)), diff --git a/tdeui/tests/keditlistboxtest.cpp b/tdeui/tests/keditlistboxtest.cpp index fdc90a742..90dbb74d0 100644 --- a/tdeui/tests/keditlistboxtest.cpp +++ b/tdeui/tests/keditlistboxtest.cpp @@ -7,14 +7,14 @@ int main( int argc, char **argv ) KApplication app( argc, argv, "keditlistboxtest" ); KEditListBox::CustomEditor editor( new KComboBox( true, 0L, "test" ) ); - KEditListBox *box = new KEditListBox( TQString::tqfromLatin1("KEditListBox"), + KEditListBox *box = new KEditListBox( TQString::fromLatin1("KEditListBox"), editor ); - box->insertItem( TQString::tqfromLatin1("Test") ); - box->insertItem( TQString::tqfromLatin1("for") ); - box->insertItem( TQString::tqfromLatin1("this") ); - box->insertItem( TQString::tqfromLatin1("KEditListBox") ); - box->insertItem( TQString::tqfromLatin1("Widget") ); + box->insertItem( TQString::fromLatin1("Test") ); + box->insertItem( TQString::fromLatin1("for") ); + box->insertItem( TQString::fromLatin1("this") ); + box->insertItem( TQString::fromLatin1("KEditListBox") ); + box->insertItem( TQString::fromLatin1("Widget") ); box->show(); return app.exec(); diff --git a/tdeui/tests/kmessageboxtest.cpp b/tdeui/tests/kmessageboxtest.cpp index 31f8f1735..1b926739f 100644 --- a/tdeui/tests/kmessageboxtest.cpp +++ b/tdeui/tests/kmessageboxtest.cpp @@ -79,11 +79,11 @@ case 1: i = KMessageBox::warningContinueCancel(w, "You are about to <Print>.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print"), "dontask", false); + "Print", TQString::fromLatin1("&Print"), "dontask", false); i = KMessageBox::warningContinueCancel(0, "You are about to <Print>.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print"), "dontask", KMessageBox::AllowLink); + "Print", TQString::fromLatin1("&Print"), "dontask", KMessageBox::AllowLink); i = KMessageBox::questionYesNo(0, "<p>Do you have a printer? thisisaverylongdkldhklghklghklashgkllasghkdlsghkldfghklsabla bla bbla bla. It also has <a href=http://www.kde.org>this URL</a>.</p>", TQString("Bla"), TQString("Yes"), TQString("No"), "bla", KMessageBox::AllowLink); break; @@ -96,7 +96,7 @@ case 2: case 3: i = KMessageBox::questionYesNo(0, "Does your printer support color or only black and white?", - "Printer setup", TQString::tqfromLatin1("&Color"), TQString::tqfromLatin1("&Black & White")); + "Printer setup", TQString::fromLatin1("&Color"), TQString::fromLatin1("&Black & White")); break; case 4: @@ -123,13 +123,13 @@ case 6: i = KMessageBox::warningContinueCancel(0, "You are about to print.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print")); + "Print", TQString::fromLatin1("&Print")); break; case 7: i = KMessageBox::warningContinueCancel(0, "You are about to <Print>.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print"), "dontask", false); + "Print", TQString::fromLatin1("&Print"), "dontask", false); break; case 8: @@ -142,14 +142,14 @@ case 9: i = KMessageBox::warningYesNoCancel(0, "Your document contains unsaved changes.\n" "Do you want to save your changes?\n", - TQString::tqfromLatin1("Close")); + TQString::fromLatin1("Close")); break; case 10: i = KMessageBox::warningYesNoCancel(0, "Your document contains unsaved changes.\n" "Do you want to save or discard your changes?\n", - "Close", TQString::tqfromLatin1("&Save"), TQString::tqfromLatin1("&Discard") ); + "Close", TQString::fromLatin1("&Save"), TQString::fromLatin1("&Discard") ); break; case 11: diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index 1334abd6e..5058695a3 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -186,7 +186,7 @@ void KWindowListMenu::init() } // Avoid creating unwanted accelerators. - itemText.replace('&', TQString::tqfromLatin1("&&")); + itemText.replace('&', TQString::fromLatin1("&&")); insertItem( pm, itemText, i); map.insert(i, info->win()); if (info->win() == active_window) |