Debian Codegraph @

avogadro/qtplugins/cp2kinput/cp2kinput.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_CP2KINPUT_H
7 #define AVOGADRO_QTPLUGINS_CP2KINPUT_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 Cp2kInputDialog;
25
26 class Cp2kInput : public QtGui::ExtensionPlugin
27 {
28 Q_OBJECT
29
30 public:
31 explicit Cp2kInput(QObject* parent = nullptr);
32 ~Cp2kInput() override;
33
34 QString name() const override { return tr("CP2K input"); }
35
36 QString description() const override
37 {
38 return tr("Generate input for CP2K.");
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 Avogadro::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 Cp2kInputDialog* m_dialog;
62 const Io::FileFormat* m_outputFormat;
63 QString m_outputFileName;
64 };
65
66 } // namespace QtPlugins
67 } // namespace Avogadro
68
69 #endif // AVOGADRO_QTPLUGINS_CP2KINPUT_H