1
#ifndef MOLCALCWIDGET_H
2
#define MOLCALCWIDGET_H
3
/***************************************************************************
4
* Copyright (C) 2005, 2006, 2007 by Carsten Niehaus *
7
* This program is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program; if not, write to the *
19
* Free Software Foundation, Inc., *
20
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
21
***************************************************************************/
24
#include "ui_molcalcwidgetbase.h"
26
#include "moleculeparser.h"
32
* This widget calculates mass for molecules.
34
* @author Carsten Niehaus
35
* @author Pino Toscano
37
* @author Kashyap R Puranik
39
class MolcalcWidget : public QWidget
45
* @param parent parent widget
47
MolcalcWidget( QWidget *parent = 0 );
49
virtual ~MolcalcWidget();
55
void keyPressEvent(QKeyEvent *e);
63
* @return the HTML code of an element symbol and its
64
* subscripted amount. Eg: Mg<sub>2</sub>
66
QString compositionString( ElementCountMap &_map );
69
* This methods gathers all the data and updates the
70
* contents of the widget.
74
Ui_MolcalcWidgetBase ui;
79
MoleculeParser *m_parser;
80
QSet<QString> m_aliasList;
83
ElementCountMap m_elementMap;
87
#endif // MOLCALC_IMPL_H