diff --git a/src/objectinspector/propertyItems/lrrectproptem.cpp b/src/objectinspector/propertyItems/lrrectproptem.cpp index 5335c9a..3fbe029 100644 --- a/src/objectinspector/propertyItems/lrrectproptem.cpp +++ b/src/objectinspector/propertyItems/lrrectproptem.cpp @@ -57,6 +57,11 @@ namespace{ namespace LimeReport{ +template QString rectToString(T rect) +{ + return QString("[%1,%2] %3x%4").arg(rect.x()).arg(rect.y()).arg(rect.width()).arg(rect.height()); +} + QRectF modifyRect(QRectF rect, const QString& name, qreal itemValue){ if (name=="x"){qreal width=rect.width(); rect.setX(itemValue);rect.setWidth(width);} @@ -93,10 +98,6 @@ QString LimeReport::RectPropItem::displayValue() const } } -template QString LimeReport::RectPropItem::rectToString(T rect) const -{ - return QString("[%1,%2] %3x%4").arg(rect.x()).arg(rect.y()).arg(rect.height()).arg(rect.width()); -} LimeReport::RectMMPropItem::RectMMPropItem(QObject *object, ObjectsList* objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem *parent, bool /*readonly*/): ObjectPropItem(object, objects, name, displayName, value,parent) @@ -133,8 +134,8 @@ QString LimeReport::RectMMPropItem::displayValue() const return QString("[%1,%2] %3x%4 mm") .arg(rect.x()/10,0,'f',2) .arg(rect.y()/10,0,'f',2) - .arg(rect.height()/10,0,'f',2) - .arg(rect.width()/10,0,'f',2); + .arg(rect.width()/10,0,'f',2) + .arg(rect.height()/10,0,'f',2); } LimeReport::RectMMValuePropItem::RectMMValuePropItem(QObject *object, ObjectsList* objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem *parent, bool readonly diff --git a/src/objectinspector/propertyItems/lrrectproptem.h b/src/objectinspector/propertyItems/lrrectproptem.h index b74ba75..64d8d78 100644 --- a/src/objectinspector/propertyItems/lrrectproptem.h +++ b/src/objectinspector/propertyItems/lrrectproptem.h @@ -41,7 +41,6 @@ public: RectPropItem():ObjectPropItem(){} RectPropItem(QObject *object, ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& value, ObjectPropItem* parent, bool readonly=true); QString displayValue() const; - template QString rectToString(T rect) const; }; class RectMMPropItem : public ObjectPropItem{