Wt examples  4.0.3
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
Composer Class Reference

An E-mail composer widget. More...

#include <Composer.h>

Inheritance diagram for Composer:
Inheritance graph
[legend]

Public Member Functions

 Composer ()
 Construct a new Composer. More...
 
void setTo (const std::vector< Contact > &to)
 Set message To: contacts. More...
 
void setSubject (const WString &subject)
 Set subject. More...
 
void setMessage (const WString &message)
 Set the message. More...
 
void setAddressBook (const std::vector< Contact > &addressBook)
 Set the address book, for autocomplete suggestions. More...
 
std::vector< Contactto () const
 Get the To: contacts. More...
 
std::vector< Contactcc () const
 Get the Cc: contacts. More...
 
std::vector< Contactbcc () const
 Get the Bc: contacts. More...
 
const WString & subject () const
 Get the subject. More...
 
std::vector< Attachmentattachments () const
 Get the list of attachments. More...
 
const WString & message () const
 Get the message. More...
 

Public Attributes

Wt::Signal send
 The message is ready to be sent... More...
 
Wt::Signal discard
 The message must be discarded. More...
 

Private Member Functions

void attachMore ()
 Add an attachment edit. More...
 
void removeAttachment (AttachmentEdit *attachment)
 Remove the given attachment edit. More...
 
void sendIt ()
 Slot attached to the Send button. More...
 
void saveNow ()
 Slot attached to the Save now button. More...
 
void discardIt ()
 Slot attached to the Discard button. More...
 
void attachmentDone ()
 Slotcalled when an attachment has been uploaded. More...
 
void createUi ()
 
void saved ()
 All attachments have been processed, determine the result of saving the message. More...
 
void setStatus (const WString &text, const WString &style)
 Set the status, and apply the given style. More...
 

Private Attributes

WContainerWidget * layout_
 
WPushButton * topSendButton_
 
WPushButton * topSaveNowButton_
 
WPushButton * topDiscardButton_
 
WPushButton * botSendButton_
 
WPushButton * botSaveNowButton_
 
WPushButton * botDiscardButton_
 
WText * statusMsg_
 
WTable * edits_
 
AddresseeEdittoEdit_
 To: Addressees edit. More...
 
AddresseeEditccEdit_
 Cc: Addressees edit. More...
 
AddresseeEditbccEdit_
 Bcc: Addressees edit. More...
 
ContactSuggestionscontactSuggestions_
 The suggestions popup for the addressee edits. More...
 
WLineEdit * subject_
 The subject line edit. More...
 
OptionListoptions_
 OptionsList for editing Cc or Bcc. More...
 
Optionaddcc_
 Option for editing Cc: More...
 
Optionaddbcc_
 Option for editing Bcc: More...
 
OptionattachFile_
 Option for attaching a file. More...
 
OptionattachOtherFile_
 Option for attaching another file. More...
 
std::vector< AttachmentEdit * > attachments_
 Array which holds all the attachments, including one extra invisible one. More...
 
WTextArea * message_
 WTextArea for the main message. More...
 
bool saving_
 state when waiting asyncrhonously for attachments to be uploaded More...
 
bool sending_
 
int attachmentsPending_
 number of attachments waiting to be uploaded during saving More...
 

Friends

class AttachmentEdit
 

Detailed Description

An E-mail composer widget.

This widget is part of the Wt composer example.

Definition at line 40 of file Composer.h.

Constructor & Destructor Documentation

◆ Composer()

Composer::Composer ( )

Construct a new Composer.

Definition at line 26 of file Composer.C.

27  : WCompositeWidget(),
28  saving_(false),
29  sending_(false)
30 {
31  std::unique_ptr<WContainerWidget> layout
32  = cpp14::make_unique<WContainerWidget>();
33  layout_ = layout.get();
34  setImplementation(std::move(layout));
35 
36  createUi();
37 }
void createUi()
Definition: Composer.C:97
WContainerWidget * layout_
Definition: Composer.h:100
bool saving_
state when waiting asyncrhonously for attachments to be uploaded
Definition: Composer.h:140
bool sending_
Definition: Composer.h:140

Member Function Documentation

◆ attachmentDone()

void Composer::attachmentDone ( )
private

