Debian Codegraph @

avogadro/qtplugins/customelements/customelements.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_CUSTOMELEMENTS_H
7 #define AVOGADRO_QTPLUGINS_CUSTOMELEMENTS_H
8
9 #include <avogadro/qtgui/extensionplugin.h>
10
11 namespace Avogadro {
12 namespace QtPlugins {
13
14 /**
15 * @brief Manipulate custom element types in the current molecule.
16 */
17 class CustomElements : public QtGui::ExtensionPlugin
18 {
19 Q_OBJECT
20 public:
21 explicit CustomElements(QObject* parent_ = nullptr);
22 ~CustomElements() override;
23
24 QString name() const override { return tr("Custom Elements"); }
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 moleculeChanged(unsigned int changes);
34 void reassign();
35
36 private:
37 QtGui::Molecule* m_molecule;
38 QAction* m_reassignAction;
39
40 void updateReassignAction();
41 };
42
43 } // namespace QtPlugins
44 } // namespace Avogadro
45
46 #endif // AVOGADRO_QTPLUGINS_CUSTOMELEMENTS_H