Small improvement to the NetlistWidget (more fields).
This commit is contained in:
parent
96e6c9dd06
commit
abee13d669
|
@ -772,15 +772,23 @@ void Net::_preDestroy()
|
|||
cdebug_tabw(18,-1);
|
||||
}
|
||||
|
||||
string Net::_getFlagsAsString() const
|
||||
// **********************************
|
||||
{
|
||||
string ds;
|
||||
ds += ((isDeepNet() ) ? "d" : "-");
|
||||
ds += ((_isExternal ) ? "e" : "-");
|
||||
ds += ((_isGlobal ) ? "g" : "-");
|
||||
ds += ((_isAutomatic) ? "a" : "-");
|
||||
return ds;
|
||||
}
|
||||
|
||||
string Net::_getString() const
|
||||
// ***************************
|
||||
{
|
||||
string bs = Inherit::_getString();
|
||||
string ds = "\"" + getString(_name) + "\" ";
|
||||
ds += ((isDeepNet() ) ? "d" : "-");
|
||||
ds += ((_isExternal ) ? "e" : "-");
|
||||
ds += ((_isGlobal ) ? "g" : "-");
|
||||
ds += ((_isAutomatic) ? "a" : "-");
|
||||
ds += _getFlagsAsString();
|
||||
ds += " ";
|
||||
ds += getString(_type ) + " ";
|
||||
ds += getString(_direction);
|
||||
|
|
|
@ -251,6 +251,7 @@ class Net : public Entity {
|
|||
public: virtual void _toJsonSignature(JsonWriter*) const;
|
||||
public: virtual void _toJsonCollections(JsonWriter*) const;
|
||||
public: virtual string _getTypeName() const {return _TName("Net");};
|
||||
public: string _getFlagsAsString() const;
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: NetMainName& _getMainName() { return _mainName; }
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace Hurricane {
|
|||
|
||||
|
||||
int SimpleNetInformations::getColumnCount ()
|
||||
{ return 3; }
|
||||
{ return 6; }
|
||||
|
||||
|
||||
QVariant SimpleNetInformations::getColumnName ( int column )
|
||||
|
@ -71,7 +71,10 @@ namespace Hurricane {
|
|||
switch ( column ) {
|
||||
case 0: return QVariant(QObject::tr("Net"));
|
||||
case 1: return QVariant(QObject::tr("Plugs"));
|
||||
case 2: return QVariant(QObject::tr("RoutingPads"));
|
||||
case 2: return QVariant(QObject::tr("RPs"));
|
||||
case 3: return QVariant(QObject::tr("Flags"));
|
||||
case 4: return QVariant(QObject::tr("Type"));
|
||||
case 5: return QVariant(QObject::tr("Direction"));
|
||||
}
|
||||
return QVariant(QObject::tr("Column Out of Bound"));
|
||||
}
|
||||
|
@ -84,11 +87,15 @@ namespace Hurricane {
|
|||
case 1: return (unsigned int)_plugsCount;
|
||||
case 2:
|
||||
if (_net->isGlobal()) {
|
||||
if (not _rpsCount) return "N/A (global)";
|
||||
string s = getString(_rpsCount) + " (global)";
|
||||
if (not _rpsCount) return "N/A";
|
||||
string s = getString(_rpsCount);
|
||||
return s.c_str();
|
||||
}
|
||||
return (unsigned int)_rpsCount;
|
||||
case 3: return QString::fromStdString( getString( _net->_getFlagsAsString() ));
|
||||
case 4: return QString::fromStdString( getString( _net->getType() ));
|
||||
case 5: return QString::fromStdString( getString( _net->getDirection() ));
|
||||
|
||||
}
|
||||
return QVariant(QObject::tr("Column Out of Bound"));
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Hurricane {
|
|||
|
||||
QHeaderView* horizontalHeader = _view->horizontalHeader();
|
||||
horizontalHeader->setDefaultAlignment ( Qt::AlignHCenter );
|
||||
horizontalHeader->setMinimumSectionSize( (Graphics::isHighDpi()) ? 300 : 150 );
|
||||
horizontalHeader->setMinimumSectionSize( (Graphics::isHighDpi()) ? 150 : 75 );
|
||||
horizontalHeader->setStretchLastSection( true );
|
||||
|
||||
QHeaderView* verticalHeader = _view->verticalHeader();
|
||||
|
@ -151,24 +151,18 @@ namespace Hurricane {
|
|||
_forceReselect = false;
|
||||
}
|
||||
|
||||
SelectedNetSet::iterator remove;
|
||||
SelectedNetSet::iterator isel = _selecteds.begin ();
|
||||
SelectedNetSet::iterator isel = _selecteds.begin ();
|
||||
while ( isel != _selecteds.end() ) {
|
||||
switch ( isel->getAccesses() ) {
|
||||
case 1: break;
|
||||
case 64:
|
||||
emit netSelected ( Occurrence(isel->getNet()) );
|
||||
break;
|
||||
case 0:
|
||||
emit netUnselected ( Occurrence(isel->getNet()) );
|
||||
remove = isel;
|
||||
++isel;
|
||||
_selecteds.erase ( remove );
|
||||
continue;
|
||||
default:
|
||||
cerr << Bug("NetlistWidget::updateSelecteds(): invalid code %d"
|
||||
,isel->getAccesses()) << endl;
|
||||
SelectedNetSet::iterator remove = isel++;
|
||||
if ( remove->getAccesses() == 0 ) {
|
||||
emit netUnselected ( Occurrence(remove->getNet()) );
|
||||
_selecteds.erase ( remove );
|
||||
}
|
||||
}
|
||||
isel = _selecteds.begin ();
|
||||
while ( isel != _selecteds.end() ) {
|
||||
if ( isel->getAccesses() == 64 )
|
||||
emit netSelected ( Occurrence(isel->getNet()) );
|
||||
++isel;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace Tramontana {
|
|||
|
||||
QHeaderView* horizontalHeader = _view->horizontalHeader();
|
||||
horizontalHeader->setDefaultAlignment ( Qt::AlignHCenter );
|
||||
horizontalHeader->setMinimumSectionSize( (Graphics::isHighDpi()) ? 300 : 150 );
|
||||
horizontalHeader->setMinimumSectionSize( (Graphics::isHighDpi()) ? 150 : 75 );
|
||||
horizontalHeader->setStretchLastSection( true );
|
||||
|
||||
QHeaderView* verticalHeader = _view->verticalHeader();
|
||||
|
|
Loading…
Reference in New Issue