Slotcalled when an attachment has been uploaded.

This used during while saving the email and waiting for remaining attachments to be uploaded. It is connected to the AttachmentEdit control signals that are emitted when an attachment has been processed.

Definition at line 337 of file Composer.C.

338 {
339  if (saving_) {
341  std::cerr << "Attachments still: " << attachmentsPending_ << std::endl;
342 
343  if (attachmentsPending_ == 0)
344  saved();
345  }
346 }
void saved()
All attachments have been processed, determine the result of saving the message.
Definition: Composer.C:354
bool saving_
state when waiting asyncrhonously for attachments to be uploaded
Definition: Composer.h:140
int attachmentsPending_
number of attachments waiting to be uploaded during saving
Definition: Composer.h:143

◆ attachments()

std::vector< Attachment > Composer::attachments ( ) const

Get the list of attachments.

The ownership of the attachment spool files is transferred to the caller as well, be sure to delete them !

Definition at line 79 of file Composer.C.

80 {
81  std::vector<Attachment> attachments;
82 
83  for (unsigned i = 0; i < attachments_.size() - 1; ++i) {
84  std::vector<Attachment> toadd = attachments_[i]->attachments();
85 
86  attachments.insert(attachments.end(), toadd.begin(), toadd.end());
87  }
88 
89  return attachments;
90 }
std::vector< Attachment > attachments() const
Get the list of attachments.
Definition: Composer.C:79
std::vector< AttachmentEdit * > attachments_
Array which holds all the attachments, including one extra invisible one.
Definition: Composer.h:134

◆ attachMore()

void Composer::attachMore ( )
private

Add an attachment edit.

Definition at line 253 of file Composer.C.

254 {
255  /*
256  * Create and append the next AttachmentEdit, that will be hidden.
257  */
258  std::unique_ptr<AttachmentEdit> edit
259  = cpp14::make_unique<AttachmentEdit>(this);
260  AttachmentEdit *editPtr = edit.get();
261  edits_->elementAt(5, 1)->insertBefore(std::move(edit), attachOtherFile_);
262  attachments_.push_back(editPtr);
263  attachments_.back()->hide();
264 
265  // Connect the attachOtherFile_ option to show this attachment.
266  attachOtherFile_->item()->clicked()
267  .connect(attachments_.back(), &WWidget::show);
268 }
WInteractWidget * item()
Returns the clickable part.
Definition: Option.h:44
WTable * edits_
Definition: Composer.h:106
Option * attachOtherFile_
Option for attaching another file.
Definition: Composer.h:131
An edit field for an email attachment.
std::vector< AttachmentEdit * > attachments_
Array which holds all the attachments, including one extra invisible one.
Definition: Composer.h:134

◆ bcc()

std::vector< Contact > Composer::bcc ( ) const

Get the Bc: contacts.

Definition at line 64 of file Composer.C.

65 {
66  return bccEdit_->addressees();
67 }
AddresseeEdit * bccEdit_
Bcc: Addressees edit.
Definition: Composer.h:113
std::vector< Contact > addressees() const
Get a list of addressees.
Definition: AddresseeEdit.C:74

◆ cc()

std::vector< Contact > Composer::cc ( ) const

Get the Cc: contacts.

Definition at line 59 of file Composer.C.

60 {
61  return ccEdit_->addressees();
62 }
std::vector< Contact > addressees() const
Get a list of addressees.
Definition: AddresseeEdit.C:74
AddresseeEdit * ccEdit_
Cc: Addressees edit.
Definition: Composer.h:111

◆ createUi()

void Composer::createUi ( )
private

Definition at line 97 of file Composer.C.

