0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00

Width and height have been swapped

This commit is contained in:
Arin Alexander 2016-02-18 23:50:54 +03:00
parent 8c32925b85
commit 699d58cec7
2 changed files with 7 additions and 7 deletions

View File

@ -57,6 +57,11 @@ namespace{
namespace LimeReport{
template<class T> 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<class T> 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

View File

@ -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<class T> QString rectToString(T rect) const;
};
class RectMMPropItem : public ObjectPropItem{