| 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_GAMESSINPUT_H |
| 7 |
#define AVOGADRO_QTPLUGINS_GAMESSINPUT_H |
| 8 |
|
| 9 |
#include <avogadro/qtgui/extensionplugin.h> |
| 10 |
|
| 11 |
class QAction; |
| 12 |
class QDialog; |
| 13 |
|
| 14 |
namespace Avogadro { |
| 15 |
namespace Io { |
| 16 |
class FileFormat; |
| 17 |
} |
| 18 |
namespace MoleQueue { |
| 19 |
class JobObject; |
| 20 |
} |
| 21 |
|
| 22 |
namespace QtPlugins { |
| 23 |
|
| 24 |
class GamessInputDialog; |
| 25 |
|
| 26 |
class GamessInput : public QtGui::ExtensionPlugin |
| 27 |
{ |
| 28 |
Q_OBJECT |
| 29 |
|
| 30 |
public: |
| 31 |
explicit GamessInput(QObject* parent = nullptr); |
| 32 |
~GamessInput() override; |
| 33 |
|
| 34 |
QString name() const override { return tr("GAMESS input"); } |
| 35 |
|
| 36 |
QString description() const override |
| 37 |
{ |
| 38 |
return tr("Generate input for GAMESS."); |
| 39 |
} |
| 40 |
|
| 41 |
QList<QAction*> actions() const override; |
| 42 |
|
| 43 |
QStringList menuPath(QAction*) const override; |
| 44 |
|
| 45 |
void setMolecule(QtGui::Molecule* mol) override; |
| 46 |
|
| 47 |
public slots: |
| 48 |
/** |
| 49 |
* Emitted when the user requests that a job's output be loaded in Avogadro. |
| 50 |
*/ |
| 51 |
void openJobOutput(const MoleQueue::JobObject& job); |
| 52 |
|
| 53 |
bool readMolecule(QtGui::Molecule& mol) override; |
| 54 |
|
| 55 |
private slots: |
| 56 |
void menuActivated(); |
| 57 |
|
| 58 |
private: |
| 59 |
QAction* m_action; |
| 60 |
QtGui::Molecule* m_molecule; |
| 61 |
GamessInputDialog* m_dialog; |
| 62 |
const Io::FileFormat* m_outputFormat; |
| 63 |
QString m_outputFileName; |
| 64 |
}; |
| 65 |
} // namespace QtPlugins |
| 66 |
} // namespace Avogadro |
| 67 |
|
| 68 |
#endif // AVOGADRO_QTPLUGINS_GAMESSINPUT_H |