summaryrefslogtreecommitdiffabout
path: root/kmicromail/accountitem.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/accountitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountitem.cpp128
1 files changed, 65 insertions, 63 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp
index 985a762..9b1ea2f 100644
--- a/kmicromail/accountitem.cpp
+++ b/kmicromail/accountitem.cpp
@@ -12,8 +12,10 @@
//#include <qpe/qpeapplication.h>
/* QT */
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qmessagebox.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <kiconloader.h>
#include <klocale.h>
@@ -54,7 +56,7 @@ AbstractMail *POP3viewItem::getWrapper()
return wrapper;
}
-void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & )
+void POP3viewItem::refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > & )
{
refresh();
}
@@ -62,16 +64,16 @@ void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & )
void POP3viewItem::refresh()
{
if (account->getOffline()) return;
- QValueList<FolderP> *folders = wrapper->listFolders();
- QListViewItem *child = firstChild();
+ Q3ValueList<FolderP> *folders = wrapper->listFolders();
+ Q3ListViewItem *child = firstChild();
while ( child )
{
- QListViewItem *tmp = child;
+ Q3ListViewItem *tmp = child;
child = child->nextSibling();
delete tmp;
}
- QValueList<FolderP>::ConstIterator it;
- QListViewItem*item = 0;
+ Q3ValueList<FolderP>::ConstIterator it;
+ Q3ListViewItem*item = 0;
for ( it = folders->begin(); it!=folders->end(); ++it)
{
item = new POP3folderItem( (*it), this , item );
@@ -86,9 +88,9 @@ RECBODYP POP3viewItem::fetchBody( const RecMailP &mail )
return wrapper->fetchBody( mail );
}
-QPopupMenu * POP3viewItem::getContextMenu()
+Q3PopupMenu * POP3viewItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
if (!account->getOffline())
@@ -108,10 +110,10 @@ QPopupMenu * POP3viewItem::getContextMenu()
void POP3viewItem::disconnect()
{
- QListViewItem *child = firstChild();
+ Q3ListViewItem *child = firstChild();
while ( child )
{
- QListViewItem *tmp = child;
+ Q3ListViewItem *tmp = child;
child = child->nextSibling();
delete tmp;
}
@@ -157,7 +159,7 @@ void POP3viewItem::contextMenuSelected(int which)
POP3folderItem::~POP3folderItem()
{}
-POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , QListViewItem*after )
+POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , Q3ListViewItem*after )
: AccountViewItem(folderInit,parent,after )
{
pop3 = parent;
@@ -172,7 +174,7 @@ POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent ,
setText( 0, folder->getDisplayName() );
}
-void POP3folderItem::refresh(QValueList<RecMailP>&target)
+void POP3folderItem::refresh(Q3ValueList<RecMailP>&target)
{
if (folder->may_select())
pop3->getWrapper()->listMessages( folder->getName(),target );
@@ -183,9 +185,9 @@ RECBODYP POP3folderItem::fetchBody(const RecMailP&aMail)
return pop3->getWrapper()->fetchBody(aMail);
}
-QPopupMenu * POP3folderItem::getContextMenu()
+Q3PopupMenu * POP3folderItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
@@ -261,7 +263,7 @@ AbstractMail *NNTPviewItem::getWrapper()
return wrapper;
}
-void NNTPviewItem::refresh( QValueList<RecMailP> & )
+void NNTPviewItem::refresh( Q3ValueList<RecMailP> & )
{
refresh();
}
@@ -269,17 +271,17 @@ void NNTPviewItem::refresh( QValueList<RecMailP> & )
void NNTPviewItem::refresh()
{
if (account->getOffline()) return;
- QValueList<FolderP> *folders = wrapper->listFolders();
+ Q3ValueList<FolderP> *folders = wrapper->listFolders();
- QListViewItem *child = firstChild();
+ Q3ListViewItem *child = firstChild();
while ( child )
{
- QListViewItem *tmp = child;
+ Q3ListViewItem *tmp = child;
child = child->nextSibling();
delete tmp;
}
- QValueList<FolderP>::ConstIterator it;
- QListViewItem*item = 0;
+ Q3ValueList<FolderP>::ConstIterator it;
+ Q3ListViewItem*item = 0;
for ( it = folders->begin(); it!=folders->end(); ++it)
{
item = new NNTPfolderItem( (*it), this , item );
@@ -294,9 +296,9 @@ RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail )
return wrapper->fetchBody( mail );
}
-QPopupMenu * NNTPviewItem::getContextMenu()
+Q3PopupMenu * NNTPviewItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
if (!account->getOffline())
@@ -326,10 +328,10 @@ void NNTPviewItem::subscribeGroups()
void NNTPviewItem::disconnect()
{
- QListViewItem *child = firstChild();
+ Q3ListViewItem *child = firstChild();
while ( child )
{
- QListViewItem *tmp = child;
+ Q3ListViewItem *tmp = child;
child = child->nextSibling();
delete tmp;
}
@@ -368,7 +370,7 @@ void NNTPviewItem::contextMenuSelected(int which)
NNTPfolderItem::~NNTPfolderItem()
{}
-NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , QListViewItem*after )
+NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , Q3ListViewItem*after )
: AccountViewItem( folderInit, parent,after )
{
nntp = parent;
@@ -383,7 +385,7 @@ NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent
setText( 0, folder->getDisplayName() );
}
-void NNTPfolderItem::refresh(QValueList<RecMailP>&target)
+void NNTPfolderItem::refresh(Q3ValueList<RecMailP>&target)
{
if (folder->may_select())
nntp->getWrapper()->listMessages( folder->getName(),target );
@@ -394,9 +396,9 @@ RECBODYP NNTPfolderItem::fetchBody(const RecMailP&aMail)
return nntp->getWrapper()->fetchBody(aMail);
}
-QPopupMenu * NNTPfolderItem::getContextMenu()
+Q3PopupMenu * NNTPfolderItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
m->insertItem(i18n("Refresh header list"),0);
@@ -453,7 +455,7 @@ AbstractMail *IMAPviewItem::getWrapper()
return wrapper;
}
-void IMAPviewItem::refresh(QValueList<RecMailP>&)
+void IMAPviewItem::refresh(Q3ValueList<RecMailP>&)
{
refreshFolders(false);
}
@@ -470,11 +472,11 @@ void IMAPviewItem::refreshFolders(bool force)
removeChilds();
currentFolders.clear();
- QValueList<FolderP> * folders = wrapper->listFolders();
+ Q3ValueList<FolderP> * folders = wrapper->listFolders();
- QValueList<FolderP>::Iterator it;
- QListViewItem*item = 0;
- QListViewItem*titem = 0;
+ Q3ValueList<FolderP>::Iterator it;
+ Q3ListViewItem*item = 0;
+ Q3ListViewItem*titem = 0;
QString fname,del,search;
int pos;
@@ -513,9 +515,9 @@ void IMAPviewItem::refreshFolders(bool force)
delete folders;
}
-QPopupMenu * IMAPviewItem::getContextMenu()
+Q3PopupMenu * IMAPviewItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
if (!account->getOffline())
@@ -615,7 +617,7 @@ bool IMAPviewItem::offline()
return account->getOffline();
}
-IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , QListViewItem*after )
+IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , Q3ListViewItem*after )
: AccountViewItem( folderInit, parent , after )
{
imap = parent;
@@ -630,7 +632,7 @@ IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent
setText( 0, folder->getDisplayName() );
}
-IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master )
+IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master )
: AccountViewItem(folderInit, parent,after )
{
imap = master;
@@ -653,7 +655,7 @@ const QString& IMAPfolderItem::Delemiter()const
return folder->Separator();
}
-void IMAPfolderItem::refresh(QValueList<RecMailP>&target)
+void IMAPfolderItem::refresh(Q3ValueList<RecMailP>&target)
{
if (folder->may_select())
{
@@ -670,9 +672,9 @@ RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail)
return imap->getWrapper()->fetchBody(aMail);
}
-QPopupMenu * IMAPfolderItem::getContextMenu()
+Q3PopupMenu * IMAPfolderItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
if (folder->may_select())
@@ -721,7 +723,7 @@ void IMAPfolderItem::deleteFolder()
{
if (imap->getWrapper()->deleteMbox(folder))
{
- QListView*v=listView();
+ Q3ListView*v=listView();
IMAPviewItem * box = imap;
/* be carefull - after that this object is destroyd so don't use
* any member of it after that call!!*/
@@ -800,7 +802,7 @@ AbstractMail *MHviewItem::getWrapper()
return wrapper;
}
-void MHviewItem::refresh( QValueList<RecMailP> & target)
+void MHviewItem::refresh( Q3ValueList<RecMailP> & target)
{
refresh(false);
getWrapper()->listMessages( "",target );
@@ -811,8 +813,8 @@ void MHviewItem::refresh(bool force)
if (childCount()>0 && force==false) return;
removeChilds();
currentFolders.clear();
- QValueList<FolderP> *folders = wrapper->listFolders();
- QValueList<FolderP>::ConstIterator it;
+ Q3ValueList<FolderP> *folders = wrapper->listFolders();
+ Q3ValueList<FolderP>::ConstIterator it;
MHfolderItem*item = 0;
MHfolderItem*pmaster = 0;
QString fname = "";
@@ -857,9 +859,9 @@ RECBODYP MHviewItem::fetchBody( const RecMailP &mail )
return wrapper->fetchBody( mail );
}
-QPopupMenu * MHviewItem::getContextMenu()
+Q3PopupMenu * MHviewItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
m->insertItem(i18n("Refresh folder list"),0);
@@ -920,14 +922,14 @@ void MHviewItem::contextMenuSelected(int which)
MHfolderItem::~MHfolderItem()
{}
-MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after )
+MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , Q3ListViewItem*after )
: AccountViewItem(folderInit, parent,after )
{
mbox = parent;
initName();
}
-MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master)
+MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master)
: AccountViewItem(folderInit, parent,after )
{
folder = folderInit;
@@ -967,7 +969,7 @@ const FolderP&MHfolderItem::getFolder()const
return folder;
}
-void MHfolderItem::refresh(QValueList<RecMailP>&target)
+void MHfolderItem::refresh(Q3ValueList<RecMailP>&target)
{
if (folder->may_select())
mbox->getWrapper()->listMessages( folder->getName(),target );
@@ -989,7 +991,7 @@ void MHfolderItem::deleteFolder()
{
if (mbox->getWrapper()->deleteMbox(folder))
{
- QListView*v=listView();
+ Q3ListView*v=listView();
MHviewItem * box = mbox;
/* be carefull - after that this object is destroyd so don't use
* any member of it after that call!!*/
@@ -1002,9 +1004,9 @@ void MHfolderItem::deleteFolder()
}
}
-QPopupMenu * MHfolderItem::getContextMenu()
+Q3PopupMenu * MHfolderItem::getContextMenu()
{
- QPopupMenu *m = new QPopupMenu(0);
+ Q3PopupMenu *m = new Q3PopupMenu(0);
if (m)
{
m->insertItem(i18n("Move/Copie all mails"),2);
@@ -1031,7 +1033,7 @@ void MHfolderItem::createFolder()
QString ndir = ndirdlg.Newdir();
if (mbox->getWrapper()->createMbox(ndir,folder))
{
- QListView*v=listView();
+ Q3ListView*v=listView();
MHviewItem * box = mbox;
/* be carefull - after that this object is destroyd so don't use
* any member of it after that call!!*/
@@ -1078,26 +1080,26 @@ bool MHfolderItem::isDraftfolder()
const QString AccountViewItem::contextName="AccountViewItem";
AccountViewItem::AccountViewItem( AccountView *parent )
- : QListViewItem( parent )
+ : Q3ListViewItem( parent )
{
init();
m_Backlink = parent;
}
-AccountViewItem::AccountViewItem( QListViewItem *parent)
- : QListViewItem( parent),folder(0)
+AccountViewItem::AccountViewItem( Q3ListViewItem *parent)
+ : Q3ListViewItem( parent),folder(0)
{
init();
}
-AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after )
- :QListViewItem( parent,after ),folder(0)
+AccountViewItem::AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after )
+ :Q3ListViewItem( parent,after ),folder(0)
{
init();
}
-AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after )
- :QListViewItem( parent,after ),folder(folderInit)
+AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after )
+ :Q3ListViewItem( parent,after ),folder(folderInit)
{
init();
}
@@ -1140,10 +1142,10 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder)
void AccountViewItem::removeChilds()
{
- QListViewItem *child = firstChild();
+ Q3ListViewItem *child = firstChild();
while ( child )
{
- QListViewItem *tmp = child;
+ Q3ListViewItem *tmp = child;
child = child->nextSibling();
delete tmp;
}