In the Netlist tab of the Controller, add a count of RoutingPads.
* New: In Hurricane, in NetlistWidget & NetlistModel, adds a column for the RoutingPads count. Special display to mark global nets. * Change: In Hurricane, in all MVC's models, some improvements on the way the columns are sized and the titles displayeds.
This commit is contained in:
parent
ed2cd18c48
commit
8ead28d86c
|
@ -1,57 +1,20 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Project.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
// Universite Pierre et Marie Curie
|
|
||||||
//
|
//
|
||||||
// Main contributors :
|
// +-----------------------------------------------------------------+
|
||||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
|
||||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
|
||||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
|
||||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
|
||||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
|
||||||
// Christian Masson <Christian.Masson@lip6.fr>
|
|
||||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
|
||||||
//
|
|
||||||
// The Coriolis Project is free software; you can redistribute it
|
|
||||||
// and/or modify it under the terms of the GNU General Public License
|
|
||||||
// as published by the Free Software Foundation; either version 2 of
|
|
||||||
// the License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// The Coriolis Project is distributed in the hope that it will be
|
|
||||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
||||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with the Coriolis Project; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
||||||
// USA
|
|
||||||
//
|
|
||||||
// License-Tag
|
|
||||||
// Authors-Tag
|
|
||||||
// ===================================================================
|
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Jean-Paul CHAPUT |
|
// | Author : Jean-Paul CHAPUT |
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./NetInformations.cpp" |
|
// | C++ Module : "./NetInformations.cpp" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "hurricane/Name.h"
|
#include "hurricane/Name.h"
|
||||||
#include "hurricane/Net.h"
|
#include "hurricane/Net.h"
|
||||||
#include "hurricane/viewer/NetInformations.h"
|
#include "hurricane/viewer/NetInformations.h"
|
||||||
|
@ -100,7 +63,7 @@ namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
int SimpleNetInformations::getColumnCount ()
|
int SimpleNetInformations::getColumnCount ()
|
||||||
{ return 2; }
|
{ return 3; }
|
||||||
|
|
||||||
|
|
||||||
QVariant SimpleNetInformations::getColumnName ( int column )
|
QVariant SimpleNetInformations::getColumnName ( int column )
|
||||||
|
@ -108,6 +71,7 @@ namespace Hurricane {
|
||||||
switch ( column ) {
|
switch ( column ) {
|
||||||
case 0: return QVariant(QObject::tr("Net"));
|
case 0: return QVariant(QObject::tr("Net"));
|
||||||
case 1: return QVariant(QObject::tr("Plugs"));
|
case 1: return QVariant(QObject::tr("Plugs"));
|
||||||
|
case 2: return QVariant(QObject::tr("RoutingPads"));
|
||||||
}
|
}
|
||||||
return QVariant(QObject::tr("Column Out of Bound"));
|
return QVariant(QObject::tr("Column Out of Bound"));
|
||||||
}
|
}
|
||||||
|
@ -116,8 +80,15 @@ namespace Hurricane {
|
||||||
QVariant SimpleNetInformations::getColumn ( int column )
|
QVariant SimpleNetInformations::getColumn ( int column )
|
||||||
{
|
{
|
||||||
switch ( column ) {
|
switch ( column ) {
|
||||||
case 0: return _columnNet;
|
case 0: return _netName;
|
||||||
case 1: return _columnPlug;
|
case 1: return (unsigned int)_plugsCount;
|
||||||
|
case 2:
|
||||||
|
if (_net->isGlobal()) {
|
||||||
|
if (not _rpsCount) return "N/A (global)";
|
||||||
|
string s = getString(_rpsCount) + " (global)";
|
||||||
|
return s.c_str();
|
||||||
|
}
|
||||||
|
return (unsigned int)_rpsCount;
|
||||||
}
|
}
|
||||||
return QVariant(QObject::tr("Column Out of Bound"));
|
return QVariant(QObject::tr("Column Out of Bound"));
|
||||||
}
|
}
|
||||||
|
@ -125,9 +96,9 @@ namespace Hurricane {
|
||||||
|
|
||||||
SimpleNetInformations::SimpleNetInformations ( const Net* net )
|
SimpleNetInformations::SimpleNetInformations ( const Net* net )
|
||||||
: NetInformations(net)
|
: NetInformations(net)
|
||||||
|
, _netName (getString(getName()).c_str())
|
||||||
, _plugsCount (_net->getPlugs().getSize())
|
, _plugsCount (_net->getPlugs().getSize())
|
||||||
, _columnNet (getString(getName()).c_str())
|
, _rpsCount (_net->getRoutingPads().getSize())
|
||||||
, _columnPlug ((unsigned int)_plugsCount)
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,11 @@ namespace Hurricane {
|
||||||
_view->setModel ( _sortModel );
|
_view->setModel ( _sortModel );
|
||||||
|
|
||||||
QHeaderView* horizontalHeader = _view->horizontalHeader();
|
QHeaderView* horizontalHeader = _view->horizontalHeader();
|
||||||
|
horizontalHeader->setDefaultAlignment ( Qt::AlignHCenter );
|
||||||
|
horizontalHeader->setMinimumSectionSize( (Graphics::isHighDpi()) ? 300 : 150 );
|
||||||
|
horizontalHeader->setResizeMode ( 0, QHeaderView::Interactive );
|
||||||
|
horizontalHeader->setResizeMode ( 1, QHeaderView::Interactive );
|
||||||
|
horizontalHeader->setResizeMode ( 2, QHeaderView::Interactive );
|
||||||
horizontalHeader->setStretchLastSection( true );
|
horizontalHeader->setStretchLastSection( true );
|
||||||
|
|
||||||
QHeaderView* verticalHeader = _view->verticalHeader();
|
QHeaderView* verticalHeader = _view->verticalHeader();
|
||||||
|
|
|
@ -112,7 +112,6 @@ namespace Hurricane {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( role == Qt::FontRole ) {
|
if ( role == Qt::FontRole ) {
|
||||||
//if ( index.row() == 0 ) return QVariant();
|
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0: return nameFont;
|
case 0: return nameFont;
|
||||||
case 1: return valueFont;
|
case 1: return valueFont;
|
||||||
|
|
|
@ -176,7 +176,6 @@ namespace Hurricane {
|
||||||
if ( !index.isValid() ) return QVariant ();
|
if ( !index.isValid() ) return QVariant ();
|
||||||
|
|
||||||
if ( role == Qt::SizeHintRole ) {
|
if ( role == Qt::SizeHintRole ) {
|
||||||
if ( index.row() == 0 ) return QVariant();
|
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0: return 200;
|
case 0: return 200;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -117,7 +117,6 @@ namespace Hurricane {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( role == Qt::FontRole ) {
|
if ( role == Qt::FontRole ) {
|
||||||
if ( index.row() == 0 ) return QVariant();
|
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
default: return entityFont;
|
default: return entityFont;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,16 +67,17 @@ namespace Hurricane {
|
||||||
static QVariant getColumnName ( int column );
|
static QVariant getColumnName ( int column );
|
||||||
virtual QVariant getColumn ( int column );
|
virtual QVariant getColumn ( int column );
|
||||||
inline size_t getPlugsCount () const;
|
inline size_t getPlugsCount () const;
|
||||||
|
inline size_t getRpsCount () const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
QVariant _netName;
|
||||||
size_t _plugsCount;
|
size_t _plugsCount;
|
||||||
QVariant _columnNet;
|
size_t _rpsCount;
|
||||||
QVariant _columnPlug;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
inline size_t SimpleNetInformations::getPlugsCount () const
|
inline size_t SimpleNetInformations::getPlugsCount () const { return _plugsCount; }
|
||||||
{ return _plugsCount; }
|
inline size_t SimpleNetInformations::getRpsCount () const { return _rpsCount; }
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
|
@ -180,6 +180,7 @@ namespace Hurricane {
|
||||||
void NetlistWidget::setCell ( Cell* cell )
|
void NetlistWidget::setCell ( Cell* cell )
|
||||||
{
|
{
|
||||||
_cell = cell;
|
_cell = cell;
|
||||||
|
_view->setVisible( false );
|
||||||
_view->selectionModel()->clear();
|
_view->selectionModel()->clear();
|
||||||
_baseModel->setCell<InformationType>( cell );
|
_baseModel->setCell<InformationType>( cell );
|
||||||
|
|
||||||
|
@ -187,7 +188,9 @@ namespace Hurricane {
|
||||||
setWindowTitle( tr(windowTitle.c_str()) );
|
setWindowTitle( tr(windowTitle.c_str()) );
|
||||||
|
|
||||||
_view->selectRow( 0 );
|
_view->selectRow( 0 );
|
||||||
_view->resizeColumnToContents ( 0 );
|
for ( int i=0 ; i<_baseModel->columnCount() ; ++i )
|
||||||
|
_view->resizeColumnToContents( i );
|
||||||
|
_view->setVisible( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue