summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-01-08 20:01:50 (UTC)
committer harlekin <harlekin>2004-01-08 20:01:50 (UTC)
commitb672058ac470a1b9534296fa8bc4b8725ab7913b (patch) (unidiff)
tree1a357fe8626431b7d93140546359bf2d48fb4151
parent94428da008bea0aaff6db79d7963a2107b0da336 (diff)
downloadopie-b672058ac470a1b9534296fa8bc4b8725ab7913b.zip
opie-b672058ac470a1b9534296fa8bc4b8725ab7913b.tar.gz
opie-b672058ac470a1b9534296fa8bc4b8725ab7913b.tar.bz2
prepare for context help and online help
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/editaccounts.cpp14
-rw-r--r--noncore/net/mail/opiemail.cpp12
-rw-r--r--noncore/net/mail/pop3configui.ui581
-rw-r--r--noncore/net/mail/viewmail.h2
4 files changed, 278 insertions, 331 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp
index 439b619..0c0ecaf 100644
--- a/noncore/net/mail/editaccounts.cpp
+++ b/noncore/net/mail/editaccounts.cpp
@@ -55,111 +55,111 @@ void EditAccounts::slotNewMail()
55 SelectMailType selType( selection, this, 0, true ); 55 SelectMailType selType( selection, this, 0, true );
56 selType.show(); 56 selType.show();
57 if ( QDialog::Accepted == selType.exec() ) { 57 if ( QDialog::Accepted == selType.exec() ) {
58 slotNewAccount( *selection ); 58 slotNewAccount( *selection );
59 } 59 }
60} 60}
61 61
62void EditAccounts::slotNewAccount( const QString &type ) 62void EditAccounts::slotNewAccount( const QString &type )
63{ 63{
64 if ( type.compare( "IMAP" ) == 0 ) { 64 if ( type.compare( "IMAP" ) == 0 ) {
65 qDebug( "-> config IMAP" ); 65 qDebug( "-> config IMAP" );
66 IMAPaccount *account = new IMAPaccount(); 66 IMAPaccount *account = new IMAPaccount();
67 IMAPconfig imap( account, this, 0, true ); 67 IMAPconfig imap( account, this, 0, true );
68 imap.showMaximized(); 68 imap.showMaximized();
69 if ( QDialog::Accepted == imap.exec() ) { 69 if ( QDialog::Accepted == imap.exec() ) {
70 settings->addAccount( account ); 70 settings->addAccount( account );
71 account->save(); 71 account->save();
72 slotFillLists(); 72 slotFillLists();
73 } else { 73 } else {
74 account->remove(); 74 account->remove();
75 } 75 }
76 } else if ( type.compare( "POP3" ) == 0 ) { 76 } else if ( type.compare( "POP3" ) == 0 ) {
77 qDebug( "-> config POP3" ); 77 qDebug( "-> config POP3" );
78 POP3account *account = new POP3account(); 78 POP3account *account = new POP3account();
79 POP3config pop3( account, this, 0, true ); 79 POP3config pop3( account, this, 0, true, WStyle_ContextHelp );
80 pop3.showMaximized(); 80 pop3.showMaximized();
81 if ( QDialog::Accepted == pop3.exec() ) { 81 if ( QDialog::Accepted == pop3.exec() ) {
82 settings->addAccount( account ); 82 settings->addAccount( account );
83 account->save(); 83 account->save();
84 slotFillLists(); 84 slotFillLists();
85 } else { 85 } else {
86 account->remove(); 86 account->remove();
87 } 87 }
88 } else if ( type.compare( "SMTP" ) == 0 ) { 88 } else if ( type.compare( "SMTP" ) == 0 ) {
89 qDebug( "-> config SMTP" ); 89 qDebug( "-> config SMTP" );
90 SMTPaccount *account = new SMTPaccount(); 90 SMTPaccount *account = new SMTPaccount();
91 SMTPconfig smtp( account, this, 0, true ); 91 SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp );
92 smtp.showMaximized(); 92 smtp.showMaximized();
93 if ( QDialog::Accepted == smtp.exec() ) { 93 if ( QDialog::Accepted == smtp.exec() ) {
94 settings->addAccount( account ); 94 settings->addAccount( account );
95 account->save(); 95 account->save();
96 slotFillLists(); 96 slotFillLists();
97 97
98 } else { 98 } else {
99 account->remove(); 99 account->remove();
100 } 100 }
101 } else if ( type.compare( "NNTP" ) == 0 ) { 101 } else if ( type.compare( "NNTP" ) == 0 ) {
102 qDebug( "-> config NNTP" ); 102 qDebug( "-> config NNTP" );
103 NNTPaccount *account = new NNTPaccount(); 103 NNTPaccount *account = new NNTPaccount();
104 NNTPconfig nntp( account, this, 0, true ); 104 NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp );
105 nntp.showMaximized(); 105 nntp.showMaximized();
106 if ( QDialog::Accepted == nntp.exec() ) { 106 if ( QDialog::Accepted == nntp.exec() ) {
107 settings->addAccount( account ); 107 settings->addAccount( account );
108 account->save(); 108 account->save();
109 slotFillLists(); 109 slotFillLists();
110 } else { 110 } else {
111 account->remove(); 111 account->remove();
112 } 112 }
113 } 113 }
114} 114}
115 115
116void EditAccounts::slotEditAccount( Account *account ) 116void EditAccounts::slotEditAccount( Account *account )
117{ 117{
118 if ( account->getType().compare( "IMAP" ) == 0 ) { 118 if ( account->getType().compare( "IMAP" ) == 0 ) {
119 IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); 119 IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account);
120 IMAPconfig imap( imapAcc, this, 0, true ); 120 IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp );
121 imap.showMaximized(); 121 imap.showMaximized();
122 if ( QDialog::Accepted == imap.exec() ) { 122 if ( QDialog::Accepted == imap.exec() ) {
123 slotFillLists(); 123 slotFillLists();
124 } 124 }
125 } else if ( account->getType().compare( "POP3" ) == 0 ) { 125 } else if ( account->getType().compare( "POP3" ) == 0 ) {
126 POP3account *pop3Acc = static_cast<POP3account *>(account); 126 POP3account *pop3Acc = static_cast<POP3account *>(account);
127 POP3config pop3( pop3Acc, this, 0, true ); 127 POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp );
128 pop3.showMaximized(); 128 pop3.showMaximized();
129 if ( QDialog::Accepted == pop3.exec() ) { 129 if ( QDialog::Accepted == pop3.exec() ) {
130 slotFillLists(); 130 slotFillLists();
131 } 131 }
132 } else if ( account->getType().compare( "SMTP" ) == 0 ) { 132 } else if ( account->getType().compare( "SMTP" ) == 0 ) {
133 SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); 133 SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account);
134 SMTPconfig smtp( smtpAcc, this, 0, true ); 134 SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp );
135 smtp.showMaximized(); 135 smtp.showMaximized();
136 if ( QDialog::Accepted == smtp.exec() ) { 136 if ( QDialog::Accepted == smtp.exec() ) {
137 slotFillLists(); 137 slotFillLists();
138 } 138 }
139 } else if ( account->getType().compare( "NNTP" ) == 0 ) { 139 } else if ( account->getType().compare( "NNTP" ) == 0 ) {
140 NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); 140 NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account);
141 NNTPconfig nntp( nntpAcc, this, 0, true ); 141 NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp );
142 nntp.showMaximized(); 142 nntp.showMaximized();
143 if ( QDialog::Accepted == nntp.exec() ) { 143 if ( QDialog::Accepted == nntp.exec() ) {
144 slotFillLists(); 144 slotFillLists();
145 } 145 }
146 } 146 }
147} 147}
148 148
149void EditAccounts::slotDeleteAccount( Account *account ) 149void EditAccounts::slotDeleteAccount( Account *account )
150{ 150{
151 if ( QMessageBox::information( this, tr( "Question" ), 151 if ( QMessageBox::information( this, tr( "Question" ),
152 tr( "<p>Do you really want to delete the selected Account?</p>" ), 152 tr( "<p>Do you really want to delete the selected Account?</p>" ),
153 tr( "Yes" ), tr( "No" ) ) == 0 ) { 153 tr( "Yes" ), tr( "No" ) ) == 0 ) {
154 settings->delAccount( account ); 154 settings->delAccount( account );
155 slotFillLists(); 155 slotFillLists();
156 } 156 }
157} 157}
158 158
159void EditAccounts::slotEditMail() 159void EditAccounts::slotEditMail()
160{ 160{
161 qDebug( "Edit Mail Account" ); 161 qDebug( "Edit Mail Account" );
162 if ( !mailList->currentItem() ) { 162 if ( !mailList->currentItem() ) {
163 QMessageBox::information( this, tr( "Error" ), 163 QMessageBox::information( this, tr( "Error" ),
164 tr( "<p>Please select an account.</p>" ), 164 tr( "<p>Please select an account.</p>" ),
165 tr( "Ok" ) ); 165 tr( "Ok" ) );
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index dee3f70..39e3a64 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -1,151 +1,151 @@
1#include <qmessagebox.h> 1#include <qmessagebox.h>
2#include "settingsdialog.h" 2#include "settingsdialog.h"
3#include "opiemail.h" 3#include "opiemail.h"
4#include "editaccounts.h" 4#include "editaccounts.h"
5#include "composemail.h" 5#include "composemail.h"
6#include <libmailwrapper/smtpwrapper.h> 6#include <libmailwrapper/smtpwrapper.h>
7#include <qpe/qcopenvelope_qws.h> 7#include <qpe/qcopenvelope_qws.h>
8#include <qpe/resource.h> 8#include <qpe/resource.h>
9#include <qaction.h> 9#include <qaction.h>
10#include <qapplication.h> 10#include <qapplication.h>
11#include <libmailwrapper/mailtypes.h> 11#include <libmailwrapper/mailtypes.h>
12#include "mailistviewitem.h" 12#include "mailistviewitem.h"
13#include "viewmail.h" 13#include "viewmail.h"
14#include "selectstore.h" 14#include "selectstore.h"
15 15
16OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) 16OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
17 : MainWindow( parent, name, flags ) 17 : MainWindow( parent, name, WStyle_ContextHelp )
18{ 18{
19 settings = new Settings(); 19 settings = new Settings();
20 20
21 folderView->populate( settings->getAccounts() ); 21 folderView->populate( settings->getAccounts() );
22} 22}
23 23
24OpieMail::~OpieMail() 24OpieMail::~OpieMail()
25{ 25{
26 if (settings) delete settings; 26 if (settings) delete settings;
27} 27}
28 28
29void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 29void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
30{ 30{
31 // copied from old mail2 31 // copied from old mail2
32 if (msg == "writeMail(QString,QString)") { 32 if (msg == "writeMail(QString,QString)") {
33 QDataStream stream(data,IO_ReadOnly); 33 QDataStream stream(data,IO_ReadOnly);
34 QString name, email; 34 QString name, email;
35 stream >> name >> email; 35 stream >> name >> email;
36 // removing the whitespaces at beginning and end is needed! 36 // removing the whitespaces at beginning and end is needed!
37 slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); 37 slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace());
38 } else if (msg == "newMail()") { 38 } else if (msg == "newMail()") {
39 slotComposeMail(); 39 slotComposeMail();
40 } 40 }
41} 41}
42 42
43void OpieMail::slotwriteMail(const QString&name,const QString&email) 43void OpieMail::slotwriteMail(const QString&name,const QString&email)
44{ 44{
45 ComposeMail compose( settings, this, 0 , true ); 45 ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp );
46 if (!email.isEmpty()) { 46 if (!email.isEmpty()) {
47 if (!name.isEmpty()) { 47 if (!name.isEmpty()) {
48 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); 48 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
49 } else { 49 } else {
50 compose.setTo(email); 50 compose.setTo(email);
51 } 51 }
52 } 52 }
53 compose.showMaximized(); 53 compose.showMaximized();
54 compose.slotAdjustColumns(); 54 compose.slotAdjustColumns();
55 compose.exec(); 55 compose.exec();
56} 56}
57 57
58void OpieMail::slotComposeMail() 58void OpieMail::slotComposeMail()
59{ 59{
60 qDebug( "Compose Mail" ); 60 qDebug( "Compose Mail" );
61 slotwriteMail(0l,0l); 61 slotwriteMail(0l,0l);
62} 62}
63 63
64void OpieMail::slotSendQueued() 64void OpieMail::slotSendQueued()
65{ 65{
66 qDebug( "Send Queued" ); 66 qDebug( "Send Queued" );
67 SMTPaccount *smtp = 0; 67 SMTPaccount *smtp = 0;
68 68
69 QList<Account> list = settings->getAccounts(); 69 QList<Account> list = settings->getAccounts();
70 Account *it; 70 Account *it;
71// if (list.count()==1) { 71// if (list.count()==1) {
72 for ( it = list.first(); it; it = list.next() ) { 72 for ( it = list.first(); it; it = list.next() ) {
73 if ( it->getType().compare( "SMTP" ) == 0 ) { 73 if ( it->getType().compare( "SMTP" ) == 0 ) {
74 smtp = static_cast<SMTPaccount *>(it); 74 smtp = static_cast<SMTPaccount *>(it);
75 break; 75 break;
76 } 76 }
77 } 77 }
78// } 78// }
79 if (smtp) { 79 if (smtp) {
80 SMTPwrapper * wrap = new SMTPwrapper(settings); 80 SMTPwrapper * wrap = new SMTPwrapper(settings);
81 if ( wrap->flushOutbox(smtp) ) { 81 if ( wrap->flushOutbox(smtp) ) {
82 QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); 82 QMessageBox::information(0,tr("Info"),tr("Mail queue flushed"));
83 } 83 }
84 } 84 }
85} 85}
86 86
87void OpieMail::slotSearchMails() 87void OpieMail::slotSearchMails()
88{ 88{
89 qDebug( "Search Mails" ); 89 qDebug( "Search Mails" );
90} 90}
91 91
92void OpieMail::slotEditSettings() 92void OpieMail::slotEditSettings()
93{ 93{
94 SettingsDialog settingsDialog( this, 0, true ); 94 SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp );
95 settingsDialog.showMaximized(); 95 settingsDialog.showMaximized();
96 settingsDialog.exec(); 96 settingsDialog.exec();
97} 97}
98 98
99void OpieMail::slotEditAccounts() 99void OpieMail::slotEditAccounts()
100{ 100{
101 qDebug( "Edit Accounts" ); 101 qDebug( "Edit Accounts" );
102 EditAccounts eaDialog( settings, this, 0, true ); 102 EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp );
103 eaDialog.showMaximized(); 103 eaDialog.showMaximized();
104 eaDialog.slotAdjustColumns(); 104 eaDialog.slotAdjustColumns();
105 eaDialog.exec(); 105 eaDialog.exec();
106 if ( settings ) delete settings; 106 if ( settings ) delete settings;
107 settings = new Settings(); 107 settings = new Settings();
108 108
109 folderView->populate( settings->getAccounts() ); 109 folderView->populate( settings->getAccounts() );
110} 110}
111 111
112void OpieMail::displayMail() 112void OpieMail::displayMail()
113{ 113{
114 QListViewItem*item = mailView->currentItem(); 114 QListViewItem*item = mailView->currentItem();
115 if (!item) return; 115 if (!item) return;
116 RecMail mail = ((MailListViewItem*)item)->data(); 116 RecMail mail = ((MailListViewItem*)item)->data();
117 RecBody body = folderView->fetchBody(mail); 117 RecBody body = folderView->fetchBody(mail);
118 ViewMail readMail( this ); 118 ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp );
119 readMail.setBody( body ); 119 readMail.setBody( body );
120 readMail.setMail( mail ); 120 readMail.setMail( mail );
121 readMail.showMaximized(); 121 readMail.showMaximized();
122 readMail.exec(); 122 readMail.exec();
123 123
124 if ( readMail.deleted ) { 124 if ( readMail.deleted ) {
125 folderView->refreshCurrent(); 125 folderView->refreshCurrent();
126 } else { 126 } else {
127 ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "") ); 127 ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "" ) );
128 } 128 }
129} 129}
130 130
131void OpieMail::slotDeleteMail() 131void OpieMail::slotDeleteMail()
132{ 132{
133 if (!mailView->currentItem()) return; 133 if (!mailView->currentItem()) return;
134 RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); 134 RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data();
135 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { 135 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
136 mail.Wrapper()->deleteMail( mail ); 136 mail.Wrapper()->deleteMail( mail );
137 folderView->refreshCurrent(); 137 folderView->refreshCurrent();
138 } 138 }
139} 139}
140 140
141void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 141void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
142{ 142{
143 /* just the RIGHT button - or hold on pda */ 143 /* just the RIGHT button - or hold on pda */
144 if (button!=2) {return;} 144 if (button!=2) {return;}
145 qDebug("Event right/hold"); 145 qDebug("Event right/hold");
146 if (!item) return; 146 if (!item) return;
147 QPopupMenu *m = new QPopupMenu(0); 147 QPopupMenu *m = new QPopupMenu(0);
148 if (m) { 148 if (m) {
149 m->insertItem(tr("Read this mail"),this,SLOT(displayMail())); 149 m->insertItem(tr("Read this mail"),this,SLOT(displayMail()));
150 m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail())); 150 m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail()));
151 m->insertItem(tr("Copy/Move this mail"),this,SLOT(slotMoveCopyMail())); 151 m->insertItem(tr("Copy/Move this mail"),this,SLOT(slotMoveCopyMail()));
diff --git a/noncore/net/mail/pop3configui.ui b/noncore/net/mail/pop3configui.ui
index 95cbdc2..1014ef4 100644
--- a/noncore/net/mail/pop3configui.ui
+++ b/noncore/net/mail/pop3configui.ui
@@ -1,405 +1,352 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>POP3configUI</class> 2<class>POP3configUI</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>POP3configUI</cstring> 7 <cstring>POP3configUI</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>232</width> 14 <width>314</width>
15 <height>320</height> 15 <height>410</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Configure POP3</string> 20 <string>Configure POP3</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <widget> 28 <vbox>
29 <class>QLayoutWidget</class>
30 <property stdset="1"> 29 <property stdset="1">
31 <name>name</name> 30 <name>margin</name>
32 <cstring>Layout12</cstring> 31 <number>3</number>
33 </property> 32 </property>
34 <property stdset="1"> 33 <property stdset="1">
35 <name>geometry</name> 34 <name>spacing</name>
36 <rect> 35 <number>3</number>
37 <x>3</x>
38 <y>3</y>
39 <width>226</width>
40 <height>32</height>
41 </rect>
42 </property> 36 </property>
43 <hbox> 37 <widget>
38 <class>QLayoutWidget</class>
44 <property stdset="1"> 39 <property stdset="1">
45 <name>margin</name> 40 <name>name</name>
46 <number>0</number> 41 <cstring>Layout12</cstring>
47 </property> 42 </property>
48 <property stdset="1"> 43 <hbox>
49 <name>spacing</name>
50 <number>6</number>
51 </property>
52 <widget>
53 <class>QLabel</class>
54 <property stdset="1">
55 <name>name</name>
56 <cstring>accountLabel</cstring>
57 </property>
58 <property stdset="1"> 44 <property stdset="1">
59 <name>text</name> 45 <name>margin</name>
60 <string>Account</string> 46 <number>0</number>
61 </property> 47 </property>
62 </widget>
63 <widget>
64 <class>QLineEdit</class>
65 <property stdset="1"> 48 <property stdset="1">
66 <name>name</name> 49 <name>spacing</name>
67 <cstring>accountLine</cstring> 50 <number>6</number>
68 </property>
69 <property>
70 <name>toolTip</name>
71 <string>Name of the Account</string>
72 </property> 51 </property>
73 </widget> 52 <widget>
74 </hbox> 53 <class>QLabel</class>
75 </widget> 54 <property stdset="1">
76 <widget> 55 <name>name</name>
77 <class>Line</class> 56 <cstring>accountLabel</cstring>
78 <property stdset="1"> 57 </property>
79 <name>name</name> 58 <property stdset="1">
80 <cstring>line1</cstring> 59 <name>text</name>
81 </property> 60 <string>Account</string>
82 <property stdset="1"> 61 </property>
83 <name>geometry</name> 62 </widget>
84 <rect> 63 <widget>
85 <x>3</x> 64 <class>QLineEdit</class>
86 <y>38</y> 65 <property stdset="1">
87 <width>226</width> 66 <name>name</name>
88 <height>16</height> 67 <cstring>accountLine</cstring>
89 </rect> 68 </property>
90 </property> 69 <property>
91 <property stdset="1"> 70 <name>toolTip</name>
92 <name>orientation</name> 71 <string>Name of the Account</string>
93 <enum>Horizontal</enum> 72 </property>
94 </property> 73 </widget>
95 </widget> 74 </hbox>
96 <widget> 75 </widget>
97 <class>QLayoutWidget</class> 76 <widget>
98 <property stdset="1"> 77 <class>Line</class>
99 <name>name</name> 78 <property stdset="1">
100 <cstring>Layout11</cstring> 79 <name>name</name>
101 </property> 80 <cstring>line1</cstring>
102 <property stdset="1"> 81 </property>
103 <name>geometry</name>
104 <rect>
105 <x>3</x>
106 <y>44</y>
107 <width>226</width>
108 <height>70</height>
109 </rect>
110 </property>
111 <hbox>
112 <property stdset="1"> 82 <property stdset="1">
113 <name>margin</name> 83 <name>orientation</name>
114 <number>0</number> 84 <enum>Horizontal</enum>
115 </property> 85 </property>
86 </widget>
87 <widget>
88 <class>QLayoutWidget</class>
116 <property stdset="1"> 89 <property stdset="1">
117 <name>spacing</name> 90 <name>name</name>
118 <number>6</number> 91 <cstring>Layout11</cstring>
119 </property> 92 </property>
120 <widget> 93 <hbox>
121 <class>QLayoutWidget</class>
122 <property stdset="1"> 94 <property stdset="1">
123 <name>name</name> 95 <name>margin</name>
124 <cstring>Layout9</cstring> 96 <number>0</number>
125 </property> 97 </property>
126 <vbox> 98 <property stdset="1">
127 <property stdset="1"> 99 <name>spacing</name>
128 <name>margin</name> 100 <number>6</number>
129 <number>0</number> 101 </property>
130 </property> 102 <widget>
103 <class>QLayoutWidget</class>
131 <property stdset="1"> 104 <property stdset="1">
132 <name>spacing</name> 105 <name>name</name>
133 <number>6</number> 106 <cstring>Layout9</cstring>
134 </property> 107 </property>
135 <widget> 108 <vbox>
136 <class>QLabel</class>
137 <property stdset="1"> 109 <property stdset="1">
138 <name>name</name> 110 <name>margin</name>
139 <cstring>serverLabel</cstring> 111 <number>0</number>
140 </property> 112 </property>
141 <property stdset="1"> 113 <property stdset="1">
142 <name>text</name> 114 <name>spacing</name>
143 <string>Server</string> 115 <number>6</number>
144 </property> 116 </property>
145 </widget> 117 <widget>
146 <widget> 118 <class>QLabel</class>
147 <class>QLabel</class> 119 <property stdset="1">
120 <name>name</name>
121 <cstring>serverLabel</cstring>
122 </property>
123 <property stdset="1">
124 <name>text</name>
125 <string>Server</string>
126 </property>
127 </widget>
128 <widget>
129 <class>QLabel</class>
130 <property stdset="1">
131 <name>name</name>
132 <cstring>portLabel</cstring>
133 </property>
134 <property stdset="1">
135 <name>text</name>
136 <string>Port</string>
137 </property>
138 </widget>
139 </vbox>
140 </widget>
141 <widget>
142 <class>QLayoutWidget</class>
143 <property stdset="1">
144 <name>name</name>
145 <cstring>Layout10</cstring>
146 </property>
147 <vbox>
148 <property stdset="1"> 148 <property stdset="1">
149 <name>name</name> 149 <name>margin</name>
150 <cstring>portLabel</cstring> 150 <number>0</number>
151 </property> 151 </property>
152 <property stdset="1"> 152 <property stdset="1">
153 <name>text</name> 153 <name>spacing</name>
154 <string>Port</string> 154 <number>6</number>
155 </property> 155 </property>
156 </widget> 156 <widget>
157 </vbox> 157 <class>QLineEdit</class>
158 </widget> 158 <property stdset="1">
159 <widget> 159 <name>name</name>
160 <class>QLayoutWidget</class> 160 <cstring>serverLine</cstring>
161 </property>
162 </widget>
163 <widget>
164 <class>QLineEdit</class>
165 <property stdset="1">
166 <name>name</name>
167 <cstring>portLine</cstring>
168 </property>
169 </widget>
170 </vbox>
171 </widget>
172 </hbox>
173 </widget>
174 <widget>
175 <class>QLayoutWidget</class>
176 <property stdset="1">
177 <name>name</name>
178 <cstring>Layout13</cstring>
179 </property>
180 <vbox>
181 <property stdset="1">
182 <name>margin</name>
183 <number>0</number>
184 </property>
161 <property stdset="1"> 185 <property stdset="1">
162 <name>name</name> 186 <name>spacing</name>
163 <cstring>Layout10</cstring> 187 <number>6</number>
164 </property> 188 </property>
165 <vbox> 189 <widget>
190 <class>QLabel</class>
166 <property stdset="1"> 191 <property stdset="1">
167 <name>margin</name> 192 <name>name</name>
168 <number>0</number> 193 <cstring>TextLabel1</cstring>
169 </property> 194 </property>
170 <property stdset="1"> 195 <property stdset="1">
171 <name>spacing</name> 196 <name>text</name>
172 <number>6</number> 197 <string>Use secure sockets:</string>
173 </property> 198 </property>
174 <widget> 199 </widget>
175 <class>QLineEdit</class> 200 <widget>
176 <property stdset="1"> 201 <class>QComboBox</class>
177 <name>name</name> 202 <property stdset="1">
178 <cstring>serverLine</cstring> 203 <name>name</name>
179 </property> 204 <cstring>ComboBox1</cstring>
180 </widget> 205 </property>
181 <widget> 206 </widget>
182 <class>QLineEdit</class> 207 </vbox>
183 <property stdset="1"> 208 </widget>
184 <name>name</name> 209 <widget>
185 <cstring>portLine</cstring> 210 <class>QLineEdit</class>
186 </property>
187 </widget>
188 </vbox>
189 </widget>
190 </hbox>
191 </widget>
192 <widget>
193 <class>QLayoutWidget</class>
194 <property stdset="1">
195 <name>name</name>
196 <cstring>Layout13</cstring>
197 </property>
198 <property stdset="1">
199 <name>geometry</name>
200 <rect>
201 <x>3</x>
202 <y>117</y>
203 <width>226</width>
204 <height>64</height>
205 </rect>
206 </property>
207 <vbox>
208 <property stdset="1"> 211 <property stdset="1">
209 <name>margin</name> 212 <name>name</name>
210 <number>0</number> 213 <cstring>CommandEdit</cstring>
211 </property> 214 </property>
212 <property stdset="1"> 215 <property stdset="1">
213 <name>spacing</name> 216 <name>text</name>
214 <number>6</number> 217 <string>ssh $SERVER exec imapd</string>
218 </property>
219 </widget>
220 <widget>
221 <class>Line</class>
222 <property stdset="1">
223 <name>name</name>
224 <cstring>line2</cstring>
215 </property> 225 </property>
216 <widget>
217 <class>QLabel</class>
218 <property stdset="1">
219 <name>name</name>
220 <cstring>TextLabel1</cstring>
221 </property>
222 <property stdset="1">
223 <name>text</name>
224 <string>Use secure sockets:</string>
225 </property>
226 </widget>
227 <widget>
228 <class>QComboBox</class>
229 <property stdset="1">
230 <name>name</name>
231 <cstring>ComboBox1</cstring>
232 </property>
233 </widget>
234 </vbox>
235 </widget>
236 <widget>
237 <class>QLayoutWidget</class>
238 <property stdset="1">
239 <name>name</name>
240 <cstring>Layout6</cstring>
241 </property>
242 <property stdset="1">
243 <name>geometry</name>
244 <rect>
245 <x>3</x>
246 <y>223</y>
247 <width>226</width>
248 <height>70</height>
249 </rect>
250 </property>
251 <hbox>
252 <property stdset="1"> 226 <property stdset="1">
253 <name>margin</name> 227 <name>orientation</name>
254 <number>0</number> 228 <enum>Horizontal</enum>
255 </property> 229 </property>
230 </widget>
231 <widget>
232 <class>QLayoutWidget</class>
256 <property stdset="1"> 233 <property stdset="1">
257 <name>spacing</name> 234 <name>name</name>
258 <number>6</number> 235 <cstring>Layout6</cstring>
259 </property> 236 </property>
260 <widget> 237 <hbox>
261 <class>QLayoutWidget</class>
262 <property stdset="1"> 238 <property stdset="1">
263 <name>name</name> 239 <name>margin</name>
264 <cstring>Layout4</cstring> 240 <number>0</number>
265 </property> 241 </property>
266 <vbox> 242 <property stdset="1">
267 <property stdset="1"> 243 <name>spacing</name>
268 <name>margin</name> 244 <number>6</number>
269 <number>0</number> 245 </property>
270 </property> 246 <widget>
247 <class>QLayoutWidget</class>
271 <property stdset="1"> 248 <property stdset="1">
272 <name>spacing</name> 249 <name>name</name>
273 <number>6</number> 250 <cstring>Layout4</cstring>
274 </property> 251 </property>
275 <widget> 252 <vbox>
276 <class>QLabel</class>
277 <property stdset="1">
278 <name>name</name>
279 <cstring>userLabel</cstring>
280 </property>
281 <property stdset="1"> 253 <property stdset="1">
282 <name>text</name> 254 <name>margin</name>
283 <string>User</string> 255 <number>0</number>
284 </property> 256 </property>
285 </widget>
286 <widget>
287 <class>QLabel</class>
288 <property stdset="1"> 257 <property stdset="1">
289 <name>name</name> 258 <name>spacing</name>
290 <cstring>passLabel</cstring> 259 <number>6</number>
291 </property> 260 </property>
292 <property stdset="1"> 261 <widget>
293 <name>text</name> 262 <class>QLabel</class>
294 <string>Password</string> 263 <property stdset="1">
295 </property> 264 <name>name</name>
296 </widget> 265 <cstring>userLabel</cstring>
297 </vbox> 266 </property>
298 </widget> 267 <property stdset="1">
299 <widget> 268 <name>text</name>
300 <class>QLayoutWidget</class> 269 <string>User</string>
301 <property stdset="1"> 270 </property>
302 <name>name</name> 271 </widget>
303 <cstring>Layout5</cstring> 272 <widget>
304 </property> 273 <class>QLabel</class>
305 <vbox> 274 <property stdset="1">
306 <property stdset="1"> 275 <name>name</name>
307 <name>margin</name> 276 <cstring>passLabel</cstring>
308 <number>0</number> 277 </property>
309 </property> 278 <property stdset="1">
279 <name>text</name>
280 <string>Password</string>
281 </property>
282 </widget>
283 </vbox>
284 </widget>
285 <widget>
286 <class>QLayoutWidget</class>
310 <property stdset="1"> 287 <property stdset="1">
311 <name>spacing</name> 288 <name>name</name>
312 <number>6</number> 289 <cstring>Layout5</cstring>
313 </property> 290 </property>
314 <widget> 291 <vbox>
315 <class>QLineEdit</class>
316 <property stdset="1"> 292 <property stdset="1">
317 <name>name</name> 293 <name>margin</name>
318 <cstring>userLine</cstring> 294 <number>0</number>
319 </property> 295 </property>
320 </widget>
321 <widget>
322 <class>QLineEdit</class>
323 <property stdset="1"> 296 <property stdset="1">
324 <name>name</name> 297 <name>spacing</name>
325 <cstring>passLine</cstring> 298 <number>6</number>
326 </property> 299 </property>
327 <property stdset="1"> 300 <widget>
328 <name>echoMode</name> 301 <class>QLineEdit</class>
329 <enum>Password</enum> 302 <property stdset="1">
330 </property> 303 <name>name</name>
331 </widget> 304 <cstring>userLine</cstring>
332 </vbox> 305 </property>
333 </widget> 306 </widget>
334 </hbox> 307 <widget>
335 </widget> 308 <class>QLineEdit</class>
336 <spacer> 309 <property stdset="1">
337 <property> 310 <name>name</name>
338 <name>name</name> 311 <cstring>passLine</cstring>
339 <cstring>spacer</cstring> 312 </property>
340 </property> 313 <property stdset="1">
341 <property stdset="1"> 314 <name>echoMode</name>
342 <name>orientation</name> 315 <enum>Password</enum>
343 <enum>Vertical</enum> 316 </property>
344 </property> 317 </widget>
345 <property stdset="1"> 318 </vbox>
346 <name>sizeType</name> 319 </widget>
347 <enum>Expanding</enum> 320 </hbox>
348 </property> 321 </widget>
349 <property> 322 <spacer>
350 <name>sizeHint</name> 323 <property>
351 <size> 324 <name>name</name>
352 <width>20</width> 325 <cstring>spacer</cstring>
353 <height>20</height> 326 </property>
354 </size> 327 <property stdset="1">
355 </property> 328 <name>orientation</name>
356 </spacer> 329 <enum>Vertical</enum>
357 <widget> 330 </property>
358 <class>QLineEdit</class> 331 <property stdset="1">
359 <property stdset="1"> 332 <name>sizeType</name>
360 <name>name</name> 333 <enum>Expanding</enum>
361 <cstring>CommandEdit</cstring> 334 </property>
362 </property> 335 <property>
363 <property stdset="1"> 336 <name>sizeHint</name>
364 <name>geometry</name> 337 <size>
365 <rect> 338 <width>20</width>
366 <x>0</x> 339 <height>20</height>
367 <y>180</y> 340 </size>
368 <width>226</width> 341 </property>
369 <height>30</height> 342 </spacer>
370 </rect> 343 </vbox>
371 </property>
372 <property stdset="1">
373 <name>text</name>
374 <string>ssh $SERVER exec imapd</string>
375 </property>
376 </widget>
377 <widget>
378 <class>Line</class>
379 <property stdset="1">
380 <name>name</name>
381 <cstring>line2</cstring>
382 </property>
383 <property stdset="1">
384 <name>geometry</name>
385 <rect>
386 <x>3</x>
387 <y>204</y>
388 <width>226</width>
389 <height>16</height>
390 </rect>
391 </property>
392 <property stdset="1">
393 <name>orientation</name>
394 <enum>Horizontal</enum>
395 </property>
396 </widget>
397</widget> 344</widget>
398<tabstops> 345<tabstops>
399 <tabstop>accountLine</tabstop> 346 <tabstop>accountLine</tabstop>
400 <tabstop>serverLine</tabstop> 347 <tabstop>serverLine</tabstop>
401 <tabstop>portLine</tabstop> 348 <tabstop>portLine</tabstop>
402 <tabstop>userLine</tabstop> 349 <tabstop>userLine</tabstop>
403 <tabstop>passLine</tabstop> 350 <tabstop>passLine</tabstop>
404</tabstops> 351</tabstops>
405</UI> 352</UI>
diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h
index 2d0e024..abbd5b3 100644
--- a/noncore/net/mail/viewmail.h
+++ b/noncore/net/mail/viewmail.h
@@ -10,49 +10,49 @@
10#include <libmailwrapper/mailtypes.h> 10#include <libmailwrapper/mailtypes.h>
11 11
12 12
13class AttachItem : public QListViewItem 13class AttachItem : public QListViewItem
14{ 14{
15public: 15public:
16 AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 16 AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
17 const QString&fsize,int num,const QValueList<int>&path); 17 const QString&fsize,int num,const QValueList<int>&path);
18 AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 18 AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
19 const QString&fsize,int num,const QValueList<int>&path); 19 const QString&fsize,int num,const QValueList<int>&path);
20 int Partnumber() { return _partNum; } 20 int Partnumber() { return _partNum; }
21 bool isParentof(const QValueList<int>&path); 21 bool isParentof(const QValueList<int>&path);
22 22
23private: 23private:
24 int _partNum; 24 int _partNum;
25 /* needed for a better display of attachments */ 25 /* needed for a better display of attachments */
26 QValueList<int> _path; 26 QValueList<int> _path;
27}; 27};
28 28
29class ViewMail : public ViewMailBase 29class ViewMail : public ViewMailBase
30{ 30{
31 Q_OBJECT 31 Q_OBJECT
32 32
33public: 33public:
34 ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal); 34 ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
35 ~ViewMail(); 35 ~ViewMail();
36 36
37 void hide(); 37 void hide();
38 void exec(); 38 void exec();
39 void setMail( RecMail mail ); 39 void setMail( RecMail mail );
40 void setBody( RecBody body ); 40 void setBody( RecBody body );
41 bool deleted; 41 bool deleted;
42 42
43protected: 43protected:
44 QString deHtml(const QString &string); 44 QString deHtml(const QString &string);
45 AttachItem* searchParent(const QValueList<int>&path); 45 AttachItem* searchParent(const QValueList<int>&path);
46 AttachItem* lastChild(AttachItem*parent); 46 AttachItem* lastChild(AttachItem*parent);
47 47
48protected slots: 48protected slots:
49 void slotReply(); 49 void slotReply();
50 void slotForward(); 50 void slotForward();
51 void setText(); 51 void setText();
52 void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); 52 void slotItemClicked( QListViewItem * item , const QPoint & point, int c );
53 void slotDeleteMail( ); 53 void slotDeleteMail( );
54 void slotShowHtml( bool ); 54 void slotShowHtml( bool );
55 55
56private: 56private:
57 void readConfig(); 57 void readConfig();
58 58