98 {
99  setStyleClass("darker");
100 
101  // horizontal layout container, used for top and bottom buttons.
102  WContainerWidget *horiz;
103 
104  /*
105  * Top buttons
106  */
107  horiz = layout_->addWidget(cpp14::make_unique<WContainerWidget>());
108  horiz->setPadding(5);
109  topSendButton_ = horiz->addWidget(cpp14::make_unique<WPushButton>(tr("msg.send")));
110  topSendButton_->setStyleClass("default"); // default action
111  topSaveNowButton_ = horiz->addWidget(cpp14::make_unique<WPushButton>(tr("msg.savenow")));
112  topDiscardButton_ = horiz->addWidget(cpp14::make_unique<WPushButton>(tr("msg.discard")));
113 
114  // Text widget which shows status messages, next to the top buttons.
115  statusMsg_ = horiz->addWidget(cpp14::make_unique<WText>());
116  statusMsg_->setMargin(15, Side::Left);
117 
118  /*
119  * To, Cc, Bcc, Subject, Attachments
120  *
121  * They are organized in a two-column table: left column for
122  * labels, and right column for the edit.
123  */
124  edits_ = layout_->addWidget(cpp14::make_unique<WTable>());
125  edits_->setStyleClass("lighter");
126  edits_->resize(WLength(100, LengthUnit::Percentage), WLength::Auto);
127  edits_->elementAt(0, 0)->resize(WLength(1, LengthUnit::Percentage),
128  WLength::Auto);
129 
130  /*
131  * To, Cc, Bcc
132  */
133  toEdit_ = edits_->elementAt(0,1)->addWidget(cpp14::make_unique<AddresseeEdit>(tr("msg.to"), edits_->elementAt(0, 0)));
134  // add some space above To:
135  edits_->elementAt(0, 1)->setMargin(5, Side::Top);
136  ccEdit_ = edits_->elementAt(1,1)->addWidget(cpp14::make_unique<AddresseeEdit>(tr("msg.cc"), edits_->elementAt(1, 0)));
137  bccEdit_ = edits_->elementAt(2,1)->addWidget(cpp14::make_unique<AddresseeEdit>(tr("msg.bcc"), edits_->elementAt(2, 0)));
138 
139  ccEdit_->hide();
140  bccEdit_->hide();
141 
142  /*
143  * Addressbook suggestions popup
144  */
145  contactSuggestions_ = layout_->addWidget(cpp14::make_unique<ContactSuggestions>());
146 
147  contactSuggestions_->forEdit(toEdit_);
148  contactSuggestions_->forEdit(ccEdit_);
149  contactSuggestions_->forEdit(bccEdit_);
150 
151  /*
152  * We use an OptionList widget to show the expand options for
153  * ccEdit_ and bccEdit_ nicely next to each other, separated
154  * by pipe characters.
155  */
156  options_ = edits_->elementAt(3, 1)->addWidget(cpp14::make_unique<OptionList>());
157  std::unique_ptr<Option> addcc(new Option(tr("msg.addcc")));
158  addcc_ = addcc.get();
159  std::unique_ptr<Option> addbcc(new Option(tr("msg.addbcc")));
160  addbcc_ = addbcc.get();
161 
162  options_->add(std::move(addcc));
163  options_->add(std::move(addbcc));
164 
165  /*
166  * Subject
167  */
168  edits_->elementAt(4, 0)->addWidget(cpp14::make_unique<Label>(tr("msg.subject"), edits_->elementAt(4, 0)));
169  subject_ = edits_->elementAt(4, 1)->addWidget(cpp14::make_unique<WLineEdit>());
170  subject_->resize(WLength(99, LengthUnit::Percentage), WLength::Auto);
171 
172  /*
173  * Attachments
174  */
175  edits_->elementAt(5, 0)->addWidget(cpp14::make_unique<WImage>("icons/paperclip.png"));
176  edits_->elementAt(5, 0)->setContentAlignment(AlignmentFlag::Right | AlignmentFlag::Top);
177  edits_->elementAt(5, 0)->setPadding(3);
178 
179  // Attachment edits: we always have the next attachmentedit ready
180  // but hidden. This improves the response time, since the show()
181  // and hide() slots are stateless.
182  AttachmentEdit *attachmentEdit = edits_->elementAt(5, 1)->addWidget(cpp14::make_unique<AttachmentEdit>(this));
183  attachments_.push_back(attachmentEdit);
184  attachments_.back()->hide();
185 
186  /*
187  * Two options for attaching files. The first does not say 'another'.
188  */
189  attachFile_ = edits_->elementAt(5, 1)->addWidget(cpp14::make_unique<Option>(tr("msg.attachfile")));
190  attachOtherFile_ = edits_->elementAt(5, 1)->addWidget(cpp14::make_unique<Option>(tr("msg.attachanother")));
191  attachOtherFile_->hide();
192 
193  /*
194  * Message
195  */
196  message_ = layout_->addWidget(cpp14::make_unique<WTextArea>());
197  message_->setColumns(80);
198  message_->setRows(10); // should be 20, but let's keep it smaller
199  message_->setMargin(10);
200 
201  /*
202  * Bottom buttons
203  */
204  horiz = layout_->addWidget(cpp14::make_unique<WContainerWidget>());
205  horiz->setPadding(5);
206  botSendButton_ = horiz->addWidget(cpp14::make_unique<WPushButton>(tr("msg.send")));
207  botSendButton_->setStyleClass("default");
208  botSaveNowButton_ = horiz->addWidget(cpp14::make_unique<WPushButton>(tr("msg.savenow")));
209  botDiscardButton_ = horiz->addWidget(cpp14::make_unique<WPushButton>(tr("msg.discard")));
210 
211  /*
212  * Button events.
213  */
214  topSendButton_->clicked().connect(this, &Composer::sendIt);
215  botSendButton_->clicked().connect(this, &Composer::sendIt);
216  topSaveNowButton_->clicked().connect(this, &Composer::saveNow);
217  botSaveNowButton_->clicked().connect(this, &Composer::saveNow);
218  topDiscardButton_->clicked().connect(this, &Composer::discardIt);
219  botDiscardButton_->clicked().connect(this, &Composer::discardIt);
220 
221  /*
222  * Option events to show the cc or Bcc edit.
223  *
224  * Clicking on the option should both show the corresponding edit, and
225  * hide the option itself.
226  */
227  addcc_->item()->clicked().connect(ccEdit_, &WWidget::show);
228  addcc_->item()->clicked().connect(addcc_, &WWidget::hide);
229  addcc_->item()->clicked().connect(options_, &OptionList::update);
230  addcc_->item()->clicked().connect(ccEdit_, &WWidget::setFocus);
231 
232  addbcc_->item()->clicked().connect(bccEdit_, &WWidget::show);
233  addbcc_->item()->clicked().connect(addbcc_, &WWidget::hide);
234  addbcc_->item()->clicked().connect(options_, &OptionList::update);
235  addbcc_->item()->clicked().connect(bccEdit_, &WWidget::setFocus);
236 
237  /*
238  * Option event to attach the first attachment.
239  *
240  * We show the first attachment, and call attachMore() to prepare the
241  * next attachment edit that will be hidden.
242  *
243  * In addition, we need to show the 'attach More' option, and hide the
244  * 'attach' option.
245  */
246  attachFile_->item()->clicked().connect(attachments_.back(), &WWidget::show);
247  attachFile_->item()->clicked().connect(attachOtherFile_, &WWidget::show);
248  attachFile_->item()->clicked().connect(attachFile_, &WWidget::hide);
249  attachFile_->item()->clicked().connect(this, &Composer::attachMore);
250  attachOtherFile_->item()->clicked().connect(this, &Composer::attachMore);
251 }
A clickable option.
Definition: Option.h:31
AddresseeEdit * bccEdit_
Bcc: Addressees edit.
Definition: Composer.h:113
WInteractWidget * item()
Returns the clickable part.
Definition: Option.h:44
AddresseeEdit * toEdit_
To: Addressees edit.
Definition: Composer.h:109
WTable * edits_
Definition: Composer.h:106
void discardIt()
Slot attached to the Discard button.
Definition: Composer.C:392
WContainerWidget * layout_
Definition: Composer.h:100
Option * attachOtherFile_
Option for attaching another file.
Definition: Composer.h:131
Option * addbcc_
Option for editing Bcc:
Definition: Composer.h:127
An edit field for an email attachment.
WPushButton * botSaveNowButton_
Definition: Composer.h:103
std::vector< AttachmentEdit * > attachments_
Array which holds all the attachments, including one extra invisible one.
Definition: Composer.h:134
WTextArea * message_
WTextArea for the main message.
Definition: Composer.h:137
void saveNow()
Slot attached to the Save now button.
Definition: Composer.C:308
void update()
Updates the stateless implementations after an Option has been hidden or shown.
Definition: OptionList.C:31
WPushButton * botSendButton_
Definition: Composer.h:103
WPushButton * topDiscardButton_
Definition: Composer.h:102
void sendIt()
Slot attached to the Send button.
Definition: Composer.C:295
WPushButton * botDiscardButton_
Definition: Composer.h:103
Option * attachFile_
Option for attaching a file.
Definition: Composer.h:129
WPushButton * topSaveNowButton_
Definition: Composer.h:102
WLineEdit * subject_
The subject line edit.
Definition: Composer.h:119
WPushButton * topSendButton_
Definition: Composer.h:102
void add(std::unique_ptr< Option > option)
Add an Option to the list.
Definition: OptionList.C:18
Option * addcc_
Option for editing Cc:
Definition: Composer.h:125
ContactSuggestions * contactSuggestions_
The suggestions popup for the addressee edits.
Definition: Composer.h:116
void attachMore()
Add an attachment edit.
Definition: Composer.C:253
AddresseeEdit * ccEdit_
Cc: Addressees edit.
Definition: Composer.h:111
OptionList * options_
OptionsList for editing Cc or Bcc.
Definition: Composer.h:122
WText * statusMsg_
Definition: Composer.h:104

