BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BALL::VIEW::DownloadPDBFile Class Reference

#include <BALL/VIEW/DIALOGS/downloadPDBFile.h>

Inheritance diagram for BALL::VIEW::DownloadPDBFile:
QDialog BALL::VIEW::ModularWidget BALL::Embeddable BALL::VIEW::ConnectionObject

Public Slots

void slotDownload ()
 
void idChanged ()
 
virtual void abort ()
 
void downloadFinished ()
 
void downloadProgress (qint64 received, qint64 total)
 

Public Member Functions

 DownloadPDBFile (QWidget *parent=0, const char *name="DownloadPDBFileDialog", bool modal=FALSE, Qt::WFlags fl=0)
 
 ~DownloadPDBFile ()
 
virtual void initializeWidget (VIEW::MainControl &main_control)
 
virtual void fetchPreferences (INIFile &inifile)
 
virtual void writePreferences (INIFile &inifile)
 
void setPrefix (String s)
 
void setSuffix (String s)
 
void checkMenu (MainControl &mc)
 
- Public Member Functions inherited from BALL::VIEW::ModularWidget
void setWorkingDirFromFilename_ (String filename)
 
virtual void showHelp (const String &url)
 
 ModularWidget (const char *name="<ModularWidget>")
 
 ModularWidget (const ModularWidget &widget)
 
virtual ~ModularWidget ()
 
virtual void destroy ()
 
virtual void clear ()
 
QAction * insertMenuEntry (Position parent_id, const QString &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence(), const QString &menu_hint=QString(""), UIOperationMode::OperationMode minimal_mode=UIOperationMode::MODE_ALL)
 
void setMenuHelp (QAction *action, const String &url)
 
virtual void registerForHelpSystem (const QObject *object, const String &url)
 
virtual void addToolBarEntries (QToolBar *main_tb)
 
void setIcon (QAction *action, const String &filename, bool add_to_main_toolbar=true)
 
virtual void initializePreferencesTab (Preferences &preferences)
 
virtual void finalizePreferencesTab (Preferences &preferences)
 
virtual void applyPreferences ()
 
bool lockComposites ()
 
bool unlockComposites ()
 Unlock the Composites. More...
 
MainControlgetMainControl () const
 
virtual void setStatusbarText (const String &text, bool important=false)
 
virtual void setStatusbarText (const QString &text, bool important=false)
 
String getWorkingDir ()
 Implemented for convenience. More...
 
void setWorkingDir (const String &dir)
 Implemented for convenience. More...
 
FragmentDBgetFragmentDB () const
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
virtual void finalizeWidget (MainControl &main_control)
 
virtual bool canHandle (const String &) const
 
virtual bool openFile (const String &)
 
- Public Member Functions inherited from BALL::Embeddable
 Embeddable (const String &identifier="<Embeddable>")
 
 Embeddable (const Embeddable &embeddable)
 
virtual ~Embeddable ()
 
void setIdentifier (const String &identifier)
 
const StringgetIdentifier () const
 
void unregisterThis ()
 
virtual void registerThis ()
 
- Public Member Functions inherited from BALL::VIEW::ConnectionObject
 ConnectionObject ()
 
virtual ~ConnectionObject ()
 
void registerConnectionObject (ConnectionObject &object)
 
void unregisterConnectionObject (ConnectionObject &object)
 
bool isConnectionObjectRegistered (const ConnectionObject &object)
 
ConnectionObjectgetParent () const
 
ConnectionObjectgetRoot ()
 
virtual void onNotify (Message *message)
 
virtual bool isValid () const
 

Protected Member Functions

void downloadStarted_ ()
 
void downloadEnded_ ()
 
bool threadedDownload_ (const String &url)
 
void removeFile_ (const String &filename)
 
- Protected Member Functions inherited from BALL::VIEW::ConnectionObject
void onNotify_ (Message *message)
 
void notify_ (Message *message)
 
void notify_ (Message &message)
 

Protected Attributes

bool aborted_
 
bool error_
 
HashMap< String, QImage > image_cache_
 
HashSet< Stringunsupported_images_
 
QAction * menu_id_
 
String prefix_
 
String suffix_
 
String biounit_suffix_
 
QNetworkReply * current_reply_
 
QProgressBar * progress_bar_
 
QNetworkAccessManager * network_manager_
 
- Protected Attributes inherited from BALL::VIEW::ModularWidget
QAction * window_menu_entry_
 
bool show_window_enty_
 
bool default_visible_
 
QList< QAction * > main_toolbar_actions_
 

Additional Inherited Members

- Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > EmbeddableVector
 
- Static Public Member Functions inherited from BALL::VIEW::ModularWidget
static void registerWidget (ModularWidget *mwidget) throw (Exception::NullPointer)
 
- Static Protected Member Functions inherited from BALL::Embeddable
static void registerInstance_ (const std::type_info &type, const Embeddable *instance)
 
static void unregisterInstance_ (const Embeddable *instance)
 
static Size countInstances_ (const std::type_info &type)
 
