0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-01 11:31:10 +03:00

Watermark property can be changed by context menu

This commit is contained in:
Arin Alex
2018-03-22 20:26:07 +03:00
parent 15345d44a7
commit 785b6cec67
3 changed files with 23 additions and 0 deletions

View File

@@ -31,6 +31,7 @@
#include "lrdesignelementsfactory.h"
#include "lrglobal.h"
#include "lrdatasourcemanager.h"
#include "lrpagedesignintf.h"
namespace{
@@ -76,6 +77,20 @@ void ImageItem::loadPictureFromVariant(QVariant& data){
}
}
void ImageItem::preparePopUpMenu(QMenu &menu)
{
QAction* action = menu.addAction(tr("Watermark"));
action->setCheckable(true);
action->setChecked(isWatermark());
}
void ImageItem::processPopUpAction(QAction *action)
{
if (action->text().compare(tr("Watermark")) == 0){
page()->setPropertyToSelectedItems("watermark",action->isChecked());
}
}
void ImageItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight)
{