Loading...
Searching...
No Matches
downloadElectronDensity.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
#ifndef BALL_VIEW_DIALOGS_DOWNLOADELECTRONDENSITY_H
#define BALL_VIEW_DIALOGS_DOWNLOADELECTRONDENSITY_H
#include <BALL/VIEW/UIC/ui_downloadElectronDensity.h>
#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_downloadElectronDensity.h>
#include <QtNetwork/QNetworkReply>
class QProgressBar;
class QNetworkAccessManager;
namespace BALL
{
class TCPTransfer;
namespace VIEW
{
class BALL_VIEW_EXPORT DownloadElectronDensity
: public QDialog,
public Ui_DownloadElectronDensityData,
public ModularWidget
{
Q_OBJECT
public:
BALL_EMBEDDABLE(DownloadElectronDensity, ModularWidget)
DownloadElectronDensity(QWidget* parent = 0, const char* name = "DownloadElectronDensityDialog",
bool modal = false, Qt::WindowFlags fl = 0 );
~DownloadElectronDensity();
virtual void initializeWidget(VIEW::MainControl& main_control);
virtual void fetchPreferences(INIFile& inifile);
virtual void writePreferences(INIFile& inifile);
void setEDSPrefix(String s) { eds_prefix_ = s;}
void setEDSSuffix(String s) { eds_suffix_ = s;}
void setEMDBPrefix(String s) { emdb_prefix_ = s;}
void setEMDBSuffix(String s) { emdb_suffix_ = s;}
void checkMenu(MainControl& mc);
public Q_SLOTS:
void slotDownload();
void idChanged();
void serverChanged();
void typeChanged();
void pdbDownloadChecked();
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 eds_prefix_, eds_infix_, eds_suffix_;
String emdb_prefix_, emdb_infix_, emdb_suffix_;
// the current network reply
QNetworkReply* current_reply_;
// the current progress bar
QProgressBar* progress_bar_;
QNetworkAccessManager* network_manager_;
};
}
} //namespaces
#endif
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::DownloadElectronDensity::network_manager_
QNetworkAccessManager * network_manager_
Definition downloadElectronDensity.h:138
BALL::VIEW::DownloadElectronDensity::threadedDownload_
bool threadedDownload_(const String &url)
BALL::VIEW::DownloadElectronDensity::typeChanged
void typeChanged()
BALL::VIEW::DownloadElectronDensity::downloadStarted_
void downloadStarted_()
BALL::VIEW::DownloadElectronDensity::unsupported_images_
HashSet< String > unsupported_images_
Definition downloadElectronDensity.h:127
BALL::VIEW::DownloadElectronDensity::progress_bar_
QProgressBar * progress_bar_
Definition downloadElectronDensity.h:137
BALL::VIEW::DownloadElectronDensity::fetchPreferences
virtual void fetchPreferences(INIFile &inifile)
BALL::VIEW::DownloadElectronDensity::setEDSSuffix
void setEDSSuffix(String s)
Definition downloadElectronDensity.h:68
BALL::VIEW::DownloadElectronDensity::setEMDBSuffix
void setEMDBSuffix(String s)
Definition downloadElectronDensity.h:78
BALL::VIEW::DownloadElectronDensity::emdb_prefix_
String emdb_prefix_
Definition downloadElectronDensity.h:131
BALL::VIEW::DownloadElectronDensity::eds_suffix_
String eds_suffix_
Definition downloadElectronDensity.h:130
BALL::VIEW::DownloadElectronDensity::image_cache_
HashMap< String, QImage > image_cache_
Definition downloadElectronDensity.h:124
BALL::VIEW::DownloadElectronDensity::menu_id_
QAction * menu_id_
Definition downloadElectronDensity.h:129
BALL::VIEW::DownloadElectronDensity::emdb_suffix_
String emdb_suffix_
Definition downloadElectronDensity.h:131
BALL::VIEW::DownloadElectronDensity::checkMenu
void checkMenu(MainControl &mc)
BALL::VIEW::DownloadElectronDensity::abort
virtual void abort()
BALL::VIEW::DownloadElectronDensity::downloadProgress
void downloadProgress(qint64 received, qint64 total)
BALL::VIEW::DownloadElectronDensity::pdbDownloadChecked
void pdbDownloadChecked()
BALL::VIEW::DownloadElectronDensity::slotDownload
void slotDownload()
BALL::VIEW::DownloadElectronDensity::setEMDBPrefix
void setEMDBPrefix(String s)
Definition downloadElectronDensity.h:73
BALL::VIEW::DownloadElectronDensity::idChanged
void idChanged()
BALL::VIEW::DownloadElectronDensity::aborted_
bool aborted_
Definition downloadElectronDensity.h:121
BALL::VIEW::DownloadElectronDensity::setEDSPrefix
void setEDSPrefix(String s)
Definition downloadElectronDensity.h:63
BALL::VIEW::DownloadElectronDensity::downloadEnded_
void downloadEnded_()
BALL::VIEW::DownloadElectronDensity::initializeWidget
virtual void initializeWidget(VIEW::MainControl &main_control)
BALL::VIEW::DownloadElectronDensity::current_reply_
QNetworkReply * current_reply_
Definition downloadElectronDensity.h:134
BALL::VIEW::DownloadElectronDensity::error_
bool error_
Definition downloadElectronDensity.h:122
BALL::VIEW::DownloadElectronDensity::DownloadElectronDensity
DownloadElectronDensity(QWidget *parent=0, const char *name="DownloadElectronDensityDialog", bool modal=false, Qt::WindowFlags fl=0)
BALL::VIEW::DownloadElectronDensity::eds_infix_
String eds_infix_
Definition downloadElectronDensity.h:130
BALL::VIEW::DownloadElectronDensity::downloadFinished
void downloadFinished()
BALL::VIEW::DownloadElectronDensity::eds_prefix_
String eds_prefix_
Definition downloadElectronDensity.h:130
BALL::VIEW::DownloadElectronDensity::serverChanged
void serverChanged()
BALL::VIEW::DownloadElectronDensity::emdb_infix_
String emdb_infix_
Definition downloadElectronDensity.h:131
BALL::VIEW::DownloadElectronDensity::writePreferences
virtual void writePreferences(INIFile &inifile)
BALL::VIEW::DownloadElectronDensity::removeFile_
void removeFile_(const String &filename)
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