| 1 |
/****************************************************************************** |
| 2 |
|
| 3 |
This source file is part of the Avogadro project. |
| 4 |
|
| 5 |
Copyright 2016 Barry E Moore II |
| 6 |
|
| 7 |
This source code is released under the New BSD License, (the "License"). |
| 8 |
|
| 9 |
Unless required by applicable law or agreed to in writing, software |
| 10 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
See the License for the specific language governing permissions and |
| 13 |
limitations under the License. |
| 14 |
|
| 15 |
******************************************************************************/ |
| 16 |
|
| 17 |
#ifndef AVOGADRO_QTPLUGINS_ThreeDMOL_H |
| 18 |
#define AVOGADRO_QTPLUGINS_ThreeDMOL_H |
| 19 |
|
| 20 |
#include <avogadro/qtgui/extensionplugin.h> |
| 21 |
|
| 22 |
namespace Avogadro { |
| 23 |
|
| 24 |
namespace Core { |
| 25 |
class Molecule; |
| 26 |
} |
| 27 |
|
| 28 |
namespace QtPlugins { |
| 29 |
class ThreeDMolDialog; |
| 30 |
|
| 31 |
/** |
| 32 |
* @brief The ThreeDMol class is an extension to launch |
| 33 |
* a ThreeDMolDialog. |
| 34 |
*/ |
| 35 |
class ThreeDMol : public Avogadro::QtGui::ExtensionPlugin |
| 36 |
{ |
| 37 |
Q_OBJECT |
| 38 |
public: |
| 39 |
explicit ThreeDMol(QObject* parent_ = nullptr); |
| 40 |
~ThreeDMol() override = default; |
| 41 |
|
| 42 |
QString name() const override { return tr("ThreeDMol"); } |
| 43 |
QString description() const override; |
| 44 |
QList<QAction*> actions() const override; |
| 45 |
QStringList menuPath(QAction*) const override; |
| 46 |
|
| 47 |
public slots: |
| 48 |
void setMolecule(QtGui::Molecule* mol) override; |
| 49 |
|
| 50 |
private slots: |
| 51 |
void showDialog(); |
| 52 |
|
| 53 |
private: |
| 54 |
QAction* m_action; |
| 55 |
ThreeDMolDialog* m_dialog; |
| 56 |
QtGui::Molecule* m_molecule; |
| 57 |
}; |
| 58 |
|
| 59 |
} // namespace QtPlugins |
| 60 |
} // namespace Avogadro |
| 61 |
|
| 62 |
#endif // AVOGADRO_QTPLUGINS_ThreeDMOLEXTENSION_H |