diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:59:50 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:59:50 -0600 |
commit | 9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch) | |
tree | ab537a329b9613e11dce8195761f93ffe82aed24 /kontact/plugins/korganizer | |
parent | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff) | |
download | tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kontact/plugins/korganizer')
-rw-r--r-- | kontact/plugins/korganizer/kcmkorgsummary.cpp | 12 | ||||
-rw-r--r-- | kontact/plugins/korganizer/korganizerplugin.cpp | 14 | ||||
-rw-r--r-- | kontact/plugins/korganizer/summarywidget.cpp | 40 | ||||
-rw-r--r-- | kontact/plugins/korganizer/todoplugin.cpp | 12 | ||||
-rw-r--r-- | kontact/plugins/korganizer/todosummarywidget.cpp | 32 |
5 files changed, 55 insertions, 55 deletions
diff --git a/kontact/plugins/korganizer/kcmkorgsummary.cpp b/kontact/plugins/korganizer/kcmkorgsummary.cpp index 115de0e9a..4466c5c6d 100644 --- a/kontact/plugins/korganizer/kcmkorgsummary.cpp +++ b/kontact/plugins/korganizer/kcmkorgsummary.cpp @@ -23,7 +23,7 @@ #include <tqbuttongroup.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqradiobutton.h> #include <tqspinbox.h> @@ -90,10 +90,10 @@ void KCMKOrgSummary::customDaysChanged( int value ) void KCMKOrgSummary::initGUI() { - TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); mCalendarGroup = new TQButtonGroup( 0, Qt::Vertical, i18n( "Appointments" ), this ); - TQVBoxLayout *boxLayout = new TQVBoxLayout( mCalendarGroup->layout(), + TQVBoxLayout *boxLayout = new TQVBoxLayout( mCalendarGroup->tqlayout(), KDialog::spacingHint() ); TQLabel *label = new TQLabel( i18n( "How many days should the calendar show at once?" ), mCalendarGroup ); @@ -122,15 +122,15 @@ void KCMKOrgSummary::initGUI() hbox->addStretch( 1 ); - layout->addWidget( mCalendarGroup ); + tqlayout->addWidget( mCalendarGroup ); mTodoGroup = new TQButtonGroup( 2, Qt::Horizontal, i18n( "To-dos" ), this ); new TQRadioButton( i18n( "Show all to-dos" ), mTodoGroup ); new TQRadioButton( i18n( "Show today's to-dos only" ), mTodoGroup ); - layout->addWidget( mTodoGroup ); + tqlayout->addWidget( mTodoGroup ); - layout->addStretch(); + tqlayout->addStretch(); } void KCMKOrgSummary::load() diff --git a/kontact/plugins/korganizer/korganizerplugin.cpp b/kontact/plugins/korganizer/korganizerplugin.cpp index 2262dcef3..7c2140b36 100644 --- a/kontact/plugins/korganizer/korganizerplugin.cpp +++ b/kontact/plugins/korganizer/korganizerplugin.cpp @@ -195,7 +195,7 @@ void KOrganizerPlugin::processDropEvent( TQDropEvent *event ) KCal::Incidence *i = incidences.first(); TQString summary; if ( dynamic_cast<KCal::Journal*>( i ) ) - summary = i18n( "Note: %1" ).arg( i->summary() ); + summary = i18n( "Note: %1" ).tqarg( i->summary() ); else summary = i->summary(); interface()->openEventEditor( summary, i->description(), TQString() ); @@ -219,22 +219,22 @@ void KOrganizerPlugin::processDropEvent( TQDropEvent *event ) i18n("Drops of multiple mails are not supported." ) ); } else { KPIM::MailSummary mail = mails.first(); - TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() ) - .arg( mail.to() ).arg( mail.subject() ); + TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").tqarg( mail.from() ) + .tqarg( mail.to() ).tqarg( mail.subject() ); KTempFile tf; tf.setAutoDelete( true ); - TQString uri = TQString::fromLatin1("kmail:") + TQString::number( mail.serialNumber() ); - tf.file()->writeBlock( event->encodedData( "message/rfc822" ) ); + TQString uri = TQString::tqfromLatin1("kmail:") + TQString::number( mail.serialNumber() ); + tf.file()->writeBlock( event->tqencodedData( "message/rfc822" ) ); tf.close(); - interface()->openEventEditor( i18n("Mail: %1").arg( mail.subject() ), txt, + interface()->openEventEditor( i18n("Mail: %1").tqarg( mail.subject() ), txt, uri, tf.name(), TQStringList(), "message/rfc822" ); } return; } KMessageBox::sorry( core(), i18n("Cannot handle drop events of type '%1'.") - .arg( event->format() ) ); + .tqarg( event->format() ) ); } bool KOrganizerPlugin::queryClose() const { diff --git a/kontact/plugins/korganizer/summarywidget.cpp b/kontact/plugins/korganizer/summarywidget.cpp index 8803f05f9..7c3a1bed9 100644 --- a/kontact/plugins/korganizer/summarywidget.cpp +++ b/kontact/plugins/korganizer/summarywidget.cpp @@ -23,7 +23,7 @@ #include <tqcursor.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqtooltip.h> #include <kdialog.h> @@ -97,9 +97,9 @@ void SummaryWidget::updateView() TQPixmap pma = loader.loadIcon( "calendaranniversary", KIcon::Small ); TQDate dt; - TQDate currentDate = TQDate::currentDate(); - for ( dt=currentDate; - dt<=currentDate.addDays( days - 1 ); + TQDate tqcurrentDate = TQDate::tqcurrentDate(); + for ( dt=tqcurrentDate; + dt<=tqcurrentDate.addDays( days - 1 ); dt=dt.addDays(1) ) { KCal::Event::List events = mCalendar->events( dt ); @@ -123,8 +123,8 @@ void SummaryWidget::updateView() int span=1; int dayof=1; if ( ev->isMultiDay() ) { TQDate d = ev->dtStart().date(); - if ( d < currentDate ) { - d = currentDate; + if ( d < tqcurrentDate ) { + d = tqcurrentDate; } while ( d < ev->dtEnd().date() ) { if ( d < dt ) { @@ -148,8 +148,8 @@ void SummaryWidget::updateView() } else { label->setPixmap( pm ); } - label->setMaximumWidth( label->minimumSizeHint().width() ); - label->setAlignment( AlignVCenter ); + label->setMaximumWidth( label->tqminimumSizeHint().width() ); + label->tqsetAlignment( AlignVCenter ); mLayout->addWidget( label, counter, 0 ); mLabels.append( label ); @@ -159,12 +159,12 @@ void SummaryWidget::updateView() // Modify event date for printing TQDate sD = TQDate( dt.year(), dt.month(), dt.day() ); - if ( ( sD.month() == currentDate.month() ) && - ( sD.day() == currentDate.day() ) ) { + if ( ( sD.month() == tqcurrentDate.month() ) && + ( sD.day() == tqcurrentDate.day() ) ) { datestr = i18n( "Today" ); makeBold = true; - } else if ( ( sD.month() == currentDate.addDays( 1 ).month() ) && - ( sD.day() == currentDate.addDays( 1 ).day() ) ) { + } else if ( ( sD.month() == tqcurrentDate.addDays( 1 ).month() ) && + ( sD.day() == tqcurrentDate.addDays( 1 ).day() ) ) { datestr = i18n( "Tomorrow" ); } else { datestr = KGlobal::locale()->formatDate( sD ); @@ -179,7 +179,7 @@ void SummaryWidget::updateView() } label = new TQLabel( datestr, this ); - label->setAlignment( AlignLeft | AlignVCenter ); + label->tqsetAlignment( AlignLeft | AlignVCenter ); if ( makeBold ) { TQFont font = label->font(); font.setBold( true ); @@ -191,14 +191,14 @@ void SummaryWidget::updateView() // Fill Event Summary Field TQString newtext = ev->summary(); if ( ev->isMultiDay() && !ev->doesFloat() ) { - newtext.append( TQString(" (%1/%2)").arg( dayof ).arg( span ) ); + newtext.append( TQString(" (%1/%2)").tqarg( dayof ).tqarg( span ) ); } KURLLabel *urlLabel = new KURLLabel( this ); urlLabel->setText( newtext ); urlLabel->setURL( ev->uid() ); urlLabel->installEventFilter( this ); - urlLabel->setAlignment( urlLabel->alignment() | TQt::WordBreak ); + urlLabel->tqsetAlignment( urlLabel->tqalignment() | TQt::WordBreak ); mLayout->addWidget( urlLabel, counter, 2 ); mLabels.append( urlLabel ); @@ -225,10 +225,10 @@ void SummaryWidget::updateView() } } datestr = i18n( "Time from - to", "%1 - %2" ) - .arg( KGlobal::locale()->formatTime( sST ) ) - .arg( KGlobal::locale()->formatTime( sET ) ); + .tqarg( KGlobal::locale()->formatTime( sST ) ) + .tqarg( KGlobal::locale()->formatTime( sET ) ); label = new TQLabel( datestr, this ); - label->setAlignment( AlignLeft | AlignVCenter ); + label->tqsetAlignment( AlignLeft | AlignVCenter ); mLayout->addWidget( label, counter, 3 ); mLabels.append( label ); } @@ -242,7 +242,7 @@ void SummaryWidget::updateView() i18n( "No appointments pending within the next day", "No appointments pending within the next %n days", days ), this, "nothing to see" ); - noEvents->setAlignment( AlignHCenter | AlignVCenter ); + noEvents->tqsetAlignment( AlignHCenter | AlignVCenter ); mLayout->addWidget( noEvents, 0, 2 ); mLabels.append( noEvents ); } @@ -288,7 +288,7 @@ bool SummaryWidget::eventFilter( TQObject *obj, TQEvent* e ) if ( obj->inherits( "KURLLabel" ) ) { KURLLabel* label = static_cast<KURLLabel*>( TQT_TQWIDGET(obj) ); if ( e->type() == TQEvent::Enter ) - emit message( i18n( "Edit Appointment: \"%1\"" ).arg( label->text() ) ); + emit message( i18n( "Edit Appointment: \"%1\"" ).tqarg( label->text() ) ); if ( e->type() == TQEvent::Leave ) emit message( TQString() ); } diff --git a/kontact/plugins/korganizer/todoplugin.cpp b/kontact/plugins/korganizer/todoplugin.cpp index e3ff2ba8f..caaaaf91d 100644 --- a/kontact/plugins/korganizer/todoplugin.cpp +++ b/kontact/plugins/korganizer/todoplugin.cpp @@ -187,7 +187,7 @@ void TodoPlugin::processDropEvent( TQDropEvent *event ) KCal::Incidence *i = incidences.first(); TQString summary; if ( dynamic_cast<KCal::Journal*>( i ) ) - summary = i18n( "Note: %1" ).arg( i->summary() ); + summary = i18n( "Note: %1" ).tqarg( i->summary() ); else summary = i->summary(); interface()->openTodoEditor( summary, i->description(), TQString() ); @@ -210,23 +210,23 @@ void TodoPlugin::processDropEvent( TQDropEvent *event ) i18n("Drops of multiple mails are not supported." ) ); } else { KPIM::MailSummary mail = mails.first(); - TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() ) - .arg( mail.to() ).arg( mail.subject() ); + TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").tqarg( mail.from() ) + .tqarg( mail.to() ).tqarg( mail.subject() ); KTempFile tf; tf.setAutoDelete( true ); TQString uri = "kmail:" + TQString::number( mail.serialNumber() ) + "/" + mail.messageId(); - tf.file()->writeBlock( event->encodedData( "message/rfc822" ) ); + tf.file()->writeBlock( event->tqencodedData( "message/rfc822" ) ); tf.close(); - interface()->openTodoEditor( i18n("Mail: %1").arg( mail.subject() ), + interface()->openTodoEditor( i18n("Mail: %1").tqarg( mail.subject() ), txt, uri, tf.name(), TQStringList(), "message/rfc822", false ); } return; } KMessageBox::sorry( core(), i18n("Cannot handle drop events of type '%1'.") - .arg( event->format() ) ); + .tqarg( event->format() ) ); } #include "todoplugin.moc" diff --git a/kontact/plugins/korganizer/todosummarywidget.cpp b/kontact/plugins/korganizer/todosummarywidget.cpp index b16b638c9..0849dde74 100644 --- a/kontact/plugins/korganizer/todosummarywidget.cpp +++ b/kontact/plugins/korganizer/todosummarywidget.cpp @@ -23,7 +23,7 @@ #include <tqcursor.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqtooltip.h> #include <kdialog.h> @@ -94,7 +94,7 @@ void TodoSummaryWidget::updateView() TQLabel *label = 0; int counter = 0; - TQDate currentDate = TQDate::currentDate(); + TQDate tqcurrentDate = TQDate::tqcurrentDate(); KCal::Todo::List todos = mCalendar->todos(); if ( todos.count() > 0 ) { TQPixmap pm = loader.loadIcon( "todo", KIcon::Small ); @@ -111,27 +111,27 @@ void TodoSummaryWidget::updateView() // show uncomplete todos from the last days if ( todo->hasDueDate() && !todo->isCompleted() && - todo->dtDue().date() < currentDate ) { + todo->dtDue().date() < tqcurrentDate ) { accepted = true; stateText = i18n( "overdue" ); } // show todos which started somewhere in the past and has to be finished in future if ( todo->hasStartDate() && todo->hasDueDate() && - todo->dtStart().date() < currentDate && - currentDate < todo->dtDue().date() ) { + todo->dtStart().date() < tqcurrentDate && + tqcurrentDate < todo->dtDue().date() ) { accepted = true; stateText = i18n( "in progress" ); } // all todos which start today - if ( todo->hasStartDate() && todo->dtStart().date() == currentDate ) { + if ( todo->hasStartDate() && todo->dtStart().date() == tqcurrentDate ) { accepted = true; stateText = i18n( "starts today" ); } // all todos which end today - if ( todo->hasDueDate() && todo->dtDue().date() == currentDate ) { + if ( todo->hasDueDate() && todo->dtDue().date() == tqcurrentDate ) { accepted = true; stateText = i18n( "ends today" ); } @@ -141,13 +141,13 @@ void TodoSummaryWidget::updateView() label = new TQLabel( this ); label->setPixmap( pm ); - label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); + label->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); mLayout->addWidget( label, counter, 0 ); mLabels.append( label ); label = new TQLabel( TQString::number( todo->percentComplete() ) + "%", this ); - label->setAlignment( AlignHCenter | AlignVCenter ); - label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); + label->tqsetAlignment( AlignHCenter | AlignVCenter ); + label->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); mLayout->addWidget( label, counter, 1 ); mLabels.append( label ); @@ -168,14 +168,14 @@ void TodoSummaryWidget::updateView() connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ), this, TQT_SLOT( popupMenu( const TQString& ) ) ); - TQString tipText( KCal::IncidenceFormatter::toolTipStr( mCalendar, todo, currentDate, true ) ); + TQString tipText( KCal::IncidenceFormatter::toolTipStr( mCalendar, todo, tqcurrentDate, true ) ); if ( !tipText.isEmpty() ) { TQToolTip::add( urlLabel, tipText ); } label = new TQLabel( stateText, this ); - label->setAlignment( AlignLeft | AlignVCenter ); - label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); + label->tqsetAlignment( AlignLeft | AlignVCenter ); + label->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); mLayout->addWidget( label, counter, 3 ); mLabels.append( label ); @@ -185,7 +185,7 @@ void TodoSummaryWidget::updateView() if ( counter == 0 ) { TQLabel *noTodos = new TQLabel( i18n( "No to-dos pending" ), this ); - noTodos->setAlignment( AlignHCenter | AlignVCenter ); + noTodos->tqsetAlignment( AlignHCenter | AlignVCenter ); mLayout->addWidget( noTodos, 0, 1 ); mLabels.append( noTodos ); } @@ -214,7 +214,7 @@ void TodoSummaryWidget::completeTodo( const TQString &uid ) IncidenceChanger *changer = new IncidenceChanger( mCalendar, TQT_TQOBJECT(this) ); if ( !todo->isReadOnly() && changer->beginChange( todo, 0, TQString() ) ) { KCal::Todo *oldTodo = todo->clone(); - todo->setCompleted( TQDateTime::currentDateTime() ); + todo->setCompleted( TQDateTime::tqcurrentDateTime() ); changer->changeIncidence( oldTodo, todo, KOGlobals::COMPLETION_MODIFIED, this ); changer->endChange( todo, 0, TQString() ); delete oldTodo; @@ -253,7 +253,7 @@ bool TodoSummaryWidget::eventFilter( TQObject *obj, TQEvent* e ) if ( obj->inherits( "KURLLabel" ) ) { KURLLabel* label = static_cast<KURLLabel*>( TQT_TQWIDGET(obj) ); if ( e->type() == TQEvent::Enter ) - emit message( i18n( "Edit To-do: \"%1\"" ).arg( label->text() ) ); + emit message( i18n( "Edit To-do: \"%1\"" ).tqarg( label->text() ) ); if ( e->type() == TQEvent::Leave ) emit message( TQString() ); } |