String Mode in DbU can now be set
There was no drawing for pads in CellWidget
This commit is contained in:
parent
2f31e8ef3d
commit
4deb80c3c7
|
@ -91,8 +91,6 @@ namespace Hurricane {
|
||||||
{ return _realsPerLambda; }
|
{ return _realsPerLambda; }
|
||||||
|
|
||||||
|
|
||||||
void DbU::setStringMode ( unsigned int mode )
|
|
||||||
{ _stringMode = mode; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
@ -85,12 +85,13 @@ namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
// Inline Functions.
|
// Inline Functions.
|
||||||
inline DbU::Unit DbU::db ( long value ) { return value; }
|
inline DbU::Unit DbU::db ( long value ) { return value; }
|
||||||
inline DbU::Unit DbU::real ( double value ) { return (long)rint( value/_resolution ); }
|
inline DbU::Unit DbU::real ( double value ) { return (long)rint( value/_resolution ); }
|
||||||
inline DbU::Unit DbU::lambda ( double value ) { return real(value*_realsPerLambda); }
|
inline DbU::Unit DbU::lambda ( double value ) { return real(value*_realsPerLambda); }
|
||||||
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.
|
||||||
|
|
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -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& );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue