aboutsummaryrefslogtreecommitdiffstats
path: root/gui/fpgaviewwidget.h
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-27 01:22:29 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-27 01:22:29 +0100
commit5a7fe84a042439d83f152661c58c9d5fa8ed8e52 (patch)
tree04fd4515a1ef23d7ae0d0ecd6b1fba22ac1b34de /gui/fpgaviewwidget.h
parent0eb40da749d22a8bb74306d38c090a85258015e9 (diff)
downloadnextpnr-5a7fe84a042439d83f152661c58c9d5fa8ed8e52.tar.gz
nextpnr-5a7fe84a042439d83f152661c58c9d5fa8ed8e52.tar.bz2
nextpnr-5a7fe84a042439d83f152661c58c9d5fa8ed8e52.zip
gui: clang-format
Diffstat (limited to 'gui/fpgaviewwidget.h')
-rw-r--r--gui/fpgaviewwidget.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h
index 067f3b7f..4fefe020 100644
--- a/gui/fpgaviewwidget.h
+++ b/gui/fpgaviewwidget.h
@@ -20,7 +20,6 @@
#ifndef MAPGLWIDGET_H
#define MAPGLWIDGET_H
-#include <boost/optional.hpp>
#include <QMainWindow>
#include <QMutex>
#include <QOpenGLBuffer>
@@ -32,11 +31,12 @@
#include <QThread>
#include <QTimer>
#include <QWaitCondition>
+#include <boost/optional.hpp>
+#include "designwidget.h"
+#include "lineshader.h"
#include "nextpnr.h"
#include "quadtree.h"
-#include "lineshader.h"
-#include "designwidget.h"
NEXTPNR_NAMESPACE_BEGIN
@@ -108,7 +108,6 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
QSize minimumSizeHint() const override;
QSize sizeHint() const override;
-
public Q_SLOTS:
void newContext(Context *ctx);
void onSelectedArchItem(std::vector<DecalXY> decals);
@@ -124,14 +123,16 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
void clickedWire(WireId wire);
private:
- const float zoomNear_ = 0.1f; // do not zoom closer than this
+ const float zoomNear_ = 0.1f; // do not zoom closer than this
const float zoomFar_ = 100.0f; // do not zoom further than this
const float zoomLvl1_ = 1.0f;
const float zoomLvl2_ = 5.0f;
- struct PickedElement {
+ struct PickedElement
+ {
ElementType type;
- union Inner {
+ union Inner
+ {
BelId bel;
WireId wire;
PipId pip;
@@ -202,17 +203,14 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
bool zoomOutbound;
- PassthroughFlags() :
- zoomOutbound(false) {}
- PassthroughFlags &operator=(const PassthroughFlags &other) noexcept {
+ PassthroughFlags() : zoomOutbound(false) {}
+ PassthroughFlags &operator=(const PassthroughFlags &other) noexcept
+ {
zoomOutbound = other.zoomOutbound;
return *this;
}
- void clear()
- {
- zoomOutbound = false;
- }
+ void clear() { zoomOutbound = false; }
};
struct RendererArgs
@@ -253,7 +251,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
void renderGraphicElement(RendererData *data, LineShaderData &out, const GraphicElement &el, float x, float y);
void renderDecal(RendererData *data, LineShaderData &out, const DecalXY &decal);
void renderArchDecal(RendererData *data, const DecalXY &decal);
- void populateQuadTree(RendererData *data, const DecalXY &decal, const PickedElement& element);
+ void populateQuadTree(RendererData *data, const DecalXY &decal, const PickedElement &element);
boost::optional<PickedElement> pickElement(float worldx, float worldy);
QVector4D mouseToWorldCoordinates(int x, int y);
QVector4D mouseToWorldDimensions(float x, float y);