Display selection when drawing on printing devices.
* Bug: In Hurricane::CellWidget, when setting up a state of a CellWidget, the selection was not copied. Now copy the SelectorCriterion (clone). * New: In Hurricane::SelectorCriterion, add a clone() method. * Change: In CRL Core, in etc/common/display.conf, for the Printer.Coriolis style, lower the thresold of display for the substrate layers so they are shown even in small zoom mode.
This commit is contained in:
parent
cf449945fc
commit
00ea8f0205
|
@ -315,13 +315,13 @@ stylesTable = \
|
||||||
|
|
||||||
# Group: Active Layers.
|
# Group: Active Layers.
|
||||||
, (Group , 'Active Layers')
|
, (Group , 'Active Layers')
|
||||||
, (Drawing, 'nWell' , { 'color':'Tan' , 'pattern':'antipoids2.32', 'border':1, 'threshold':1.50*scale })
|
, (Drawing, 'nWell' , { 'color':'Tan' , 'pattern':'antipoids2.32', 'border':1, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'pWell' , { 'color':'LightYellow', 'pattern':'antipoids2.32', 'border':1, 'threshold':1.50*scale })
|
, (Drawing, 'pWell' , { 'color':'LightYellow', 'pattern':'antipoids2.32', 'border':1, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'nImplant', { 'color':'LawnGreen' , 'pattern':'diffusion.32' , 'border':0, 'threshold':1.50*scale })
|
, (Drawing, 'nImplant', { 'color':'LawnGreen' , 'pattern':'diffusion.32' , 'border':0, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'pImplant', { 'color':'Yellow' , 'pattern':'diffusion.32' , 'border':0, 'threshold':1.50*scale })
|
, (Drawing, 'pImplant', { 'color':'Yellow' , 'pattern':'diffusion.32' , 'border':0, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'active' , { 'color':'White' , 'pattern':'active.32' , 'border':0, 'threshold':1.50*scale })
|
, (Drawing, 'active' , { 'color':'White' , 'pattern':'active.32' , 'border':0, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'poly' , { 'color':'Red' , 'pattern':'antipoids2.32', 'border':1, 'threshold':1.50*scale })
|
, (Drawing, 'poly' , { 'color':'Red' , 'pattern':'antipoids2.32', 'border':1, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'poly2' , { 'color':poly2Color , 'pattern':'antipoids2.32', 'border':1, 'threshold':1.50*scale })
|
, (Drawing, 'poly2' , { 'color':poly2Color , 'pattern':'antipoids2.32', 'border':1, 'threshold':0.02*scale })
|
||||||
|
|
||||||
# Group: Routing Layers.
|
# Group: Routing Layers.
|
||||||
, (Group , 'Routing Layers')
|
, (Group , 'Routing Layers')
|
||||||
|
@ -335,12 +335,12 @@ stylesTable = \
|
||||||
|
|
||||||
# Group: Cuts (VIA holes)
|
# Group: Cuts (VIA holes)
|
||||||
, (Group , 'Cuts (VIA holes)')
|
, (Group , 'Cuts (VIA holes)')
|
||||||
, (Drawing, 'cut0', { 'color':'Blue' , 'pattern':'poids2.8' , 'border':2, 'threshold':1.50*scale })
|
, (Drawing, 'cut0', { 'color':'Blue' , 'pattern':'poids2.8' , 'border':2, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'cut1', { 'color':'Aqua' , 'pattern':'antipoids2.8', 'border':2, 'threshold':0.80*scale })
|
, (Drawing, 'cut1', { 'color':'Aqua' , 'pattern':'antipoids2.8', 'border':2, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'cut2', { 'color':'LightPink', 'pattern':'poids2.8' , 'border':2, 'threshold':0.80*scale })
|
, (Drawing, 'cut2', { 'color':'LightPink', 'pattern':'poids2.8' , 'border':2, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'cut3', { 'color':'Green' , 'pattern':'antipoids2.8', 'border':2, 'threshold':0.80*scale })
|
, (Drawing, 'cut3', { 'color':'Green' , 'pattern':'antipoids2.8', 'border':2, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'cut4', { 'color':'Yellow' , 'pattern':'poids2.8' , 'border':2, 'threshold':0.80*scale })
|
, (Drawing, 'cut4', { 'color':'Yellow' , 'pattern':'poids2.8' , 'border':2, 'threshold':0.02*scale })
|
||||||
, (Drawing, 'cut5', { 'color':'Violet' , 'pattern':'antipoids2.8', 'border':2, 'threshold':0.80*scale })
|
, (Drawing, 'cut5', { 'color':'Violet' , 'pattern':'antipoids2.8', 'border':2, 'threshold':0.02*scale })
|
||||||
|
|
||||||
# Group: MIM6.
|
# Group: MIM6.
|
||||||
, (Group , 'MIM6')
|
, (Group , 'MIM6')
|
||||||
|
|
|
@ -284,11 +284,12 @@ namespace Hurricane {
|
||||||
|
|
||||||
void CellPrinter::toPdf ( QPrinter* printer, bool imageOnly )
|
void CellPrinter::toPdf ( QPrinter* printer, bool imageOnly )
|
||||||
{
|
{
|
||||||
|
int screenResolution = resolution();
|
||||||
|
|
||||||
if (printer == NULL) return;
|
if (printer == NULL) return;
|
||||||
if (_cellWidget->getCell() == NULL) return;
|
if (_cellWidget->getCell() == NULL) return;
|
||||||
|
|
||||||
_printer = printer;
|
_printer = printer;
|
||||||
//_printer->setResolution ( resolution() );
|
|
||||||
_printer->setResolution ( 150 );
|
_printer->setResolution ( 150 );
|
||||||
_printer->setPageMargins( 0.0, 0.0, 0.0, 0.0, QPrinter::DevicePixel );
|
_printer->setPageMargins( 0.0, 0.0, 0.0, 0.0, QPrinter::DevicePixel );
|
||||||
|
|
||||||
|
@ -311,7 +312,7 @@ namespace Hurricane {
|
||||||
// Compute the delta size between CellPrinter and CellWidget.
|
// Compute the delta size between CellPrinter and CellWidget.
|
||||||
//cerr << "Printer/Screen settings:" << endl;
|
//cerr << "Printer/Screen settings:" << endl;
|
||||||
//cerr << " Paper size: " << _printer->paperSize() << endl;
|
//cerr << " Paper size: " << _printer->paperSize() << endl;
|
||||||
//cerr << " Resolution (DPI): " << _printer->resolution() << " (screen:" << resolution() << ")" << endl;
|
//cerr << " Resolution (DPI): " << _printer->resolution() << " (screen:" << screenResolution << ")" << endl;
|
||||||
//cerr << " (paperw,paperh) = (" << _paperWidth << "," << _paperHeight << ")" << endl;
|
//cerr << " (paperw,paperh) = (" << _paperWidth << "," << _paperHeight << ")" << endl;
|
||||||
//cerr << " CellPrinter: " << geometry().width() << "x" << geometry().height() << endl;
|
//cerr << " CellPrinter: " << geometry().width() << "x" << geometry().height() << endl;
|
||||||
//cerr << " CellWidget: " << _cellWidget->geometry().width() << "x" << _cellWidget->geometry().height() << endl;
|
//cerr << " CellWidget: " << _cellWidget->geometry().width() << "x" << _cellWidget->geometry().height() << endl;
|
||||||
|
@ -331,20 +332,17 @@ namespace Hurricane {
|
||||||
|
|
||||||
Box visibleArea = _screenCellWidget->getVisibleArea();
|
Box visibleArea = _screenCellWidget->getVisibleArea();
|
||||||
if ( visibleArea.contains(_screenCellWidget->getCell()->getAbutmentBox()) ) {
|
if ( visibleArea.contains(_screenCellWidget->getCell()->getAbutmentBox()) ) {
|
||||||
//cerr << "fit to AB" << endl;
|
|
||||||
setFitOnAbutmentBox( true );
|
setFitOnAbutmentBox( true );
|
||||||
_cellWidget->fitToContents();
|
_cellWidget->fitToContents();
|
||||||
} else {
|
} else {
|
||||||
//cerr << "reframe" << endl;
|
|
||||||
_cellWidget->reframe( _screenCellWidget->getVisibleArea() );
|
_cellWidget->reframe( _screenCellWidget->getVisibleArea() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//cerr << " After resize CellWidget: " << _cellWidget->geometry().width() << "x" << _cellWidget->geometry().height() << endl;
|
//cerr << " After resize CellWidget: " << _cellWidget->geometry().width() << "x" << _cellWidget->geometry().height() << endl;
|
||||||
//cerr << " VisibleArea(printer): " << _cellWidget->getVisibleArea() << endl;
|
//cerr << " VisibleArea(printer): " << _cellWidget->getVisibleArea() << endl;
|
||||||
//cerr << " VisibleArea(screen): " << _screenCellWidget->getVisibleArea() << endl;
|
//cerr << " VisibleArea(screen): " << _screenCellWidget->getVisibleArea() << endl;
|
||||||
|
//
|
||||||
//cerr << " (xpaper,ypaper) = (" << _xpaper << "," << _ypaper << ")" << endl;
|
//cerr << " (xpaper,ypaper) = (" << _xpaper << "," << _ypaper << ")" << endl;
|
||||||
//cerr << " (w,h) = (" << w << "," << h << ")" << endl;
|
|
||||||
//cerr << " (dw,dh) = (" << _drawingWidth << "," << _drawingHeight << ")" << endl;
|
//cerr << " (dw,dh) = (" << _drawingWidth << "," << _drawingHeight << ")" << endl;
|
||||||
|
|
||||||
CellWidget::PainterCb_t cb = boost::bind( &CellPrinter::pageDecorate, this, _1 );
|
CellWidget::PainterCb_t cb = boost::bind( &CellPrinter::pageDecorate, this, _1 );
|
||||||
|
|
|
@ -992,6 +992,10 @@ namespace Hurricane {
|
||||||
clone->setRubberShape ( getRubberShape() );
|
clone->setRubberShape ( getRubberShape() );
|
||||||
clone->setTopLeft ( getTopLeft() );
|
clone->setTopLeft ( getTopLeft() );
|
||||||
|
|
||||||
|
for ( SelectorCriterion* criterion : _selection.getCriterions() ) {
|
||||||
|
clone->_selection.add( criterion->clone() );
|
||||||
|
}
|
||||||
|
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2476,6 +2480,7 @@ namespace Hurricane {
|
||||||
_drawingQuery .setStartLevel( _state->getStartLevel() );
|
_drawingQuery .setStartLevel( _state->getStartLevel() );
|
||||||
_drawingQuery .setStopLevel ( _state->getStopLevel() );
|
_drawingQuery .setStopLevel ( _state->getStopLevel() );
|
||||||
_textDrawingQuery.setCell ( getCell() );
|
_textDrawingQuery.setCell ( getCell() );
|
||||||
|
_state->getSelection().revalidate();
|
||||||
|
|
||||||
reframe();
|
reframe();
|
||||||
_state->setHistoryEnable( true );
|
_state->setHistoryEnable( true );
|
||||||
|
@ -2795,4 +2800,14 @@ namespace Hurricane {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string CellWidget::_getString () const
|
||||||
|
{
|
||||||
|
string s = "<CellWidget ";
|
||||||
|
if (getCell()) s += "\"" + getString(getCell()->getName()) + "\" ";
|
||||||
|
else s += "[NULL] ";
|
||||||
|
s += getString( (void*)this ) + ">";
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // End of Hurricane namespace.
|
} // End of Hurricane namespace.
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
// -*- C++ -*-
|
|
||||||
//
|
//
|
||||||
// This file is part of the Hurricane Software.
|
// This file is part of the Hurricane Software.
|
||||||
// Copyright (c) BULL S.A. 2000-2016, All Rights Reserved
|
// Copyright (c) BULL S.A. 2000-2016, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -18,10 +10,7 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./Selector.cpp" |
|
// | C++ Module : "./Selector.cpp" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include "hurricane/Error.h"
|
#include "hurricane/Error.h"
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -17,10 +11,7 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./SelectorCriterion.cpp" |
|
// | C++ Header : "./SelectorCriterion.cpp" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include "hurricane/viewer/CellWidget.h"
|
#include "hurricane/viewer/CellWidget.h"
|
||||||
|
@ -64,6 +55,10 @@ namespace Hurricane {
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
NetSelectorCriterion* NetSelectorCriterion::clone () const
|
||||||
|
{ return new NetSelectorCriterion(_net); }
|
||||||
|
|
||||||
|
|
||||||
const Net* NetSelectorCriterion::getNet () const
|
const Net* NetSelectorCriterion::getNet () const
|
||||||
{ return _net; }
|
{ return _net; }
|
||||||
|
|
||||||
|
@ -116,6 +111,10 @@ namespace Hurricane {
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
AreaSelectorCriterion* AreaSelectorCriterion::clone () const
|
||||||
|
{ return new AreaSelectorCriterion(_area); }
|
||||||
|
|
||||||
|
|
||||||
const Box& AreaSelectorCriterion::getArea () const
|
const Box& AreaSelectorCriterion::getArea () const
|
||||||
{ return _area; }
|
{ return _area; }
|
||||||
|
|
||||||
|
|
|
@ -305,6 +305,7 @@ namespace Hurricane {
|
||||||
void _goUp ( int dy );
|
void _goUp ( int dy );
|
||||||
void _goDown ( int dy );
|
void _goDown ( int dy );
|
||||||
void _refresh ();
|
void _refresh ();
|
||||||
|
std::string _getString () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Spot {
|
class Spot {
|
||||||
|
@ -523,16 +524,18 @@ namespace Hurricane {
|
||||||
private:
|
private:
|
||||||
class SelectorCriterions {
|
class SelectorCriterions {
|
||||||
public:
|
public:
|
||||||
SelectorCriterions ();
|
SelectorCriterions ();
|
||||||
~SelectorCriterions ();
|
~SelectorCriterions ();
|
||||||
inline void setCellWidget ( CellWidget* );
|
inline void setCellWidget ( CellWidget* );
|
||||||
SelectorCriterion* add ( const Net* net );
|
inline const vector<SelectorCriterion*>& getCriterions () const;
|
||||||
SelectorCriterion* add ( Box area );
|
SelectorCriterion* add ( const Net* net );
|
||||||
bool remove ( const Net* net );
|
SelectorCriterion* add ( Box area );
|
||||||
void clear ();
|
inline SelectorCriterion* add ( SelectorCriterion* );
|
||||||
void invalidate ();
|
bool remove ( const Net* net );
|
||||||
void revalidate ();
|
void clear ();
|
||||||
inline size_t size () const;
|
void invalidate ();
|
||||||
|
void revalidate ();
|
||||||
|
inline size_t size () const;
|
||||||
private:
|
private:
|
||||||
CellWidget* _cellWidget;
|
CellWidget* _cellWidget;
|
||||||
vector<SelectorCriterion*> _criterions;
|
vector<SelectorCriterion*> _criterions;
|
||||||
|
@ -885,6 +888,17 @@ namespace Hurricane {
|
||||||
{ return _criterions.size(); }
|
{ return _criterions.size(); }
|
||||||
|
|
||||||
|
|
||||||
|
inline const vector<SelectorCriterion*>& CellWidget::SelectorCriterions::getCriterions () const
|
||||||
|
{ return _criterions; }
|
||||||
|
|
||||||
|
|
||||||
|
inline SelectorCriterion* CellWidget::SelectorCriterions::add ( SelectorCriterion* criterion )
|
||||||
|
{
|
||||||
|
_criterions.push_back( criterion );
|
||||||
|
return _criterions.back();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline CellWidget::State::ScaleEntry::ScaleEntry ( float scale, const Point& topLeft )
|
inline CellWidget::State::ScaleEntry::ScaleEntry ( float scale, const Point& topLeft )
|
||||||
: _scale(scale), _topLeft(topLeft)
|
: _scale(scale), _topLeft(topLeft)
|
||||||
{ }
|
{ }
|
||||||
|
@ -1424,4 +1438,8 @@ namespace Hurricane {
|
||||||
} // End of Hurricane namespace.
|
} // End of Hurricane namespace.
|
||||||
|
|
||||||
|
|
||||||
#endif // __HURRICANE_CELL_WIDGET__
|
GETSTRING_POINTER_SUPPORT(Hurricane::CellWidget);
|
||||||
|
IOSTREAM_POINTER_SUPPORT(Hurricane::CellWidget);
|
||||||
|
|
||||||
|
|
||||||
|
#endif // HURRICANE_CELL_WIDGET
|
||||||
|
|
|
@ -1,31 +1,21 @@
|
||||||
|
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Hurricane Software.
|
// This file is part of the Hurricane Software.
|
||||||
// Copyright (c) BULL S.A. 2000-2016, All Rights Reserved
|
// Copyright (c) BULL S.A. 2000-2016, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Remy Escassut |
|
// | Author : Remy Escassut |
|
||||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./Selector.h" |
|
// | C++ Header : "./hurricane/viewer/Selector.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_SELECTOR__
|
#ifndef HURRICANE_SELECTOR_H
|
||||||
#define __HURRICANE_SELECTOR__
|
#define HURRICANE_SELECTOR_H
|
||||||
|
|
||||||
#include "hurricane/Property.h"
|
#include "hurricane/Property.h"
|
||||||
#include "hurricane/Selectors.h"
|
#include "hurricane/Selectors.h"
|
||||||
|
@ -80,7 +70,6 @@ namespace Hurricane {
|
||||||
typedef set<Selector*,SelectorLess> SelectorSet;
|
typedef set<Selector*,SelectorLess> SelectorSet;
|
||||||
|
|
||||||
|
|
||||||
} // End of Hurricane namespace.
|
} // Hurricane namespace.
|
||||||
|
|
||||||
|
#endif // HURRICANE_SELECTOR_H
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,59 +1,49 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Jean-Paul CHAPUT |
|
// | Author : Jean-Paul CHAPUT |
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./SelectorCriterion.h" |
|
// | C++ Header : "./hurricane/viewer/SelectorCriterion.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_SELECTOR_CRITERION__
|
#ifndef HURRICANE_SELECTOR_CRITERION_H
|
||||||
#define __HURRICANE_SELECTOR_CRITERION__
|
#define HURRICANE_SELECTOR_CRITERION_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
#include <string>
|
#include "hurricane/Commons.h"
|
||||||
#include "hurricane/Commons.h"
|
#include "hurricane/Name.h"
|
||||||
#include "hurricane/Name.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
class CellWidget;
|
class CellWidget;
|
||||||
|
|
||||||
|
|
||||||
class SelectorCriterion {
|
class SelectorCriterion {
|
||||||
public:
|
public:
|
||||||
inline SelectorCriterion ();
|
inline SelectorCriterion ();
|
||||||
virtual ~SelectorCriterion ();
|
virtual ~SelectorCriterion ();
|
||||||
virtual bool isValid ( CellWidget* ) const = 0;
|
virtual SelectorCriterion* clone () const = 0;
|
||||||
inline bool isEnabled () const;
|
virtual bool isValid ( CellWidget* ) const = 0;
|
||||||
virtual const Net* getNet () const;
|
inline bool isEnabled () const;
|
||||||
virtual const Box& getArea () const;
|
virtual const Net* getNet () const;
|
||||||
inline void enable ();
|
virtual const Box& getArea () const;
|
||||||
inline void disable ();
|
inline void enable ();
|
||||||
virtual void doSelection ( CellWidget* ) = 0;
|
inline void disable ();
|
||||||
virtual void undoSelection ( CellWidget* );
|
virtual void doSelection ( CellWidget* ) = 0;
|
||||||
virtual Record* _getRecord () const = 0;
|
virtual void undoSelection ( CellWidget* );
|
||||||
virtual string _getString () const = 0;
|
virtual Record* _getRecord () const = 0;
|
||||||
virtual string _getTypeName () const = 0;
|
virtual string _getString () const = 0;
|
||||||
|
virtual string _getTypeName () const = 0;
|
||||||
private:
|
private:
|
||||||
bool _isEnabled;
|
bool _isEnabled;
|
||||||
};
|
};
|
||||||
|
@ -67,15 +57,16 @@ namespace Hurricane {
|
||||||
|
|
||||||
class NetSelectorCriterion : public SelectorCriterion {
|
class NetSelectorCriterion : public SelectorCriterion {
|
||||||
public:
|
public:
|
||||||
NetSelectorCriterion ( const Net* );
|
NetSelectorCriterion ( const Net* );
|
||||||
virtual ~NetSelectorCriterion ();
|
virtual ~NetSelectorCriterion ();
|
||||||
virtual const Net* getNet () const;
|
virtual NetSelectorCriterion* clone () const;
|
||||||
virtual bool isValid ( CellWidget* ) const;
|
virtual const Net* getNet () const;
|
||||||
virtual void doSelection ( CellWidget* );
|
virtual bool isValid ( CellWidget* ) const;
|
||||||
virtual void undoSelection ( CellWidget* );
|
virtual void doSelection ( CellWidget* );
|
||||||
virtual Record* _getRecord () const;
|
virtual void undoSelection ( CellWidget* );
|
||||||
virtual string _getString () const;
|
virtual Record* _getRecord () const;
|
||||||
virtual string _getTypeName () const;
|
virtual string _getString () const;
|
||||||
|
virtual string _getTypeName () const;
|
||||||
protected:
|
protected:
|
||||||
const Net* _net;
|
const Net* _net;
|
||||||
const Name _name;
|
const Name _name;
|
||||||
|
@ -84,23 +75,23 @@ namespace Hurricane {
|
||||||
|
|
||||||
class AreaSelectorCriterion : public SelectorCriterion {
|
class AreaSelectorCriterion : public SelectorCriterion {
|
||||||
public:
|
public:
|
||||||
AreaSelectorCriterion ( const Box& );
|
AreaSelectorCriterion ( const Box& );
|
||||||
virtual ~AreaSelectorCriterion ();
|
virtual ~AreaSelectorCriterion ();
|
||||||
virtual const Box& getArea () const;
|
virtual AreaSelectorCriterion* clone () const;
|
||||||
virtual bool isValid ( CellWidget* ) const;
|
virtual const Box& getArea () const;
|
||||||
virtual void doSelection ( CellWidget* );
|
virtual bool isValid ( CellWidget* ) const;
|
||||||
virtual Record* _getRecord () const;
|
virtual void doSelection ( CellWidget* );
|
||||||
virtual string _getString () const;
|
virtual Record* _getRecord () const;
|
||||||
virtual string _getTypeName () const;
|
virtual string _getString () const;
|
||||||
|
virtual string _getTypeName () const;
|
||||||
protected:
|
protected:
|
||||||
const Box _area;
|
const Box _area;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
} // Hurricane namespace.
|
||||||
|
|
||||||
|
|
||||||
INSPECTOR_P_SUPPORT(Hurricane::SelectorCriterion);
|
INSPECTOR_P_SUPPORT(Hurricane::SelectorCriterion);
|
||||||
|
|
||||||
|
#endif // HURRICANE_SELECTOR_CRITERION_H
|
||||||
#endif // __HURRICANE_SELECTOR_CRITERION__
|
|
||||||
|
|
Loading…
Reference in New Issue