-rw-r--r-- | kmicromail/viewmail.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 0b4c322..f1e0225 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -1,62 +1,65 @@ // CHANGED 2004-08-06 Lutz Rogowski + + + +#include <kfiledialog.h> +#include "koprefs.h" +#include <klocale.h> +#include <kglobal.h> +#include <kapplication.h> + +#ifdef MINIKDE_KDIALOG_H +#undef MINIKDE_KDIALOG_H +#endif + #include "composemail.h" #include "viewmail.h" #include <libmailwrapper/settings.h> #include <libmailwrapper/abstractmail.h> #include <libmailwrapper/mailtypes.h> -#include <kapplication.h> - -/* OPIE */ -//#include <opie2/odebug.h> -//#include <opie2/ofiledialog.h> -//#include <opie2/oimagescrollview.h> -#include <kfiledialog.h> -#include <kdialog.h> +#include <qdialog.h> #include <qpe/qpeapplication.h> /* QT */ #include <qtextbrowser.h> #include <qmessagebox.h> #include <qtextstream.h> #include <qaction.h> #include <qpopupmenu.h> #include <qfile.h> #include <qlayout.h> -#include "koprefs.h" -#include <klocale.h> -#include <kglobal.h> //using namespace Opie::Ui; //using namespace Opie::Core; AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, const QString&fsize,int num,const QValueList<int>&path) : QListViewItem(parent,after),_partNum(num) { _path=path; setText(0, mime); setText(1, desc); setText(2, file); setText(3, fsize); } AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, const QString&fsize,int num,const QValueList<int>&path) : QListViewItem(parent,after),_partNum(num) { _path=path; setText(0, mime); setText(1, desc); setText(2, file); setText(3, fsize); } bool AttachItem::isParentof(const QValueList<int>&path) { /* if not set, then no parent */ if (path.count()==0||_path.count()==0) return false; /* the parent must have one digit less then a child */ if (path.count()!=_path.count()+1) return false; @@ -484,50 +487,50 @@ void ViewMail::slotForward() if (!m_mail[0].isNull()) ftext += QString("From: %1\n") .arg( m_mail[0] ); if (!m_mail[1].isNull()) ftext += QString("Subject: %1\n") .arg( m_mail[1] ); ftext += QString("\n%1\n") .arg( m_mail[2]); ftext += QString("----- End forwarded message -----\n"); Settings *settings = new Settings(); ComposeMail composer( settings ,this, 0, true); composer.setSubject( "Fwd: " + m_mail[1] ); composer.setMessage( ftext ); if ( QDialog::Accepted == KApplication::execDialog( &composer )) { } } void ViewMail::slotDeleteMail( ) { if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { m_recMail->Wrapper()->deleteMail( m_recMail ); hide(); deleted = true; } } MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) - : KDialog(parent,name,modal) + : QDialog(parent,name,modal) { QVBoxLayout*dlglayout = new QVBoxLayout(this); dlglayout->setSpacing(2); dlglayout->setMargin(1); //m_imageview = new Opie::MM::OImageScrollView(this); //dlglayout->addWidget(m_imageview); } MailImageDlg::~MailImageDlg() { } void MailImageDlg::setName(const QString&fname) { qDebug("viewmail.cpp: MailImageDlg::setName Pending"); // m_imageview->setImage(fname); } |