summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/korganizer
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
commit3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch)
tree89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kontact/plugins/korganizer
parent1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff)
downloadtdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz
tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kontact/plugins/korganizer')
-rw-r--r--kontact/plugins/korganizer/kcmkorgsummary.cpp12
-rw-r--r--kontact/plugins/korganizer/korganizerplugin.cpp14
-rw-r--r--kontact/plugins/korganizer/summarywidget.cpp40
-rw-r--r--kontact/plugins/korganizer/todoplugin.cpp12
-rw-r--r--kontact/plugins/korganizer/todosummarywidget.cpp32
5 files changed, 55 insertions, 55 deletions
diff --git a/kontact/plugins/korganizer/kcmkorgsummary.cpp b/kontact/plugins/korganizer/kcmkorgsummary.cpp
index 4466c5c6..115de0e9 100644
--- a/kontact/plugins/korganizer/kcmkorgsummary.cpp
+++ b/kontact/plugins/korganizer/kcmkorgsummary.cpp
@@ -23,7 +23,7 @@
#include <tqbuttongroup.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqradiobutton.h>
#include <tqspinbox.h>
@@ -90,10 +90,10 @@ void KCMKOrgSummary::customDaysChanged( int value )
void KCMKOrgSummary::initGUI()
{
- TQVBoxLayout *tqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
mCalendarGroup = new TQButtonGroup( 0, Qt::Vertical, i18n( "Appointments" ), this );
- TQVBoxLayout *boxLayout = new TQVBoxLayout( mCalendarGroup->tqlayout(),
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( mCalendarGroup->layout(),
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 );
- tqlayout->addWidget( mCalendarGroup );
+ layout->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 );
- tqlayout->addWidget( mTodoGroup );
+ layout->addWidget( mTodoGroup );
- tqlayout->addStretch();
+ layout->addStretch();
}
void KCMKOrgSummary::load()
diff --git a/kontact/plugins/korganizer/korganizerplugin.cpp b/kontact/plugins/korganizer/korganizerplugin.cpp
index 7c2140b3..2262dcef 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" ).tqarg( i->summary() );
+ summary = i18n( "Note: %1" ).arg( 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").tqarg( mail.from() )
- .tqarg( mail.to() ).tqarg( mail.subject() );
+ TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() )
+ .arg( mail.to() ).arg( mail.subject() );
KTempFile tf;
tf.setAutoDelete( true );
- TQString uri = TQString::tqfromLatin1("kmail:") + TQString::number( mail.serialNumber() );
- tf.file()->writeBlock( event->tqencodedData( "message/rfc822" ) );
+ TQString uri = TQString::fromLatin1("kmail:") + TQString::number( mail.serialNumber() );
+ tf.file()->writeBlock( event->encodedData( "message/rfc822" ) );
tf.close();
- interface()->openEventEditor( i18n("Mail: %1").tqarg( mail.subject() ), txt,
+ interface()->openEventEditor( i18n("Mail: %1").arg( mail.subject() ), txt,
uri, tf.name(), TQStringList(), "message/rfc822" );
}
return;
}
KMessageBox::sorry( core(), i18n("Cannot handle drop events of type '%1'.")
- .tqarg( event->format() ) );
+ .arg( event->format() ) );
}
bool KOrganizerPlugin::queryClose() const {
diff --git a/kontact/plugins/korganizer/summarywidget.cpp b/kontact/plugins/korganizer/summarywidget.cpp
index 7c3a1bed..8803f05f 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() );
}
diff --git a/kontact/plugins/korganizer/todoplugin.cpp b/kontact/plugins/korganizer/todoplugin.cpp
index caaaaf91..e3ff2ba8 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" ).tqarg( i->summary() );
+ summary = i18n( "Note: %1" ).arg( 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").tqarg( mail.from() )
- .tqarg( mail.to() ).tqarg( mail.subject() );
+ TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() )
+ .arg( mail.to() ).arg( mail.subject() );
KTempFile tf;
tf.setAutoDelete( true );
TQString uri = "kmail:" + TQString::number( mail.serialNumber() ) + "/" +
mail.messageId();
- tf.file()->writeBlock( event->tqencodedData( "message/rfc822" ) );
+ tf.file()->writeBlock( event->encodedData( "message/rfc822" ) );
tf.close();
- interface()->openTodoEditor( i18n("Mail: %1").tqarg( mail.subject() ),
+ interface()->openTodoEditor( i18n("Mail: %1").arg( mail.subject() ),
txt, uri, tf.name(), TQStringList(), "message/rfc822", false );
}
return;
}
KMessageBox::sorry( core(), i18n("Cannot handle drop events of type '%1'.")
- .tqarg( event->format() ) );
+ .arg( event->format() ) );
}
#include "todoplugin.moc"
diff --git a/kontact/plugins/korganizer/todosummarywidget.cpp b/kontact/plugins/korganizer/todosummarywidget.cpp
index 0849dde7..b16b638c 100644
--- a/kontact/plugins/korganizer/todosummarywidget.cpp
+++ b/kontact/plugins/korganizer/todosummarywidget.cpp
@@ -23,7 +23,7 @@
#include <tqcursor.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqtooltip.h>
#include <kdialog.h>
@@ -94,7 +94,7 @@ void TodoSummaryWidget::updateView()
TQLabel *label = 0;
int counter = 0;
- TQDate tqcurrentDate = TQDate::tqcurrentDate();
+ TQDate currentDate = TQDate::currentDate();
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() < tqcurrentDate ) {
+ todo->dtDue().date() < currentDate ) {
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() < tqcurrentDate &&
- tqcurrentDate < todo->dtDue().date() ) {
+ todo->dtStart().date() < currentDate &&
+ currentDate < todo->dtDue().date() ) {
accepted = true;
stateText = i18n( "in progress" );
}
// all todos which start today
- if ( todo->hasStartDate() && todo->dtStart().date() == tqcurrentDate ) {
+ if ( todo->hasStartDate() && todo->dtStart().date() == currentDate ) {
accepted = true;
stateText = i18n( "starts today" );
}
// all todos which end today
- if ( todo->hasDueDate() && todo->dtDue().date() == tqcurrentDate ) {
+ if ( todo->hasDueDate() && todo->dtDue().date() == currentDate ) {
accepted = true;
stateText = i18n( "ends today" );
}
@@ -141,13 +141,13 @@ void TodoSummaryWidget::updateView()
label = new TQLabel( this );
label->setPixmap( pm );
- label->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
mLayout->addWidget( label, counter, 0 );
mLabels.append( label );
label = new TQLabel( TQString::number( todo->percentComplete() ) + "%", this );
- label->tqsetAlignment( AlignHCenter | AlignVCenter );
- label->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
+ label->setAlignment( AlignHCenter | AlignVCenter );
+ label->setSizePolicy( 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, tqcurrentDate, true ) );
+ TQString tipText( KCal::IncidenceFormatter::toolTipStr( mCalendar, todo, currentDate, true ) );
if ( !tipText.isEmpty() ) {
TQToolTip::add( urlLabel, tipText );
}
label = new TQLabel( stateText, this );
- label->tqsetAlignment( AlignLeft | AlignVCenter );
- label->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
+ label->setAlignment( AlignLeft | AlignVCenter );
+ label->setSizePolicy( 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->tqsetAlignment( AlignHCenter | AlignVCenter );
+ noTodos->setAlignment( 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::tqcurrentDateTime() );
+ todo->setCompleted( TQDateTime::currentDateTime() );
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\"" ).tqarg( label->text() ) );
+ emit message( i18n( "Edit To-do: \"%1\"" ).arg( label->text() ) );
if ( e->type() == TQEvent::Leave )
emit message( TQString() );
}