summaryrefslogtreecommitdiffstats
path: root/libkdepim/maillistdrag.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/maillistdrag.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/maillistdrag.cpp')
-rw-r--r--libkdepim/maillistdrag.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/libkdepim/maillistdrag.cpp b/libkdepim/maillistdrag.cpp
index 2fb28328a..434ef5ecc 100644
--- a/libkdepim/maillistdrag.cpp
+++ b/libkdepim/maillistdrag.cpp
@@ -21,17 +21,17 @@
*/
#include "maillistdrag.h"
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qeventloop.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqeventloop.h>
#include <kapplication.h>
#include <klocale.h>
#include <kprogress.h>
using namespace KPIM;
-MailSummary::MailSummary( Q_UINT32 serialNumber, QString messageId,
- QString subject, QString from, QString to,
+MailSummary::MailSummary( Q_UINT32 serialNumber, TQString messageId,
+ TQString subject, TQString from, TQString to,
time_t date )
: mSerialNumber( serialNumber ), mMessageId( messageId ),
mSubject( subject ), mFrom( from ), mTo( to ), mDate( date )
@@ -42,22 +42,22 @@ Q_UINT32 MailSummary::serialNumber() const
return mSerialNumber;
}
-QString MailSummary::messageId()
+TQString MailSummary::messageId()
{
return mMessageId;
}
-QString MailSummary::subject()
+TQString MailSummary::subject()
{
return mSubject;
}
-QString MailSummary::from()
+TQString MailSummary::from()
{
return mFrom;
}
-QString MailSummary::to()
+TQString MailSummary::to()
{
return mTo;
}
@@ -67,8 +67,8 @@ time_t MailSummary::date()
return mDate;
}
-void MailSummary::set( Q_UINT32 serialNumber, QString messageId,
- QString subject, QString from, QString to, time_t date )
+void MailSummary::set( Q_UINT32 serialNumber, TQString messageId,
+ TQString subject, TQString from, TQString to, time_t date )
{
mSerialNumber = serialNumber;
mMessageId = messageId;
@@ -78,8 +78,8 @@ void MailSummary::set( Q_UINT32 serialNumber, QString messageId,
mDate = date;
}
-MailListDrag::MailListDrag( MailList mailList, QWidget * parent, MailTextSource *src )
- : QStoredDrag( MailListDrag::format(), parent ), _src(src)
+MailListDrag::MailListDrag( MailList mailList, TQWidget * parent, MailTextSource *src )
+ : TQStoredDrag( MailListDrag::format(), parent ), _src(src)
{
setMailList( mailList );
}
@@ -95,13 +95,13 @@ const char* MailListDrag::format()
return "x-kmail-drag/message-list";
}
-bool MailListDrag::canDecode( QMimeSource *e )
+bool MailListDrag::canDecode( TQMimeSource *e )
{
return e->provides( MailListDrag::format() );
}
// Have to define before use
-QDataStream& operator<< ( QDataStream &s, MailSummary &d )
+TQDataStream& operator<< ( TQDataStream &s, MailSummary &d )
{
s << d.serialNumber();
s << d.messageId();
@@ -112,10 +112,10 @@ QDataStream& operator<< ( QDataStream &s, MailSummary &d )
return s;
}
-QDataStream& operator>> ( QDataStream &s, MailSummary &d )
+TQDataStream& operator>> ( TQDataStream &s, MailSummary &d )
{
Q_UINT32 serialNumber;
- QString messageId, subject, from, to;
+ TQString messageId, subject, from, to;
time_t date;
s >> serialNumber;
s >> messageId;
@@ -127,7 +127,7 @@ QDataStream& operator>> ( QDataStream &s, MailSummary &d )
return s;
}
-QDataStream& operator<< ( QDataStream &s, MailList &mailList )
+TQDataStream& operator<< ( TQDataStream &s, MailList &mailList )
{
MailList::iterator it;
for (it = mailList.begin(); it != mailList.end(); ++it) {
@@ -137,7 +137,7 @@ QDataStream& operator<< ( QDataStream &s, MailList &mailList )
return s;
}
-QDataStream& operator>> ( QDataStream &s, MailList &mailList )
+TQDataStream& operator>> ( TQDataStream &s, MailList &mailList )
{
mailList.clear();
MailSummary mailDrag;
@@ -148,10 +148,10 @@ QDataStream& operator>> ( QDataStream &s, MailList &mailList )
return s;
}
-bool MailListDrag::decode( QDropEvent* e, MailList& mailList )
+bool MailListDrag::decode( TQDropEvent* e, MailList& mailList )
{
- QByteArray payload = e->encodedData( MailListDrag::format() );
- QDataStream buffer( payload, IO_ReadOnly );
+ TQByteArray payload = e->encodedData( MailListDrag::format() );
+ TQDataStream buffer( payload, IO_ReadOnly );
if ( payload.size() ) {
e->accept();
buffer >> mailList;
@@ -160,9 +160,9 @@ bool MailListDrag::decode( QDropEvent* e, MailList& mailList )
return FALSE;
}
-bool MailListDrag::decode( QByteArray& payload, MailList& mailList )
+bool MailListDrag::decode( TQByteArray& payload, MailList& mailList )
{
- QDataStream stream( payload, IO_ReadOnly );
+ TQDataStream stream( payload, IO_ReadOnly );
if ( payload.size() ) {
stream >> mailList;
return TRUE;
@@ -170,14 +170,14 @@ bool MailListDrag::decode( QByteArray& payload, MailList& mailList )
return FALSE;
}
-bool MailListDrag::decode( QDropEvent* e, QByteArray &a )
+bool MailListDrag::decode( TQDropEvent* e, TQByteArray &a )
{
MailList mailList;
if (decode( e, mailList )) {
MailList::iterator it;
- QBuffer buffer( a );
+ TQBuffer buffer( a );
buffer.open( IO_WriteOnly );
- QDataStream stream( &buffer );
+ TQDataStream stream( &buffer );
for (it = mailList.begin(); it != mailList.end(); ++it) {
MailSummary mailDrag = *it;
stream << mailDrag.serialNumber();
@@ -190,10 +190,10 @@ bool MailListDrag::decode( QDropEvent* e, QByteArray &a )
void MailListDrag::setMailList( MailList mailList )
{
- QByteArray array;
- QBuffer buffer( array );
+ TQByteArray array;
+ TQBuffer buffer( array );
buffer.open( IO_WriteOnly);
- QDataStream stream( array, IO_WriteOnly );
+ TQDataStream stream( array, IO_WriteOnly );
stream << mailList;
buffer.close();
setEncodedData( array );
@@ -205,42 +205,42 @@ const char *MailListDrag::format(int i) const
if (i == 0) {
return "message/rfc822";
} else {
- return QStoredDrag::format(i - 1);
+ return TQStoredDrag::format(i - 1);
}
}
- return QStoredDrag::format(i);
+ return TQStoredDrag::format(i);
}
bool MailListDrag::provides(const char *mimeType) const
{
- if (_src && QCString(mimeType) == "message/rfc822") {
+ if (_src && TQCString(mimeType) == "message/rfc822") {
return true;
}
- return QStoredDrag::provides(mimeType);
+ return TQStoredDrag::provides(mimeType);
}
-QByteArray MailListDrag::encodedData(const char *mimeType) const
+TQByteArray MailListDrag::encodedData(const char *mimeType) const
{
- if (QCString(mimeType) != "message/rfc822") {
- return QStoredDrag::encodedData(mimeType);
+ if (TQCString(mimeType) != "message/rfc822") {
+ return TQStoredDrag::encodedData(mimeType);
}
- QByteArray rc;
+ TQByteArray rc;
if (_src) {
MailList ml;
- QByteArray enc = QStoredDrag::encodedData(format());
+ TQByteArray enc = TQStoredDrag::encodedData(format());
decode(enc, ml);
- KProgressDialog *dlg = new KProgressDialog(0, 0, QString::null, i18n("Retrieving and storing messages..."), true);
+ KProgressDialog *dlg = new KProgressDialog(0, 0, TQString::null, i18n("Retrieving and storing messages..."), true);
dlg->setAllowCancel(true);
dlg->progressBar()->setTotalSteps(ml.count());
int i = 0;
dlg->progressBar()->setValue(i);
dlg->show();
- QTextStream *ts = new QTextStream(rc, IO_WriteOnly);
+ TQTextStream *ts = new TQTextStream(rc, IO_WriteOnly);
for (MailList::ConstIterator it = ml.begin(); it != ml.end(); ++it) {
MailSummary mailDrag = *it;
*ts << _src->text(mailDrag.serialNumber());
@@ -248,7 +248,7 @@ QByteArray MailListDrag::encodedData(const char *mimeType) const
break;
}
dlg->progressBar()->setValue(++i);
- kapp->eventLoop()->processEvents(QEventLoop::ExcludeSocketNotifiers);
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeSocketNotifiers);
}
delete dlg;