0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 16:44:39 +03:00

Printable property has been added to PageItem

This commit is contained in:
Arin Alex 2018-03-07 19:50:52 +03:00
parent 32d8581672
commit c406920206
2 changed files with 18 additions and 4 deletions

View File

@ -51,7 +51,7 @@ PageItemDesignIntf::PageItemDesignIntf(QObject *owner, QGraphicsItem *parent) :
m_pageOrientaion(Portrait), m_pageSize(A4), m_sizeChainging(false),
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_endlessHeight(false), m_printable(true)
{
setFixedPos(true);
setPossibleResizeDirectionFlags(Fixed);
@ -64,8 +64,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_endlessHeight(false)
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false), m_setPageSizeToPrinter(false),
m_endlessHeight(false), m_printable(true)
{
setFixedPos(true);
setPossibleResizeDirectionFlags(Fixed);
@ -333,6 +333,16 @@ void PageItemDesignIntf::initColumnsPos(QVector<qreal> &posByColumns, qreal pos,
}
}
bool PageItemDesignIntf::isPrintable() const
{
return m_printable;
}
void PageItemDesignIntf::setPrintable(bool printable)
{
m_printable = printable;
}
bool PageItemDesignIntf::endlessHeight() const
{
return m_endlessHeight;

View File

@ -58,7 +58,7 @@ class PageItemDesignIntf : public LimeReport::ItemsContainerDesignInft
Q_PROPERTY(bool pageIsTOC READ isTOC WRITE setIsTOC)
Q_PROPERTY(bool setPageSizeToPrinter READ getSetPageSizeToPrinter WRITE setSetPageSizeToPrinter )
Q_PROPERTY(bool endlessHeight READ endlessHeight WRITE setEndlessHeight)
Q_PROPERTY(bool printable READ isPrintable WRITE setPrintable)
friend class ReportRender;
public:
enum Orientation { Portrait, Landscape };
@ -138,6 +138,9 @@ public:
bool endlessHeight() const;
void setEndlessHeight(bool endlessHeight);
bool isPrintable() const;
void setPrintable(bool printable);
signals:
void beforeFirstPageRendered();
void afterLastPageRendered();
@ -175,6 +178,7 @@ private:
bool m_isTOC;
bool m_setPageSizeToPrinter;
bool m_endlessHeight;
bool m_printable;
};
typedef QList<PageItemDesignIntf::Ptr> ReportPages;