summaryrefslogtreecommitdiff
path: root/noncore/net/mailit/writemail.cpp
Unidiff
Diffstat (limited to 'noncore/net/mailit/writemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mailit/writemail.cpp38
1 files changed, 23 insertions, 15 deletions
diff --git a/noncore/net/mailit/writemail.cpp b/noncore/net/mailit/writemail.cpp
index a9dcb02..0336c83 100644
--- a/noncore/net/mailit/writemail.cpp
+++ b/noncore/net/mailit/writemail.cpp
@@ -19,4 +19,5 @@
19**********************************************************************/ 19**********************************************************************/
20#include <qmessagebox.h> 20#include <qmessagebox.h>
21#include <qwhatsthis.h>
21#include "writemail.h" 22#include "writemail.h"
22#include <qpe/resource.h> 23#include <qpe/resource.h>
@@ -28,5 +29,5 @@ WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl )
28 init(); 29 init();
29 30
30 addAtt = new AddAtt(0, "Add Attatchments"); 31 addAtt = new AddAtt(0, "Add Attachments");
31} 32}
32 33
@@ -65,8 +66,9 @@ void WriteMail::init()
65 66
66 bar = new QToolBar(this); 67 bar = new QToolBar(this);
67 attatchButton = new QAction(tr("Attatchment"), Resource::loadPixmap("mailit/attach"), QString::null, 0, this, 0); 68 attachButton = new QAction(tr("Attachment"), Resource::loadPixmap("mailit/attach"), QString::null, 0, this, 0);
68 attatchButton->addTo(bar); 69 attachButton->addTo(bar);
69 attatchButton->addTo(addMenu); 70 attachButton->addTo(addMenu);
70 connect( attatchButton, SIGNAL( activated() ), this, SLOT( attatchFile() ) ); 71 connect( attachButton, SIGNAL( activated() ), this, SLOT( attachFile() ) );
72 attachButton->setWhatsThis(tr("Click here to attach files to your mail"));
71 73
72 confirmButton = new QAction(tr("Enque mail"), Resource::loadPixmap("OKButton"), QString::null, 0, this, 0); 74 confirmButton = new QAction(tr("Enque mail"), Resource::loadPixmap("OKButton"), QString::null, 0, this, 0);
@@ -74,8 +76,10 @@ void WriteMail::init()
74 confirmButton->addTo(mailMenu); 76 confirmButton->addTo(mailMenu);
75 connect( confirmButton, SIGNAL( activated() ), this, SLOT( accept() ) ); 77 connect( confirmButton, SIGNAL( activated() ), this, SLOT( accept() ) );
78 confirmButton->setWhatsThis(tr("This button puts your mail in the send queue"));
76 79
77 newButton = new QAction(tr("New mail"), Resource::loadPixmap("new"), QString::null, 0, this, 0); 80 newButton = new QAction(tr("New mail"), Resource::loadPixmap("new"), QString::null, 0, this, 0);
78 newButton->addTo(mailMenu); 81 newButton->addTo(mailMenu);
79 connect( newButton, SIGNAL( activated() ), this, SLOT( newMail() ) ); 82 connect( newButton, SIGNAL( activated() ), this, SLOT( newMail() ) );
83 newButton->setWhatsThis(tr("Click here to create a new mail"));
80 84
81 widget = new QWidget(this, "widget"); 85 widget = new QWidget(this, "widget");
@@ -89,5 +93,4 @@ void WriteMail::init()
89 connect(recipientsBox,SIGNAL(activated(int)),this, SLOT(changeRecipients(int))); 93 connect(recipientsBox,SIGNAL(activated(int)),this, SLOT(changeRecipients(int)));
90 94
91
92 subjetLabel = new QLabel( widget, "subjetLabel" ); 95 subjetLabel = new QLabel( widget, "subjetLabel" );
93 subjetLabel->setText( tr( "Subject:" ) ); 96 subjetLabel->setText( tr( "Subject:" ) );
@@ -101,12 +104,14 @@ void WriteMail::init()
101 subjectInput = new QLineEdit( widget, "subjectInput" ); 104 subjectInput = new QLineEdit( widget, "subjectInput" );
102 grid->addWidget( subjectInput, 1, 1 ); 105 grid->addWidget( subjectInput, 1, 1 );
106 QWhatsThis::add(subjectInput,QWidget::tr("The mail subject should be entered here"));
103 107
104 toInput = new QLineEdit( widget, "toInput" ); 108 toInput = new QLineEdit( widget, "toInput" );
105 grid->addWidget( toInput, 0, 1 ); 109 grid->addWidget( toInput, 0, 1 );
110 QWhatsThis::add(recipientsBox,QWidget::tr("Recipients can be entered here"));
106 111
107 ccInput = new QLineEdit( widget, "ccInput" ); 112 ccInput = new QLineEdit( widget, "ccInput" );
108 ccInput->hide(); 113 ccInput->hide();
109 grid->addWidget( ccInput, 0, 1 ); 114 grid->addWidget( ccInput, 0, 1 );
110 115 QWhatsThis::add(ccInput,QWidget::tr("If you would like to send copies of your mail they can be entered here"));
111 116
112 addressButton = new QToolButton( widget, "addressButton" ); 117 addressButton = new QToolButton( widget, "addressButton" );
@@ -115,8 +120,9 @@ void WriteMail::init()
115 grid->addWidget( addressButton, 0, 2 ); 120 grid->addWidget( addressButton, 0, 2 );
116 connect(addressButton, SIGNAL(clicked()), this, SLOT(getAddress()) ); 121 connect(addressButton, SIGNAL(clicked()), this, SLOT(getAddress()) );
122 QWhatsThis::add(addressButton,QWidget::tr("This button opens the address selector with all mail adresses from your OPIE addressbook"));
117 123
118 emailInput = new QMultiLineEdit( widget, "emailInput" ); 124 emailInput = new QMultiLineEdit( widget, "emailInput" );
119 grid->addMultiCellWidget( emailInput, 2, 2, 0, 2); 125 grid->addMultiCellWidget( emailInput, 2, 2, 0, 2);
120 126 QWhatsThis::add(recipientsBox,QWidget::tr("Enter your mail text here"));
121 127
122 addressView = new QListView( widget, "addressView"); 128 addressView = new QListView( widget, "addressView");
@@ -127,4 +133,5 @@ void WriteMail::init()
127 addressView->hide(); 133 addressView->hide();
128 grid->addMultiCellWidget( addressView, 3, 3, 0, 2); 134 grid->addMultiCellWidget( addressView, 3, 3, 0, 2);
135 QWhatsThis::add(recipientsBox,QWidget::tr("Chose the recipients from this list"));
129 136
130 okButton = new QToolButton(bar, "ok"); 137 okButton = new QToolButton(bar, "ok");
@@ -132,4 +139,5 @@ void WriteMail::init()
132 okButton->hide(); 139 okButton->hide();
133 connect(okButton, SIGNAL(clicked()), this, SLOT(addRecipients()) ); 140 connect(okButton, SIGNAL(clicked()), this, SLOT(addRecipients()) );
141 QWhatsThis::add(okButton,QWidget::tr("Queue your mail by clicking here"));
134 142
135 setCentralWidget(widget); 143 setCentralWidget(widget);
@@ -144,5 +152,5 @@ void WriteMail::reject()
144void WriteMail::accept() 152void WriteMail::accept()
145{ 153{
146 QStringList attatchedFiles, attatchmentsType; 154 QStringList attachedFiles, attachmentsType;
147 int idCount = 0; 155 int idCount = 0;
148 156
@@ -197,11 +205,11 @@ void WriteMail::accept()
197 mail.rawMail += "\n\n"; 205 mail.rawMail += "\n\n";
198 206
199 attatchedFiles = addAtt->returnAttatchedFiles(); 207 attachedFiles = addAtt->returnattachedFiles();
200 attatchmentsType = addAtt->returnFileTypes(); 208 attachmentsType = addAtt->returnFileTypes();
201 209
202 QStringList::Iterator itType = attatchmentsType.begin(); 210 QStringList::Iterator itType = attachmentsType.begin();
203 211
204 Enclosure e; 212 Enclosure e;
205 for ( QStringList::Iterator it = attatchedFiles.begin(); it != attatchedFiles.end(); ++it ) { 213 for ( QStringList::Iterator it = attachedFiles.begin(); it != attachedFiles.end(); ++it ) {
206 e.id = idCount; 214 e.id = idCount;
207 e.originalName = (*it).latin1(); 215 e.originalName = (*it).latin1();
@@ -237,5 +245,5 @@ void WriteMail::getAddress()
237} 245}
238 246
239void WriteMail::attatchFile() 247void WriteMail::attachFile()
240{ 248{
241 addAtt->showMaximized(); 249 addAtt->showMaximized();
@@ -257,5 +265,5 @@ void WriteMail::reply(Email replyMail, bool replyAll)
257 265
258 pos = 0; 266 pos = 0;
259 mail.body.insert(pos, ">>"); 267 mail.body.insert(pos, ">");
260 while (pos != -1) { 268 while (pos != -1) {
261 pos = mail.body.find('\n', pos); 269 pos = mail.body.find('\n', pos);