HAL
net_details_tab_widget.cpp
Go to the documentation of this file.
2 
5 
8 
11 
12 #include "hal_core/netlist/net.h"
13 
14 namespace hal
15 {
17  {
19 
20  //create all widgets and replace the qWidgets in the frames with them
21  mNetInfoTable = new NetInfoTable(this);
22 
23  //general tab
24  mNetInformationFrame = new DetailsFrameWidget(mNetInfoTable, "Net Information", this);
25  ModuleTableModel* moduleModel = new ModuleTableModel(this);
26  mNetModuleTable = new NetModuleTable(moduleModel, this);
27 
28  mModulesFrame = new DetailsFrameWidget(mNetModuleTable, "Modules", this);
29 
30  QList<DetailsFrameWidget*> framesGeneralTab({mNetInformationFrame, mModulesFrame});
31  addTab("General", framesGeneralTab);
32 
33  //groupings tab
34  mGroupingsOfItemTable = new GroupingsOfItemWidget;
35  mGroupingsFrame = new DetailsFrameWidget(mGroupingsOfItemTable, "Groupings", this);
36  connect(mGroupingsOfItemTable, &GroupingsOfItemWidget::updateText, mGroupingsFrame, &DetailsFrameWidget::setText);
37  addTab("Groupings", mGroupingsFrame, false);
38 
39  //sources / destinations tab
40 
42  mSourcesTable = new NetEndpointTable(sourceModel, this);
43 
44  EndpointTableModel* destinationModel = new EndpointTableModel(EndpointTableModel::Type::destination, this);
45  mDestinationsTable = new NetEndpointTable(destinationModel, this);
46 
47  mSourcesFrame = new DetailsFrameWidget(mSourcesTable, "Sources", this);
48  mDestinationsFrame = new DetailsFrameWidget(mDestinationsTable, "Destinations", this);
49 
50  QList<DetailsFrameWidget*> framesSrcDstTab({mSourcesFrame, mDestinationsFrame});
51  addTab("Src / Dst", framesSrcDstTab);
52 
53  //data tab
54  mDataTable = new DataTableWidget(this);
55  mDataFrame = new DetailsFrameWidget(mDataTable, "Data", this);
56 
57  addTab("Data", mDataFrame, false);
58 
59  //connect widgets with frames for refreshing the headers when necessary
60  connect(mNetModuleTable, &NetModuleTable::updateText, mModulesFrame, &DetailsFrameWidget::setText);
61 
62  connect(mSourcesTable, &NetEndpointTable::updateText, mSourcesFrame, &DetailsFrameWidget::setText);
63  connect(mDestinationsTable, &NetEndpointTable::updateText, mDestinationsFrame, &DetailsFrameWidget::setText);
64  }
65 
67  {
69  //pass net or other stuff to widgets
70  mNetInfoTable->setNet(net);
71  mGroupingsOfItemTable->setNet(net);
72 
73  mNetModuleTable->setNet(net);
74  mSourcesTable->setNet(net);
75  mDestinationsTable->setNet(net);
76  mDataTable->setNet(net);
77  }
78 }
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation source
A widget to display the data of a DataContainer (Module, Gate or Net)
void setText(const QString &text)
int addTab(const QString &label, QList< DetailsFrameWidget * > frames)
void setIcon(SelectionDetailsIconProvider::IconCategory catg, u32 itemId=0)
A model to display endpoint data.
A TableView to display all groupings that contain a specified Gate, Net or Module.
void updateText(const QString &text)
A model to display module data.
NetDetailsTabWidget(QWidget *parent=nullptr)
void updateText(const QString &text)
Definition: net.h:58
void setNet(Net *net)
void setNet(u32 netID)
void updateText(const QString &text)
Net * net
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)