From 0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:34:45 -0600 Subject: Rename old tq methods that no longer need a unique name --- knotes/knote.cpp | 16 ++++++++-------- knotes/knotebutton.cpp | 12 ++++++------ knotes/knotebutton.h | 2 +- knotes/knoteconfigdlg.cpp | 4 ++-- knotes/knoteedit.cpp | 8 ++++---- knotes/knoteprinter.cpp | 10 +++++----- knotes/knoteprinter.h | 6 +++--- knotes/knotesalarm.cpp | 2 +- knotes/knotesapp.cpp | 6 +++--- knotes/knotesnetrecv.cpp | 2 +- knotes/resourcelocal.cpp | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) (limited to 'knotes') diff --git a/knotes/knote.cpp b/knotes/knote.cpp index 430a5dca5..0571bb1bc 100644 --- a/knotes/knote.cpp +++ b/knotes/knote.cpp @@ -772,7 +772,7 @@ void KNote::slotClose() void KNote::slotInsDate() { - m_editor->insert( KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()) ); + m_editor->insert( KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()) ); } void KNote::slotSetAlarm() @@ -859,7 +859,7 @@ void KNote::slotPrint() printer.setFont( m_config->font() ); printer.setContext( m_editor->context() ); printer.setStyleSheet( m_editor->styleSheet() ); - printer.tqsetColorGroup( tqcolorGroup() ); + printer.setColorGroup( colorGroup() ); printer.printNote( TQString(), content ); } @@ -1033,9 +1033,9 @@ void KNote::updateLabelAlignment() // if the name is too long to fit, left-align it, otherwise center it (#59028) TQString labelText = m_label->text(); if ( m_label->fontMetrics().boundingRect( labelText ).width() > m_label->width() ) - m_label->tqsetAlignment( AlignLeft ); + m_label->setAlignment( AlignLeft ); else - m_label->tqsetAlignment( AlignHCenter ); + m_label->setAlignment( AlignHCenter ); } void KNote::updateFocus() @@ -1121,7 +1121,7 @@ void KNote::updateBackground( int y_offset ) { if ( !s_ppOffset ) { - m_editor->setPaper( TQBrush( tqcolorGroup().background() ) ); + m_editor->setPaper( TQBrush( colorGroup().background() ) ); return; } @@ -1161,7 +1161,7 @@ void KNote::updateBackground( int y_offset ) void KNote::updateLayout() { - const int headerHeight = m_label->tqsizeHint().height(); + const int headerHeight = m_label->sizeHint().height(); const int margin = m_editor->margin(); bool closeLeft = false; @@ -1241,9 +1241,9 @@ void KNote::drawFrame( TQPainter *p ) TQRect r = frameRect(); r.setTop( s_ppOffset ); if ( s_ppOffset ) - qDrawShadePanel( p, r, tqcolorGroup(), false, lineWidth() ); + qDrawShadePanel( p, r, colorGroup(), false, lineWidth() ); else - qDrawWinPanel( p, r, tqcolorGroup(), false ); + qDrawWinPanel( p, r, colorGroup(), false ); } void KNote::showEvent( TQShowEvent * ) diff --git a/knotes/knotebutton.cpp b/knotes/knotebutton.cpp index 5dc5009e0..002dd0f61 100644 --- a/knotes/knotebutton.cpp +++ b/knotes/knotebutton.cpp @@ -34,7 +34,7 @@ KNoteButton::KNoteButton( const TQString& icon, TQWidget *parent, const char *na : TQPushButton( parent, name ) { setFocusPolicy( TQ_NoFocus ); - tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); m_flat = true; @@ -58,9 +58,9 @@ void KNoteButton::leaveEvent( TQEvent * ) tqrepaint(); } -TQSize KNoteButton::tqsizeHint() const +TQSize KNoteButton::sizeHint() const { - return TQSize( TQPushButton::tqsizeHint().height(), TQPushButton::tqsizeHint().height() ); + return TQSize( TQPushButton::sizeHint().height(), TQPushButton::sizeHint().height() ); } void KNoteButton::drawButton( TQPainter* p ) @@ -78,7 +78,7 @@ void KNoteButton::drawButton( TQPainter* p ) if ( !m_flat ) flags |= TQStyle::Style_MouseOver; - tqstyle().tqdrawPrimitive( TQStyle::PE_ButtonTool, p, rect(), tqcolorGroup(), flags ); + tqstyle().tqdrawPrimitive( TQStyle::PE_ButtonTool, p, rect(), colorGroup(), flags ); drawButtonLabel( p ); } @@ -102,8 +102,8 @@ void KNoteButton::drawButtonLabel( TQPainter* p ) // Shift button contents if pushed. if ( isOn() || isDown() ) { - dx += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); - dy += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical, this ); + dx += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); + dy += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical, this ); } p->drawPixmap( dx, dy, pix ); diff --git a/knotes/knotebutton.h b/knotes/knotebutton.h index 6a9f7e5bf..2f3699269 100644 --- a/knotes/knotebutton.h +++ b/knotes/knotebutton.h @@ -36,7 +36,7 @@ public: KNoteButton( const TQString& icon, TQWidget *parent=0, const char *name=0 ); ~KNoteButton(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; protected: virtual void enterEvent( TQEvent * ); diff --git a/knotes/knoteconfigdlg.cpp b/knotes/knoteconfigdlg.cpp index 034a3239e..2e26ab999 100644 --- a/knotes/knoteconfigdlg.cpp +++ b/knotes/knoteconfigdlg.cpp @@ -159,14 +159,14 @@ TQWidget *KNoteConfigDlg::makeEditorPage( bool defaults ) tqlayout->addWidget( label_Font, 3, 0 ); KFontRequester *kcfg_Font = new KFontRequester( editorPage, "kcfg_Font" ); - kcfg_Font->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); + kcfg_Font->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); tqlayout->addMultiCellWidget( kcfg_Font, 3, 3, 1, 2 ); TQLabel *label_TitleFont = new TQLabel( i18n("Title font:"), editorPage, "label_TitleFont" ); tqlayout->addWidget( label_TitleFont, 2, 0 ); KFontRequester *kcfg_TitleFont = new KFontRequester( editorPage, "kcfg_TitleFont" ); - kcfg_TitleFont->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); + kcfg_TitleFont->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); tqlayout->addMultiCellWidget( kcfg_TitleFont, 2, 2, 1, 2 ); return editorPage; diff --git a/knotes/knoteedit.cpp b/knotes/knoteedit.cpp index c0647e6de..2844c29f3 100644 --- a/knotes/knoteedit.cpp +++ b/knotes/knoteedit.cpp @@ -298,25 +298,25 @@ void KNoteEdit::textColor() void KNoteEdit::textAlignLeft() { - tqsetAlignment( AlignLeft ); + setAlignment( AlignLeft ); m_textAlignLeft->setChecked( true ); } void KNoteEdit::textAlignCenter() { - tqsetAlignment( AlignCenter ); + setAlignment( AlignCenter ); m_textAlignCenter->setChecked( true ); } void KNoteEdit::textAlignRight() { - tqsetAlignment( AlignRight ); + setAlignment( AlignRight ); m_textAlignRight->setChecked( true ); } void KNoteEdit::textAlignBlock() { - tqsetAlignment( AlignJustify ); + setAlignment( AlignJustify ); m_textAlignBlock->setChecked( true ); } diff --git a/knotes/knoteprinter.cpp b/knotes/knoteprinter.cpp index 6b2868174..a94e46310 100644 --- a/knotes/knoteprinter.cpp +++ b/knotes/knoteprinter.cpp @@ -46,14 +46,14 @@ TQFont KNotePrinter::font() const return m_font; } -void KNotePrinter::tqsetColorGroup( const TQColorGroup& tqcolorGroup ) +void KNotePrinter::setColorGroup( const TQColorGroup& colorGroup ) { - m_tqcolorGroup = tqcolorGroup; + m_colorGroup = colorGroup; } -TQColorGroup KNotePrinter::tqcolorGroup() const +TQColorGroup KNotePrinter::colorGroup() const { - return m_tqcolorGroup; + return m_colorGroup; } void KNotePrinter::setStyleSheet( TQStyleSheet* styleSheet ) @@ -93,7 +93,7 @@ void KNotePrinter::doPrint( KPrinter& printer, TQPainter& painter, for (;;) { - text.draw( &painter, body.left(), body.top(), view, m_tqcolorGroup ); + text.draw( &painter, body.left(), body.top(), view, m_colorGroup ); view.moveBy( 0, body.height() ); painter.translate( 0, -body.height() ); diff --git a/knotes/knoteprinter.h b/knotes/knoteprinter.h index 148a2ec45..632dd85a4 100644 --- a/knotes/knoteprinter.h +++ b/knotes/knoteprinter.h @@ -27,8 +27,8 @@ public: void setFont( const TQFont& font ); TQFont font() const; - void tqsetColorGroup( const TQColorGroup& tqcolorGroup ); - TQColorGroup tqcolorGroup() const; + void setColorGroup( const TQColorGroup& colorGroup ); + TQColorGroup colorGroup() const; void setStyleSheet( TQStyleSheet* styleSheet ); TQStyleSheet* styleSheet() const; @@ -43,7 +43,7 @@ private: void doPrint( KPrinter& printer, TQPainter& painter, const TQString& content ) const; - TQColorGroup m_tqcolorGroup; + TQColorGroup m_colorGroup; TQFont m_font; TQStyleSheet* m_styleSheet; TQMimeSourceFactory* m_mimeSourceFactory; diff --git a/knotes/knotesalarm.cpp b/knotes/knotesalarm.cpp index 5d8b0de28..285d7224e 100644 --- a/knotes/knotesalarm.cpp +++ b/knotes/knotesalarm.cpp @@ -59,7 +59,7 @@ void KNotesAlarm::checkAlarms() if ( !from.isValid() ) from.setTime_t( 0 ); - KNotesGlobalConfig::self()->setAlarmsLastChecked( TQDateTime::tqcurrentDateTime() ); + KNotesGlobalConfig::self()->setAlarmsLastChecked( TQDateTime::currentDateTime() ); TQValueList alarms = m_manager->alarms( from, KNotesGlobalConfig::self()->alarmsLastChecked() ); if( alarms.isEmpty()) return; diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp index 22ee49fd6..b76f19846 100644 --- a/knotes/knotesapp.cpp +++ b/knotes/knotesapp.cpp @@ -138,7 +138,7 @@ KNotesApp::KNotesApp() // get the most recent XML UI file TQString xmlFileName = instance()->instanceName() + "ui.rc"; - TQString filter = TQString::tqfromLatin1( instance()->instanceName() + '/' ) + xmlFileName; + TQString filter = TQString::fromLatin1( instance()->instanceName() + '/' ) + xmlFileName; TQStringList fileList = instance()->dirs()->findAllResources( "data", filter ) + instance()->dirs()->findAllResources( "data", xmlFileName ); @@ -183,7 +183,7 @@ KNotesApp::KNotesApp() m_manager->load(); // read the old config files, convert and add them - KCal::CalendarLocal calendar( TQString::tqfromLatin1( "UTC" ) ); + KCal::CalendarLocal calendar( TQString::fromLatin1( "UTC" ) ); if ( KNotesLegacy::convert( &calendar ) ) { KCal::Journal::List notes = calendar.journals(); @@ -253,7 +253,7 @@ TQString KNotesApp::newNote( const TQString& name, const TQString& text ) if ( !name.isEmpty() ) journal->setSummary( name ); else - journal->setSummary( KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime() ) ); + journal->setSummary( KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) ); // the body of the note journal->setDescription( text ); diff --git a/knotes/knotesnetrecv.cpp b/knotes/knotesnetrecv.cpp index 2adf8e784..5c0be183a 100644 --- a/knotes/knotesnetrecv.cpp +++ b/knotes/knotesnetrecv.cpp @@ -61,7 +61,7 @@ KNotesNetworkReceiver::KNotesNetworkReceiver( KBufferedSocket *s ) : TQObject(), m_buffer( new TQByteArray() ), m_sock( s ) { - TQString date = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, false ); + TQString date = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, false ); // Add the remote IP or hostname and the date to the title, to help the // user guess who wrote it. diff --git a/knotes/resourcelocal.cpp b/knotes/resourcelocal.cpp index aed70e236..a4e2cf70c 100644 --- a/knotes/resourcelocal.cpp +++ b/knotes/resourcelocal.cpp @@ -45,7 +45,7 @@ ResourceLocal::ResourceLocal( const KConfig *config ) - : ResourceNotes( config ), mCalendar( TQString::tqfromLatin1( "UTC" ) ) + : ResourceNotes( config ), mCalendar( TQString::fromLatin1( "UTC" ) ) { kdDebug(5500) << "ResourceLocal::ResourceLocal()" << endl; setType( "file" ); -- cgit v1.2.1