Debian Codegraph @

avogadro/qtplugins/hydrogens/hydrogens.h

raw
1 /******************************************************************************
2 This source file is part of the MoleQueue project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_QTPLUGINS_HYDROGENS_H
7 #define AVOGADRO_QTPLUGINS_HYDROGENS_H
8
9 #include <avogadro/qtgui/extensionplugin.h>
10
11 namespace Avogadro {
12 namespace QtPlugins {
13
14 /**
15 * @brief The Hydrogens class is an extension to modify hydrogens.
16 */
17 class Hydrogens : public Avogadro::QtGui::ExtensionPlugin
18 {
19 Q_OBJECT
20 public:
21 explicit Hydrogens(QObject* parent_ = nullptr);
22 ~Hydrogens() override;
23
24 QString name() const override { return tr("Hydrogens"); }
25 QString description() const override;
26 QList<QAction*> actions() const override;
27 QStringList menuPath(QAction*) const override;
28
29 public slots:
30 void setMolecule(QtGui::Molecule* mol) override;
31
32 private slots:
33 void adjustHydrogens();
34 void addHydrogens();
35 void removeHydrogens();
36 void removeAllHydrogens();
37
38 private:
39 QList<QAction*> m_actions;
40 QtGui::Molecule* m_molecule;
41 };
42
43 } // namespace QtPlugins
44 } // namespace Avogadro
45
46 #endif // AVOGADRO_QTPLUGINS_HYDROGENS_H