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

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

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

Classes

struct  ParsedResult_

Public Slots

void show ()
 Show and raise dialog.
void generateButtonClicked ()
 Generate a structure from SMILES.
void queryPubChem ()
 Query PubChem.
void switchView (QTreeWidgetItem *item, int column)
void clearEntries ()
void finished ()
void updateDownloadProgress (qint64 done, qint64 total)
void downloadFinished (const QString &filename)

Public Member Functions

 PubChemDialog (QWidget *parent=NULL, const char *name="PubChemDialog")
 Default Constructor.
virtual ~PubChemDialog ()
 Destructor.
virtual void initializeWidget (MainControl &main_control)
virtual void checkMenu (MainControl &main_control)
void generateFromSMILES (const String &SMILES)
- 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 String &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence())
void setMenuHint (const String &hint)
void setMenuHelp (const String &url)
virtual void registerForHelpSystem (const QObject *object, const String &url)
virtual void addToolBarEntries (QToolBar *main_tb)
void setIcon (const String &filename, bool add_to_main_toolbar=true)
virtual void initializePreferencesTab (Preferences &preferences)
virtual void finalizePreferencesTab (Preferences &preferences)
virtual void applyPreferences ()
virtual void fetchPreferences (INIFile &inifile)
virtual void writePreferences (INIFile &inifile)
bool lockComposites ()
bool unlockComposites ()
 Unlock the Composites.
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.
void setWorkingDir (const String &dir)
 Implemented for convenience.
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 parseItemRecursive_ (const QDomNode &current_node, Position level, ParsedResult_ &result)
void insert_ (ParsedResult_ d, QTreeWidgetItem *parent, bool plot)

Protected Attributes

SmilesParser smiles_parser_
PubChemDownloaderpcd_
std::map< QTreeWidgetItem
*, System * > 
sd_systems_
std::map< QTreeWidgetItem
*, System * > 
original_systems_
std::map< QTreeWidgetItem
*, ParsedResult_
descriptions_
QAction * action1_
QAction * action2_
int current_request_id_
HashMap< int, QTreeWidgetItem * > esummary_request_ids_
QProgressBar * progress_
QPushButtonadd_button_
PubChemDialogPrivate::DownloadHelper downloader_
- Protected Attributes inherited from BALL::VIEW::ModularWidget
QAction * window_menu_entry_
bool show_window_enty_
bool default_visible_
QAction * last_action_
QList< QAction * > main_toolbar_actions_

Friends

class PubChemDialogPrivate::DownloadHelper

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 for querying PubChem and generating structures from a SMILES string

Definition at line 64 of file pubchemDialog.h.

Constructor & Destructor Documentation

BALL::VIEW::PubChemDialog::PubChemDialog ( QWidget parent = NULL,
const char *  name = "PubChemDialog" 
)

Default Constructor.

virtual BALL::VIEW::PubChemDialog::~PubChemDialog ( )
virtual

Destructor.

Member Function Documentation

virtual void BALL::VIEW::PubChemDialog::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::PubChemDialog::clearEntries ( )
slot
void BALL::VIEW::PubChemDialog::downloadFinished ( const QString &  filename)
slot
void BALL::VIEW::PubChemDialog::finished ( )
slot
void BALL::VIEW::PubChemDialog::generateButtonClicked ( )
slot

Generate a structure from SMILES.

void BALL::VIEW::PubChemDialog::generateFromSMILES ( const String SMILES)
virtual void BALL::VIEW::PubChemDialog::initializeWidget ( 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::PubChemDialog::insert_ ( ParsedResult_  d,
QTreeWidgetItem parent,
bool  plot 
)
protected
void BALL::VIEW::PubChemDialog::parseItemRecursive_ ( const QDomNode &  current_node,
Position  level,
ParsedResult_ result 
)
protected
void BALL::VIEW::PubChemDialog::queryPubChem ( )
slot

Query PubChem.

void BALL::VIEW::PubChemDialog::show ( )
slot

Show and raise dialog.

void BALL::VIEW::PubChemDialog::switchView ( QTreeWidgetItem item,
int  column 
)
slot
void BALL::VIEW::PubChemDialog::updateDownloadProgress ( qint64  done,
qint64  total 
)
slot

Friends And Related Function Documentation

Definition at line 71 of file pubchemDialog.h.

Member Data Documentation

QAction* BALL::VIEW::PubChemDialog::action1_
protected

Definition at line 138 of file pubchemDialog.h.

QAction * BALL::VIEW::PubChemDialog::action2_
protected

Definition at line 138 of file pubchemDialog.h.

QPushButton* BALL::VIEW::PubChemDialog::add_button_
protected

Definition at line 145 of file pubchemDialog.h.

int BALL::VIEW::PubChemDialog::current_request_id_
protected

Definition at line 140 of file pubchemDialog.h.

std::map<QTreeWidgetItem*, ParsedResult_> BALL::VIEW::PubChemDialog::descriptions_
protected

Definition at line 136 of file pubchemDialog.h.

PubChemDialogPrivate::DownloadHelper BALL::VIEW::PubChemDialog::downloader_
protected

Definition at line 147 of file pubchemDialog.h.

HashMap<int, QTreeWidgetItem*> BALL::VIEW::PubChemDialog::esummary_request_ids_
protected

Definition at line 142 of file pubchemDialog.h.

std::map<QTreeWidgetItem*, System*> BALL::VIEW::PubChemDialog::original_systems_
protected

Definition at line 135 of file pubchemDialog.h.

PubChemDownloader* BALL::VIEW::PubChemDialog::pcd_
protected

Definition at line 132 of file pubchemDialog.h.

QProgressBar* BALL::VIEW::PubChemDialog::progress_
protected

Definition at line 143 of file pubchemDialog.h.

std::map<QTreeWidgetItem*, System*> BALL::VIEW::PubChemDialog::sd_systems_
protected

Definition at line 134 of file pubchemDialog.h.

SmilesParser BALL::VIEW::PubChemDialog::smiles_parser_
protected

Definition at line 119 of file pubchemDialog.h.