Debian Codegraph @

avogadro/qtplugins/apbs/apbs.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_APBS_APBS_H
7 #define AVOGADRO_QTPLUGINS_APBS_APBS_H
8
9 #include <avogadro/core/avogadrocore.h>
10 #include <avogadro/qtgui/extensionplugin.h>
11
12 class QProgressDialog;
13
14 namespace Avogadro::QtPlugins {
15 class ApbsDialog;
16
17 /**
18 * @brief The Apbs class provides integration with the APBS package, primarily
19 * reading the OpenDX output files produced by it at this point.
20 */
21
22 class Apbs : public QtGui::ExtensionPlugin
23 {
24 Q_OBJECT
25
26 public:
27 explicit Apbs(QObject* parent_ = nullptr);
28 ~Apbs() override;
29
30 QString name() const override { return tr("APBS"); }
31 QString description() const override
32 {
33 return tr("Interact with APBS utilities.");
34 }
35 QList<QAction*> actions() const override { return m_actions; }
36 QStringList menuPath(QAction*) const override;
37 void setMolecule(QtGui::Molecule*) override;
38 bool readMolecule(QtGui::Molecule&) override;
39
40 private slots:
41 void onOpenOutputFile();
42 void onMeshGeneratorProgress(int value);
43 void meshGeneratorFinished();
44 void onRunApbs();
45
46 private:
47 /**
48 * Loads the cube from the OpenDX file and adds the meshes to the molecule.
49 */
50 bool loadOpenDxFile(const QString& fileName, QtGui::Molecule& molecule);
51
52 private:
53 QtGui::Molecule* m_molecule;
54 QList<QAction*> m_actions;
55 QProgressDialog* m_progressDialog;
56 ApbsDialog* m_dialog;
57 QString m_pqrFileName;
58 QString m_cubeFileName;
59 };
60 } // namespace Avogadro::QtPlugins
61
62 #endif // AVOGADRO_QTPLUGINS_APBS_APBS_H