author | harlekin <harlekin> | 2003-12-09 01:05:53 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-09 01:05:53 (UTC) |
commit | 6142ad15ac50090b95bb5d80116c1750ffc515de (patch) (unidiff) | |
tree | 177b72b44446824d6faa13e140ab95a25c931b81 /noncore/net/mail/viewmailbase.cpp | |
parent | e372949ac776a7d986cac91b2ff1a5022040d43b (diff) | |
download | opie-6142ad15ac50090b95bb5d80116c1750ffc515de.zip opie-6142ad15ac50090b95bb5d80116c1750ffc515de.tar.gz opie-6142ad15ac50090b95bb5d80116c1750ffc515de.tar.bz2 |
beginning of a view mail part
Diffstat (limited to 'noncore/net/mail/viewmailbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/viewmailbase.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp new file mode 100644 index 0000000..197a665 --- a/dev/null +++ b/noncore/net/mail/viewmailbase.cpp | |||
@@ -0,0 +1,75 @@ | |||
1 | #include <qtextbrowser.h> | ||
2 | #include <qlistview.h> | ||
3 | #include <qaction.h> | ||
4 | #include <qlabel.h> | ||
5 | #include <qvbox.h> | ||
6 | #include <qpopupmenu.h> | ||
7 | |||
8 | #include <qpe/qpetoolbar.h> | ||
9 | #include <qmenubar.h> | ||
10 | #include <qpe/resource.h> | ||
11 | |||
12 | #include "viewmailbase.h" | ||
13 | //#include "opendiag.h" | ||
14 | |||
15 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) | ||
16 | : QMainWindow(parent, name, fl) | ||
17 | { | ||
18 | setCaption(tr("E-Mail by %1")); | ||
19 | setToolBarsMovable(false); | ||
20 | |||
21 | toolbar = new QToolBar(this); | ||
22 | menubar = new QMenuBar( toolbar ); | ||
23 | mailmenu = new QPopupMenu( menubar ); | ||
24 | menubar->insertItem( tr( "Mail" ), mailmenu ); | ||
25 | |||
26 | toolbar->setHorizontalStretchable(true); | ||
27 | addToolBar(toolbar); | ||
28 | |||
29 | QLabel *spacer = new QLabel(toolbar); | ||
30 | spacer->setBackgroundMode(QWidget::PaletteButton); | ||
31 | toolbar->setStretchableWidget(spacer); | ||
32 | |||
33 | reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); | ||
34 | reply->addTo(toolbar); | ||
35 | reply->addTo(mailmenu); | ||
36 | |||
37 | forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); | ||
38 | forward->addTo(toolbar); | ||
39 | forward->addTo(mailmenu); | ||
40 | |||
41 | attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); | ||
42 | attachbutton->addTo(toolbar); | ||
43 | attachbutton->addTo(mailmenu); | ||
44 | connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); | ||
45 | |||
46 | deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); | ||
47 | deleteMail->addTo(toolbar); | ||
48 | deleteMail->addTo(mailmenu); | ||
49 | |||
50 | QVBox *view = new QVBox(this); | ||
51 | setCentralWidget(view); | ||
52 | |||
53 | attachments = new QListView(view); | ||
54 | attachments->setMinimumHeight(90); | ||
55 | attachments->setMaximumHeight(90); | ||
56 | attachments->setAllColumnsShowFocus(true); | ||
57 | attachments->addColumn("Mime Type", 100); | ||
58 | attachments->addColumn("Filename", 100); | ||
59 | attachments->addColumn("Description", 100); | ||
60 | attachments->hide(); | ||
61 | |||
62 | browser = new QTextBrowser(view); | ||
63 | |||
64 | //openDiag = new OpenDiag(view); | ||
65 | //openDiag->hide(); | ||
66 | |||
67 | } | ||
68 | |||
69 | void ViewMailBase::slotChangeAttachview(bool state) | ||
70 | { | ||
71 | if (state) attachments->show(); | ||
72 | else attachments->hide(); | ||
73 | } | ||
74 | |||
75 | |||