BALL
1.4.2
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
VIEW
DIALOGS
downloadPDBFile.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_VIEW_DIALOGS_DOWNLOADPDBFILE_H
6
#define BALL_VIEW_DIALOGS_DOWNLOADPDBFILE_H
7
8
#ifndef BALL_COMMON_GLOBAL_H
9
# include <
BALL/COMMON/global.h
>
10
#endif
11
12
#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
13
# include <
BALL/VIEW/KERNEL/modularWidget.h
>
14
#endif
15
16
#ifndef BALL_DATATYPE_HASHSET_H
17
# include <
BALL/DATATYPE/hashSet.h
>
18
#endif
19
20
#include <BALL/VIEW/UIC/ui_downloadPDBFile.h>
21
22
#include <QtNetwork/QNetworkReply>
23
24
class
QProgressBar;
25
class
QNetworkAccessManager;
26
27
namespace
BALL
28
{
29
namespace
VIEW
30
{
34
class
BALL_VIEW_EXPORT
DownloadPDBFile
35
:
public
QDialog
,
36
public
Ui_DownloadPDBFileData,
37
public
ModularWidget
38
{
39
Q_OBJECT
40
public
:
41
BALL_EMBEDDABLE
(
DownloadPDBFile
,
ModularWidget
)
42
43
44
DownloadPDBFile
(
QWidget
* parent = 0,
const
char
* name =
"DownloadPDBFileDialog"
,
45
bool
modal = FALSE, Qt::WFlags fl = 0 );
46
48
~
DownloadPDBFile
();
49
51
virtual
void
initializeWidget(
VIEW::MainControl
& main_control);
52
54
virtual
void
fetchPreferences(
INIFile
& inifile);
55
57
virtual
void
writePreferences(
INIFile
& inifile);
58
62
void
setPrefix
(
String
s) { prefix_ = s;}
63
67
void
setSuffix
(
String
s) { suffix_ = s;}
68
70
void
checkMenu(
MainControl
& mc);
71
72
public
slots:
73
75
void
slotDownload();
76
78
void
idChanged();
79
81
virtual
void
abort();
82
84
void
downloadFinished();
85
87
void
downloadProgress(qint64 received, qint64 total);
88
89
protected
:
90
91
//_
92
void
downloadStarted_();
93
94
//_
95
void
downloadEnded_();
96
97
bool
threadedDownload_(
const
String
& url);
98
void
removeFile_(
const
String
& filename);
99
100
bool
aborted_
;
101
bool
error_
;
102
103
HashMap<String, QImage>
image_cache_
;
104
105
// e.g. gif images if not supported
106
HashSet<String>
unsupported_images_
;
107
108
QAction*
menu_id_
;
109
String
prefix_,
suffix_
;
110
111
// the current network reply
112
QNetworkReply*
current_reply_
;
113
114
// the current progress bar
115
QProgressBar*
progress_bar_
;
116
QNetworkAccessManager*
network_manager_
;
117
};
118
119
}
120
}
//namespaces
121
#endif
Generated by
1.8.3.1