From 1e0cc1b44dc45a7aa7fc0597670283be41f83a67 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 20 Jun 2018 16:52:54 +0300 Subject: [PATCH] Build fixed --- limereport/bands/lrdataband.cpp | 28 ++++++++++------------------ limereport/bands/lrdataband.h | 2 -- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/limereport/bands/lrdataband.cpp b/limereport/bands/lrdataband.cpp index c9e809d..058ddc5 100644 --- a/limereport/bands/lrdataband.cpp +++ b/limereport/bands/lrdataband.cpp @@ -79,23 +79,6 @@ bool DataBand::isUnique() const return false; } -void DataBand::preparePopUpMenu(QMenu &menu) -{ - DataBandDesignIntf::preparePopUpMenu(menu); - - QAction* autoSplittableAction = menu.addAction(tr("Use alternate background color")); - autoSplittableAction->setCheckable(true); - autoSplittableAction->setChecked(useAlternateBackgroundColor()); -} - -void DataBand::processPopUpAction(QAction *action) -{ - DataBandDesignIntf::processPopUpAction(action); - if (action->text().compare(tr("Use alternate background color")) == 0){ - setProperty("useAlternateBackgroundColor",action->isChecked()); - } -} - QColor DataBand::bandColor() const { return QColor(Qt::darkGreen); @@ -104,7 +87,12 @@ QColor DataBand::bandColor() const void DataBand::preparePopUpMenu(QMenu &menu) { BandDesignIntf::preparePopUpMenu(menu); - QAction* currAction = menu.addAction(tr("Keep footer together")); + + QAction* currAction = menu.addAction(tr("Use alternate background color")); + currAction->setCheckable(true); + currAction->setChecked(useAlternateBackgroundColor()); + + currAction = menu.addAction(tr("Keep footer together")); currAction->setCheckable(true); currAction->setChecked(keepFooterTogether()); @@ -133,6 +121,10 @@ void DataBand::processPopUpAction(QAction *action) setProperty("sliceLastRow",action->isChecked()); } + if (action->text().compare(tr("Use alternate background color")) == 0){ + setProperty("useAlternateBackgroundColor",action->isChecked()); + } + } BaseDesignIntf *DataBand::createSameTypeItem(QObject *owner, QGraphicsItem *parent) diff --git a/limereport/bands/lrdataband.h b/limereport/bands/lrdataband.h index 870ac9e..fc6e4ad 100644 --- a/limereport/bands/lrdataband.h +++ b/limereport/bands/lrdataband.h @@ -53,8 +53,6 @@ public: DataBand(QObject* owner = 0, QGraphicsItem* parent=0); bool isUnique() const; bool isData() const {return true;} - void preparePopUpMenu(QMenu &menu); - void processPopUpAction(QAction *action); protected: QColor bandColor() const; void preparePopUpMenu(QMenu &menu);