0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 08:34:38 +03:00

setItemWidth & setItemHeight invokable functions have been added to BaseDesignIntf

This commit is contained in:
Arin Alexander 2016-07-21 00:11:19 +03:00
parent 3edd101d52
commit c7b0a6d0e1
2 changed files with 15 additions and 0 deletions

View File

@ -176,6 +176,12 @@ void BaseDesignIntf::setWidth(qreal width)
updateItemAlign(); updateItemAlign();
} }
QString BaseDesignIntf::setItemWidth(qreal width)
{
setWidth(width * mmFactor());
return QString();
}
qreal BaseDesignIntf::height() const qreal BaseDesignIntf::height() const
{ {
return rect().height(); return rect().height();
@ -191,6 +197,12 @@ void BaseDesignIntf::setHeight(qreal height)
setGeometry(QRectF(rect().x(), rect().y(), rect().width(), 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 BaseDesignIntf::transformToSceneFont(const QFont& value) const
{ {
QFont f = value; QFont f = value;

View File

@ -248,6 +248,9 @@ public:
virtual bool canContainChildren(){ return false;} virtual bool canContainChildren(){ return false;}
ReportSettings* reportSettings() const; ReportSettings* reportSettings() const;
void setReportSettings(ReportSettings *reportSettings); void setReportSettings(ReportSettings *reportSettings);
Q_INVOKABLE QString setItemWidth(qreal width);
Q_INVOKABLE QString setItemHeight(qreal height);
protected: protected:
//ICollectionContainer //ICollectionContainer