diff --git a/hurricane/src/hurricane/Net.cpp b/hurricane/src/hurricane/Net.cpp index 643cb1ac..12315255 100644 --- a/hurricane/src/hurricane/Net.cpp +++ b/hurricane/src/hurricane/Net.cpp @@ -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); diff --git a/hurricane/src/hurricane/hurricane/Net.h b/hurricane/src/hurricane/hurricane/Net.h index 5f598133..545e58e0 100644 --- a/hurricane/src/hurricane/hurricane/Net.h +++ b/hurricane/src/hurricane/hurricane/Net.h @@ -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; } diff --git a/hurricane/src/viewer/NetInformations.cpp b/hurricane/src/viewer/NetInformations.cpp index 1064cd65..87dc620b 100644 --- a/hurricane/src/viewer/NetInformations.cpp +++ b/hurricane/src/viewer/NetInformations.cpp @@ -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")); } diff --git a/hurricane/src/viewer/NetlistWidget.cpp b/hurricane/src/viewer/NetlistWidget.cpp index b0bc2994..8902993a 100644 --- a/hurricane/src/viewer/NetlistWidget.cpp +++ b/hurricane/src/viewer/NetlistWidget.cpp @@ -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; } diff --git a/tramontana/src/EquipotentialsWidget.cpp b/tramontana/src/EquipotentialsWidget.cpp index 0f08d8ff..216b472f 100644 --- a/tramontana/src/EquipotentialsWidget.cpp +++ b/tramontana/src/EquipotentialsWidget.cpp @@ -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();