From 22f2a47f9994e4eba55b61d9836d4612166de323 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 27 Apr 2010 10:54:26 +0000 Subject: [PATCH] * ./hurricane: - Bug: In CellWidget, correct the slightly off position of Labels references. --- hurricane/src/viewer/CellWidget.cpp | 11 ++++++++--- .../src/viewer/hurricane/viewer/CellWidget.h | 17 +++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/hurricane/src/viewer/CellWidget.cpp b/hurricane/src/viewer/CellWidget.cpp index 21016e26..0357f900 100644 --- a/hurricane/src/viewer/CellWidget.cpp +++ b/hurricane/src/viewer/CellWidget.cpp @@ -866,7 +866,7 @@ namespace Hurricane { Box bb = transformation.getBox ( reference->getBoundingBox() ); rectangle = _cellWidget->dbuToDisplayRect ( bb ); - rectangle.adjust ( 10, 10, 10, 10 ); + //rectangle.adjust ( 10, 10, 10, 10 ); if ( reference->getType() == Reference::Position ) { QPoint point = _cellWidget->dbuToDisplayPoint ( reference->getPoint() ); @@ -874,7 +874,7 @@ namespace Hurricane { flags |= Left; } else { - flags |= Center; + flags |= Center/*|Rounded*/; } const char* refName = reference->getName()._getSharedName()->_getSString().c_str(); @@ -1716,7 +1716,12 @@ namespace Hurricane { } else if ( flags & Left ) { } - if ( flags & Frame ) painter.drawRect ( bottomLeft.x()-1, bottomLeft.y()-height, width+2, height ); + 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 ); + } painter.drawText ( bottomLeft.x(), bottomLeft.y()-metrics.descent(), text ); painter.restore (); diff --git a/hurricane/src/viewer/hurricane/viewer/CellWidget.h b/hurricane/src/viewer/hurricane/viewer/CellWidget.h index e247072b..7f79afda 100644 --- a/hurricane/src/viewer/hurricane/viewer/CellWidget.h +++ b/hurricane/src/viewer/hurricane/viewer/CellWidget.h @@ -112,14 +112,15 @@ namespace Hurricane { ); typedef void ( InitExtensionGo_t )( CellWidget* ); enum RubberShape { Centric=1, Barycentric, Steiner }; - enum TextFlag { Bold =0x01 - , BigFont=0x02 - , Reverse=0x04 - , Frame =0x08 - , Center =0x10 - , Left =0x20 - , Right =0x40 - , Top =0x80 + enum TextFlag { Bold =0x001 + , BigFont =0x002 + , Reverse =0x004 + , Frame =0x008 + , Rounded =0x010 + , Center =0x020 + , Left =0x040 + , Right =0x080 + , Top =0x100 }; public: // Constructor & Destructor.