mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 00:33:02 +03:00
Width and height have been swapped
This commit is contained in:
parent
8c32925b85
commit
699d58cec7
@ -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
|
||||
|
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user