Debian Codegraph @

avogadro/qtplugins/vanderwaals/vanderwaals.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_VANDERWAALS_H
7 #define AVOGADRO_QTPLUGINS_VANDERWAALS_H
8
9 #include <avogadro/qtgui/sceneplugin.h>
10
11 namespace Avogadro {
12 namespace QtPlugins {
13
14 /**
15 * @brief Render the molecule as Van der Waals spheres.
16 * @author Marcus D. Hanwell
17 */
18 class VanDerWaals : public QtGui::ScenePlugin
19 {
20 Q_OBJECT
21
22 public:
23 explicit VanDerWaals(QObject* parent = nullptr);
24 ~VanDerWaals() override;
25
26 void process(const QtGui::Molecule& molecule,
27 Rendering::GroupNode& node) override;
28
29 QString name() const override { return tr("Van der Waals"); }
30
31 QString description() const override
32 {
33 return tr("Simple display of VdW spheres.");
34 }
35
36 DefaultBehavior defaultBehavior() const override
37 {
38 return DefaultBehavior::False;
39 }
40
41 QWidget* setupWidget() override;
42 bool hasSetupWidget() const override { return true; }
43
44 public slots:
45 void setOpacity(int opacity);
46
47 private:
48 std::string m_name = "Van der Waals";
49 QWidget* m_setupWidget = nullptr;
50 float m_opacity = 1.0;
51 };
52 } // namespace QtPlugins
53 } // namespace Avogadro
54
55 #endif // AVOGADRO_QTPLUGINS_VANDERWAALS_H