static EmbeddablegetInstance_ (const std::type_info &type, Position index)
 
static EmbeddablegetInstance_ (const std::type_info &type, const String &identifier)
 

Detailed Description

Dialog to search for and download structure files from the PDB data bank.

Definition at line 34 of file downloadPDBFile.h.

Constructor & Destructor Documentation

BALL::VIEW::DownloadPDBFile::DownloadPDBFile ( QWidget parent = 0,
const char *  name = "DownloadPDBFileDialog",
bool  modal = FALSE,
Qt::WFlags  fl = 0 
)
BALL::VIEW::DownloadPDBFile::~DownloadPDBFile ( )

Member Function Documentation

virtual void BALL::VIEW::DownloadPDBFile::abort ( )
virtualslot
void BALL::VIEW::DownloadPDBFile::checkMenu ( MainControl main_control)
virtual

Menu checking method. This method is called MainControl::checkMenus before a popup menu is shown. It should be used to update the state of menu entries (e.g. disable or enable entries).

Parameters
main_controlthe MainControl object whose menus should be checked

Reimplemented from BALL::VIEW::ModularWidget.

void BALL::VIEW::DownloadPDBFile::downloadEnded_ ( )
protected
void BALL::VIEW::DownloadPDBFile::downloadFinished ( )
slot
void BALL::VIEW::DownloadPDBFile::downloadProgress ( qint64  received,
qint64  total 
)
slot
void BALL::VIEW::DownloadPDBFile::downloadStarted_ ( )
protected
virtual void BALL::VIEW::DownloadPDBFile::fetchPreferences ( INIFile inifile)
virtual

Fetch the widgets preferences from the INIFile. This method is called automatically by MainControl::show() at the start of the application.

Parameters
inifilethe INIFile that contains the needed values
See also
writePreferences

Reimplemented from BALL::VIEW::ModularWidget.

void BALL::VIEW::DownloadPDBFile::idChanged ( )
slot
virtual void BALL::VIEW::DownloadPDBFile::initializeWidget ( VIEW::MainControl main_control)
virtual

Initialize the widget. This method is called automatically immediately before the main application is started. It should add the widget's menu entries and connections (if required). This method will be called by MainControl::show.

Parameters
main_controlthe MainControl object to be initialized with this ModularWidget
See also
finalizeWidget()

Reimplemented from BALL::VIEW::ModularWidget.

void BALL::VIEW::DownloadPDBFile::removeFile_ ( const String filename)
protected
void BALL::VIEW::DownloadPDBFile::setPrefix ( String  s)
inline

Set the prefix for the PDB.org url
Standard: http://www.rcsb.org/pdb/files/

Definition at line 62 of file downloadPDBFile.h.

void BALL::VIEW::DownloadPDBFile::setSuffix ( String  s)
inline

Set the suffix for the PDB.org url
Standard: (.pdb)

Definition at line 67 of file downloadPDBFile.h.

void BALL::VIEW::DownloadPDBFile::slotDownload ( )
slot
bool BALL::VIEW::DownloadPDBFile::threadedDownload_ ( const String url)
protected
virtual void BALL::VIEW::DownloadPDBFile::writePreferences ( INIFile inifile)
virtual

Writes the widgets preferences to the INIFile. This method is called automatically by MainControl::aboutToExit at the end of the application.

Parameters
inifilethe INIFile to contain the values
See also
fetchPreferences

Reimplemented from BALL::VIEW::ModularWidget.

Member Data Documentation

bool BALL::VIEW::DownloadPDBFile::aborted_
protected

Definition at line 100 of file downloadPDBFile.h.

String BALL::VIEW::DownloadPDBFile::biounit_suffix_
protected

Definition at line 110 of file downloadPDBFile.h.

QNetworkReply* BALL::VIEW::DownloadPDBFile::current_reply_
protected

Definition at line 113 of file downloadPDBFile.h.

bool BALL::VIEW::DownloadPDBFile::error_
protected

Definition at line 101 of file downloadPDBFile.h.

HashMap<String, QImage> BALL::VIEW::DownloadPDBFile::image_cache_
protected

Definition at line 103 of file downloadPDBFile.h.

QAction* BALL::VIEW::DownloadPDBFile::menu_id_
protected

Definition at line 108 of file downloadPDBFile.h.

QNetworkAccessManager* BALL::VIEW::DownloadPDBFile::network_manager_
protected

Definition at line 117 of file downloadPDBFile.h.

String BALL::VIEW::DownloadPDBFile::prefix_
protected

Definition at line 109 of file downloadPDBFile.h.

QProgressBar* BALL::VIEW::DownloadPDBFile::progress_bar_
protected

Definition at line 116 of file downloadPDBFile.h.

String BALL::VIEW::DownloadPDBFile::suffix_
protected

Definition at line 109 of file downloadPDBFile.h.

HashSet<String> BALL::VIEW::DownloadPDBFile::unsupported_images_
protected

Definition at line 106 of file downloadPDBFile.h.