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

@@ -111,6 +111,9 @@ void TextItem::preparePopUpMenu(QMenu &menu)
action->setCheckable(true);
action->setChecked(backgroundMode() == TransparentMode);
action = menu.addAction(tr("Watermark"));
action->setCheckable(true);
action->setChecked(isWatermark());
}
void TextItem::processPopUpAction(QAction *action)
@@ -137,6 +140,9 @@ void TextItem::processPopUpAction(QAction *action)
setProperty("backgroundMode",OpaqueMode);
}
}
if (action->text().compare(tr("Watermark")) == 0){
page()->setPropertyToSelectedItems("watermark",action->isChecked());
}
}
void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, QWidget* widget) {