| 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_SURFACEDIALOG_H |
| 7 |
#define AVOGADRO_QTPLUGINS_SURFACEDIALOG_H |
| 8 |
|
| 9 |
#include <QtCore/QStringList> |
| 10 |
#include <QtWidgets/QDialog> |
| 11 |
|
| 12 |
#include <set> |
| 13 |
|
| 14 |
#include "surfaces.h" |
| 15 |
// for the enum |
| 16 |
|
| 17 |
namespace Ui { |
| 18 |
class SurfaceDialog; |
| 19 |
} |
| 20 |
|
| 21 |
namespace Avogadro { |
| 22 |
namespace QtPlugins { |
| 23 |
|
| 24 |
/** |
| 25 |
* @brief The SurfaceDialog presents various properties that have been read in |
| 26 |
* from a quantum output file and provides interface to initiate calculations. |
| 27 |
*/ |
| 28 |
|
| 29 |
class SurfaceDialog : public QDialog |
| 30 |
{ |
| 31 |
Q_OBJECT |
| 32 |
|
| 33 |
public: |
| 34 |
explicit SurfaceDialog(QWidget* parent = nullptr, |
| 35 |
Qt::WindowFlags f = Qt::WindowFlags()); |
| 36 |
~SurfaceDialog() override; |
| 37 |
|
| 38 |
void setupBasis(int numElectrons, int numMOs, bool beta); |
| 39 |
void setupCubes(QStringList cubeNames); |
| 40 |
void setupSteps(int stepCount); |
| 41 |
void setupModels( |
| 42 |
const std::set<std::pair<std::string, std::string>>& chargeModels); |
| 43 |
void reenableCalculateButton(); |
| 44 |
void enableRecord(); |
| 45 |
|
| 46 |
Surfaces::Type surfaceType(); |
| 47 |
|
| 48 |
Surfaces::ColorProperty colorProperty(); |
| 49 |
QString colorModel(); |
| 50 |
QString colormapName(); |
| 51 |
|
| 52 |
/** |
| 53 |
* This holds the value of the molecular orbital at present. |
| 54 |
*/ |
| 55 |
int surfaceIndex(); |
| 56 |
|
| 57 |
/** |
| 58 |
* Only relevant for electronic structure, was the beta orbital selected? |
| 59 |
*/ |
| 60 |
bool beta(); |
| 61 |
|
| 62 |
float isosurfaceValue(); |
| 63 |
|
| 64 |
int smoothingPassesValue(); |
| 65 |
|
| 66 |
float resolution(); |
| 67 |
|
| 68 |
bool automaticResolution(); |
| 69 |
|
| 70 |
int step(); |
| 71 |
void setStep(int step); |
| 72 |
|
| 73 |
public slots: |
| 74 |
|
| 75 |
protected slots: |
| 76 |
void surfaceComboChanged(int n); |
| 77 |
void propertyComboChanged(int n); |
| 78 |
void resolutionComboChanged(int n); |
| 79 |
void smoothingComboChanged(int n); |
| 80 |
void calculateClicked(); |
| 81 |
void record(); |
| 82 |
|
| 83 |
signals: |
| 84 |
void stepChanged(int n); |
| 85 |
void calculateClickedSignal(); |
| 86 |
void recordClicked(); |
| 87 |
|
| 88 |
private: |
| 89 |
Ui::SurfaceDialog* m_ui; |
| 90 |
bool m_automaticResolution; |
| 91 |
std::set<std::pair<std::string, std::string>> m_chargeModels; |
| 92 |
}; |
| 93 |
|
| 94 |
} // End namespace QtPlugins |
| 95 |
} // End namespace Avogadro |
| 96 |
|
| 97 |
#endif // AVOGADRO_QTPLUGINS_SURFACEDIALOG_H |