| 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_CONFIGUREPYTHONDIALOG_H |
| 7 |
#define AVOGADRO_QTPLUGINS_CONFIGUREPYTHONDIALOG_H |
| 8 |
|
| 9 |
#include <QtWidgets/QDialog> |
| 10 |
|
| 11 |
namespace Avogadro { |
| 12 |
namespace QtPlugins { |
| 13 |
|
| 14 |
class CondaDialog; |
| 15 |
|
| 16 |
namespace Ui { |
| 17 |
class ConfigurePythonDialog; |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* @brief Dialog to prompt a format and descriptor string. |
| 22 |
*/ |
| 23 |
class ConfigurePythonDialog : public QDialog |
| 24 |
{ |
| 25 |
Q_OBJECT |
| 26 |
|
| 27 |
public: |
| 28 |
explicit ConfigurePythonDialog(QWidget* parent = nullptr); |
| 29 |
~ConfigurePythonDialog() override; |
| 30 |
|
| 31 |
void setupCondaEnvironment(); |
| 32 |
|
| 33 |
void setOptions(const QStringList& options); |
| 34 |
void setCurrentOption(const QString& option); |
| 35 |
QString currentOption() const; |
| 36 |
|
| 37 |
QString condaPath() const; |
| 38 |
QString condaEnvironment() const; |
| 39 |
|
| 40 |
signals: |
| 41 |
void accepted(); |
| 42 |
void rejected(); |
| 43 |
|
| 44 |
protected slots: |
| 45 |
void optionChanged(int index); |
| 46 |
void accept() override; |
| 47 |
void reject() override; |
| 48 |
|
| 49 |
private: |
| 50 |
Ui::ConfigurePythonDialog* m_ui; |
| 51 |
CondaDialog* m_condaUi; |
| 52 |
QStringList m_condaEnvironments; |
| 53 |
}; |
| 54 |
|
| 55 |
} // namespace QtPlugins |
| 56 |
} // namespace Avogadro |
| 57 |
|
| 58 |
#endif // AVOGADRO_QTPLUGINS_CONFIGUREPYTHONDIALOG_H |