diff options
Diffstat (limited to 'gui/fpgaviewwidget.h')
-rw-r--r-- | gui/fpgaviewwidget.h | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index e76e6f32..3c0cfbbd 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -127,7 +127,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions private: const float zoomNear_ = 0.1f; // do not zoom closer than this - float zoomFar_ = 10.0f; // do not zoom further than this + float zoomFar_ = 10.0f; // do not zoom further than this const float zoomLvl1_ = 1.0f; const float zoomLvl2_ = 5.0f; @@ -240,21 +240,6 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions QColor highlight[8]; } colors_; - // Flags that are passed through from renderer arguments to renderer data. - // These are used by the UI code to signal events that will only fire when - // the next frame gets rendered. - struct PassthroughFlags - { - bool zoomOutbound; - - PassthroughFlags() : zoomOutbound(false) {} - PassthroughFlags &operator=(const PassthroughFlags &other) noexcept - { - zoomOutbound = other.zoomOutbound; - return *this; - } - }; - struct RendererArgs { // Decals that he user selected. @@ -265,19 +250,22 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions DecalXY hoveredDecal; // Whether to render the above three or skip it. bool changed; + // Whether to render grid or skip it. + bool gridChanged; - // Flags to pass back into the RendererData. - PassthroughFlags flags; + // Flags for rendering. + bool zoomOutbound; // Hint text std::string hintText; // cursor pos - int x,y; + int x, y; }; std::unique_ptr<RendererArgs> rendererArgs_; QMutex rendererArgsLock_; struct RendererData { + LineShaderData gfxGrid; LineShaderData gfxByStyle[GraphicElement::STYLE_MAX]; LineShaderData gfxSelected; LineShaderData gfxHovered; @@ -288,8 +276,6 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions PickQuadTree::BoundingBox bbSelected; // Quadtree for picking objects. std::unique_ptr<PickQuadTree> qt; - // Flags from args. - PassthroughFlags flags; }; std::unique_ptr<RendererData> rendererData_; QMutex rendererDataLock_; |