summaryrefslogtreecommitdiffabout
path: root/kmicromail/accountview.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountview.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index d1d4f7e..eea1f65 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -8,57 +8,59 @@
#include <libmailwrapper/mailtypes.h>
#include <libmailwrapper/abstractmail.h>
/* OPIE */
#include <qpe/qpeapplication.h>
/* QT */
#include <qmessagebox.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qcheckbox.h>
#include <qtimer.h>
#include <qspinbox.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <klocale.h>
#include <kmessagebox.h>
using namespace Opie::Core;
-AccountView::AccountView( QWidget *parent, const char *name, WFlags flags )
- : QListView( parent, name, flags )
+AccountView::AccountView( QWidget *parent, const char *name, Qt::WFlags flags )
+ : Q3ListView( parent, name, flags )
{
//connect( this, SIGNAL( selectionChanged(QListViewItem*) ),
// SLOT( refresh(QListViewItem*) ) );
- connect( this, SIGNAL( clicked(QListViewItem*) ),
- SLOT( refresh(QListViewItem*) ) );
- connect( this, SIGNAL( returnPressed(QListViewItem*) ),
- SLOT( refresh(QListViewItem*) ) );
- connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
- SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) );
+ connect( this, SIGNAL( clicked(Q3ListViewItem*) ),
+ SLOT( refresh(Q3ListViewItem*) ) );
+ connect( this, SIGNAL( returnPressed(Q3ListViewItem*) ),
+ SLOT( refresh(Q3ListViewItem*) ) );
+ connect( this, SIGNAL( mouseButtonPressed(int,Q3ListViewItem*,const QPoint&,int) ),this,
+ SLOT( slotHold(int,Q3ListViewItem*,const QPoint&,int) ) );
setSorting(0);
}
AccountView::~AccountView()
{
imapAccounts.clear();
mhAccounts.clear();
}
void AccountView::slotContextMenu(int id)
{
AccountViewItem *view = static_cast<AccountViewItem *>(currentItem());
if (!view) return;
view->contextMenuSelected(id);
}
-void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int)
+void AccountView::slotHold(int button, Q3ListViewItem * item,const QPoint&,int)
{
if (button==1) {return;}
if (!item) return;
AccountViewItem *view = static_cast<AccountViewItem *>(item);
- QPopupMenu*m = view->getContextMenu();
+ Q3PopupMenu*m = view->getContextMenu();
if (!m) return;
connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int)));
m->setFocus();
m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
delete m;
}
void AccountView::populate( QList<Account> list )
@@ -88,17 +90,17 @@ void AccountView::populate( QList<Account> list )
{
NNTPaccount *nntp = static_cast<NNTPaccount *>(it);
/* must not be hold 'cause it isn't required */
(void) new NNTPviewItem( nntp, this );
}
}
}
-void AccountView::refresh(QListViewItem *item)
+void AccountView::refresh(Q3ListViewItem *item)
{
if ( item )
{
bool ask = true;
//qDebug("text -%s- ",item->text( 0 ).latin1() );
if ( item->text( 0 ) == i18n (" Local Mailfolders") )
ask = false;
else {
@@ -140,17 +142,17 @@ void AccountView::refreshOutgoing()
if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) {
refreshCurrent();
// qDebug("refresh ");
}
}
void AccountView::refreshCurrentSelected()
{
if ( !m_currentItem ) return;
- QValueList<RecMailP> headerlist;
+ Q3ValueList<RecMailP> headerlist;
AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
view->refresh(headerlist);
emit refreshMailview(headerlist);
topLevelWidget()->setCaption( i18n ( "KOpieMail/Pi" ) ) ;
}
void AccountView::refreshCurrent()
{
@@ -161,17 +163,17 @@ void AccountView::refreshCurrent()
}
void AccountView::refreshAll()
{
}
RecBodyP AccountView::fetchBody(const RecMailP&aMail)
{
- QListViewItem*item = selectedItem ();
+ Q3ListViewItem*item = selectedItem ();
if (!item) return new RecBody();
AccountViewItem *view = static_cast<AccountViewItem *>(item);
return view->fetchBody(aMail);
}
void AccountView::setupFolderselect(Selectstore*sels)
{