| 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_ALCHEMY_H |
| 7 |
#define AVOGADRO_QTPLUGINS_ALCHEMY_H |
| 8 |
|
| 9 |
#include <avogadro/core/avogadrocore.h> |
| 10 |
#include <avogadro/qtgui/extensionplugin.h> |
| 11 |
|
| 12 |
#include <QtWidgets/QDialog> |
| 13 |
|
| 14 |
namespace Ui { |
| 15 |
class BondingDialog; |
| 16 |
} |
| 17 |
|
| 18 |
namespace Avogadro { |
| 19 |
namespace QtPlugins { |
| 20 |
|
| 21 |
/** |
| 22 |
* @brief The Bonding class performs bonding operations on demand. |
| 23 |
*/ |
| 24 |
class Alchemy : public QtGui::ExtensionPlugin |
| 25 |
{ |
| 26 |
Q_OBJECT |
| 27 |
public: |
| 28 |
explicit Alchemy(QObject* parent_ = nullptr); |
| 29 |
~Alchemy() override; |
| 30 |
|
| 31 |
QString name() const override { return tr("Alchemy"); } |
| 32 |
|
| 33 |
QString description() const override |
| 34 |
{ |
| 35 |
return tr("Change elements of atoms."); |
| 36 |
} |
| 37 |
|
| 38 |
QList<QAction*> actions() const override; |
| 39 |
|
| 40 |
QStringList menuPath(QAction* action) const override; |
| 41 |
|
| 42 |
public slots: |
| 43 |
void setMolecule(QtGui::Molecule* mol) override; |
| 44 |
|
| 45 |
private slots: |
| 46 |
void changeElements(); |
| 47 |
|
| 48 |
private: |
| 49 |
QtGui::Molecule* m_molecule; |
| 50 |
|
| 51 |
QAction* m_action; |
| 52 |
}; |
| 53 |
|
| 54 |
} // namespace QtPlugins |
| 55 |
} // namespace Avogadro |
| 56 |
|
| 57 |
#endif // AVOGADRO_QTPLUGINS_ALCHEMY_H |