53 #include <QNetworkReply>
105 const auto urls = downloadDialog->
getUrls();
118 downloadFuture.
then([
this](
auto) { cancelButton->
setEnabled(
false); })
133 .onCanceled([
this] {
updateStatus(
tr(
"Download has been canceled.")); })
140 .onFailed([
this](
const std::exception& ex) {
167 for (
auto url : urls) {
174 if (promise->isCanceled()) {
175 if (!promise->future().isFinished())
181 if (!promise->future().isFinished())
182 throw reply->error();
188 if (promise->future().resultCount() == urls.
size()) {
193 promise->setException(std::make_exception_ptr(
error));
196 const auto ex = std::make_exception_ptr(
197 std::runtime_error(
"Unknown error occurred while downloading."));
198 promise->setException(ex);
205 return promise->future();
214 for (
auto imgData :
data) {
216 image.loadFromData(imgData);
218 throw std::runtime_error(
"Failed to load image.");
239 while ((
child = imagesLayout->
takeAt(0)) !=
nullptr) {
247 for (
int i = 0;
i < dim; ++
i) {
248 for (
int j = 0;
j < dim; ++
j) {
264 for (
auto reply : replies)
small capitals from c petite p scientific i
[1]
QList< QUrl > getUrls() const
QList< QImage > scaled() const
[13]
void showImages(const QList< QImage > &images)
[14]
QFuture< QByteArray > download(const QList< QUrl > &urls)
[7]
void updateStatus(const QString &msg)
void initLayout(qsizetype count)
Images(QWidget *parent=nullptr)
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
void addStretch(int stretch=0)
void addLayout(QLayout *layout, int stretch=0)
QList< T > results() const
QFuture< ResultType< Function > > then(Function &&function)
The QGridLayout class lays out widgets in a grid.
void addWidget(QWidget *w)
QLayoutItem * takeAt(int index) override
The QHBoxLayout class lines up widgets horizontally.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QLabel widget provides a text or image display.
The QLayoutItem class provides an abstract item that a QLayout manipulates.
virtual QWidget * widget() const
qsizetype size() const noexcept
void push_back(parameter_type t)
void append(parameter_type t)
QNetworkReply * get(const QNetworkRequest &request)
NetworkError error() const
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
The QSharedPointer class holds a strong reference to a shared pointer.
The QStatusBar class provides a horizontal bar suitable for presenting status information.
void showMessage(const QString &text, int timeout=0)
The QString class provides a Unicode character string.
The QVBoxLayout class lines up widgets vertically.
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
[3]
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QList< QImage > images
[6]
QUrl url("http://www.example.com/List of holidays.xml")
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent