String Mode in DbU can now be set

There was no drawing for pads in CellWidget
This commit is contained in:
Christophe Alexandre 2008-06-15 17:04:50 +00:00
parent 2f31e8ef3d
commit 4deb80c3c7
4 changed files with 27 additions and 10 deletions

View File

@ -91,8 +91,6 @@ namespace Hurricane {
{ return _realsPerLambda; } { return _realsPerLambda; }
void DbU::setStringMode ( unsigned int mode )
{ _stringMode = mode; }

View File

@ -68,7 +68,7 @@ namespace Hurricane {
static inline double getReal ( Unit u ); static inline double getReal ( Unit u );
static inline double getLambda ( Unit u ); static inline double getLambda ( Unit u );
static string getValueString ( Unit u ); static string getValueString ( Unit u );
inline void setStringMode ( unsigned int mode ); static inline void setStringMode ( unsigned int mode );
public: public:
// Static Attributes: constants. // Static Attributes: constants.
@ -91,6 +91,7 @@ namespace Hurricane {
inline long DbU::getDb ( DbU::Unit u ) { return u; } inline long DbU::getDb ( DbU::Unit u ) { return u; }
inline double DbU::getReal ( DbU::Unit u ) { return _resolution*(double)u; } inline double DbU::getReal ( DbU::Unit u ) { return _resolution*(double)u; }
inline double DbU::getLambda ( DbU::Unit u ) { return getReal(u)/_realsPerLambda; } inline double DbU::getLambda ( DbU::Unit u ) { return getReal(u)/_realsPerLambda; }
inline void DbU::setStringMode ( unsigned int mode ) { _stringMode = mode; }
} // End of Hurricane namespace. } // End of Hurricane namespace.

View File

@ -17,6 +17,7 @@
# include "hurricane/Slice.h" # include "hurricane/Slice.h"
# include "hurricane/Segment.h" # include "hurricane/Segment.h"
# include "hurricane/Contact.h" # include "hurricane/Contact.h"
# include "hurricane/Pad.h"
# include "hurricane/viewer/Graphics.h" # include "hurricane/viewer/Graphics.h"
# include "hurricane/viewer/PaletteEntry.h" # include "hurricane/viewer/PaletteEntry.h"
@ -130,7 +131,7 @@ void CellWidget::redraw ( QRect redrawArea )
update (); update ();
popCursor (); popCursor ();
cerr << "Redrawed rectangles: " << _redrawRectCount << endl; //cerr << "Redrawed rectangles: " << _redrawRectCount << endl;
} }
@ -237,6 +238,12 @@ void CellWidget::drawGo ( const Go* go
drawContact ( contact, basicLayer, redrawArea, transformation ); drawContact ( contact, basicLayer, redrawArea, transformation );
return; return;
} }
const Pad* pad = dynamic_cast<const Pad*>(go);
if (pad) {
drawPad ( pad, basicLayer, redrawArea, transformation );
return;
}
} }
@ -264,6 +271,15 @@ void CellWidget::drawContact ( const Contact* contact
drawBox ( transformation.getBox(contact->getBoundingBox(basicLayer)) ); drawBox ( transformation.getBox(contact->getBoundingBox(basicLayer)) );
} }
void CellWidget::drawPad ( const Pad* pad
, const BasicLayer* basicLayer
, const Box& redrawArea
, const Transformation& transformation
)
{
drawBox ( transformation.getBox(pad->getBoundingBox(basicLayer)) );
}
void CellWidget::drawBox ( const Box& box ) void CellWidget::drawBox ( const Box& box )
{ {

View File

@ -41,6 +41,7 @@ namespace Hurricane {
class Slice; class Slice;
class Segment; class Segment;
class Contact; class Contact;
class Pad;
class PaletteEntry; class PaletteEntry;
class Palette; class Palette;
@ -127,6 +128,7 @@ namespace Hurricane {
void drawGo ( const Go* , const BasicLayer*, const Box&, const Transformation& ); void drawGo ( const Go* , const BasicLayer*, const Box&, const Transformation& );
void drawSegment ( const Segment* , const BasicLayer*, const Box&, const Transformation& ); void drawSegment ( const Segment* , const BasicLayer*, const Box&, const Transformation& );
void drawContact ( const Contact* , const BasicLayer*, const Box&, const Transformation& ); void drawContact ( const Contact* , const BasicLayer*, const Box&, const Transformation& );
void drawPad ( const Pad* , const BasicLayer*, const Box&, const Transformation& );
void drawBox ( const Box& ); void drawBox ( const Box& );
void drawLine ( const Point&, const Point& ); void drawLine ( const Point&, const Point& );