100 setStyleClass(
"darker");
103 WContainerWidget *horiz;
108 horiz =
layout_->addWidget(std::make_unique<WContainerWidget>());
109 horiz->setPadding(5);
110 topSendButton_ = horiz->addWidget(std::make_unique<WPushButton>(tr(
"msg.send")));
112 topSaveNowButton_ = horiz->addWidget(std::make_unique<WPushButton>(tr(
"msg.savenow")));
113 topDiscardButton_ = horiz->addWidget(std::make_unique<WPushButton>(tr(
"msg.discard")));
116 statusMsg_ = horiz->addWidget(std::make_unique<WText>());
126 edits_->setStyleClass(
"lighter");
127 edits_->resize(WLength(100, LengthUnit::Percentage), WLength::Auto);
128 edits_->elementAt(0, 0)->resize(WLength(1, LengthUnit::Percentage),
134 toEdit_ =
edits_->elementAt(0,1)->addWidget(std::make_unique<AddresseeEdit>(tr(
"msg.to"),
edits_->elementAt(0, 0)));
136 edits_->elementAt(0, 1)->setMargin(5, Side::Top);
137 ccEdit_ =
edits_->elementAt(1,1)->addWidget(std::make_unique<AddresseeEdit>(tr(
"msg.cc"),
edits_->elementAt(1, 0)));
138 bccEdit_ =
edits_->elementAt(2,1)->addWidget(std::make_unique<AddresseeEdit>(tr(
"msg.bcc"),
edits_->elementAt(2, 0)));
157 options_ =
edits_->elementAt(3, 1)->addWidget(std::make_unique<OptionList>());
158 std::unique_ptr<Option> addcc(
new Option(tr(
"msg.addcc")));
160 std::unique_ptr<Option> addbcc(
new Option(tr(
"msg.addbcc")));
169 edits_->elementAt(4, 0)->addWidget(std::make_unique<Label>(tr(
"msg.subject"),
edits_->elementAt(4, 0)));
170 subject_ =
edits_->elementAt(4, 1)->addWidget(std::make_unique<WLineEdit>());
171 subject_->resize(WLength(99, LengthUnit::Percentage), WLength::Auto);
176 edits_->elementAt(5, 0)->addWidget(std::make_unique<WImage>(
"icons/paperclip.png"));
177 edits_->elementAt(5, 0)->setContentAlignment(AlignmentFlag::Right | AlignmentFlag::Top);
178 edits_->elementAt(5, 0)->setPadding(3);
183 AttachmentEdit *attachmentEdit =
edits_->elementAt(5, 1)->addWidget(std::make_unique<AttachmentEdit>(
this));
190 attachFile_ =
edits_->elementAt(5, 1)->addWidget(std::make_unique<Option>(tr(
"msg.attachfile")));
205 horiz =
layout_->addWidget(std::make_unique<WContainerWidget>());
206 horiz->setPadding(5);
207 botSendButton_ = horiz->addWidget(std::make_unique<WPushButton>(tr(
"msg.send")));
209 botSaveNowButton_ = horiz->addWidget(std::make_unique<WPushButton>(tr(
"msg.savenow")));
210 botDiscardButton_ = horiz->addWidget(std::make_unique<WPushButton>(tr(
"msg.discard")));
229 addcc_->item()->clicked().connect(
addcc_, &WWidget::hide);
231 addcc_->item()->clicked().connect(
ccEdit_, &WWidget::setFocus);