Loading...
Searching...
No Matches
downloadPDBFile.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_DIALOGS_DOWNLOADPDBFILE_H
#define BALL_VIEW_DIALOGS_DOWNLOADPDBFILE_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
# include <BALL/VIEW/KERNEL/modularWidget.h>
#endif
#ifndef BALL_DATATYPE_HASHSET_H
# include <BALL/DATATYPE/hashSet.h>
#endif
#include <BALL/VIEW/UIC/ui_downloadPDBFile.h>
#include <QtNetwork/QNetworkReply>
class QProgressBar;
class QNetworkAccessManager;
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT DownloadPDBFile
: public QDialog,
public Ui_DownloadPDBFileData,
public ModularWidget
{
Q_OBJECT
public:
BALL_EMBEDDABLE(DownloadPDBFile, ModularWidget)
DownloadPDBFile(QWidget* parent = 0, const char* name = "DownloadPDBFileDialog",
bool modal = false, Qt::WindowFlags fl = 0 );
~DownloadPDBFile();
virtual void initializeWidget(VIEW::MainControl& main_control);
virtual void fetchPreferences(INIFile& inifile);
virtual void writePreferences(INIFile& inifile);
void setPrefix(String s) { prefix_ = s;}
void setSuffix(String s) { suffix_ = s;}
void checkMenu(MainControl& mc);
public Q_SLOTS:
void slotDownload();
void idChanged();
virtual void abort();
void downloadFinished();
void downloadProgress(qint64 received, qint64 total);
protected:
//_
void downloadStarted_();
//_
void downloadEnded_();
bool threadedDownload_(const String& url);
void removeFile_(const String& filename);
bool aborted_;
bool error_;
HashMap<String, QImage> image_cache_;
// e.g. gif images if not supported
HashSet<String> unsupported_images_;
QAction* menu_id_;
String prefix_, suffix_;
String biounit_suffix_;
// the current network reply
QNetworkReply* current_reply_;
// the current progress bar
QProgressBar* progress_bar_;
QNetworkAccessManager* network_manager_;
};
}
} //namespaces
#endif
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::HashSet
Definition hashSet.h:46
BALL::INIFile
Definition INIFile.h:29
BALL::String
Definition string.h:57
BALL::VIEW::DownloadPDBFile::biounit_suffix_
String biounit_suffix_
Definition downloadPDBFile.h:110
BALL::VIEW::DownloadPDBFile::menu_id_
QAction * menu_id_
Definition downloadPDBFile.h:108
BALL::VIEW::DownloadPDBFile::network_manager_
QNetworkAccessManager * network_manager_
Definition downloadPDBFile.h:117
BALL::VIEW::DownloadPDBFile::writePreferences
virtual void writePreferences(INIFile &inifile)
BALL::VIEW::DownloadPDBFile::slotDownload
void slotDownload()
BALL::VIEW::DownloadPDBFile::setPrefix
void setPrefix(String s)
Definition downloadPDBFile.h:62
BALL::VIEW::DownloadPDBFile::aborted_
bool aborted_
Definition downloadPDBFile.h:100
BALL::VIEW::DownloadPDBFile::checkMenu
void checkMenu(MainControl &mc)
BALL::VIEW::DownloadPDBFile::downloadEnded_
void downloadEnded_()
BALL::VIEW::DownloadPDBFile::threadedDownload_
bool threadedDownload_(const String &url)
BALL::VIEW::DownloadPDBFile::setSuffix
void setSuffix(String s)
Definition downloadPDBFile.h:67
BALL::VIEW::DownloadPDBFile::removeFile_
void removeFile_(const String &filename)
BALL::VIEW::DownloadPDBFile::DownloadPDBFile
DownloadPDBFile(QWidget *parent=0, const char *name="DownloadPDBFileDialog", bool modal=false, Qt::WindowFlags fl=0)
BALL::VIEW::DownloadPDBFile::error_
bool error_
Definition downloadPDBFile.h:101
BALL::VIEW::DownloadPDBFile::suffix_
String suffix_
Definition downloadPDBFile.h:109
BALL::VIEW::DownloadPDBFile::abort
virtual void abort()
BALL::VIEW::DownloadPDBFile::downloadProgress
void downloadProgress(qint64 received, qint64 total)
BALL::VIEW::DownloadPDBFile::prefix_
String prefix_
Definition downloadPDBFile.h:109
BALL::VIEW::DownloadPDBFile::downloadStarted_
void downloadStarted_()
BALL::VIEW::DownloadPDBFile::idChanged
void idChanged()
BALL::VIEW::DownloadPDBFile::fetchPreferences
virtual void fetchPreferences(INIFile &inifile)
BALL::VIEW::DownloadPDBFile::current_reply_
QNetworkReply * current_reply_
Definition downloadPDBFile.h:113
BALL::VIEW::DownloadPDBFile::unsupported_images_
HashSet< String > unsupported_images_
Definition downloadPDBFile.h:106
BALL::VIEW::DownloadPDBFile::downloadFinished
void downloadFinished()
BALL::VIEW::DownloadPDBFile::progress_bar_
QProgressBar * progress_bar_
Definition downloadPDBFile.h:116
BALL::VIEW::DownloadPDBFile::initializeWidget
virtual void initializeWidget(VIEW::MainControl &main_control)
BALL::VIEW::DownloadPDBFile::image_cache_
HashMap< String, QImage > image_cache_
Definition downloadPDBFile.h:103
BALL::VIEW::MainControl
Definition mainControl.h:118
BALL::VIEW::ModularWidget::ModularWidget
ModularWidget(const char *name="<ModularWidget>")
QDialog
QWidget
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
hashSet.h
modularWidget.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13