| 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_SPECTRA_H |
| 7 |
#define AVOGADRO_QTPLUGINS_SPECTRA_H |
| 8 |
|
| 9 |
#include <avogadro/qtgui/extensionplugin.h> |
| 10 |
|
| 11 |
class QAction; |
| 12 |
class QDialog; |
| 13 |
|
| 14 |
namespace Avogadro { |
| 15 |
|
| 16 |
namespace QtPlugins { |
| 17 |
|
| 18 |
class SpectraDialog; |
| 19 |
|
| 20 |
/** |
| 21 |
* @brief The Spectra plugin handles vibrations and spectra. |
| 22 |
*/ |
| 23 |
|
| 24 |
class Spectra : public QtGui::ExtensionPlugin |
| 25 |
{ |
| 26 |
Q_OBJECT |
| 27 |
|
| 28 |
public: |
| 29 |
explicit Spectra(QObject* parent = nullptr); |
| 30 |
~Spectra() override = default; |
| 31 |
|
| 32 |
QString name() const override { return tr("Spectra"); } |
| 33 |
|
| 34 |
QString description() const override { return tr("Display spectra plots."); } |
| 35 |
|
| 36 |
QList<QAction*> actions() const override; |
| 37 |
|
| 38 |
QStringList menuPath(QAction*) const override; |
| 39 |
|
| 40 |
void setMolecule(QtGui::Molecule* mol) override; |
| 41 |
|
| 42 |
public slots: |
| 43 |
|
| 44 |
void openDialog(); |
| 45 |
void moleculeChanged(unsigned int changes); |
| 46 |
|
| 47 |
private: |
| 48 |
void gatherSpectra(); |
| 49 |
|
| 50 |
QList<QAction*> m_actions; |
| 51 |
QtGui::Molecule* m_molecule; |
| 52 |
SpectraDialog* m_dialog; |
| 53 |
}; |
| 54 |
|
| 55 |
} // namespace QtPlugins |
| 56 |
} // namespace Avogadro |
| 57 |
|
| 58 |
#endif // AVOGADRO_QTPLUGINS_Spectra_H |