Debian Codegraph @

avogadro/qtplugins/constraints/constraintsextension.h

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_QTPLUGINS_CONSTRAINTS_H
7 #define AVOGADRO_QTPLUGINS_CONSTRAINTS_H
8
9 #include <avogadro/qtgui/molecule.h>
10 #include <avogadro/qtgui/extensionplugin.h>
11 #include <QtCore/QMap>
12
13 class QAction;
14
15 namespace Avogadro {
16 namespace QtPlugins {
17 class ConstraintsDialog;
18
19 class ConstraintsExtension : public QtGui::ExtensionPlugin
20 {
21 Q_OBJECT
22
23 public:
24 explicit ConstraintsExtension(QObject* parent = nullptr);
25 ~ConstraintsExtension() override;
26
27 QString name() const override { return tr("Constraints"); }
28
29 QString description() const override
30 {
31 return tr("Set constraints for geometry optimizations");
32 }
33
34 QList<QAction*> actions() const override;
35
36 QStringList menuPath(QAction*) const override;
37
38 void setMolecule(QtGui::Molecule* mol) override;
39
40 private slots:
41 void openDialog();
42
43 private:
44 QList<QAction*> m_actions;
45 QtGui::Molecule* m_molecule = nullptr;
46 ConstraintsDialog* m_dialog = nullptr;
47 };
48 } // namespace QtPlugins
49 } // namespace Avogadro
50
51 #endif // AVOGADRO_QTPLUGINS_CONSTRAINTS_H