From 59f59a33855c5ebd5767e98d24a02737cfdf3a44 Mon Sep 17 00:00:00 2001 From: Aesylwinn Date: Mon, 14 Mar 2016 00:14:28 -0400 Subject: [PATCH] Fix indentation --- apps/opencs/view/render/scenewidget.hpp | 134 ++++++++++++------------ 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/apps/opencs/view/render/scenewidget.hpp b/apps/opencs/view/render/scenewidget.hpp index 43f969aca..7dcc74047 100644 --- a/apps/opencs/view/render/scenewidget.hpp +++ b/apps/opencs/view/render/scenewidget.hpp @@ -47,118 +47,118 @@ namespace CSVRender class RenderWidget : public QWidget { - Q_OBJECT + Q_OBJECT - public: - RenderWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); - virtual ~RenderWidget(); + public: + RenderWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); + virtual ~RenderWidget(); - void flagAsModified(); + void flagAsModified(); - void setVisibilityMask(int mask); + void setVisibilityMask(int mask); - osg::Camera *getCamera(); + osg::Camera *getCamera(); - protected: + protected: - osg::ref_ptr mView; + osg::ref_ptr mView; - osg::Group* mRootNode; + osg::Group* mRootNode; - QTimer mTimer; + QTimer mTimer; }; // Extension of RenderWidget to support lighting mode selection & toolbar class SceneWidget : public RenderWidget { - Q_OBJECT - public: - SceneWidget(boost::shared_ptr resourceSystem, QWidget* parent = 0, - Qt::WindowFlags f = 0, bool retrieveInput = true); - virtual ~SceneWidget(); + Q_OBJECT + public: + SceneWidget(boost::shared_ptr resourceSystem, QWidget* parent = 0, + Qt::WindowFlags f = 0, bool retrieveInput = true); + virtual ~SceneWidget(); - CSVWidget::SceneToolMode *makeLightingSelector (CSVWidget::SceneToolbar *parent); - ///< \attention The created tool is not added to the toolbar (via addTool). Doing that - /// is the responsibility of the calling function. + CSVWidget::SceneToolMode *makeLightingSelector (CSVWidget::SceneToolbar *parent); + ///< \attention The created tool is not added to the toolbar (via addTool). Doing that + /// is the responsibility of the calling function. - void setDefaultAmbient (const osg::Vec4f& colour); - ///< \note The actual ambient colour may differ based on lighting settings. + void setDefaultAmbient (const osg::Vec4f& colour); + ///< \note The actual ambient colour may differ based on lighting settings. - protected: - void setLighting (Lighting *lighting); - ///< \attention The ownership of \a lighting is not transferred to *this. + protected: + void setLighting (Lighting *lighting); + ///< \attention The ownership of \a lighting is not transferred to *this. - void setAmbient(const osg::Vec4f& ambient); + void setAmbient(const osg::Vec4f& ambient); - virtual void mousePressEvent (QMouseEvent *event); - virtual void mouseReleaseEvent (QMouseEvent *event); - virtual void mouseMoveEvent (QMouseEvent *event); - virtual void wheelEvent (QWheelEvent *event); - virtual void keyPressEvent (QKeyEvent *event); - virtual void keyReleaseEvent (QKeyEvent *event); + virtual void mousePressEvent (QMouseEvent *event); + virtual void mouseReleaseEvent (QMouseEvent *event); + virtual void mouseMoveEvent (QMouseEvent *event); + virtual void wheelEvent (QWheelEvent *event); + virtual void keyPressEvent (QKeyEvent *event); + virtual void keyReleaseEvent (QKeyEvent *event); - /// \return Is \a key a button mapping setting? (ignored otherwise) - virtual bool storeMappingSetting (const CSMPrefs::Setting *setting); + /// \return Is \a key a button mapping setting? (ignored otherwise) + virtual bool storeMappingSetting (const CSMPrefs::Setting *setting); - std::string mapButton (QMouseEvent *event); + std::string mapButton (QMouseEvent *event); - boost::shared_ptr mResourceSystem; + boost::shared_ptr mResourceSystem; - Lighting* mLighting; + Lighting* mLighting; - osg::Vec4f mDefaultAmbient; - bool mHasDefaultAmbient; - LightingDay mLightingDay; - LightingNight mLightingNight; - LightingBright mLightingBright; + osg::Vec4f mDefaultAmbient; + bool mHasDefaultAmbient; + LightingDay mLightingDay; + LightingNight mLightingNight; + LightingBright mLightingBright; - int mPrevMouseX, mPrevMouseY; - std::string mMouseMode; - std::auto_ptr mFreeCamControl; - std::auto_ptr mOrbitCamControl; - CameraController* mCurrentCamControl; + int mPrevMouseX, mPrevMouseY; + std::string mMouseMode; + std::auto_ptr mFreeCamControl; + std::auto_ptr mOrbitCamControl; + CameraController* mCurrentCamControl; - std::map, std::string> mButtonMapping; + std::map, std::string> mButtonMapping; - public slots: - void update(double dt); + public slots: + void update(double dt); - protected slots: + protected slots: - virtual void settingChanged (const CSMPrefs::Setting *setting); + virtual void settingChanged (const CSMPrefs::Setting *setting); - void selectNavigationMode (const std::string& mode); + void selectNavigationMode (const std::string& mode); - private slots: + private slots: - void selectLightingMode (const std::string& mode); + void selectLightingMode (const std::string& mode); signals: - void focusToolbarRequest(); + void focusToolbarRequest(); }; // There are rendering glitches when using multiple Viewer instances, work around using CompositeViewer with multiple views class CompositeViewer : public QObject, public osgViewer::CompositeViewer { - Q_OBJECT - public: - CompositeViewer(); + Q_OBJECT + public: + CompositeViewer(); - static CompositeViewer& get(); + static CompositeViewer& get(); - QTimer mTimer; + QTimer mTimer; - private: - osg::Timer mFrameTimer; - double mSimulationTime; + private: + osg::Timer mFrameTimer; + double mSimulationTime; - public slots: - void update(); + public slots: + void update(); - signals: - void simulationUpdated(double dt); + signals: + void simulationUpdated(double dt); }; }