Go to the documentation of this file.
16 #include <Wt/WContainerWidget>
18 #include <Wt/WLineEdit>
19 #include <Wt/WPushButton>
22 #include <Wt/WTableCell>
23 #include <Wt/WStringUtil>
26 : WCompositeWidget(parent),
30 setImplementation(
layout_ =
new WContainerWidget());
80 std::vector<Attachment> toadd =
attachments_[i]->attachments();
95 setStyleClass(
"darker");
98 WContainerWidget *horiz;
103 horiz =
new WContainerWidget(
layout_);
104 horiz->setPadding(5);
121 edits_->setStyleClass(
"lighter");
122 edits_->resize(WLength(100, WLength::Percentage), WLength::Auto);
123 edits_->elementAt(0, 0)->resize(WLength(1, WLength::Percentage),
132 edits_->elementAt(0, 1)->setMargin(5, Top);
163 new Label(tr(
"msg.subject"),
edits_->elementAt(4, 0));
165 subject_->resize(WLength(99, WLength::Percentage), WLength::Auto);
170 new WImage(
"icons/paperclip.png",
edits_->elementAt(5, 0));
171 edits_->elementAt(5, 0)->setContentAlignment(AlignRight | AlignTop);
172 edits_->elementAt(5, 0)->setPadding(3);
200 horiz =
new WContainerWidget(
layout_);
201 horiz->setPadding(5);
269 std::vector<AttachmentEdit *>::iterator i
314 for (
unsigned i = 0; i <
attachments_.size() - 1; ++i) {
325 setStatus(tr(
"msg.uploading"),
"status");
354 bool attachmentsFailed =
false;
357 attachmentsFailed =
true;
361 if (attachmentsFailed) {
362 setStatus(tr(
"msg.attachment.failed"),
"error");
369 strftime(buffer, 100,
"%H:%M", &td);
371 char buffer[] =
"server";
374 statusMsg_->setText(std::string(
"Draft saved at ") + buffer);
WPushButton * botSendButton_
Option * attachFile_
Option for attaching a file.
void sendIt()
Slot attached to the Send button.
Option * addcc_
Option for editing Cc:
WPushButton * botSaveNowButton_
Wt::Signal< void > send
The message is ready to be sent...
std::vector< Contact > addressees() const
Get a list of addressees.
void setMessage(const WString &message)
Set the message.
void setTo(const std::vector< Contact > &to)
Set message To: contacts.
WPushButton * topDiscardButton_
ContactSuggestions * contactSuggestions_
The suggestions popup for the addressee edits.
std::vector< Contact > cc() const
Get the Cc: contacts.
void setStatus(const WString &text, const WString &style)
Set the status, and apply the given style.
bool saving_
state when waiting asyncrhonously for attachments to be uploaded
void setAddressees(const std::vector< Contact > &contacts)
Set a list of addressees.
WTextArea * message_
WTextArea for the main message.
void setAddressBook(const std::vector< Contact > &addressBook)
Set the address book, for autocomplete suggestions.
WPushButton * botDiscardButton_
Option * addbcc_
Option for editing Bcc:
void attachmentDone()
Slotcalled when an attachment has been uploaded.
const WString & subject() const
Get the subject.
const WString & message() const
Get the message.
AddresseeEdit * ccEdit_
Cc: Addressees edit.
void attachMore()
Add an attachment edit.
Option * attachOtherFile_
Option for attaching another file.
friend class AttachmentEdit
void setSubject(const WString &subject)
Set subject.
Composer(WContainerWidget *parent=0)
Construct a new Composer.
OptionList * options_
OptionsList for editing Cc or Bcc.
std::vector< Contact > to() const
Get the To: contacts.
void saved()
All attachments have been processed, determine the result of saving the message.
void saveNow()
Slot attached to the Save now button.
void discardIt()
Slot attached to the Discard button.
WLineEdit * subject_
The subject line edit.
int attachmentsPending_
number of attachments waiting to be uploaded during saving
std::vector< AttachmentEdit * > attachments_
Array which holds all the attachments, including one extra invisible one.
An edit field for an email addressee.
Wt::Signal< void > discard
The message must be discarded.
WPushButton * topSaveNowButton_
AddresseeEdit * toEdit_
To: Addressees edit.
void add(Option *option)
Add an Option to the list.
An edit field for an email attachment.
A list of options, separated by '|'.
void removeAttachment(AttachmentEdit *attachment)
Remove the given attachment edit.
void update()
Updates the stateless implementations after an Option has been hidden or shown.
std::vector< Attachment > attachments() const
Get the list of attachments.
std::vector< Contact > bcc() const
Get the Bc: contacts.
AddresseeEdit * bccEdit_
Bcc: Addressees edit.
WContainerWidget * layout_
WPushButton * topSendButton_
WInteractWidget * item()
Returns the clickable part.
Generated on Fri Apr 24 2020 for the
C++ Web Toolkit (Wt) by
1.8.17