HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
solve_fsm_interaction.h
Go to the documentation of this file.
1 // MIT License
2 //
3 // Copyright (c) 2019 Ruhr University Bochum, Chair for Embedded Security. All Rights reserved.
4 // Copyright (c) 2019 Marc Fyrbiak, Sebastian Wallat, Max Hoffmann ("ORIGINAL AUTHORS"). All rights reserved.
5 // Copyright (c) 2021 Max Planck Institute for Security and Privacy. All Rights reserved.
6 // Copyright (c) 2021 Jörn Langheinrich, Julian Speith, Nils Albartus, René Walendy, Simon Klix ("ORIGINAL AUTHORS").
7 // All Rights reserved.
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
15 //
16 // The above copyright notice and this permission notice shall be included in all
17 // copies or substantial portions of the Software.
18 //
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 // SOFTWARE.
26 
27 #pragma once
28 
29 #include "QGVCore/QGVScene.h"
30 #include "hal_core/defines.h"
31 #include <QHash>
32 #include <QMap>
33 
34 namespace hal {
35  class Net;
36 
40  class SolveFsmInteraction : public QGVInteraction {
41  Q_OBJECT
42  public:
48  SolveFsmInteraction(QGVScene* parent);
49 
51 
57  void registerNode(QGVNode* node) override;
58 
64  void registerEdge(QGVEdge* edge) override;
65 
66  private Q_SLOTS:
72  void handleHALSelectionChanged(void* sender);
73 
77  void handleQGVSelectionChanged();
78 
84  void handleEdgeContextMenu(QGVEdge* edge);
85 
91  void handleSceneChanged(const QList<QRectF>& changedArea);
92 
93  private:
96 
98  QGVScene* mScene;
99 
101  QRectF mItemArea;
102 
109  QMap<Net*,int> transitionValues(QGVEdge* edge) const;
110 
114  void resetEdgeHighlight();
115  };
116 
123  QGVInteraction* constructSolveFsmInteraction(QGVScene* parent);
124 
130  static SolveFsmInteractionRegistration sRegistration;
131 
132  public:
137  };
138 
139 }
140 
void registerNode(QGVNode *node) override
SolveFsmInteraction(QGVScene *parent)
void registerEdge(QGVEdge *edge) override
Definition: defines.h:45
QGVInteraction * constructSolveFsmInteraction(QGVScene *parent)