◆ discardIt()

void Composer::discardIt ( )
private

Slot attached to the Discard button.

Discards the current message: emits the discard event.

Definition at line 392 of file Composer.C.

393 {
394  discard.emit();
395 }
Wt::Signal discard
The message must be discarded.
Definition: Composer.h:97

◆ message()

const WString & Composer::message ( ) const

Get the message.

Definition at line 92 of file Composer.C.

93 {
94  return message_->text();
95 }
WTextArea * message_
WTextArea for the main message.
Definition: Composer.h:137

◆ removeAttachment()

void Composer::removeAttachment ( AttachmentEdit attachment)
private

Remove the given attachment edit.

Definition at line 270 of file Composer.C.

271 {
272  /*
273  * Remove the given attachment from the attachments list.
274  */
275  std::vector<AttachmentEdit *>::iterator i
276  = std::find(attachments_.begin(), attachments_.end(), attachment);
277 
278  if (i != attachments_.end()) {
279  attachments_.erase(i);
280  attachment->removeFromParent();
281 
282  if (attachments_.size() == 1) {
283  /*
284  * This was the last visible attachment, thus, we should switch
285  * the option control again.
286  */
287  attachOtherFile_->hide();
288  attachFile_->show();
289  attachFile_->item()->clicked()
290  .connect(attachments_.back(), &WWidget::show);
291  }
292  }
293 }
WInteractWidget * item()
Returns the clickable part.
Definition: Option.h:44
Option * attachOtherFile_
Option for attaching another file.
Definition: Composer.h:131
std::vector< AttachmentEdit * > attachments_
Array which holds all the attachments, including one extra invisible one.
Definition: Composer.h:134
Option * attachFile_
Option for attaching a file.
Definition: Composer.h:129

