Wt examples 3.3.12
AttachmentEdit.h
Go to the documentation of this file.
1// This may look like C code, but it's really -*- C++ -*-
2/*
3 * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
4 *
5 * See the LICENSE file for terms of use.
6 */
7#ifndef ATTACHMENT_EDIT_H_
8#define ATTACHMENT_EDIT_H_
9
10#include <Wt/WContainerWidget>
11
12namespace Wt {
13 class WFileUpload;
14 class WText;
15 class WCheckBox;
16}
17
18class Attachment;
19class Composer;
20class Option;
21
22using namespace Wt;
23
28
38{
39public:
43
50 bool uploadNow();
51
54 bool uploadFailed() const { return uploadFailed_; }
55
58 std::vector<Attachment> attachments();
59
64
65private:
67
69
72
86
87 std::vector<UploadInfo *> uploadInfo_;
88
91
94
97
99 void uploaded();
100
102 void fileTooLarge(::int64_t size);
103
105 void remove();
106};
107
110#endif // ATTACHMENT_EDIT_H_
WCheckBox * keep_
The check box to keep or discard the uploaded file.
WAnchor * downloadLink_
Anchor referencing the file.
Http::UploadedFile info_
An edit field for an email attachment.
bool uploadNow()
Updates the file now.
Signal< void > uploadDone_
void remove()
Slot triggered when the users wishes to remove this attachment edit.
WText * error_
The text box to display an error (empty or too big file)
bool uploadFailed() const
Returns whether the upload failed.
Composer * composer_
Option * remove_
The option to cancel the file upload.
Signal< void > & uploadDone()
Signal emitted when new attachment(s) have been uploaded (or failed to upload.
bool uploadFailed_
The state of the last upload process.
void uploaded()
Slot triggered when the WFileUpload completed an upload.
std::vector< Attachment > attachments()
Returns the attachment.
WFileUpload * upload_
The WFileUpload control.
std::vector< UploadInfo * > uploadInfo_
void fileTooLarge(::int64_t size)
Slot triggered when the WFileUpload received an oversized file.
An email attachment.
Definition Attachment.h:20
An E-mail composer widget.
Definition Composer.h:41
A clickable option.
Definition Option.h:32
WWidget * parent() const

Generated on Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8