0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-03 20:04:43 +03:00

supporting the new Q_ENUM() with Q_ENUMS() backwards compatibility.

This commit is contained in:
HatEmU
2020-03-03 03:13:46 +01:00
parent a8cbf68347
commit 5626e9b293
10 changed files with 91 additions and 15 deletions

View File

@@ -30,6 +30,7 @@
#ifndef LRSHAPEITEM_H
#define LRSHAPEITEM_H
#include "lritemdesignintf.h"
#include <QtGlobal>
namespace LimeReport{
@@ -46,7 +47,11 @@ class ShapeItem: public LimeReport::ItemDesignIntf
Q_PROPERTY(int cornerRadius READ cornerRadius WRITE setCornerRadius)
public:
enum ShapeType{HorizontalLine,VerticalLine,Ellipse,Rectangle};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(ShapeType)
#else
Q_ENUMS(ShapeType)
#endif
ShapeItem(QObject *owner, QGraphicsItem *parent);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void setShapeColor(QColor value);