From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kontact/plugins/korganizer/todoplugin.cpp | 46 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'kontact/plugins/korganizer/todoplugin.cpp') diff --git a/kontact/plugins/korganizer/todoplugin.cpp b/kontact/plugins/korganizer/todoplugin.cpp index 4cb281b8..3b6ab214 100644 --- a/kontact/plugins/korganizer/todoplugin.cpp +++ b/kontact/plugins/korganizer/todoplugin.cpp @@ -22,9 +22,9 @@ without including the source code for Qt in the source distribution. */ -#include -#include -#include +#include +#include +#include #include #include @@ -54,7 +54,7 @@ typedef KGenericFactory< TodoPlugin, Kontact::Core > TodoPluginFactory; K_EXPORT_COMPONENT_FACTORY( libkontact_todoplugin, TodoPluginFactory( "kontact_todoplugin" ) ) -TodoPlugin::TodoPlugin( Kontact::Core *core, const char *, const QStringList& ) +TodoPlugin::TodoPlugin( Kontact::Core *core, const char *, const TQStringList& ) : Kontact::Plugin( core, core, "korganizer" ), mIface( 0 ) { @@ -62,11 +62,11 @@ TodoPlugin::TodoPlugin( Kontact::Core *core, const char *, const QStringList& ) instance()->iconLoader()->addAppDir("kdepim"); insertNewAction( new KAction( i18n( "New To-do..." ), "newtodo", - CTRL+SHIFT+Key_T, this, SLOT( slotNewTodo() ), actionCollection(), + CTRL+SHIFT+Key_T, this, TQT_SLOT( slotNewTodo() ), actionCollection(), "new_todo" ) ); insertSyncAction( new KAction( i18n( "Synchronize To-do List" ), "reload", - 0, this, SLOT( slotSyncTodos() ), actionCollection(), + 0, this, TQT_SLOT( slotSyncTodos() ), actionCollection(), "todo_sync" ) ); mUniqueAppWatcher = new Kontact::UniqueAppWatcher( @@ -77,7 +77,7 @@ TodoPlugin::~TodoPlugin() { } -Kontact::Summary *TodoPlugin::createSummaryWidget( QWidget *parent ) +Kontact::Summary *TodoPlugin::createSummaryWidget( TQWidget *parent ) { return new TodoSummaryWidget( this, parent ); } @@ -100,9 +100,9 @@ void TodoPlugin::select() interface()->showTodoView(); } -QStringList TodoPlugin::invisibleToolbarActions() const +TQStringList TodoPlugin::invisibleToolbarActions() const { - QStringList invisible; + TQStringList invisible; invisible += "new_event"; invisible += "new_todo"; invisible += "new_journal"; @@ -134,10 +134,10 @@ void TodoPlugin::slotNewTodo() void TodoPlugin::slotSyncTodos() { DCOPRef ref( "kmail", "KMailICalIface" ); - ref.send( "triggerSync", QString("Todo") ); + ref.send( "triggerSync", TQString("Todo") ); } -bool TodoPlugin::createDCOPInterface( const QString& serviceType ) +bool TodoPlugin::createDCOPInterface( const TQString& serviceType ) { kdDebug(5602) << k_funcinfo << serviceType << endl; if ( serviceType == "DCOP/Organizer" || serviceType == "DCOP/Calendar" ) { @@ -148,9 +148,9 @@ bool TodoPlugin::createDCOPInterface( const QString& serviceType ) return false; } -bool TodoPlugin::canDecodeDrag( QMimeSource *mimeSource ) +bool TodoPlugin::canDecodeDrag( TQMimeSource *mimeSource ) { - return QTextDrag::canDecode( mimeSource ) || + return TQTextDrag::canDecode( mimeSource ) || KPIM::MailListDrag::canDecode( mimeSource ); } @@ -159,25 +159,25 @@ bool TodoPlugin::isRunningStandalone() return mUniqueAppWatcher->isRunningStandalone(); } -void TodoPlugin::processDropEvent( QDropEvent *event ) +void TodoPlugin::processDropEvent( TQDropEvent *event ) { - QString text; + TQString text; KABC::VCardConverter converter; if ( KVCardDrag::canDecode( event ) && KVCardDrag::decode( event, text ) ) { KABC::Addressee::List contacts = converter.parseVCards( text ); KABC::Addressee::List::Iterator it; - QStringList attendees; + TQStringList attendees; for ( it = contacts.begin(); it != contacts.end(); ++it ) { - QString email = (*it).fullEmail(); + TQString email = (*it).fullEmail(); if ( email.isEmpty() ) attendees.append( (*it).realName() + "<>" ); else attendees.append( email ); } - interface()->openTodoEditor( i18n( "Meeting" ), QString::null, QString::null, + interface()->openTodoEditor( i18n( "Meeting" ), TQString::null, TQString::null, attendees ); return; } @@ -189,14 +189,14 @@ void TodoPlugin::processDropEvent( QDropEvent *event ) if ( !journals.isEmpty() ) { event->accept(); KCal::Journal *j = journals.first(); - interface()->openTodoEditor( i18n("Note: %1").arg( j->summary() ), j->description(), QString() ); + interface()->openTodoEditor( i18n("Note: %1").arg( j->summary() ), j->description(), TQString() ); return; } // else fall through to text decoding } } - if ( QTextDrag::decode( event, text ) ) { + if ( TQTextDrag::decode( event, text ) ) { interface()->openTodoEditor( text ); return; } @@ -208,17 +208,17 @@ void TodoPlugin::processDropEvent( QDropEvent *event ) i18n("Drops of multiple mails are not supported." ) ); } else { KPIM::MailSummary mail = mails.first(); - QString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() ) + TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() ) .arg( mail.to() ).arg( mail.subject() ); KTempFile tf; tf.setAutoDelete( true ); - QString uri = "kmail:" + QString::number( mail.serialNumber() ) + "/" + + TQString uri = "kmail:" + TQString::number( mail.serialNumber() ) + "/" + mail.messageId(); tf.file()->writeBlock( event->encodedData( "message/rfc822" ) ); tf.close(); interface()->openTodoEditor( i18n("Mail: %1").arg( mail.subject() ), txt, - uri, tf.name(), QStringList(), "message/rfc822" ); + uri, tf.name(), TQStringList(), "message/rfc822" ); } return; } -- cgit v1.2.3