From 7b9b2bef3c622bd54225c1c44ee63a211e0e1d3e Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 12 Jul 2018 18:02:57 +0200 Subject: make colors configurable, changed to gray --- gui/fpgaviewwidget.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index c281fd77..8114a686 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -216,6 +216,13 @@ class LineShader class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions { Q_OBJECT + Q_PROPERTY(QColor backgroundColor MEMBER backgroundColor DESIGNABLE true) + Q_PROPERTY(QColor belColor MEMBER belColor DESIGNABLE true) + Q_PROPERTY(QColor gridColor MEMBER gridColor DESIGNABLE true) + Q_PROPERTY(QColor wireColor MEMBER wireColor DESIGNABLE true) + Q_PROPERTY(QColor pipColor MEMBER pipColor DESIGNABLE true) + Q_PROPERTY(QColor groupColor MEMBER groupColor DESIGNABLE true) + Q_PROPERTY(QColor frameColor MEMBER frameColor DESIGNABLE true) public: FPGAViewWidget(QWidget *parent = 0); @@ -253,6 +260,13 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions float startDragX_; float startDragY_; Context *ctx_; + QColor backgroundColor; + QColor gridColor; + QColor belColor; + QColor wireColor; + QColor pipColor; + QColor groupColor; + QColor frameColor; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3 From 284b4750ee6a3a5a4e33590cbbccaaccfd2c5899 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Thu, 12 Jul 2018 20:22:53 +0100 Subject: Fix zoom in fpgawidget --- gui/fpgaviewwidget.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index c281fd77..b49029dd 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -245,13 +245,18 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions private: QPoint lastPos_; - float moveX_; - float moveY_; - float zoom_; LineShader lineShader_; + QMatrix4x4 viewMove_; + float zoom_; + QMatrix4x4 getProjection(void); + QVector4D mouseToWorldCoordinates(int x, int y); + + const float zoomNear_ = 1.0f; // do not zoom closer than this + const float zoomFar_ = 10000.0f; // do not zoom further than this + + const float zoomLvl1_ = 100.0f; + const float zoomLvl2_ = 50.0f; - float startDragX_; - float startDragY_; Context *ctx_; }; -- cgit v1.2.3 From b8a42ff53b1fbb6e03d169d14e58180a750f4cad Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 12 Jul 2018 22:04:13 +0200 Subject: Updates from clang-format Signed-off-by: Clifford Wolf --- gui/fpgaviewwidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 526c6199..a2495f4e 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -258,7 +258,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions QMatrix4x4 getProjection(void); QVector4D mouseToWorldCoordinates(int x, int y); - const float zoomNear_ = 1.0f; // do not zoom closer than this + const float zoomNear_ = 1.0f; // do not zoom closer than this const float zoomFar_ = 10000.0f; // do not zoom further than this const float zoomLvl1_ = 100.0f; -- cgit v1.2.3 From 499951cb65ff31fe15aa360a6b44371b13815d66 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Thu, 12 Jul 2018 21:30:36 +0100 Subject: Remove legacy graphics API For now we do not optimize the OpenGL renderer against the new decal API, but this can be done in the future. --- gui/fpgaviewwidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index a2495f4e..90e12bbf 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -246,7 +246,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; - void drawElement(LineShaderData &data, const GraphicElement &el); + void drawDecal(LineShaderData &data, const DecalXY &decal); public Q_SLOTS: void newContext(Context *ctx); -- cgit v1.2.3 From 96d862311da878e09ef3fe3666dd10561f0169c6 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 13 Jul 2018 11:03:09 +0200 Subject: Add coloring per graphics element style --- gui/fpgaviewwidget.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 90e12bbf..8d91224e 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -217,11 +217,11 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions { Q_OBJECT Q_PROPERTY(QColor backgroundColor MEMBER backgroundColor DESIGNABLE true) - Q_PROPERTY(QColor belColor MEMBER belColor DESIGNABLE true) Q_PROPERTY(QColor gridColor MEMBER gridColor DESIGNABLE true) - Q_PROPERTY(QColor wireColor MEMBER wireColor DESIGNABLE true) - Q_PROPERTY(QColor pipColor MEMBER pipColor DESIGNABLE true) - Q_PROPERTY(QColor groupColor MEMBER groupColor DESIGNABLE true) + Q_PROPERTY(QColor gFrameColor MEMBER gFrameColor DESIGNABLE true) + Q_PROPERTY(QColor gHiddenColor MEMBER gHiddenColor DESIGNABLE true) + Q_PROPERTY(QColor gInactiveColor MEMBER gInactiveColor DESIGNABLE true) + Q_PROPERTY(QColor gActiveColor MEMBER gActiveColor DESIGNABLE true) Q_PROPERTY(QColor frameColor MEMBER frameColor DESIGNABLE true) public: @@ -247,6 +247,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; void drawDecal(LineShaderData &data, const DecalXY &decal); + void drawDecal(LineShaderData out[], const DecalXY &decal); public Q_SLOTS: void newContext(Context *ctx); @@ -267,10 +268,10 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions Context *ctx_; QColor backgroundColor; QColor gridColor; - QColor belColor; - QColor wireColor; - QColor pipColor; - QColor groupColor; + QColor gFrameColor; + QColor gHiddenColor; + QColor gInactiveColor; + QColor gActiveColor; QColor frameColor; }; -- cgit v1.2.3 From 309a533b7c5eab79addfc2b1733d39c1b48d9aae Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Fri, 13 Jul 2018 11:38:49 +0100 Subject: Style. --- gui/fpgaviewwidget.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 8d91224e..410b0582 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -216,13 +216,13 @@ class LineShader class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions { Q_OBJECT - Q_PROPERTY(QColor backgroundColor MEMBER backgroundColor DESIGNABLE true) - Q_PROPERTY(QColor gridColor MEMBER gridColor DESIGNABLE true) - Q_PROPERTY(QColor gFrameColor MEMBER gFrameColor DESIGNABLE true) - Q_PROPERTY(QColor gHiddenColor MEMBER gHiddenColor DESIGNABLE true) - Q_PROPERTY(QColor gInactiveColor MEMBER gInactiveColor DESIGNABLE true) - Q_PROPERTY(QColor gActiveColor MEMBER gActiveColor DESIGNABLE true) - Q_PROPERTY(QColor frameColor MEMBER frameColor DESIGNABLE true) + Q_PROPERTY(QColor backgroundColor MEMBER backgroundColor_ DESIGNABLE true) + Q_PROPERTY(QColor gridColor MEMBER gridColor_ DESIGNABLE true) + Q_PROPERTY(QColor gFrameColor MEMBER gFrameColor_ DESIGNABLE true) + Q_PROPERTY(QColor gHiddenColor MEMBER gHiddenColor_ DESIGNABLE true) + Q_PROPERTY(QColor gInactiveColor MEMBER gInactiveColor_ DESIGNABLE true) + Q_PROPERTY(QColor gActiveColor MEMBER gActiveColor_ DESIGNABLE true) + Q_PROPERTY(QColor frameColor MEMBER frameColor_ DESIGNABLE true) public: FPGAViewWidget(QWidget *parent = 0); @@ -266,13 +266,14 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions const float zoomLvl2_ = 50.0f; Context *ctx_; - QColor backgroundColor; - QColor gridColor; - QColor gFrameColor; - QColor gHiddenColor; - QColor gInactiveColor; - QColor gActiveColor; - QColor frameColor; + + QColor backgroundColor_; + QColor gridColor_; + QColor gFrameColor_; + QColor gHiddenColor_; + QColor gInactiveColor_; + QColor gActiveColor_; + QColor frameColor_; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3 From a8c84e90a39c54174dd24b5b76bd17aed8311481 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Fri, 13 Jul 2018 20:53:52 +0100 Subject: Make GUI nice and smooth. --- gui/fpgaviewwidget.h | 99 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 19 deletions(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 410b0582..3652e82e 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -41,18 +41,6 @@ NPNR_PACKED_STRUCT(struct Vertex2DPOD { Vertex2DPOD(GLfloat X, GLfloat Y) : x(X), y(Y) {} }); -// Vertex2DPOD is a structure of R, G, B, A values that can be passed to OpenGL -// directly. -NPNR_PACKED_STRUCT(struct ColorPOD { - GLfloat r; - GLfloat g; - GLfloat b; - GLfloat a; - - ColorPOD(GLfloat R, GLfloat G, GLfloat B, GLfloat A) : r(R), g(G), b(B), a(A) {} - ColorPOD(const QColor &color) : r(color.redF()), g(color.greenF()), b(color.blueF()), a(color.alphaF()) {} -}); - // LineShaderData is a built set of vertices that can be rendered by the // LineShader. // Each LineShaderData can have its' own color and thickness. @@ -63,10 +51,13 @@ struct LineShaderData std::vector miters; std::vector indices; - GLfloat thickness; - ColorPOD color; - - LineShaderData(GLfloat Thickness, QColor Color) : thickness(Thickness), color(Color) {} + void clear(void) + { + vertices.clear(); + normals.clear(); + miters.clear(); + indices.clear(); + } }; // PolyLine is a set of segments defined by points, that can be built to a @@ -210,7 +201,7 @@ class LineShader bool compile(void); // Render a LineShaderData with a given M/V/P transformation. - void draw(const LineShaderData &data, const QMatrix4x4 &projection); + void draw(const LineShaderData &data, const QColor &color, const float thickness, const QMatrix4x4 &projection); }; class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions @@ -246,8 +237,76 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; - void drawDecal(LineShaderData &data, const DecalXY &decal); - void drawDecal(LineShaderData out[], const DecalXY &decal); + + template + void drawDecal(const T &proxy, LineShaderData &out, const DecalXY &decal) + { + const float scale = 1.0; + float offsetX = 0.0, offsetY = 0.0; + + for (auto &el : proxy.getDecalGraphics(decal.decal)) { + offsetX = decal.x; + offsetY = decal.y; + + if (el.type == GraphicElement::G_BOX) { + auto line = PolyLine(true); + line.point(offsetX + scale * el.x1, offsetY + scale * el.y1); + line.point(offsetX + scale * el.x2, offsetY + scale * el.y1); + line.point(offsetX + scale * el.x2, offsetY + scale * el.y2); + line.point(offsetX + scale * el.x1, offsetY + scale * el.y2); + line.build(out); + } + + if (el.type == GraphicElement::G_LINE) { + PolyLine(offsetX + scale * el.x1, offsetY + scale * el.y1, offsetX + scale * el.x2, offsetY + scale * el.y2) + .build(out); + } + } + } + + template + void drawDecal(const T &proxy, LineShaderData out[], const DecalXY &decal) + { + const float scale = 1.0; + float offsetX = 0.0, offsetY = 0.0; + + for (auto &el : proxy.getDecalGraphics(decal.decal)) { + offsetX = decal.x; + offsetY = decal.y; + + if (el.type == GraphicElement::G_BOX) { + auto line = PolyLine(true); + line.point(offsetX + scale * el.x1, offsetY + scale * el.y1); + line.point(offsetX + scale * el.x2, offsetY + scale * el.y1); + line.point(offsetX + scale * el.x2, offsetY + scale * el.y2); + line.point(offsetX + scale * el.x1, offsetY + scale * el.y2); + switch (el.style) { + case GraphicElement::G_FRAME: + case GraphicElement::G_INACTIVE: + case GraphicElement::G_ACTIVE: + line.build(out[el.style]); + break; + default: + break; + } + } + + if (el.type == GraphicElement::G_LINE) { + auto line = PolyLine(offsetX + scale * el.x1, offsetY + scale * el.y1, offsetX + scale * el.x2, + offsetY + scale * el.y2); + switch (el.style) { + case GraphicElement::G_FRAME: + case GraphicElement::G_INACTIVE: + case GraphicElement::G_ACTIVE: + line.build(out[el.style]); + break; + default: + break; + } + } + } + } + public Q_SLOTS: void newContext(Context *ctx); @@ -274,6 +333,8 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions QColor gInactiveColor_; QColor gActiveColor_; QColor frameColor_; + + LineShaderData shaders_[4]; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3 From 8d1996cae99ff80a2d9390b94db54217ed1d8726 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 14 Jul 2018 19:44:37 +0200 Subject: display selected object from tree --- gui/fpgaviewwidget.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 3652e82e..0a9599c9 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -213,6 +213,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions Q_PROPERTY(QColor gHiddenColor MEMBER gHiddenColor_ DESIGNABLE true) Q_PROPERTY(QColor gInactiveColor MEMBER gInactiveColor_ DESIGNABLE true) Q_PROPERTY(QColor gActiveColor MEMBER gActiveColor_ DESIGNABLE true) + Q_PROPERTY(QColor gSelectedColor MEMBER gSelectedColor_ DESIGNABLE true) Q_PROPERTY(QColor frameColor MEMBER frameColor_ DESIGNABLE true) public: @@ -309,7 +310,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions public Q_SLOTS: void newContext(Context *ctx); - + void onSelectedArchItem(std::vector decals); private: QPoint lastPos_; LineShader lineShader_; @@ -332,9 +333,13 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions QColor gHiddenColor_; QColor gInactiveColor_; QColor gActiveColor_; + QColor gSelectedColor_; QColor frameColor_; LineShaderData shaders_[4]; + LineShaderData selectedShader_; + std::vector selectedItems_; + bool selectedItemsChanged; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3 From 36b4e3382dc552fcd1b078bdd246dc14379394a1 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Sat, 14 Jul 2018 18:50:50 +0100 Subject: Revert "Make GUI nice and smooth." This reverts commit a8c84e90a39c54174dd24b5b76bd17aed8311481. --- gui/fpgaviewwidget.h | 99 ++++++++++------------------------------------------ 1 file changed, 19 insertions(+), 80 deletions(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 3652e82e..410b0582 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -41,6 +41,18 @@ NPNR_PACKED_STRUCT(struct Vertex2DPOD { Vertex2DPOD(GLfloat X, GLfloat Y) : x(X), y(Y) {} }); +// Vertex2DPOD is a structure of R, G, B, A values that can be passed to OpenGL +// directly. +NPNR_PACKED_STRUCT(struct ColorPOD { + GLfloat r; + GLfloat g; + GLfloat b; + GLfloat a; + + ColorPOD(GLfloat R, GLfloat G, GLfloat B, GLfloat A) : r(R), g(G), b(B), a(A) {} + ColorPOD(const QColor &color) : r(color.redF()), g(color.greenF()), b(color.blueF()), a(color.alphaF()) {} +}); + // LineShaderData is a built set of vertices that can be rendered by the // LineShader. // Each LineShaderData can have its' own color and thickness. @@ -51,13 +63,10 @@ struct LineShaderData std::vector miters; std::vector indices; - void clear(void) - { - vertices.clear(); - normals.clear(); - miters.clear(); - indices.clear(); - } + GLfloat thickness; + ColorPOD color; + + LineShaderData(GLfloat Thickness, QColor Color) : thickness(Thickness), color(Color) {} }; // PolyLine is a set of segments defined by points, that can be built to a @@ -201,7 +210,7 @@ class LineShader bool compile(void); // Render a LineShaderData with a given M/V/P transformation. - void draw(const LineShaderData &data, const QColor &color, const float thickness, const QMatrix4x4 &projection); + void draw(const LineShaderData &data, const QMatrix4x4 &projection); }; class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions @@ -237,76 +246,8 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; - - template - void drawDecal(const T &proxy, LineShaderData &out, const DecalXY &decal) - { - const float scale = 1.0; - float offsetX = 0.0, offsetY = 0.0; - - for (auto &el : proxy.getDecalGraphics(decal.decal)) { - offsetX = decal.x; - offsetY = decal.y; - - if (el.type == GraphicElement::G_BOX) { - auto line = PolyLine(true); - line.point(offsetX + scale * el.x1, offsetY + scale * el.y1); - line.point(offsetX + scale * el.x2, offsetY + scale * el.y1); - line.point(offsetX + scale * el.x2, offsetY + scale * el.y2); - line.point(offsetX + scale * el.x1, offsetY + scale * el.y2); - line.build(out); - } - - if (el.type == GraphicElement::G_LINE) { - PolyLine(offsetX + scale * el.x1, offsetY + scale * el.y1, offsetX + scale * el.x2, offsetY + scale * el.y2) - .build(out); - } - } - } - - template - void drawDecal(const T &proxy, LineShaderData out[], const DecalXY &decal) - { - const float scale = 1.0; - float offsetX = 0.0, offsetY = 0.0; - - for (auto &el : proxy.getDecalGraphics(decal.decal)) { - offsetX = decal.x; - offsetY = decal.y; - - if (el.type == GraphicElement::G_BOX) { - auto line = PolyLine(true); - line.point(offsetX + scale * el.x1, offsetY + scale * el.y1); - line.point(offsetX + scale * el.x2, offsetY + scale * el.y1); - line.point(offsetX + scale * el.x2, offsetY + scale * el.y2); - line.point(offsetX + scale * el.x1, offsetY + scale * el.y2); - switch (el.style) { - case GraphicElement::G_FRAME: - case GraphicElement::G_INACTIVE: - case GraphicElement::G_ACTIVE: - line.build(out[el.style]); - break; - default: - break; - } - } - - if (el.type == GraphicElement::G_LINE) { - auto line = PolyLine(offsetX + scale * el.x1, offsetY + scale * el.y1, offsetX + scale * el.x2, - offsetY + scale * el.y2); - switch (el.style) { - case GraphicElement::G_FRAME: - case GraphicElement::G_INACTIVE: - case GraphicElement::G_ACTIVE: - line.build(out[el.style]); - break; - default: - break; - } - } - } - } - + void drawDecal(LineShaderData &data, const DecalXY &decal); + void drawDecal(LineShaderData out[], const DecalXY &decal); public Q_SLOTS: void newContext(Context *ctx); @@ -333,8 +274,6 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions QColor gInactiveColor_; QColor gActiveColor_; QColor frameColor_; - - LineShaderData shaders_[4]; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3 From bf0b1d2db3e071f5606e117d5fc5f2213b948997 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 15 Jul 2018 12:39:19 +0200 Subject: add select on property pane, and action to double click --- gui/fpgaviewwidget.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index dd86277e..ea4a17cf 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -245,6 +245,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions public Q_SLOTS: void newContext(Context *ctx); void onSelectedArchItem(std::vector decals); + private: QPoint lastPos_; LineShader lineShader_; -- cgit v1.2.3 From ecc4c3fa7bdf1726377cd5cf2199b3cabd233427 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 15 Jul 2018 17:50:58 +0200 Subject: added highlight groups --- gui/fpgaviewwidget.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gui/fpgaviewwidget.h') diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index ea4a17cf..33eb2800 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -245,6 +245,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions public Q_SLOTS: void newContext(Context *ctx); void onSelectedArchItem(std::vector decals); + void onHighlightGroupChanged(std::vector decals, int group); private: QPoint lastPos_; @@ -273,7 +274,12 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions LineShaderData selectedShader_; std::vector selectedItems_; - bool selectedItemsChanged; + bool selectedItemsChanged_; + + LineShaderData highlightShader_[8]; + std::vector highlightItems_[8]; + bool highlightItemsChanged_[8]; + QColor highlightColors[8]; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3