BALL::VIEW::PubChemDialog Class Reference

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

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

List of all members.


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 esearchFinished (int id, bool error)
 

An entrez esearch has finished.


void esummaryFinished (int id, bool error)
 

A pubchem download has finished.



Public Member Functions

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

Default Constructor.


virtual ~PubChemDialog ()
 

Destructor.


void generateFromSMILES (const String &SMILES)
virtual void initializeWidget (MainControl &main_control)
virtual void checkMenu (MainControl &main_control)
void callESummary (QString const &entry_id, QTreeWidgetItem *current_item=NULL)
 

Calls the esummary web service from entrez to download the molecule with given pcsubstance id.



Protected Member Functions

void parseItemRecursive_ (const QDomNode &current_node, Position level, ParsedResult_ &result)
void insert_ (ParsedResult_ d, QTreeWidgetItem *parent, bool plot)
bool parseESummaryXml_ (const QByteArray &data, ParsedResult_ &result)

Protected Attributes

SDWidget sdwidget_
std::map< QTreeWidgetItem
*, System * > 
sd_systems_
std::map< QTreeWidgetItem
*, System * > 
original_systems_
std::map< QTreeWidgetItem
*, ParsedResult_
descriptions_
SmilesParser smiles_parser_
QAction * action1_
QAction * action2_
String esearch_base_url_
String esummary_base_url_
int current_request_id_
HashMap< int, QTreeWidgetItem * > esummary_request_ids_
QHttp esearch_connector_
QHttp esummary_connector_
QProgressBar * progress_

Detailed Description

Dialog for querying PubChem and generating structures from a SMILES string


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

void BALL::VIEW::PubChemDialog::callESummary ( QString const &  entry_id,
QTreeWidgetItem current_item = NULL 
)

Calls the esummary web service from entrez to download the molecule with given pcsubstance id.

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_control the MainControl object whose menus should be checked

Reimplemented from BALL::VIEW::ModularWidget.

void BALL::VIEW::PubChemDialog::clearEntries (  )  [slot]
void BALL::VIEW::PubChemDialog::esearchFinished ( int  id,
bool  error 
) [slot]

An entrez esearch has finished.

void BALL::VIEW::PubChemDialog::esummaryFinished ( int  id,
bool  error 
) [slot]

A pubchem download has finished.

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  ) 

Generate a new molecule from a SMILES string. The molecule is displayed in the SDWidget widget but not yet inserted into BALLView.

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_control the 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]
bool BALL::VIEW::PubChemDialog::parseESummaryXml_ ( const QByteArray &  data,
ParsedResult_ result 
) [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]

Member Data Documentation

QAction * BALL::VIEW::PubChemDialog::action2_ [protected]
QProgressBar* BALL::VIEW::PubChemDialog::progress_ [protected]