0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-20 06:30:03 +03:00

notPrintIfEmpty has been added to page item

This commit is contained in:
Arin Alexander
2020-10-01 02:13:28 +03:00
parent 22ab25d6c6
commit 4bbc85b79e
3 changed files with 34 additions and 6 deletions

View File

@@ -52,7 +52,8 @@ PageItemDesignIntf::PageItemDesignIntf(QObject *owner, QGraphicsItem *parent) :
m_fullPage(false), m_oldPrintMode(false), m_resetPageNumber(false),
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false),
m_setPageSizeToPrinter(false), m_endlessHeight(false), m_printable(true),
m_pageFooter(0), m_printBehavior(Split), m_dropPrinterMargins(false)
m_pageFooter(0), m_printBehavior(Split), m_dropPrinterMargins(false),
m_notPrintIfEmpty(false)
{
setFixedPos(true);
setPossibleResizeDirectionFlags(Fixed);
@@ -67,7 +68,8 @@ PageItemDesignIntf::PageItemDesignIntf(const PageSize pageSize, const QRectF &re
m_fullPage(false), m_oldPrintMode(false), m_resetPageNumber(false),
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false),
m_setPageSizeToPrinter(false), m_endlessHeight(false), m_printable(true),
m_pageFooter(0), m_printBehavior(Split), m_dropPrinterMargins(false)
m_pageFooter(0), m_printBehavior(Split), m_dropPrinterMargins(false),
m_notPrintIfEmpty(false)
{
setFixedPos(true);
setPossibleResizeDirectionFlags(Fixed);
@@ -348,6 +350,16 @@ void PageItemDesignIntf::initColumnsPos(QVector<qreal> &posByColumns, qreal pos,
}
}
bool PageItemDesignIntf::notPrintIfEmpty() const
{
return m_notPrintIfEmpty;
}
void PageItemDesignIntf::setNotPrintIfEmpty(bool notPrintIfEmpty)
{
m_notPrintIfEmpty = notPrintIfEmpty;
}
bool PageItemDesignIntf::dropPrinterMargins() const
{
return m_dropPrinterMargins;
@@ -358,6 +370,11 @@ void PageItemDesignIntf::setDropPrinterMargins(bool dropPrinterMargins)
m_dropPrinterMargins = dropPrinterMargins;
}
bool PageItemDesignIntf::isEmpty() const
{
return childBaseItems().isEmpty();
}
void PageItemDesignIntf::setPrintBehavior(const PrintBehavior &printBehavior)
{
m_printBehavior = printBehavior;