BALL 1.5.0
Loading...
Searching...
No Matches
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
14#endif
15
16#ifndef BALL_DATATYPE_HASHSET_H
18#endif
19
20#include <BALL/VIEW/UIC/ui_downloadPDBFile.h>
21
22#include <QtNetwork/QNetworkReply>
23
24class QProgressBar;
25class QNetworkAccessManager;
26
27namespace BALL
28{
29 namespace VIEW
30 {
35 : public QDialog,
36 public Ui_DownloadPDBFileData,
37 public ModularWidget
38 {
39 Q_OBJECT
40 public:
42
43
44 DownloadPDBFile(QWidget* parent = 0, const char* name = "DownloadPDBFileDialog",
45 bool modal = false, Qt::WindowFlags fl = 0 );
46
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
71
72 public Q_SLOTS:
73
76
78 void idChanged();
79
81 virtual void abort();
82
85
87 void downloadProgress(qint64 received, qint64 total);
88
89 protected:
90
91 //_
93
94 //_
96
97 bool threadedDownload_(const String& url);
98 void removeFile_(const String& filename);
99
101 bool error_;
102
104
105 // e.g. gif images if not supported
107
108 QAction* menu_id_;
109 String prefix_, 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
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
HashMap class based on the STL map (containing serveral convenience functions)
QNetworkAccessManager * network_manager_
void checkMenu(MainControl &mc)
bool threadedDownload_(const String &url)
void removeFile_(const String &filename)
void downloadProgress(qint64 received, qint64 total)
HashSet< String > unsupported_images_
HashMap< String, QImage > image_cache_
#define BALL_VIEW_EXPORT