Wt examples
3.3.6
|
An edit field for an email attachment. More...
#include <AttachmentEdit.h>
Classes | |
class | UploadInfo |
Public Member Functions | |
AttachmentEdit (Composer *composer, WContainerWidget *parent=0) | |
Creates an attachment edit field. More... | |
bool | uploadNow () |
Updates the file now. More... | |
bool | uploadFailed () const |
Returns whether the upload failed. More... | |
std::vector< Attachment > | attachments () |
Returns the attachment. More... | |
Signal< void > & | uploadDone () |
Signal emitted when new attachment(s) have been uploaded (or failed to upload. More... | |
Private Member Functions | |
void | uploaded () |
Slot triggered when the WFileUpload completed an upload. More... | |
void | fileTooLarge (::int64_t size) |
Slot triggered when the WFileUpload received an oversized file. More... | |
void | remove () |
Slot triggered when the users wishes to remove this attachment edit. More... | |
Private Attributes | |
Composer * | composer_ |
Signal< void > | uploadDone_ |
WFileUpload * | upload_ |
The WFileUpload control. More... | |
std::vector< UploadInfo * > | uploadInfo_ |
WText * | error_ |
The text box to display an error (empty or too big file) More... | |
Option * | remove_ |
The option to cancel the file upload. More... | |
bool | uploadFailed_ |
The state of the last upload process. More... | |
An edit field for an email attachment.
This widget managements one attachment edit: it shows a file upload control, handles the upload, and gives feed-back on the file uploaded.
This widget is part of the Wt composer example.
Definition at line 37 of file AttachmentEdit.h.
AttachmentEdit::AttachmentEdit | ( | Composer * | composer, |
WContainerWidget * | parent = 0 |
||
) |
Creates an attachment edit field.
Definition at line 71 of file AttachmentEdit.C.
std::vector< Attachment > AttachmentEdit::attachments | ( | ) |
|
private |
Slot triggered when the WFileUpload received an oversized file.
Definition at line 178 of file AttachmentEdit.C.
|
private |
Slot triggered when the users wishes to remove this attachment edit.
Definition at line 173 of file AttachmentEdit.C.
|
inline |
Signal emitted when new attachment(s) have been uploaded (or failed to upload.
Definition at line 63 of file AttachmentEdit.h.
|
private |
Slot triggered when the WFileUpload completed an upload.
Definition at line 145 of file AttachmentEdit.C.
|
inline |
Returns whether the upload failed.
Definition at line 54 of file AttachmentEdit.h.
bool AttachmentEdit::uploadNow | ( | ) |
Updates the file now.
Returns whether a new file will be uploaded. If so, the uploadDone signal will be signalled when the file is uploaded (or failed to upload).
Definition at line 129 of file AttachmentEdit.C.
|
private |
Definition at line 66 of file AttachmentEdit.h.
|
private |
The text box to display an error (empty or too big file)
Definition at line 90 of file AttachmentEdit.h.
|
private |
The option to cancel the file upload.
Definition at line 93 of file AttachmentEdit.h.
|
private |
The WFileUpload control.
Definition at line 71 of file AttachmentEdit.h.
|
private |
Definition at line 68 of file AttachmentEdit.h.
|
private |
The state of the last upload process.
Definition at line 96 of file AttachmentEdit.h.
|
private |
Definition at line 87 of file AttachmentEdit.h.