diff options
Diffstat (limited to 'kresources/scalix/knotes')
-rw-r--r-- | kresources/scalix/knotes/resourcescalix.cpp | 88 | ||||
-rw-r--r-- | kresources/scalix/knotes/resourcescalix.h | 42 | ||||
-rw-r--r-- | kresources/scalix/knotes/resourcescalix_plugin.cpp | 2 |
3 files changed, 66 insertions, 66 deletions
diff --git a/kresources/scalix/knotes/resourcescalix.cpp b/kresources/scalix/knotes/resourcescalix.cpp index e43a9a912..2b7895282 100644 --- a/kresources/scalix/knotes/resourcescalix.cpp +++ b/kresources/scalix/knotes/resourcescalix.cpp @@ -49,7 +49,7 @@ static const char* inlineMimeType = "text/calendar"; ResourceScalix::ResourceScalix( const KConfig *config ) : ResourceNotes( config ), ResourceScalixBase( "ResourceScalix-KNotes" ), - mCalendar( QString::fromLatin1("UTC") ) + mCalendar( TQString::fromLatin1("UTC") ) { setType( "scalix" ); } @@ -64,15 +64,15 @@ bool ResourceScalix::doOpen() config.setGroup( configGroupName ); // Get the list of Notes folders from KMail - QValueList<KMailICalIface::SubResource> subResources; + TQValueList<KMailICalIface::SubResource> subResources; if ( !kmailSubresources( subResources, kmailContentsType ) ) return false; // Make the resource map from the folder list - QValueList<KMailICalIface::SubResource>::ConstIterator it; + TQValueList<KMailICalIface::SubResource>::ConstIterator it; mSubResources.clear(); for ( it = subResources.begin(); it != subResources.end(); ++it ) { - const QString subResource = (*it).location; + const TQString subResource = (*it).location; const bool active = config.readBoolEntry( subResource, true ); mSubResources[ subResource ] = Scalix::SubResource( active, (*it).writable, (*it).label ); } @@ -89,8 +89,8 @@ void ResourceScalix::doClose() config.writeEntry( it.key(), it.data().active() ); } -bool ResourceScalix::loadSubResource( const QString& subResource, - const QString &mimetype ) +bool ResourceScalix::loadSubResource( const TQString& subResource, + const TQString &mimetype ) { // Get the list of journals int count = 0; @@ -99,7 +99,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource, return false; } - QMap<Q_UINT32, QString> lst; + TQMap<Q_UINT32, TQString> lst; if( !kmailIncidences( lst, mimetype, subResource, 0, count ) ) { kdError(5500) << "Communication problem in " << "ResourceScalix::getIncidenceList()\n"; @@ -111,7 +111,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource, // Populate with the new entries const bool silent = mSilent; mSilent = true; - QMap<Q_UINT32, QString>::Iterator it; + TQMap<Q_UINT32, TQString>::Iterator it; for ( it = lst.begin(); it != lst.end(); ++it ) { KCal::Journal* journal = addNote( it.data(), subResource, it.key(), mimetype ); if ( !journal ) @@ -137,7 +137,7 @@ bool ResourceScalix::load() // This subResource is disabled continue; - QString mimetype = inlineMimeType; + TQString mimetype = inlineMimeType; rc &= loadSubResource( itR.key(), mimetype ); mimetype = attachmentMimeType; rc &= loadSubResource( itR.key(), mimetype ); @@ -154,11 +154,11 @@ bool ResourceScalix::save() bool ResourceScalix::addNote( KCal::Journal* journal ) { - return addNote( journal, QString::null, 0 ); + return addNote( journal, TQString::null, 0 ); } -KCal::Journal* ResourceScalix::addNote( const QString& data, const QString& subresource, - Q_UINT32 sernum, const QString& ) +KCal::Journal* ResourceScalix::addNote( const TQString& data, const TQString& subresource, + Q_UINT32 sernum, const TQString& ) { KCal::Journal* journal = 0; // FIXME: This does not take into account the time zone! @@ -175,7 +175,7 @@ KCal::Journal* ResourceScalix::addNote( const QString& data, const QString& subr } bool ResourceScalix::addNote( KCal::Journal* journal, - const QString& subresource, Q_UINT32 sernum ) + const TQString& subresource, Q_UINT32 sernum ) { kdDebug(5500) << "ResourceScalix::addNote( KCal::Journal*, '" << subresource << "', " << sernum << " )\n"; @@ -185,14 +185,14 @@ bool ResourceScalix::addNote( KCal::Journal* journal, bool newNote = subresource.isEmpty(); mCalendar.addJournal( journal ); - QString resource = + TQString resource = newNote ? findWritableResource( mSubResources ) : subresource; if ( resource.isEmpty() ) // canceled return false; if ( !mSilent ) { KCal::ICalFormat formatter; - const QString xml = formatter.toString( journal ); + const TQString xml = formatter.toString( journal ); kdDebug(5500) << k_funcinfo << "XML string:\n" << xml << endl; if( !kmailUpdate( resource, sernum, xml, attachmentMimeType, journal->uid() ) ) { @@ -211,7 +211,7 @@ bool ResourceScalix::addNote( KCal::Journal* journal, bool ResourceScalix::deleteNote( KCal::Journal* journal ) { - const QString uid = journal->uid(); + const TQString uid = journal->uid(); if ( !mUidMap.contains( uid ) ) // Odd return false; @@ -226,20 +226,20 @@ bool ResourceScalix::deleteNote( KCal::Journal* journal ) return true; } -KCal::Alarm::List ResourceScalix::alarms( const QDateTime& from, const QDateTime& to ) +KCal::Alarm::List ResourceScalix::alarms( const TQDateTime& from, const TQDateTime& to ) { KCal::Alarm::List alarms; KCal::Journal::List notes = mCalendar.journals(); KCal::Journal::List::ConstIterator note; for ( note = notes.begin(); note != notes.end(); ++note ) { - QDateTime preTime = from.addSecs( -1 ); + TQDateTime preTime = from.addSecs( -1 ); KCal::Alarm::List::ConstIterator it; for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it ) { if ( (*it)->enabled() ) { - QDateTime dt = (*it)->nextRepetition( preTime ); + TQDateTime dt = (*it)->nextRepetition( preTime ); if ( dt.isValid() && dt <= to ) alarms.append( *it ); } @@ -251,7 +251,7 @@ KCal::Alarm::List ResourceScalix::alarms( const QDateTime& from, const QDateTime void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i ) { - QString subResource; + TQString subResource; Q_UINT32 sernum; if ( mUidMap.contains( i->uid() ) ) { subResource = mUidMap[ i->uid() ].resource(); @@ -265,7 +265,7 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i ) KCal::Journal* journal = dynamic_cast<KCal::Journal*>( i ); KCal::ICalFormat formatter; - const QString xml = formatter.toString( journal ); + const TQString xml = formatter.toString( journal ); if( !xml.isEmpty() && kmailUpdate( subResource, sernum, xml, attachmentMimeType, journal->uid() ) ) mUidMap[ i->uid() ] = StorageReference( subResource, sernum ); } @@ -274,18 +274,18 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i ) * These are the DCOP slots that KMail call to notify when something * changed. */ -bool ResourceScalix::fromKMailAddIncidence( const QString& type, - const QString& subResource, +bool ResourceScalix::fromKMailAddIncidence( const TQString& type, + const TQString& subResource, Q_UINT32 sernum, int, - const QString& note ) + const TQString& note ) { // Check if this is a note if( type != kmailContentsType ) return false; const bool silent = mSilent; mSilent = true; - QString mimetype = inlineMimeType; + TQString mimetype = inlineMimeType; KCal::Journal* journal = addNote( note, subResource, sernum, mimetype ); if ( journal ) manager()->registerNote( this, journal ); @@ -293,9 +293,9 @@ bool ResourceScalix::fromKMailAddIncidence( const QString& type, return true; } -void ResourceScalix::fromKMailDelIncidence( const QString& type, - const QString& /*subResource*/, - const QString& uid ) +void ResourceScalix::fromKMailDelIncidence( const TQString& type, + const TQString& /*subResource*/, + const TQString& uid ) { // Check if this is a note if( type != kmailContentsType ) return; @@ -311,16 +311,16 @@ void ResourceScalix::fromKMailDelIncidence( const QString& type, mSilent = silent; } -void ResourceScalix::fromKMailRefresh( const QString& type, - const QString& /*subResource*/ ) +void ResourceScalix::fromKMailRefresh( const TQString& type, + const TQString& /*subResource*/ ) { if ( type == kmailContentsType ) load(); // ### should call loadSubResource(subResource) probably } -void ResourceScalix::fromKMailAddSubresource( const QString& type, - const QString& subResource, - const QString& mimetype, +void ResourceScalix::fromKMailAddSubresource( const TQString& type, + const TQString& subResource, + const TQString& mimetype, bool writable ) { if ( type != kmailContentsType ) @@ -340,8 +340,8 @@ void ResourceScalix::fromKMailAddSubresource( const QString& type, emit signalSubresourceAdded( this, type, subResource ); } -void ResourceScalix::fromKMailDelSubresource( const QString& type, - const QString& subResource ) +void ResourceScalix::fromKMailDelSubresource( const TQString& type, + const TQString& subResource ) { if ( type != configGroupName ) // Not ours @@ -361,7 +361,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type, // Make a list of all uids to remove Scalix::UidMap::ConstIterator mapIt; - QStringList uids; + TQStringList uids; for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt ) if ( mapIt.data().resource() == subResource ) // We have a match @@ -371,7 +371,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type, if ( !uids.isEmpty() ) { const bool silent = mSilent; mSilent = true; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = uids.begin(); it != uids.end(); ++it ) { KCal::Journal* j = mCalendar.journal( *it ); if( j ) @@ -383,17 +383,17 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type, emit signalSubresourceRemoved( this, type, subResource ); } -void ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map, - const QString& type, - const QString& folder ) +void ResourceScalix::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map, + const TQString& type, + const TQString& folder ) { // We are only interested in notes if ( ( type != attachmentMimeType ) && ( type != inlineMimeType ) ) return; // Populate with the new entries const bool silent = mSilent; mSilent = true; - QString mimetype = inlineMimeType; - for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) { + TQString mimetype = inlineMimeType; + for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) { KCal::Journal* journal = addNote( it.data(), folder, it.key(), mimetype ); if ( !journal ) kdDebug(5500) << "loading note " << it.key() << " failed" << endl; @@ -404,12 +404,12 @@ void ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& ma } -QStringList ResourceScalix::subresources() const +TQStringList ResourceScalix::subresources() const { return mSubResources.keys(); } -bool ResourceScalix::subresourceActive( const QString& res ) const +bool ResourceScalix::subresourceActive( const TQString& res ) const { if ( mSubResources.contains( res ) ) { return mSubResources[ res ].active(); diff --git a/kresources/scalix/knotes/resourcescalix.h b/kresources/scalix/knotes/resourcescalix.h index a26bd1973..cb0c50fbf 100644 --- a/kresources/scalix/knotes/resourcescalix.h +++ b/kresources/scalix/knotes/resourcescalix.h @@ -73,46 +73,46 @@ public: bool deleteNote( KCal::Journal* ); - KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to ); + KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to ); /// Reimplemented from IncidenceBase::Observer to know when a note was changed void incidenceUpdated( KCal::IncidenceBase* ); /// The ResourceScalixBase methods called by KMail - bool fromKMailAddIncidence( const QString& type, const QString& resource, - Q_UINT32 sernum, int format, const QString& note ); - void fromKMailDelIncidence( const QString& type, const QString& resource, - const QString& uid ); - void fromKMailRefresh( const QString& type, const QString& resource ); + bool fromKMailAddIncidence( const TQString& type, const TQString& resource, + Q_UINT32 sernum, int format, const TQString& note ); + void fromKMailDelIncidence( const TQString& type, const TQString& resource, + const TQString& uid ); + void fromKMailRefresh( const TQString& type, const TQString& resource ); /// Listen to KMail changes in the amount of sub resources - void fromKMailAddSubresource( const QString& type, const QString& resource, - const QString& label, bool writable ); - void fromKMailDelSubresource( const QString& type, const QString& resource ); + void fromKMailAddSubresource( const TQString& type, const TQString& resource, + const TQString& label, bool writable ); + void fromKMailDelSubresource( const TQString& type, const TQString& resource ); - void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map, - const QString& type, - const QString& folder ); + void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map, + const TQString& type, + const TQString& folder ); /** Return the list of subresources. */ - QStringList subresources() const; + TQStringList subresources() const; /** Is this subresource active? */ - bool subresourceActive( const QString& ) const; + bool subresourceActive( const TQString& ) const; signals: - void signalSubresourceAdded( Resource*, const QString&, const QString& ); - void signalSubresourceRemoved( Resource*, const QString&, const QString& ); + void signalSubresourceAdded( Resource*, const TQString&, const TQString& ); + void signalSubresourceRemoved( Resource*, const TQString&, const TQString& ); private: - bool addNote( KCal::Journal* journal, const QString& resource, + bool addNote( KCal::Journal* journal, const TQString& resource, Q_UINT32 sernum ); - KCal::Journal* addNote( const QString& data, const QString& subresource, - Q_UINT32 sernum, const QString &mimetype ); + KCal::Journal* addNote( const TQString& data, const TQString& subresource, + Q_UINT32 sernum, const TQString &mimetype ); - bool loadSubResource( const QString& resource, const QString& mimetype ); + bool loadSubResource( const TQString& resource, const TQString& mimetype ); - QString configFile() const { + TQString configFile() const { return ResourceScalixBase::configFile( "knotes" ); } diff --git a/kresources/scalix/knotes/resourcescalix_plugin.cpp b/kresources/scalix/knotes/resourcescalix_plugin.cpp index a83bbd746..222d5ed68 100644 --- a/kresources/scalix/knotes/resourcescalix_plugin.cpp +++ b/kresources/scalix/knotes/resourcescalix_plugin.cpp @@ -41,7 +41,7 @@ public: return new Scalix::ResourceScalix( config ); } - KRES::ConfigWidget *configWidget( QWidget* ) + KRES::ConfigWidget *configWidget( TQWidget* ) { return 0; } |