Some style cleanup to libglabels.
This commit is contained in:
@@ -29,6 +29,37 @@
|
||||
namespace libglabels
|
||||
{
|
||||
|
||||
FrameRound::FrameRound( double r, double waste, QString id )
|
||||
: mR(r), mWaste(waste), Frame(id)
|
||||
{
|
||||
mPath.addEllipse( 0, 0, 2*mR, 2*mR );
|
||||
}
|
||||
|
||||
|
||||
FrameRound::FrameRound( const FrameRound& other )
|
||||
: mR(other.mR), mWaste(other.mWaste), mPath(other.mPath), Frame(other)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Frame* FrameRound::dup() const
|
||||
{
|
||||
return new FrameRound( *this );
|
||||
}
|
||||
|
||||
|
||||
double FrameRound::w() const
|
||||
{
|
||||
return 2*mR;
|
||||
}
|
||||
|
||||
|
||||
double FrameRound::h() const
|
||||
{
|
||||
return 2*mR;
|
||||
}
|
||||
|
||||
|
||||
const QString FrameRound::sizeDescription( const Units *units ) const
|
||||
{
|
||||
if ( units->id() == "in" )
|
||||
@@ -63,6 +94,12 @@ namespace libglabels
|
||||
}
|
||||
|
||||
|
||||
const QPainterPath& FrameRound::path( bool isRotated ) const
|
||||
{
|
||||
return mPath;
|
||||
}
|
||||
|
||||
|
||||
QGraphicsItem* FrameRound::createMarginGraphicsItem( double size, const QPen& pen ) const
|
||||
{
|
||||
double r = mR - size;
|
||||
|
||||
Reference in New Issue
Block a user