2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
2008-07-10 04:22:36 -05:00
|
|
|
//
|
2008-10-21 08:49:48 -05:00
|
|
|
// This file is part of the Coriolis Software.
|
2009-01-27 04:14:46 -06:00
|
|
|
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
2008-07-10 04:22:36 -05:00
|
|
|
//
|
|
|
|
// ===================================================================
|
|
|
|
//
|
|
|
|
// $Id$
|
|
|
|
//
|
|
|
|
// x-----------------------------------------------------------------x
|
|
|
|
// | |
|
2008-10-21 08:49:48 -05:00
|
|
|
// | C O R I O L I S |
|
2008-07-10 04:22:36 -05:00
|
|
|
// | 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 : "./CellWidget.cpp" |
|
|
|
|
// | *************************************************************** |
|
|
|
|
// | U p d a t e s |
|
|
|
|
// | |
|
|
|
|
// x-----------------------------------------------------------------x
|
|
|
|
|
|
|
|
|
2009-01-21 10:42:58 -06:00
|
|
|
#include <sys/resource.h>
|
|
|
|
#include <ctime>
|
2009-04-15 11:09:18 -05:00
|
|
|
#include <cmath>
|
2009-01-21 10:42:58 -06:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
#include <QApplication>
|
2008-11-16 16:11:40 -06:00
|
|
|
#include <QMouseEvent>
|
|
|
|
#include <QKeyEvent>
|
|
|
|
#include <QAction>
|
|
|
|
#include <QPainter>
|
|
|
|
#include <QStylePainter>
|
|
|
|
#include <QBitmap>
|
|
|
|
#include <QLabel>
|
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
#include "hurricane/SharedName.h"
|
2008-11-16 16:11:40 -06:00
|
|
|
#include "hurricane/DataBase.h"
|
|
|
|
#include "hurricane/Technology.h"
|
|
|
|
#include "hurricane/BasicLayer.h"
|
|
|
|
#include "hurricane/Cell.h"
|
|
|
|
#include "hurricane/Instance.h"
|
|
|
|
#include "hurricane/Slice.h"
|
|
|
|
#include "hurricane/Segment.h"
|
2008-12-20 10:56:05 -06:00
|
|
|
#include "hurricane/Horizontal.h"
|
|
|
|
#include "hurricane/Vertical.h"
|
2008-11-16 16:11:40 -06:00
|
|
|
#include "hurricane/Contact.h"
|
|
|
|
#include "hurricane/Pad.h"
|
|
|
|
#include "hurricane/RoutingPad.h"
|
2008-12-12 07:28:19 -06:00
|
|
|
#include "hurricane/ExtensionGo.h"
|
2008-11-16 16:11:40 -06:00
|
|
|
|
|
|
|
#include "hurricane/viewer/Graphics.h"
|
2008-11-26 03:35:07 -06:00
|
|
|
#include "hurricane/viewer/PaletteItem.h"
|
|
|
|
#include "hurricane/viewer/PaletteWidget.h"
|
2008-11-16 16:11:40 -06:00
|
|
|
// #include "MapView.h"
|
|
|
|
#include "hurricane/viewer/Command.h"
|
|
|
|
#include "hurricane/viewer/CellWidget.h"
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
2009-10-19 12:17:21 -05:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
string getTime ( const char* format )
|
|
|
|
{
|
|
|
|
time_t t = time(NULL);
|
|
|
|
struct tm* bt = localtime(&t);
|
|
|
|
char formatted[1024];
|
|
|
|
|
|
|
|
strftime ( formatted, 1024, format, bt );
|
|
|
|
|
|
|
|
return formatted;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of anonymous namespace.
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
|
|
|
namespace Hurricane {
|
|
|
|
|
|
|
|
|
2008-12-12 07:28:19 -06:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Collections.
|
|
|
|
|
|
|
|
|
|
|
|
typedef Hurricane::Filter<Occurrence> OccurrenceHF;
|
|
|
|
typedef Hurricane::Locator<Occurrence> OccurrenceHL;
|
|
|
|
typedef Hurricane::Collection<Occurrence> OccurrenceHC;
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Occurrences_IsSelectable".
|
|
|
|
|
|
|
|
|
|
|
|
class Occurrences_IsSelectable : public OccurrenceHF {
|
|
|
|
public:
|
|
|
|
inline Occurrences_IsSelectable ( const CellWidget* );
|
|
|
|
inline Occurrences_IsSelectable ( const Occurrences_IsSelectable& );
|
|
|
|
virtual OccurrenceHF* getClone () const;
|
|
|
|
virtual bool accept ( Occurrence ) const;
|
|
|
|
virtual string _getString () const;
|
|
|
|
private:
|
|
|
|
const CellWidget* _cellWidget;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
inline Occurrences_IsSelectable::Occurrences_IsSelectable ( const CellWidget* widget )
|
|
|
|
: OccurrenceHF()
|
|
|
|
, _cellWidget(widget)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
inline Occurrences_IsSelectable::Occurrences_IsSelectable ( const Occurrences_IsSelectable& rhs )
|
|
|
|
: OccurrenceHF()
|
|
|
|
, _cellWidget(rhs._cellWidget)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
OccurrenceHF* Occurrences_IsSelectable::getClone () const
|
|
|
|
{
|
|
|
|
return new Occurrences_IsSelectable(_cellWidget);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Occurrences_IsSelectable::accept ( Occurrence occurrence ) const
|
|
|
|
{
|
|
|
|
Entity* entity = occurrence.getEntity();
|
|
|
|
if ( !entity ) return false;
|
|
|
|
|
|
|
|
ExtensionGo* eGo = dynamic_cast<ExtensionGo*>(entity);
|
|
|
|
if ( eGo )
|
|
|
|
return _cellWidget->isSelectable ( eGo->getName() );
|
|
|
|
|
|
|
|
Component* component = dynamic_cast<Component*>(entity);
|
|
|
|
if ( component ) {
|
|
|
|
return _cellWidget->isSelectable ( component->getLayer() );
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string Occurrences_IsSelectable::_getString () const
|
|
|
|
{
|
|
|
|
return "<Occurrences_IsSelectable>";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-03 09:31:20 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget::Spot".
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::Spot::Spot ( CellWidget* cw )
|
|
|
|
: _cellWidget(cw)
|
|
|
|
, _spotPoint()
|
|
|
|
, _restore(false)
|
2008-09-01 09:47:50 -05:00
|
|
|
, _showSpot(true)
|
2008-07-03 09:31:20 -05:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::Spot::restore ()
|
|
|
|
{
|
|
|
|
if ( _restore ) {
|
2008-07-10 04:22:36 -05:00
|
|
|
_cellWidget->getDrawingPlanes().copyToScreen ( _spotPoint.x()-5, _spotPoint.y()-5, 10, 10 );
|
2008-07-03 09:31:20 -05:00
|
|
|
_restore = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::Spot::setRestore ( bool state )
|
2008-09-01 09:47:50 -05:00
|
|
|
{ _restore = state; }
|
2008-07-03 09:31:20 -05:00
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
QPoint CellWidget::Spot::computeSpotPoint ( const QPoint& screenPoint )
|
|
|
|
{
|
|
|
|
Point mousePoint = _cellWidget->screenToDbuPoint ( screenPoint );
|
2010-01-25 09:52:37 -06:00
|
|
|
Point spotPoint = Point ( _cellWidget->_onCursorGrid(mousePoint.getX())
|
|
|
|
, _cellWidget->_onCursorGrid(mousePoint.getY())
|
2008-12-20 10:56:05 -06:00
|
|
|
);
|
2009-10-14 03:20:08 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
return _cellWidget->dbuToScreenPoint(spotPoint);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-03 09:31:20 -05:00
|
|
|
void CellWidget::Spot::moveTo ( const QPoint& screenPoint )
|
|
|
|
{
|
2008-09-01 09:47:50 -05:00
|
|
|
restore ();
|
|
|
|
if ( !_showSpot ) return;
|
|
|
|
|
|
|
|
_restore = true;
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
QPainter& screenPainter = _cellWidget->getDrawingPlanes().painter(PlaneId::Widget);
|
2008-12-20 10:56:05 -06:00
|
|
|
_spotPoint = computeSpotPoint ( screenPoint );
|
2008-07-03 09:31:20 -05:00
|
|
|
|
|
|
|
screenPainter.setPen ( Graphics::getPen("spot") );
|
2008-12-20 10:56:05 -06:00
|
|
|
screenPainter.drawRect ( _spotPoint.x()-3, _spotPoint.y()-3, 6, 6 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget::RedrawEvent".
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::RedrawEvent::RedrawEvent ( EventType type, int shift, CellWidget* widget )
|
|
|
|
: _type(type)
|
|
|
|
, _shift(shift)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget::RedrawManager".
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::RedrawManager::RedrawManager ( CellWidget* widget )
|
2009-02-02 08:45:48 -06:00
|
|
|
: _widget (widget)
|
|
|
|
, _events ()
|
|
|
|
, _refreshSession(0)
|
|
|
|
, _processing (false)
|
|
|
|
, _interrupted (false)
|
2008-12-20 10:56:05 -06:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::RedrawManager::~RedrawManager ()
|
|
|
|
{
|
|
|
|
while ( !_events.empty() ) {
|
|
|
|
delete _events.front ();
|
|
|
|
_events.pop_front ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::RedrawManager::goLeft ( int shift )
|
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
#ifdef ALLOW_REQUEST_INTERRUPT
|
2008-12-20 10:56:05 -06:00
|
|
|
list<RedrawEvent*>::iterator ievent = _events.end();
|
|
|
|
if ( !_events.empty() && (_events.back()->getType() == RedrawEvent::Refresh) )
|
|
|
|
--ievent;
|
|
|
|
_events.insert ( ievent, new RedrawEvent(RedrawEvent::GoLeft,shift,_widget) );
|
2009-01-24 05:14:38 -06:00
|
|
|
#else
|
|
|
|
_events.push_back ( new RedrawEvent(RedrawEvent::GoLeft,shift,_widget) );
|
|
|
|
#endif
|
2008-12-20 10:56:05 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
if ( !_processing ) process ();
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::RedrawManager::goRight ( int shift )
|
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
#ifdef ALLOW_REQUEST_INTERRUPT
|
2008-12-20 10:56:05 -06:00
|
|
|
list<RedrawEvent*>::iterator ievent = _events.end();
|
|
|
|
if ( !_events.empty() && (_events.back()->getType() == RedrawEvent::Refresh) )
|
|
|
|
--ievent;
|
|
|
|
_events.insert ( ievent, new RedrawEvent(RedrawEvent::GoRight,shift,_widget) );
|
2009-01-24 05:14:38 -06:00
|
|
|
#else
|
|
|
|
_events.push_back ( new RedrawEvent(RedrawEvent::GoRight,shift,_widget) );
|
|
|
|
#endif
|
2008-12-20 10:56:05 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
if ( !_processing ) process ();
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::RedrawManager::goUp ( int shift )
|
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
#ifdef ALLOW_REQUEST_INTERRUPT
|
2008-12-20 10:56:05 -06:00
|
|
|
list<RedrawEvent*>::iterator ievent = _events.end();
|
|
|
|
if ( !_events.empty() && (_events.back()->getType() == RedrawEvent::Refresh) )
|
|
|
|
--ievent;
|
|
|
|
_events.insert ( ievent, new RedrawEvent(RedrawEvent::GoUp,shift,_widget) );
|
2009-01-24 05:14:38 -06:00
|
|
|
#else
|
|
|
|
_events.push_back ( new RedrawEvent(RedrawEvent::GoUp,shift,_widget) );
|
|
|
|
#endif
|
2008-12-20 10:56:05 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
if ( !_processing ) process ();
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::RedrawManager::goDown ( int shift )
|
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
#ifdef ALLOW_REQUEST_INTERRUPT
|
2008-12-20 10:56:05 -06:00
|
|
|
list<RedrawEvent*>::iterator ievent = _events.end();
|
|
|
|
if ( !_events.empty() && (_events.back()->getType() == RedrawEvent::Refresh) )
|
|
|
|
--ievent;
|
|
|
|
_events.insert ( ievent, new RedrawEvent(RedrawEvent::GoDown,shift,_widget) );
|
2009-01-24 05:14:38 -06:00
|
|
|
#else
|
|
|
|
_events.push_back ( new RedrawEvent(RedrawEvent::GoDown,shift,_widget) );
|
|
|
|
#endif
|
2008-12-20 10:56:05 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
if ( !_processing ) process ();
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::RedrawManager::refresh ()
|
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
#ifdef ALLOW_REQUEST_INTERRUPT
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( !_events.empty() && (_events.back()->getType() == RedrawEvent::Refresh) ) {
|
2009-01-24 05:14:38 -06:00
|
|
|
_interrupted = true;
|
2008-12-20 10:56:05 -06:00
|
|
|
} else if ( _events.empty() ) {
|
|
|
|
_events.push_back ( new RedrawEvent(RedrawEvent::Refresh,0,_widget) );
|
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
if ( !_processing ) process ();
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
2009-01-24 05:14:38 -06:00
|
|
|
#else
|
2009-02-02 08:45:48 -06:00
|
|
|
bool addRefresh = true;
|
|
|
|
if ( _refreshSession ) {
|
|
|
|
list<RedrawEvent*>::iterator ievent = _events.begin();
|
|
|
|
for ( ; ievent != _events.end() ; ievent++ ) {
|
|
|
|
if ( (_events.back()->getType() == RedrawEvent::Refresh) ) {
|
|
|
|
addRefresh = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( addRefresh )
|
|
|
|
_events.push_back ( new RedrawEvent(RedrawEvent::Refresh,0,_widget) );
|
2009-01-24 05:14:38 -06:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
if ( !_processing && (_refreshSession == 0) ) process ();
|
2009-01-24 05:14:38 -06:00
|
|
|
#endif
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::RedrawManager::process ()
|
2008-12-20 10:56:05 -06:00
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
_processing = true;
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
while ( !_events.empty() ) {
|
|
|
|
RedrawEvent* event = _events.front ();
|
|
|
|
|
|
|
|
switch ( event->getType() ) {
|
|
|
|
case RedrawEvent::GoLeft: _widget->_goLeft ( event->getShift() ); break;
|
|
|
|
case RedrawEvent::GoRight: _widget->_goRight ( event->getShift() ); break;
|
|
|
|
case RedrawEvent::GoUp: _widget->_goUp ( event->getShift() ); break;
|
|
|
|
case RedrawEvent::GoDown: _widget->_goDown ( event->getShift() ); break;
|
|
|
|
case RedrawEvent::Refresh: _widget->_refresh (); break;
|
|
|
|
}
|
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
#ifdef ALLOW_REQUEST_INTERRUPT
|
|
|
|
if ( event->getType() == RedrawEvent::Refresh ) {
|
2008-12-20 10:56:05 -06:00
|
|
|
_events.pop_back ();
|
2009-01-24 05:14:38 -06:00
|
|
|
} else
|
2008-12-20 10:56:05 -06:00
|
|
|
_events.pop_front ();
|
|
|
|
|
|
|
|
delete event;
|
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
if ( _events.empty() && _interrupted ) {
|
2008-12-20 10:56:05 -06:00
|
|
|
_events.push_back ( new RedrawEvent(RedrawEvent::Refresh,0,_widget) );
|
2009-01-24 05:14:38 -06:00
|
|
|
_interrupted = false;
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
2009-01-24 05:14:38 -06:00
|
|
|
#else
|
2009-02-13 10:30:27 -06:00
|
|
|
delete _events.front ();
|
2009-01-24 05:14:38 -06:00
|
|
|
_events.pop_front ();
|
|
|
|
#endif
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
2009-01-24 05:14:38 -06:00
|
|
|
|
|
|
|
_processing = false;
|
2008-07-03 09:31:20 -05:00
|
|
|
}
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-07-10 04:22:36 -05:00
|
|
|
// -------------------------------------------------------------------
|
2008-12-20 10:56:05 -06:00
|
|
|
// Class : "Hurricane::CellWidget::DrawingPlanes".
|
2008-07-10 04:22:36 -05:00
|
|
|
|
|
|
|
|
2009-06-04 13:28:46 -05:00
|
|
|
const int CellWidget::DrawingPlanes::_cartoucheWidth = 743;
|
2009-05-14 06:39:31 -05:00
|
|
|
const int CellWidget::DrawingPlanes::_cartoucheHeight = 80;
|
|
|
|
const int CellWidget::DrawingPlanes::_titleHeight = 60;
|
|
|
|
|
|
|
|
|
2008-07-10 04:22:36 -05:00
|
|
|
CellWidget::DrawingPlanes::DrawingPlanes ( const QSize& size, CellWidget* cw )
|
|
|
|
: _cellWidget(cw)
|
2008-12-25 04:27:58 -06:00
|
|
|
, _printer(NULL)
|
2009-02-23 07:43:36 -06:00
|
|
|
, _image(NULL)
|
2008-08-27 09:06:06 -05:00
|
|
|
, _normalPen()
|
|
|
|
, _linePen()
|
2008-07-10 04:22:36 -05:00
|
|
|
, _workingPlane(0)
|
2008-08-27 09:06:06 -05:00
|
|
|
, _lineMode(false)
|
2008-07-10 04:22:36 -05:00
|
|
|
{
|
|
|
|
for ( size_t i=0 ; i<2 ; i++ )
|
|
|
|
_planes[i] = new QPixmap ( size );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::DrawingPlanes::~DrawingPlanes ()
|
|
|
|
{
|
|
|
|
for ( size_t i=0 ; i<2 ; i++ ) {
|
|
|
|
if ( _painters[i].isActive() ) _painters[i].end();
|
|
|
|
delete _planes[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-08-27 09:06:06 -05:00
|
|
|
void CellWidget::DrawingPlanes::setPen ( const QPen& pen )
|
|
|
|
{
|
|
|
|
_normalPen = pen;
|
|
|
|
_linePen = pen;
|
|
|
|
_linePen.setStyle ( Qt::SolidLine );
|
|
|
|
_linePen.setWidth ( 1 );
|
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
if ( _lineMode ) painter().setPen ( _linePen );
|
|
|
|
else painter().setPen ( _normalPen );
|
2008-08-27 09:06:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::setBrush ( const QBrush& brush )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
painter().setBrush ( brush );
|
2008-08-27 09:06:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-17 06:45:38 -05:00
|
|
|
void CellWidget::DrawingPlanes::setBackground ( const QBrush& brush )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
painter().setBackground ( brush );
|
|
|
|
painter().setBackground ( brush );
|
2008-09-17 06:45:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::setBackgroundMode ( Qt::BGMode mode )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
painter().setBackgroundMode ( mode );
|
|
|
|
painter().setBackgroundMode ( mode );
|
2008-09-17 06:45:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-08-27 09:06:06 -05:00
|
|
|
void CellWidget::DrawingPlanes::setLineMode ( bool mode )
|
|
|
|
{
|
|
|
|
if ( _lineMode != mode ) {
|
|
|
|
_lineMode = mode;
|
|
|
|
if ( _lineMode ) painter().setPen ( _linePen );
|
|
|
|
else painter().setPen ( _normalPen );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-10 04:22:36 -05:00
|
|
|
void CellWidget::DrawingPlanes::resize ( const QSize& size )
|
|
|
|
{
|
|
|
|
for ( size_t i=0 ; i<2 ; i++ ) {
|
|
|
|
bool activePainter = _painters[i].isActive();
|
|
|
|
|
|
|
|
if ( activePainter ) _painters[i].end();
|
|
|
|
delete _planes[i];
|
|
|
|
|
|
|
|
_planes[i] = new QPixmap ( size );
|
|
|
|
if ( activePainter ) _painters[i].begin ( _planes[i] );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::shiftLeft ( int dx )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersBegin ();
|
2009-03-03 16:27:03 -06:00
|
|
|
_painters[PlaneId::Normal ].drawPixmap ( dx, 0, *_planes[PlaneId::Normal ], 0, 0, width()-dx, height() );
|
|
|
|
_painters[PlaneId::Selection].drawPixmap ( dx, 0, *_planes[PlaneId::Selection], 0, 0, width()-dx, height() );
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersEnd ();
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::shiftRight ( int dx )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersBegin ();
|
2009-03-03 16:27:03 -06:00
|
|
|
_painters[PlaneId::Normal ].drawPixmap ( 0, 0, *_planes[PlaneId::Normal ], dx, 0, width()-dx, height() );
|
|
|
|
_painters[PlaneId::Selection].drawPixmap ( 0, 0, *_planes[PlaneId::Selection], dx, 0, width()-dx, height() );
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersEnd ();
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::shiftUp ( int dy )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersBegin ();
|
2009-03-03 16:27:03 -06:00
|
|
|
_painters[PlaneId::Normal ].drawPixmap ( 0, dy, *_planes[PlaneId::Normal ], 0, 0, width(), height()-dy );
|
|
|
|
_painters[PlaneId::Selection].drawPixmap ( 0, dy, *_planes[PlaneId::Selection], 0, 0, width(), height()-dy );
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersEnd ();
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::shiftDown ( int dy )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersBegin ();
|
2009-03-03 16:27:03 -06:00
|
|
|
_painters[PlaneId::Normal ].drawPixmap ( 0, 0, *_planes[PlaneId::Normal ], 0, dy, width(), height()-dy );
|
|
|
|
_painters[PlaneId::Selection].drawPixmap ( 0, 0, *_planes[PlaneId::Selection], 0, dy, width(), height()-dy );
|
2009-04-15 11:09:18 -05:00
|
|
|
buffersEnd ();
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::copyToSelect ( int sx, int sy, int w, int h )
|
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
begin ( PlaneId::Selection );
|
2008-12-25 04:27:58 -06:00
|
|
|
_painters[PlaneId::Selection].setPen ( Qt::NoPen );
|
|
|
|
_painters[PlaneId::Selection].setBackground ( Graphics::getBrush("background") );
|
|
|
|
_painters[PlaneId::Selection].eraseRect ( sx, sy, w, h );
|
|
|
|
//_painters[PlaneId::Selection].setOpacity ( 0.5 );
|
2009-03-03 16:27:03 -06:00
|
|
|
_painters[PlaneId::Selection].drawPixmap ( sx, sy, *_planes[PlaneId::Normal], sx, sy, w, h );
|
2009-04-15 11:09:18 -05:00
|
|
|
end ( PlaneId::Selection );
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingPlanes::copyToScreen ( int sx, int sy, int w, int h )
|
|
|
|
{
|
|
|
|
if ( _cellWidget->showSelection() )
|
2008-12-25 04:27:58 -06:00
|
|
|
_painters[PlaneId::Widget].drawPixmap
|
|
|
|
( sx, sy
|
|
|
|
, *_planes[PlaneId::Selection]
|
|
|
|
, _cellWidget->getOffsetVA().rx()+sx, _cellWidget->getOffsetVA().ry()+sy
|
|
|
|
, w, h
|
|
|
|
);
|
2008-07-10 04:22:36 -05:00
|
|
|
else
|
2008-12-25 04:27:58 -06:00
|
|
|
_painters[PlaneId::Widget].drawPixmap
|
|
|
|
( sx, sy
|
|
|
|
, *_planes[PlaneId::Normal]
|
|
|
|
, _cellWidget->getOffsetVA().rx()+sx, _cellWidget->getOffsetVA().ry()+sy
|
|
|
|
, w, h
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
void CellWidget::DrawingPlanes::drawCartouche ( int right
|
|
|
|
, int bottom
|
|
|
|
, const string& title
|
|
|
|
, const string& area
|
|
|
|
)
|
2008-12-25 04:27:58 -06:00
|
|
|
{
|
2009-05-14 06:39:31 -05:00
|
|
|
QFont font ( "Bitstream Vera Sans", 18 );
|
|
|
|
font.setWeight ( QFont::Bold );
|
|
|
|
|
|
|
|
string user = getenv ( "USER" );
|
|
|
|
if ( user.empty() ) user = "unkown";
|
|
|
|
else {
|
|
|
|
size_t equal = user.find('=');
|
|
|
|
if ( equal != string::npos )
|
|
|
|
user.erase ( 0, equal );
|
2008-12-25 04:27:58 -06:00
|
|
|
}
|
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
string date = getTime ( "%d %b %Y" );
|
|
|
|
|
|
|
|
QPen cartouchePen = QPen ( QBrush(QColor("black")), 1.0 );
|
|
|
|
_painters[PlaneId::Printer].setPen ( cartouchePen );
|
|
|
|
|
|
|
|
QRect cartoucheRect = QRect ( right - _cartoucheWidth
|
|
|
|
, bottom - _cartoucheHeight
|
|
|
|
, _cartoucheWidth
|
|
|
|
, _cartoucheHeight
|
|
|
|
);
|
|
|
|
QRect titleRect = cartoucheRect;
|
|
|
|
titleRect.adjust ( 0, 0, 0, _titleHeight - _cartoucheHeight );
|
|
|
|
|
|
|
|
cartouchePen.setWidth ( 2 );
|
|
|
|
_painters[PlaneId::Printer].setPen ( cartouchePen );
|
|
|
|
_painters[PlaneId::Printer].drawRect ( cartoucheRect );
|
|
|
|
cartouchePen.setWidth ( 1 );
|
|
|
|
_painters[PlaneId::Printer].setPen ( cartouchePen );
|
|
|
|
_painters[PlaneId::Printer].drawLine ( titleRect.bottomLeft(), titleRect.bottomRight() );
|
|
|
|
_painters[PlaneId::Printer].setFont ( font );
|
|
|
|
_painters[PlaneId::Printer].drawText ( titleRect, Qt::AlignVCenter|Qt::AlignHCenter, title.c_str() );
|
|
|
|
|
|
|
|
QRect fieldRect = QRect ( cartoucheRect.x()
|
|
|
|
, cartoucheRect.y() + _titleHeight
|
|
|
|
, 100
|
|
|
|
, _cartoucheHeight - _titleHeight
|
|
|
|
);
|
|
|
|
font.setPointSize ( 11 );
|
|
|
|
_painters[PlaneId::Printer].setFont ( font );
|
|
|
|
_painters[PlaneId::Printer].drawLine ( fieldRect.topRight(), fieldRect.bottomRight() );
|
|
|
|
_painters[PlaneId::Printer].drawText ( fieldRect, Qt::AlignVCenter|Qt::AlignHCenter, user.c_str() );
|
|
|
|
|
|
|
|
fieldRect = QRect ( cartoucheRect.x() + 100
|
|
|
|
, cartoucheRect.y() + _titleHeight
|
|
|
|
, 120
|
|
|
|
, _cartoucheHeight - _titleHeight
|
|
|
|
);
|
|
|
|
font.setWeight ( QFont::Normal );
|
|
|
|
_painters[PlaneId::Printer].setFont ( font );
|
|
|
|
_painters[PlaneId::Printer].drawLine ( fieldRect.topRight(), fieldRect.bottomRight() );
|
|
|
|
_painters[PlaneId::Printer].drawText ( fieldRect, Qt::AlignVCenter|Qt::AlignHCenter, date.c_str() );
|
|
|
|
|
|
|
|
fieldRect = QRect ( cartoucheRect.x() + 220
|
|
|
|
, cartoucheRect.y() + _titleHeight
|
|
|
|
, 300
|
|
|
|
, _cartoucheHeight - _titleHeight
|
|
|
|
);
|
|
|
|
_painters[PlaneId::Printer].setFont ( font );
|
|
|
|
_painters[PlaneId::Printer].drawLine ( fieldRect.topRight(), fieldRect.bottomRight() );
|
|
|
|
_painters[PlaneId::Printer].drawText ( fieldRect, Qt::AlignVCenter|Qt::AlignHCenter, area.c_str() );
|
|
|
|
}
|
2008-12-25 04:27:58 -06:00
|
|
|
|
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
void CellWidget::DrawingPlanes::copyToPrinter ( int sx, int sy, int w, int h, QPrinter* printer, bool imageOnly )
|
|
|
|
{
|
|
|
|
if ( !printer ) return;
|
|
|
|
_printer = printer;
|
|
|
|
_printer->setPageMargins ( 0.0, 0.0, 0.0, 0.0, QPrinter::DevicePixel );
|
|
|
|
|
|
|
|
int paperWidth = _printer->width ();
|
|
|
|
int paperHeight = _printer->height ();
|
2009-06-04 13:28:46 -05:00
|
|
|
int frameMargin = 25;
|
2009-05-14 06:39:31 -05:00
|
|
|
int drawingWidth = paperWidth - (frameMargin<<1);
|
|
|
|
int drawingHeight = paperHeight - (frameMargin<<1);
|
|
|
|
int ximage = 0;
|
|
|
|
int yimage = 0;
|
|
|
|
|
|
|
|
// Substract the cartouche size only for A4 format.
|
|
|
|
if ( _printer->paperSize () == QPrinter::A4 ) {
|
|
|
|
if ( _printer->orientation() == QPrinter::Landscape ) {
|
|
|
|
drawingWidth -= _cartoucheHeight;
|
|
|
|
} else {
|
|
|
|
drawingHeight -= _cartoucheHeight;
|
|
|
|
}
|
|
|
|
}
|
2008-12-25 04:27:58 -06:00
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
if ( imageOnly ) {
|
|
|
|
_printer->setPaperSize ( QSizeF(w,h), QPrinter::DevicePixel );
|
|
|
|
} else {
|
|
|
|
ximage = frameMargin + ((drawingWidth > w) ? (drawingWidth -w)/2 : 0);
|
|
|
|
yimage = frameMargin + ((drawingHeight > h) ? (drawingHeight-h)/2 : 0);
|
2008-12-25 04:27:58 -06:00
|
|
|
}
|
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
begin ( PlaneId::Printer );
|
2008-12-25 04:27:58 -06:00
|
|
|
|
|
|
|
if ( _cellWidget->showSelection() )
|
|
|
|
_painters[PlaneId::Printer].drawPixmap
|
|
|
|
( ximage, yimage
|
|
|
|
, *_planes[PlaneId::Selection]
|
|
|
|
, _cellWidget->getOffsetVA().rx()+sx, _cellWidget->getOffsetVA().ry()+sy
|
|
|
|
, w, h
|
|
|
|
);
|
|
|
|
else
|
|
|
|
_painters[PlaneId::Printer].drawPixmap
|
|
|
|
( ximage, yimage
|
|
|
|
, *_planes[PlaneId::Normal]
|
|
|
|
, _cellWidget->getOffsetVA().rx()+sx, _cellWidget->getOffsetVA().ry()+sy
|
|
|
|
, w, h
|
|
|
|
);
|
|
|
|
|
|
|
|
if ( !imageOnly ) {
|
2009-05-14 06:39:31 -05:00
|
|
|
DbU::Unit x1 = _cellWidget->displayToDbuX ( sx );
|
|
|
|
DbU::Unit x2 = _cellWidget->displayToDbuX ( sx+w );
|
|
|
|
DbU::Unit y1 = _cellWidget->displayToDbuY ( sy );
|
|
|
|
DbU::Unit y2 = _cellWidget->displayToDbuY ( sy+h );
|
|
|
|
|
|
|
|
string title = getString(_cellWidget->getCell()->getName());
|
|
|
|
string area = "Area: [" + DbU::getValueString(x1)
|
|
|
|
+ " " + DbU::getValueString(y1)
|
|
|
|
+ "] [" + DbU::getValueString(x2)
|
|
|
|
+ " " + DbU::getValueString(y2)
|
|
|
|
+ "]";
|
|
|
|
|
|
|
|
QPen framePen = QPen ( QBrush(QColor("black")), 1.0 );
|
|
|
|
_painters[PlaneId::Printer].setPen ( framePen );
|
|
|
|
_painters[PlaneId::Printer].drawRect ( frameMargin
|
|
|
|
, frameMargin
|
|
|
|
, paperWidth - (frameMargin<<1)
|
|
|
|
, paperHeight - (frameMargin<<1)
|
|
|
|
);
|
|
|
|
|
|
|
|
if ( (_printer->paperSize () == QPrinter::A4)
|
|
|
|
&& (_printer->orientation() == QPrinter::Landscape) ) {
|
|
|
|
_painters[PlaneId::Printer].translate ( paperWidth - frameMargin, frameMargin );
|
|
|
|
_painters[PlaneId::Printer].rotate ( -90 );
|
|
|
|
} else
|
|
|
|
_painters[PlaneId::Printer].translate ( paperWidth - frameMargin, paperHeight - frameMargin );
|
|
|
|
|
|
|
|
drawCartouche ( 0, 0, title , area );
|
2008-12-25 04:27:58 -06:00
|
|
|
}
|
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
end ( PlaneId::Printer );
|
2008-12-25 04:27:58 -06:00
|
|
|
_printer = NULL;
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-07-24 05:32:14 -05:00
|
|
|
void CellWidget::DrawingPlanes::copyToImage ( int sx, int sy, int w, int h, QImage* image, bool noScale )
|
2009-02-23 07:43:36 -06:00
|
|
|
{
|
|
|
|
int ximage = 0;
|
|
|
|
int yimage = 0;
|
|
|
|
|
|
|
|
if ( !image ) return;
|
|
|
|
_image = image;
|
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
begin ( PlaneId::Image );
|
2009-02-23 07:43:36 -06:00
|
|
|
|
2009-03-03 16:27:03 -06:00
|
|
|
_painters[PlaneId::Image].setRenderHint ( QPainter::Antialiasing, false );
|
2009-07-24 05:32:14 -05:00
|
|
|
if ( _cellWidget->showSelection() ) {
|
|
|
|
_painters[PlaneId::Image].drawPixmap
|
|
|
|
( ximage, yimage
|
|
|
|
, *_planes[PlaneId::Selection]
|
|
|
|
, _cellWidget->getOffsetVA().rx()+sx, _cellWidget->getOffsetVA().ry()+sy
|
|
|
|
, w, h
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
_painters[PlaneId::Image].drawPixmap
|
|
|
|
( ximage, yimage
|
|
|
|
, *_planes[PlaneId::Normal]
|
|
|
|
, _cellWidget->getOffsetVA().rx()+sx, _cellWidget->getOffsetVA().ry()+sy
|
|
|
|
, w, h
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !noScale ) {
|
|
|
|
int xGradient = (w-510)/2;
|
|
|
|
_painters[PlaneId::Image].setPen(Qt::white);
|
|
|
|
_painters[PlaneId::Image].drawRect(xGradient-1, h+9, 512, 31);
|
|
|
|
_painters[PlaneId::Image].setPen(Qt::NoPen);
|
|
|
|
for ( unsigned i = 0 ; i < 256 ; i++ ) {
|
|
|
|
_painters[PlaneId::Image].setBrush(Graphics::getColorScale(ColorScale::Fire).getBrush(i,100) );
|
|
|
|
_painters[PlaneId::Image].drawRect(xGradient+(i*2), h+10, 2, 30);
|
|
|
|
if ( i==0 || i==51 || i==102 || i==153 || i==204 || i==255 ) {
|
|
|
|
QRect tArea (xGradient+(i*2)-15, h+44, 30, 12);
|
|
|
|
std::ostringstream oss;
|
|
|
|
oss << (float)(i)/255;
|
|
|
|
_painters[PlaneId::Image].setPen(Qt::white);
|
|
|
|
_painters[PlaneId::Image].drawLine(xGradient+(i*2), h+38, xGradient+(i*2), h+42);
|
|
|
|
_painters[PlaneId::Image].drawText(tArea, Qt::AlignCenter, oss.str().c_str());
|
|
|
|
_painters[PlaneId::Image].setPen(Qt::NoPen);
|
|
|
|
}
|
2009-02-23 10:18:21 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
end ( PlaneId::Image );
|
2009-02-23 07:43:36 -06:00
|
|
|
_image = NULL;
|
|
|
|
}
|
|
|
|
|
2009-05-14 06:39:31 -05:00
|
|
|
|
2008-08-27 09:06:06 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget::DrawingQuery".
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::DrawingQuery::DrawingQuery ( CellWidget* widget )
|
|
|
|
: Query()
|
2008-10-07 10:01:32 -05:00
|
|
|
, _cellWidget(widget)
|
|
|
|
, _drawExtensionGo(NULL)
|
2008-12-20 10:56:05 -06:00
|
|
|
, _goCount(0)
|
2009-01-09 09:18:26 -06:00
|
|
|
, _extensionGoCount(0)
|
2008-12-20 10:56:05 -06:00
|
|
|
, _instanceCount(0)
|
2008-08-27 09:06:06 -05:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
2008-10-07 10:01:32 -05:00
|
|
|
void CellWidget::DrawingQuery::setDrawExtensionGo ( const Name& name )
|
|
|
|
{
|
2008-10-21 08:49:48 -05:00
|
|
|
map<Name,pair<InitExtensionGo_t*,DrawExtensionGo_t*> >::iterator idraw
|
2008-10-07 10:01:32 -05:00
|
|
|
= _drawExtensionGos.find ( name );
|
|
|
|
|
|
|
|
if ( idraw != _drawExtensionGos.end() ) {
|
|
|
|
_drawExtensionGo = idraw->second.second;
|
|
|
|
if ( idraw->second.first )
|
|
|
|
idraw->second.first ( _cellWidget );
|
|
|
|
} else
|
|
|
|
_drawExtensionGo = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-08-27 09:06:06 -05:00
|
|
|
bool CellWidget::DrawingQuery::hasMasterCellCallback () const
|
2009-07-25 10:10:46 -05:00
|
|
|
{ return true; }
|
2008-08-27 09:06:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::masterCellCallback ()
|
|
|
|
{
|
2008-12-20 10:56:05 -06:00
|
|
|
_instanceCount++;
|
|
|
|
|
2009-07-24 05:32:14 -05:00
|
|
|
drawMasterCell ( getMasterCell(), getTransformation() );
|
|
|
|
}
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::drawMasterCell ( const Cell* cell
|
|
|
|
, const Transformation& transformation
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Box bbox = transformation.getBox(cell->getAbutmentBox());
|
2008-09-17 06:45:38 -05:00
|
|
|
_cellWidget->drawBox ( bbox );
|
2008-08-27 09:06:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::DrawingQuery::hasGoCallback () const
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::goCallback ( Go* go )
|
|
|
|
{
|
|
|
|
drawGo ( go, getBasicLayer(), getArea(), getTransformation() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::drawGo ( const Go* go
|
|
|
|
, const BasicLayer* basicLayer
|
|
|
|
, const Box& area
|
|
|
|
, const Transformation& transformation
|
|
|
|
)
|
|
|
|
{
|
2008-10-21 09:38:42 -05:00
|
|
|
//cerr << "DrawingQuery::drawGo() - " << go << endl;
|
2008-10-21 08:49:48 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
static QRect rectangle;
|
|
|
|
static unsigned int state;
|
2008-08-27 09:06:06 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
const Component* component = dynamic_cast<const Component*>(go);
|
2008-12-25 04:27:58 -06:00
|
|
|
if ( component ) {
|
|
|
|
_goCount++;
|
2010-01-22 10:38:21 -06:00
|
|
|
Box bb = transformation.getBox(component->getBoundingBox(basicLayer));
|
|
|
|
rectangle = _cellWidget->dbuToDisplayRect ( bb );
|
2008-12-25 04:27:58 -06:00
|
|
|
state = ( (rectangle.width() > 2) ? 1:0) | ( (rectangle.height() > 2) ? 2:0);
|
|
|
|
switch ( state ) {
|
|
|
|
case 0: break;
|
|
|
|
case 1: _cellWidget->drawScreenLine ( rectangle.bottomLeft(), rectangle.bottomRight() ); break;
|
|
|
|
case 2: _cellWidget->drawScreenLine ( rectangle.bottomLeft(), rectangle.topLeft () ); break;
|
|
|
|
case 3: _cellWidget->drawScreenRect ( rectangle ); break;
|
|
|
|
}
|
2010-01-22 10:38:21 -06:00
|
|
|
|
|
|
|
if ( _cellWidget->isDrawable("text.component")
|
|
|
|
and (getDepth() < 2)
|
|
|
|
and (rectangle.width () > 30)
|
|
|
|
and (rectangle.height() > 30) ) {
|
|
|
|
const Net* net = component->getNet();
|
|
|
|
if ( not net->isAutomatic() ) {
|
|
|
|
const char* netName = net->getName()._getSharedName()->_getSString().c_str();
|
|
|
|
_cellWidget->drawDisplayText ( rectangle, netName, BigFont|Bold|Center|Frame );
|
|
|
|
}
|
|
|
|
}
|
2008-11-16 16:11:40 -06:00
|
|
|
}
|
2008-08-27 09:06:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-10-07 10:01:32 -05:00
|
|
|
bool CellWidget::DrawingQuery::hasExtensionGoCallback () const
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::extensionGoCallback ( Go* go )
|
2008-12-25 04:27:58 -06:00
|
|
|
{
|
|
|
|
drawExtensionGo ( _cellWidget, go, getBasicLayer(), getArea(), getTransformation() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::drawExtensionGo ( CellWidget* widget
|
|
|
|
, const Go* go
|
|
|
|
, const BasicLayer* basicLayer
|
|
|
|
, const Box& area
|
|
|
|
, const Transformation& transformation
|
|
|
|
)
|
2008-10-07 10:01:32 -05:00
|
|
|
{
|
2009-01-08 08:09:46 -06:00
|
|
|
if ( _drawExtensionGo ) {
|
2009-01-09 09:18:26 -06:00
|
|
|
_extensionGoCount++;
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawExtensionGo ( widget, go, basicLayer, area, transformation );
|
2009-01-08 08:09:46 -06:00
|
|
|
}
|
2008-12-25 04:27:58 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-03 08:56:07 -05:00
|
|
|
bool CellWidget::DrawingQuery::hasMarkerCallback () const
|
|
|
|
{ return true; }
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::markerCallback ( Marker* marker )
|
|
|
|
{ drawMarker ( marker, getArea(), getTransformation() ); }
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::drawMarker ( const Marker* marker
|
|
|
|
, const Box& area
|
|
|
|
, const Transformation& transformation
|
|
|
|
)
|
2008-12-25 04:27:58 -06:00
|
|
|
{
|
2010-04-03 08:56:07 -05:00
|
|
|
static QRect rectangle;
|
|
|
|
|
|
|
|
const Reference* reference = dynamic_cast<const Reference*>(marker);
|
2010-04-17 05:13:17 -05:00
|
|
|
if ( reference and _cellWidget->isDrawable("text.reference") and (getDepth() < 2) ) {
|
2010-04-03 08:56:07 -05:00
|
|
|
_goCount++;
|
2010-04-17 05:13:17 -05:00
|
|
|
unsigned int flags = BigFont|Bold|Frame;
|
|
|
|
|
|
|
|
Box bb = transformation.getBox ( reference->getBoundingBox() );
|
2010-04-03 08:56:07 -05:00
|
|
|
rectangle = _cellWidget->dbuToDisplayRect ( bb );
|
2010-04-27 05:54:26 -05:00
|
|
|
//rectangle.adjust ( 10, 10, 10, 10 );
|
2010-04-17 05:13:17 -05:00
|
|
|
|
|
|
|
if ( reference->getType() == Reference::Position ) {
|
|
|
|
QPoint point = _cellWidget->dbuToDisplayPoint ( reference->getPoint() );
|
|
|
|
rectangle.translate ( point.x() - rectangle.x(), point.y() - rectangle.y() );
|
|
|
|
|
|
|
|
flags |= Left;
|
|
|
|
} else {
|
2010-04-27 05:54:26 -05:00
|
|
|
flags |= Center/*|Rounded*/;
|
2010-04-17 05:13:17 -05:00
|
|
|
}
|
2010-04-03 08:56:07 -05:00
|
|
|
|
2010-04-17 05:13:17 -05:00
|
|
|
const char* refName = reference->getName()._getSharedName()->_getSString().c_str();
|
|
|
|
_cellWidget->drawDisplayText ( rectangle, refName, flags );
|
|
|
|
|
|
|
|
if ( reference->getType() == Reference::Position ) {
|
|
|
|
QPoint losange [5] = { QPoint(rectangle.x() ,rectangle.y()-6)
|
|
|
|
, QPoint(rectangle.x()-6,rectangle.y() )
|
|
|
|
, QPoint(rectangle.x() ,rectangle.y()+6)
|
|
|
|
, QPoint(rectangle.x()+6,rectangle.y() )
|
|
|
|
, QPoint(rectangle.x() ,rectangle.y()-6)
|
|
|
|
};
|
|
|
|
_cellWidget->drawScreenPolyline ( losange, 5, 2 );
|
2010-04-03 08:56:07 -05:00
|
|
|
}
|
|
|
|
}
|
2008-12-25 04:27:58 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-03 08:56:07 -05:00
|
|
|
bool CellWidget::DrawingQuery::hasRubberCallback () const
|
|
|
|
{ return true; }
|
|
|
|
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
void CellWidget::DrawingQuery::rubberCallback ( Rubber* rubber )
|
2010-04-03 08:56:07 -05:00
|
|
|
{ drawRubber ( rubber, getArea(), getTransformation() ); }
|
2008-12-25 04:27:58 -06:00
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::DrawingQuery::drawRubber ( const Rubber* rubber
|
|
|
|
, const Box& area
|
|
|
|
, const Transformation& transformation
|
|
|
|
)
|
|
|
|
{
|
|
|
|
static QPoint center;
|
|
|
|
static QPoint extremity;
|
|
|
|
static QPoint steiner;
|
|
|
|
|
|
|
|
switch ( _cellWidget->getRubberShape() ) {
|
|
|
|
case CellWidget::Steiner:
|
|
|
|
center = _cellWidget->dbuToDisplayPoint(transformation.getPoint(rubber->getBarycenter()));
|
|
|
|
forEach ( Hook*, hook, rubber->getHooks() ) {
|
|
|
|
extremity = _cellWidget->dbuToDisplayPoint
|
|
|
|
( transformation.getPoint(hook->getComponent()->getCenter()) );
|
|
|
|
steiner = QPoint ( extremity.x(), center.y() );
|
|
|
|
_cellWidget->drawScreenLine ( center , steiner , PlaneId::Working, false );
|
|
|
|
_cellWidget->drawScreenLine ( steiner, extremity, PlaneId::Working, false );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case CellWidget::Barycentric:
|
|
|
|
center = _cellWidget->dbuToDisplayPoint(transformation.getPoint(rubber->getBarycenter()));
|
|
|
|
forEach ( Hook*, hook, rubber->getHooks() ) {
|
|
|
|
extremity = _cellWidget->dbuToDisplayPoint
|
|
|
|
( transformation.getPoint(hook->getComponent()->getCenter()) );
|
|
|
|
_cellWidget->drawScreenLine ( center, extremity, PlaneId::Working, false );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case CellWidget::Centric:
|
|
|
|
default:
|
|
|
|
center = _cellWidget->dbuToDisplayPoint(transformation.getPoint(rubber->getCenter()));
|
|
|
|
forEach ( Hook*, hook, rubber->getHooks() ) {
|
|
|
|
extremity = _cellWidget->dbuToDisplayPoint
|
|
|
|
( transformation.getPoint(hook->getComponent()->getCenter()) );
|
|
|
|
_cellWidget->drawScreenLine ( center, extremity, PlaneId::Working, false );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2008-10-07 10:01:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-17 06:45:38 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget::TextDrawingQuery".
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::TextDrawingQuery::TextDrawingQuery ( CellWidget* widget )
|
|
|
|
: Query()
|
|
|
|
,_cellWidget(widget)
|
|
|
|
{
|
|
|
|
setBasicLayer ( NULL );
|
|
|
|
setFilter ( Query::DoMasterCells|Query::DoTerminalCells );
|
|
|
|
setStartLevel ( 0 );
|
|
|
|
setStopLevel ( 1 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::TextDrawingQuery::hasMasterCellCallback () const
|
|
|
|
{ return true; }
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::TextDrawingQuery::masterCellCallback ()
|
|
|
|
{
|
|
|
|
Box bbox = getTransformation().getBox(getMasterCell()->getAbutmentBox());
|
|
|
|
if ( getDepth() == 2 )
|
|
|
|
_cellWidget->drawText ( Point(bbox.getXMin(),bbox.getYMin())
|
2009-04-15 11:09:18 -05:00
|
|
|
, getString(getInstance()->getName()).c_str()
|
2010-01-22 10:38:21 -06:00
|
|
|
, Reverse|Top
|
2008-09-17 06:45:38 -05:00
|
|
|
, -90
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::TextDrawingQuery::hasGoCallback () const
|
|
|
|
{ return false; }
|
|
|
|
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
void CellWidget::TextDrawingQuery::goCallback ( Go* )
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::TextDrawingQuery::hasRubberCallback () const
|
|
|
|
{ return false; }
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::TextDrawingQuery::rubberCallback ( Rubber* )
|
2008-09-17 06:45:38 -05:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
2008-10-07 10:01:32 -05:00
|
|
|
bool CellWidget::TextDrawingQuery::hasExtensionGoCallback () const
|
|
|
|
{ return false; }
|
|
|
|
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
void CellWidget::TextDrawingQuery::extensionGoCallback ( Go* )
|
2008-10-07 10:01:32 -05:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
2008-11-28 17:10:39 -06:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget::SelectorCriterions".
|
|
|
|
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
CellWidget::SelectorCriterions::SelectorCriterions ()
|
|
|
|
: _cellWidget(NULL)
|
2008-11-28 17:10:39 -06:00
|
|
|
, _criterions()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::SelectorCriterions::~SelectorCriterions ()
|
|
|
|
{
|
|
|
|
clear ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
bool CellWidget::SelectorCriterions::add ( const Net* net )
|
2008-11-28 17:10:39 -06:00
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( !_cellWidget ) return false;
|
2008-11-28 17:10:39 -06:00
|
|
|
if ( !_cellWidget->isSelected(Occurrence(net)) ) {
|
|
|
|
_criterions.push_back ( new NetSelectorCriterion(net) );
|
2009-02-02 08:45:48 -06:00
|
|
|
_criterions.back()->doSelection ( _cellWidget );
|
2008-11-28 17:10:39 -06:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::SelectorCriterions::add ( Box area )
|
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( !_cellWidget ) return false;
|
2008-11-28 17:10:39 -06:00
|
|
|
_criterions.push_back ( new AreaSelectorCriterion(area) );
|
2009-02-02 08:45:48 -06:00
|
|
|
_criterions.back()->doSelection ( _cellWidget );
|
2008-11-28 17:10:39 -06:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
bool CellWidget::SelectorCriterions::remove ( const Net* net )
|
2008-11-28 17:10:39 -06:00
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( !_cellWidget ) return false;
|
2008-11-28 17:10:39 -06:00
|
|
|
if ( !_cellWidget->isSelected(Occurrence(net)) ) return false;
|
|
|
|
|
|
|
|
size_t i=0;
|
|
|
|
for ( ; i<_criterions.size() ; i++ )
|
|
|
|
if ( _criterions[i]->getNet() == net ) break;
|
|
|
|
|
|
|
|
if ( i < _criterions.size() ) {
|
|
|
|
swap ( _criterions[i], *(_criterions.end()-1) );
|
2009-02-02 08:45:48 -06:00
|
|
|
_criterions.back()->undoSelection ( _cellWidget );
|
2008-11-28 17:10:39 -06:00
|
|
|
_criterions.pop_back ();
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::SelectorCriterions::clear ()
|
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
for ( size_t i=0 ; i<_criterions.size() ; i++ ) {
|
2008-11-28 17:10:39 -06:00
|
|
|
delete _criterions[i];
|
2009-01-27 04:14:46 -06:00
|
|
|
}
|
2008-11-28 17:10:39 -06:00
|
|
|
_criterions.clear ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::SelectorCriterions::revalidate ()
|
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( !_cellWidget ) return;
|
|
|
|
|
2008-11-28 17:10:39 -06:00
|
|
|
size_t i = 0;
|
|
|
|
size_t last = _criterions.size ();
|
|
|
|
while ( i < last ) {
|
|
|
|
if ( _criterions[i]->isValid(_cellWidget) ) {
|
2009-02-02 08:45:48 -06:00
|
|
|
_criterions[i]->doSelection ( _cellWidget );
|
2008-11-28 17:10:39 -06:00
|
|
|
++i;
|
|
|
|
} else
|
|
|
|
swap ( _criterions[i], _criterions[--last] );
|
|
|
|
}
|
|
|
|
_criterions.erase ( _criterions.begin()+last, _criterions.end() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget::State".
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::State::setScale ( float scale )
|
|
|
|
{
|
|
|
|
_scaleHistory.erase ( _scaleHistory.begin()+_ihistory+1,_scaleHistory.end() );
|
|
|
|
if ( _historyEnable ) {
|
|
|
|
_scaleHistory.push_back ( ScaleEntry(scale,Point(0,0)) );
|
|
|
|
_ihistory++;
|
|
|
|
} else {
|
|
|
|
_scaleHistory[_ihistory]._scale = scale;
|
|
|
|
_scaleHistory[_ihistory]._topLeft = Point(0,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::State::scaleHistoryUp ()
|
|
|
|
{
|
|
|
|
if ( _ihistory == 0 ) return false;
|
|
|
|
|
|
|
|
_ihistory--;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::State::scaleHistoryDown ()
|
|
|
|
{
|
|
|
|
if ( _ihistory+2 > _scaleHistory.size() ) return false;
|
|
|
|
|
|
|
|
_ihistory++;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const Name& CellWidget::State::getName () const
|
|
|
|
{
|
|
|
|
static const Name noCell = "None";
|
|
|
|
|
|
|
|
if ( !_cell ) return noCell;
|
|
|
|
return _cell->getName();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-03 09:31:20 -05:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Hurricane::CellWidget".
|
|
|
|
|
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
const int CellWidget::_stripWidth = 10;
|
|
|
|
const int CellWidget::_initialSide = (400/_stripWidth)*_stripWidth;
|
|
|
|
|
|
|
|
|
|
|
|
CellWidget::CellWidget ( QWidget* parent )
|
|
|
|
: QWidget (parent)
|
|
|
|
, _technology (NULL)
|
|
|
|
, _palette (NULL)
|
|
|
|
, _displayArea (0,0,_initialSide+2*_stripWidth,_initialSide+2*_stripWidth)
|
|
|
|
, _visibleArea (_stripWidth,_stripWidth,_initialSide,_initialSide)
|
|
|
|
, _offsetVA (_stripWidth,_stripWidth)
|
|
|
|
, _redrawManager (this)
|
|
|
|
, _drawingPlanes (QSize(_initialSide+2*_stripWidth,_initialSide+2*_stripWidth),this)
|
|
|
|
, _drawingQuery (this)
|
|
|
|
, _textDrawingQuery (this)
|
|
|
|
, _darkening (100)
|
|
|
|
, _mousePosition (0,0)
|
|
|
|
, _spot (this)
|
2009-01-27 04:14:46 -06:00
|
|
|
, _state (new State(NULL))
|
2009-01-24 05:14:38 -06:00
|
|
|
, _cellChanged (true)
|
|
|
|
, _selectionHasChanged (false)
|
|
|
|
, _delaySelectionChanged(0)
|
|
|
|
, _cellModificated (true)
|
2009-02-13 10:30:27 -06:00
|
|
|
, _enableRedrawInterrupt(false)
|
2009-01-24 05:14:38 -06:00
|
|
|
, _selectors ()
|
2009-10-19 12:17:21 -05:00
|
|
|
, _activeCommand (NULL)
|
2009-01-24 05:14:38 -06:00
|
|
|
, _commands ()
|
|
|
|
, _redrawRectCount (0)
|
|
|
|
, _textFontHeight (20)
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
|
|
|
//setBackgroundRole ( QPalette::Dark );
|
|
|
|
//setAutoFillBackground ( false );
|
|
|
|
setAttribute ( Qt::WA_OpaquePaintEvent );
|
2009-01-21 10:42:58 -06:00
|
|
|
setAttribute ( Qt::WA_NoSystemBackground );
|
|
|
|
setAttribute ( Qt::WA_PaintOnScreen );
|
|
|
|
setAttribute ( Qt::WA_StaticContents );
|
2008-07-02 10:13:40 -05:00
|
|
|
setSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
|
|
|
setFocusPolicy ( Qt::StrongFocus );
|
|
|
|
setMouseTracking ( true );
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
//_mapView = new MapView ( this );
|
2008-07-04 10:33:11 -05:00
|
|
|
DataBase* database = DataBase::getDB();
|
|
|
|
if ( database )
|
|
|
|
_technology = database->getTechnology ();
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-09-17 06:45:38 -05:00
|
|
|
QFont font = Graphics::getNormalFont();
|
|
|
|
_textFontHeight = QFontMetrics(font).ascent();
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
CellWidget::~CellWidget ()
|
|
|
|
{
|
2009-03-03 16:27:03 -06:00
|
|
|
unselectAll ();
|
|
|
|
|
2008-09-01 09:47:50 -05:00
|
|
|
for ( size_t i=0 ; i<_commands.size() ; i++ )
|
|
|
|
unbindCommand ( _commands[i] );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2009-02-03 09:05:05 -06:00
|
|
|
void CellWidget::setStyle ( int id )
|
2009-01-18 15:17:43 -06:00
|
|
|
{
|
2009-02-03 09:05:05 -06:00
|
|
|
Graphics::setStyle ( (size_t)id );
|
2009-01-18 15:17:43 -06:00
|
|
|
refresh ();
|
2009-02-03 09:05:05 -06:00
|
|
|
|
|
|
|
emit styleChanged ();
|
2009-01-18 15:17:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-10-21 08:49:48 -05:00
|
|
|
void CellWidget::updatePalette ()
|
|
|
|
{
|
|
|
|
emit updatePalette(getCell());
|
|
|
|
}
|
|
|
|
|
2008-07-04 10:33:11 -05:00
|
|
|
|
2008-11-26 03:35:07 -06:00
|
|
|
void CellWidget::bindToPalette ( PaletteWidget* palette )
|
2008-07-04 10:33:11 -05:00
|
|
|
{
|
|
|
|
detachFromPalette ();
|
|
|
|
_palette = palette;
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
connect ( _palette, SIGNAL(paletteChanged()) , this , SLOT(refresh()) );
|
2008-10-21 08:49:48 -05:00
|
|
|
connect ( this , SIGNAL(cellChanged(Cell*)) , _palette, SLOT(updateExtensions(Cell*)) );
|
|
|
|
connect ( this , SIGNAL(updatePalette(Cell*)), _palette, SLOT(updateExtensions(Cell*)) );
|
2009-02-03 09:05:05 -06:00
|
|
|
connect ( this , SIGNAL(styleChanged()) , _palette, SLOT(changeStyle()) );
|
2008-07-04 10:33:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::detachFromPalette ()
|
|
|
|
{
|
|
|
|
if ( _palette ) {
|
2009-04-12 16:05:51 -05:00
|
|
|
disconnect ( _palette, SIGNAL(paletteChanged()) , this , SLOT(refresh()) );
|
2008-11-26 03:35:07 -06:00
|
|
|
disconnect ( this , SIGNAL(cellChanged(Cell*)) , _palette, SLOT(updateExtensions(Cell*)) );
|
|
|
|
disconnect ( this , SIGNAL(updatePalette(Cell*)), _palette, SLOT(updateExtensions(Cell*)) );
|
2009-01-18 15:17:43 -06:00
|
|
|
disconnect ( this , SIGNAL(styleChanged(void*)) , _palette, SLOT(styleChange(void*)) );
|
2008-07-04 10:33:11 -05:00
|
|
|
_palette = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-01 09:47:50 -05:00
|
|
|
void CellWidget::bindCommand ( Command* command )
|
|
|
|
{
|
|
|
|
for ( size_t i=0 ; i<_commands.size() ; i++ )
|
|
|
|
if ( _commands[i] == command ) return;
|
|
|
|
|
2009-10-19 12:17:21 -05:00
|
|
|
command->setCellWidget ( this );
|
2008-09-01 09:47:50 -05:00
|
|
|
_commands.push_back ( command );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::unbindCommand ( Command* command )
|
|
|
|
{
|
|
|
|
size_t i = 0;
|
|
|
|
for ( ; i<_commands.size() ; i++ )
|
|
|
|
if ( _commands[i] == command ) break;
|
|
|
|
|
2009-10-19 12:17:21 -05:00
|
|
|
if ( i < _commands.size() ) _commands[i]->setCellWidget ( NULL );
|
|
|
|
|
2008-09-01 09:47:50 -05:00
|
|
|
for ( ; i+1<_commands.size() ; i++ )
|
|
|
|
_commands[i] = _commands[i+1];
|
|
|
|
|
|
|
|
_commands.pop_back ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::pushCursor ( Qt::CursorShape cursor )
|
|
|
|
{
|
|
|
|
setCursor ( cursor );
|
|
|
|
_cursors.push_back ( cursor );
|
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::popCursor ()
|
|
|
|
{
|
|
|
|
_cursors.pop_back ();
|
|
|
|
if ( !_cursors.empty() )
|
|
|
|
setCursor ( _cursors.back() );
|
|
|
|
else
|
|
|
|
unsetCursor ();
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
QSize CellWidget::minimumSizeHint () const
|
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
return QSize(_initialSide,_initialSide);
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
void CellWidget::rubberChange ()
|
|
|
|
{
|
|
|
|
switch ( getRubberShape() ) {
|
|
|
|
case Centric: setRubberShape(Barycentric); break;
|
|
|
|
case Barycentric: setRubberShape(Steiner ); break;
|
|
|
|
case Steiner: setRubberShape(Centric ); break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-17 09:40:36 -05:00
|
|
|
void CellWidget::changeDbuMode ( unsigned int mode, DbU::UnitPower p )
|
2009-04-12 16:05:51 -05: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
|
|
|
if ( (_state->getDbuMode() != mode) or (_state->getUnitPower() != p) ) {
|
|
|
|
_state->setDbuMode ( mode );
|
|
|
|
_state->setUnitPower ( p );
|
|
|
|
|
|
|
|
DbU::setStringMode ( mode, p );
|
2010-01-26 06:58:36 -06:00
|
|
|
|
|
|
|
updateMousePosition ();
|
|
|
|
refresh ();
|
|
|
|
|
* ./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
|
|
|
emit dbuModeChanged ( _state->getDbuMode(), _state->getUnitPower() );
|
2010-01-26 06:58:36 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-10 04:22:36 -05:00
|
|
|
void CellWidget::setShowSelection ( bool state )
|
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( state != _state->showSelection() ) {
|
|
|
|
_state->setShowSelection ( state );
|
2008-08-27 09:06:06 -05:00
|
|
|
_selectionHasChanged = false;
|
2008-12-20 10:56:05 -06:00
|
|
|
refresh ();
|
2008-11-26 03:35:07 -06:00
|
|
|
|
2009-02-03 09:05:05 -06:00
|
|
|
emit selectionModeChanged ();
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
void CellWidget::setCumulativeSelection ( bool state )
|
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( state != _state->cumulativeSelection() ) {
|
|
|
|
_state->setCumulativeSelection ( state );
|
2009-02-03 09:05:05 -06:00
|
|
|
emit selectionModeChanged ();
|
2009-01-27 04:14:46 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::setShowBoundaries ( bool state )
|
|
|
|
{
|
|
|
|
if ( _state->showBoundaries() != state ) {
|
|
|
|
_state->setShowBoundaries ( state );
|
2009-01-30 08:52:05 -06:00
|
|
|
_redrawManager.refresh ();
|
2009-01-27 04:14:46 -06:00
|
|
|
|
|
|
|
emit showBoundariesToggled ( state );
|
|
|
|
}
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::changeQueryFilter ()
|
|
|
|
{
|
|
|
|
_redrawManager.refresh ();
|
|
|
|
emit queryFilterChanged ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::_redraw ( QRect redrawArea )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2008-12-20 10:56:05 -06:00
|
|
|
// cerr << "CellWidget::redraw() - start "
|
|
|
|
// << _selectionHasChanged << " filter:"
|
2009-02-02 08:45:48 -06:00
|
|
|
// << _state->getQueryFilter() << endl;
|
2008-08-27 09:06:06 -05:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
// static bool timedout;
|
|
|
|
// static Timer timer;
|
2008-12-20 10:56:05 -06:00
|
|
|
|
|
|
|
if ( !isVisible() ) return;
|
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
// timer.start ();
|
|
|
|
// timedout = false;
|
2008-12-20 10:56:05 -06:00
|
|
|
_cellChanged = false;
|
2008-07-02 10:13:40 -05:00
|
|
|
_redrawRectCount = 0;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
pushCursor ( Qt::BusyCursor );
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( ! ( _selectionHasChanged && _state->showSelection() ) || _cellModificated ) {
|
2008-07-10 04:22:36 -05:00
|
|
|
_spot.setRestore ( false );
|
2009-01-24 05:14:38 -06:00
|
|
|
//_drawingPlanes.copyToSelect ( redrawArea );
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.select ( PlaneId::Normal );
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.begin ();
|
2008-07-10 04:22:36 -05:00
|
|
|
_drawingPlanes.painter().setPen ( Qt::NoPen );
|
|
|
|
_drawingPlanes.painter().setBackground ( Graphics::getBrush("background") );
|
|
|
|
_drawingPlanes.painter().setClipRect ( redrawArea );
|
|
|
|
_drawingPlanes.painter().eraseRect ( redrawArea );
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
setDarkening ( (_state->showSelection()) ? Graphics::getDarkening() : 100 );
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( getCell() ) {
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-08-27 09:06:06 -05:00
|
|
|
Box redrawBox = displayToDbuBox ( redrawArea );
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_drawingQuery.resetGoCount ();
|
2009-01-09 09:18:26 -06:00
|
|
|
_drawingQuery.resetExtensionGoCount();
|
2008-12-20 10:56:05 -06:00
|
|
|
_drawingQuery.resetInstanceCount();
|
2008-10-07 10:01:32 -05:00
|
|
|
_drawingQuery.setExtensionMask ( 0 );
|
2008-08-27 09:06:06 -05:00
|
|
|
_drawingQuery.setArea ( redrawBox );
|
|
|
|
_drawingQuery.setTransformation ( Transformation() );
|
2008-07-04 10:33:11 -05:00
|
|
|
|
2008-08-27 09:06:06 -05:00
|
|
|
forEach ( BasicLayer*, iLayer, _technology->getBasicLayers() ) {
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.setPen ( Graphics::getPen ((*iLayer)->getName(),getDarkening()) );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush((*iLayer)->getName(),getDarkening()) );
|
2008-08-27 09:06:06 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( isDrawable((*iLayer)->getName()) ) {
|
2008-08-27 09:06:06 -05:00
|
|
|
_drawingQuery.setBasicLayer ( *iLayer );
|
2010-04-03 08:56:07 -05:00
|
|
|
_drawingQuery.setFilter ( getQueryFilter().unset(Query::DoMasterCells|Query::DoRubbers|Query::DoMarkers) );
|
2008-09-17 06:45:38 -05:00
|
|
|
_drawingQuery.doQuery ();
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
2009-01-30 08:52:05 -06:00
|
|
|
if ( _enableRedrawInterrupt ) QApplication::processEvents();
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( _redrawManager.interrupted() ) {
|
|
|
|
//cerr << "CellWidget::redraw() - interrupt after " << (*iLayer)->getName() << endl;
|
|
|
|
break;
|
2008-08-27 09:06:06 -05:00
|
|
|
}
|
2008-12-20 10:56:05 -06:00
|
|
|
//if ( timeout("redraw [layer]",timer,10.0,timedout) ) break;
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
2008-11-17 17:06:30 -06:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( /*!timeout("redraw [boundaries]",timer,10.0,timedout) &&*/ (!_redrawManager.interrupted()) ) {
|
|
|
|
if ( isDrawable("boundaries") ) {
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.setPen ( Graphics::getPen ("boundaries",getDarkening()) );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush("boundaries",getDarkening()) );
|
|
|
|
|
|
|
|
_drawingQuery.setBasicLayer ( NULL );
|
2010-04-03 08:56:07 -05:00
|
|
|
_drawingQuery.setFilter ( getQueryFilter().unset(Query::DoComponents|Query::DoRubbers|Query::DoMarkers) );
|
|
|
|
_drawingQuery.doQuery ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( /*!timeout("redraw [markers]",timer,10.0,timedout) &&*/ (!_redrawManager.interrupted()) ) {
|
|
|
|
if ( isDrawable("text.reference") ) {
|
|
|
|
_drawingPlanes.setPen ( Graphics::getPen ("text.reference",getDarkening()) );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush("text.reference",getDarkening()) );
|
|
|
|
|
|
|
|
_drawingQuery.setBasicLayer ( NULL );
|
|
|
|
_drawingQuery.setFilter ( getQueryFilter().unset(Query::DoComponents|Query::DoMasterCells) );
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingQuery.doQuery ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( /*!timeout("redraw [rubbers]",timer,10.0,timedout) &&*/ (!_redrawManager.interrupted()) ) {
|
|
|
|
if ( isDrawable("rubber") ) {
|
|
|
|
_drawingPlanes.setPen ( Graphics::getPen ("rubber",getDarkening()) );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush("rubber",getDarkening()) );
|
2008-07-04 10:33:11 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_drawingQuery.setBasicLayer ( NULL );
|
2010-04-03 08:56:07 -05:00
|
|
|
_drawingQuery.setFilter ( getQueryFilter().unset(Query::DoComponents|Query::DoMasterCells|Query::DoMarkers) );
|
2008-12-20 10:56:05 -06:00
|
|
|
_drawingQuery.doQuery ();
|
|
|
|
}
|
2008-09-17 06:45:38 -05:00
|
|
|
}
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
if ( _enableRedrawInterrupt ) QApplication::processEvents();
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( /*!timeout("redraw [text.instances]",timer,10.0,timedout) &&*/ (!_redrawManager.interrupted()) ) {
|
|
|
|
if ( isDrawable("text.instance") ) {
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.setPen ( Graphics::getPen ("text.instance",getDarkening()) );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush("text.instance",getDarkening()) );
|
|
|
|
_drawingPlanes.setBackground ( Graphics::getBrush("boundaries" ,getDarkening()) );
|
2008-12-20 10:56:05 -06:00
|
|
|
_textDrawingQuery.setArea ( redrawBox );
|
|
|
|
_textDrawingQuery.setTransformation ( Transformation() );
|
|
|
|
_textDrawingQuery.doQuery ();
|
|
|
|
}
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
2008-10-07 10:01:32 -05:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
//_drawingQuery.setFilter ( getQueryFilter() & ~Query::DoMasterCells );
|
2009-01-27 04:14:46 -06:00
|
|
|
forEach ( ExtensionSlice*, islice, getCell()->getExtensionSlices() ) {
|
2009-01-30 08:52:05 -06:00
|
|
|
if ( _enableRedrawInterrupt ) QApplication::processEvents();
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( /*timeout("redraw [extension]",timer,10.0,timedout) ||*/ (_redrawManager.interrupted()) ) break;
|
|
|
|
|
2008-10-21 08:49:48 -05:00
|
|
|
if ( isDrawableExtension((*islice)->getName()) ) {
|
2008-10-07 10:01:32 -05:00
|
|
|
_drawingQuery.setExtensionMask ( (*islice)->getMask() );
|
|
|
|
_drawingQuery.setDrawExtensionGo ( (*islice)->getName() );
|
2008-10-21 08:49:48 -05:00
|
|
|
_drawingQuery.setFilter ( Query::DoExtensionGos );
|
2008-10-07 10:01:32 -05:00
|
|
|
_drawingQuery.doQuery ();
|
|
|
|
}
|
|
|
|
}
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
2008-07-04 10:33:11 -05:00
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.end ();
|
2008-11-26 03:35:07 -06:00
|
|
|
_cellModificated = false;
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
if ( isDrawable("grid") ) drawGrid ( redrawArea );
|
|
|
|
if ( isDrawable("text.ruler") ) drawRulers ( redrawArea );
|
2009-01-21 10:42:58 -06:00
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
setDarkening ( 100 );
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( _state->showSelection() )
|
2008-07-10 04:22:36 -05:00
|
|
|
redrawSelection ( redrawArea );
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
popCursor ();
|
2009-04-15 11:09:18 -05:00
|
|
|
repaint ();
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
// timer.stop ();
|
2009-01-21 10:42:58 -06:00
|
|
|
// cerr << "CellWidget::redraw() - " << _redrawRectCount
|
|
|
|
// << " in " << timer.getCombTime() << "s ("
|
|
|
|
// << setprecision(3) << (timer.getCombTime()/_redrawRectCount) << " s/r)";
|
|
|
|
// if ( _drawingQuery.getGoCount() )
|
|
|
|
// cerr << " " << _drawingQuery.getGoCount()
|
|
|
|
// << " (" << setprecision(3) << (timer.getCombTime()/_drawingQuery.getGoCount()) << " s/go)";
|
|
|
|
// else
|
|
|
|
// cerr << " 0 Gos";
|
|
|
|
// if ( _drawingQuery.getExtensionGoCount() )
|
|
|
|
// cerr << " " << _drawingQuery.getExtensionGoCount()
|
|
|
|
// << " (" << setprecision(3) << (timer.getCombTime()/_drawingQuery.getExtensionGoCount()) << " s/ego)";
|
|
|
|
// else
|
|
|
|
// cerr << " 0 eGos";
|
|
|
|
// if ( _drawingQuery.getInstanceCount() )
|
|
|
|
// cerr << " " << _drawingQuery.getInstanceCount()
|
|
|
|
// << " (" << setprecision(3) << (timer.getCombTime()/_drawingQuery.getInstanceCount()) << " s/inst)";
|
|
|
|
// else
|
|
|
|
// cerr << " 0 Instances";
|
|
|
|
// cerr << endl;
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-10 04:22:36 -05:00
|
|
|
void CellWidget::redrawSelection ( QRect redrawArea )
|
|
|
|
{
|
|
|
|
_drawingPlanes.copyToSelect ( redrawArea.x()
|
|
|
|
, redrawArea.y()
|
|
|
|
, redrawArea.width()
|
|
|
|
, redrawArea.height()
|
|
|
|
);
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.select ( PlaneId::Selection );
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.begin ();
|
2008-07-10 04:22:36 -05:00
|
|
|
_drawingPlanes.painter().setPen ( Qt::NoPen );
|
|
|
|
_drawingPlanes.painter().setBackground ( Graphics::getBrush("background") );
|
|
|
|
_drawingPlanes.painter().setClipRect ( redrawArea );
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( getCell() ) {
|
2008-12-25 04:27:58 -06:00
|
|
|
Box redrawBox = displayToDbuBox ( redrawArea );
|
|
|
|
SelectorSet::iterator iselector;
|
2008-07-10 04:22:36 -05:00
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
forEach ( BasicLayer*, basicLayer, _technology->getBasicLayers() ) {
|
2008-10-07 10:01:32 -05:00
|
|
|
//if ( !isDrawableLayer(basicLayer->getName()) ) continue;
|
2008-07-10 04:22:36 -05:00
|
|
|
|
2008-08-27 09:06:06 -05:00
|
|
|
_drawingPlanes.setPen ( Graphics::getPen (basicLayer->getName()) );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush(basicLayer->getName()) );
|
2008-07-10 04:22:36 -05:00
|
|
|
|
2009-07-25 10:10:46 -05:00
|
|
|
iselector = _selectors.begin();
|
2008-07-10 04:22:36 -05:00
|
|
|
for ( ; iselector != _selectors.end() ; iselector++ ) {
|
2009-07-25 10:10:46 -05:00
|
|
|
Occurrence occurrence = (*iselector)->getOccurrence();
|
|
|
|
Component* component = dynamic_cast<Component*>(occurrence.getEntity());
|
2008-07-10 04:22:36 -05:00
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
if ( !component ) break;
|
2008-08-27 09:06:06 -05:00
|
|
|
if ( !component->getLayer() ) continue;
|
2008-12-25 04:27:58 -06:00
|
|
|
if ( !component->getLayer()->contains(*basicLayer) ) continue;
|
2008-08-27 09:06:06 -05:00
|
|
|
|
2009-07-25 10:10:46 -05:00
|
|
|
Transformation transformation = occurrence.getPath().getTransformation();
|
2008-08-27 09:06:06 -05:00
|
|
|
_drawingQuery.drawGo ( dynamic_cast<Go*>(occurrence.getEntity())
|
2008-12-25 04:27:58 -06:00
|
|
|
, *basicLayer
|
2008-08-27 09:06:06 -05:00
|
|
|
, redrawBox
|
|
|
|
, transformation
|
|
|
|
);
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
}
|
2008-12-25 04:27:58 -06:00
|
|
|
|
2009-07-25 10:10:46 -05:00
|
|
|
_drawingPlanes.setPen ( Graphics::getPen ("boundaries") );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush("boundaries") );
|
|
|
|
|
|
|
|
for ( ; iselector != _selectors.end() ; iselector++ ) {
|
|
|
|
Occurrence occurrence = (*iselector)->getOccurrence();
|
|
|
|
Instance* instance = dynamic_cast<Instance*>(occurrence.getEntity());
|
|
|
|
if ( instance ) {
|
|
|
|
Transformation transformation
|
|
|
|
= occurrence.getPath().getTransformation().getTransformation(instance->getTransformation());
|
|
|
|
_drawingQuery.drawMasterCell ( instance->getMasterCell(), transformation );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.setPen ( Graphics::getPen ("rubber") );
|
|
|
|
_drawingPlanes.setBrush ( Graphics::getBrush("rubber") );
|
|
|
|
|
|
|
|
for ( ; iselector != _selectors.end() ; iselector++ ) {
|
2009-07-25 10:10:46 -05:00
|
|
|
Occurrence occurrence = (*iselector)->getOccurrence();
|
|
|
|
Rubber* rubber = dynamic_cast<Rubber*>(occurrence.getEntity());
|
2008-12-25 04:27:58 -06:00
|
|
|
|
|
|
|
if ( !rubber ) break;
|
|
|
|
|
2009-07-25 10:10:46 -05:00
|
|
|
Transformation transformation = occurrence.getPath().getTransformation();
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingQuery.drawRubber ( rubber, redrawBox, transformation );
|
|
|
|
}
|
|
|
|
|
|
|
|
Name extensionName = "";
|
|
|
|
for ( ; iselector != _selectors.end() ; iselector++ ) {
|
2009-07-25 10:10:46 -05:00
|
|
|
Occurrence occurrence = (*iselector)->getOccurrence();
|
|
|
|
ExtensionGo* eGo = dynamic_cast<ExtensionGo*>(occurrence.getEntity());
|
2008-12-25 04:27:58 -06:00
|
|
|
|
|
|
|
if ( !eGo ) break;
|
|
|
|
|
2009-07-25 10:10:46 -05:00
|
|
|
Transformation transformation = occurrence.getPath().getTransformation();
|
2008-12-25 04:27:58 -06:00
|
|
|
if ( eGo->getName() != extensionName ) {
|
|
|
|
extensionName = eGo->getName();
|
|
|
|
_drawingQuery.setDrawExtensionGo ( extensionName );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( isDrawable(extensionName) )
|
|
|
|
_drawingQuery.drawExtensionGo ( this, eGo, NULL, redrawBox, transformation );
|
|
|
|
}
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.end ();
|
2008-07-10 04:22:36 -05:00
|
|
|
_selectionHasChanged = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-04 07:30:39 -06:00
|
|
|
void CellWidget::setLayerVisible ( const Name& layer, bool visible )
|
|
|
|
{
|
|
|
|
if ( !_palette ) return;
|
|
|
|
_palette->setItemVisible ( layer, visible );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
bool CellWidget::isDrawable ( const Name& name )
|
|
|
|
{
|
2009-04-12 16:05:51 -05:00
|
|
|
PaletteItem* item = (_palette) ? _palette->find(name) : NULL;
|
|
|
|
//DbU::Unit unity = symbolicMode() ? DbU::lambda(1.0) : DbU::grid(10.0);
|
|
|
|
DbU::Unit unity = DbU::lambda(1.0);
|
2008-12-20 10:56:05 -06:00
|
|
|
|
|
|
|
return (!item || item->isItemVisible())
|
2009-04-12 16:05:51 -05:00
|
|
|
&& ( Graphics::getThreshold(name) < getScale()*unity );
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-11-26 03:35:07 -06:00
|
|
|
bool CellWidget::isDrawableLayer ( const Name& layerName )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2008-11-26 03:35:07 -06:00
|
|
|
PaletteItem* item = (_palette) ? _palette->find(layerName) : NULL;
|
2008-07-04 10:33:11 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
return !item || item->isItemVisible();
|
2008-06-15 12:04:50 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-11-26 03:35:07 -06:00
|
|
|
bool CellWidget::isDrawableExtension ( const Name& extensionName )
|
2008-10-07 10:01:32 -05:00
|
|
|
{
|
2008-11-26 03:35:07 -06:00
|
|
|
PaletteItem* item = (_palette) ? _palette->find(extensionName) : NULL;
|
2008-10-07 10:01:32 -05:00
|
|
|
|
2008-12-12 07:28:19 -06:00
|
|
|
return (!item || item->isItemVisible());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::isSelectable ( const Name& name ) const
|
|
|
|
{
|
|
|
|
PaletteItem* item = (_palette) ? _palette->find(name) : NULL;
|
|
|
|
|
|
|
|
return (!item || item->isItemSelectable());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::isSelectable ( const Layer* layer ) const
|
|
|
|
{
|
|
|
|
PaletteItem* item = NULL;
|
|
|
|
forEach ( BasicLayer*, ilayer, layer->getBasicLayers() ) {
|
|
|
|
item = (_palette) ? _palette->find(ilayer->getName()) : NULL;
|
|
|
|
if ( item && item->isItemSelectable() )
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2008-10-07 10:01:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-10-21 08:49:48 -05:00
|
|
|
void CellWidget::drawBox ( DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2 )
|
|
|
|
{
|
|
|
|
_redrawRectCount++;
|
|
|
|
_drawingPlanes.setLineMode ( false );
|
|
|
|
_drawingPlanes.painter().drawRect ( dbuToDisplayRect(x1,y1,x2,y2) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::drawBox ( const Box& box )
|
|
|
|
{
|
|
|
|
_redrawRectCount++;
|
2008-08-27 09:06:06 -05:00
|
|
|
_drawingPlanes.setLineMode ( false );
|
2008-07-10 04:22:36 -05:00
|
|
|
_drawingPlanes.painter().drawRect ( dbuToDisplayRect(box) );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
|
|
|
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
void CellWidget::drawText ( const Point& point, const char* text, unsigned int flags, int angle )
|
2009-04-15 11:09:18 -05:00
|
|
|
{
|
2010-01-22 10:38:21 -06:00
|
|
|
drawDisplayText ( dbuToDisplayPoint(point), text, flags, angle );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::drawDisplayText ( const QRect& box, const char* text, unsigned int flags )
|
|
|
|
{
|
|
|
|
QFont font = Graphics::getNormalFont(flags&Bold);
|
|
|
|
|
|
|
|
if ( flags & BigFont ) font.setPointSize ( 18 );
|
|
|
|
|
|
|
|
QFontMetrics metrics = QFontMetrics(font);
|
|
|
|
int width = metrics.width ( text );
|
2010-05-17 09:40:36 -05:00
|
|
|
//int height = metrics.height ();
|
2010-01-22 10:38:21 -06:00
|
|
|
int angle = 0;
|
|
|
|
|
|
|
|
if ( (width > box.width()) and (box.height() > 2*box.width()) )
|
|
|
|
angle = -90;
|
|
|
|
|
|
|
|
drawDisplayText ( box.center(), text, flags, angle );
|
2009-04-15 11:09:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
void CellWidget::drawDisplayText ( const QPoint& point, const char* text, unsigned int flags, int angle )
|
2008-09-17 06:45:38 -05:00
|
|
|
{
|
2010-01-22 10:38:21 -06:00
|
|
|
QPainter& painter = _drawingPlanes.painter();
|
|
|
|
QPen pen = painter.pen ();
|
|
|
|
QBrush brush = painter.brush ();
|
|
|
|
QFont font = Graphics::getNormalFont(flags&Bold);
|
|
|
|
|
|
|
|
painter.save();
|
|
|
|
if ( flags & Reverse ) painter.setPen ( Graphics::getPen("background") );
|
|
|
|
if ( flags & Reverse ) painter.setBackgroundMode ( Qt::OpaqueMode );
|
|
|
|
if ( flags & BigFont ) font.setPointSize ( 18 );
|
|
|
|
|
|
|
|
QFontMetrics metrics = QFontMetrics(font);
|
|
|
|
int width = metrics.width ( text );
|
|
|
|
int height = metrics.height ();
|
|
|
|
|
|
|
|
pen.setStyle ( Qt::SolidLine );
|
|
|
|
pen.setColor ( painter.brush().color() );
|
|
|
|
|
|
|
|
brush.setStyle ( Qt::NoBrush );
|
|
|
|
|
|
|
|
painter.setPen ( pen );
|
|
|
|
painter.setBrush ( brush );
|
|
|
|
painter.setFont ( font );
|
|
|
|
painter.translate ( point );
|
|
|
|
painter.rotate ( angle );
|
|
|
|
|
|
|
|
QPoint bottomLeft ( 0, 0);
|
|
|
|
if ( flags & Center ) {
|
|
|
|
bottomLeft.rx() -= width /2;
|
|
|
|
bottomLeft.ry() += height/2;
|
|
|
|
} else if ( flags & Top ) {
|
|
|
|
bottomLeft.ry() += height;
|
2010-04-17 05:13:17 -05:00
|
|
|
} else if ( flags & Left ) {
|
2008-09-17 06:45:38 -05:00
|
|
|
}
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-04-27 05:54:26 -05:00
|
|
|
if ( flags & Frame ) {
|
|
|
|
if ( flags & Rounded )
|
|
|
|
painter.drawRoundedRect ( bottomLeft.x()-1, bottomLeft.y()-height, width+2, height, 8, 8 );
|
|
|
|
else
|
|
|
|
painter.drawRect ( bottomLeft.x()-1, bottomLeft.y()-height, width+2, height );
|
|
|
|
}
|
2010-01-22 10:38:21 -06:00
|
|
|
|
|
|
|
painter.drawText ( bottomLeft.x(), bottomLeft.y()-metrics.descent(), text );
|
|
|
|
painter.restore ();
|
2008-09-17 06:45:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
void CellWidget::drawLine ( DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2, bool mode )
|
2008-10-21 08:49:48 -05:00
|
|
|
{
|
2008-10-21 09:38:42 -05:00
|
|
|
_redrawRectCount++;
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.setLineMode ( mode );
|
2008-10-21 08:49:48 -05:00
|
|
|
_drawingPlanes.painter().drawLine ( dbuToDisplayPoint(x1,y1), dbuToDisplayPoint(x2,y2) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
void CellWidget::drawLine ( const Point& p1, const Point& p2, bool mode )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2008-10-21 09:38:42 -05:00
|
|
|
_redrawRectCount++;
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.setLineMode ( mode );
|
2008-07-10 04:22:36 -05:00
|
|
|
_drawingPlanes.painter().drawLine ( dbuToDisplayPoint(p1), dbuToDisplayPoint(p2) );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-12-25 04:27:58 -06:00
|
|
|
void CellWidget::drawScreenLine ( const QPoint& p1, const QPoint& p2, size_t plane, bool mode )
|
2008-09-01 09:47:50 -05:00
|
|
|
{
|
2008-12-20 10:56:05 -06:00
|
|
|
_redrawRectCount++;
|
2008-12-25 04:27:58 -06:00
|
|
|
_drawingPlanes.setLineMode ( mode );
|
2008-12-20 10:56:05 -06:00
|
|
|
_drawingPlanes.painter(plane).drawLine ( p1, p2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-17 05:13:17 -05:00
|
|
|
void CellWidget::drawScreenPolygon ( const QPoint* points, int count, size_t plane )
|
|
|
|
{
|
|
|
|
_drawingPlanes.painter(plane).drawPolygon ( points, count );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::drawScreenPolyline ( const QPoint* points, int count, int width, size_t plane )
|
|
|
|
{
|
2010-04-17 05:13:17 -05:00
|
|
|
_drawingPlanes.painter(plane).save ();
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
QPen pen = _drawingPlanes.painter(plane).pen ();
|
2008-09-01 09:47:50 -05:00
|
|
|
pen.setWidth ( width );
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_drawingPlanes.painter(plane).setPen ( pen );
|
|
|
|
_drawingPlanes.painter(plane).drawPolyline ( points, count );
|
2010-04-17 05:13:17 -05:00
|
|
|
|
|
|
|
_drawingPlanes.painter(plane).restore ();
|
2008-09-01 09:47:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::drawScreenRect ( const QPoint& p1, const QPoint& p2, size_t plane )
|
2008-09-01 09:47:50 -05:00
|
|
|
{
|
2008-12-20 10:56:05 -06:00
|
|
|
_drawingPlanes.setLineMode ( false );
|
|
|
|
_drawingPlanes.painter(plane).drawRect ( QRect(p1,p2) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::drawScreenRect ( const QRect& r, size_t plane )
|
|
|
|
{
|
|
|
|
_redrawRectCount++;
|
|
|
|
_drawingPlanes.setLineMode ( false );
|
|
|
|
_drawingPlanes.painter(plane).drawRect ( r );
|
2008-09-01 09:47:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-12 16:05:51 -05:00
|
|
|
bool CellWidget::_underDetailedGridThreshold () const
|
|
|
|
{
|
|
|
|
if ( symbolicMode() )
|
|
|
|
return Graphics::getThreshold("grid")/DbU::lambda(1.0) < getScale()/5;
|
|
|
|
return Graphics::getThreshold("grid")/DbU::grid(10.0) < getScale()/5;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-21 10:42:58 -06:00
|
|
|
void CellWidget::drawGrid ( QRect redrawArea )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.select ( PlaneId::Normal );
|
|
|
|
_drawingPlanes.begin ();
|
|
|
|
_drawingPlanes.painter ().setClipRect ( redrawArea );
|
|
|
|
_drawingPlanes.painter ().setPen ( Graphics::getPen("grid") );
|
2009-01-21 10:42:58 -06:00
|
|
|
|
|
|
|
Box redrawBox = displayToDbuBox ( redrawArea ).inflate ( DbU::lambda(1.0) );
|
2008-07-03 09:31:20 -05:00
|
|
|
|
2009-04-12 16:05:51 -05:00
|
|
|
bool detailedGrid = _underDetailedGridThreshold();
|
2008-09-01 09:47:50 -05:00
|
|
|
|
2009-04-12 16:05:51 -05:00
|
|
|
DbU::Unit gridStep = _snapGridStep();
|
2008-07-03 09:31:20 -05:00
|
|
|
DbU::Unit superGridStep = gridStep*5;
|
|
|
|
DbU::Unit xGrid;
|
|
|
|
DbU::Unit yGrid;
|
|
|
|
QPoint center;
|
|
|
|
|
2009-04-12 16:05:51 -05:00
|
|
|
for ( yGrid = _onSnapGrid(redrawBox.getYMin())
|
2009-01-21 10:42:58 -06:00
|
|
|
; yGrid < redrawBox.getYMax()
|
2008-07-03 09:31:20 -05:00
|
|
|
; yGrid += gridStep
|
|
|
|
) {
|
2009-04-12 16:05:51 -05:00
|
|
|
for ( xGrid = _onSnapGrid(redrawBox.getXMin())
|
2009-01-21 10:42:58 -06:00
|
|
|
; xGrid < redrawBox.getXMax()
|
2008-07-03 09:31:20 -05:00
|
|
|
; xGrid += gridStep
|
|
|
|
) {
|
2009-01-21 10:42:58 -06:00
|
|
|
center = dbuToDisplayPoint(xGrid,yGrid);
|
2008-09-01 09:47:50 -05:00
|
|
|
if ( (xGrid % superGridStep) || (yGrid % superGridStep) ) {
|
2009-04-12 16:05:51 -05:00
|
|
|
if ( detailedGrid ) {
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.painter().drawPoint ( center );
|
2009-01-21 10:42:58 -06:00
|
|
|
}
|
2008-09-01 09:47:50 -05:00
|
|
|
} else {
|
2009-04-12 16:05:51 -05:00
|
|
|
if ( detailedGrid ) {
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.painter().drawLine ( center.x()-3, center.y() , center.x()+3, center.y() );
|
|
|
|
_drawingPlanes.painter().drawLine ( center.x() , center.y()-3, center.x() , center.y()+3 );
|
2008-09-01 09:47:50 -05:00
|
|
|
} else {
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.painter().drawPoint ( center );
|
2008-09-01 09:47:50 -05:00
|
|
|
}
|
2008-07-03 09:31:20 -05:00
|
|
|
}
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
|
|
|
}
|
2009-01-21 10:42:58 -06:00
|
|
|
|
|
|
|
_drawingPlanes.copyToSelect ( redrawArea );
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.end ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::drawRulers ( QRect redrawArea )
|
|
|
|
{
|
|
|
|
_drawingPlanes.select ( PlaneId::Normal );
|
|
|
|
_drawingPlanes.begin ();
|
|
|
|
_drawingPlanes.painter ().setClipRect ( redrawArea );
|
|
|
|
|
|
|
|
redrawArea.adjust ( -50, -50, 50, 50 );
|
|
|
|
Box redrawBox = displayToDbuBox ( redrawArea );
|
2009-05-06 08:11:03 -05:00
|
|
|
redrawArea.adjust ( 50, 50, -50, -50 );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
|
|
|
RulerSet::iterator iruler = _state->getRulers().begin();
|
|
|
|
RulerSet::iterator end = _state->getRulers().end();
|
|
|
|
for ( ; iruler != end ; iruler++ ) {
|
|
|
|
if ( !(*iruler)->intersect(redrawBox) ) continue;
|
|
|
|
drawRuler ( *iruler );
|
|
|
|
}
|
|
|
|
|
|
|
|
_drawingPlanes.copyToSelect ( redrawArea );
|
|
|
|
_drawingPlanes.end ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::drawRuler ( shared_ptr<Ruler> ruler )
|
|
|
|
{
|
|
|
|
QFont font = Graphics::getNormalFont();
|
|
|
|
QFontMetrics metrics = QFontMetrics(font);
|
2010-01-26 06:58:36 -06:00
|
|
|
int tickLength = metrics.width ( "+00000u" );
|
2009-04-15 11:09:18 -05:00
|
|
|
Point origin = ruler->getOrigin ();
|
|
|
|
Point extremity = ruler->getExtremity ();
|
|
|
|
Point angle = ruler->getAngle ();
|
|
|
|
DbU::Unit graduation;
|
|
|
|
DbU::Unit gradStep;
|
|
|
|
QPoint pxOrigin;
|
|
|
|
QPoint pxExtremity;
|
|
|
|
QPoint pxAngle;
|
|
|
|
bool onScreen = ( _drawingPlanes.getWorkingPlane() > PlaneId::Selection );
|
|
|
|
|
|
|
|
// Never less than 5 pixels between two graduations ticks.
|
|
|
|
if ( symbolicMode() )
|
|
|
|
gradStep = DbU::lambda(pow(10.0,ceil(log10(DbU::getLambda(displayToDbuLength(50))))))/10;
|
|
|
|
else
|
|
|
|
gradStep = DbU::grid(pow(10.0,ceil(log10(DbU::getGrid(displayToDbuLength(50))))))/10;
|
|
|
|
|
|
|
|
if ( onScreen ) {
|
|
|
|
pxOrigin = dbuToScreenPoint ( origin );
|
|
|
|
pxExtremity = dbuToScreenPoint ( extremity );
|
|
|
|
pxAngle = dbuToScreenPoint ( angle );
|
|
|
|
} else {
|
|
|
|
pxOrigin = dbuToDisplayPoint ( origin );
|
|
|
|
pxExtremity = dbuToDisplayPoint ( extremity );
|
|
|
|
pxAngle = dbuToDisplayPoint ( angle );
|
|
|
|
}
|
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
bool hRuler = ( abs(pxAngle.x() - pxOrigin.x()) >= abs(pxAngle.y() - pxOrigin.y()) );
|
2009-04-15 11:09:18 -05:00
|
|
|
int pxGrad;
|
|
|
|
int pyGrad;
|
|
|
|
string textGrad;
|
|
|
|
int tick;
|
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
_drawingPlanes.painter().setPen ( Graphics::getPen ("text.ruler") );
|
|
|
|
_drawingPlanes.painter().setBrush ( Graphics::getBrush("text.ruler") );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
|
|
|
// The horizontal ruler.
|
|
|
|
bool increase = ( origin.getX() < extremity.getX() );
|
|
|
|
if ( !increase )
|
|
|
|
gradStep = -gradStep;
|
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
if ( hRuler and (abs(pxAngle.x() - pxOrigin.x()) > 20) ) {
|
2009-04-15 11:09:18 -05:00
|
|
|
// The horizontal ruler axis.
|
|
|
|
_drawingPlanes.painter().drawLine ( pxOrigin, pxAngle );
|
|
|
|
|
|
|
|
// The horizontal ruler ticks.
|
|
|
|
for ( graduation=origin.getX(), tick=0 ; true ; graduation+=gradStep, tick++ ) {
|
|
|
|
if ( increase ) {
|
|
|
|
if ( graduation >= angle.getX() ) break;
|
|
|
|
} else
|
|
|
|
if ( graduation <= angle.getX() ) break;
|
|
|
|
|
|
|
|
if ( onScreen ) pxGrad = dbuToScreenX ( graduation );
|
|
|
|
else pxGrad = dbuToDisplayX ( graduation );
|
|
|
|
|
2009-10-19 12:17:21 -05:00
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
if ( tick % 10 ) {
|
|
|
|
_drawingPlanes.painter().drawLine ( pxGrad, pxOrigin.y()
|
|
|
|
, pxGrad, pxOrigin.y()+((tick%2)?5:10) );
|
|
|
|
} else {
|
2010-01-22 10:38:21 -06:00
|
|
|
// if ( tick == 0 ) {
|
|
|
|
// int delta = (increase) ? 2 : -2;
|
|
|
|
// _drawingPlanes.painter().drawLine ( pxGrad-delta, pxOrigin.y()
|
|
|
|
// , pxGrad-delta, pxOrigin.y()+tickLength );
|
|
|
|
// }
|
2009-10-19 12:17:21 -05:00
|
|
|
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.painter().drawLine ( pxGrad, pxOrigin.y()
|
|
|
|
, pxGrad, pxOrigin.y()+tickLength );
|
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
// if ( !tick ) continue;
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-27 06:07:51 -06:00
|
|
|
textGrad = DbU::getValueString( abs(gradStep*tick)
|
2010-01-26 10:24:20 -06:00
|
|
|
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
|
2010-01-27 04:52:34 -06:00
|
|
|
textGrad.resize ( textGrad.size()-((*textGrad.rbegin()=='m')?2:1) );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
drawDisplayText ( QPoint ( pxGrad - 1, pxOrigin.y() + tickLength )
|
2009-04-15 11:09:18 -05:00
|
|
|
, textGrad.c_str()
|
2010-01-22 10:38:21 -06:00
|
|
|
, Bold
|
2009-04-15 11:09:18 -05:00
|
|
|
, -90
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// The last horizontal tick.
|
|
|
|
_drawingPlanes.painter().drawLine ( pxAngle.x(), pxAngle.y()
|
|
|
|
, pxAngle.x(), pxAngle.y()+tickLength );
|
|
|
|
|
2010-01-27 04:52:34 -06:00
|
|
|
textGrad = DbU::getValueString ( abs(angle.getX() - origin.getX())
|
2010-01-26 10:24:20 -06:00
|
|
|
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
|
2010-01-27 03:43:07 -06:00
|
|
|
//textGrad.resize ( textGrad.size()-1 );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
drawDisplayText ( QPoint ( pxAngle.x() - 1,pxAngle.y() + tickLength )
|
2009-04-15 11:09:18 -05:00
|
|
|
, textGrad.c_str()
|
2010-01-22 10:38:21 -06:00
|
|
|
, Bold
|
2009-04-15 11:09:18 -05:00
|
|
|
, -90
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
if ( not hRuler and (abs(pxAngle.y() - pxOrigin.y()) > 20) ) {
|
2009-04-15 11:09:18 -05:00
|
|
|
// The vertical ruler.
|
2010-01-22 10:38:21 -06:00
|
|
|
increase = ( origin.getY() < angle.getY() );
|
2009-04-15 11:09:18 -05:00
|
|
|
if ( increase xor ( gradStep > 0 ) )
|
|
|
|
gradStep = -gradStep;
|
|
|
|
|
|
|
|
// The vertical ruler axis.
|
2010-01-22 10:38:21 -06:00
|
|
|
_drawingPlanes.painter().drawLine ( pxOrigin, pxAngle );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
|
|
|
// The vertical ruler ticks.
|
2010-01-22 10:38:21 -06:00
|
|
|
for ( graduation=origin.getY(), tick=0 ; true ; graduation+=gradStep, tick++ ) {
|
2009-04-15 11:09:18 -05:00
|
|
|
if ( increase ) {
|
2010-01-22 10:38:21 -06:00
|
|
|
if ( graduation >= angle.getY() ) break;
|
2009-04-15 11:09:18 -05:00
|
|
|
} else
|
2010-01-22 10:38:21 -06:00
|
|
|
if ( graduation <= angle.getY() ) break;
|
2009-04-15 11:09:18 -05:00
|
|
|
|
|
|
|
if ( onScreen ) pyGrad = dbuToScreenY ( graduation );
|
|
|
|
else pyGrad = dbuToDisplayY ( graduation );
|
|
|
|
|
|
|
|
if ( tick % 10 ) {
|
2010-01-22 10:38:21 -06:00
|
|
|
_drawingPlanes.painter().drawLine ( pxOrigin.x() , pyGrad
|
|
|
|
, pxOrigin.x()-((tick%2)?5:10), pyGrad );
|
2009-04-15 11:09:18 -05:00
|
|
|
} else {
|
2010-01-22 10:38:21 -06:00
|
|
|
// if ( tick == 0 ) {
|
|
|
|
// _drawingPlanes.painter().drawLine ( pxOrigin.x() , pyGrad-2
|
|
|
|
// , pxOrigin.x()-tickLength, pyGrad-2);
|
|
|
|
// }
|
2009-10-19 12:17:21 -05:00
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
_drawingPlanes.painter().drawLine ( pxOrigin.x() , pyGrad
|
|
|
|
, pxOrigin.x()-tickLength, pyGrad );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
// if ( !tick ) continue;
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-27 06:07:51 -06:00
|
|
|
textGrad = DbU::getValueString( abs(gradStep*tick)
|
2010-01-26 10:24:20 -06:00
|
|
|
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
|
2010-01-27 04:52:34 -06:00
|
|
|
textGrad.resize ( textGrad.size()-((*textGrad.rbegin()=='m')?2:1) );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
drawDisplayText ( QPoint(pxOrigin.x() - tickLength,pyGrad + 1)
|
2009-04-15 11:09:18 -05:00
|
|
|
, textGrad.c_str()
|
2010-01-22 10:38:21 -06:00
|
|
|
, Bold
|
2009-04-15 11:09:18 -05:00
|
|
|
, 0
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// The last vertical tick.
|
2010-01-22 10:38:21 -06:00
|
|
|
_drawingPlanes.painter().drawLine ( pxOrigin.x() , pxAngle.y()
|
|
|
|
, pxOrigin.x()-tickLength, pxAngle.y() );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-27 04:52:34 -06:00
|
|
|
textGrad = DbU::getValueString( abs(angle.getY() - origin.getY())
|
|
|
|
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
|
2010-01-27 03:43:07 -06:00
|
|
|
//textGrad.resize ( textGrad.size()-1 );
|
2009-04-15 11:09:18 -05:00
|
|
|
|
2010-01-22 10:38:21 -06:00
|
|
|
drawDisplayText ( QPoint(pxOrigin.x() - tickLength,pxAngle.y() + 1)
|
2009-04-15 11:09:18 -05:00
|
|
|
, textGrad.c_str()
|
2010-01-22 10:38:21 -06:00
|
|
|
, Bold
|
2009-04-15 11:09:18 -05:00
|
|
|
, 0
|
|
|
|
);
|
|
|
|
}
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::goLeft ( int dx )
|
|
|
|
{
|
|
|
|
if ( !dx ) dx = geometry().size().width() / 4;
|
2008-07-03 09:31:20 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_redrawManager.goLeft ( dx );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::goRight ( int dx )
|
|
|
|
{
|
|
|
|
if ( !dx ) dx = geometry().size().width() / 4;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_redrawManager.goRight ( dx );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::goUp ( int dy )
|
|
|
|
{
|
|
|
|
if ( !dy ) dy = geometry().size().height() / 4;
|
2008-07-03 09:31:20 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_redrawManager.goUp ( dy );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::goDown ( int dy )
|
|
|
|
{
|
|
|
|
if ( !dy ) dy = geometry().size().height() / 4;
|
2008-07-03 09:31:20 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_redrawManager.goDown ( dy );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::displayReframe ()
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
|
|
|
_offsetVA.rx() = _stripWidth;
|
|
|
|
_offsetVA.ry() = _stripWidth;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
DbU::Unit xmin = (DbU::Unit)( _visibleArea.getXMin() - ((float)_offsetVA.x()/getScale()) );
|
|
|
|
DbU::Unit xmax = (DbU::Unit)( xmin + ((float)_drawingPlanes.width()/getScale()) ) ;
|
|
|
|
DbU::Unit ymax = (DbU::Unit)( _visibleArea.getYMax() + ((float)_offsetVA.y()/getScale()) );
|
|
|
|
DbU::Unit ymin = (DbU::Unit)( ymax - ((float)_drawingPlanes.height()/getScale()) ) ;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
_displayArea = Box ( xmin, ymin, xmax, ymax );
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
_redrawManager.refresh ();
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
Box CellWidget::computeVisibleArea ( float scale ) const
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
|
|
|
Point center = _visibleArea.getCenter();
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
return Box ( (DbU::Unit)( center.getX() - width () / (scale*2) )
|
|
|
|
, (DbU::Unit)( center.getY() - height() / (scale*2) )
|
|
|
|
, (DbU::Unit)( center.getX() + width () / (scale*2) )
|
|
|
|
, (DbU::Unit)( center.getY() + height() / (scale*2) )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Box CellWidget::computeVisibleArea ( float scale, const Point& topLeft ) const
|
|
|
|
{
|
|
|
|
return Box ( topLeft.getX()
|
|
|
|
, (DbU::Unit)( topLeft.getY() - height() / scale )
|
|
|
|
, (DbU::Unit)( topLeft.getX() + width () / scale )
|
|
|
|
, topLeft.getY()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Box CellWidget::computeVisibleArea ( const Box& area, float& scale ) const
|
|
|
|
{
|
|
|
|
int widgetWidth = width ();
|
|
|
|
int widgetHeight = height ();
|
|
|
|
|
|
|
|
float scaleX = widgetWidth / (float)area.getWidth ();
|
|
|
|
float scaleY = widgetHeight / (float)area.getHeight();
|
|
|
|
scale = min ( scaleX, scaleY );
|
|
|
|
|
|
|
|
Point center = area.getCenter();
|
|
|
|
|
|
|
|
widgetWidth /= 2;
|
|
|
|
widgetHeight /= 2;
|
|
|
|
|
|
|
|
return Box ( (DbU::Unit)( center.getX() - widgetWidth / scale )
|
|
|
|
, (DbU::Unit)( center.getY() - widgetHeight / scale )
|
|
|
|
, (DbU::Unit)( center.getX() + widgetWidth / scale )
|
|
|
|
, (DbU::Unit)( center.getY() + widgetHeight / scale )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::setScale ( float scale )
|
|
|
|
{
|
|
|
|
//cerr << "CellWidget::setScale() - " << scale << endl;
|
|
|
|
|
|
|
|
_state->setTopLeft ( getTopLeft() );
|
|
|
|
_visibleArea = computeVisibleArea ( scale );
|
|
|
|
_state->setScale ( scale );
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
//cerr << "_visibleArea: " << _visibleArea << " (offset: " << _offsetVA.x() << ")" << endl;
|
|
|
|
//cerr << " " << center << endl;
|
|
|
|
|
2008-07-03 09:31:20 -05:00
|
|
|
displayReframe ();
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
void CellWidget::scaleHistoryUp ()
|
|
|
|
{
|
|
|
|
_state->setTopLeft ( getTopLeft() );
|
|
|
|
if ( _state->scaleHistoryUp () ) {
|
|
|
|
_visibleArea = computeVisibleArea ( _state->getScale(), _state->getTopLeft() );
|
|
|
|
displayReframe ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::scaleHistoryDown ()
|
|
|
|
{
|
|
|
|
_state->setTopLeft ( getTopLeft() );
|
|
|
|
if ( _state->scaleHistoryDown () ) {
|
|
|
|
_visibleArea = computeVisibleArea ( _state->getScale(), _state->getTopLeft() );
|
|
|
|
displayReframe ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::reframe ()
|
2009-01-30 08:52:05 -06:00
|
|
|
{
|
|
|
|
//cerr << "CellWidget::reframe() - scale:" << _state->getScale()
|
|
|
|
// << " topLeft:" << _state->getTopLeft() << endl;
|
|
|
|
|
|
|
|
_visibleArea = computeVisibleArea ( _state->getScale(), _state->getTopLeft() );
|
2009-02-02 08:45:48 -06:00
|
|
|
displayReframe ();
|
2009-01-30 08:52:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::reframe ( const Box& box, bool historyEnable )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
|
|
|
//cerr << "CellWidget::reframe() - " << box << endl;
|
2008-07-10 04:22:36 -05:00
|
|
|
//cerr << " widget size := " << _drawingPlanes.width() << "x" << _drawingPlanes.height() << endl;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
//cerr << " CellWidget::reframe() - widget size := " << width() << "x" << height() << endl;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
bool backupHistoryEnable = _state->getHistoryEnable ();
|
|
|
|
_state->setHistoryEnable ( historyEnable );
|
|
|
|
_state->setTopLeft ( getTopLeft() );
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
float scale;
|
2009-01-30 08:52:05 -06:00
|
|
|
_visibleArea = computeVisibleArea ( box, scale );
|
|
|
|
_state->setScale ( scale );
|
2009-02-02 08:45:48 -06:00
|
|
|
displayReframe ();
|
|
|
|
|
|
|
|
_state->setHistoryEnable ( backupHistoryEnable );
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
//cerr << " _displayArea: " << _displayArea << " (offset: " << _offsetVA.x() << ")" << endl;
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::fitToContents ( bool historyEnable )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2009-01-30 08:52:05 -06:00
|
|
|
//cerr << "CellWidget::fitToContents()" << endl;
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
Box boundingBox = Box ( DbU::lambda(0)
|
|
|
|
, DbU::lambda(0)
|
|
|
|
, DbU::lambda(10)
|
|
|
|
, DbU::lambda(50)
|
|
|
|
);
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( getCell() ) boundingBox = getCell()->getBoundingBox();
|
2010-01-26 06:58:36 -06:00
|
|
|
|
|
|
|
DbU::Unit expand;
|
|
|
|
if ( boundingBox.getWidth() < boundingBox.getHeight() ) {
|
|
|
|
expand = DbU::grid( DbU::getGrid(boundingBox.getWidth()) * 0.05 );
|
|
|
|
} else {
|
|
|
|
expand = DbU::grid( DbU::getGrid(boundingBox.getHeight()) * 0.05 );
|
|
|
|
}
|
|
|
|
|
|
|
|
reframe ( boundingBox.inflate(expand), historyEnable );
|
2009-02-02 08:45:48 -06:00
|
|
|
}
|
2009-01-30 08:52:05 -06:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
|
|
|
|
void CellWidget::fitToNet ( const Net* net, bool historyEnable )
|
|
|
|
{
|
|
|
|
if ( !net )
|
|
|
|
throw Error ( "<b>CellWidget::fitToNet()</b>: NULL net argument." );
|
|
|
|
|
|
|
|
if ( net->getCell() != getCell() )
|
|
|
|
throw Error ( "<b>CellWidget::fitToNet()</b>:<br>"
|
|
|
|
"Net %s (cell: %s) do not belong to Cell %s"
|
|
|
|
, Graphics::toHtml(getString(net->getName())).c_str()
|
|
|
|
, Graphics::toHtml(getString(net->getCell()->getName())).c_str()
|
|
|
|
, Graphics::toHtml(getString(getCell()->getName())).c_str()
|
|
|
|
);
|
|
|
|
|
|
|
|
Box boundingBox = net->getBoundingBox ();
|
|
|
|
if ( !boundingBox.isEmpty() )
|
|
|
|
reframe ( boundingBox, historyEnable );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::_goLeft ( int dx )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2009-01-30 08:52:05 -06:00
|
|
|
_visibleArea.translate ( - (DbU::Unit)( dx / getScale() ) , 0 );
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( _offsetVA.rx() - dx >= 0 ) {
|
|
|
|
_offsetVA.rx() -= dx;
|
|
|
|
repaint ();
|
|
|
|
return;
|
|
|
|
}
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
int shift = ( 1 + ( dx - _offsetVA.rx() ) / _stripWidth ) * _stripWidth;
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
_displayArea.translate ( - (DbU::Unit)( shift / getScale() ) , 0 );
|
2008-12-20 10:56:05 -06:00
|
|
|
_offsetVA.rx() -= dx - shift;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( shift >= _drawingPlanes.width() )
|
|
|
|
_redrawManager.refresh ();
|
|
|
|
else {
|
|
|
|
_drawingPlanes.shiftLeft ( shift );
|
|
|
|
_redraw ( QRect ( QPoint(0,0), QSize(shift,_drawingPlanes.height()) ) );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
assert ( _offsetVA.rx() >= 0 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::_goRight ( int dx )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2008-12-20 10:56:05 -06:00
|
|
|
//cerr << "CellWidget::goRight() - dx: " << dx << " (offset: " << _offsetVA.rx() << ")" << endl;
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
_visibleArea.translate ( (DbU::Unit)( dx / getScale() ) , 0 );
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( _offsetVA.rx() + dx < 2*_stripWidth ) {
|
|
|
|
_offsetVA.rx() += dx;
|
|
|
|
repaint ();
|
|
|
|
return;
|
|
|
|
}
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
int shift = ( ( _offsetVA.rx() + dx ) / _stripWidth ) * _stripWidth;
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
_displayArea.translate ( (DbU::Unit)( shift / getScale() ) , 0 );
|
2008-12-20 10:56:05 -06:00
|
|
|
_offsetVA.rx() += dx - shift;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( shift >= _drawingPlanes.width() )
|
|
|
|
_redrawManager.refresh ();
|
|
|
|
else {
|
|
|
|
_drawingPlanes.shiftRight ( shift );
|
|
|
|
_redraw ( QRect ( QPoint(_drawingPlanes.width()-shift,0)
|
|
|
|
, QSize (shift,_drawingPlanes.height()) ) );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
assert ( _offsetVA.rx() >= 0 );
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::_goUp ( int dy )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
|
|
|
//cerr << "CellWidget::shiftUp() - " << dy << " (offset: " << _offsetVA.ry() << ")" << endl;
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
_visibleArea.translate ( 0, (DbU::Unit)( dy / getScale() ) );
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( _offsetVA.ry() - dy >= 0 ) {
|
|
|
|
_offsetVA.ry() -= dy;
|
|
|
|
repaint ();
|
|
|
|
return;
|
|
|
|
}
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
int shift = ( 1 + ( dy - _offsetVA.ry() ) / _stripWidth ) * _stripWidth;
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
_displayArea.translate ( 0, (DbU::Unit)( shift / getScale() ) );
|
2008-12-20 10:56:05 -06:00
|
|
|
_offsetVA.ry() -= dy - shift;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( shift >= _drawingPlanes.height() )
|
|
|
|
_redrawManager.refresh ();
|
|
|
|
else {
|
|
|
|
_drawingPlanes.shiftUp ( shift );
|
|
|
|
_redraw ( QRect ( QPoint(0,0), QSize(_drawingPlanes.width(),shift) ) );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
assert ( _offsetVA.ry() >= 0 );
|
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::_goDown ( int dy )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
|
|
|
//cerr << "CellWidget::shiftDown() - " << dy << " (offset: " << _offsetVA.ry() << ")" << endl;
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
_visibleArea.translate ( 0, - (DbU::Unit)( dy / getScale() ) );
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( _offsetVA.ry() + dy < 2*_stripWidth ) {
|
|
|
|
_offsetVA.ry() += dy;
|
|
|
|
repaint ();
|
|
|
|
return;
|
|
|
|
}
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
int shift = ( ( _offsetVA.ry() + dy ) / _stripWidth ) * _stripWidth;
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
_displayArea.translate ( 0, - (DbU::Unit)( shift / getScale() ) );
|
2008-12-20 10:56:05 -06:00
|
|
|
_offsetVA.ry() += dy - shift;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( shift >= _drawingPlanes.height() )
|
|
|
|
_redrawManager.refresh ();
|
|
|
|
else {
|
|
|
|
_drawingPlanes.shiftDown ( shift );
|
|
|
|
_redraw ( QRect ( QPoint (0,_drawingPlanes.height()-shift)
|
|
|
|
, QSize (_drawingPlanes.width(), shift) ) );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
assert ( _offsetVA.ry() >= 0 );
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::_refresh ()
|
|
|
|
{
|
|
|
|
_redraw ( QRect(QPoint(0,0),_drawingPlanes.size()) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::showEvent ( QShowEvent* )
|
|
|
|
{
|
|
|
|
//cerr << "CellWidget::showEvent() - size: " << geometry().width() << "x" << geometry().height() << endl;
|
2009-01-30 08:52:05 -06:00
|
|
|
if ( _cellChanged )
|
2009-02-02 08:45:48 -06:00
|
|
|
fitToContents ( false );
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-08-29 04:32:52 -05:00
|
|
|
void CellWidget::paintEvent ( QPaintEvent* event )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
// static Timer timer;
|
|
|
|
// static time_t prevTime = 0;
|
|
|
|
// static time_t currTime = 0;
|
2009-01-21 10:42:58 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
// timer.start ();
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.pushWorkingPlane ();
|
|
|
|
_drawingPlanes.select ( PlaneId::Widget );
|
|
|
|
_drawingPlanes.begin ();
|
|
|
|
_drawingPlanes.copyToScreen ();
|
2008-09-01 09:47:50 -05:00
|
|
|
for ( size_t i=0 ; i<_commands.size() ; i++ )
|
2009-10-19 12:17:21 -05:00
|
|
|
_commands[i]->draw ();
|
2008-09-01 09:47:50 -05:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
if ( isDrawable("spot") ) _spot.moveTo ( _mousePosition );
|
2009-04-15 11:09:18 -05:00
|
|
|
_drawingPlanes.end ();
|
|
|
|
_drawingPlanes.popWorkingPlane ();
|
2009-01-24 05:14:38 -06:00
|
|
|
// timer.stop ();
|
2009-01-21 10:42:58 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
// time ( &currTime );
|
|
|
|
// double delta = difftime ( currTime, prevTime );
|
2009-01-21 10:42:58 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
// if ( delta )
|
|
|
|
// cerr << "CellWidget::paintEvent() - lagging: " << delta << endl;
|
2009-01-21 10:42:58 -06:00
|
|
|
|
2009-01-24 05:14:38 -06:00
|
|
|
// prevTime = currTime;
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::resizeEvent ( QResizeEvent* )
|
|
|
|
{
|
2009-01-24 05:14:38 -06:00
|
|
|
// cerr << "CellWidget::resizeEvent() - size: " << geometry().width() << "x" << geometry().height() << endl;
|
2008-12-20 10:56:05 -06:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
QSize uaDelta ( 0, 0 );
|
|
|
|
QSize uaSize = geometry().size();
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
uaSize.rwidth () += 2*_stripWidth;
|
|
|
|
uaSize.rheight() += 2*_stripWidth;
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-10 04:22:36 -05:00
|
|
|
if ( uaSize.width () > _drawingPlanes.width () )
|
|
|
|
uaDelta.rwidth () = uaSize.width () - _drawingPlanes.width ();
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-10 04:22:36 -05:00
|
|
|
if ( uaSize.height() > _drawingPlanes.height() )
|
|
|
|
uaDelta.rheight() = uaSize.height() - _drawingPlanes.height();
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
if ( uaDelta.width() || uaDelta.height() ) {
|
2009-01-30 08:52:05 -06:00
|
|
|
_displayArea.inflate ( 0, 0, (DbU::Unit)(uaDelta.width()/getScale()), (DbU::Unit)(uaDelta.height()/getScale()) );
|
|
|
|
_visibleArea.inflate ( 0, 0, (DbU::Unit)(uaDelta.width()/getScale()), (DbU::Unit)(uaDelta.height()/getScale()) );
|
2008-05-16 10:28:39 -05:00
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
QSize bufferSize ( ( ( uaSize.width () / _stripWidth ) + 1 ) * _stripWidth
|
|
|
|
, ( ( uaSize.height() / _stripWidth ) + 1 ) * _stripWidth );
|
2008-07-10 04:22:36 -05:00
|
|
|
_drawingPlanes.resize ( bufferSize );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-12-20 10:56:05 -06:00
|
|
|
|
|
|
|
_redrawManager.refresh ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::wheelEvent ( QWheelEvent* event )
|
|
|
|
{
|
2009-10-19 12:17:21 -05:00
|
|
|
event->ignore ();
|
|
|
|
for ( size_t i=0 ; (i<_commands.size()) and not event->isAccepted(); i++ ) {
|
|
|
|
if ( _activeCommand
|
|
|
|
and (_commands[i] != _activeCommand )
|
|
|
|
and (_commands[i]->getType() != Command::AlwaysActive) )
|
|
|
|
continue;
|
|
|
|
_commands[i]->wheelEvent ( event );
|
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::keyPressEvent ( QKeyEvent* event )
|
|
|
|
{
|
2009-10-19 12:17:21 -05:00
|
|
|
event->ignore ();
|
|
|
|
//cerr << "CellWidget::keyPressEvent " << event->isAccepted() << endl;
|
|
|
|
for ( size_t i=0 ; (i<_commands.size()) and not event->isAccepted(); i++ ) {
|
|
|
|
if ( _activeCommand
|
|
|
|
and (_commands[i] != _activeCommand )
|
|
|
|
and (_commands[i]->getType() != Command::AlwaysActive) )
|
|
|
|
continue;
|
|
|
|
//cerr << " Calling [" << i << "] " << _commands[i]->getName() << endl;
|
|
|
|
_commands[i]->keyPressEvent ( event );
|
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
void CellWidget::keyReleaseEvent ( QKeyEvent* event )
|
|
|
|
{
|
2009-10-19 12:17:21 -05:00
|
|
|
event->ignore ();
|
|
|
|
//cerr << "CellWidget::keyReleaseEvent " << event->isAccepted() << endl;
|
|
|
|
for ( size_t i=0 ; (i<_commands.size()) and not event->isAccepted(); i++ ) {
|
|
|
|
if ( _activeCommand
|
|
|
|
and (_commands[i] != _activeCommand )
|
|
|
|
and (_commands[i]->getType() != Command::AlwaysActive) )
|
|
|
|
continue;
|
|
|
|
//cerr << " Calling [" << i << "] " << _commands[i]->getName() << endl;
|
|
|
|
_commands[i]->keyReleaseEvent ( event );
|
|
|
|
}
|
2008-12-20 10:56:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::mouseMoveEvent ( QMouseEvent* event )
|
|
|
|
{
|
2009-10-19 12:17:21 -05:00
|
|
|
event->ignore ();
|
|
|
|
for ( size_t i=0 ; (i<_commands.size()) and not event->isAccepted(); i++ ) {
|
|
|
|
if ( _activeCommand
|
|
|
|
and (_commands[i] != _activeCommand )
|
|
|
|
and (_commands[i]->getType() != Command::AlwaysActive) )
|
|
|
|
continue;
|
|
|
|
_commands[i]->mouseMoveEvent ( event );
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2009-10-19 12:17:21 -05:00
|
|
|
|
|
|
|
_mousePosition = event->pos();
|
|
|
|
updateMousePosition ();
|
|
|
|
repaint ();
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::mousePressEvent ( QMouseEvent* event )
|
|
|
|
{
|
2009-10-19 12:17:21 -05:00
|
|
|
event->ignore ();
|
|
|
|
//cerr << "CellWidget::mousePressEvent " << event->isAccepted() << endl;
|
|
|
|
for ( size_t i=0 ; (i<_commands.size()) and not event->isAccepted(); i++ ) {
|
|
|
|
if ( _activeCommand
|
|
|
|
and (_commands[i] != _activeCommand )
|
|
|
|
and (_commands[i]->getType() != Command::AlwaysActive) )
|
|
|
|
continue;
|
|
|
|
//cerr << " Calling [" << i << "] " << _commands[i]->getName() << endl;
|
|
|
|
_commands[i]->mousePressEvent ( event );
|
|
|
|
}
|
2008-09-01 09:47:50 -05:00
|
|
|
|
2009-10-19 12:17:21 -05:00
|
|
|
_spot.setShowSpot ( !_activeCommand );
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
void CellWidget::mouseReleaseEvent ( QMouseEvent* event )
|
|
|
|
{
|
2009-10-19 12:17:21 -05:00
|
|
|
event->ignore ();
|
|
|
|
//cerr << "CellWidget::mouseReleaseEvent " << event->isAccepted() << endl;
|
|
|
|
for ( size_t i=0 ; (i<_commands.size()) and not event->isAccepted(); i++ ) {
|
|
|
|
if ( _activeCommand
|
|
|
|
and (_commands[i] != _activeCommand )
|
|
|
|
and (_commands[i]->getType() != Command::AlwaysActive) )
|
|
|
|
continue;
|
|
|
|
//cerr << " Calling [" << i << "] " << _commands[i]->getName() << endl;
|
|
|
|
_commands[i]->mouseReleaseEvent ( event );
|
|
|
|
}
|
|
|
|
//if ( not _activeCommand ) QWidget::mouseReleaseEvent ( event );
|
2008-09-01 09:47:50 -05:00
|
|
|
|
|
|
|
_spot.setShowSpot ( true );
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
QPoint CellWidget::dbuToDisplayPoint ( DbU::Unit x, DbU::Unit y ) const
|
|
|
|
{
|
|
|
|
return QPoint ( dbuToDisplayX(x), dbuToDisplayY(y) );
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
QPoint CellWidget::dbuToDisplayPoint ( const Point& point ) const
|
|
|
|
{
|
|
|
|
return dbuToDisplayPoint ( point.getX(), point.getY() );
|
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2009-01-08 08:09:46 -06:00
|
|
|
QRect CellWidget::dbuToDisplayRect ( DbU::Unit x1, DbU::Unit y1, DbU::Unit x2, DbU::Unit y2, bool usePoint ) const
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2009-01-09 09:18:26 -06:00
|
|
|
int width, height;
|
|
|
|
|
2009-01-08 08:09:46 -06:00
|
|
|
if ( usePoint ) {
|
2009-01-09 09:18:26 -06:00
|
|
|
width = dbuToDisplayX(x2) - dbuToDisplayX(x1);
|
|
|
|
height = dbuToDisplayY(y1) - dbuToDisplayY(y2);
|
2009-01-08 08:09:46 -06:00
|
|
|
} else {
|
2009-01-09 09:18:26 -06:00
|
|
|
width = dbuToDisplayLength ( x2 - x1 );
|
|
|
|
height = dbuToDisplayLength ( y2 - y1 );
|
2009-01-08 08:09:46 -06:00
|
|
|
}
|
2009-01-09 09:18:26 -06:00
|
|
|
|
|
|
|
return QRect ( dbuToDisplayX(x1)
|
|
|
|
, dbuToDisplayY(y2)
|
|
|
|
, width ? width : 1
|
|
|
|
, height ? height : 1
|
|
|
|
);
|
2008-07-02 10:13:40 -05:00
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2009-01-08 08:09:46 -06:00
|
|
|
QRect CellWidget::dbuToDisplayRect ( const Box& box, bool usePoint ) const
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
|
|
|
return dbuToDisplayRect ( box.getXMin()
|
|
|
|
, box.getYMin()
|
|
|
|
, box.getXMax()
|
|
|
|
, box.getYMax()
|
2009-01-08 08:09:46 -06:00
|
|
|
, usePoint
|
2008-07-02 10:13:40 -05:00
|
|
|
);
|
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2008-07-02 10:13:40 -05:00
|
|
|
QPoint CellWidget::dbuToScreenPoint ( DbU::Unit x, DbU::Unit y ) const
|
|
|
|
{
|
|
|
|
return QPoint ( dbuToScreenX(x), dbuToScreenY(y) );
|
|
|
|
}
|
2008-05-16 10:28:39 -05:00
|
|
|
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
void CellWidget::setCell ( Cell* cell )
|
2008-07-02 10:13:40 -05:00
|
|
|
{
|
2009-01-27 04:14:46 -06:00
|
|
|
//cerr << "CellWidget::setCell() - " << cell << endl;
|
|
|
|
|
|
|
|
if ( cell == getCell() ) return;
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
openRefreshSession ();
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
shared_ptr<State> state ( new State(cell) );
|
|
|
|
setState ( state );
|
2010-01-25 08:41:48 -06:00
|
|
|
if ( cell and cell->isTerminal() ) setQueryFilter ( ~0 );
|
2009-04-12 16:05:51 -05:00
|
|
|
//setRealMode ();
|
2009-01-30 08:52:05 -06:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
fitToContents ( false );
|
2009-01-30 08:52:05 -06:00
|
|
|
|
|
|
|
_state->setHistoryEnable ( true );
|
2009-02-02 08:45:48 -06:00
|
|
|
|
|
|
|
closeRefreshSession ();
|
2008-05-16 10:28:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
void CellWidget::setState ( shared_ptr<State>& state )
|
2008-07-02 08:31:50 -05:00
|
|
|
{
|
2009-01-30 08:52:05 -06:00
|
|
|
//cerr << "CellWidget::setState() - " << state->getName() << endl;
|
2008-12-20 10:56:05 -06:00
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
if ( state == _state ) return;
|
2009-01-27 04:14:46 -06:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
openRefreshSession ();
|
|
|
|
|
2008-11-28 17:10:39 -06:00
|
|
|
cellPreModificate ();
|
2009-01-30 08:52:05 -06:00
|
|
|
_state->getSelection ().clear ();
|
2009-01-27 04:14:46 -06:00
|
|
|
_state->setCellWidget ( NULL );
|
2009-01-30 08:52:05 -06:00
|
|
|
_state->setTopLeft ( getTopLeft() );
|
2008-11-28 17:10:39 -06:00
|
|
|
|
2008-12-20 10:56:05 -06:00
|
|
|
_cellChanged = true;
|
2009-01-27 04:14:46 -06:00
|
|
|
_state = state;
|
2008-10-07 10:01:32 -05:00
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
// cerr << " about to restore " << (void*)_state.get()
|
|
|
|
// << " " << _state->getName()
|
|
|
|
// << ": _state->setTopLeft("
|
|
|
|
// << DbU::getValueString(_state->getTopLeft().getX()) << ","
|
|
|
|
// << DbU::getValueString(_state->getTopLeft().getY()) << ")" << endl;
|
|
|
|
|
|
|
|
_state->setHistoryEnable ( false );
|
2009-01-27 04:14:46 -06:00
|
|
|
_state->setCellWidget ( this );
|
2009-02-02 08:45:48 -06:00
|
|
|
_drawingQuery .setCell ( getCell() );
|
|
|
|
_drawingQuery .setStartLevel ( _state->getStartLevel() );
|
|
|
|
_drawingQuery .setStopLevel ( _state->getStopLevel() );
|
|
|
|
_textDrawingQuery.setCell ( getCell() );
|
2009-01-27 04:14:46 -06:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
reframe ();
|
2009-01-30 08:52:05 -06:00
|
|
|
_state->setHistoryEnable ( true );
|
2008-08-27 09:06:06 -05:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
emit cellChanged ( getCell() );
|
|
|
|
emit stateChanged ( _state );
|
|
|
|
emit queryFilterChanged ();
|
2008-11-28 17:10:39 -06:00
|
|
|
|
|
|
|
cellPostModificate ();
|
2009-02-02 08:45:48 -06:00
|
|
|
|
|
|
|
closeRefreshSession ();
|
2008-07-02 08:31:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-12 07:28:19 -06:00
|
|
|
Occurrences CellWidget::getOccurrencesUnder ( const Box& area ) const
|
|
|
|
{
|
2009-10-19 12:17:21 -05:00
|
|
|
return getCell()->getOccurrencesUnder(area,3).getSubSet(Occurrences_IsSelectable(this));
|
2008-12-12 07:28:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::select ( const Net* net )
|
2008-07-10 04:22:36 -05:00
|
|
|
{
|
2008-11-26 03:35:07 -06:00
|
|
|
++_delaySelectionChanged;
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
bool added = _state->getSelection().add ( net );
|
2008-11-26 03:35:07 -06:00
|
|
|
|
2009-02-03 09:05:05 -06:00
|
|
|
if ( !--_delaySelectionChanged && added ) emit selectionChanged(_selectors);
|
2008-11-28 17:10:39 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CellWidget::isSelected ( Occurrence occurrence )
|
|
|
|
{
|
|
|
|
if ( !occurrence.isValid() )
|
|
|
|
throw Error ( "Can't select occurrence : invalid occurrence" );
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( occurrence.getOwnerCell() != getCell() ) {
|
|
|
|
string s1 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
|
|
|
|
string s2 = Graphics::toHtml ( getString(getCell()) );
|
|
|
|
throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s"
|
|
|
|
, s1.c_str(), s2.c_str() );
|
|
|
|
}
|
2008-11-28 17:10:39 -06:00
|
|
|
|
|
|
|
Property* property = occurrence.getProperty ( Selector::getPropertyName() );
|
|
|
|
if ( !property )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
Selector* selector = dynamic_cast<Selector*>(property);
|
|
|
|
if ( !selector )
|
|
|
|
throw Error ( "Abnormal property named " + getString(Selector::getPropertyName()) );
|
|
|
|
|
|
|
|
return selector->isAttachedTo(this);
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-01 09:47:50 -05:00
|
|
|
void CellWidget::select ( Occurrence occurrence )
|
2008-07-10 04:22:36 -05:00
|
|
|
{
|
|
|
|
if ( !occurrence.isValid() )
|
|
|
|
throw Error ( "Can't select occurrence : invalid occurrence" );
|
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( occurrence.getOwnerCell() != getCell() ) {
|
|
|
|
string s1 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
|
|
|
|
string s2 = Graphics::toHtml ( getString(getCell()) );
|
|
|
|
throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s"
|
|
|
|
, s1.c_str(), s2.c_str() );
|
|
|
|
}
|
2008-07-10 04:22:36 -05:00
|
|
|
|
|
|
|
Property* property = occurrence.getProperty ( Selector::getPropertyName() );
|
|
|
|
Selector* selector = NULL;
|
|
|
|
if ( !property )
|
|
|
|
selector = Selector::create ( occurrence );
|
|
|
|
else {
|
|
|
|
selector = dynamic_cast<Selector*>(property);
|
|
|
|
if ( !selector )
|
|
|
|
throw Error ( "Abnormal property named " + getString(Selector::getPropertyName()) );
|
|
|
|
}
|
|
|
|
|
|
|
|
selector->attachTo(this);
|
|
|
|
|
2009-10-19 12:17:21 -05:00
|
|
|
setShowSelection ( true );
|
2008-07-10 04:22:36 -05:00
|
|
|
_selectionHasChanged = true;
|
2009-02-03 09:05:05 -06:00
|
|
|
if ( !_delaySelectionChanged ) emit selectionChanged(_selectors);
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
void CellWidget::selectOccurrencesUnder ( Box selectArea )
|
|
|
|
{
|
2008-11-26 03:35:07 -06:00
|
|
|
++_delaySelectionChanged;
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
if ( !_state->cumulativeSelection() ) {
|
|
|
|
openRefreshSession ();
|
|
|
|
unselectAll ();
|
|
|
|
closeRefreshSession ();
|
|
|
|
}
|
2009-01-27 04:14:46 -06:00
|
|
|
bool added = _state->getSelection().add ( selectArea );
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
|
2009-02-03 09:05:05 -06:00
|
|
|
if ( !--_delaySelectionChanged && added ) emit selectionChanged(_selectors);
|
2008-11-28 17:10:39 -06:00
|
|
|
}
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
|
2008-11-28 17:10:39 -06:00
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::unselect ( const Net* net )
|
2008-11-28 17:10:39 -06:00
|
|
|
{
|
|
|
|
++_delaySelectionChanged;
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
bool removed = _state->getSelection().remove ( net );
|
2009-02-03 09:05:05 -06:00
|
|
|
if ( !--_delaySelectionChanged && removed ) emit selectionChanged(_selectors);
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-01 09:47:50 -05:00
|
|
|
void CellWidget::unselect ( Occurrence occurrence )
|
2008-07-10 04:22:36 -05:00
|
|
|
{
|
|
|
|
if ( !occurrence.isValid() )
|
|
|
|
throw Error ( "Can't unselect occurrence : invalid occurrence" );
|
|
|
|
|
|
|
|
if ( occurrence.getOwnerCell() != getCell() )
|
|
|
|
throw Error ( "Can't unselect occurrence : incompatible occurrence" );
|
|
|
|
|
|
|
|
Property* property = occurrence.getProperty ( Selector::getPropertyName() );
|
|
|
|
if ( property ) {
|
|
|
|
Selector* selector = dynamic_cast<Selector*>(property);
|
|
|
|
if ( !selector )
|
|
|
|
throw Error ( "Abnormal property named " + getString(Selector::getPropertyName()) );
|
|
|
|
|
|
|
|
selector->detachFrom(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
_selectionHasChanged = true;
|
2009-02-03 09:05:05 -06:00
|
|
|
if ( !_delaySelectionChanged ) emit selectionChanged(_selectors);
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::unselectAll ()
|
2008-07-10 04:22:36 -05:00
|
|
|
{
|
2008-11-26 03:35:07 -06:00
|
|
|
++_delaySelectionChanged;
|
2008-07-10 04:22:36 -05:00
|
|
|
|
2009-01-27 04:14:46 -06:00
|
|
|
_state->getSelection().clear ();
|
2009-02-02 08:45:48 -06:00
|
|
|
_unselectAll ();
|
2008-11-26 03:35:07 -06:00
|
|
|
|
2009-02-03 09:05:05 -06:00
|
|
|
if ( !--_delaySelectionChanged ) emit selectionChanged(_selectors);
|
2008-07-10 04:22:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
void CellWidget::toggleSelection ( Occurrence occurrence )
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
{
|
|
|
|
if ( !occurrence.isValid() )
|
|
|
|
throw Error ( "Can't select occurrence : invalid occurrence" );
|
|
|
|
|
|
|
|
if ( occurrence.getOwnerCell() != getCell() )
|
|
|
|
throw Error ( "Can't select occurrence : incompatible occurrence" );
|
|
|
|
|
|
|
|
Property* property = occurrence.getProperty ( Selector::getPropertyName() );
|
|
|
|
Selector* selector = NULL;
|
|
|
|
if ( !property ) {
|
2009-10-19 12:17:21 -05:00
|
|
|
// Net special case.
|
|
|
|
Net* net = dynamic_cast<Net*>(occurrence.getEntity());
|
|
|
|
if ( net ) {
|
|
|
|
if ( occurrence.getPath().isEmpty() ) {
|
|
|
|
select ( net );
|
|
|
|
} else {
|
|
|
|
cerr << "[UNIMPLEMENTED] Selection of " << occurrence << endl;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
selector = Selector::create ( occurrence );
|
|
|
|
selector->attachTo ( this );
|
|
|
|
setShowSelection ( true );
|
|
|
|
}
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
} else {
|
|
|
|
selector = dynamic_cast<Selector*>(property);
|
|
|
|
if ( !selector )
|
|
|
|
throw Error ( "Abnormal property named " + getString(Selector::getPropertyName()) );
|
2009-10-19 12:17:21 -05:00
|
|
|
|
|
|
|
// Net special case.
|
|
|
|
Net* net = dynamic_cast<Net*>(occurrence.getEntity());
|
|
|
|
if ( net ) {
|
|
|
|
if ( occurrence.getPath().isEmpty() ) {
|
|
|
|
unselect ( net );
|
|
|
|
} else {
|
|
|
|
cerr << "[UNIMPLEMENTED] Selection of " << occurrence << endl;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
selector->detachFrom ( this );
|
|
|
|
}
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
_selectionHasChanged = true;
|
2009-01-27 04:14:46 -06:00
|
|
|
if ( _state->showSelection() ) _redrawManager.refresh ();
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
|
2009-01-30 08:52:05 -06:00
|
|
|
emit selectionToggled ( occurrence );
|
* ./coriolis/src/crlcore/src/ccore/Banner.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Banner.h
- Moved "CBanner" to "Banner", cleaned up, relooked, renamed functions, reorganised.
* ./coriolis/src/crlcore/src/ccore/ToolEngine.cpp
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngine.h
./coriolis/src/crlcore/src/ccore/crlcore/ToolEngines.h
- Renamed CEngine to ToolEngine, cleaned up, relooked. All fonctions as static
members.
* ./coriolis/src/crlcore/src/ccore/Memory.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Memory.h
- Renamed CMemory to Memory (as for Timer), minimal cleanup.
* ./coriolis/src/crlcore/src/ccore/crlcore/*.h
- Change anti-double inclusion constants from __XX_H__ to __CRL_XX_H__
(that is: include namespace) to avoid potential constant clashes with
other pieces of software.
* ./coriolis/src/crlcore/src/ccore/Utilities.cpp
./coriolis/src/crlcore/src/ccore/crlcore/Utilities.h
- Finish porting of all features from CUtils. Simplificated mstream using
member templates. Speedup mstream by using static_cast instead of
dynamic_cast.
* ./coriolis/src/crlcore/src/ccore/Environment.cpp
- Now read CORIOLIS_TOP from UNIX environment instead of hard-coded
directory (to my personnal installation...). See new method
"loadFromShell()", needs to be extended to all other variables.
_____________________________________________________________________________
* ./hurricane/src/hurricane/BasicLayer.{h,cpp}
- Suppress all graphics related members from Layer.
- Adding realName member for symbolic to real transformation.
* ./hurricane/src/hviewer/CellWidget.cpp
Bug: Now uses display threshold from Graphics (DisplayStyle) instead
of layer. Now layers appears/diseapears while zooming/unzooming.
* ./coriolis/src/crlcore :
- Separating clearly symbolic technology form real technology.
- Various file renaming.
_____________________________________________________________________________
* ./hurricane/src :
- Complete include re-organisation.
include/hurricane/*.h : kernel.
include/hurricane/viewer/*.h : hviewer.
include/hurricane/inspector/*.h : hinspector.
Includes have been moved into subdirectories of .cpp files (as in
crlcore).
- Now you must include files like this :
#include <hurricane/Layer.h>
#include <hurricane/viewer/CellViewer.h>
#include <hurricane/inspector/HInspector.h>
- Suppressed viewer specific include path in FindHURRICANE.cmake.
- Re-enabled documentation, with dot disabled as it seems to slow down
doxygen.
* ./crlcore/src/crlcore :
- Adapted to new Hurricane include scheme. Corrected bugs in it's own
include files (noticeably "Utilities.h").
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Added (empty) directories "html" & "latex". Those directories are
created by doxygen, but as they are used in the CMakeList.txt, they
must be present even before the fisrt run of cmake (otherwise cmake
choke on them).
- Doxygen sets to only generate html & pdf (through LaTeX) documentation.
- All ".dox" files corrected to suit the new function members naming
scheme (some work may remains in code examples).
_____________________________________________________________________________
* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}
./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
- Changed "Type" to "Material" to fit better the OpenAccess semantic.
Introduce Material meanings : pWell, nWell, pImplant, nImplant
active, metal, cut, obstacle & other.
* ./coriolis/src/crlcore :
- Switched to the generic layer model. Updated technology XML configuration
files, technology parser & AP parser/driver.
- Note that the representation of transistors visually changes as it's now
modelled with Implant + Active.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers :
RegularLayer (1 BasicLayer)
DiffusionLayer (2 or 3 BasicLayers: active+implant,well)
TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well)
ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well)
ViaLayer (3 BasicLayers: metal0+cut0+metal1)
- To better follow the OpenAccess semantic, the "obstacle" Material type
is renommed to "blockage".
- NB: doxygen documentation is not up-to-date and issue warnings.
* ./coriolis/src/crlcore :
- Migrate from CompositeLayer to the various SymbolicLayers.
- Symbolic rules are now closer to the reality so that a Cell displayed
with Hurricane should look identical to the Graal one.
- Complete rewrite of the AP parser. Much simplificated, do not try to
merge/articulates segments. This ensure a true rendering of the
Cell. Especially do not create contact to anchor diffusion segments,
which leads to very strange randering (DRC error as well).
_____________________________________________________________________________
* ./hurricane :
- Unit evolution to allow Symbolic (lamda) and Real (grid founder) mixing.
All functions related to Unit translations are now grouped under
the "DbU" class (another tribute to OpenAccess). "DbU" contains
only static attributes (constants) and methods. Unit itself becomes
a typedef inside this class, hence the file renaming from Unit.{h,cpp}
to DbU.{h.cpp}. Have to replace all instances of "Unit" by "DbU::Unit".
- Doc will be updated shortly.
_____________________________________________________________________________
* ./coriolis/src/crlcore :
- New AP parser : simplificated, no longer try to re-articulates segments.
More accurate representation of standart cell innards.
- More accurate symbolic extentions rules.
- Propagated changes from Hurricane about Unit/DbU.
_____________________________________________________________________________
* ./hurricane/src :
- Rename "pyext" to "isobar".
_____________________________________________________________________________
* ./hurricane/doc/hurricane :
- Documentation of DbU, replacing documentation of Unit.
* ./hurricane/src/hurricane/hurricane/DBo.h :
- Property set is now a mutable member, allowing const DBo to changes
their properties. Strange side effect on SlotAdapter in which we
need to declare two separate templates, one for const type and
another for non-const type.
- _getTypeName() defined to prevents noisy error message when a
derived class (from DBo) do not want to implement support for
the inspector.
_____________________________________________________________________________
Derrick Release !!
* ./hurricane/src
- Simplification of the Inspector internal mechanism. Simple, but with
more templates, means a slower compilation.
- The DbU::Unit problem : DbU::Unit are only typedef over long type,
so we cannot create a specific overload for them. Uses "getValueRecord()"
instead of "getRecord()"
- For HInspectorWidget add a "getClone()" method. Also add a global
object counter (for Record too) to track down memory leaks.
- Big rewrite of the HInspectorWidget : now do not leak memory like hell,
and only kept allocated the current Record and not the full stack
of them (instead, we stack Slots which are ligthweigh objects).
- Rename of "real" unit to "grid" unit.
- New conversion function "getPhysicalsPerGrid()" and associated
mechanism.
* ./coriolis/src/crlcore :
- Synchronise with the Hurricane modifications.
_____________________________________________________________________________
* ./hurricane/src/hurricane/DbU.{h,cpp} :
- Add forgotten converter function physicalToGrid(), physical units to
founder grid units.
* ./hurricane/src/hinspector :
- Added history support, and ability to move through the history stack.
- Fork support : by typing 'O' (capitalized 'o' letter) you can open
a new inspector on the current record.
_____________________________________________________________________________
* ./hurricane/src/hinspector :cla
- No more extra arguments in HInspectorWidget & RecordModel constructors.
Valid values have to be sets through setRootRecord() & setSlot().
- Key for forking sub-inspector is now *minus* 'o'.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug: very tricky one. Do not emit "layoutAboutToChange()" signal
after destroying the Record used by the RecordModel but before
setting a new one and not setting the _record field to NULL.
Now setRootRecord() should work more than once.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- API : in CellWidget & CellViewer constructors now only takes the
parent QWidget.
- Renaming coordinates translation functions for more clarity.
- Adding a StatusBar showing mouse coordinates.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Grid & Spot support (adjusted display threshold).
- Added new copyToScreen() functions for _drawingBuffer to screen refreshment
or partial copy (useful for Spot).
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New Widget policy : a widget do not generate other widget : applied to
CellWidget which no longer supplies Palette & StatusBar.
API note: to associate a HPalette to a CellWidget (that is be able
to select layer) you have to call "bindToPalette()" on the CellWidget.
- Hurricane reusable widget names prefixed by 'H' : HMousePosition and
HPalette.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : support for highlighted selection with decent refresh time.
To active selection mode, use the 's' key or the "View" menu.
- New feature : HNetlist to browse a Cell's Netlist. HNetlist can be used
with any NetInformations derived class, allowing the user to enrich
the HNetlist displayed fields. For an example, have a look at
SimpleNetlistWidget.
- Added proper licence header to all file.
_____________________________________________________________________________
* ./hurricane/src/hurricane :
- New feature : geometrical Query with callback fonctions "a la" OpenAccess.
* ./hurricane/src/hviewer :
- Uses Query to draw display.
- Bug : when drawing segments as lines (width inferior to 1 pixel)
uses an alternate Pen which is one pixel wide and SolidLine styled,
avoiding strange orange lines... Mechanism implemented in sub-class
DrawingPlanes.
- Make selection always visible regardless the zoom level.
- CellWidget names it's most importants childs QWidget (mostly menus)
for later retrieval in customized sub-classes.
* ./coriolis/src/crlcore/src/cyclop :
- Created a simple derived class from CellViewer. Example of customisation
of CellWidget.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : now CellViewer can start with a NULL Cell, note that in this
case all displacement/zooming function of CellWidget became uneffective.
(display only a black screen)
- New widget : HGraphics to select the layout graphic's theme.
- New widget : HDisplayFilter to select displayed hierarchical levels.
- Distinguish between Close (one viewer) & Exit (all viewers).
- Small enhancments of DisplayStyle (Description & darkening).
* ./coriolis/src/crlcore/src/ccore :
- Xml display parser takes account of DisplayStyle description & darkening.
* ./coriolis/src/crlcore/src/cyclop :
- Enhanced COpenCellDialog : ability to open in a new Viewer.
- Bug : now Cyclop can start on a NULL Cell.
- Half Bug : when a Cell is loaded at start, call show() *before* setCell()
so all internal widget resizing due to the insertion of the toolbar,
menbar palette ... takes places before the Cell fit. Now the loaded
cell appears correctly fitted.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- New feature : Command support. Move command is now implemenented as a
Command and no longer built into the CellWidget. ZoomCommand implemented.
- New feature : SelectCommand support along with new HSelection widget to
browse the current selection. Selection is automatically kept up to
date.
- Note : Selection Browser & Netlist Browser pointer in the CellViewer are
resets to NULL on widget destruction by closing. We do not want to keep
big widget hiden. The are allocateds on demand.
- New feature : progessive grid. First display 5x5 then 5x5 + 1x1.
_____________________________________________________________________________
* ./hurricane/src/hviewer :
- Bug : default argument to setWeight() sould be QFont::Normal and not "-1".
Shows in Qt debug mode (catched by an assert).
- Bug : SelectCommand now keep the Selection check button in sync.
- Change : Palette doesn't show at start.
* ./hurricane :
- Now choice between static and dynamic linking. Note that thoses options are
mutually exclusives.
* ./coriolis/src/crlcore :
- New choice between static and dynamic linking.
- New feature : XmlParser optional warning when file not found (default is
to warn).
- New feature : now read environment from user's optional configuration file :
~/.environment.alliance.xml
- Potential bug : when loading/parsing file, the XmlReader hangs if the opened
file is a directory, and QFile allows directory opening :-(
_____________________________________________________________________________
* ./hurricane/src/viewer :
- New features : advanced selection widget/commands. Communications between
CellWidget, HSelectionPopup, HSelection & SelectCommand mostly done
through signal/slots (better undersdanding of the possibilities).
- Change : debug menu is hidden by default.
- Change : in all the QTableView rows are now correctly resized, even when
filtering is active (new forceRowHeight() slot). I'm pretty sure there's
a better way to handle this, but I haven't found it for now.
- Change : small naming normalisation in all those TableView.
2008-09-14 10:48:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::_select ( const Net* net )
|
2008-11-26 03:35:07 -06:00
|
|
|
{
|
2008-11-28 17:10:39 -06:00
|
|
|
select ( Occurrence(net) );
|
2008-11-26 03:35:07 -06:00
|
|
|
forEach ( Component*, component, net->getComponents() ) {
|
|
|
|
Occurrence occurrence ( *component );
|
|
|
|
select ( occurrence );
|
|
|
|
}
|
2008-12-25 04:27:58 -06:00
|
|
|
forEach ( Rubber*, rubber, net->getRubbers() ) {
|
|
|
|
Occurrence occurrence ( *rubber );
|
|
|
|
select ( occurrence );
|
|
|
|
}
|
2009-02-02 08:45:48 -06:00
|
|
|
if ( _state->showSelection() ) _redrawManager.refresh ();
|
2008-11-26 03:35:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::_unselect ( const Net* net )
|
2008-11-28 17:10:39 -06:00
|
|
|
{
|
|
|
|
unselect ( Occurrence(net) );
|
|
|
|
forEach ( Component*, component, net->getComponents() ) {
|
|
|
|
Occurrence occurrence ( *component );
|
|
|
|
unselect ( occurrence );
|
|
|
|
}
|
2008-12-25 04:27:58 -06:00
|
|
|
forEach ( Rubber*, rubber, net->getRubbers() ) {
|
|
|
|
Occurrence occurrence ( *rubber );
|
|
|
|
unselect ( occurrence );
|
|
|
|
}
|
2009-02-02 08:45:48 -06:00
|
|
|
if ( _state->showSelection() ) _redrawManager.refresh ();
|
2008-11-28 17:10:39 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-11-26 03:35:07 -06:00
|
|
|
void CellWidget::_selectOccurrencesUnder ( Box selectArea )
|
|
|
|
{
|
2008-12-12 07:28:19 -06:00
|
|
|
forEach ( Occurrence, ioccurrence, getOccurrencesUnder(selectArea) )
|
2008-11-26 03:35:07 -06:00
|
|
|
select ( *ioccurrence );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-02 08:45:48 -06:00
|
|
|
void CellWidget::_unselectAll ()
|
2008-11-26 03:35:07 -06:00
|
|
|
{
|
2008-12-25 04:27:58 -06:00
|
|
|
SelectorSet::iterator iselector;
|
2008-11-26 03:35:07 -06:00
|
|
|
while ( !_selectors.empty() )
|
|
|
|
(*_selectors.begin())->detachFrom ( this );
|
|
|
|
|
|
|
|
if ( !_selectionHasChanged ) _selectionHasChanged = true;
|
2009-02-02 08:45:48 -06:00
|
|
|
if ( _state->showSelection() ) _redrawManager.refresh ();
|
2008-11-26 03:35:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::cellPreModificate ()
|
|
|
|
{
|
2009-02-02 08:45:48 -06:00
|
|
|
openRefreshSession ();
|
|
|
|
_unselectAll ();
|
2008-11-26 03:35:07 -06:00
|
|
|
|
2009-02-03 09:05:05 -06:00
|
|
|
emit selectionChanged(_selectors);
|
2008-11-26 03:35:07 -06:00
|
|
|
emit cellPreModificated ();
|
2009-02-02 08:45:48 -06:00
|
|
|
|
|
|
|
closeRefreshSession ();
|
2008-11-26 03:35:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CellWidget::cellPostModificate ()
|
|
|
|
{
|
2009-02-02 08:45:48 -06:00
|
|
|
openRefreshSession ();
|
2008-11-26 03:35:07 -06:00
|
|
|
_cellModificated = true;
|
|
|
|
|
|
|
|
++_delaySelectionChanged;
|
2009-01-27 04:14:46 -06:00
|
|
|
_state->getSelection().revalidate ();
|
2008-11-26 03:35:07 -06:00
|
|
|
|
|
|
|
updatePalette ();
|
2008-12-20 10:56:05 -06:00
|
|
|
_redrawManager.refresh ();
|
2008-11-26 03:35:07 -06:00
|
|
|
|
|
|
|
--_delaySelectionChanged;
|
2009-02-03 09:05:05 -06:00
|
|
|
emit selectionChanged(_selectors);
|
2008-11-26 03:35:07 -06:00
|
|
|
emit cellPostModificated ();
|
2009-02-02 08:45:48 -06:00
|
|
|
|
|
|
|
closeRefreshSession ();
|
2008-11-26 03:35:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-05-16 10:28:39 -05:00
|
|
|
} // End of Hurricane namespace.
|