Engauge Digitizer 2
Loading...
Searching...
No Matches
LoadImageFromUrl.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef LOAD_IMAGE_FROM_URL_H
8#define LOAD_IMAGE_FROM_URL_H
9
10#include <QImage>
11#ifdef NETWORKING
12#include <QtNetwork/QNetworkAccessManager>
13#endif
14#include <QObject>
15#include <QString>
16#include <QUrl>
17
18class MainWindow;
19class QUrl;
20
22class LoadImageFromUrl : public QObject
23{
25
26public:
28 LoadImageFromUrl(MainWindow &mainWindow);
30
32 void startLoadImage (const QUrl &url);
33
34private slots:
35 void slotFinished ();
36 void slotReadData ();
37
41
42private:
44
45 void deallocate ();
46
47 MainWindow &m_mainWindow;
48 QUrl m_url;
49#ifdef NETWORKING
50 QNetworkAccessManager m_http;
52#endif
53 QByteArray *m_buffer;
54};
55
56#endif // LOAD_IMAGE_FROM_URL_H
const int INNER_RADIUS_MIN
Load QImage from url. This is trivial for a file, but requires an asynchronous download step for http...
void signalImportImage(QString, QImage)
Send the imported image to MainWindow. This completes the asynchronous loading of the image.
void startLoadImage(const QUrl &url)
Start the asynchronous loading of an image from the specified url.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:92