◆ saved()

void Composer::saved ( )
private

All attachments have been processed, determine the result of saving the message.

Definition at line 354 of file Composer.C.

355 {
356  /*
357  * All attachments have been processed.
358  */
359 
360  bool attachmentsFailed = false;
361  for (unsigned i = 0; i < attachments_.size() - 1; ++i)
362  if (attachments_[i]->uploadFailed()) {
363  attachmentsFailed = true;
364  break;
365  }
366 
367  if (attachmentsFailed) {
368  setStatus(tr("msg.attachment.failed"), "error");
369  } else {
370 #ifndef WIN32
371  time_t t = time(0);
372  struct tm td;
373  gmtime_r(&t, &td);
374  char buffer[100];
375  strftime(buffer, 100, "%H:%M", &td);
376 #else
377  char buffer[] = "server"; // Should fix this; for now just make sense
378 #endif
379  setStatus(tr("msg.ok"), "status");
380  statusMsg_->setText(std::string("Draft saved at ") + buffer);
381 
382  if (sending_) {
383  send.emit();
384  return;
385  }
386  }
387 
388  saving_ = false;
389  sending_ = false;
390 }
std::vector< AttachmentEdit * > attachments_
Array which holds all the attachments, including one extra invisible one.
Definition: Composer.h:134
Wt::Signal send
The message is ready to be sent...
Definition: Composer.h:93
bool saving_
state when waiting asyncrhonously for attachments to be uploaded
Definition: Composer.h:140
WText * statusMsg_
Definition: Composer.h:104
bool sending_
Definition: Composer.h:140
void setStatus(const WString &text, const WString &style)
Set the status, and apply the given style.
Definition: Composer.C:348

