diff options
author | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-27 13:46:44 +0100 |
---|---|---|
committer | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-27 13:47:21 +0100 |
commit | dc46eea24d37311e28bc5830e899a77a625a075e (patch) | |
tree | e4752b8dac91a03049db9ebd060be532a89576a0 /gui/fpgaviewwidget.h | |
parent | 96608c8d07dd149c033c98172e79d15e7bd2b69c (diff) | |
download | nextpnr-dc46eea24d37311e28bc5830e899a77a625a075e.tar.gz nextpnr-dc46eea24d37311e28bc5830e899a77a625a075e.tar.bz2 nextpnr-dc46eea24d37311e28bc5830e899a77a625a075e.zip |
gui: allow building for ECP5 and on Windows
Diffstat (limited to 'gui/fpgaviewwidget.h')
-rw-r--r-- | gui/fpgaviewwidget.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 690b12b8..73021dbe 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -143,12 +143,32 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions Inner(WireId _wire) : wire(_wire) {} Inner(PipId _pip) : pip(_pip) {} Inner(GroupId _group) : group(_group) {} + Inner() {} } element; float x, y; // Decal X and Y PickedElement(BelId bel, float x, float y) : type(ElementType::BEL), element(bel), x(x), y(y) {} PickedElement(WireId wire, float x, float y) : type(ElementType::WIRE), element(wire), x(x), y(y) {} PickedElement(PipId pip, float x, float y) : type(ElementType::PIP), element(pip), x(x), y(y) {} PickedElement(GroupId group, float x, float y) : type(ElementType::GROUP), element(group), x(x), y(y) {} + PickedElement(const PickedElement &other) : type(other.type) + { + switch (type) { + case ElementType::BEL: + element.bel = other.element.bel; + break; + case ElementType::WIRE: + element.wire = other.element.wire; + break; + case ElementType::PIP: + element.pip = other.element.pip; + break; + case ElementType::GROUP: + element.group = other.element.group; + break; + default: + NPNR_ASSERT_FALSE("Invalid ElementType"); + } + } DecalXY decal(Context *ctx) const { |