0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-03-13 22:03:47 +03:00

Merge tag '1.5.40' into develop

Finish 1.5.40
This commit is contained in:
Arin Alexander 2020-03-04 16:26:52 +03:00
commit da9e27929f
16 changed files with 126 additions and 124 deletions

8
.appveyor.yml Normal file
View File

@ -0,0 +1,8 @@
image:
- Visual Studio 2017
install:
- set QTDIR=C:\Qt\5.12\mingw73_64
- set PATH=%QTDIR%\bin;C:\Qt\Tools\mingw730_64\bin;%PATH%
build_script:
- qmake LimeReport.pro
- mingw32-make

View File

@ -54,17 +54,8 @@ win32 {
EXTRA_DIR ~= s,/,\\,g EXTRA_DIR ~= s,/,\\,g
DEST_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g
REPORTS_DIR ~= s,/,\\,g REPORTS_DIR ~= s,/,\\,g
RC_FILE += mainicon.rc RC_FILE += mainicon.rc
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t)
greaterThan(QT_MAJOR_VERSION, 4) {
QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$shell_quote($$EXTRA_DIR\\*) $$shell_quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t)
}
lessThan(QT_MAJOR_VERSION, 5){
QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR\\*) $$quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t)
}
#QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t)
#QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR\\*) $$quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t)
} }
} }

View File

@ -53,15 +53,8 @@ win32 {
EXTRA_DIR ~= s,/,\\,g EXTRA_DIR ~= s,/,\\,g
DEST_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g
REPORTS_DIR ~= s,/,\\,g REPORTS_DIR ~= s,/,\\,g
RC_FILE += mainicon.rc RC_FILE += mainicon.rc
greaterThan(QT_MAJOR_VERSION, 4) { QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t)
QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$shell_quote($$EXTRA_DIR\\*) $$shell_quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t)
}
lessThan(QT_MAJOR_VERSION, 5){
QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR\\*) $$quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t)
}
#QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t)
} }
} }

View File

