mirror of
https://github.com/fralx/LimeReport.git
synced 2025-01-12 09:31:04 +03:00
repeatOnEachRow property has been added to DataHeader
This commit is contained in:
parent
77f6129c1f
commit
8e632855b4
@ -63,6 +63,7 @@ class DataHeaderBand : public BandDesignIntf
|
|||||||
Q_PROPERTY(bool reprintOnEachPage READ reprintOnEachPage WRITE setReprintOnEachPage)
|
Q_PROPERTY(bool reprintOnEachPage READ reprintOnEachPage WRITE setReprintOnEachPage)
|
||||||
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
|
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
|
||||||
Q_PROPERTY(bool printAlways READ printAlways() WRITE setPrintAlways())
|
Q_PROPERTY(bool printAlways READ printAlways() WRITE setPrintAlways())
|
||||||
|
Q_PROPERTY(bool repeatOnEachRow READ repeatOnEachRow WRITE setRepeatOnEachRow)
|
||||||
public:
|
public:
|
||||||
DataHeaderBand(QObject* owner=0, QGraphicsItem* parent=0);
|
DataHeaderBand(QObject* owner=0, QGraphicsItem* parent=0);
|
||||||
bool isUnique() const {return false;}
|
bool isUnique() const {return false;}
|
||||||
|
@ -144,7 +144,8 @@ BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, Q
|
|||||||
m_reprintOnEachPage(false),
|
m_reprintOnEachPage(false),
|
||||||
m_startNewPage(false),
|
m_startNewPage(false),
|
||||||
m_startFromNewPage(false),
|
m_startFromNewPage(false),
|
||||||
m_printAlways(false)
|
m_printAlways(false),
|
||||||
|
m_repeatOnEachRow(false)
|
||||||
{
|
{
|
||||||
setPosibleResizeDirectionFlags(ResizeBottom);
|
setPosibleResizeDirectionFlags(ResizeBottom);
|
||||||
setPosibleMoveFlags(TopBotom);
|
setPosibleMoveFlags(TopBotom);
|
||||||
@ -718,6 +719,16 @@ void BandDesignIntf::childBandDeleted(QObject *band)
|
|||||||
m_childBands.removeAt(m_childBands.indexOf(reinterpret_cast<BandDesignIntf*>(band)));
|
m_childBands.removeAt(m_childBands.indexOf(reinterpret_cast<BandDesignIntf*>(band)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BandDesignIntf::repeatOnEachRow() const
|
||||||
|
{
|
||||||
|
return m_repeatOnEachRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BandDesignIntf::setRepeatOnEachRow(bool repeatOnEachRow)
|
||||||
|
{
|
||||||
|
m_repeatOnEachRow = repeatOnEachRow;
|
||||||
|
}
|
||||||
|
|
||||||
bool BandDesignIntf::printAlways() const
|
bool BandDesignIntf::printAlways() const
|
||||||
{
|
{
|
||||||
return m_printAlways;
|
return m_printAlways;
|
||||||
|
@ -213,7 +213,8 @@ public:
|
|||||||
bool canContainChildren(){ return true;}
|
bool canContainChildren(){ return true;}
|
||||||
bool printAlways() const;
|
bool printAlways() const;
|
||||||
void setPrintAlways(bool printAlways);
|
void setPrintAlways(bool printAlways);
|
||||||
|
bool repeatOnEachRow() const;
|
||||||
|
void setRepeatOnEachRow(bool repeatOnEachRow);
|
||||||
signals:
|
signals:
|
||||||
void bandRendered(BandDesignIntf* band);
|
void bandRendered(BandDesignIntf* band);
|
||||||
protected:
|
protected:
|
||||||
@ -266,6 +267,7 @@ private:
|
|||||||
bool m_startNewPage;
|
bool m_startNewPage;
|
||||||
bool m_startFromNewPage;
|
bool m_startFromNewPage;
|
||||||
bool m_printAlways;
|
bool m_printAlways;
|
||||||
|
bool m_repeatOnEachRow;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DataBandDesignIntf : public BandDesignIntf{
|
class DataBandDesignIntf : public BandDesignIntf{
|
||||||
|
@ -401,6 +401,9 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
|||||||
datasources()->updateChildrenData(dataBand->datasourceName());
|
datasources()->updateChildrenData(dataBand->datasourceName());
|
||||||
m_lastDataBand = dataBand;
|
m_lastDataBand = dataBand;
|
||||||
|
|
||||||
|
if (header && !firstTime && header->repeatOnEachRow())
|
||||||
|
renderBand(header,StartNewPageAsNeeded);
|
||||||
|
|
||||||
renderBand(dataBand,StartNewPageAsNeeded,!bandDatasource->hasNext());
|
renderBand(dataBand,StartNewPageAsNeeded,!bandDatasource->hasNext());
|
||||||
renderChildBands(dataBand);
|
renderChildBands(dataBand);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user