summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp47
1 files changed, 26 insertions, 21 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 75a75b9..f453be5 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -4,6 +4,11 @@
#define protected public
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3CString>
+#include <QPixmap>
+#include <Q3PopupMenu>
#undef protected
#include "koprefsdialog.h"
#include <kapplication.h>
@@ -27,7 +32,7 @@
#include <qmessagebox.h>
#include <qtimer.h>
#include <qcursor.h>
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
#include <qregexp.h>
#include <qpe/global.h>
@@ -63,12 +68,12 @@ OpieMail::~OpieMail()
delete tb;
}
-void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
+void OpieMail::appMessage(const Q3CString &msg, const QByteArray &data)
{
}
#include <stdlib.h>
-void OpieMail::message(const QCString &msg, const QByteArray &data)
+void OpieMail::message(const Q3CString &msg, const QByteArray &data)
{
// copied from old mail2
static int ii = 0;
@@ -83,7 +88,7 @@ void OpieMail::message(const QCString &msg, const QByteArray &data)
if (msg == "writeMail(QString,QString)")
{
//qDebug("writeMail(QString,QString) ");
- QDataStream stream(data,IO_ReadOnly);
+ QDataStream stream(data,QIODevice::ReadOnly);
stream >> mPendingName >> mPendingEmail;
// removing the whitespaces at beginning and end is needed!
QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
@@ -100,7 +105,7 @@ void OpieMail::message(const QCString &msg, const QByteArray &data)
else if (msg == "newMail(QString)")
{
//qDebug(" newMail(QString)");
- QDataStream stream(data,IO_ReadOnly);
+ QDataStream stream(data,QIODevice::ReadOnly);
stream >> mPendingName;
// the format is
// NAME <EMAIL>:SUBJECT
@@ -279,7 +284,7 @@ void OpieMail::slotEditAccounts()
void OpieMail::replyMail()
{
- QListViewItem*item = mailView->currentItem();
+ Q3ListViewItem*item = mailView->currentItem();
if (!item) return;
RecMailP mail = ((MailListViewItem*)item)->data();
RecBodyP body = folderView->fetchBody(mail);
@@ -331,7 +336,7 @@ void OpieMail::closeViewMail(ViewMail * vm)
void OpieMail::slotDownloadMail( )
{
- QListViewItem*item = mailView->currentItem();
+ Q3ListViewItem*item = mailView->currentItem();
if (!item ) {
Global::statusMessage("Error: No item slected!");
return;
@@ -372,7 +377,7 @@ void OpieMail::slotDownloadMail( )
void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
{
- QListViewItem*item = mailView->currentItem();
+ Q3ListViewItem*item = mailView->currentItem();
if (!item ) {
closeViewMail(vm);
return;
@@ -392,7 +397,7 @@ void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
}
void OpieMail::displayNextMail(ViewMail * vm)
{
- QListViewItem*item = mailView->currentItem();
+ Q3ListViewItem*item = mailView->currentItem();
if (!item) return;
( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
item = item->itemBelow();
@@ -408,7 +413,7 @@ void OpieMail::displayNextMail(ViewMail * vm)
}
void OpieMail::displayMail()
{
- QListViewItem*item = mailView->currentItem();
+ Q3ListViewItem*item = mailView->currentItem();
if (!item) return;
RecMailP mail = ((MailListViewItem*)item)->data();
RecBodyP body = folderView->fetchBody(mail);
@@ -432,14 +437,14 @@ void OpieMail::displayMail()
}
else
{
- QListViewItem*item = mailView->currentItem();
+ Q3ListViewItem*item = mailView->currentItem();
if (item)
( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
}
}
void OpieMail::slotGetAllMail()
{
- QListViewItem * item = folderView->firstChild();
+ Q3ListViewItem * item = folderView->firstChild();
while ( item ){
((AccountViewItem *)item)->contextMenuSelected( 101 );
item = item->nextSibling ();
@@ -447,7 +452,7 @@ void OpieMail::slotGetAllMail()
}
void OpieMail::slotGetMail()
{
- QListViewItem * item = folderView->currentItem();
+ Q3ListViewItem * item = folderView->currentItem();
if ( ! item ) return;
((AccountViewItem *)item)->contextMenuSelected( 101 );
}
@@ -464,7 +469,7 @@ void OpieMail::slotDeleteMail()
void OpieMail::slotDeleteAllMail()
{
- QValueList<RecMailP> t;
+ Q3ValueList<RecMailP> t;
if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
@@ -492,21 +497,21 @@ void OpieMail::clearSelection()
}
void OpieMail::selectAll()
{
- QListViewItem* item = mailView->firstChild ();
+ Q3ListViewItem* item = mailView->firstChild ();
while ( item ) {
mailView->setSelected ( item, true );
item = item->nextSibling();
}
}
-void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
+void OpieMail::mailHold(int button, Q3ListViewItem *item,const QPoint&,int )
{
if (!mailView->currentItem()) return;
MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
/* just the RIGHT button - or hold on pda */
if (button!=2) {return;}
if (!item) return;
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
if (mailtype==MAILLIB::A_NNTP) {
@@ -553,12 +558,12 @@ void OpieMail::slotShowFolders( bool show )
}
}
-void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
+void OpieMail::refreshMailView(const Q3ValueList<RecMailP>&list)
{
MailListViewItem*item = 0;
mailView->clear();
- QValueList<RecMailP>::ConstIterator it;
+ Q3ValueList<RecMailP>::ConstIterator it;
for (it = list.begin(); it != list.end();++it)
{
item = new MailListViewItem(mailView,item);
@@ -568,7 +573,7 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
mailView->setSorting ( 4, false );
}
-void OpieMail::mailLeftClicked( QListViewItem *item )
+void OpieMail::mailLeftClicked( Q3ListViewItem *item )
{
mailView->clearSelection();
/* just LEFT button - or tap with stylus on pda */
@@ -614,7 +619,7 @@ void OpieMail::slotMoveCopyAllMail()
{
if (!mailView->currentItem()) return;
- QValueList<RecMailP> t;
+ Q3ValueList<RecMailP> t;
// if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();