Some style cleanup to libglabels.

This commit is contained in:
Jim Evins
2015-08-11 17:18:49 -04:00
parent de8ec9b66a
commit 0ad6caeeca
46 changed files with 1294 additions and 380 deletions
+37
View File
@@ -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;