Wt
3.7.1
|
A nested class of WFileDropWidget representing a file. More...
Public Member Functions | |
const std::string & | clientFileName () const |
Returns the client filename. | |
const std::string & | mimeType () const |
Returns the mime-type of the file. | |
::uint64_t | size () const |
Returns the size of the file. | |
const Http::UploadedFile & | uploadedFile () const |
Returns the uploaded file as a Http::UploadedFile. More... | |
bool | uploadFinished () const |
Returns true if the upload is finished. More... | |
Signal< ::uint64_t, ::uint64_t > & | dataReceived () |
This signal allows you to track the upload progress of the file. More... | |
Signal & | uploaded () |
This signal is triggered when the upload is finished. More... | |
Public Member Functions inherited from Wt::WObject | |
WObject (WObject *parent=0) | |
Create a WObject with a given parent object. More... | |
virtual | ~WObject () |
Destructor. More... | |
virtual const std::string | id () const |
Returns the (unique) identifier for this object. More... | |
virtual void | setObjectName (const std::string &name) |
Sets an object name. More... | |
virtual std::string | objectName () const |
Returns the object name. More... | |
void | resetLearnedSlots () |
Resets learned stateless slot implementations. More... | |
template<class T > | |
void | resetLearnedSlot (void(T::*method)()) |
Resets a learned stateless slot implementation. More... | |
template<class T > | |
WStatelessSlot * | implementStateless (void(T::*method)()) |
Declares a slot to be stateless and learn client-side behaviour on first invocation. More... | |
template<class T > | |
WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
Declares a slot to be stateless and learn client-side behaviour in advance. More... | |
void | isNotStateless () |
Marks the current function as not stateless. More... | |
template<class T > | |
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
Provides a JavaScript implementation for a method. More... | |
void | addChild (WObject *child) |
Adds a child object. More... | |
virtual void | removeChild (WObject *child) |
Removes a child object. More... | |
const std::vector< WObject * > & | children () const |
Returns the children. | |
WObject * | parent () const |
Returns the parent object. | |
Additional Inherited Members | |
Public Types inherited from Wt::WObject | |
typedef void(WObject::* | Method) () |
Typedef for a WObject method without arguments. | |
Protected Member Functions inherited from Wt::WObject | |
virtual WStatelessSlot * | getStateless (Method method) |
On-demand stateless slot implementation. More... | |
Static Protected Member Functions inherited from Wt::WObject | |
static WObject * | sender () |
Returns the sender of the current slot call. More... | |
A nested class of WFileDropWidget representing a file.
The methods returning the filename, mime-type and size return valid values if the upload of this file is not yet finished. The method uploadedFile() is only available after the upload is finished.
Signal< ::uint64_t, ::uint64_t >& Wt::WFileDropWidget::File::dataReceived | ( | ) |
This signal allows you to track the upload progress of the file.
The first argument is the number of bytes received so far, and the second argument is the total number of bytes.
Signal& Wt::WFileDropWidget::File::uploaded | ( | ) |
This signal is triggered when the upload is finished.
This is also signalled using the WFileDropWidget uploaded() signal.
const Http::UploadedFile & Wt::WFileDropWidget::File::uploadedFile | ( | ) | const |
Returns the uploaded file as a Http::UploadedFile.
This method will throw an expection if the upload is not yet finished.
bool Wt::WFileDropWidget::File::uploadFinished | ( | ) | const |
Returns true if the upload is finished.
When this method returns true, the uploaded file is available on the server.