diff --git a/common.pri b/common.pri index c39e56c..736dbf1 100644 --- a/common.pri +++ b/common.pri @@ -96,7 +96,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 68 +LIMEREPORT_VERSION_RELEASE = 69 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/items/lrimageitem.h b/limereport/items/lrimageitem.h index 0c8c807..4c16699 100644 --- a/limereport/items/lrimageitem.h +++ b/limereport/items/lrimageitem.h @@ -48,6 +48,7 @@ class ImageItem : public LimeReport::ItemDesignIntf Q_PROPERTY(bool center READ center WRITE setCenter) Q_PROPERTY(QString resourcePath READ resourcePath WRITE setResourcePath) Q_PROPERTY(QString variable READ variable WRITE setVariable) + Q_PROPERTY(bool watermark READ isWatermark WRITE setWatermark) public: enum Format { Binary = 0, diff --git a/limereport/items/lrtextitem.h b/limereport/items/lrtextitem.h index a892202..68f98c0 100644 --- a/limereport/items/lrtextitem.h +++ b/limereport/items/lrtextitem.h @@ -72,6 +72,7 @@ class TextItem : public LimeReport::ContentItemDesignIntf, IPageInit { Q_PROPERTY(qreal textIndent READ textIndent WRITE setTextIndent) Q_PROPERTY(Qt::LayoutDirection textLayoutDirection READ textLayoutDirection WRITE setTextLayoutDirection) Q_PROPERTY(bool fillInSecondPass READ fillInSecondPass WRITE setFillInSecondPass) + Q_PROPERTY(bool watermark READ isWatermark WRITE setWatermark) public: enum AutoWidth{NoneAutoWidth,MaxWordLength,MaxStringLength}; diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index cd36f5d..6e6cb56 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -80,7 +80,8 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_reportSettings(0), m_patternName(""), m_patternItem(0), - m_fillInSecondPass(false) + m_fillInSecondPass(false), + m_watermark(false) { setGeometry(QRectF(0, 0, m_width, m_height)); if (BaseDesignIntf *item = dynamic_cast(parent)) { @@ -716,6 +717,19 @@ void BaseDesignIntf::setFillInSecondPass(bool fillInSecondPass) } +bool BaseDesignIntf::isWatermark() const +{ + return m_watermark; +} + +void BaseDesignIntf::setWatermark(bool watermark) +{ + if (m_watermark != watermark){ + m_watermark = watermark; + notify("watermark",!watermark,watermark); + } +} + QString BaseDesignIntf::patternName() const { return (m_patternName.isEmpty()) ? objectName() : m_patternName; diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 3f41318..c8a3d00 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -289,6 +289,9 @@ public: Q_INVOKABLE QString setItemPosX(qreal xValue); Q_INVOKABLE QString setItemPosY(qreal yValue); + bool isWatermark() const; + void setWatermark(bool watermark); + protected: //ICollectionContainer @@ -408,6 +411,7 @@ private: QString m_patternName; BaseDesignIntf* m_patternItem; bool m_fillInSecondPass; + bool m_watermark; signals: void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry); diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index 0d30ffc..9ad41f2 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -676,7 +676,10 @@ void ReportRender::renderPageItems(PageItemDesignIntf* patternPage) m_renderPageItem->restoreLinks(); m_renderPageItem->updateSubItemsSize(FirstPass,m_datasources); foreach(BaseDesignIntf* item, pageItems){ - item->setZValue(item->zValue()-100000); + if (!item->isWatermark()) + item->setZValue(item->zValue()-100000); + else + item->setZValue(item->zValue()+100000); } }