refactor: Move axis label drawing logic from ViewportWidget to SketchGrid
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <QOpenGLBuffer>
|
||||
|
||||
class QOpenGLShaderProgram;
|
||||
class QPainter;
|
||||
class ViewportWidget;
|
||||
|
||||
class SketchGrid : protected QOpenGLFunctions
|
||||
{
|
||||
@@ -17,11 +19,12 @@ public:
|
||||
YZ = 3
|
||||
};
|
||||
|
||||
SketchGrid();
|
||||
explicit SketchGrid(ViewportWidget* viewport);
|
||||
~SketchGrid();
|
||||
|
||||
void initializeGL();
|
||||
void paintGL(SketchPlane plane, QOpenGLShaderProgram* shaderProgram, int colorLoc);
|
||||
void paintAxisLabels(QPainter& painter, SketchPlane plane, const QMatrix4x4& modelView, const QMatrix4x4& projection);
|
||||
|
||||
private:
|
||||
void drawGridLines(SketchPlane plane, QOpenGLShaderProgram* shaderProgram, int colorLoc);
|
||||
@@ -29,6 +32,7 @@ private:
|
||||
|
||||
QOpenGLVertexArrayObject m_vao;
|
||||
QOpenGLBuffer m_vbo;
|
||||
ViewportWidget* m_viewport = nullptr;
|
||||
};
|
||||
|
||||
#endif // SKETCHGRID_H
|
||||
|
||||
Reference in New Issue
Block a user