diff options
Diffstat (limited to 'kontact/plugins/korganizer/summarywidget.cpp')
-rw-r--r-- | kontact/plugins/korganizer/summarywidget.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kontact/plugins/korganizer/summarywidget.cpp b/kontact/plugins/korganizer/summarywidget.cpp index 7c3a1bed9..8803f05f9 100644 --- a/kontact/plugins/korganizer/summarywidget.cpp +++ b/kontact/plugins/korganizer/summarywidget.cpp @@ -23,7 +23,7 @@ #include <tqcursor.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <kdialog.h> @@ -97,9 +97,9 @@ void SummaryWidget::updateView() TQPixmap pma = loader.loadIcon( "calendaranniversary", KIcon::Small ); TQDate dt; - TQDate tqcurrentDate = TQDate::tqcurrentDate(); - for ( dt=tqcurrentDate; - dt<=tqcurrentDate.addDays( days - 1 ); + TQDate currentDate = TQDate::currentDate(); + for ( dt=currentDate; + dt<=currentDate.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 < tqcurrentDate ) { - d = tqcurrentDate; + if ( d < currentDate ) { + d = currentDate; } while ( d < ev->dtEnd().date() ) { if ( d < dt ) { @@ -148,8 +148,8 @@ void SummaryWidget::updateView() } else { label->setPixmap( pm ); } - label->setMaximumWidth( label->tqminimumSizeHint().width() ); - label->tqsetAlignment( AlignVCenter ); + label->setMaximumWidth( label->minimumSizeHint().width() ); + label->setAlignment( 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() == tqcurrentDate.month() ) && - ( sD.day() == tqcurrentDate.day() ) ) { + if ( ( sD.month() == currentDate.month() ) && + ( sD.day() == currentDate.day() ) ) { datestr = i18n( "Today" ); makeBold = true; - } else if ( ( sD.month() == tqcurrentDate.addDays( 1 ).month() ) && - ( sD.day() == tqcurrentDate.addDays( 1 ).day() ) ) { + } else if ( ( sD.month() == currentDate.addDays( 1 ).month() ) && + ( sD.day() == currentDate.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->tqsetAlignment( AlignLeft | AlignVCenter ); + label->setAlignment( 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)").tqarg( dayof ).tqarg( span ) ); + newtext.append( TQString(" (%1/%2)").arg( dayof ).arg( span ) ); } KURLLabel *urlLabel = new KURLLabel( this ); urlLabel->setText( newtext ); urlLabel->setURL( ev->uid() ); urlLabel->installEventFilter( this ); - urlLabel->tqsetAlignment( urlLabel->tqalignment() | TQt::WordBreak ); + urlLabel->setAlignment( urlLabel->alignment() | TQt::WordBreak ); mLayout->addWidget( urlLabel, counter, 2 ); mLabels.append( urlLabel ); @@ -225,10 +225,10 @@ void SummaryWidget::updateView() } } datestr = i18n( "Time from - to", "%1 - %2" ) - .tqarg( KGlobal::locale()->formatTime( sST ) ) - .tqarg( KGlobal::locale()->formatTime( sET ) ); + .arg( KGlobal::locale()->formatTime( sST ) ) + .arg( KGlobal::locale()->formatTime( sET ) ); label = new TQLabel( datestr, this ); - label->tqsetAlignment( AlignLeft | AlignVCenter ); + label->setAlignment( 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->tqsetAlignment( AlignHCenter | AlignVCenter ); + noEvents->setAlignment( 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\"" ).tqarg( label->text() ) ); + emit message( i18n( "Edit Appointment: \"%1\"" ).arg( label->text() ) ); if ( e->type() == TQEvent::Leave ) emit message( TQString() ); } |