mirror of
https://github.com/fralx/LimeReport.git
synced 2025-09-23 08:29:07 +03:00
supporting the new Q_ENUM() with Q_ENUMS() backwards compatibility.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#ifndef LRBARCODEITEM_H
|
||||
#define LRBARCODEITEM_H
|
||||
#include "lritemdesignintf.h"
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
@@ -141,9 +142,9 @@ public:
|
||||
UPNQR =143
|
||||
|
||||
};
|
||||
Q_ENUM(BarcodeType)
|
||||
|
||||
enum AngleType{Angle0,Angle90,Angle180,Angle270};
|
||||
Q_ENUM(AngleType)
|
||||
|
||||
enum InputMode{
|
||||
DATA_INPUT_MODE = 0,
|
||||
UNICODE_INPUT_MODE = 1,
|
||||
@@ -151,7 +152,15 @@ public:
|
||||
KANJI_INPUT_MODE = 3,
|
||||
SJIS_INPUT_MODE = 4
|
||||
};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
|
||||
Q_ENUM(BarcodeType)
|
||||
Q_ENUM(AngleType)
|
||||
Q_ENUM(InputMode)
|
||||
#else
|
||||
Q_ENUMS(BarcodeType)
|
||||
Q_ENUMS(AngleType)
|
||||
Q_ENUMS(InputMode)
|
||||
#endif
|
||||
BarcodeItem(QObject *owner, QGraphicsItem *parent);
|
||||
~BarcodeItem();
|
||||
virtual BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent);
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#define LRCHARTITEM_H
|
||||
#include "lritemdesignintf.h"
|
||||
#include "lrglobal.h"
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
@@ -32,7 +33,11 @@ class SeriesItem : public QObject{
|
||||
Q_PROPERTY(SeriesItemPreferredType preferredType READ preferredType WRITE setPreferredType)
|
||||
public:
|
||||
enum SeriesItemPreferredType {Bar, Line};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
|
||||
Q_ENUM(SeriesItemPreferredType)
|
||||
#else
|
||||
Q_ENUM(SeriesItemPreferredType)
|
||||
#endif
|
||||
SeriesItem(QObject* parent = 0) : QObject(parent), m_preferredType(Bar){}
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
@@ -126,11 +131,17 @@ class ChartItem : public LimeReport::ItemDesignIntf
|
||||
public:
|
||||
|
||||
enum LegendAlign{LegendAlignTop,LegendAlignCenter,LegendAlignBottom};
|
||||
Q_ENUM(LegendAlign)
|
||||
enum TitleAlign{TitleAlignLeft, TitleAlignCenter, TitleAlignRight};
|
||||
Q_ENUM(TitleAlign)
|
||||
enum ChartType{Pie, VerticalBar, HorizontalBar, Lines};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
|
||||
Q_ENUM(LegendAlign)
|
||||
Q_ENUM(TitleAlign)
|
||||
Q_ENUM(ChartType)
|
||||
#else
|
||||
Q_ENUMS(LegendAlign)
|
||||
Q_ENUMS(TitleAlign)
|
||||
Q_ENUMS(ChartType)
|
||||
#endif
|
||||
|
||||
ChartItem(QObject* owner, QGraphicsItem* parent);
|
||||
~ChartItem();
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#ifndef LRIMAGEITEM_H
|
||||
#define LRIMAGEITEM_H
|
||||
#include "lritemdesignintf.h"
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
@@ -56,7 +57,11 @@ public:
|
||||
Hex = 1,
|
||||
Base64 = 2
|
||||
};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
|
||||
Q_ENUM(Format)
|
||||
#else
|
||||
Q_ENUMS(Format)
|
||||
#endif
|
||||
|
||||
ImageItem(QObject *owner, QGraphicsItem *parent);
|
||||
virtual void paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
@@ -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);
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <QtGui>
|
||||
#include <QLabel>
|
||||
#include <QTextDocument>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "lritemdesignintf.h"
|
||||
#include "lritemdesignintf.h"
|
||||
@@ -76,11 +77,17 @@ class TextItem : public ContentItemDesignIntf, IPageInit {
|
||||
public:
|
||||
|
||||
enum AutoWidth{NoneAutoWidth, MaxWordLength, MaxStringLength};
|
||||
Q_ENUM(AutoWidth)
|
||||
enum AngleType{Angle0, Angle90, Angle180, Angle270, Angle45, Angle315};
|
||||
Q_ENUM(AngleType)
|
||||
enum ValueType{Default, DateTime, Double};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
|
||||
Q_ENUM(AutoWidth)
|
||||
Q_ENUM(AngleType)
|
||||
Q_ENUM(ValueType)
|
||||
#else
|
||||
Q_ENUMS(AutoWidth)
|
||||
Q_ENUMS(AngleType)
|
||||
Q_ENUMS(ValueType)
|
||||
#endif
|
||||
|
||||
void Init();
|
||||
TextItem(QObject* owner=0, QGraphicsItem* parent=0);
|
||||
|
Reference in New Issue
Block a user