mirror of
https://github.com/fralx/LimeReport.git
synced 2025-09-23 08:29:07 +03:00
Band popup menu fixed
This commit is contained in:
@@ -99,6 +99,16 @@ void DataBand::preparePopUpMenu(QMenu &menu)
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(sliceLastRow());
|
||||
|
||||
currAction = menu.addAction(tr("Start from new page"));
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(startFromNewPage());
|
||||
|
||||
currAction = menu.addAction(tr("Start new page"));
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(startNewPage());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void DataBand::processPopUpAction(QAction *action)
|
||||
@@ -116,6 +126,14 @@ void DataBand::processPopUpAction(QAction *action)
|
||||
setProperty("sliceLastRow",action->isChecked());
|
||||
}
|
||||
|
||||
if (action->text().compare(tr("Start new page")) == 0){
|
||||
setProperty("startNewPage",action->isChecked());
|
||||
}
|
||||
|
||||
if (action->text().compare(tr("Start from new page")) == 0){
|
||||
setProperty("startFromNewPage",action->isChecked());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BaseDesignIntf *DataBand::createSameTypeItem(QObject *owner, QGraphicsItem *parent)
|
||||
@@ -150,7 +168,7 @@ void DataHeaderBand::processPopUpAction(QAction *action)
|
||||
{
|
||||
BandDesignIntf::processPopUpAction(action);
|
||||
if (action->text().compare(tr("Reprint on each page")) == 0){
|
||||
setProperty("repeatOnEachPage",action->isChecked());
|
||||
setProperty("reprintOnEachPage",action->isChecked());
|
||||
}
|
||||
|
||||
if (action->text().compare(tr("Repeat on each row")) == 0){
|
||||
|
@@ -428,7 +428,11 @@ bool BandDesignIntf::isNeedRender() const
|
||||
|
||||
void BandDesignIntf::setTryToKeepTogether(bool value)
|
||||
{
|
||||
m_tryToKeepTogether=value;
|
||||
if (m_tryToKeepTogether != value){
|
||||
m_tryToKeepTogether = value;
|
||||
if (!isLoading())
|
||||
notify("keepSubdetailTogether", !value, value);
|
||||
}
|
||||
}
|
||||
|
||||
bool BandDesignIntf::tryToKeepTogether()
|
||||
@@ -497,6 +501,7 @@ void BandDesignIntf::preparePopUpMenu(QMenu &menu)
|
||||
currAction->setChecked(autoHeight());
|
||||
|
||||
currAction = menu.addAction(tr("Splittable"));
|
||||
currAction->setEnabled(metaObject()->indexOfProperty("splittable") != -1);
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(isSplittable());
|
||||
|
||||
@@ -504,13 +509,10 @@ void BandDesignIntf::preparePopUpMenu(QMenu &menu)
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(keepBottomSpaceOption());
|
||||
|
||||
currAction = menu.addAction(tr("Start from new page"));
|
||||
currAction = menu.addAction(tr("Print if empty"));
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(startFromNewPage());
|
||||
currAction->setChecked(printIfEmpty());
|
||||
|
||||
currAction = menu.addAction(tr("Start new page"));
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(startNewPage());
|
||||
}
|
||||
|
||||
void BandDesignIntf::processPopUpAction(QAction *action)
|
||||
@@ -524,12 +526,10 @@ void BandDesignIntf::processPopUpAction(QAction *action)
|
||||
if (action->text().compare(tr("Keep bottom space")) == 0){
|
||||
setProperty("keepBottomSpace",action->isChecked());
|
||||
}
|
||||
if (action->text().compare(tr("Start new page")) == 0){
|
||||
setProperty("startNewPage",action->isChecked());
|
||||
}
|
||||
if (action->text().compare(tr("Start from new page")) == 0){
|
||||
setProperty("startFromNewPage",action->isChecked());
|
||||
if (action->text().compare(tr("Print if empty")) == 0){
|
||||
setProperty("printIfEmpty",action->isChecked());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGraphicsItem *parent)
|
||||
@@ -798,7 +798,11 @@ bool BandDesignIntf::repeatOnEachRow() const
|
||||
|
||||
void BandDesignIntf::setRepeatOnEachRow(bool repeatOnEachRow)
|
||||
{
|
||||
m_repeatOnEachRow = repeatOnEachRow;
|
||||
if (m_repeatOnEachRow != repeatOnEachRow){
|
||||
m_repeatOnEachRow = repeatOnEachRow;
|
||||
if (!isLoading())
|
||||
notify("repeatOnEachRow", !m_repeatOnEachRow, m_repeatOnEachRow);
|
||||
}
|
||||
}
|
||||
|
||||
bool BandDesignIntf::printAlways() const
|
||||
@@ -808,7 +812,11 @@ bool BandDesignIntf::printAlways() const
|
||||
|
||||
void BandDesignIntf::setPrintAlways(bool printAlways)
|
||||
{
|
||||
m_printAlways = printAlways;
|
||||
if (m_printAlways != printAlways){
|
||||
m_printAlways = printAlways;
|
||||
if (!isLoading())
|
||||
notify("printAlways", !m_printAlways, m_printAlways);
|
||||
}
|
||||
}
|
||||
|
||||
bool BandDesignIntf::startFromNewPage() const
|
||||
@@ -854,7 +862,11 @@ bool BandDesignIntf::reprintOnEachPage() const
|
||||
|
||||
void BandDesignIntf::setReprintOnEachPage(bool reprintOnEachPage)
|
||||
{
|
||||
m_reprintOnEachPage = reprintOnEachPage;
|
||||
if (m_reprintOnEachPage != reprintOnEachPage){
|
||||
m_reprintOnEachPage = reprintOnEachPage;
|
||||
if (!isLoading())
|
||||
notify("reprintOnEachPage", !m_reprintOnEachPage, m_reprintOnEachPage);
|
||||
}
|
||||
}
|
||||
|
||||
int BandDesignIntf::columnIndex() const
|
||||
@@ -874,7 +886,12 @@ bool BandDesignIntf::printIfEmpty() const
|
||||
|
||||
void BandDesignIntf::setPrintIfEmpty(bool printIfEmpty)
|
||||
{
|
||||
m_printIfEmpty = printIfEmpty;
|
||||
if (m_printIfEmpty != printIfEmpty){
|
||||
m_printIfEmpty = printIfEmpty;
|
||||
if (!isLoading())
|
||||
notify("printIfEmpty", !m_printIfEmpty, m_printIfEmpty);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BandDesignIntf *BandDesignIntf::bandHeader()
|
||||
@@ -903,7 +920,11 @@ bool BandDesignIntf::sliceLastRow() const
|
||||
|
||||
void BandDesignIntf::setSliceLastRow(bool sliceLastRow)
|
||||
{
|
||||
m_sliceLastRow = sliceLastRow;
|
||||
if (m_sliceLastRow != sliceLastRow){
|
||||
m_sliceLastRow = sliceLastRow;
|
||||
if (!isLoading())
|
||||
notify("sliceLastRow", !sliceLastRow, sliceLastRow);
|
||||
}
|
||||
}
|
||||
|
||||
int BandDesignIntf::maxScalePercent() const
|
||||
|
Reference in New Issue
Block a user