◆ saveNow()

void Composer::saveNow ( )
private

Slot attached to the Save now button.

Tries to save the mail message, and gives feedback on failure and on success.

Definition at line 308 of file Composer.C.

309 {
310  if (!saving_) {
311  saving_ = true;
312 
313  /*
314  * Check if any attachments still need to be uploaded.
315  * This may be the case when fileupload change events could not
316  * be caught (for example in Konqueror).
317  */
319 
320  for (unsigned i = 0; i < attachments_.size() - 1; ++i) {
321  if (attachments_[i]->uploadNow()) {
323 
324  // this will trigger attachmentDone() when done, see
325  // the AttachmentEdit constructor.
326  }
327  }
328 
329  std::cerr << "Attachments pending: " << attachmentsPending_ << std::endl;
331  setStatus(tr("msg.uploading"), "status");
332  else
333  saved();
334  }
335 }
void saved()
All attachments have been processed, determine the result of saving the message.
Definition: Composer.C:354
std::vector< AttachmentEdit * > attachments_
Array which holds all the attachments, including one extra invisible one.
Definition: Composer.h:134
bool saving_
state when waiting asyncrhonously for attachments to be uploaded
Definition: Composer.h:140
int attachmentsPending_
number of attachments waiting to be uploaded during saving
Definition: Composer.h:143
void setStatus(const WString &text, const WString &style)
Set the status, and apply the given style.
Definition: Composer.C:348

◆ sendIt()

void Composer::sendIt ( )
private

Slot attached to the Send button.

Tries to save the mail message, and if succesfull, sends it.

Definition at line 295 of file Composer.C.

296 {
297  if (!sending_) {
298  sending_ = true;
299 
300  /*
301  * First save -- this will check for the sending_ state
302  * signal if successfull.
303  */
304  saveNow();
305  }
306 }
void saveNow()
Slot attached to the Save now button.
Definition: Composer.C:308
bool sending_
Definition: Composer.h:140

◆ setAddressBook()

void Composer::setAddressBook ( const std::vector< Contact > &  addressBook)

Set the address book, for autocomplete suggestions.

Definition at line 69 of file Composer.C.

70 {
72 }
void setAddressBook(const std::vector< Contact > &contacts)
Set the address book.
ContactSuggestions * contactSuggestions_
The suggestions popup for the addressee edits.
Definition: Composer.h:116

◆ setMessage()

void Composer::setMessage ( const WString &  message)

Set the message.

Definition at line 49 of file Composer.C.

50 {
51  message_->setText(message);
52 }
const WString & message() const
Get the message.
Definition: Composer.C:92
WTextArea * message_
WTextArea for the main message.
Definition: Composer.h:137

◆ setStatus()

void Composer::setStatus ( const WString &  text,
const WString &  style 
)
private

Set the status, and apply the given style.

Definition at line 348 of file Composer.C.

349 {
350  statusMsg_->setText(text);
351  statusMsg_->setStyleClass(style);
352 }
WText * statusMsg_
Definition: Composer.h:104

◆ setSubject()

void Composer::setSubject ( const WString &  subject)

Set subject.

Definition at line 44 of file Composer.C.

45 {
46  subject_->setText(subject);
47 }
const WString & subject() const
Get the subject.
Definition: Composer.C:74
WLineEdit * subject_
The subject line edit.
Definition: Composer.h:119

◆ setTo()

void Composer::setTo ( const std::vector< Contact > &  to)

Set message To: contacts.

Definition at line 39 of file Composer.C.

40 {
42 }
AddresseeEdit * toEdit_
To: Addressees edit.
Definition: Composer.h:109
void setAddressees(const std::vector< Contact > &contacts)
Set a list of addressees.
Definition: AddresseeEdit.C:27
std::vector< Contact > to() const
Get the To: contacts.
Definition: Composer.C:54

◆ subject()

const WString & Composer::subject ( ) const

Get the subject.

Definition at line 74 of file Composer.C.

