2008-11-27 02:14:50 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
2008-11-27 02:14:50 -06:00
|
|
|
//
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
// +-----------------------------------------------------------------+
|
2008-11-27 02:14:50 -06:00
|
|
|
// | 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 |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./PaletteWidget.cpp" |
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include <limits>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QGridLayout>
|
|
|
|
#include "hurricane/DataBase.h"
|
|
|
|
#include "hurricane/Technology.h"
|
|
|
|
#include "hurricane/BasicLayer.h"
|
|
|
|
#include "hurricane/BasicLayers.h"
|
|
|
|
#include "hurricane/ExtensionSlice.h"
|
|
|
|
#include "hurricane/Cell.h"
|
|
|
|
#include "hurricane/viewer/Graphics.h"
|
|
|
|
#include "hurricane/viewer/PaletteItem.h"
|
|
|
|
#include "hurricane/viewer/PaletteNamedItem.h"
|
|
|
|
#include "hurricane/viewer/PaletteLayerItem.h"
|
|
|
|
#include "hurricane/viewer/PaletteExtensionGoItem.h"
|
|
|
|
#include "hurricane/viewer/PaletteWidget.h"
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Hurricane;
|
|
|
|
|
|
|
|
|
|
|
|
class GridBuffer {
|
|
|
|
public:
|
2016-06-05 18:07:54 -05:00
|
|
|
GridBuffer ( QGridLayout*, size_t rowMax, size_t startRow=0, size_t startColumn=0 );
|
|
|
|
~GridBuffer ();
|
|
|
|
inline int getRow () const;
|
|
|
|
inline int getColumn () const;
|
|
|
|
inline int getCurrentRow () const;
|
|
|
|
void addSection ( QWidget*, Qt::Alignment align=0 );
|
|
|
|
void addWidget ( QWidget*, Qt::Alignment align=0 );
|
|
|
|
void newColumn ();
|
|
|
|
void flushWidgets ();
|
|
|
|
inline bool columnOverload () const;
|
2008-11-27 02:14:50 -06:00
|
|
|
protected:
|
|
|
|
QGridLayout* _grid;
|
2009-04-21 06:41:10 -05:00
|
|
|
size_t _rowMax;
|
|
|
|
size_t _row;
|
|
|
|
size_t _column;
|
2008-11-27 02:14:50 -06:00
|
|
|
vector<QWidget*> _widgets;
|
|
|
|
vector<Qt::Alignment> _aligns;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
GridBuffer::GridBuffer ( QGridLayout* grid
|
|
|
|
, size_t maxRow
|
|
|
|
, size_t startRow
|
|
|
|
, size_t startColumn )
|
2016-06-05 18:07:54 -05:00
|
|
|
: _grid (grid)
|
|
|
|
, _rowMax (maxRow)
|
|
|
|
, _row (startRow)
|
|
|
|
, _column (startColumn)
|
|
|
|
, _widgets()
|
|
|
|
, _aligns ()
|
|
|
|
{
|
|
|
|
cdebug.log(19) << "GridBuffer::GridBuffer() column:" << _column << " row:" << _row << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
GridBuffer::~GridBuffer ()
|
|
|
|
{
|
|
|
|
cdebug.log(19) << "GridBuffer::~GridBuffer() column:" << _column << " row:" << _row << endl;
|
|
|
|
}
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
|
|
|
|
inline int GridBuffer::getRow () const { return _row; }
|
|
|
|
inline int GridBuffer::getColumn () const { return _column; }
|
|
|
|
inline int GridBuffer::getCurrentRow () const { return _widgets.size() + _row; }
|
2016-06-05 18:07:54 -05:00
|
|
|
inline bool GridBuffer::columnOverload () const { return getCurrentRow() >= (int)_rowMax; }
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
|
|
|
|
void GridBuffer::flushWidgets ()
|
|
|
|
{
|
2016-06-05 18:07:54 -05:00
|
|
|
cdebug.log(19,1) << "GridBuffer::flushWidgets()" << endl;
|
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
if ( columnOverload() ) {
|
|
|
|
_column++;
|
|
|
|
_row = 0;
|
|
|
|
}
|
|
|
|
|
2016-06-05 18:07:54 -05:00
|
|
|
for ( size_t i=0 ; i < _widgets.size() ; ++i ) {
|
|
|
|
cdebug.log(19) << "add Widget to grid @(" << _column << "," << _row << ")" << endl;
|
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
_grid->addWidget ( _widgets[i], _row++, _column, _aligns[i] );
|
2016-06-05 18:07:54 -05:00
|
|
|
}
|
2008-11-27 02:14:50 -06:00
|
|
|
_widgets.clear ();
|
|
|
|
_aligns.clear ();
|
2016-06-05 18:07:54 -05:00
|
|
|
|
|
|
|
cdebug.tabw(19,-1);
|
2008-11-27 02:14:50 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GridBuffer::newColumn ()
|
|
|
|
{
|
2016-06-05 18:07:54 -05:00
|
|
|
cdebug.log(19) << "GridBuffer::newColumn()" << endl;
|
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
if ( columnOverload() ) return;
|
|
|
|
|
|
|
|
flushWidgets ();
|
|
|
|
_column++;
|
|
|
|
_row = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GridBuffer::addWidget ( QWidget* widget, Qt::Alignment align )
|
|
|
|
{
|
|
|
|
_widgets.push_back ( widget );
|
|
|
|
_aligns .push_back ( align );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GridBuffer::addSection ( QWidget* widget, Qt::Alignment align )
|
|
|
|
{
|
|
|
|
flushWidgets ();
|
|
|
|
_widgets.push_back ( widget );
|
|
|
|
_aligns .push_back ( align );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
} // Anonymous namespace.
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace Hurricane {
|
|
|
|
|
|
|
|
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "PaletteWidget".
|
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
QWidget* PaletteWidget::_createGroupItem ( const Name& name )
|
|
|
|
{
|
|
|
|
QLabel* groupLabel = new QLabel ();
|
|
|
|
groupLabel->setText ( getString(name).c_str() );
|
|
|
|
groupLabel->setFont ( Graphics::getFixedFont(QFont::Bold,false,false) );
|
|
|
|
return groupLabel;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PaletteNamedItem* PaletteWidget::_createNamedItem ( const Name& name, bool checked )
|
|
|
|
{
|
|
|
|
PaletteNamedItem* item = PaletteNamedItem::create ( name, checked );
|
2008-12-12 07:28:19 -06:00
|
|
|
connect ( item, SIGNAL(visibleToggled()), this, SIGNAL(paletteChanged()) );
|
2008-11-27 02:14:50 -06:00
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PaletteLayerItem* PaletteWidget::_createLayerItem ( BasicLayer* layer, bool checked )
|
|
|
|
{
|
|
|
|
PaletteLayerItem* item = PaletteLayerItem::create ( layer, checked );
|
2008-12-12 07:28:19 -06:00
|
|
|
connect ( item, SIGNAL(visibleToggled()), this, SIGNAL(paletteChanged()) );
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PaletteExtensionGoItem* PaletteWidget::_createExtensionGoItem ( const Name& name, bool checked )
|
|
|
|
{
|
|
|
|
PaletteExtensionGoItem* item = PaletteExtensionGoItem::create ( name );
|
|
|
|
connect ( item, SIGNAL(visibleToggled()), this, SIGNAL(paletteChanged()) );
|
2008-11-27 02:14:50 -06:00
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-21 06:41:10 -05:00
|
|
|
PaletteWidget::PaletteWidget ( QWidget* parent )
|
* ./hurricane:
- Bug: In PaletteWidget, do not derive from QScrollArea. Instead uses it
as a child widget. This solves the refreshing problem of the Palette.
As a rule now: never derives from anything other than QWidget.
- New: GotoWidget, not having this feature finally unverved me enough for
beeing implemented. You can specify an (x,y) on which the view will
be centered and an aperture which gives the size of the view smallest
side. It's a way of specifying the zoom level (as the zoom is not
meaningful for users). An aperture of "zero" disable that feature,
that is, zoom remains unchanged. The coordinates are integer which
are implicitly expressed in the current mode used by the viewer
(Symbolic, Grid, or Physical in micro-meters).
- Change: Big rewrite of how the Symbolic/Grid/Physical modes are sets
to/from the CellWidget. Impacted widgets are CellWidget &
DisplayFilterWidget.
Main changes are that there is no more "individual" setter/getter for
modes (setSymbolic(), setGrid(), setPhysical(DbU::UnitPower)) but one
with two arguments:
setDbuMode(int mode,DbU::UnitPower)
Signals & slots of the widgets also evolves into:
dbuModeChanged(int mode,DbU::UnitPower)
changeDbuMode (int mode,DbU::UnitPower)
2010-04-26 08:22:23 -05:00
|
|
|
: QWidget (parent)
|
|
|
|
, _scrollArea (new QScrollArea(this))
|
2009-04-21 06:41:10 -05:00
|
|
|
, _layerItems ()
|
|
|
|
, _extensionGoItems()
|
* ./hurricane:
- Bug: In PaletteWidget, do not derive from QScrollArea. Instead uses it
as a child widget. This solves the refreshing problem of the Palette.
As a rule now: never derives from anything other than QWidget.
- New: GotoWidget, not having this feature finally unverved me enough for
beeing implemented. You can specify an (x,y) on which the view will
be centered and an aperture which gives the size of the view smallest
side. It's a way of specifying the zoom level (as the zoom is not
meaningful for users). An aperture of "zero" disable that feature,
that is, zoom remains unchanged. The coordinates are integer which
are implicitly expressed in the current mode used by the viewer
(Symbolic, Grid, or Physical in micro-meters).
- Change: Big rewrite of how the Symbolic/Grid/Physical modes are sets
to/from the CellWidget. Impacted widgets are CellWidget &
DisplayFilterWidget.
Main changes are that there is no more "individual" setter/getter for
modes (setSymbolic(), setGrid(), setPhysical(DbU::UnitPower)) but one
with two arguments:
setDbuMode(int mode,DbU::UnitPower)
Signals & slots of the widgets also evolves into:
dbuModeChanged(int mode,DbU::UnitPower)
changeDbuMode (int mode,DbU::UnitPower)
2010-04-26 08:22:23 -05:00
|
|
|
, _showAll (new QPushButton(_scrollArea))
|
|
|
|
, _hideAll (new QPushButton(_scrollArea))
|
2009-04-21 06:41:10 -05:00
|
|
|
, _grid (new QGridLayout())
|
|
|
|
, _columnHeight (22)
|
|
|
|
, _extensionRow (0)
|
|
|
|
, _extensionColumn (0)
|
|
|
|
, _extensionGroup (NULL)
|
2008-11-27 02:14:50 -06:00
|
|
|
{
|
* ./hurricane:
- Bug: In PaletteWidget, do not derive from QScrollArea. Instead uses it
as a child widget. This solves the refreshing problem of the Palette.
As a rule now: never derives from anything other than QWidget.
- New: GotoWidget, not having this feature finally unverved me enough for
beeing implemented. You can specify an (x,y) on which the view will
be centered and an aperture which gives the size of the view smallest
side. It's a way of specifying the zoom level (as the zoom is not
meaningful for users). An aperture of "zero" disable that feature,
that is, zoom remains unchanged. The coordinates are integer which
are implicitly expressed in the current mode used by the viewer
(Symbolic, Grid, or Physical in micro-meters).
- Change: Big rewrite of how the Symbolic/Grid/Physical modes are sets
to/from the CellWidget. Impacted widgets are CellWidget &
DisplayFilterWidget.
Main changes are that there is no more "individual" setter/getter for
modes (setSymbolic(), setGrid(), setPhysical(DbU::UnitPower)) but one
with two arguments:
setDbuMode(int mode,DbU::UnitPower)
Signals & slots of the widgets also evolves into:
dbuModeChanged(int mode,DbU::UnitPower)
changeDbuMode (int mode,DbU::UnitPower)
2010-04-26 08:22:23 -05:00
|
|
|
setContentsMargins ( 0, 0, 0, 0 );
|
|
|
|
_scrollArea->setWidgetResizable ( true );
|
2008-11-27 02:14:50 -06:00
|
|
|
QVBoxLayout* vLayout = new QVBoxLayout ();
|
|
|
|
QHBoxLayout* hLayout = new QHBoxLayout ();
|
|
|
|
|
|
|
|
_showAll->setIcon ( QIcon(":/images/palette_show_all.png") );
|
|
|
|
_showAll->setFlat ( true );
|
|
|
|
|
|
|
|
_hideAll->setIcon ( QIcon(":/images/palette_hide_all.png") );
|
|
|
|
_hideAll->setFlat ( true );
|
|
|
|
|
|
|
|
connect ( _showAll, SIGNAL(clicked()), this, SLOT(showAll()) );
|
|
|
|
connect ( _hideAll, SIGNAL(clicked()), this, SLOT(hideAll()) );
|
|
|
|
|
|
|
|
hLayout->addStretch ();
|
2009-04-21 06:41:10 -05:00
|
|
|
hLayout->addWidget ( _showAll );
|
2008-11-27 02:14:50 -06:00
|
|
|
hLayout->addStretch ();
|
2009-04-21 06:41:10 -05:00
|
|
|
hLayout->addWidget ( _hideAll );
|
2008-11-27 02:14:50 -06:00
|
|
|
hLayout->addStretch ();
|
|
|
|
|
|
|
|
QFrame* separator = new QFrame ();
|
|
|
|
separator->setFrameShape ( QFrame::HLine );
|
|
|
|
separator->setFrameShadow ( QFrame::Sunken );
|
|
|
|
|
|
|
|
vLayout->setSpacing ( 0 );
|
2009-04-21 06:41:10 -05:00
|
|
|
vLayout->addLayout ( hLayout );
|
|
|
|
vLayout->addWidget ( separator );
|
2008-11-27 02:14:50 -06:00
|
|
|
vLayout->addSpacing ( 5 );
|
2009-04-21 06:41:10 -05:00
|
|
|
vLayout->addLayout ( _grid );
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
_grid->setHorizontalSpacing ( 10 );
|
|
|
|
_grid->setVerticalSpacing ( 0 );
|
|
|
|
//_grid->setSizeConstraint ( QLayout::SetFixedSize );
|
|
|
|
|
2009-04-21 06:41:10 -05:00
|
|
|
vLayout->addStretch ();
|
|
|
|
|
* ./hurricane:
- Bug: In PaletteWidget, do not derive from QScrollArea. Instead uses it
as a child widget. This solves the refreshing problem of the Palette.
As a rule now: never derives from anything other than QWidget.
- New: GotoWidget, not having this feature finally unverved me enough for
beeing implemented. You can specify an (x,y) on which the view will
be centered and an aperture which gives the size of the view smallest
side. It's a way of specifying the zoom level (as the zoom is not
meaningful for users). An aperture of "zero" disable that feature,
that is, zoom remains unchanged. The coordinates are integer which
are implicitly expressed in the current mode used by the viewer
(Symbolic, Grid, or Physical in micro-meters).
- Change: Big rewrite of how the Symbolic/Grid/Physical modes are sets
to/from the CellWidget. Impacted widgets are CellWidget &
DisplayFilterWidget.
Main changes are that there is no more "individual" setter/getter for
modes (setSymbolic(), setGrid(), setPhysical(DbU::UnitPower)) but one
with two arguments:
setDbuMode(int mode,DbU::UnitPower)
Signals & slots of the widgets also evolves into:
dbuModeChanged(int mode,DbU::UnitPower)
changeDbuMode (int mode,DbU::UnitPower)
2010-04-26 08:22:23 -05:00
|
|
|
QWidget* scrollAdaptator = new QWidget ();
|
|
|
|
scrollAdaptator->setLayout ( vLayout );
|
|
|
|
_scrollArea->setContentsMargins ( 0, 0, 0, 0 );
|
|
|
|
_scrollArea->setWidget ( scrollAdaptator );
|
|
|
|
_scrollArea->setHorizontalScrollBarPolicy ( Qt::ScrollBarAsNeeded );
|
|
|
|
_scrollArea->setVerticalScrollBarPolicy ( Qt::ScrollBarAsNeeded );
|
|
|
|
_scrollArea->setFrameStyle ( QFrame::Plain );
|
|
|
|
|
|
|
|
vLayout = new QVBoxLayout ();
|
|
|
|
vLayout->setSpacing ( 0 );
|
|
|
|
vLayout->addWidget ( _scrollArea );
|
|
|
|
|
|
|
|
setLayout ( vLayout );
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
|
|
|
|
readGraphics ();
|
2009-04-21 06:41:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
void PaletteWidget::readGraphics ()
|
2009-04-21 06:41:10 -05:00
|
|
|
{
|
|
|
|
GridBuffer gridBuffer ( _grid, _columnHeight );
|
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
size_t gi = 0;
|
|
|
|
const vector<DrawingGroup*>& groups = Graphics::getStyle()->getDrawingGroups();
|
2012-11-16 06:48:38 -06:00
|
|
|
const DrawingStyles& styles = groups[gi]->getDrawingStyles();
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
gridBuffer.addSection ( _createGroupItem(groups[gi]->getName()), Qt::AlignHCenter );
|
|
|
|
for ( size_t si=0 ; si<styles.size() ; si++ ) {
|
2010-06-22 15:37:28 -05:00
|
|
|
if ( not styles[si]->isGoMatched() ) continue;
|
2008-11-27 02:14:50 -06:00
|
|
|
if ( styles[si]->getName() == DisplayStyle::Foreground ) continue;
|
|
|
|
if ( styles[si]->getName() == DisplayStyle::Background ) continue;
|
|
|
|
if ( styles[si]->getName() == DisplayStyle::SelectionDraw ) continue;
|
|
|
|
if ( styles[si]->getName() == DisplayStyle::SelectionFill ) continue;
|
|
|
|
|
|
|
|
PaletteNamedItem* item = _createNamedItem ( styles[si]->getName() );
|
|
|
|
gridBuffer.addWidget ( item );
|
|
|
|
_layerItems [ item->getName() ] = item;
|
|
|
|
}
|
2009-04-21 06:41:10 -05:00
|
|
|
if ( _columnHeight < numeric_limits<size_t>::max() )
|
|
|
|
gridBuffer.newColumn ();
|
|
|
|
else
|
|
|
|
gridBuffer.flushWidgets ();
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
DataBase* database = DataBase::getDB();
|
|
|
|
if ( database ) {
|
|
|
|
Technology* technology = database->getTechnology();
|
|
|
|
if ( technology ) {
|
|
|
|
for ( gi=1 ; gi<groups.size() ; gi++ ) {
|
|
|
|
gridBuffer.addSection ( _createGroupItem(groups[gi]->getName()), Qt::AlignHCenter );
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
const DrawingStyles& styles = groups[gi]->getDrawingStyles();
|
2008-11-27 02:14:50 -06:00
|
|
|
for ( size_t si=0 ; si<styles.size() ; si++ ) {
|
|
|
|
BasicLayer* basicLayer = technology->getBasicLayer ( styles[si]->getName() );
|
|
|
|
|
|
|
|
if ( basicLayer ) {
|
|
|
|
PaletteLayerItem* item = _createLayerItem ( basicLayer );
|
|
|
|
gridBuffer.addWidget ( item );
|
|
|
|
_layerItems [ item->getName() ] = item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
size_t si = 0;
|
|
|
|
forEach ( BasicLayer*, basicLayer, technology->getBasicLayers() ) {
|
|
|
|
if ( !find((*basicLayer)->getName()) ) {
|
|
|
|
if ( !si )
|
|
|
|
gridBuffer.addSection ( _createGroupItem("Unmatcheds"), Qt::AlignHCenter );
|
|
|
|
|
|
|
|
PaletteLayerItem* item = _createLayerItem ( *basicLayer );
|
|
|
|
gridBuffer.addWidget ( item );
|
|
|
|
_layerItems [ item->getName() ] = item;
|
|
|
|
|
|
|
|
cerr << "[WARNING] BasicLayer \"" << (*basicLayer)->getName()
|
|
|
|
<< "\" has no associated DisplayStyle." << endl;
|
|
|
|
|
|
|
|
si++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( si ) gi++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-05 18:07:54 -05:00
|
|
|
gridBuffer.flushWidgets ();
|
2009-04-21 06:41:10 -05:00
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
_extensionRow = gridBuffer.getRow();
|
|
|
|
_extensionColumn = gridBuffer.getColumn();
|
|
|
|
_extensionGroup = _createGroupItem ( "Extensions" );
|
|
|
|
gridBuffer.addSection ( _extensionGroup, Qt::AlignHCenter );
|
|
|
|
gridBuffer.flushWidgets ();
|
2016-06-05 18:07:54 -05:00
|
|
|
|
|
|
|
cdebug.log(19) << " column:" << _extensionColumn << " row:" << _extensionRow << endl;
|
2008-11-27 02:14:50 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PaletteWidget::updateExtensions ( Cell* cell )
|
|
|
|
{
|
2016-06-05 18:07:54 -05:00
|
|
|
cdebug.log(19,1) << "PaletteWidget::updateExtensions()" << endl;
|
|
|
|
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
if (_extensionGroup) {
|
|
|
|
_grid->removeWidget ( _extensionGroup );
|
|
|
|
//_extensionGroup->deleteLater ();
|
|
|
|
delete _extensionGroup;
|
|
|
|
_extensionGroup = NULL;
|
|
|
|
|
|
|
|
PaletteItems::iterator iextension = _extensionGoItems.begin();
|
|
|
|
for ( ; iextension != _extensionGoItems.end() ; ++iextension ) {
|
|
|
|
_grid->removeWidget ( iextension->second );
|
|
|
|
//iextension->second->deleteLater ();
|
|
|
|
delete iextension->second;
|
|
|
|
}
|
|
|
|
_extensionGoItems.clear ();
|
2008-11-27 02:14:50 -06:00
|
|
|
}
|
|
|
|
|
2016-06-05 18:07:54 -05:00
|
|
|
cdebug.log(19) << " column:" << _extensionColumn << " row:" << _extensionRow << endl;
|
|
|
|
|
2009-04-21 06:41:10 -05:00
|
|
|
GridBuffer gridBuffer ( _grid, _columnHeight, _extensionRow, _extensionColumn );
|
2008-11-27 02:14:50 -06:00
|
|
|
_extensionGroup = _createGroupItem ( "Extensions" );
|
|
|
|
gridBuffer.addSection ( _extensionGroup, Qt::AlignHCenter );
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( cell ) {
|
|
|
|
forEach ( ExtensionSlice*, extension, cell->getExtensionSlices() ) {
|
|
|
|
PaletteExtensionGoItem* item = _createExtensionGoItem ( (*extension)->getName(), false );
|
|
|
|
gridBuffer.addWidget ( item );
|
|
|
|
_extensionGoItems [ item->getName() ] = item;
|
|
|
|
}
|
2008-11-27 02:14:50 -06:00
|
|
|
}
|
|
|
|
gridBuffer.flushWidgets ();
|
2016-06-05 18:07:54 -05:00
|
|
|
|
|
|
|
cdebug.tabw(19,-1);
|
2008-11-27 02:14:50 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Implementation of DataBase native save/restore in JSON (step 3).
* Test: post-receive hook on server should send mail [1].
* New: In VLSISAPD, in Parameter, callback have now a tag, which the
pointer to the caller. This allow for the callback removal when
the caller is destroyed.
* New: In VLSISAPD, in WidgetDescription, when associated to a parameter,
the destructor must remove the associated callback function on
the Parameter.
* New: In Hurricane, added JSON support for Configuration, separated
from vlsisapd, as the support is not available at this point.
JSON support for Configuration, Parameter & LayoutDescription.
* Change: In Hurricane, in JsonStack, the stack of JsonObjects has been
displaced here from HurricaneHandler. This way, all
JsonObject::toData() can access the JsonOjects in the context
of the parser.
* New: In Hurricane, in DBo::toJson() added support for Entity by
reference (ids).
* New: In Hurricane, added JSON support for all Layer sub-class types.
* New: In Hurricane, in Technology, export the Layers, but must be
sorted by increasing mask value.
* New: In Hurricane, in Entity, added support for Entity by reference (ids).
* New: In Hurricane, in DataBase, added technology full support.
* New: In Hurricane, In JsonNet, move the ring rebuild management from
JsonStack to JsonNet.
* New: In Hurricane, added JSON support for NetAlias, NetExternalcomponents
(not cleanly implemented as a Relation).
* New: In Hurricane, new method Cell::fromJson() to load a cell from
a JSON file.
* New: In Hurricane, In Graphics, make it an observable, for when JSON
fully reload the graphic state, it must be able to notify other
objects (namely the Controller).
* New: In Hurricane, in ControllerWidget, observe the Graphics to regenerate
the palette as needed. New method ControllerTab::graphicsUpdated().
* New: In Hurricane, in RawDrawingStyle added a destructor to release the
Qt pen/brush. Added JSON support for HSVr, DrawingStyle, DrawingGroup,
& DisplayStyle.
* New: In Hurricane, in GraphicsWidget, rewrite correctly the readGraphics()
to erase the previous widgets and re-create the new ones.
* New: In Hurricane, in PaletteWidget, correct re-creation of the layout/widgets
in case of Graphics change.
* New: In CRL Core, in System, register the parameters callbacks with
the address of the object, for later deletion.
* New: In CRL Core, in AllianceFramework, make it observable, to notify
library changes. For the AllianceFramework creation, now allow to
completly bypass the Python initialization system, when we expect
to restore it from a full blob. Added methods to sets the default
RoutingGauge & CellGauge.
* New: In CRL Core, added JSON suppport for CellGauge, RoutingLayerGauge
& RoutingGauge.
* New: In CRL Core, in LibraryManager, oberver AllianceFramework, to update
the list of libraries in case of change (for JSON full reload).
2016-02-20 14:24:44 -06:00
|
|
|
void PaletteWidget::resetGraphics ()
|
|
|
|
{
|
|
|
|
QLayoutItem* child = NULL;
|
|
|
|
while ( (child = _grid->takeAt(0)) != 0 ) {
|
|
|
|
_grid->removeWidget( child->widget() );
|
|
|
|
delete child->widget();
|
|
|
|
}
|
|
|
|
|
|
|
|
_layerItems.clear();
|
|
|
|
_extensionGroup = NULL;
|
|
|
|
_extensionGoItems.clear();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PaletteWidget::rereadGraphics ()
|
|
|
|
{
|
|
|
|
resetGraphics();
|
|
|
|
readGraphics();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-21 06:41:10 -05:00
|
|
|
void PaletteWidget::_getSection ( const QString section, QLabel*& label, vector<PaletteItem*>& items ) const
|
|
|
|
{
|
|
|
|
label = NULL;
|
|
|
|
items.clear ();
|
|
|
|
|
|
|
|
bool found = false;
|
|
|
|
for ( int index=0 ; index < _grid->count() ; index++ ) {
|
|
|
|
QLayoutItem* item = _grid->itemAt ( index );
|
|
|
|
if ( !item ) continue;
|
|
|
|
|
|
|
|
QLabel* ilabel = dynamic_cast<QLabel*>(item->widget());
|
|
|
|
if ( ilabel ) {
|
|
|
|
if ( found ) break;
|
|
|
|
if ( ilabel->text() != section ) continue;
|
|
|
|
found = true;
|
|
|
|
|
|
|
|
label = ilabel;
|
|
|
|
} else if ( found ) {
|
|
|
|
PaletteItem* paletteItem = dynamic_cast<PaletteItem*>(item->widget());
|
|
|
|
if ( paletteItem ) items.push_back ( paletteItem );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PaletteWidget::setSectionVisible ( const QString section, bool visible )
|
|
|
|
{
|
|
|
|
QLabel* label;
|
|
|
|
vector<PaletteItem*> items;
|
|
|
|
|
|
|
|
_getSection ( section, label, items );
|
|
|
|
if ( !label ) return;
|
|
|
|
|
|
|
|
if ( visible ) label->show ();
|
|
|
|
else label->hide ();
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<items.size() ; ++i ) {
|
|
|
|
if ( visible ) items[i]->show ();
|
|
|
|
else items[i]->hide ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
bool PaletteWidget::isDrawable ( const Name& name ) const
|
|
|
|
{
|
|
|
|
PaletteItem* item = find ( name );
|
|
|
|
if ( item )
|
2008-12-12 07:28:19 -06:00
|
|
|
return item->isItemVisible ();
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool PaletteWidget::isSelectable ( const Name& name ) const
|
|
|
|
{
|
|
|
|
PaletteItem* item = find ( name );
|
|
|
|
if ( item )
|
|
|
|
return item->isItemSelectable ();
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PaletteWidget::showAll ()
|
|
|
|
{
|
|
|
|
PaletteItems::iterator iitem = _layerItems.begin();
|
|
|
|
for ( ; iitem != _layerItems.end() ; iitem++ )
|
2008-12-12 07:28:19 -06:00
|
|
|
iitem->second->setItemVisible ( true );
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
iitem = _extensionGoItems.begin();
|
|
|
|
for ( ; iitem != _extensionGoItems.end() ; iitem++ )
|
2008-12-12 07:28:19 -06:00
|
|
|
iitem->second->setItemVisible ( true );
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
emit paletteChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PaletteWidget::hideAll ()
|
|
|
|
{
|
|
|
|
PaletteItems::iterator iitem = _layerItems.begin();
|
|
|
|
for ( ; iitem != _layerItems.end() ; iitem++ )
|
2008-12-12 07:28:19 -06:00
|
|
|
iitem->second->setItemVisible ( false );
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
iitem = _extensionGoItems.begin();
|
|
|
|
for ( ; iitem != _extensionGoItems.end() ; iitem++ )
|
2008-12-12 07:28:19 -06:00
|
|
|
iitem->second->setItemVisible ( false );
|
2008-11-27 02:14:50 -06:00
|
|
|
|
|
|
|
emit paletteChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-21 06:41:10 -05:00
|
|
|
void PaletteWidget::showSection ( const QString section )
|
|
|
|
{
|
|
|
|
QLabel* label;
|
|
|
|
vector<PaletteItem*> items;
|
|
|
|
|
|
|
|
_getSection ( section, label, items );
|
|
|
|
if ( !label ) return;
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<items.size() ; ++i )
|
|
|
|
items[i]->setItemVisible ( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PaletteWidget::hideSection ( const QString section )
|
|
|
|
{
|
|
|
|
QLabel* label;
|
|
|
|
vector<PaletteItem*> items;
|
|
|
|
|
|
|
|
_getSection ( section, label, items );
|
|
|
|
if ( !label ) return;
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<items.size() ; ++i )
|
|
|
|
items[i]->setItemVisible ( false );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-11-27 02:14:50 -06:00
|
|
|
PaletteItem* PaletteWidget::find ( const Name& name ) const
|
|
|
|
{
|
|
|
|
PaletteItems::const_iterator iitem = _layerItems.find(name);
|
|
|
|
if ( iitem != _layerItems.end() )
|
|
|
|
return iitem->second;
|
|
|
|
|
|
|
|
iitem = _extensionGoItems.find(name);
|
|
|
|
if ( iitem != _extensionGoItems.end() )
|
|
|
|
return iitem->second;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-04 07:30:39 -06:00
|
|
|
void PaletteWidget::setItemVisible ( const Name& name, bool visible )
|
|
|
|
{
|
|
|
|
PaletteItem* item = find ( name );
|
|
|
|
if ( item ) {
|
|
|
|
item->setItemVisible ( visible );
|
|
|
|
emit paletteChanged();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-03 09:05:05 -06:00
|
|
|
void PaletteWidget::changeStyle ()
|
2009-01-18 15:17:43 -06:00
|
|
|
{
|
|
|
|
PaletteItems::iterator iitem = _layerItems.begin();
|
|
|
|
for ( ; iitem != _layerItems.end() ; iitem++ )
|
2009-02-03 09:05:05 -06:00
|
|
|
iitem->second->changeStyle ();
|
2009-01-18 15:17:43 -06:00
|
|
|
|
|
|
|
iitem = _extensionGoItems.begin();
|
|
|
|
for ( ; iitem != _extensionGoItems.end() ; iitem++ )
|
2009-02-03 09:05:05 -06:00
|
|
|
iitem->second->changeStyle ();
|
2009-01-18 15:17:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Improved UpdateSession & exception catching. Start of RoutingGauge implem.
Miscellaneous:
* Change: In <crlcore>, in display.conf use the same display threshold
for both METAL2 & METAL3.
In alliance.conf, the side of VIAs in the gauge is 2l (not 3l).
In kite.conf, separate edge densities for H/V.
* Change: In <Cell>, in flattenNets() use flag as argument, not a
boolean. Do not create rings for clock or supply nets.
* Change: In <DeepNet>, in _createRoutingPads() do not create rings
for clock or supply net (duplicated policy as in Cell::flattenNets()).
* Bug: In <ControllerWidget>, at last find the bad signal disconnect
that was causing ungraceful messages.
* Change: In <knik>, in Edge display occupancy/capacity in the string
name. Improved display progress and debugging capabilities.
Improved exception catch & breakpoint managment:
* Bug: In <PaletteWidget>, in updateExtensions() replace the calls to
deleteLayer() by delete. This cause the widget to be immediatly
erased instead of waiting for the event queue to be completly
processed. This was causing the widget to be left in a incoherent
state when stoping at a breakpoint.
* Bug: In <BreakpointWidget>, in execNoModal(), flush the main event
loop (QApplication::flush()) *before* lauching the *local* event
loop. This is to ensure all widgets are in their final state when
waiting (especially <PaletteWidget>).
* Change: In <ExceptionWidget>, new method catchAllWrapper() to
execute any std::function< void() > function/method with a "try"/
"catch" wraparound and lauch the widget in case something is catch.
* New: In <hurricane>, support for a oberver pattern, backported from
<katabatic> with an Obervable capable of being linked to any
number of Obervers.
* New: In <Cell>, made it observable to detect Cell change, currently
emit two kind of signals:
- Cell::CellAboutToChange : *before* any change.
- Cell::CellChanged : *after* the change has been completed.
* New: In <UpdateSession>, in Go::invalidate() add the Cell owning the
Go to the UPDATOR_STACK (of course the cell is added only once).
In addition, when the Cell is added, send a notification of
Cell::CellAboutToChange to all it's observers. The slave instances
are also invalidated.
Conversely in UpdateSession::_preDestroy() for each invalidated
Cell send a Cell::CellChanged notification to all observer.
The UPDATOR_STACK has been slightly amended to accept Cell which
are not Gos. Prior to this, the Cell where completly excluded from
the UpdateSession mechanism, so it's instances where never actualised
of anything referring to the Cell for that matter.
Note: we use two different mechanisms to transmit a Cell change,
observers and the slave instance map. I think at some point it
should be unificated.
* Change: In <CellViewer>, make it a Cell observer to redraw when the
cell is modificated (also update the palette).
Uses the catchAllWrapper() to protect all critical actions.
* Change: In <GraphicTool>, no longer need of cellPreModificated and
cellPostModificated signals. Now done through the Cell obersvers.
* Change: In <mauka>, <etesian> & <kite> now uses the catchAllWrapper
method for protection (need to split methods in two, to be able
to pass it as argument). No longer emit cellPreModificated and
cellPostModificated.
Support for RoutingGauge in P&R:
* Bug: In <placeandroute.py>, the connection from the internal power
ring to the connectors was not done correctly. Wrong contact layers
leading to a gap.
* Change: In <BuildPowerRails>, detection of the corona signals based
on how the "pck_px" pad is connected. No longer based on name
matching.
* Change: In <placeandroute.py>, support for 2 routing metal only
(3 metal in the technology).
* Change: In <katabatic> & <kite> support for a "top layer" limitation
on the routing gauge, this allows to use only two routing metals
(METAL2 & METAL3). Work in progress.
2014-04-20 12:25:08 -05:00
|
|
|
} // Hurricane namespace.
|