author | groucho <groucho> | 2003-04-24 11:19:11 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-24 11:19:11 (UTC) |
commit | 9671975e21266e3bfa6f3c793a3278b67cea34b7 (patch) (unidiff) | |
tree | 876c77939cfd0e00fc844b1b5af09b2978564a6d /noncore/net/mailit/writemail.cpp | |
parent | 51e782b9658de61dc02579e115a9c62f396609a3 (diff) | |
download | opie-9671975e21266e3bfa6f3c793a3278b67cea34b7.zip opie-9671975e21266e3bfa6f3c793a3278b67cea34b7.tar.gz opie-9671975e21266e3bfa6f3c793a3278b67cea34b7.tar.bz2 |
- reworked size filtering
- started reworking offline download
- better tab focus switching
- Hello "Whats this" capability
- Fixed parsing of To: header files (no more Delivered-To: and Reply-To: matches)
- Good bye Settings.txt, hello Config Objects and encrypted passwords
- Translation improvements (added trs)
- Parser optimizations
Diffstat (limited to 'noncore/net/mailit/writemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/writemail.cpp | 44 |
1 files changed, 26 insertions, 18 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,18 +66,21 @@ 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() ) ); |
71 | 72 | attachButton->setWhatsThis(tr("Click here to attach files to your mail")); | |
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); |
73 | confirmButton->addTo(bar); | 75 | confirmButton->addTo(bar); |
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() ) ); |
80 | 83 | newButton->setWhatsThis(tr("Click here to create a new mail")); | |
84 | |||
81 | widget = new QWidget(this, "widget"); | 85 | widget = new QWidget(this, "widget"); |
82 | grid = new QGridLayout( widget ); | 86 | grid = new QGridLayout( 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,13 +104,15 @@ 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 ); |
115 | QWhatsThis::add(ccInput,QWidget::tr("If you would like to send copies of your mail they can be entered here")); | ||
110 | 116 | ||
111 | |||
112 | addressButton = new QToolButton( widget, "addressButton" ); | 117 | addressButton = new QToolButton( widget, "addressButton" ); |
113 | addressButton->setPixmap( Resource::loadPixmap("AddressBook") ); | 118 | addressButton->setPixmap( Resource::loadPixmap("AddressBook") ); |
@@ -115,9 +120,10 @@ 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); |
126 | QWhatsThis::add(recipientsBox,QWidget::tr("Enter your mail text here")); | ||
120 | 127 | ||
121 | |||
122 | addressView = new QListView( widget, "addressView"); | 128 | addressView = new QListView( widget, "addressView"); |
123 | addressView->addColumn("Name"); | 129 | addressView->addColumn("Name"); |
@@ -127,9 +133,11 @@ 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); |
129 | 135 | QWhatsThis::add(recipientsBox,QWidget::tr("Chose the recipients from this list")); | |
136 | |||
130 | okButton = new QToolButton(bar, "ok"); | 137 | okButton = new QToolButton(bar, "ok"); |
131 | okButton->setPixmap( Resource::loadPixmap("enter") ); | 138 | okButton->setPixmap( Resource::loadPixmap("enter") ); |
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() | |||
144 | void WriteMail::accept() | 152 | void 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 | ||
239 | void WriteMail::attatchFile() | 247 | void 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); |