#include <BALL/VIEW/DIALOGS/pubchemDialog.h>
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 ¤t_node, Position level, ParsedResult_ &result) |
void | insert_ (ParsedResult_ d, QTreeWidgetItem *parent, bool plot) |
bool | parseESummaryXml_ (const QByteArray &data, ParsedResult_ &result) |
Protected Attributes | |
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_ |
QPushButton * | add_button_ |
Dialog for querying PubChem and generating structures from a SMILES string
Definition at line 40 of file pubchemDialog.h.
BALL::VIEW::PubChemDialog::PubChemDialog | ( | QWidget * | parent = NULL , |
|
const char * | name = "PubChemDialog" | |||
) |
Default Constructor.
virtual BALL::VIEW::PubChemDialog::~PubChemDialog | ( | ) | [virtual] |
Destructor.
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).
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.
main_control | the MainControl object to be initialized with this ModularWidget |
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] |
QAction* BALL::VIEW::PubChemDialog::action1_ [protected] |
Definition at line 118 of file pubchemDialog.h.
QAction * BALL::VIEW::PubChemDialog::action2_ [protected] |
Definition at line 118 of file pubchemDialog.h.
QPushButton* BALL::VIEW::PubChemDialog::add_button_ [protected] |
Definition at line 132 of file pubchemDialog.h.
int BALL::VIEW::PubChemDialog::current_request_id_ [protected] |
Definition at line 123 of file pubchemDialog.h.
std::map<QTreeWidgetItem*, ParsedResult_> BALL::VIEW::PubChemDialog::descriptions_ [protected] |
Definition at line 114 of file pubchemDialog.h.
String BALL::VIEW::PubChemDialog::esearch_base_url_ [protected] |
Definition at line 120 of file pubchemDialog.h.
QHttp BALL::VIEW::PubChemDialog::esearch_connector_ [protected] |
Definition at line 127 of file pubchemDialog.h.
String BALL::VIEW::PubChemDialog::esummary_base_url_ [protected] |
Definition at line 121 of file pubchemDialog.h.
QHttp BALL::VIEW::PubChemDialog::esummary_connector_ [protected] |
Definition at line 128 of file pubchemDialog.h.
HashMap<int, QTreeWidgetItem*> BALL::VIEW::PubChemDialog::esummary_request_ids_ [protected] |
Definition at line 125 of file pubchemDialog.h.
std::map<QTreeWidgetItem*, System*> BALL::VIEW::PubChemDialog::original_systems_ [protected] |
Definition at line 113 of file pubchemDialog.h.
QProgressBar* BALL::VIEW::PubChemDialog::progress_ [protected] |
Definition at line 130 of file pubchemDialog.h.
std::map<QTreeWidgetItem*, System*> BALL::VIEW::PubChemDialog::sd_systems_ [protected] |
Definition at line 112 of file pubchemDialog.h.
Definition at line 116 of file pubchemDialog.h.