HAL
gate_details_tab_widget.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"). All Rights reserved.
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in all
16 // copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 // SOFTWARE.
25 
26 #pragma once
27 
34 
35 namespace hal
36 {
37  class Gate;
38  class DetailsFrameWidget;
39  class GateInfoTable;
40  class GatePinTree;
41  class BooleanFunctionTable;
42  class LUTTableWidget;
43  class DataTableWidget;
44  class GroupingsOfItemWidget;
45  class CommentWidget;
46 
54  {
55  Q_OBJECT
56 
57  private:
58  enum GateTypeCategory {none, lut, ff, latch};
59 
60  public:
67 
73  void setGate(Gate* gate);
74 
75  private Q_SLOTS:
76 
77  void handleGateBooleanFunctionChanged(Gate* g);
78 
79 
80  private:
86  void showMultiTab(GateDetailsTabWidget::GateTypeCategory gateTypeCategory);
87 
91  void hideMultiTab();
92 
98  void hideOrShorMultiTab(GateTypeCategory gateTypeCategory);
99 
103  void setupBooleanFunctionTables(Gate* gate, GateTypeCategory gateTypeCategory);
104 
108  GateTypeCategory getGateTypeCategory(Gate* gate) const;
109 
113  void handleLutConfigContextMenuRequested(QPoint pos);//might make an own class for the configstring, context menu is handled there?
114 
115  bool mMultiTabVisible = true;
116  int mMultiTabIndex;
117  QWidget* mMultiTabContent;
118 
119  Gate* mCurrentGate;
120 
121  //general tab
122  GateInfoTable* mGateInfoTable;
123  DetailsFrameWidget* mGateInformationFrame;
124 
125  //groupings tab
126  GroupingsOfItemWidget* mGroupingsOfItemTable;
127  DetailsFrameWidget* mGroupingsFrame;
128 
129  //pins tab
130  GatePinTree* mPinsTree;
131  DetailsFrameWidget* mPinsFrame;
132 
133  //ff tab
134  BooleanFunctionTable* mFfFunctionTable;
135  DetailsFrameWidget* mFfFrame;
136 
137  //latch tab
138  BooleanFunctionTable* mLatchFunctionTable;
139  DetailsFrameWidget* mLatchFrame;
140 
141  //lut tab
142  BooleanFunctionTable* mLutFunctionTable;
143  DetailsFrameWidget* mLutFrame;
144 
145  QLabel* mLutConfigLabel;
146  DetailsFrameWidget* mLutConfigurationFrame;
147 
148  LUTTableWidget* mLutTable;
149  DetailsFrameWidget* mTruthTableFrame;
150 
151  //boolean function tab
152  BooleanFunctionTable* mFullFunctionTable;
153  DetailsFrameWidget* mBooleanFunctionsFrame;
154 
155  //data tab
156  DataTableWidget* mDataTable;
157  DetailsFrameWidget* mDataFrame;
158 
159  //comment tab
160  CommentWidget* mCommentWidget;
161  };
162 }
A table view that shows BooleanFunctions and clear-preset behaviors.
A widget to display the data of a DataContainer (Module, Gate or Net)
The DetailsTabWidget that is responsible for showing Gate details.
GateDetailsTabWidget(QWidget *parent=nullptr)
Definition: gate.h:58
A widget to display the pins of a given gate.
Definition: gate_pin_tree.h:43
A TableView to display all groupings that contain a specified Gate, Net or Module.
A view for truth-tables (based on the LUTTableModel)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const