mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 16:44:39 +03:00
enndlessHeight added
This commit is contained in:
parent
23641333da
commit
c42d87b146
@ -63,7 +63,8 @@ PageItemDesignIntf::PageItemDesignIntf(const PageSize pageSize, const QRectF &re
|
||||
m_topMargin(0), m_bottomMargin(0), m_leftMargin(0), m_rightMargin(0),
|
||||
m_pageOrientaion(Portrait), m_pageSize(pageSize), m_sizeChainging(false),
|
||||
m_fullPage(false), m_oldPrintMode(false), m_resetPageNumber(false),
|
||||
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false)
|
||||
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false),
|
||||
m_endlessHeight(false)
|
||||
{
|
||||
setFixedPos(true);
|
||||
setPossibleResizeDirectionFlags(Fixed);
|
||||
@ -331,6 +332,16 @@ void PageItemDesignIntf::initColumnsPos(QVector<qreal> &posByColumns, qreal pos,
|
||||
}
|
||||
}
|
||||
|
||||
bool PageItemDesignIntf::endlessHeight() const
|
||||
{
|
||||
return m_endlessHeight;
|
||||
}
|
||||
|
||||
void PageItemDesignIntf::setEndlessHeight(bool endlessPage)
|
||||
{
|
||||
m_endlessHeight = endlessPage;
|
||||
}
|
||||
|
||||
bool PageItemDesignIntf::getSetPageSizeToPrinter() const
|
||||
{
|
||||
return m_setPageSizeToPrinter;
|
||||
|
@ -57,6 +57,8 @@ class PageItemDesignIntf : public LimeReport::ItemsContainerDesignInft
|
||||
Q_PROPERTY(int extendedHeight READ extendedHeight WRITE setExtendedHeight)
|
||||
Q_PROPERTY(bool pageIsTOC READ isTOC WRITE setIsTOC)
|
||||
Q_PROPERTY(bool setPageSizeToPrinter READ getSetPageSizeToPrinter WRITE setSetPageSizeToPrinter )
|
||||
Q_PROPERTY(bool endlessHeight READ endlessHeight WRITE setEndlessHeight)
|
||||
|
||||
friend class ReportRender;
|
||||
public:
|
||||
enum Orientation { Portrait, Landscape };
|
||||
@ -133,6 +135,9 @@ public:
|
||||
bool getSetPageSizeToPrinter() const;
|
||||
void setSetPageSizeToPrinter(bool setPageSizeToPrinter);
|
||||
|
||||
bool endlessHeight() const;
|
||||
void setEndlessHeight(bool endlessHeight);
|
||||
|
||||
signals:
|
||||
void beforeFirstPageRendered();
|
||||
void afterLastPageRendered();
|
||||
@ -169,6 +174,7 @@ private:
|
||||
int m_extendedHeight;
|
||||
bool m_isTOC;
|
||||
bool m_setPageSizeToPrinter;
|
||||
bool m_endlessHeight;
|
||||
};
|
||||
|
||||
typedef QList<PageItemDesignIntf::Ptr> ReportPages;
|
||||
|
@ -949,7 +949,7 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
|
||||
|
||||
}
|
||||
|
||||
if (band->height() <= m_maxHeightByColumn[m_currentColumn]){
|
||||
if (band->height() <= m_maxHeightByColumn[m_currentColumn] || m_patternPageItem->endlessHeight()){
|
||||
|
||||
if (band->bandType()==BandDesignIntf::PageFooter){
|
||||
for (int i=0;i<m_maxHeightByColumn.size();++i)
|
||||
@ -1372,7 +1372,13 @@ void ReportRender::savePage(bool isLast)
|
||||
m_scriptEngineContext->setCurrentPage(m_renderPageItem);
|
||||
emit m_patternPageItem->afterRender();
|
||||
if (isLast) emit m_patternPageItem->afterLastPageRendered();
|
||||
|
||||
if (isLast && m_patternPageItem->endlessHeight()){
|
||||
qreal pageHeight = 0;
|
||||
foreach (BandDesignIntf* band, m_renderPageItem->bands()) {
|
||||
pageHeight += band->height();
|
||||
}
|
||||
m_renderPageItem->setHeight(pageHeight+10+(m_patternPageItem->topMargin()+m_patternPageItem->bottomMargin())*Const::mmFACTOR);
|
||||
}
|
||||
}
|
||||
|
||||
QString ReportRender::toString()
|
||||
|
Loading…
Reference in New Issue
Block a user