author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/viewmail.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kmicromail/viewmail.cpp | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 685b4e4..c9dedb0 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp | |||
@@ -25,18 +25,21 @@ | |||
25 | 25 | ||
26 | /* QT */ | 26 | /* QT */ |
27 | #include <qtextbrowser.h> | 27 | #include <q3textbrowser.h> |
28 | #include <qmessagebox.h> | 28 | #include <qmessagebox.h> |
29 | #include <qtextstream.h> | 29 | #include <q3textstream.h> |
30 | #include <qaction.h> | 30 | #include <qaction.h> |
31 | #include <qpopupmenu.h> | 31 | #include <q3popupmenu.h> |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qlayout.h> | 33 | #include <qlayout.h> |
34 | //Added by qt3to4: | ||
35 | #include <Q3ValueList> | ||
36 | #include <Q3VBoxLayout> | ||
34 | 37 | ||
35 | //using namespace Opie::Ui; | 38 | //using namespace Opie::Ui; |
36 | //using namespace Opie::Core; | 39 | //using namespace Opie::Core; |
37 | 40 | ||
38 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 41 | AttachItem::AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
39 | const QString&fsize,int num,const QValueList<int>&path) | 42 | const QString&fsize,int num,const Q3ValueList<int>&path) |
40 | : QListViewItem(parent,after),_partNum(num) | 43 | : Q3ListViewItem(parent,after),_partNum(num) |
41 | { | 44 | { |
42 | _path=path; | 45 | _path=path; |
@@ -47,7 +50,7 @@ AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mi | |||
47 | } | 50 | } |
48 | 51 | ||
49 | AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 52 | AttachItem::AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
50 | const QString&fsize,int num,const QValueList<int>&path) | 53 | const QString&fsize,int num,const Q3ValueList<int>&path) |
51 | : QListViewItem(parent,after),_partNum(num) | 54 | : Q3ListViewItem(parent,after),_partNum(num) |
52 | { | 55 | { |
53 | _path=path; | 56 | _path=path; |
@@ -58,5 +61,5 @@ AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QStrin | |||
58 | } | 61 | } |
59 | 62 | ||
60 | bool AttachItem::isParentof(const QValueList<int>&path) | 63 | bool AttachItem::isParentof(const Q3ValueList<int>&path) |
61 | { | 64 | { |
62 | /* if not set, then no parent */ | 65 | /* if not set, then no parent */ |
@@ -71,7 +74,7 @@ bool AttachItem::isParentof(const QValueList<int>&path) | |||
71 | } | 74 | } |
72 | 75 | ||
73 | AttachItem* ViewMail::searchParent(const QValueList<int>&path) | 76 | AttachItem* ViewMail::searchParent(const Q3ValueList<int>&path) |
74 | { | 77 | { |
75 | QListViewItemIterator it( attachments ); | 78 | Q3ListViewItemIterator it( attachments ); |
76 | for ( ; it.current(); ++it ) | 79 | for ( ; it.current(); ++it ) |
77 | { | 80 | { |
@@ -155,5 +158,5 @@ void ViewMail::setBody(const RecBodyP&body ) | |||
155 | QTextOStream o(&fsize); | 158 | QTextOStream o(&fsize); |
156 | if (w>0) o.precision(2); else o.precision(0); | 159 | if (w>0) o.precision(2); else o.precision(0); |
157 | o.setf(QTextStream::fixed); | 160 | o.setf(Q3TextStream::fixed); |
158 | o << s << " " << q << "Byte"; | 161 | o << s << " " << q << "Byte"; |
159 | } | 162 | } |
@@ -196,5 +199,5 @@ void ViewMail::setBody(const RecBodyP&body ) | |||
196 | QTextOStream o(&fsize); | 199 | QTextOStream o(&fsize); |
197 | if (w>0) o.precision(2); else o.precision(0); | 200 | if (w>0) o.precision(2); else o.precision(0); |
198 | o.setf(QTextStream::fixed); | 201 | o.setf(Q3TextStream::fixed); |
199 | o << s << " " << q << "Byte"; | 202 | o << s << " " << q << "Byte"; |
200 | desc = body->Parts()[i]->Description(); | 203 | desc = body->Parts()[i]->Description(); |
@@ -240,5 +243,5 @@ void ViewMail::slotShowHtml( bool state ) | |||
240 | } | 243 | } |
241 | 244 | ||
242 | void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) | 245 | void ViewMail::slotItemClicked( Q3ListViewItem * item , const QPoint & point, int ) |
243 | { | 246 | { |
244 | if (!item ) | 247 | if (!item ) |
@@ -250,5 +253,5 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int | |||
250 | return; | 253 | return; |
251 | } | 254 | } |
252 | QPopupMenu *menu = new QPopupMenu(); | 255 | Q3PopupMenu *menu = new Q3PopupMenu(); |
253 | int ret=0; | 256 | int ret=0; |
254 | 257 | ||
@@ -279,5 +282,5 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int | |||
279 | { | 282 | { |
280 | QFile output(str); | 283 | QFile output(str); |
281 | output.open(IO_WriteOnly); | 284 | output.open(QIODevice::WriteOnly); |
282 | output.writeBlock(content->Content(),content->Length()); | 285 | output.writeBlock(content->Content(),content->Length()); |
283 | output.close(); | 286 | output.close(); |
@@ -298,5 +301,5 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int | |||
298 | if (content) { | 301 | if (content) { |
299 | QFile output(tmpfile); | 302 | QFile output(tmpfile); |
300 | output.open(IO_WriteOnly); | 303 | output.open(QIODevice::WriteOnly); |
301 | output.writeBlock(content->Content(),content->Length()); | 304 | output.writeBlock(content->Content(),content->Length()); |
302 | output.close(); | 305 | output.close(); |
@@ -353,5 +356,5 @@ void ViewMail::slotNextMail() | |||
353 | } | 356 | } |
354 | 357 | ||
355 | ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | 358 | ViewMail::ViewMail( QWidget *parent, const char *name, Qt::WFlags fl) |
356 | : ViewMailBase(parent, name, fl), _inLoop(false) | 359 | : ViewMailBase(parent, name, fl), _inLoop(false) |
357 | { | 360 | { |
@@ -370,5 +373,5 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | |||
370 | 373 | ||
371 | attachments->setEnabled(m_gotBody); | 374 | attachments->setEnabled(m_gotBody); |
372 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); | 375 | connect( attachments, SIGNAL( clicked(Q3ListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(Q3ListViewItem*,const QPoint&, int) ) ); |
373 | 376 | ||
374 | attachments->setSorting(-1); | 377 | attachments->setSorting(-1); |
@@ -558,8 +561,8 @@ void ViewMail::slotDeleteMail( ) | |||
558 | } | 561 | } |
559 | 562 | ||
560 | MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) | 563 | MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, Qt::WFlags f) |
561 | : QDialog(parent,name,modal) | 564 | : QDialog(parent,name,modal) |
562 | { | 565 | { |
563 | QVBoxLayout*dlglayout = new QVBoxLayout(this); | 566 | Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this); |
564 | dlglayout->setSpacing(2); | 567 | dlglayout->setSpacing(2); |
565 | dlglayout->setMargin(1); | 568 | dlglayout->setMargin(1); |