~ubuntu-branches/ubuntu/precise/kalzium/precise

« back to all changes in this revision

Viewing changes to src/tools/moleculeview.h

  • Committer: Bazaar Package Importer
  • Author(s): Philip Muškovac
  • Date: 2011-07-03 12:28:58 UTC
  • Revision ID: james.westby@ubuntu.com-20110703122858-q1yyxncs89e4w0hs
Tags: upstream-4.6.90+repack
Import upstream version 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *  Copyright (C) 2006 by Carsten Niehaus <cniehaus@kde.org>
 
3
 *  Copyright (C) 2007-2008 by Marcus D. Hanwell <marcus@cryos.org>
 
4
 ***************************************************************************/
 
5
 
 
6
/***************************************************************************
 
7
 *                                                                         *
 
8
 *   This program is free software; you can redistribute it and/or modify  *
 
9
 *   it under the terms of the GNU General Public License as published by  *
 
10
 *   the Free Software Foundation; either version 2 of the License, or     *
 
11
 *   (at your option) any later version.                                   *
 
12
 *                                                                         *
 
13
 ***************************************************************************/
 
14
#ifndef MOLECULEVIEW_H
 
15
#define MOLECULEVIEW_H
 
16
 
 
17
#include <kdialog.h>
 
18
 
 
19
#include "ui_moleculeviewerwidget.h"
 
20
 
 
21
namespace OpenBabel {
 
22
  class OBForceField;
 
23
}
 
24
namespace Avogadro{
 
25
  class PeriodicTableView;
 
26
}
 
27
class QSettings;
 
28
 
 
29
/**
 
30
 * @author Carsten Niehaus
 
31
 */
 
32
class MoleculeDialog : public KDialog
 
33
{
 
34
        Q_OBJECT
 
35
 
 
36
        public:
 
37
                MoleculeDialog( QWidget  * parent );
 
38
                ~MoleculeDialog();
 
39
 
 
40
        private:
 
41
                QString  m_path;///to store the path were the molecules are located
 
42
    QList<int> m_elementsIndex; // Index storing the element combo index
 
43
    Avogadro::PeriodicTableView *m_periodicTable;
 
44
    OpenBabel::OBForceField* m_forceField;
 
45
    QSettings *m_drawSettings;
 
46
    bool m_addHydrogens;
 
47
 
 
48
                Ui::moleculeViewerForm ui;      
 
49
 
 
50
    /**
 
51
     * Set up the element combo box
 
52
     */
 
53
     void elementCombo();
 
54
        
 
55
        private slots:
 
56
                /**
 
57
                 * Load a molecule
 
58
                 */
 
59
                void slotLoadMolecule();
 
60
 
 
61
                /**
 
62
                 * Get a new molecule using hot new stuff
 
63
                 */
 
64
                void slotDownloadNewStuff();
 
65
 
 
66
    /**
 
67
     * Save a molecule
 
68
     */
 
69
    void slotSaveMolecule();
 
70
 
 
71
    /**
 
72
     * Set view/edit mode
 
73
     */
 
74
    void setViewEdit(int mode);
 
75
 
 
76
    /**
 
77
     * Current element has changed
 
78
     */
 
79
    void slotElementChanged(int element);
 
80
 
 
81
    /**
 
82
     * Custom element has been selected
 
83
     */
 
84
    void slotCustomElementChanged(int);
 
85
 
 
86
    /**
 
87
     * Bond order has been changed
 
88
     */
 
89
    void slotBondOrderChanged(int);
 
90
 
 
91
    /**
 
92
     * Automatic hydrogen addition on drawing
 
93
     */
 
94
    void slotAddHydrogensChanged(int);
 
95
 
 
96
    /**
 
97
     * Update the statistical information about the current molecule
 
98
     */
 
99
    void slotUpdateStatistics();
 
100
 
 
101
    /**
 
102
     * Add/remove hydrogens
 
103
     */
 
104
     void slotAdjustHydrogens();
 
105
 
 
106
    /**
 
107
     * Geometry optimization
 
108
     */
 
109
     void slotGeometryOptimize();
 
110
 
 
111
};
 
112
 
 
113
#endif // MOLECULEVIEW_H