1 /****************************************************************************** 2 3 This source file is part of the Avogadro project. 4 5 Copyright 2013 Kitware, Inc. 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_OVERLAYAXES_H 18 #define AVOGADRO_QTPLUGINS_OVERLAYAXES_H 19 20 #include <avogadro/qtgui/sceneplugin.h> 21 22 namespace Avogadro { 23 namespace QtPlugins { 24 25 /** 26 * @brief Render reference axes in the corner of the display. 27 */ 28 class OverlayAxes : public QtGui::ScenePlugin 29 { 30 Q_OBJECT 31 public: 32 explicit OverlayAxes(QObject* parent = 0); 33 ~OverlayAxes() override; 34 35 void process(const Core::Molecule& molecule, 36 Rendering::GroupNode& node) override; 37 38 void processEditable(const QtGui::RWMolecule& molecule, 39 Rendering::GroupNode& node) override; 40 name()41 QString name() const override { return tr("Reference Axes Overlay"); } 42 description()43 QString description() const override 44 { 45 return tr("Render reference axes in the corner of the display."); 46 } 47 48 bool isEnabled() const override; 49 50 void setEnabled(bool enable) override; 51 52 private: 53 bool m_enabled; 54 55 class RenderImpl; 56 RenderImpl* const m_render; 57 }; 58 59 } // end namespace QtPlugins 60 } // end namespace Avogadro 61 62 #endif // AVOGADRO_QTPLUGINS_OVERLAYAXES_H 63