From c7b0a6d0e1af4279a88697b8726a4e053a49f41f Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 21 Jul 2016 00:11:19 +0300 Subject: [PATCH] setItemWidth & setItemHeight invokable functions have been added to BaseDesignIntf --- limereport/lrbasedesignintf.cpp | 12 ++++++++++++ limereport/lrbasedesignintf.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 1a9f47b..5353440 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -176,6 +176,12 @@ void BaseDesignIntf::setWidth(qreal width) updateItemAlign(); } +QString BaseDesignIntf::setItemWidth(qreal width) +{ + setWidth(width * mmFactor()); + return QString(); +} + qreal BaseDesignIntf::height() const { return rect().height(); @@ -191,6 +197,12 @@ void BaseDesignIntf::setHeight(qreal height) setGeometry(QRectF(rect().x(), rect().y(), rect().width(), height)); } +QString BaseDesignIntf::setItemHeight(qreal height) +{ + setHeight(height * mmFactor()); + return QString(); +} + QFont BaseDesignIntf::transformToSceneFont(const QFont& value) const { QFont f = value; diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 440a53e..bb93d23 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -248,6 +248,9 @@ public: virtual bool canContainChildren(){ return false;} ReportSettings* reportSettings() const; void setReportSettings(ReportSettings *reportSettings); + + Q_INVOKABLE QString setItemWidth(qreal width); + Q_INVOKABLE QString setItemHeight(qreal height); protected: //ICollectionContainer