Debian Codegraph @

avogadro/qtplugins/gamessinput/gamessinputdialog.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 GAMESSINPUTDIALOG_H
7 #define GAMESSINPUTDIALOG_H
8
9 #include <QButtonGroup>
10 #include <QDialog>
11 #include <QModelIndex>
12
13 #include "ui_gamessinputdialog.h"
14
15 #include <QtCore/QSettings>
16
17 class QJsonObject;
18
19 namespace Avogadro {
20 namespace MoleQueue {
21 class JobObject;
22 }
23 namespace QtGui {
24 class Molecule;
25 }
26
27 namespace QtPlugins {
28 class GamessHighlighter;
29
30 class GamessInputDialog : public QDialog
31 {
32 Q_OBJECT
33
34 public:
35 explicit GamessInputDialog(QWidget* parent_ = nullptr,
36 Qt::WindowFlags f = {});
37 ~GamessInputDialog() override;
38
39 void setMolecule(QtGui::Molecule* mol);
40
41 signals:
42 /**
43 * Emitted when the user requests that a job's output be loaded in Avogadro.
44 */
45 void openJobOutput(const Avogadro::MoleQueue::JobObject& job);
46
47 protected:
48 void showEvent(QShowEvent* e) override;
49
50 private slots:
51 void updatePreviewText();
52
53 void defaultsClicked();
54 void resetClicked();
55 void generateClicked();
56 void computeClicked();
57
58 void updateTitlePlaceholder();
59
60 private:
61 void connectBasic();
62 void connectPreview();
63 void connectButtons();
64
65 void buildOptions();
66 void updateOptionCache();
67 void restoreOptionCache();
68
69 void buildCalculateOptions();
70 void buildTheoryOptions();
71 void buildBasisOptions();
72 void buildStateOptions();
73 void buildDispersionCorrectionOptions();
74 void buildMultiplicityOptions();
75 void buildChargeOptions();
76
77 void setBasicDefaults();
78
79 QString generateJobTitle() const;
80
81 Ui::GamessInputDialog ui;
82 QtGui::Molecule* m_molecule;
83 GamessHighlighter* m_highlighter;
84
85 bool m_updatePending;
86 QMap<QComboBox*, int> m_optionCache;
87 };
88
89 } // end namespace QtPlugins
90 } // end namespace Avogadro
91
92 #endif // GAMESSINPUTDIALOG_H