Geometrize  1.0
An application for geometrizing images into geometric primitives
Namespaces | Classes | Functions
geometrize::network Namespace Reference

Namespaces

 completionhandlers
 

Classes

class  Downloader
 The Downloader class is a helper class for downloading files over the network. More...
 

Functions

void downloadImage (const QUrl &url, const std::function< void(network::Downloader *self, QNetworkReply::NetworkError error)> &onComplete)
 downloadImage Downloads an image over the network. More...
 
void downloadWebpage (const QUrl &url, const std::function< void(network::Downloader *self, QNetworkReply::NetworkError error)> &onComplete)
 downloadWebpage Downloads a whole webpage over the network. More...
 

Function Documentation

◆ downloadImage()

void geometrize::network::downloadImage ( const QUrl &  url,
const std::function< void(network::Downloader *self, QNetworkReply::NetworkError error)> &  onComplete 
)

downloadImage Downloads an image over the network.

Parameters
urlThe URL of the image.
onCompleteA callback invoked when the download completes, or fails. Note that this callback is usually responsible for deleting the downloader.
14 {
15  new network::Downloader(url, onComplete);
16 }
Here is the caller graph for this function:

◆ downloadWebpage()

void geometrize::network::downloadWebpage ( const QUrl &  url,
const std::function< void(network::Downloader *self, QNetworkReply::NetworkError error)> &  onComplete 
)

downloadWebpage Downloads a whole webpage over the network.

Parameters
urlThe URL of the webpage.
onCompleteA callback invoked when the webpage download completes, or fails. Note that this callback is usually responsible for deleting the downloader.
19 {
20  new network::Downloader(url, onComplete);
21 }
Here is the caller graph for this function: