70 class GLRenderer : public QGLWidget, protected QOpenGLFunctions, public HierarchyElement |
70 class GLRenderer : public QGLWidget, protected QOpenGLFunctions, public HierarchyElement |
71 { |
71 { |
72 Q_OBJECT |
72 Q_OBJECT |
73 |
73 |
74 public: |
74 public: |
75 GLRenderer(Model* model, QWidget* parent = nullptr); |
75 GLRenderer(const Model* model, QWidget* parent = nullptr); |
76 ~GLRenderer(); |
76 ~GLRenderer(); |
77 |
77 |
78 QColor backgroundColor() const; |
78 QColor backgroundColor() const; |
79 Camera camera() const; |
79 Camera camera() const; |
80 const CameraInfo& cameraInfo(Camera camera) const; |
80 const CameraInfo& cameraInfo(Camera camera) const; |
142 { |
142 { |
143 return ::format (fmtstr, args...); |
143 return ::format (fmtstr, args...); |
144 } |
144 } |
145 |
145 |
146 private: |
146 private: |
147 Model* const m_model; |
147 const Model* const m_model; |
148 GLCompiler* m_compiler; |
148 GLCompiler* m_compiler; |
149 LDObject* m_objectAtCursor = nullptr; |
149 LDObject* m_objectAtCursor = nullptr; |
150 CameraIcon m_cameraIcons[7]; |
150 CameraIcon m_cameraIcons[7]; |
151 QTimer* m_toolTipTimer; |
151 QTimer* m_toolTipTimer; |
152 Qt::MouseButtons m_lastButtons; |
152 Qt::MouseButtons m_lastButtons; |