Debian Codegraph @

avogadro/qtplugins/configurepython/configurepython.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_CONFIGUREPYTHON_H
7 #define AVOGADRO_QTPLUGINS_CONFIGUREPYTHON_H
8
9 #include <avogadro/qtgui/extensionplugin.h>
10
11 namespace Avogadro {
12 namespace QtPlugins {
13
14 class ConfigurePythonDialog;
15
16 /**
17 * @brief Configure Python environment through a dialog.
18 */
19 class ConfigurePython : public QtGui::ExtensionPlugin
20 {
21 Q_OBJECT
22 public:
23 explicit ConfigurePython(QObject* parent_ = nullptr);
24 ~ConfigurePython() override;
25
26 QString name() const override { return tr("ConfigurePython"); }
27 QString description() const override
28 {
29 return tr("Configure Python environments.");
30 }
31 QList<QAction*> actions() const override;
32 QStringList menuPath(QAction*) const override;
33
34 QStringList pythonPaths() const;
35
36 void setMolecule(QtGui::Molecule*) override {}
37
38 private slots:
39 void showDialog();
40 void accept();
41
42 private:
43 QAction* m_action;
44 ConfigurePythonDialog* m_dialog;
45 };
46
47 } // namespace QtPlugins
48 } // namespace Avogadro
49
50 #endif // AVOGADRO_QTPLUGINS_CONFIGUREPYTHON_H