Engauge Digitizer
2
Loading...
Searching...
No Matches
Load
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
18
class
MainWindow
;
19
class
QUrl
;
20
22
class
LoadImageFromUrl
:
public
QObject
23
{
24
Q_OBJECT
;
25
26
public
:
28
LoadImageFromUrl
(
MainWindow
&mainWindow);
29
~LoadImageFromUrl
();
30
32
void
startLoadImage
(
const
QUrl
&
url
);
33
34
private
slots
:
35
void
slotFinished ();
36
void
slotReadData ();
37
38
signals
:
40
void
signalImportImage
(
QString
,
QImage
);
41
42
private
:
43
LoadImageFromUrl
();
44
45
void
deallocate ();
46
47
MainWindow
&m_mainWindow;
48
QUrl
m_url;
49
#ifdef NETWORKING
50
QNetworkAccessManager
m_http
;
51
QNetworkReply
*
m_reply
;
52
#endif
53
QByteArray
*m_buffer;
54
};
55
56
#endif
// LOAD_IMAGE_FROM_URL_H
INNER_RADIUS_MIN
const int INNER_RADIUS_MIN
Definition
DlgSettingsDigitizeCurve.cpp:35
LoadImageFromUrl
Load QImage from url. This is trivial for a file, but requires an asynchronous download step for http...
Definition
LoadImageFromUrl.h:23
LoadImageFromUrl::~LoadImageFromUrl
~LoadImageFromUrl()
Definition
LoadImageFromUrl.cpp:30
LoadImageFromUrl::signalImportImage
void signalImportImage(QString, QImage)
Send the imported image to MainWindow. This completes the asynchronous loading of the image.
LoadImageFromUrl::startLoadImage
void startLoadImage(const QUrl &url)
Start the asynchronous loading of an image from the specified url.
Definition
LoadImageFromUrl.cpp:75
MainWindow
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition
MainWindow.h:92
Generated on Wed Aug 3 2022 00:00:00 for Engauge Digitizer by
1.10.0