@ -33,6 +33,7 @@
#include <stdexcept> #include <stdexcept>
#include <QString> #include <QString>
#include <QStyleOptionViewItem> #include <QStyleOptionViewItem>
#include <QtGlobal>
#if defined(LIMEREPORT_EXPORTS) #if defined(LIMEREPORT_EXPORTS)
# define LIMEREPORT_EXPORT Q_DECL_EXPORT # define LIMEREPORT_EXPORT Q_DECL_EXPORT
@ -157,7 +158,11 @@ namespace Const{
{ {
public: public:
enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime}; enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(VariableDataType)
#else
Q_ENUMS(VariableDataType) Q_ENUMS(VariableDataType)
#endif
private: private:
Enums(){} Enums(){}
Q_GADGET Q_GADGET

View File

@ -3,16 +3,21 @@
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
#include "lrlayoutmarker.h" #include "lrlayoutmarker.h"
#include <QtGlobal>
namespace LimeReport{ namespace LimeReport{
class AbstractLayout: public LayoutDesignIntf class AbstractLayout: public LayoutDesignIntf
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(LayoutType)
Q_PROPERTY(bool hideEmptyItems READ hideEmptyItems WRITE setHideEmptyItems) Q_PROPERTY(bool hideEmptyItems READ hideEmptyItems WRITE setHideEmptyItems)
Q_PROPERTY(int layoutSpacing READ layoutSpacing WRITE setLayoutSpacing) Q_PROPERTY(int layoutSpacing READ layoutSpacing WRITE setLayoutSpacing)
public: public:
enum LayoutType{Layout,Table}; enum LayoutType{Layout,Table};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(LayoutType)
#else
Q_ENUMS(LayoutType)
#endif
AbstractLayout(QString xmlTag, QObject *owner = 0, QGraphicsItem *parent = 0); AbstractLayout(QString xmlTag, QObject *owner = 0, QGraphicsItem *parent = 0);
~AbstractLayout(); ~AbstractLayout();
QList<BaseDesignIntf*>& layoutsChildren(); QList<BaseDesignIntf*>& layoutsChildren();

View File

@ -30,14 +30,12 @@
#ifndef LRBARCODEITEM_H #ifndef LRBARCODEITEM_H
#define LRBARCODEITEM_H #define LRBARCODEITEM_H
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
#include <QtGlobal>
namespace LimeReport{ namespace LimeReport{
class BarcodeItem : public LimeReport::ContentItemDesignIntf { class BarcodeItem : public LimeReport::ContentItemDesignIntf {
Q_OBJECT Q_OBJECT
Q_ENUMS(BarcodeType)
Q_ENUMS(AngleType)
Q_ENUMS(InputMode)
Q_PROPERTY(QString content READ content WRITE setContent) Q_PROPERTY(QString content READ content WRITE setContent)
Q_PROPERTY(BarcodeType barcodeType READ barcodeType WRITE setBarcodeType ) Q_PROPERTY(BarcodeType barcodeType READ barcodeType WRITE setBarcodeType )
Q_PROPERTY(QString datasource READ datasource WRITE setDatasource) Q_PROPERTY(QString datasource READ datasource WRITE setDatasource)
@ -144,7 +142,9 @@ public:
UPNQR =143 UPNQR =143
}; };
enum AngleType{Angle0,Angle90,Angle180,Angle270}; enum AngleType{Angle0,Angle90,Angle180,Angle270};
enum InputMode{ enum InputMode{
DATA_INPUT_MODE = 0, DATA_INPUT_MODE = 0,
UNICODE_INPUT_MODE = 1, UNICODE_INPUT_MODE = 1,
@ -152,6 +152,15 @@ public:
KANJI_INPUT_MODE = 3, KANJI_INPUT_MODE = 3,
SJIS_INPUT_MODE = 4 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(QObject *owner, QGraphicsItem *parent);
~BarcodeItem(); ~BarcodeItem();
virtual BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent); virtual BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent);

View File

@ -2,6 +2,7 @@
#define LRCHARTITEM_H #define LRCHARTITEM_H
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
#include "lrglobal.h" #include "lrglobal.h"
#include <QtGlobal>
namespace LimeReport{ namespace LimeReport{
@ -30,9 +31,13 @@ class SeriesItem : public QObject{
Q_PROPERTY(QString labelsColumn READ labelsColumn WRITE setLabelsColumn ) Q_PROPERTY(QString labelsColumn READ labelsColumn WRITE setLabelsColumn )
Q_PROPERTY(QColor color READ color WRITE setColor) Q_PROPERTY(QColor color READ color WRITE setColor)
Q_PROPERTY(SeriesItemPreferredType preferredType READ preferredType WRITE setPreferredType) Q_PROPERTY(SeriesItemPreferredType preferredType READ preferredType WRITE setPreferredType)
Q_ENUMS(SeriesItemPreferredType)
public: public:
enum SeriesItemPreferredType {Bar, Line}; enum SeriesItemPreferredType {Bar, Line};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(SeriesItemPreferredType)
#else
Q_ENUMS(SeriesItemPreferredType)
#endif
SeriesItem(QObject* parent = 0) : QObject(parent), m_preferredType(Bar){} SeriesItem(QObject* parent = 0) : QObject(parent), m_preferredType(Bar){}
QString name() const; QString name() const;
void setName(const QString &name); void setName(const QString &name);
@ -114,9 +119,6 @@ protected:
class ChartItem : public LimeReport::ItemDesignIntf class ChartItem : public LimeReport::ItemDesignIntf
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(LegendAlign)
Q_ENUMS(TitleAlign)
Q_ENUMS(ChartType)
Q_PROPERTY(ACollectionProperty series READ fakeCollectionReader WRITE setSeries) Q_PROPERTY(ACollectionProperty series READ fakeCollectionReader WRITE setSeries)
Q_PROPERTY(QString datasource READ datasource WRITE setDatasource) Q_PROPERTY(QString datasource READ datasource WRITE setDatasource)
Q_PROPERTY(QString chartTitle READ chartTitle WRITE setChartTitle) Q_PROPERTY(QString chartTitle READ chartTitle WRITE setChartTitle)
@ -131,6 +133,15 @@ public:
enum LegendAlign{LegendAlignTop,LegendAlignCenter,LegendAlignBottom}; enum LegendAlign{LegendAlignTop,LegendAlignCenter,LegendAlignBottom};
enum TitleAlign{TitleAlignLeft, TitleAlignCenter, TitleAlignRight}; enum TitleAlign{TitleAlignLeft, TitleAlignCenter, TitleAlignRight};
enum ChartType{Pie, VerticalBar, HorizontalBar, Lines}; 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(QObject* owner, QGraphicsItem* parent);
~ChartItem(); ~ChartItem();

View File

@ -30,13 +30,13 @@
#ifndef LRIMAGEITEM_H #ifndef LRIMAGEITEM_H
#define LRIMAGEITEM_H #define LRIMAGEITEM_H
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
#include <QtGlobal>
namespace LimeReport{ namespace LimeReport{
class ImageItem : public ItemDesignIntf, public IPainterProxy class ImageItem : public ItemDesignIntf, public IPainterProxy
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(Format)
Q_PROPERTY(QImage image READ image WRITE setImage) Q_PROPERTY(QImage image READ image WRITE setImage)
Q_PROPERTY(int opacity READ opacity WRITE setOpacity) Q_PROPERTY(int opacity READ opacity WRITE setOpacity)
Q_PROPERTY(QString datasource READ datasource WRITE setDatasource) Q_PROPERTY(QString datasource READ datasource WRITE setDatasource)
@ -57,6 +57,11 @@ public:
Hex = 1, Hex = 1,
Base64 = 2 Base64 = 2
}; };
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(Format)
#else
Q_ENUMS(Format)
#endif
ImageItem(QObject *owner, QGraphicsItem *parent); ImageItem(QObject *owner, QGraphicsItem *parent);
virtual void paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option, QWidget *widget); virtual void paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option, QWidget *widget);

View File

@ -30,13 +30,13 @@
#ifndef LRSHAPEITEM_H #ifndef LRSHAPEITEM_H
#define LRSHAPEITEM_H #define LRSHAPEITEM_H
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
#include <QtGlobal>
namespace LimeReport{ namespace LimeReport{
class ShapeItem: public LimeReport::ItemDesignIntf class ShapeItem: public LimeReport::ItemDesignIntf
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(ShapeType)
Q_PROPERTY(ShapeType shape READ shapeType WRITE setShapeType) Q_PROPERTY(ShapeType shape READ shapeType WRITE setShapeType)
Q_PROPERTY(QColor shapeColor READ shapeColor WRITE setShapeColor) Q_PROPERTY(QColor shapeColor READ shapeColor WRITE setShapeColor)
Q_PROPERTY(QColor shapeBrushColor READ shapeBrushColor WRITE setShapeBrushColor) Q_PROPERTY(QColor shapeBrushColor READ shapeBrushColor WRITE setShapeBrushColor)
@ -47,6 +47,11 @@ class ShapeItem: public LimeReport::ItemDesignIntf
Q_PROPERTY(int cornerRadius READ cornerRadius WRITE setCornerRadius) Q_PROPERTY(int cornerRadius READ cornerRadius WRITE setCornerRadius)
public: public:
enum ShapeType{HorizontalLine,VerticalLine,Ellipse,Rectangle}; 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); ShapeItem(QObject *owner, QGraphicsItem *parent);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void setShapeColor(QColor value); void setShapeColor(QColor value);

View File

@ -33,6 +33,7 @@
#include <QtGui> #include <QtGui>
#include <QLabel> #include <QLabel>
#include <QTextDocument> #include <QTextDocument>
#include <QtGlobal>
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
@ -43,9 +44,6 @@ namespace LimeReport {
class Tag; class Tag;
class TextItem : public ContentItemDesignIntf, IPageInit { class TextItem : public ContentItemDesignIntf, IPageInit {
Q_OBJECT Q_OBJECT
Q_ENUMS(AutoWidth)
Q_ENUMS(AngleType)
Q_ENUMS(ValueType)
Q_PROPERTY(QString content READ content WRITE setContent) Q_PROPERTY(QString content READ content WRITE setContent)
Q_PROPERTY(int margin READ marginSize WRITE setMarginSize) Q_PROPERTY(int margin READ marginSize WRITE setMarginSize)
Q_PROPERTY(Qt::Alignment alignment READ alignment() WRITE setAlignment) Q_PROPERTY(Qt::Alignment alignment READ alignment() WRITE setAlignment)
@ -81,6 +79,15 @@ public:
enum AutoWidth{NoneAutoWidth, MaxWordLength, MaxStringLength}; enum AutoWidth{NoneAutoWidth, MaxWordLength, MaxStringLength};
enum AngleType{Angle0, Angle90, Angle180, Angle270, Angle45, Angle315}; enum AngleType{Angle0, Angle90, Angle180, Angle270, Angle45, Angle315};
enum ValueType{Default, DateTime, Double}; 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(); void Init();
TextItem(QObject* owner=0, QGraphicsItem* parent=0); TextItem(QObject* owner=0, QGraphicsItem* parent=0);

View File

@ -114,7 +114,6 @@ class BandDesignIntf : public ItemsContainerDesignInft
Q_PROPERTY(BGMode backgroundMode READ backgroundMode WRITE setBackgroundModeProperty) Q_PROPERTY(BGMode backgroundMode READ backgroundMode WRITE setBackgroundModeProperty)
Q_PROPERTY(int backgroundOpacity READ opacity WRITE setBackgroundOpacity) Q_PROPERTY(int backgroundOpacity READ opacity WRITE setBackgroundOpacity)
Q_PROPERTY(int shiftItems READ shiftItems WRITE setShiftItems) Q_PROPERTY(int shiftItems READ shiftItems WRITE setShiftItems)
Q_ENUMS(BandColumnsLayoutType)
friend class BandMarker; friend class BandMarker;
friend class BandNameLabel; friend class BandNameLabel;
friend class ReportRender; friend class ReportRender;
@ -139,6 +138,11 @@ public:
enum BandColumnsLayoutType{ enum BandColumnsLayoutType{
Horizontal, Vertical, VerticalUniform Horizontal, Vertical, VerticalUniform
}; };
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(BandColumnsLayoutType)
#else
Q_ENUMS(BandColumnsLayoutType)
#endif
BandDesignIntf(BandsType bandType, const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0); BandDesignIntf(BandsType bandType, const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0);
~BandDesignIntf(); ~BandDesignIntf();

View File

@ -84,12 +84,7 @@ class BaseDesignIntf :
public QObject, public QGraphicsItem, public ICollectionContainer, public ObjectLoadingStateIntf { public QObject, public QGraphicsItem, public ICollectionContainer, public ObjectLoadingStateIntf {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsItem) Q_INTERFACES(QGraphicsItem)
Q_ENUMS(BGMode)
Q_ENUMS(Qt::BrushStyle)
Q_ENUMS(BrushStyle)
Q_ENUMS(ItemAlign)
Q_FLAGS(BorderLines) Q_FLAGS(BorderLines)
Q_ENUMS(UnitType)
Q_PROPERTY(QRect geometry READ geometry WRITE setGeometryProperty NOTIFY geometryChanged) Q_PROPERTY(QRect geometry READ geometry WRITE setGeometryProperty NOTIFY geometryChanged)
Q_PROPERTY(ACollectionProperty children READ fakeCollectionReader DESIGNABLE false) Q_PROPERTY(ACollectionProperty children READ fakeCollectionReader DESIGNABLE false)
Q_PROPERTY(qreal zOrder READ zValue WRITE setZValueProperty DESIGNABLE false) Q_PROPERTY(qreal zOrder READ zValue WRITE setZValueProperty DESIGNABLE false)
@ -104,6 +99,7 @@ class BaseDesignIntf :
public: public:
enum BGMode { TransparentMode, OpaqueMode}; enum BGMode { TransparentMode, OpaqueMode};
enum BrushStyle{ NoBrush, enum BrushStyle{ NoBrush,
SolidPattern, SolidPattern,
Dense1Pattern, Dense1Pattern,
@ -119,6 +115,7 @@ public:
BDiagPattern, BDiagPattern,
FDiagPattern }; FDiagPattern };
enum ResizeFlags { Fixed = 0, enum ResizeFlags { Fixed = 0,
ResizeLeft = 1, ResizeLeft = 1,
ResizeRight = 2, ResizeRight = 2,
@ -126,11 +123,13 @@ public:
ResizeBottom = 8, ResizeBottom = 8,
AllDirections = 15 AllDirections = 15
}; };
enum MoveFlags { None = 0, enum MoveFlags { None = 0,
LeftRight=1, LeftRight=1,
TopBotom=2, TopBotom=2,
All=3 All=3
}; };
enum BorderSide { enum BorderSide {
NoLine = 0, NoLine = 0,
TopLine = 1, TopLine = 1,
@ -139,9 +138,31 @@ public:
RightLine = 8, RightLine = 8,
AllLines = 15 AllLines = 15
}; };
enum ObjectState {ObjectLoading, ObjectLoaded, ObjectCreated}; enum ObjectState {ObjectLoading, ObjectLoaded, ObjectCreated};
enum ItemAlign {LeftItemAlign,RightItemAlign,CenterItemAlign,ParentWidthItemAlign,DesignedItemAlign}; enum ItemAlign {LeftItemAlign,RightItemAlign,CenterItemAlign,ParentWidthItemAlign,DesignedItemAlign};
enum UnitType {Millimeters, Inches}; enum UnitType {Millimeters, Inches};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(BGMode)
Q_ENUM(BrushStyle)
Q_ENUM(ResizeFlags)
Q_ENUM(MoveFlags)
Q_ENUM(BorderSide)
Q_ENUM(ObjectState)
Q_ENUM(ItemAlign)
Q_ENUM(UnitType)
#else
Q_ENUMS(BGMode)
Q_ENUMS(BrushStyle)
Q_ENUMS(ResizeFlags)
Q_ENUMS(MoveFlags)
Q_ENUMS(BorderSide)
Q_ENUMS(ObjectState)
Q_ENUMS(ItemAlign)
Q_ENUMS(UnitType)
#endif
// enum ExpandType {EscapeSymbols, NoEscapeSymbols, ReplaceHTMLSymbols}; // enum ExpandType {EscapeSymbols, NoEscapeSymbols, ReplaceHTMLSymbols};
Q_DECLARE_FLAGS(BorderLines, BorderSide) Q_DECLARE_FLAGS(BorderLines, BorderSide)
Q_DECLARE_FLAGS(ItemMode,ItemModes) Q_DECLARE_FLAGS(ItemMode,ItemModes)

View File

@ -33,6 +33,7 @@
#include <stdexcept> #include <stdexcept>
#include <QString> #include <QString>
#include <QStyleOptionViewItem> #include <QStyleOptionViewItem>
#include <QtGlobal>
#if defined(LIMEREPORT_EXPORTS) #if defined(LIMEREPORT_EXPORTS)
# define LIMEREPORT_EXPORT Q_DECL_EXPORT # define LIMEREPORT_EXPORT Q_DECL_EXPORT
@ -157,7 +158,11 @@ namespace Const{
{ {
public: public:
enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime}; enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(VariableDataType)
#else
Q_ENUMS(VariableDataType) Q_ENUMS(VariableDataType)
#endif
private: private:
Enums(){} Enums(){}
Q_GADGET Q_GADGET

View File

@ -41,9 +41,13 @@ class ItemDesignIntf : public BaseDesignIntf
Q_PROPERTY(LocationType itemLocation READ itemLocation WRITE setItemLocation) Q_PROPERTY(LocationType itemLocation READ itemLocation WRITE setItemLocation)
Q_PROPERTY(bool stretchToMaxHeight READ stretchToMaxHeight WRITE setStretchToMaxHeight) Q_PROPERTY(bool stretchToMaxHeight READ stretchToMaxHeight WRITE setStretchToMaxHeight)
Q_PROPERTY(ItemAlign itemAlign READ itemAlign WRITE setItemAlign) Q_PROPERTY(ItemAlign itemAlign READ itemAlign WRITE setItemAlign)
Q_ENUMS(LocationType)
public: public:
enum LocationType{Band,Page}; enum LocationType{Band,Page};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(LocationType)
#else
Q_ENUMS(LocationType)
#endif
ItemDesignIntf(const QString& xmlTypeName, QObject* owner = 0,QGraphicsItem* parent = 0); ItemDesignIntf(const QString& xmlTypeName, QObject* owner = 0,QGraphicsItem* parent = 0);
LocationType itemLocation(){return m_itemLocation;} LocationType itemLocation(){return m_itemLocation;}
void setItemLocation(LocationType location); void setItemLocation(LocationType location);

View File

@ -42,9 +42,6 @@ class ReportRender;
class PageItemDesignIntf : public ItemsContainerDesignInft class PageItemDesignIntf : public ItemsContainerDesignInft
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(Orientation)
Q_ENUMS(PageSize)
Q_ENUMS(PrintBehavior)
Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin) Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin)
Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin) Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin)
Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin) Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin)
@ -67,7 +64,9 @@ class PageItemDesignIntf : public ItemsContainerDesignInft
friend class ReportRender; friend class ReportRender;
public: public:
enum Orientation { Portrait = QPrinter::Portrait, Landscape = QPrinter::Landscape }; enum Orientation { Portrait = QPrinter::Portrait, Landscape = QPrinter::Landscape };
enum PrintBehavior {Scale, Split}; enum PrintBehavior {Scale, Split};
enum PageSize { enum PageSize {
A4 = QPrinter::A4, B5 = QPrinter::B5, Letter = QPrinter::Letter, A4 = QPrinter::A4, B5 = QPrinter::B5, Letter = QPrinter::Letter,
Legal = QPrinter::Legal, Executive = QPrinter::Executive, Legal = QPrinter::Legal, Executive = QPrinter::Executive,
@ -80,6 +79,15 @@ public:
Ledger = QPrinter::Ledger, Tabloid = QPrinter::Tabloid, Custom = QPrinter::Custom, Ledger = QPrinter::Ledger, Tabloid = QPrinter::Tabloid, Custom = QPrinter::Custom,
NPageSize = Custom NPageSize = Custom
}; };
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0))
Q_ENUM(Orientation)
Q_ENUM(PrintBehavior)
Q_ENUM(PageSize)
#else
Q_ENUMS(Orientation)
Q_ENUMS(PrintBehavior)
Q_ENUMS(PageSize)
#endif
typedef QList<BandDesignIntf*> BandsList; typedef QList<BandDesignIntf*> BandsList;
typedef QList<BandDesignIntf*>::const_iterator BandsIterator; typedef QList<BandDesignIntf*>::const_iterator BandsIterator;
typedef QSharedPointer<PageItemDesignIntf> Ptr; typedef QSharedPointer<PageItemDesignIntf> Ptr;

View File

@ -57,86 +57,6 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>2</number> <number>2</number>
</property> </property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QToolButton" name="toolButton_2">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="lrscriptbrowser.qrc">
<normaloff>:/scriptbrowser/images/function_add</normaloff>:/scriptbrowser/images/function_add</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="lrscriptbrowser.qrc">
<normaloff>:/scriptbrowser/images/function_edit</normaloff>:/scriptbrowser/images/function_edit</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_3">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="lrscriptbrowser.qrc">
<normaloff>:/scriptbrowser/images/function_delete</normaloff>:/scriptbrowser/images/function_delete</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item> <item>
<widget class="QTreeWidget" name="twFunctions"> <widget class="QTreeWidget" name="twFunctions">
<attribute name="headerVisible"> <attribute name="headerVisible">
@ -256,12 +176,12 @@
<property name="columnCount"> <property name="columnCount">
<number>2</number> <number>2</number>
</property> </property>
<attribute name="headerDefaultSectionSize">
<number>131</number>
</attribute>
<attribute name="headerMinimumSectionSize"> <attribute name="headerMinimumSectionSize">
<number>100</number> <number>100</number>
</attribute> </attribute>
<attribute name="headerDefaultSectionSize">
<number>131</number>
</attribute>
<column> <column>
<property name="text"> <property name="text">
<string>Type</string> <string>Type</string>
@ -282,6 +202,7 @@
</widget> </widget>
<resources> <resources>
<include location="lrscriptbrowser.qrc"/> <include location="lrscriptbrowser.qrc"/>
<include location="lrscriptbrowser.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>