Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F630505
imageuploader.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
890 B
Referenced Files
None
Subscribers
None
imageuploader.h
View Options
#ifndef IMAGEUPLOADER_H
#define IMAGEUPLOADER_H
#include
<QHash>
#include
<QVariant>
class
QNetworkReply
;
class
ImageUploader
:
public
QObject
{
Q_OBJECT
public
:
static
ImageUploader
*
getNewUploader
(
QString
name
,
QVariantHash
&
options
=
QVariantHash
());
enum
Error
{
FileError
,
NetworkError
,
HostError
,
CancelError
,
OtherError
};
public
:
ImageUploader
(
QVariantHash
&
options
);
QVariantHash
&
options
()
{
return
mOptions
;
}
public
slots
:
virtual
void
upload
(
const
QString
&
fileName
)
=
0
;
virtual
void
cancel
()
=
0
;
virtual
void
retry
()
=
0
;
int
progress
()
const
{
return
mProgress
;
}
void
setProgress
(
int
progress
)
{
mProgress
=
progress
;
}
signals
:
void
uploaded
(
QString
,
QString
,
QString
);
void
error
(
Error
,
QString
,
QString
);
void
progressChange
(
int
);
protected
:
QVariantHash
mOptions
;
int
mProgress
;
};
#endif
// IMAGEUPLOADER_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 9:40 AM (5 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
146165
Default Alt Text
imageuploader.h (890 B)
Attached To
Mode
R63 darkscreen
Attached
Detach File
Event Timeline