| 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_VRML_H |
| 7 |
#define AVOGADRO_QTPLUGINS_VRML_H |
| 8 |
|
| 9 |
#include <avogadro/core/avogadrocore.h> |
| 10 |
#include <avogadro/qtgui/extensionplugin.h> |
| 11 |
|
| 12 |
namespace Avogadro { |
| 13 |
namespace QtPlugins { |
| 14 |
|
| 15 |
/** |
| 16 |
* @brief The VRML class performs VRML operations |
| 17 |
*/ |
| 18 |
class VRML : public QtGui::ExtensionPlugin |
| 19 |
{ |
| 20 |
Q_OBJECT |
| 21 |
public: |
| 22 |
explicit VRML(QObject* p = nullptr); |
| 23 |
~VRML() override; |
| 24 |
|
| 25 |
QString name() const override { return tr("VRML"); } |
| 26 |
|
| 27 |
QString description() const override |
| 28 |
{ |
| 29 |
return tr("Render the scene using VRML."); |
| 30 |
} |
| 31 |
|
| 32 |
QList<QAction*> actions() const override; |
| 33 |
|
| 34 |
QStringList menuPath(QAction* action) const override; |
| 35 |
|
| 36 |
public slots: |
| 37 |
void setMolecule(QtGui::Molecule* mol) override; |
| 38 |
void setScene(Rendering::Scene* scene) override; |
| 39 |
void setCamera(Rendering::Camera* camera) override; |
| 40 |
|
| 41 |
private slots: |
| 42 |
void render(); |
| 43 |
|
| 44 |
private: |
| 45 |
QtGui::Molecule* m_molecule; |
| 46 |
Rendering::Scene* m_scene; |
| 47 |
Rendering::Camera* m_camera; |
| 48 |
|
| 49 |
QAction* m_action; |
| 50 |
}; |
| 51 |
|
| 52 |
} // namespace QtPlugins |
| 53 |
} // namespace Avogadro |
| 54 |
|
| 55 |
#endif // AVOGADRO_QTPLUGINS_VRML_H |