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 "
UrlDirty.h
"
17
18
class
MainWindow
;
19
21
class
LoadImageFromUrl
:
public
QObject
22
{
23
Q_OBJECT;
24
25
public
:
27
LoadImageFromUrl
(
MainWindow
&mainWindow);
28
~LoadImageFromUrl
();
29
31
void
startLoadImage
(
const
UrlDirty
&url);
32
33
private
slots:
34
void
slotFinished ();
35
void
slotReadData ();
36
37
signals:
39
void
signalImportImage
(QString, QImage);
40
41
private
:
42
LoadImageFromUrl
();
43
44
void
deallocate ();
45
46
MainWindow
&m_mainWindow;
47
UrlDirty
m_url;
48
#ifdef NETWORKING
49
QNetworkAccessManager m_http;
50
QNetworkReply *m_reply;
51
#endif
52
QByteArray *m_buffer;
53
};
54
55
#endif
// LOAD_IMAGE_FROM_URL_H
UrlDirty.h
LoadImageFromUrl::~LoadImageFromUrl
~LoadImageFromUrl()
Definition
LoadImageFromUrl.cpp:30
LoadImageFromUrl::startLoadImage
void startLoadImage(const UrlDirty &url)
Start the asynchronous loading of an image from the specified url.
Definition
LoadImageFromUrl.cpp:75
LoadImageFromUrl::LoadImageFromUrl
LoadImageFromUrl(MainWindow &mainWindow)
Single constructor.
Definition
LoadImageFromUrl.cpp:19
LoadImageFromUrl::signalImportImage
void signalImportImage(QString, QImage)
Send the imported image to MainWindow. This completes the asynchronous loading of the image.
MainWindow
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition
MainWindow.h:95
UrlDirty
Adds ability to QUrl to cleanup url path.
Definition
UrlDirty.h:16
Generated on
for Engauge Digitizer by
1.14.0