Debian Codegraph @

avogadro/qtplugins/wireframe/wireframe.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_WIREFRAME_H
7 #define AVOGADRO_QTPLUGINS_WIREFRAME_H
8
9 #include <avogadro/qtgui/sceneplugin.h>
10
11 namespace Avogadro {
12 namespace QtPlugins {
13
14 /**
15 * @brief Render a molecule in the wireframe style.
16 */
17 class Wireframe : public QtGui::ScenePlugin
18 {
19 Q_OBJECT
20
21 public:
22 explicit Wireframe(QObject* parent = nullptr);
23 ~Wireframe() override;
24
25 void process(const QtGui::Molecule& molecule,
26 Rendering::GroupNode& node) override;
27
28 QString name() const override { return tr("Wireframe"); }
29
30 QString description() const override
31 {
32 return tr("Render the molecule as a wireframe.");
33 }
34
35 QWidget* setupWidget() override;
36 bool hasSetupWidget() const override { return true; }
37
38 DefaultBehavior defaultBehavior() const override
39 {
40 return DefaultBehavior::False;
41 }
42
43 public slots:
44 void multiBonds(bool show);
45 void showHydrogens(bool show);
46 void setWidth(double width);
47
48 private:
49 Rendering::GroupNode* m_group;
50 std::string m_name = "Wireframe";
51 };
52
53 } // end namespace QtPlugins
54 } // end namespace Avogadro
55
56 #endif // AVOGADRO_QTPLUGINS_WIREFRAME_H