mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 04:33:03 +03:00
startFromNewPage property has been added to Data band
This commit is contained in:
parent
54278cdb37
commit
d1f33e095b
@ -46,6 +46,7 @@ class DataBand : public DataBandDesignIntf
|
||||
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
|
||||
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection)
|
||||
Q_PROPERTY(bool startNewPage READ startNewPage WRITE setStartNewPage)
|
||||
Q_PROPERTY(bool startFromNewPage READ startFromNewPage WRITE setStartFromNewPage)
|
||||
public:
|
||||
DataBand(QObject* owner = 0, QGraphicsItem* parent=0);
|
||||
bool isUnique() const;
|
||||
|
@ -142,7 +142,8 @@ BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, Q
|
||||
m_columnIndex(0),
|
||||
m_columnsFillDirection(Horizontal),
|
||||
m_reprintOnEachPage(false),
|
||||
m_startNewPage(false)
|
||||
m_startNewPage(false),
|
||||
m_startFromNewPage(false)
|
||||
{
|
||||
setPosibleResizeDirectionFlags(ResizeBottom);
|
||||
setPosibleMoveFlags(TopBotom);
|
||||
@ -698,6 +699,16 @@ void BandDesignIntf::childBandDeleted(QObject *band)
|
||||
m_childBands.removeAt(m_childBands.indexOf(reinterpret_cast<BandDesignIntf*>(band)));
|
||||
}
|
||||
|
||||
bool BandDesignIntf::startFromNewPage() const
|
||||
{
|
||||
return m_startFromNewPage;
|
||||
}
|
||||
|
||||
void BandDesignIntf::setStartFromNewPage(bool startWithNewPage)
|
||||
{
|
||||
m_startFromNewPage = startWithNewPage;
|
||||
}
|
||||
|
||||
bool BandDesignIntf::startNewPage() const
|
||||
{
|
||||
return m_startNewPage;
|
||||
|
@ -206,6 +206,9 @@ public:
|
||||
void setAutoHeight(bool value){m_autoHeight=value;}
|
||||
bool autoHeight(){return m_autoHeight;}
|
||||
|
||||
bool startFromNewPage() const;
|
||||
void setStartFromNewPage(bool startFromNewPage);
|
||||
|
||||
signals:
|
||||
void bandRendered(BandDesignIntf* band);
|
||||
protected:
|
||||
@ -256,6 +259,7 @@ private:
|
||||
BandColumnsLayoutType m_columnsFillDirection;
|
||||
bool m_reprintOnEachPage;
|
||||
bool m_startNewPage;
|
||||
bool m_startFromNewPage;
|
||||
};
|
||||
|
||||
class DataBandDesignIntf : public BandDesignIntf{
|
||||
|
@ -381,7 +381,8 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
||||
|
||||
while(!bandDatasource->eof() && !m_renderCanceled){
|
||||
|
||||
if (!firstTime && dataBand->startNewPage()) {
|
||||
if ((firstTime && dataBand->startFromNewPage()) ||
|
||||
(!firstTime && dataBand->startNewPage())) {
|
||||
savePage();
|
||||
startNewPage();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user