BALL
1.5.0
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::WindowFlags 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
Q_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
String
biounit_suffix_
;
111
112
// the current network reply
113
QNetworkReply*
current_reply_
;
114
115
// the current progress bar
116
QProgressBar*
progress_bar_
;
117
QNetworkAccessManager*
network_manager_
;
118
};
119
120
}
121
}
//namespaces
122
#endif
BALL::VIEW::DownloadPDBFile::downloadStarted_
void downloadStarted_()
global.h
BALL::VIEW::DownloadPDBFile::biounit_suffix_
String biounit_suffix_
Definition:
downloadPDBFile.h:110
BALL::VIEW::DownloadPDBFile::idChanged
void idChanged()
BALL::VIEW::DownloadPDBFile::downloadProgress
void downloadProgress(qint64 received, qint64 total)
BALL::VIEW::DownloadPDBFile::downloadFinished
void downloadFinished()
BALL::VIEW::DownloadPDBFile::suffix_
String suffix_
Definition:
downloadPDBFile.h:109
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions)
Definition:
hashMap.h:74
QDialog
BALL::VIEW::DownloadPDBFile::error_
bool error_
Definition:
downloadPDBFile.h:101
BALL::VIEW::DownloadPDBFile::downloadEnded_
void downloadEnded_()
BALL::String
Definition:
string.h:57
BALL::VIEW::DownloadPDBFile
Definition:
downloadPDBFile.h:38
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition:
embeddable.h:31
BALL::VIEW::MainControl
Definition:
mainControl.h:118
BALL
Definition:
constants.h:13
QWidget
BALL::VIEW::DownloadPDBFile::setSuffix
void setSuffix(String s)
Definition:
downloadPDBFile.h:67
BALL::HashSet< String >
modularWidget.h
BALL::VIEW::DownloadPDBFile::menu_id_
QAction * menu_id_
Definition:
downloadPDBFile.h:108
BALL::VIEW::DownloadPDBFile::unsupported_images_
HashSet< String > unsupported_images_
Definition:
downloadPDBFile.h:106
BALL::VIEW::DownloadPDBFile::removeFile_
void removeFile_(const String &filename)
BALL::VIEW::DownloadPDBFile::network_manager_
QNetworkAccessManager * network_manager_
Definition:
downloadPDBFile.h:117
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition:
COMMON/global.h:52
BALL::VIEW::DownloadPDBFile::checkMenu
void checkMenu(MainControl &mc)
hashSet.h
BALL::VIEW::DownloadPDBFile::aborted_
bool aborted_
Definition:
downloadPDBFile.h:100
BALL::INIFile
Definition:
INIFile.h:29
BALL::VIEW::DownloadPDBFile::progress_bar_
QProgressBar * progress_bar_
Definition:
downloadPDBFile.h:116
BALL::VIEW::DownloadPDBFile::slotDownload
void slotDownload()
BALL::VIEW::DownloadPDBFile::threadedDownload_
bool threadedDownload_(const String &url)
BALL::VIEW::DownloadPDBFile::current_reply_
QNetworkReply * current_reply_
Definition:
downloadPDBFile.h:113
BALL::VIEW::ModularWidget
Definition:
modularWidget.h:63
BALL::VIEW::DownloadPDBFile::abort
virtual void abort()
BALL::VIEW::DownloadPDBFile::image_cache_
HashMap< String, QImage > image_cache_
Definition:
downloadPDBFile.h:103
Generated by
1.8.20