BALL
1.4.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
FORMAT
pubchemDownloader.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_FORMAT_PUBCHEMDOWNLOADER_H
6
#define BALL_FORMAT_PUBCHEMDOWNLOADER_H
7
8
#ifndef BALL_SYSTEM_SIMPLEDOWNLOADER_H
9
# include <
BALL/SYSTEM/simpleDownloader.h
>
10
#endif
11
12
#include <QDomDocument>
13
14
namespace
BALL
15
{
16
class
BALL_EXPORT
PubChemDownloader
17
:
public
QObject
18
{
19
Q_OBJECT
20
21
public
:
22
PubChemDownloader
();
23
virtual
~PubChemDownloader
() {};
24
25
bool
downloadSDF(
const
String
& query,
const
String
& filename,
bool
blocking =
true
);
26
27
public
slots:
28
void
downloadFinished(
bool
error);
29
void
dataTransferProgress(qint64 done, qint64 total);
30
31
signals:
32
void
downloadProgress(qint64 done, qint64 total);
33
void
downloadFinished(
const
QString& filename);
34
35
protected
:
36
QDomDocument pollPubChem_(
const
QString& request_id);
37
void
buildSimpleTree_(
const
String
& names);
38
void
addTextNode_(
const
String
& value);
39
40
String
esearch_base_url_
;
41
String
pug_base_url_
;
42
43
SimpleDownloader
dl_
;
44
QDomDocument
request_
;
45
QDomElement
last_node_
;
46
QDomElement
current_node_
;
47
48
QFile
outfile_
;
49
QFtp
ftp_
;
50
};
51
}
52
53
#endif // BALL_FORMAT_PUBCHEMDOWNLOADER_H
54
Generated by
1.8.1.2