75 {
76  return subject_->text();
77 }
WLineEdit * subject_
The subject line edit.
Definition: Composer.h:119

◆ to()

std::vector< Contact > Composer::to ( ) const

Get the To: contacts.

Definition at line 54 of file Composer.C.

55 {
56  return toEdit_->addressees();
57 }
AddresseeEdit * toEdit_
To: Addressees edit.
Definition: Composer.h:109
std::vector< Contact > addressees() const
Get a list of addressees.
Definition: AddresseeEdit.C:74

Friends And Related Function Documentation

◆ AttachmentEdit

friend class AttachmentEdit
friend

Definition at line 194 of file Composer.h.

Member Data Documentation

◆ addbcc_

Option* Composer::addbcc_
private

Option for editing Bcc:

Definition at line 127 of file Composer.h.

◆ addcc_

Option* Composer::addcc_
private

Option for editing Cc:

Definition at line 125 of file Composer.h.

◆ attachFile_

Option* Composer::attachFile_
private

Option for attaching a file.

Definition at line 129 of file Composer.h.

◆ attachments_

std::vector<AttachmentEdit *> Composer::attachments_
private

Array which holds all the attachments, including one extra invisible one.

Definition at line 134 of file Composer.h.

◆ attachmentsPending_

int Composer::attachmentsPending_
private

number of attachments waiting to be uploaded during saving

Definition at line 143 of file Composer.h.

◆ attachOtherFile_

Option* Composer::attachOtherFile_
private

Option for attaching another file.

Definition at line 131 of file Composer.h.

◆ bccEdit_

AddresseeEdit* Composer::bccEdit_
private

Bcc: Addressees edit.

Definition at line 113 of file Composer.h.

◆ botDiscardButton_

WPushButton * Composer::botDiscardButton_
private

Definition at line 103 of file Composer.h.

◆ botSaveNowButton_

WPushButton * Composer::botSaveNowButton_
private

Definition at line 103 of file Composer.h.

◆ botSendButton_

WPushButton* Composer::botSendButton_
private

Definition at line 103 of file Composer.h.

◆ ccEdit_

AddresseeEdit* Composer::ccEdit_
private

Cc: Addressees edit.

Definition at line 111 of file Composer.h.

◆ contactSuggestions_

ContactSuggestions* Composer::contactSuggestions_
private

The suggestions popup for the addressee edits.

Definition at line 116 of file Composer.h.

◆ discard

Wt::Signal Composer::discard

The message must be discarded.

Definition at line 97 of file Composer.h.

◆ edits_

WTable* Composer::edits_
private

Definition at line 106 of file Composer.h.

◆ layout_

WContainerWidget* Composer::layout_
private

Definition at line 100 of file Composer.h.

◆ message_

WTextArea* Composer::message_
private

WTextArea for the main message.

Definition at line 137 of file Composer.h.

◆ options_

OptionList* Composer::options_
private

OptionsList for editing Cc or Bcc.

Definition at line 122 of file Composer.h.

◆ saving_

bool Composer::saving_
private

state when waiting asyncrhonously for attachments to be uploaded

Definition at line 140 of file Composer.h.

◆ send

Wt::Signal Composer::send

The message is ready to be sent...

Definition at line 93 of file Composer.h.

◆ sending_

bool Composer::sending_
private

Definition at line 140 of file Composer.h.

◆ statusMsg_

WText* Composer::statusMsg_
private

Definition at line 104 of file Composer.h.

◆ subject_

WLineEdit* Composer::subject_
private

The subject line edit.

Definition at line 119 of file Composer.h.

◆ toEdit_

AddresseeEdit* Composer::toEdit_
private

To: Addressees edit.

Definition at line 109 of file Composer.h.

◆ topDiscardButton_

WPushButton * Composer::topDiscardButton_
private

Definition at line 102 of file Composer.h.

◆ topSaveNowButton_

WPushButton * Composer::topSaveNowButton_
private

Definition at line 102 of file Composer.h.

◆ topSendButton_

WPushButton* Composer::topSendButton_
private

Definition at line 102 of file Composer.h.


The documentation for this class was generated from the following files:

Generated on Thu Aug 23 2018 for the C++ Web Toolkit (Wt) by doxygen 1.8.14