AttachmentEdit Class Reference
[Composer example]

An edit field for an email attachment. More...

#include <AttachmentEdit.h>

Inheritance diagram for AttachmentEdit:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 AttachmentEdit (Composer *composer, WContainerWidget *parent=0)
 Create an attachment edit field.
 ~AttachmentEdit ()
bool uploadNow ()
 Update the file now.
bool uploadFailed () const
 Return whether the upload failed.
bool include () const
 Return whether this attachment must be included in the message.
Attachment attachment ()
 Return the attachment.

Public Attributes

Signal< void > uploadDone
 Signal emitted when a new attachment has been uploaded (or failed to upload.

Private Slots

void uploaded ()
 Slot triggered when the WFileUpload completed an upload.
void fileTooLarge (int size)
 Slot triggered when the WFileUpload received an oversized file.
void remove ()
 Slot triggered when the users wishes to remove this attachment edit.

Private Attributes

Composercomposer_
WFileUploadupload_
 The WFileUpload control.
WTextuploaded_
 The text describing the uploaded file.
WCheckBoxkeep_
 The check box to keep or discard the uploaded file.
Optionremove_
 The option to remove the file.
WTexterror_
 The text box to display an error (empty or too big file).
bool uploadFailed_
 The state of the last upload process.
std::wstring fileName_
 The filename of the uploaded file.
std::string spoolFileName_
 The filename of the local spool file.
std::wstring contentDescription_
 The content description that was sent along with the file.
bool taken_
 Whether the spool file is "taken" and is no longer managed by the edit.


Detailed Description

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.


Constructor & Destructor Documentation

AttachmentEdit::AttachmentEdit ( Composer composer,
WContainerWidget parent = 0 
)

Create an attachment edit field.

Definition at line 24 of file AttachmentEdit.C.

AttachmentEdit::~AttachmentEdit (  ) 

Definition at line 85 of file AttachmentEdit.C.


Member Function Documentation

bool AttachmentEdit::uploadNow (  ) 

Update 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 92 of file AttachmentEdit.C.

bool AttachmentEdit::uploadFailed (  )  const [inline]

Return whether the upload failed.

Definition at line 55 of file AttachmentEdit.h.

bool AttachmentEdit::include (  )  const

Return whether this attachment must be included in the message.

Definition at line 176 of file AttachmentEdit.C.

Attachment AttachmentEdit::attachment (  ) 

Return the attachment.

Definition at line 181 of file AttachmentEdit.C.

void AttachmentEdit::uploaded (  )  [private, slot]

Slot triggered when the WFileUpload completed an upload.

Definition at line 108 of file AttachmentEdit.C.

void AttachmentEdit::fileTooLarge ( int  size  )  [private, slot]

Slot triggered when the WFileUpload received an oversized file.

Definition at line 165 of file AttachmentEdit.C.

void AttachmentEdit::remove (  )  [private, slot]

Slot triggered when the users wishes to remove this attachment edit.

Definition at line 160 of file AttachmentEdit.C.


Member Data Documentation

Signal<void> AttachmentEdit::uploadDone

Signal emitted when a new attachment has been uploaded (or failed to upload.

Definition at line 68 of file AttachmentEdit.h.

Composer* AttachmentEdit::composer_ [private]

Definition at line 71 of file AttachmentEdit.h.

WFileUpload* AttachmentEdit::upload_ [private]

The WFileUpload control.

Definition at line 74 of file AttachmentEdit.h.

WText* AttachmentEdit::uploaded_ [private]

The text describing the uploaded file.

Definition at line 77 of file AttachmentEdit.h.

WCheckBox* AttachmentEdit::keep_ [private]

The check box to keep or discard the uploaded file.

Definition at line 80 of file AttachmentEdit.h.

Option* AttachmentEdit::remove_ [private]

The option to remove the file.

Definition at line 83 of file AttachmentEdit.h.

WText* AttachmentEdit::error_ [private]

The text box to display an error (empty or too big file).

Definition at line 86 of file AttachmentEdit.h.

bool AttachmentEdit::uploadFailed_ [private]

The state of the last upload process.

Definition at line 89 of file AttachmentEdit.h.

std::wstring AttachmentEdit::fileName_ [private]

The filename of the uploaded file.

Definition at line 92 of file AttachmentEdit.h.

std::string AttachmentEdit::spoolFileName_ [private]

The filename of the local spool file.

Definition at line 95 of file AttachmentEdit.h.

std::wstring AttachmentEdit::contentDescription_ [private]

The content description that was sent along with the file.

Definition at line 98 of file AttachmentEdit.h.

bool AttachmentEdit::taken_ [private]

Whether the spool file is "taken" and is no longer managed by the edit.

Definition at line 101 of file AttachmentEdit.h.


The documentation for this class was generated from the following files:
Generated on Mon Apr 14 15:15:04 2008 for Wt by doxygen 1.5.3