From 7a5d4971a9586ba01388ee528ca40aae9d45e620 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Sun, 27 Mar 2022 09:08:16 +0200 Subject: [PATCH 01/26] 27/03 --- .../editors/lritemsborderseditorwidget.cpp | 5 + limereport/items/lrshapeitem.cpp | 1 + limereport/lrbasedesignintf.cpp | 37 +- limereport/lrbasedesignintf.h | 17 + limereport/lrreportengine.cpp | 22 +- translations/limereport_ar.ts | 139 +++- translations/limereport_es.ts | 163 +++- translations/limereport_fr.ts | 705 +++++++++++------- translations/limereport_pl.ts | 705 +++++++++++------- translations/limereport_ru.qm | Bin 126815 -> 123390 bytes translations/limereport_ru.ts | 123 ++- translations/limereport_zh.ts | 163 +++- 12 files changed, 1390 insertions(+), 690 deletions(-) diff --git a/limereport/items/editors/lritemsborderseditorwidget.cpp b/limereport/items/editors/lritemsborderseditorwidget.cpp index d8ec0f1..201b981 100644 --- a/limereport/items/editors/lritemsborderseditorwidget.cpp +++ b/limereport/items/editors/lritemsborderseditorwidget.cpp @@ -34,6 +34,11 @@ namespace LimeReport{ void ItemsBordersEditorWidget::setItemEvent(BaseDesignIntf* item) { + if(QString(item->metaObject()->className()) == "LimeReport::ShapeItem") + { + setDisabled(true); + return; + } QVariant borders=item->property("borders"); if (borders.isValid()){ updateValues((BaseDesignIntf::BorderLines)borders.toInt()); diff --git a/limereport/items/lrshapeitem.cpp b/limereport/items/lrshapeitem.cpp index 875cb34..6bbee9d 100644 --- a/limereport/items/lrshapeitem.cpp +++ b/limereport/items/lrshapeitem.cpp @@ -114,6 +114,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, } break; } + painter->restore(); ItemDesignIntf::paint(painter,option,widget); diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 9b93395..2039479 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -65,6 +65,7 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_BGMode(OpaqueMode), m_opacity(100), m_borderLinesFlags(BorderLines()), + m_borderStyle(Qt::SolidLine), m_storageTypeName(storageTypeName), m_itemMode(DesignMode), m_objectState(ObjectCreated), @@ -88,6 +89,7 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_isChangingPos(false), m_isMoveable(false) + { setGeometry(QRectF(0, 0, m_width, m_height)); if (BaseDesignIntf *item = dynamic_cast(parent)) { @@ -764,6 +766,11 @@ void BaseDesignIntf::setIsChangingPos(bool isChangingPos) m_isChangingPos = isChangingPos; } +bool BaseDesignIntf::isShapeItem() const +{ + return QString(metaObject()->className()) == "LimeReport::ShapeItem"; +} + bool BaseDesignIntf::isGeometryLocked() const { return m_itemGeometryLocked; @@ -948,6 +955,14 @@ int BaseDesignIntf::borderLineSize() const return m_borderLineSize; } +void BaseDesignIntf::setBorderStyle(Qt::PenStyle b) +{ + Qt::PenStyle oldValue = m_borderStyle; + m_borderStyle = b; + update(); + notify("borderStyle",(BorderStyle)oldValue,(BorderStyle)b); +} + void BaseDesignIntf::setBorderLineSize(int value) { int oldValue = m_borderLineSize; @@ -1026,32 +1041,47 @@ BaseDesignIntf::BorderLines BaseDesignIntf::borderLines() const return m_borderLinesFlags; } +Qt::PenStyle BaseDesignIntf::borderStyle() const +{ + return m_borderStyle; +} + void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const { + if(isShapeItem()) + return; painter->setPen(borderPen(TopLine)); painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y()); } void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const { + if(isShapeItem()) + return; painter->setPen(borderPen(BottomLine)); painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height()); } void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const { + if(isShapeItem()) + return; painter->setPen(borderPen(RightLine)); painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height()); } void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const { + if(isShapeItem()) + return; painter->setPen(borderPen(LeftLine)); painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height()); } void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const { + if(isShapeItem()) + return; drawTopLine(painter, rect); drawBootomLine(painter, rect); drawLeftLine(painter, rect); @@ -1060,7 +1090,8 @@ void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawRenderModeBorder(QPainter *painter, QRectF rect) const { - + if(isShapeItem()) + return; if (m_borderLinesFlags & RightLine) drawRightLine(painter, rect); if (m_borderLinesFlags & LeftLine) drawLeftLine(painter, rect); if (m_borderLinesFlags & TopLine ) drawTopLine(painter, rect); @@ -1138,8 +1169,8 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const QPen pen; if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); - pen.setStyle(Qt::SolidLine); - pen.setWidth(m_borderLineSize); + pen.setStyle(m_borderStyle); + pen.setWidth(m_borderLineSize+1); } else { pen.setColor(Qt::darkGray); pen.setStyle(Qt::SolidLine); diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index c311f16..6c7b317 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -94,10 +94,18 @@ class BaseDesignIntf : Q_PROPERTY(bool isVisible READ isVisible WRITE setItemVisible DESIGNABLE false) Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor) Q_PROPERTY(bool geometryLocked READ isGeometryLocked WRITE setGeometryLocked) + Q_PROPERTY(Qt::PenStyle borderStyle READ borderStyle WRITE setBorderStyle) friend class ReportRender; public: enum BGMode { TransparentMode, OpaqueMode}; + enum BorderStyle { NoStyle = Qt::NoPen, + Solid = Qt::SolidLine, + Dot = Qt::DotLine, + Dashed = Qt::DashLine, + DashDot = Qt::DashDotLine, + DashDotDot = Qt::DashDotDotLine, + }; enum BrushStyle{ NoBrush, @@ -147,21 +155,25 @@ public: #if QT_VERSION >= 0x050500 Q_ENUM(BGMode) Q_ENUM(BrushStyle) + Q_ENUM(BorderStyle) 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_ENUM(BorderStyle) Q_ENUMS(ResizeFlags) Q_ENUMS(MoveFlags) Q_ENUMS(BorderSide) Q_ENUMS(ObjectState) Q_ENUMS(ItemAlign) Q_ENUMS(UnitType) + #endif // enum ExpandType {EscapeSymbols, NoEscapeSymbols, ReplaceHTMLSymbols}; Q_DECLARE_FLAGS(BorderLines, BorderSide) @@ -240,6 +252,7 @@ public: PageDesignIntf* page(); BorderLines borderLines() const; + Qt::PenStyle borderStyle() const; QString storageTypeName() const {return m_storageTypeName;} ReportEnginePrivate *reportEditor(); @@ -285,6 +298,7 @@ public: void setItemTypeName(const QString &itemTypeName); int borderLineSize() const; + void setBorderStyle(Qt::PenStyle b); void setBorderLineSize(int value); void showEditorDialog(); ItemAlign itemAlign() const; @@ -320,6 +334,7 @@ public: void setGeometryLocked(bool itemLocked); bool isChangingPos() const; void setIsChangingPos(bool isChangingPos); + bool isShapeItem() const; Q_INVOKABLE QString setItemWidth(qreal width); Q_INVOKABLE QString setItemHeight(qreal height); @@ -367,6 +382,7 @@ protected: void drawRightLine(QPainter *painter, QRectF rect) const; void drawLeftLine(QPainter *painter, QRectF rect) const; + void drawBorder(QPainter* painter, QRectF rect) const; void drawDesignModeBorder(QPainter* painter, QRectF rect) const; void drawRenderModeBorder(QPainter *painter, QRectF rect) const; @@ -434,6 +450,7 @@ private: BGMode m_BGMode; int m_opacity; BorderLines m_borderLinesFlags; + Qt::PenStyle m_borderStyle; QRectF m_bottomRect; QRectF m_topRect; diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 6f622bc..cde40b3 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -407,7 +407,7 @@ bool ReportEnginePrivate::printReport(QPrinter* printer) if (printer&&printer->isValid()){ try{ bool designTime = dataManager()->designTime(); - dataManager()->setDesignTime(false); + dataManager()->setDesignTime(false); ReportPages pages = renderToPages(); dataManager()->setDesignTime(designTime); if (pages.count()>0){ @@ -536,7 +536,7 @@ bool ReportEnginePrivate::showPreviewWindow(ReportPages pages, PreviewHints hint } void ReportEnginePrivate::previewReport(PreviewHints hints) -{ +{ previewReport(0, hints); } @@ -661,21 +661,21 @@ bool ReportEnginePrivate::slotLoadFromFile(const QString &fileName) { EASY_BLOCK("ReportEnginePrivate::slotLoadFromFile") PreviewReportWindow *currentPreview = qobject_cast(m_activePreview); - + if (!QFile::exists(fileName)) { if ( hasActivePreview() ) - { + { QMessageBox::information( NULL, tr( "Report File Change" ), tr( "The report file \"%1\" has changed names or been deleted.\n\nThis preview is no longer valid." ).arg( fileName ) ); - + clearReport(); - + currentPreview->close(); } - + return false; } @@ -742,8 +742,8 @@ void ReportEnginePrivate::designReport(bool showModal) if (designerWindow){ dataManager()->setDesignTime(true); connect(designerWindow, SIGNAL(destroyed(QObject*)), this, SLOT(slotDesignerWindowDestroyed(QObject*))); -#ifdef Q_OS_WIN - designerWindow->setWindowModality(Qt::ApplicationModal); +#ifdef Q_OS_WIN + designerWindow->setWindowModality(Qt::NonModal); #endif if (!showModal){ designerWindow->show();; @@ -856,7 +856,7 @@ bool ReportEnginePrivate::saveToFile(const QString &fileName) QScopedPointer< ItemsWriterIntf > writer(new XMLWriter()); writer->setPassPhrase(m_passPhrase); writer->putItem(this); - m_fileName=fn; + m_fileName=fn; bool saved = writer->saveToFile(fn); foreach (ConnectionDesc* connection, dataManager()->conections()) { @@ -1419,7 +1419,7 @@ ReportEngine::ReportEngine(QObject *parent) connect(d, SIGNAL(loadFinished()), this, SIGNAL(loadFinished())); connect(d, SIGNAL(cleared()), this, SIGNAL(cleared())); connect(d, SIGNAL(printedToPDF(QString)), this, SIGNAL(printedToPDF(QString))); - + connect(d, SIGNAL(getAvailableDesignerLanguages(QList*)), this, SIGNAL(getAvailableDesignerLanguages(QList*))); connect(d, SIGNAL(currentDefaultDesignerLanguageChanged(QLocale::Language)), diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts index dff2574..6a996f9 100644 --- a/translations/limereport_ar.ts +++ b/translations/limereport_ar.ts @@ -8,6 +8,49 @@ + + ChartAxisEditor + + Axis editor + + + + Axis + + + + Reverse direction + + + + Enable scale calculation + + + + Step + + + + Maximum + + + + Minimum + + + + Automatic + + + + Cancel + إلغاء الأمر + + + Ok + موافق + + ChartItemEditor @@ -54,6 +97,10 @@ Series name + + X data field + + ImageItemEditor @@ -156,22 +203,6 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2015 Arin Alexander arin_a@bk.ru</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="SEC1"></a><span style=" font-family:'sans-serif'; font-weight:600;">G</span><span style=" font-family:'sans-serif'; font-weight:600;">NU LESSER GENERAL PUBLIC LICENSE</span></p> @@ -284,6 +315,22 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'sans-serif';">That's all there is to it!</span></p></body></html> + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2021 Arin Alexander. All rights reserved.</span></p></body></html> + + LimeReport::AlignmentPropItem @@ -1333,6 +1380,10 @@ p, li { white-space: pre-wrap; } Set page size to printer + + Mix with prior page + + LimeReport::PreviewReportWidget @@ -2029,6 +2080,38 @@ p, li { white-space: pre-wrap; } removeGap + + xAxisField + + + + seriesLineWidth + + + + drawPoints + + + + dropPrinterMargins + + + + notPrintIfEmpty + + + + gridChartLines + + + + horizontalAxisOnTop + + + + mixWithPriorPage + + LimeReport::RectPropItem @@ -2933,10 +3016,6 @@ This preview is no longer valid. Ctrl+Return - - Esc - - LimeReport::TranslationEditor @@ -3274,5 +3353,25 @@ This preview is no longer valid. Series + + X Axis + + + + Y Axis + + + + X axis + + + + Y axis + + + + Axis + + diff --git a/translations/limereport_es.ts b/translations/limereport_es.ts index f8baa0b..7c0253e 100644 --- a/translations/limereport_es.ts +++ b/translations/limereport_es.ts @@ -8,6 +8,49 @@ + + ChartAxisEditor + + Axis editor + + + + Axis + + + + Reverse direction + + + + Enable scale calculation + + + + Step + + + + Maximum + + + + Minimum + + + + Automatic + + + + Cancel + Cancelar + + + Ok + Aceptar + + ChartItemEditor @@ -54,6 +97,10 @@ Series name Nombre de la Serie + + X data field + + ImageItemEditor @@ -156,34 +203,6 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Motor de informes para el entorno de trabajo de </span> <span style = "font-size: 12pt; font-weight: 600; color: # 7faa18;"> Qt </span> <span style = "font-size: 12pt; font-weight : 600; "></span> </p> -<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 11pt;"> LimeReport es una biblioteca de C ++ multiplataforma escrita para el entorno de trabajo de Qt y diseñada para desarrolladores de software que deseen agregar en su aplicación la capacidad para crear informes o imprimir formularios generados mediante plantillas. < / span> </p> -<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; font-size: 11pt; "> <br /> </p> -<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; font-size: 11pt; "> <br /> </p> -<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 11pt;"> Sitio web oficial: </span> <a href="www.limereport.ru"> <span style = "font-size: 11pt; text-decoration: underline ; color: # 0000ff; "> www.limereport.ru </span> </a> </p> -<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; texto-sangría: 0px; fuente-tamaño: 11 puntos; texto-decoración: subrayado; color: # 0000ff; "> <br /> </p> -<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 10pt; font-weight: 600;"> Esta biblioteca se distribuye con la esperanza de que sea útil, pero SIN NINGUNA GARANTÍA; sin ni siquiera la garantía implícita de COMERCIABILIDAD o APTITUD PARA UN PROPÓSITO PARTICULAR. </span> </p> -<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; font-size: 10pt; font-weight: 600; color: # 000000; "> <br /> </p> -<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 10pt;">Derechos reservados 2015 Arin Alexander. Todos los derechos reservados. - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2015 Arin Alexander arin_a@bk.ru</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="SEC1"></a><span style=" font-family:'sans-serif'; font-weight:600;">G</span><span style=" font-family:'sans-serif'; font-weight:600;">NU LESSER GENERAL PUBLIC LICENSE</span></p> @@ -412,6 +431,34 @@ p, li { white-space: pre-wrap; } <p style = "margin-top: 0px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;"> <span style = "font-family: 'monospace';"> Ty Coon, Presidente de Vice </span> </p> <p style = "margin-top: 19px; margin-bottom: 19px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;"> <span style = "font-family: 'sans-serif';"> ¡Eso es todo!</span></p></body></html> + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2021 Arin Alexander. All rights reserved.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Motor de informes para el entorno de trabajo de </span> <span style = "font-size: 12pt; font-weight: 600; color: # 7faa18;"> Qt </span> <span style = "font-size: 12pt; font-weight : 600; "></span> </p> +<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 11pt;"> LimeReport es una biblioteca de C ++ multiplataforma escrita para el entorno de trabajo de Qt y diseñada para desarrolladores de software que deseen agregar en su aplicación la capacidad para crear informes o imprimir formularios generados mediante plantillas. < / span> </p> +<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; font-size: 11pt; "> <br /> </p> +<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; font-size: 11pt; "> <br /> </p> +<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 11pt;"> Sitio web oficial: </span> <a href="www.limereport.ru"> <span style = "font-size: 11pt; text-decoration: underline ; color: # 0000ff; "> www.limereport.ru </span> </a> </p> +<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; texto-sangría: 0px; fuente-tamaño: 11 puntos; texto-decoración: subrayado; color: # 0000ff; "> <br /> </p> +<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 10pt; font-weight: 600;"> Esta biblioteca se distribuye con la esperanza de que sea útil, pero SIN NINGUNA GARANTÍA; sin ni siquiera la garantía implícita de COMERCIABILIDAD o APTITUD PARA UN PROPÓSITO PARTICULAR. </span> </p> +<p align = "justify" style = "- qt -agraph-type: empty; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; font-size: 10pt; font-weight: 600; color: # 000000; "> <br /> </p> +<p align = "justify" style = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px;" > <span style = "font-size: 10pt;">Derechos reservados 2015 Arin Alexander. Todos los derechos reservados. {3C?} {4.0/?} {3.?} {40/?} {1"?} {9p?} {400;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {100.?} {100"?} {12p?} {600;?} {12p?} {600;?} {7f?} {18;?} {12p?} {600;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {11p?} {0000f?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0000f?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {600;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {600;?} {000000;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {2021 ?} + LimeReport::AlignmentPropItem @@ -1461,6 +1508,10 @@ p, li { white-space: pre-wrap; } Set page size to printer Establecer el tamaño de página a la impresora + + Mix with prior page + + LimeReport::PreviewReportWidget @@ -2157,6 +2208,38 @@ p, li { white-space: pre-wrap; } removeGap + + xAxisField + + + + seriesLineWidth + + + + drawPoints + + + + dropPrinterMargins + + + + notPrintIfEmpty + + + + gridChartLines + + + + horizontalAxisOnTop + + + + mixWithPriorPage + + LimeReport::RectPropItem @@ -3063,10 +3146,6 @@ Esta vista previa ya no es válida. Ctrl+Return Ctrl+Intro - - Esc - - LimeReport::TranslationEditor @@ -3404,5 +3483,25 @@ Esta vista previa ya no es válida. Series + + X Axis + + + + Y Axis + + + + X axis + + + + Y axis + + + + Axis + + diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index cec566c..9648930 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -9,6 +9,61 @@ + + ChartAxisEditor + + + Axis editor + + + + + Axis + + + + + Reverse direction + + + + + Enable scale calculation + + + + + Step + + + + + Maximum + + + + + Minimum + + + + + + + Automatic + + + + + Cancel + Annuler + + + + Ok + + + ChartItemEditor @@ -52,12 +107,17 @@ Type - + Labels field Valeurs - + + X data field + + + + Ok @@ -127,7 +187,7 @@ Obligatoire - + Attention Erreur @@ -171,8 +231,8 @@ p, li { white-space: pre-wrap; } <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> - +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2021 Arin Alexander. All rights reserved.</span></p></body></html> + @@ -494,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures @@ -713,7 +773,7 @@ p, li { white-space: pre-wrap; } - + Datasources Source de données @@ -790,45 +850,45 @@ p, li { white-space: pre-wrap; } Saisir une variable - - - - + + + + Attention - + Do you really want to delete "%1" connection? Voulez-vous vraiment supprimer la connexion %1? - + Report variables Variables du rapport - + System variables Variables système - + External variables Variables externe - + Do you really want to delete "%1" datasource? Vouz-vous vraiment supprimer la source de donnée "%1"? - + Do you really want to delete variable "%1"? Vouz-vous vraiment supprimer la variable "%1"? - + Error Erreur @@ -876,48 +936,51 @@ p, li { white-space: pre-wrap; } LimeReport::DataSourceManager - + Connection "%1" is not open La connexion "%1" n'est pas ouverte - - + + + + Variable "%1" not found! Variable "%1" introuvable! - + + Unknown parameter "%1" for variable "%2" found! Paramètre inconnu %1 pour la variable %2 ! - - + + Datasource "%1" not found! Source de donnée "%1" introuvable! - + Connection with name "%1" already exists! La connexion avec le nom "%1" existe déjà! - - - - - + + + + + Datasource with name "%1" already exists! La source de donnée avec le nom "%1" existe déjà! - + Database "%1" not found Base de données "%1 introuvable - + invalid connection Connexion invalide @@ -925,17 +988,17 @@ p, li { white-space: pre-wrap; } LimeReport::DataSourceModel - + Datasources Source de données - + Variables - + External variables Variables externe @@ -1327,17 +1390,17 @@ p, li { white-space: pre-wrap; } LimeReport::FontEditorWidget - + Font bold Gras - + Font Italic Italique - + Font Underline Souligné @@ -1399,22 +1462,22 @@ p, li { white-space: pre-wrap; } LimeReport::GroupFunction - + Field "%1" not found Champ %1 introuvable - + Variable "%1" not found Variable %1 introuvable - + Wrong script syntax "%1" Syntaxe incorrecte du script "%1" - + Item "%1" not found Elément "%1" introuvable @@ -1518,32 +1581,32 @@ p, li { white-space: pre-wrap; } LimeReport::ItemsBordersEditorWidget - + Top line ligne haute - + Bottom line Ligne basse - + Left line Ligne gauche - + Right line Ligne droite - + No borders Aucune bordure - + All borders Toutes les bordures @@ -1572,7 +1635,7 @@ p, li { white-space: pre-wrap; } LimeReport::ObjectBrowser - + Objects Objets @@ -1580,17 +1643,17 @@ p, li { white-space: pre-wrap; } LimeReport::ObjectInspectorWidget - + Clear Effacer - + Filter Filtrer - + Translate properties Traduire les popriétés @@ -1634,34 +1697,40 @@ p, li { white-space: pre-wrap; } LimeReport::PageItemDesignIntf - + Paste Coller - - + + Page is TOC Table de contenus - - + + Reset page number Réinitialiser le numéro de page - - + + Full page Page entière - - + + Set page size to printer Adapterr la taille de la page à l'imprimante + + + + Mix with prior page + + LimeReport::PreviewReportWidget @@ -1676,7 +1745,7 @@ p, li { white-space: pre-wrap; } %1 nom de fichier - + Report file name Nom du fichier du rapport @@ -1840,37 +1909,37 @@ p, li { white-space: pre-wrap; } Supprimer - + Printing Impression en cours - + Page: - + Font Police - + Text align Alignement de texte - + of %1 de %1 - + Attention Attention - + The printing is in process L'impresion est en cours @@ -2414,126 +2483,166 @@ p, li { white-space: pre-wrap; } + xAxisField + + + + legendAlign Alignement de la légende - + series Séries - + titleAlign Alignement du titre - + watermark Filigrane - + keepTopSpace Garder l'espace inférieur - + printable Imprimable - + variable Variable - + replaceCRwithBR Remplacer CR par BR - + hideIfEmpty Masquer si vide - + hideEmptyItems Masquer les éléments vides - + useExternalPainter Utiliser un dessin externe - + layoutSpacing Espacement disposition - + printerName Nom de l'imprimante - + fontLetterSpacing Interlettre - + hideText Masquer le texte - + option3 Option 3 - + units Unités - + geometryLocked Fixer la géométrie - + printBehavior Méthode d'impression - + shiftItems Décaler les éléments - + showLegend Afficher la légende - + + seriesLineWidth + + + + + drawPoints + + + + removeGap Supprimer l'espace - + + dropPrinterMargins + + + + + notPrintIfEmpty + + + + + gridChartLines + + + + + horizontalAxisOnTop + + + + + mixWithPriorPage + + + + Property Name Propriété - + Property value Valeur - + Warning Avertissement @@ -2599,370 +2708,370 @@ p, li { white-space: pre-wrap; } LimeReport::ReportDesignWindow - - + + Rendered %1 pages %1 pages préparées - + Cancel report rendering Annuler la préparation - + New Report Nouveau rapport - + New Report Page Nouvelle page - + Delete Report Page Supprimer une page - + Edit Mode Mode d'édition - + Undo Annuler - + Redo Répéter - + Copy Copier - + Paste Coller - + Cut Couper - + Settings Paramètres - + Use grid Utiliser la grille - + Use magnet Utiliser l'aimant - + Text Item Elément de texte - + Save Report Enregistrer le rapport - + Save Report As Enregistrer le rapport sous - + Load Report Ouvrir un rapport - + Delete item Supprimer élément - + Zoom In Zoom avant - + Zoom Out Zoom arrière - + Render Report Afficher l'aperçu du rapport - + Edit layouts mode Modifier le mode de mise en forme - + Horizontal layout Mise en page horizontale - + Vertical layout Disposition verticale - + About A propos - + Hide left panel | Alt+L Masquer le volet gauche - + Hide right panel | Alt+R Masquer le volet droite - + Delete dialog Supprimer la boite du dialogue - + Add new dialog Ajouter une boite de dialogue - + Lock selected items Verrouiller les éléments sélectionnés - + Unlock selected items Déverrouiller les éléments sélectionnés - + Select one level items Sélectionner un niveau d'éléments - + Report Tools Outils de rapport - + Main Tools Outils principales - + Font Police - + Text alignment Alignement de texte - + Items alignment Alignement des éléments - + Borders Bordures - + Report bands Bandesde rapport - + Report Header En-tête du rapport - + Report Footer Pied de rapport - + Page Header En-tête de page - + Page Footer Pied de page - + Data Données - + Data Header En-tête de données - + Data Footer Pied de données - + SubDetail Sous-détails - + SubDetailHeader En-tête de sous-détails - + SubDetailFooter Pied de sous-détails - + GroupHeader En-tête de groupe - + GroupFooter Pied de groupe - + Tear-off Band Bande détachable - + File Fichier - + Edit Edition - + Info - + Recent Files Fichiers récents - - + + Object Inspector Inspecteur d'objets - + Report structure Structure du rapport - + Widget Box Boite de Widget - + Property Editor Editeur de propriété - + Action Editor Editeur d'action - + Resource Editor Editeur de ressource - + SignalSlot Editor Editeur de Signaux & Slots - + Dialog Designer Tools Boite à outils du Designer - + Data Browser Navigateur de données - + Script Browser Navigateur de script - + Report has been modified! Do you want save the report? Le rapport a été modifié! Voulez-vous l'enregistrer? - - + + Report file name Nom du fichier du rapport - + Attention Attention - + The rendering is in process La préparation du rapport est en cours - + Warning Avertissement - + File "%1" not found! Fichier "%1" introuvable! @@ -2970,27 +3079,27 @@ p, li { white-space: pre-wrap; } LimeReport::ReportEnginePrivate - + Preview Aperçu avant impression - + Error Erreur - + %1 file name %1 nom de fichier - + Report File Change Nom du fichier changé - + The report file "%1" has changed names or been deleted. This preview is no longer valid. @@ -2999,12 +3108,12 @@ This preview is no longer valid. Cet aperçu n'est plus valide. - + Designer not found! Designer introuvable! - + Language %1 already exists La langue %1 existe déja @@ -3030,22 +3139,24 @@ Cet aperçu n'est plus valide. - + Error Erreur - + page index out of range Indice de la page dépassé - + + Databand "%1" not found Bande de données "%1 introuvable - + + Wrong using function %1 Utilisation incorrecte de la fonction "%1" @@ -3263,29 +3374,29 @@ Cet aperçu n'est plus valide. Nom - + NO CATEGORY AUCUNE CATEGORIE - - - + + + Error Erreur - + Dialog with name: %1 already exists Le dialogue avec le nom "%1" existe déja - + ui file must cointain QDialog instead QWidget or QMainWindow Le fichier ui doit contenir un QDialog au lieu de QWidget ou QMainWindow - + wrong file format Format de fichier incorrect @@ -3311,13 +3422,13 @@ Cet aperçu n'est plus valide. LimeReport::ScriptEngineContext - + Dialog with name: %1 can`t be created Le dialogue avec le nom "%1" ne peut pas être crée - - + + Error Erreur @@ -3330,20 +3441,20 @@ Cet aperçu n'est plus valide. Fonctions de groupe - - - - - - - - + + + + + + + + Value Valeur - + BandName Nom de la bande @@ -3354,135 +3465,137 @@ Cet aperçu n'est plus valide. - + FieldName Nom du champ - + + Variable %1 not found Variable "%1" introuvable - + + Field %1 not found in %2! Champ "%1 introuvable dans %2! - + SYSTEM Système - - - + + + NUMBER Nombre - - - - - + + + + + Format - + Precision Précision - - - - + + + + Locale Local - - - - - - + + + + + + DATE&TIME Date&Heure - + CurrencySymbol Symbolde de la monnaie - - - - - - - - - - + + + + + + + + + + GENERAL General - - - + + + Name Nom - + Datasource Source de donnée - + ValueField Valeur - + KeyField Clé - + KeyFieldValue Valeur de la clé - + RowIndex - - - + + + Unique identifier Identifiant unique - - + + Content Contenu - + Indent Indenter - + datasourceName Nom de source de donnée @@ -3677,18 +3790,18 @@ Cet aperçu n'est plus valide. Masquer si vide - - + + Error Erreur - + TextItem " %1 " already has folower " %2 " L'élément texte " %1 " a toujours un copain " %2 " - + TextItem " %1 " not found! Elément "%1" introuvable! @@ -3720,11 +3833,6 @@ Cet aperçu n'est plus valide. Cancel Annuler - - - Esc - Echap - LimeReport::TranslationEditor @@ -4077,29 +4185,29 @@ Cet aperçu n'est plus valide. - - + + Attention! - - + + Selected elements have different parent containers Les éléments sélectionnés ont un parent différent - + Object with name %1 already exists! L'objet avec le nom "%1" existe déja! - + Function %1 not found or have wrong arguments La fonction %1 est introuvable ou contient des paramètres incorrects - + Datasource manager not found Gestionnaire de source de donnée introuvable @@ -4113,17 +4221,17 @@ Cet aperçu n'est plus valide. - - - + + + mm - - - + + + '' @@ -4148,23 +4256,23 @@ Cet aperçu n'est plus valide. Contenu vide - + Chart Item Elément du graphe - + First Prémier - + Second Second - + Thrid Troisième @@ -4180,12 +4288,12 @@ Cet aperçu n'est plus valide. Exporter au format PDF - + Dark Sombre - + Light Clair @@ -4223,5 +4331,30 @@ Cet aperçu n'est plus valide. Series Séries + + + X Axis + + + + + Y Axis + + + + + X axis + + + + + Y axis + + + + + Axis + + diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index af65f1f..50f570a 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -9,6 +9,61 @@ + + ChartAxisEditor + + + Axis editor + + + + + Axis + + + + + Reverse direction + + + + + Enable scale calculation + + + + + Step + + + + + Maximum + + + + + Minimum + + + + + + + Automatic + + + + + Cancel + Anuluj + + + + Ok + Ok + + ChartItemEditor @@ -52,12 +107,17 @@ Typ - + Labels field Pole etykiet - + + X data field + + + + Ok Ok @@ -127,7 +187,7 @@ Obowiązkowy - + Attention Uwaga @@ -171,7 +231,7 @@ p, li { white-space: pre-wrap; } <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2021 Arin Alexander. All rights reserved.</span></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -184,7 +244,7 @@ p, li { white-space: pre-wrap; } <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Ta biblioteka jest rozpowszechniana z nadzieją, że będzie przydatna, ale BEZ JAKIEJKOLWIEK GWARANCJI; nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ lub PRZYDATNOŚCI DO OKREŚLONYCH CELÓW.</span></p> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> {3C?} {4.0/?} {3.?} {40/?} {1"?} {9p?} {400;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {100.?} {100"?} {12p?} {600;?} {12p?} {600;?} {7f?} {18;?} {12p?} {600;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {11p?} {0000f?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0000f?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {600;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {600;?} {000000;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {2021 ?} @@ -506,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie @@ -725,7 +785,7 @@ p, li { white-space: pre-wrap; } - + Datasources Źródła danych @@ -802,45 +862,45 @@ p, li { white-space: pre-wrap; } Chwyć zmienną - - - - + + + + Attention Uwaga - + Do you really want to delete "%1" connection? Czy chcesz naprawdę skasować "%1" połączenie? - + Report variables Raport zmiennych - + System variables Zmienne systemowe - + External variables Zmienne zewnętrzne - + Do you really want to delete "%1" datasource? Czy chcesz naprawdę skasować "%1" źródło danych? - + Do you really want to delete variable "%1"? Czy chcesz naprawdę skasować zmienną "%1"? - + Error Błąd @@ -888,48 +948,51 @@ p, li { white-space: pre-wrap; } LimeReport::DataSourceManager - + Connection "%1" is not open Połączenie "%1" nie jest otwarte - - + + + + Variable "%1" not found! Zmienna "%1" nie znaleziona! - + + Unknown parameter "%1" for variable "%2" found! Nieznany parametr "%1" dla znalezionej zmiennej "%2"! - - + + Datasource "%1" not found! Źródło danych %1" nie znalezione! - + Connection with name "%1" already exists! Połączenie o nazwie "%1" już istnieje! - - - - - + + + + + Datasource with name "%1" already exists! Źródło danych o nazwie "%1" już istnieje! - + Database "%1" not found Baza danych "%1" nie znaleziona - + invalid connection Nieprawidłowe połączenie @@ -937,17 +1000,17 @@ p, li { white-space: pre-wrap; } LimeReport::DataSourceModel - + Datasources Źródła danych - + Variables Zmienne - + External variables Zmienne zewnętrzne @@ -1339,17 +1402,17 @@ p, li { white-space: pre-wrap; } LimeReport::FontEditorWidget - + Font bold Czcionka pogrubiona - + Font Italic Czcionka pochylona - + Font Underline Czcionka podkreślona @@ -1411,22 +1474,22 @@ p, li { white-space: pre-wrap; } LimeReport::GroupFunction - + Field "%1" not found Pole "%1" nie znalezione - + Variable "%1" not found Zmienna "%1" nie znaleziona - + Wrong script syntax "%1" Niepoprawna składnia skryptu "%1" - + Item "%1" not found Pozycja "%1" nie znaleziona @@ -1530,32 +1593,32 @@ p, li { white-space: pre-wrap; } LimeReport::ItemsBordersEditorWidget - + Top line Górna krawędź - + Bottom line Dolna krawędź - + Left line Lewa krawędź - + Right line Prawa krawędź - + No borders Bez krawędzi - + All borders Wszystkie krawędzie @@ -1584,7 +1647,7 @@ p, li { white-space: pre-wrap; } LimeReport::ObjectBrowser - + Objects Obiekty @@ -1592,17 +1655,17 @@ p, li { white-space: pre-wrap; } LimeReport::ObjectInspectorWidget - + Clear Wyczyść - + Filter Filtr - + Translate properties Przetłumacz właściwości @@ -1646,34 +1709,40 @@ p, li { white-space: pre-wrap; } LimeReport::PageItemDesignIntf - + Paste Wklej - - + + Page is TOC Strona to spis treści - - + + Reset page number Zresetuj numer strony - - + + Full page Cała strona - - + + Set page size to printer Ustaw rozmiar strony na drukarkę + + + + Mix with prior page + + LimeReport::PreviewReportWidget @@ -1688,7 +1757,7 @@ p, li { white-space: pre-wrap; } %1 nazwa pliku - + Report file name Nazwa pliku raportu @@ -1852,37 +1921,37 @@ p, li { white-space: pre-wrap; } Usuń - + Printing - + Page: Strona: - + Font Czcionka - + Text align Wyrównanie tekstu - + of %1 z %1 - + Attention Uwaga - + The printing is in process @@ -2426,126 +2495,166 @@ p, li { white-space: pre-wrap; } + xAxisField + + + + legendAlign Wyrównanie legendy - + series Seria - + titleAlign Wyrównanie tytułu - + watermark Znak wodny - + keepTopSpace Zachowaj górny obszar - + printable Drukowalny - + variable Zmienna - + replaceCRwithBR Zamień CR na BR - + hideIfEmpty Ukryj jeśli pusty - + hideEmptyItems Ukryj puste elementy - + useExternalPainter Użyj zewnętrznego malarza - + layoutSpacing Układ odstępów - + printerName Nazwa drukarki - + fontLetterSpacing Odstępy między literami fontu - + hideText Ukryj tekst - + option3 Opcja3 - + units Jednostki - + geometryLocked Zablokowana geometria - + printBehavior Zachowanie drukowania - + shiftItems - + showLegend - + + seriesLineWidth + + + + + drawPoints + + + + removeGap - + + dropPrinterMargins + + + + + notPrintIfEmpty + + + + + gridChartLines + + + + + horizontalAxisOnTop + + + + + mixWithPriorPage + + + + Property Name Nazwa właściwości - + Property value Wartość właściwości - + Warning Uwaga @@ -2611,370 +2720,370 @@ p, li { white-space: pre-wrap; } LimeReport::ReportDesignWindow - - + + Rendered %1 pages - + Cancel report rendering - + New Report Nowy raport - + New Report Page Nowa strona raportu - + Delete Report Page Usuń stronę raportu - + Edit Mode Tryb edycji - + Undo Cofnij - + Redo Ponów - + Copy Kopiuj - + Paste Wklej - + Cut Wytnij - + Settings Ustawienia - + Use grid Użyj siatki - + Use magnet Użyj magnesu - + Text Item Element tekstowy - + Save Report Zapisz raport - + Save Report As Zapisz raport jako - + Load Report Wczytaj raport - + Delete item Usuń pozycję - + Zoom In Powiększ - + Zoom Out Pomniejsz - + Render Report Renderuj raport - + Edit layouts mode Edytuj tryb układu - + Horizontal layout Układ poziomy - + Vertical layout Układ pionowy - + About O - + Hide left panel | Alt+L Ukryj lewy panel | Alt+L - + Hide right panel | Alt+R Ukryj prawy panel | Alt+R - + Delete dialog Dialog kasowania - + Add new dialog Dodaj nowy dialog - + Lock selected items Zablokuj zaznaczone elementy - + Unlock selected items Odblokuj zaznaczone elementy - + Select one level items Wybierz elementy na jednym poziomie - + Report Tools Narzędzia raportu - + Main Tools Główne narzędzia - + Font Czcionka - + Text alignment Wyrównanie tekstu - + Items alignment Wyrównanie elementów - + Borders Krawędzie - + Report bands Pasma raportu - + Report Header Nagłówek raportu - + Report Footer Stopka raportu - + Page Header Nagłówek strony - + Page Footer Stopka strony - + Data Dane - + Data Header Nagłówek danych - + Data Footer Stopka danych - + SubDetail Pod szczegóły - + SubDetailHeader Nagłówek pod szczegółów - + SubDetailFooter Stopka pod szczegółów - + GroupHeader Nagłówek grupujący - + GroupFooter Stopka grupująca - + Tear-off Band Sekcja zrywająca - + File Plik - + Edit Edycja - + Info Informacja - + Recent Files Ostatnie pliki - - + + Object Inspector Inspektor obiektów - + Report structure Struktura raportu - + Widget Box Pudełko widżetów - + Property Editor Edytor właściowości - + Action Editor Edytor akcji - + Resource Editor Edytor zasobów - + SignalSlot Editor Edytor sygnałów i slotów - + Dialog Designer Tools Narzędzia projektowania dialogów - + Data Browser Przeglądarka danych - + Script Browser Przeglądarka skryptów - + Report has been modified! Do you want save the report? Raport został zmodyfikowany! Czy chcesz zapisać raport? - - + + Report file name Nazwa pliku raportu - + Attention Uwaga - + The rendering is in process - + Warning Ostrzeżenie - + File "%1" not found! Plik "%1" nie znaleziony! @@ -2982,27 +3091,27 @@ p, li { white-space: pre-wrap; } LimeReport::ReportEnginePrivate - + Preview Podgląd - + Error Błąd - + %1 file name %1 nazwa pliku - + Report File Change Zmiana pliku raportu - + The report file "%1" has changed names or been deleted. This preview is no longer valid. @@ -3011,12 +3120,12 @@ This preview is no longer valid. Ten podgląd nie jest już prawidłowy. - + Designer not found! Nie znaleziono projektanta! - + Language %1 already exists Język %1 już istnieje @@ -3042,22 +3151,24 @@ Ten podgląd nie jest już prawidłowy. - + Error Błąd - + page index out of range indeks strony poza zakresem - + + Databand "%1" not found Sekcja danych "%1" nie znaleziona - + + Wrong using function %1 Złe użycie funkcji %1 @@ -3275,29 +3386,29 @@ Ten podgląd nie jest już prawidłowy. Nazwa - + NO CATEGORY BEZ KATEGORII - - - + + + Error Błąd - + Dialog with name: %1 already exists Okno dialogowe z nazwą:%1 już istnieje - + ui file must cointain QDialog instead QWidget or QMainWindow Plik ui musi zawierać QDialog zamiast QWidget lub QMainWindow - + wrong file format niewłaściwy format pliku @@ -3323,13 +3434,13 @@ Ten podgląd nie jest już prawidłowy. LimeReport::ScriptEngineContext - + Dialog with name: %1 can`t be created Okno dialogowe z nazwą:%1 nie można utworzyć - - + + Error Błąd @@ -3342,20 +3453,20 @@ Ten podgląd nie jest już prawidłowy. FUNKCJE GRUPUJĄCE - - - - - - - - + + + + + + + + Value Wartość - + BandName Nazwa sekcji @@ -3366,135 +3477,137 @@ Ten podgląd nie jest już prawidłowy. - + FieldName Nazwa pola - + + Variable %1 not found Nie znaleziono zmiennej %1 - + + Field %1 not found in %2! Pole %1 nie znalezione w %2! - + SYSTEM SYSTEM - - - + + + NUMBER LICZBA - - - - - + + + + + Format Format - + Precision Precyzja - - - - + + + + Locale Ustawienia lokalne - - - - - - + + + + + + DATE&TIME Data i czas - + Datasource Źródło danych - + ValueField Pole wartości - + KeyField Pole klucza - + KeyFieldValue Wartość pola klucza - + RowIndex Indeks wiersza - - - + + + Unique identifier Unikalny identyfikator - - + + Content Zawartość - + Indent Akapit - + datasourceName Nazwa źródła danych - + CurrencySymbol Symbol waluty - - - - - - - - - - + + + + + + + + + + GENERAL OGÓLNY - - - + + + Name Nazwa @@ -3689,18 +3802,18 @@ Ten podgląd nie jest już prawidłowy. Ukryj jeśli pusty - - + + Error Błąd - + TextItem " %1 " already has folower " %2 " Pole tekstowe " %1 " już ma folower " %2 " - + TextItem " %1 " not found! Nie znaleziono pole tekstowego "%1"! @@ -3732,11 +3845,6 @@ Ten podgląd nie jest już prawidłowy. Cancel Anuluj - - - Esc - Esc - LimeReport::TranslationEditor @@ -4089,29 +4197,29 @@ Ten podgląd nie jest już prawidłowy. Ciąg znaków - - + + Attention! Uwaga! - - + + Selected elements have different parent containers Wybrane elementy mają różne pojemniki nadrzędne - + Object with name %1 already exists! Obiekt o nazwie %1 już istnieje! - + Function %1 not found or have wrong arguments Funkcja %1 nie znaleziona lub ma błędne argumenty - + Datasource manager not found Nie znaleziono menedżera źródła danych @@ -4125,17 +4233,17 @@ Ten podgląd nie jest już prawidłowy. - - - + + + mm mm - - - + + + '' " @@ -4166,23 +4274,23 @@ Ten podgląd nie jest już prawidłowy. Eksport do PDF - + Chart Item Element wykresu - + First Pierwszy - + Second Drugi - + Thrid Trzeci @@ -4192,12 +4300,12 @@ Ten podgląd nie jest już prawidłowy. Układ pionowy - + Dark Ciemny - + Light Jasny @@ -4235,5 +4343,30 @@ Ten podgląd nie jest już prawidłowy. Series Serie + + + X Axis + + + + + Y Axis + + + + + X axis + + + + + Y axis + + + + + Axis + + diff --git a/translations/limereport_ru.qm b/translations/limereport_ru.qm index 11bf6f140f33c80dfd85aea38292c136746902d9..39d75115a0ffed81dfc62a36b84d084dc3c53ec0 100644 GIT binary patch delta 6238 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 delta 7493 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 oGw+*4<$Va)Bpeg diff --git a/translations/limereport_ru.ts b/translations/limereport_ru.ts index 1f3a1f8..7e38997 100644 --- a/translations/limereport_ru.ts +++ b/translations/limereport_ru.ts @@ -8,6 +8,49 @@ $ClassName$ + + ChartAxisEditor + + Axis editor + + + + Axis + + + + Reverse direction + + + + Enable scale calculation + + + + Step + + + + Maximum + + + + Minimum + + + + Automatic + + + + Cancel + Отмена + + + Ok + Ок + + ChartItemEditor @@ -54,6 +97,10 @@ Series name Название ряда + + X data field + + ImageItemEditor @@ -161,22 +208,6 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2015 Arin Alexander arin_a@bk.ru</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="SEC1"></a><span style=" font-family:'sans-serif'; font-weight:600;">G</span><span style=" font-family:'sans-serif'; font-weight:600;">NU LESSER GENERAL PUBLIC LICENSE</span></p> @@ -289,6 +320,22 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'sans-serif';">That's all there is to it!</span></p></body></html> + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2021 Arin Alexander. All rights reserved.</span></p></body></html> + + LimeReport::AlignmentPropItem @@ -2050,6 +2097,26 @@ p, li { white-space: pre-wrap; } mixWithPriorPage Смешивать с предыдущей сраницей + + xAxisField + + + + seriesLineWidth + + + + drawPoints + + + + gridChartLines + + + + horizontalAxisOnTop + + LimeReport::RectPropItem @@ -2954,10 +3021,6 @@ This preview is no longer valid. Ctrl+Return - - Esc - - LimeReport::TranslationEditor @@ -3295,5 +3358,25 @@ This preview is no longer valid. SVG Item Элемент SVG избражение + + X Axis + + + + Y Axis + + + + X axis + + + + Y axis + + + + Axis + + diff --git a/translations/limereport_zh.ts b/translations/limereport_zh.ts index 6944a50..bb36f7c 100644 --- a/translations/limereport_zh.ts +++ b/translations/limereport_zh.ts @@ -8,6 +8,49 @@ $ClassName$ + + ChartAxisEditor + + Axis editor + + + + Axis + + + + Reverse direction + + + + Enable scale calculation + + + + Step + + + + Maximum + + + + Minimum + + + + Automatic + + + + Cancel + 取消 + + + Ok + 确定 + + ChartItemEditor @@ -54,6 +97,10 @@ Series name 系列名称 + + X data field + + ImageItemEditor @@ -126,34 +173,6 @@ Lime Report - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;">报表引擎</span></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - QT框架多平台C++库,帮助开发者给应用增加基于模板生成报表及打印报表功能。</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">官方网站: </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">该库基于提供帮助目的发布,但不提供任何担保,不以任何形式提供其适销性或适用于某一特定用途的默示保证。</span></p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">版权 2015 Arin Alexander.所有权利保留.</span></p></body></html> - Author 作者 @@ -296,6 +315,34 @@ p, li { white-space: pre-wrap; } Version 1.1.1 版本 1.1.1 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;"> framework</span></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2021 Arin Alexander. All rights reserved.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600;">报表引擎</span></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - QT框架多平台C++库,帮助开发者给应用增加基于模板生成报表及打印报表功能。</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">官方网站: </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">该库基于提供帮助目的发布,但不提供任何担保,不以任何形式提供其适销性或适用于某一特定用途的默示保证。</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">版权 2015 Arin Alexander.所有权利保留.</span></p></body></html> {3C?} {4.0/?} {3.?} {40/?} {1"?} {9p?} {400;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {100.?} {100"?} {12p?} {600;?} {12p?} {600;?} {7f?} {18;?} {12p?} {600;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {11p?} {0000f?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {11p?} {0000f?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {600;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {600;?} {000000;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {10p?} {2021 ?} + LimeReport::AlignmentPropItem @@ -1345,6 +1392,10 @@ p, li { white-space: pre-wrap; } Set page size to printer 适合打印机纸张大小 + + Mix with prior page + + LimeReport::PreviewReportWidget @@ -2041,6 +2092,38 @@ p, li { white-space: pre-wrap; } removeGap + + xAxisField + + + + seriesLineWidth + + + + drawPoints + + + + dropPrinterMargins + + + + notPrintIfEmpty + + + + gridChartLines + + + + horizontalAxisOnTop + + + + mixWithPriorPage + + LimeReport::RectPropItem @@ -2947,10 +3030,6 @@ This preview is no longer valid. Cancel 取消 - - Esc - - LimeReport::TranslationEditor @@ -3288,5 +3367,25 @@ This preview is no longer valid. Series 数据系列 + + X Axis + + + + Y Axis + + + + X axis + + + + Y axis + + + + Axis + + From 392b3acdfa554e635c8bf616aa86be3c9cb862b1 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Tue, 29 Mar 2022 12:33:34 +0000 Subject: [PATCH 02/26] 29/03 --- limereport/items/lrshapeitem.cpp | 3 +- limereport/lrscriptenginemanager.cpp | 292 ++++++++++++++------------- limereport/lrscriptenginemanager.h | 5 +- translations/limereport_fr.ts | 122 +++++------ translations/limereport_pl.ts | 122 +++++------ 5 files changed, 279 insertions(+), 265 deletions(-) diff --git a/limereport/items/lrshapeitem.cpp b/limereport/items/lrshapeitem.cpp index 6bbee9d..e68169d 100644 --- a/limereport/items/lrshapeitem.cpp +++ b/limereport/items/lrshapeitem.cpp @@ -80,7 +80,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, painter->save(); QPen pen(m_shapeColor); - pen.setWidthF(m_lineWidth); + pen.setWidthF(m_lineWidth+1); pen.setStyle(m_penStyle); pen.setJoinStyle(Qt::MiterJoin); painter->setPen(pen); @@ -89,6 +89,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, painter->setBrush(brush); painter->setBackground(QBrush(Qt::NoBrush)); painter->setOpacity(qreal(opacity())/100); + QRectF rectangleRect = rect().adjusted((lineWidth() / 2), (lineWidth() / 2), -(lineWidth() / 2), diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index 2abc084..5b70554 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -53,8 +53,8 @@ Q_DECLARE_METATYPE(LimeReport::ScriptEngineManager *) #ifdef USE_QTSCRIPTENGINE QScriptValue constructColor(QScriptContext *context, QScriptEngine *engine) { - QColor color(context->argument(0).toString()); - return engine->toScriptValue(color); + QColor color(context->argument(0).toString()); + return engine->toScriptValue(color); } #endif @@ -71,7 +71,7 @@ ScriptEngineNode::~ScriptEngineNode() } ScriptEngineNode*ScriptEngineNode::addChild(const QString& name, const QString& description, - ScriptEngineNode::NodeType type, const QIcon& icon) + ScriptEngineNode::NodeType type, const QIcon& icon) { ScriptEngineNode* res = new ScriptEngineNode(name, description, type,this,icon); m_childs.push_back(res); @@ -218,12 +218,12 @@ ScriptEngineManager::~ScriptEngineManager() bool ScriptEngineManager::isFunctionExists(const QString &functionName) const { return m_functions.contains(functionName); -// foreach (ScriptFunctionDesc desc, m_functions.values()) { -// if (desc.name.compare(functionName,Qt::CaseInsensitive)==0){ -// return true; -// } -// } -// return false; + // foreach (ScriptFunctionDesc desc, m_functions.values()) { + // if (desc.name.compare(functionName,Qt::CaseInsensitive)==0){ + // return true; + // } + // } + // return false; } void ScriptEngineManager::deleteFunction(const QString &functionsName) @@ -244,7 +244,7 @@ bool ScriptEngineManager::addFunction(const JSFunctionDesc &functionDescriber) scriptEngine()->globalObject().setProperty( functionDescriber.managerName(), functionManager - ); + ); } if (functionManager.toQObject() == functionDescriber.manager()){ @@ -275,9 +275,9 @@ bool ScriptEngineManager::addFunction(const JSFunctionDesc &functionDescriber) Q_DECL_DEPRECATED #endif bool ScriptEngineManager::addFunction(const QString& name, - QScriptEngine::FunctionSignature function, - const QString& category, - const QString& description) + QScriptEngine::FunctionSignature function, + const QString& category, + const QString& description) { if (!isFunctionExists(name)){ ScriptFunctionDesc funct; @@ -310,7 +310,7 @@ bool ScriptEngineManager::addFunction(const QString& name, const QString& script funct.description = description; funct.type = ScriptFunctionDesc::Script; m_functions.insert(name, funct); - m_model->updateModel(); + m_model->updateModel(); return true; } else { m_lastError = functionValue.toString(); @@ -321,11 +321,11 @@ bool ScriptEngineManager::addFunction(const QString& name, const QString& script QStringList ScriptEngineManager::functionsNames() { return m_functions.keys(); -// QStringList res; -// foreach(ScriptFunctionDesc func, m_functions){ -// res<groupFunctionNames()){ JSFunctionDesc describer( - func, - tr("GROUP FUNCTIONS"), - func+"(\""+tr("FieldName")+"\",\""+tr("BandName")+"\")", - LimeReport::Const::FUNCTION_MANAGER_NAME, - m_functionManager, - QString("function %1(fieldName, bandName, pageitem){\ - if (typeof pageitem == 'undefined') return %2.calcGroupFunction(\"%1\", fieldName, bandName); \ - else return %2.calcGroupFunction(\"%1\", fieldName, bandName, pageitem);}" - ).arg(func) - .arg(LimeReport::Const::FUNCTION_MANAGER_NAME) - ); - addFunction(describer); + func, + tr("GROUP FUNCTIONS"), + func+"(\""+tr("FieldName")+"\",\""+tr("BandName")+"\")", + LimeReport::Const::FUNCTION_MANAGER_NAME, + m_functionManager, + QString("function %1(fieldName, bandName, pageitem){\ + if (typeof pageitem == 'undefined') return %2.calcGroupFunction(\"%1\", fieldName, bandName); \ + else return %2.calcGroupFunction(\"%1\", fieldName, bandName, pageitem);}" + ).arg(func) + .arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ); + addFunction(describer); } moveQObjectToScript(new DatasourceFunctions(dataManager), LimeReport::Const::DATAFUNCTIONS_MANAGER_NAME); } @@ -368,13 +368,13 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /* switch (expandType){ case EscapeSymbols: context.replace(rx.cap(0),escapeSimbols(varValue.toString())); - break; + break; case NoEscapeSymbols: context.replace(rx.cap(0),varValue.toString()); - break; + break; case ReplaceHTMLSymbols: context.replace(rx.cap(0),replaceHTMLSymbols(varValue.toString())); - break; + break; } pos=0; @@ -400,53 +400,53 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /* #else QRegularExpression rx(Const::VARIABLE_RX); if (context.contains(rx)){ - int pos = 0; - QRegularExpressionMatch match = rx.match(context, pos); - while (match.hasMatch()){ + int pos = 0; + QRegularExpressionMatch match = rx.match(context, pos); + while (match.hasMatch()){ - QString variable=match.captured(1); - pos = match.capturedEnd(); + QString variable=match.captured(1); + pos = match.capturedEnd(); - if (dataManager()->containsVariable(variable) ){ - try { + if (dataManager()->containsVariable(variable) ){ + try { - varValue = dataManager()->variable(variable); - switch (expandType){ - case EscapeSymbols: - context.replace(match.captured(0), escapeSimbols(varValue.toString())); - break; - case NoEscapeSymbols: - context.replace(match.captured(0), varValue.toString()); - break; - case ReplaceHTMLSymbols: - context.replace(match.captured(0), replaceHTMLSymbols(varValue.toString())); - break; - } + varValue = dataManager()->variable(variable); + switch (expandType){ + case EscapeSymbols: + context.replace(match.captured(0), escapeSimbols(varValue.toString())); + break; + case NoEscapeSymbols: + context.replace(match.captured(0), varValue.toString()); + break; + case ReplaceHTMLSymbols: + context.replace(match.captured(0), replaceHTMLSymbols(varValue.toString())); + break; + } - pos = 0; + pos = 0; - } catch (ReportError &e){ - dataManager()->putError(e.what()); - if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings()) - context.replace(match.captured(0), e.what()); - else - context.replace(match.captured(0), ""); - } - } else { + } catch (ReportError &e){ + dataManager()->putError(e.what()); + if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings()) + context.replace(match.captured(0), e.what()); + else + context.replace(match.captured(0), ""); + } + } else { - QString error; - error = tr("Variable %1 not found").arg(variable); - dataManager()->putError(error); - if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings()) - context.replace(match.captured(0), error); - else - context.replace(match.captured(0), ""); - } + QString error; + error = tr("Variable %1 not found").arg(variable); + dataManager()->putError(error); + if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings()) + context.replace(match.captured(0), error); + else + context.replace(match.captured(0), ""); + } - match = rx.match(context, pos); - } - } - return context; + match = rx.match(context, pos); + } + } + return context; #endif } @@ -694,7 +694,12 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){ if (page){ int height = 0; foreach(BandDesignIntf* band, page->bands()){ - height += band->height(); + + if(band->type() == BandDesignIntf::Data) + { + height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount(); + } + else height += band->height(); } return page->height() - height; } else return -1; @@ -717,7 +722,7 @@ void ScriptEngineManager::clearTableOfContents(){ } ScriptValueType ScriptEngineManager::moveQObjectToScript(QObject* object, const QString objectName) -{ +{ ScriptValueType obj = scriptEngine()->globalObject().property(objectName); if (!obj.isNull()) delete obj.toQObject(); ScriptValueType result = scriptEngine()->newQObject(object); @@ -762,7 +767,7 @@ bool ScriptEngineManager::createNumberFomatFunction() " if(typeof(precision)==='undefined') precision=2; " " if(typeof(locale)==='undefined') locale=\"\"; " "return %1.numberFormat(value,format,precision,locale);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -778,7 +783,7 @@ bool ScriptEngineManager::createDateFormatFunction(){ fd.setScriptWrapper(QString("function dateFormat(value, format, locale){" " if(typeof(format)==='undefined') format = \"dd.MM.yyyy\"; " "return %1.dateFormat(value,format, locale);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -794,7 +799,7 @@ bool ScriptEngineManager::createTimeFormatFunction(){ fd.setScriptWrapper(QString("function timeFormat(value, format){" " if(typeof(format)==='undefined') format = \"hh:mm\"; " "return %1.timeFormat(value,format);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -810,7 +815,7 @@ bool ScriptEngineManager::createDateTimeFormatFunction(){ fd.setScriptWrapper(QString("function dateTimeFormat(value, format, locale){" " if(typeof(format)==='undefined') format = \"dd.MM.yyyy hh:mm\"; " "return %1.dateTimeFormat(value, format, locale);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -827,13 +832,13 @@ bool ScriptEngineManager::createSectotimeFormatFunction() fd.setScriptWrapper(QString("function sectotimeFormat(value, format){" " if(typeof(format)==='undefined') format = \"hh:mm:ss\"; " "return %1.sectotimeFormat(value,format);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } bool ScriptEngineManager::createDateFunction(){ -// addFunction("date",date,"DATE&TIME","date()"); + // addFunction("date",date,"DATE&TIME","date()"); JSFunctionDesc fd; fd.setManager(m_functionManager); @@ -843,14 +848,14 @@ bool ScriptEngineManager::createDateFunction(){ fd.setDescription("date()"); fd.setScriptWrapper(QString("function date(){" "return %1.date();}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } bool ScriptEngineManager::createNowFunction(){ -// addFunction("now",now,"DATE&TIME","now()"); + // addFunction("now",now,"DATE&TIME","now()"); JSFunctionDesc fd; fd.setManager(m_functionManager); @@ -860,13 +865,13 @@ bool ScriptEngineManager::createNowFunction(){ fd.setDescription("now()"); fd.setScriptWrapper(QString("function now(){" "return %1.now();}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } bool ScriptEngineManager::createCurrencyFormatFunction(){ -// addFunction("currencyFormat",currencyFormat,"NUMBER","currencyFormat(\""+tr("Value")+"\",\""+tr("Locale")+"\")"); + // addFunction("currencyFormat",currencyFormat,"NUMBER","currencyFormat(\""+tr("Value")+"\",\""+tr("Locale")+"\")"); JSFunctionDesc fd; fd.setManager(m_functionManager); @@ -877,13 +882,13 @@ bool ScriptEngineManager::createCurrencyFormatFunction(){ fd.setScriptWrapper(QString("function currencyFormat(value, locale){" " if(typeof(locale)==='undefined') locale = \"\"; " "return %1.currencyFormat(value,locale);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } bool ScriptEngineManager::createCurrencyUSBasedFormatFunction(){ -// addFunction("currencyUSBasedFormat",currencyUSBasedFormat,"NUMBER","currencyUSBasedFormat(\""+tr("Value")+",\""+tr("CurrencySymbol")+"\")"); + // addFunction("currencyUSBasedFormat",currencyUSBasedFormat,"NUMBER","currencyUSBasedFormat(\""+tr("Value")+",\""+tr("CurrencySymbol")+"\")"); JSFunctionDesc fd; fd.setManager(m_functionManager); @@ -894,13 +899,13 @@ bool ScriptEngineManager::createCurrencyUSBasedFormatFunction(){ fd.setScriptWrapper(QString("function currencyUSBasedFormat(value, currencySymbol){" " if(typeof(currencySymbol)==='undefined') currencySymbol = \"\"; " "return %1.currencyUSBasedFormat(value,currencySymbol);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } bool ScriptEngineManager::createSetVariableFunction(){ -// addFunction("setVariable", setVariable, "GENERAL", "setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")"); + // addFunction("setVariable", setVariable, "GENERAL", "setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")"); JSFunctionDesc fd; fd.setManager(m_functionManager); @@ -910,7 +915,7 @@ bool ScriptEngineManager::createSetVariableFunction(){ fd.setDescription("setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")"); fd.setScriptWrapper(QString("function setVariable(name, value){" "return %1.setVariable(name,value);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -925,7 +930,7 @@ bool ScriptEngineManager::createGetVariableFunction() fd.setDescription("getVariable(\""+tr("Name")+"\")"); fd.setScriptWrapper(QString("function getVariable(name){" "return %1.getVariable(name);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -940,7 +945,7 @@ bool ScriptEngineManager::createGetFieldFunction() fd.setDescription("getField(\""+tr("Name")+"\")"); fd.setScriptWrapper(QString("function getField(name){" "return %1.getField(name);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -956,10 +961,10 @@ bool ScriptEngineManager::createGetFieldByKeyFunction() tr("ValueField")+"\",\""+ tr("KeyField")+"\", \""+ tr("KeyFieldValue")+"\")" - ); + ); fd.setScriptWrapper(QString("function getFieldByKeyField(datasource, valueFieldName, keyFieldName, keyValue){" "return %1.getFieldByKeyField(datasource, valueFieldName, keyFieldName, keyValue);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -973,10 +978,10 @@ bool ScriptEngineManager::createGetFieldByRowIndex() fd.setName("getFieldByRowIndex"); fd.setDescription("getFieldByRowIndex(\""+tr("FieldName")+"\", \""+ tr("RowIndex")+"\")" - ); + ); fd.setScriptWrapper(QString("function getFieldByRowIndex(fieldName, rowIndex){" "return %1.getFieldByRowIndex(fieldName, rowIndex);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -991,7 +996,7 @@ bool ScriptEngineManager::createAddBookmarkFunction() fd.setDescription("addBookmark(\""+tr("Unique identifier")+" \""+tr("Content")+"\")"); fd.setScriptWrapper(QString("function addBookmark(uniqKey, content){" "return %1.addBookmark(uniqKey, content);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -1006,7 +1011,7 @@ bool ScriptEngineManager::createFindPageIndexByBookmark() fd.setDescription("findPageIndexByBookmark(\""+tr("Unique identifier")+"\")"); fd.setScriptWrapper(QString("function findPageIndexByBookmark(uniqKey){" "return %1.findPageIndexByBookmark(uniqKey);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -1021,7 +1026,7 @@ bool ScriptEngineManager::createAddTableOfContentsItemFunction() fd.setDescription("addTableOfContentsItem(\""+tr("Unique identifier")+" \""+tr("Content")+"\", \""+tr("Indent")+"\")"); fd.setScriptWrapper(QString("function addTableOfContentsItem(uniqKey, content, indent){" "return %1.addTableOfContentsItem(uniqKey, content, indent);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -1036,7 +1041,7 @@ bool ScriptEngineManager::createClearTableOfContentsFunction() fd.setDescription("clearTableOfContents()"); fd.setScriptWrapper(QString("function clearTableOfContents(){" "return %1.clearTableOfContents();}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -1051,7 +1056,7 @@ bool ScriptEngineManager::createReopenDatasourceFunction() fd.setDescription("reopenDatasource(\""+tr("datasourceName")+"\")"); fd.setScriptWrapper(QString("function reopenDatasource(datasourceName){" "return %1.reopenDatasource(datasourceName);}" - ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) + ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ); return addFunction(fd); } @@ -1064,7 +1069,7 @@ ScriptEngineManager::ScriptEngineManager() m_functionManager->setScriptEngineManager(this); #ifdef USE_QTSCRIPTENGINE m_scriptEngine->setDefaultPrototype(qMetaTypeId(), - m_scriptEngine->newQObject(new ComboBoxPrototype())); + m_scriptEngine->newQObject(new ComboBoxPrototype())); #endif createLineFunction(); createNumberFomatFunction(); @@ -1117,7 +1122,7 @@ bool ScriptExtractor::parse(int &curPos, const State& state, ScriptNode::Ptr scr return true; } else { if (m_context[curPos]=='{') - extractBracket(curPos, scriptNode); + extractBracket(curPos, scriptNode); } case None: if (m_context[curPos]=='$'){ @@ -1522,16 +1527,16 @@ void ScriptEngineContext::qobjectToScript(const QString& name, QObject *item) { ScriptEngineType* engine = ScriptEngineManager::instance().scriptEngine(); #ifdef USE_QJSENGINE - ScriptValueType sItem = getJSValue(*engine, item); - engine->globalObject().setProperty(name, sItem); + ScriptValueType sItem = getJSValue(*engine, item); + engine->globalObject().setProperty(name, sItem); #else - ScriptValueType sItem = engine->globalObject().property(name); - if (sItem.isValid()){ - engine->newQObject(sItem, item); - } else { - sItem = engine->newQObject(item); - engine->globalObject().setProperty(name,sItem); - } + ScriptValueType sItem = engine->globalObject().property(name); + if (sItem.isValid()){ + engine->newQObject(sItem, item); + } else { + sItem = engine->newQObject(item); + engine->globalObject().setProperty(name,sItem); + } #endif } @@ -1574,17 +1579,17 @@ bool ScriptEngineContext::runInitScript(){ #ifdef USE_QJSENGINE if (res.isError()){ QMessageBox::critical(0,tr("Error"), - QString("Line %1: %2 ").arg(res.property("lineNumber").toString()) - .arg(res.toString()) - ); + QString("Line %1: %2 ").arg(res.property("lineNumber").toString()) + .arg(res.toString()) + ); return false; } #else if (engine->hasUncaughtException()) { QMessageBox::critical(0,tr("Error"), - QString("Line %1: %2 ").arg(engine->uncaughtExceptionLineNumber()) - .arg(engine->uncaughtException().toString()) - ); + QString("Line %1: %2 ").arg(engine->uncaughtExceptionLineNumber()) + .arg(engine->uncaughtException().toString()) + ); return false; } #endif @@ -1987,28 +1992,28 @@ void TableOfContents::slotOneSlotDS(CallbackInfo info, QVariant& data) columns << "Content" << "Page number" << "Content Key"; switch (info.dataType) { - case LimeReport::CallbackInfo::RowCount: - data = m_tableOfContents.count(); - break; - case LimeReport::CallbackInfo::ColumnCount: - data = columns.size(); - break; - case LimeReport::CallbackInfo::ColumnHeaderData: { - data = columns.at(info.index); - break; + case LimeReport::CallbackInfo::RowCount: + data = m_tableOfContents.count(); + break; + case LimeReport::CallbackInfo::ColumnCount: + data = columns.size(); + break; + case LimeReport::CallbackInfo::ColumnHeaderData: { + data = columns.at(info.index); + break; + } + case LimeReport::CallbackInfo::ColumnData: + if (info.index < m_tableOfContents.count()){ + ContentItem* item = m_tableOfContents.at(info.index); + if (info.columnName.compare("Content",Qt::CaseInsensitive) == 0) + data = item->content.rightJustified(item->indent+item->content.size()); + if (info.columnName.compare("Content Key",Qt::CaseInsensitive) == 0) + data = item->uniqKey; + if (info.columnName.compare("Page number",Qt::CaseInsensitive) == 0) + data = QString::number(item->pageNumber); } - case LimeReport::CallbackInfo::ColumnData: - if (info.index < m_tableOfContents.count()){ - ContentItem* item = m_tableOfContents.at(info.index); - if (info.columnName.compare("Content",Qt::CaseInsensitive) == 0) - data = item->content.rightJustified(item->indent+item->content.size()); - if (info.columnName.compare("Content Key",Qt::CaseInsensitive) == 0) - data = item->uniqKey; - if (info.columnName.compare("Page number",Qt::CaseInsensitive) == 0) - data = QString::number(item->pageNumber); - } - break; - default: break; + break; + default: break; } } @@ -2060,6 +2065,13 @@ bool DatasourceFunctions::isEOF(const QString &datasourceName) return true; } +int DatasourceFunctions::rowCount(const QString &datasourceName) +{ + if (m_dataManager && m_dataManager->dataSource(datasourceName)) + return m_dataManager->dataSource(datasourceName)->model()->rowCount(); + return 0; +} + bool DatasourceFunctions::invalidate(const QString& datasourceName) { if (m_dataManager && m_dataManager->dataSource(datasourceName)){ diff --git a/limereport/lrscriptenginemanager.h b/limereport/lrscriptenginemanager.h index 7c3bccd..dc75bc5 100644 --- a/limereport/lrscriptenginemanager.h +++ b/limereport/lrscriptenginemanager.h @@ -209,7 +209,7 @@ public: bool hasChanges(){ return m_hasChanges;} ReportPages* reportPages() const; void setReportPages(ReportPages* value); -#ifdef HAVE_UI_LOADER +#ifdef HAVE_UI_LOADER signals: void dialogNameChanged(QString dialogName); void dialogDeleted(QString dialogName); @@ -337,6 +337,7 @@ public: Q_INVOKABLE bool next(const QString& datasourceName); Q_INVOKABLE bool prior(const QString& datasourceName); Q_INVOKABLE bool isEOF(const QString& datasourceName); + Q_INVOKABLE int rowCount(const QString& datasourceName); Q_INVOKABLE bool invalidate(const QString& datasourceName); Q_INVOKABLE QObject *createTableBuilder(QObject *horizontalLayout); private: @@ -441,7 +442,7 @@ private: }; class ScriptEngineManager : public QObject, public Singleton, public IScriptEngineManager -{ +{ Q_OBJECT public: friend class Singleton; diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 9648930..7b4a799 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -3422,13 +3422,13 @@ Cet aperçu n'est plus valide. LimeReport::ScriptEngineContext - + Dialog with name: %1 can`t be created Le dialogue avec le nom "%1" ne peut pas être crée - - + + Error Erreur @@ -3441,20 +3441,20 @@ Cet aperçu n'est plus valide. Fonctions de groupe - - - - - - - - + + + + + + + + Value Valeur - + BandName Nom de la bande @@ -3465,7 +3465,7 @@ Cet aperçu n'est plus valide. - + FieldName Nom du champ @@ -3482,120 +3482,120 @@ Cet aperçu n'est plus valide. Champ "%1 introuvable dans %2! - + SYSTEM Système - - - + + + NUMBER Nombre - - - - - + + + + + Format - + Precision Précision - - - - + + + + Locale Local - - - - - - + + + + + + DATE&TIME Date&Heure - + CurrencySymbol Symbolde de la monnaie - - - - - - - - - - + + + + + + + + + + GENERAL General - - - + + + Name Nom - + Datasource Source de donnée - + ValueField Valeur - + KeyField Clé - + KeyFieldValue Valeur de la clé - + RowIndex - - - + + + Unique identifier Identifiant unique - - + + Content Contenu - + Indent Indenter - + datasourceName Nom de source de donnée @@ -4202,12 +4202,12 @@ Cet aperçu n'est plus valide. L'objet avec le nom "%1" existe déja! - + Function %1 not found or have wrong arguments La fonction %1 est introuvable ou contient des paramètres incorrects - + Datasource manager not found Gestionnaire de source de donnée introuvable diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 50f570a..f3d44c9 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -3434,13 +3434,13 @@ Ten podgląd nie jest już prawidłowy. LimeReport::ScriptEngineContext - + Dialog with name: %1 can`t be created Okno dialogowe z nazwą:%1 nie można utworzyć - - + + Error Błąd @@ -3453,20 +3453,20 @@ Ten podgląd nie jest już prawidłowy. FUNKCJE GRUPUJĄCE - - - - - - - - + + + + + + + + Value Wartość - + BandName Nazwa sekcji @@ -3477,7 +3477,7 @@ Ten podgląd nie jest już prawidłowy. - + FieldName Nazwa pola @@ -3494,120 +3494,120 @@ Ten podgląd nie jest już prawidłowy. Pole %1 nie znalezione w %2! - + SYSTEM SYSTEM - - - + + + NUMBER LICZBA - - - - - + + + + + Format Format - + Precision Precyzja - - - - + + + + Locale Ustawienia lokalne - - - - - - + + + + + + DATE&TIME Data i czas - + Datasource Źródło danych - + ValueField Pole wartości - + KeyField Pole klucza - + KeyFieldValue Wartość pola klucza - + RowIndex Indeks wiersza - - - + + + Unique identifier Unikalny identyfikator - - + + Content Zawartość - + Indent Akapit - + datasourceName Nazwa źródła danych - + CurrencySymbol Symbol waluty - - - - - - - - - - + + + + + + + + + + GENERAL OGÓLNY - - - + + + Name Nazwa @@ -4214,12 +4214,12 @@ Ten podgląd nie jest już prawidłowy. Obiekt o nazwie %1 już istnieje! - + Function %1 not found or have wrong arguments Funkcja %1 nie znaleziona lub ma błędne argumenty - + Datasource manager not found Nie znaleziono menedżera źródła danych From 7f879ab4c1edfcb12d81bd5e063bb06f5021df86 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Fri, 1 Apr 2022 12:49:50 +0000 Subject: [PATCH 03/26] 01/04 --- limereport/lrbasedesignintf.cpp | 4 ++++ translations/limereport_fr.ts | 22 +++++++++++----------- translations/limereport_pl.ts | 22 +++++++++++----------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 2039479..c87a081 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -1170,6 +1170,9 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); pen.setStyle(m_borderStyle); + if(m_borderLineSize == 0) + pen.setStyle(Qt::NoPen); + pen.setWidth(m_borderLineSize+1); } else { pen.setColor(Qt::darkGray); @@ -1741,6 +1744,7 @@ void Marker::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) painter->drawRect(rect()); painter->setBrush(color()); painter->setPen(Qt::transparent); + painter->setRenderHint(QPainter::HighQualityAntialiasing); painter->setOpacity(1); painter->drawRect(QRectF(-markerSize,-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().right()-markerSize,rect().bottom()-markerSize,markerSize*2,markerSize*2)); diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 7b4a799..bf17dc2 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index f3d44c9..58152dc 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie From b58ac7c53da986eeb8d6965f54df7e77457035e0 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Fri, 8 Apr 2022 10:26:58 +0000 Subject: [PATCH 04/26] 08/04 --- limereport/lrbasedesignintf.cpp | 10 ++++------ translations/limereport_fr.ts | 22 +++++++++++----------- translations/limereport_pl.ts | 22 +++++++++++----------- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index c87a081..7c7c2eb 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -1067,6 +1067,7 @@ void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const if(isShapeItem()) return; painter->setPen(borderPen(RightLine)); + painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height()); } @@ -1170,14 +1171,11 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); pen.setStyle(m_borderStyle); - if(m_borderLineSize == 0) - pen.setStyle(Qt::NoPen); - - pen.setWidth(m_borderLineSize+1); + pen.setWidthF(m_borderLineSize * 1.33333333); } else { pen.setColor(Qt::darkGray); pen.setStyle(Qt::SolidLine); - pen.setWidth(1); + pen.setWidthF(1); } return pen; } @@ -1744,7 +1742,7 @@ void Marker::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) painter->drawRect(rect()); painter->setBrush(color()); painter->setPen(Qt::transparent); - painter->setRenderHint(QPainter::HighQualityAntialiasing); + painter->setOpacity(1); painter->drawRect(QRectF(-markerSize,-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().right()-markerSize,rect().bottom()-markerSize,markerSize*2,markerSize*2)); diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index bf17dc2..714b160 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 58152dc..0eca354 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie From cb66b1fd2a83f42578d58ca72e37ad0745974cc4 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Wed, 27 Apr 2022 21:44:32 +0100 Subject: [PATCH 05/26] border width has been improved --- designer/main.cpp | 14 +++++++------- limereport/lrbasedesignintf.cpp | 5 +++-- translations/limereport_fr.ts | 22 +++++++++++----------- translations/limereport_pl.ts | 22 +++++++++++----------- 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/designer/main.cpp b/designer/main.cpp index 57a32c1..96e73e4 100644 --- a/designer/main.cpp +++ b/designer/main.cpp @@ -11,9 +11,9 @@ int main(int argc, char *argv[]) QTranslator limeReportTranslator; QTranslator qtBaseTranslator; - QTranslator qtDesignerTranslator; - QTranslator qtLinguistTranslator; - + QTranslator qtDesignerTranslator; + QTranslator qtLinguistTranslator; + QString translationPath = QApplication::applicationDirPath(); translationPath.append("/translations"); Qt::LayoutDirection layoutDirection = QLocale::system().textDirection(); @@ -22,12 +22,12 @@ int main(int argc, char *argv[]) if (limeReportTranslator.load("limereport_"+designerTranslation, translationPath)){ qtBaseTranslator.load("qtbase_" + designerTranslation, translationPath); - qtDesignerTranslator.load("designer_"+designerTranslation,translationPath); - + qtDesignerTranslator.load("designer_"+designerTranslation,translationPath); + a.installTranslator(&qtBaseTranslator); - a.installTranslator(&qtDesignerTranslator); + a.installTranslator(&qtDesignerTranslator); a.installTranslator(&limeReportTranslator); - + Qt::LayoutDirection layoutDirection = QLocale(manager.getCurrentDefaultLanguage()).textDirection(); a.setLayoutDirection(layoutDirection); } diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 7c7c2eb..00c4931 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -426,6 +426,7 @@ void BaseDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *o Q_UNUSED(option); Q_UNUSED(widget); ppainter->save(); + ppainter->setRenderHint(QPainter::HighQualityAntialiasing); setupPainter(ppainter); drawBorder(ppainter, rect()); // if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);} @@ -1171,11 +1172,11 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); pen.setStyle(m_borderStyle); - pen.setWidthF(m_borderLineSize * 1.33333333); + pen.setWidthF(m_borderLineSize*1.333); } else { pen.setColor(Qt::darkGray); pen.setStyle(Qt::SolidLine); - pen.setWidthF(1); + pen.setWidth(1); } return pen; } diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 714b160..ea77d2d 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 0eca354..4d91f17 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie From 52f43f946b41f210734e83e0712ee959a035f0a8 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Sat, 30 Apr 2022 12:46:49 +0100 Subject: [PATCH 06/26] fixed border render when scaling --- limereport/lrbasedesignintf.cpp | 4 +++- limereport/lrpagedesignintf.cpp | 9 ++++---- limereport/lrpreviewreportwidget.cpp | 6 +++-- limereport/lrreportdesignwidget.cpp | 1 + translations/limereport_fr.ts | 34 ++++++++++++++-------------- translations/limereport_pl.ts | 34 ++++++++++++++-------------- 6 files changed, 47 insertions(+), 41 deletions(-) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 00c4931..73d4ade 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -1172,7 +1172,9 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); pen.setStyle(m_borderStyle); - pen.setWidthF(m_borderLineSize*1.333); + pen.setCosmetic(true); + pen.setWidthF(m_borderLineSize); + } else { pen.setColor(Qt::darkGray); pen.setStyle(Qt::SolidLine); diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 6e7477b..2427d67 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -98,6 +98,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent): updatePageRect(); connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); setBackgroundBrush(QBrush(Qt::white)); + } PageDesignIntf::~PageDesignIntf() @@ -355,7 +356,7 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) ); } } else { - if (m_insertMode) m_itemInsertRect->setVisible(false); + if (m_insertMode) m_itemInsertRect->setVisible(false); } QGraphicsScene::mouseMoveEvent(event); @@ -751,7 +752,7 @@ void PageDesignIntf::dropEvent(QGraphicsSceneDragDropEvent* event) bool isVar = event->mimeData()->text().indexOf("variable:")==0; BaseDesignIntf* item = addReportItem("TextItem",event->scenePos(),QSize(250, 50)); TextItem* ti = dynamic_cast(item); - QString data = event->mimeData()->text().remove(0,event->mimeData()->text().indexOf(":")+1); + QString data = event->mimeData()->text().remove(0,event->mimeData()->text().indexOf(":")+1); #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) if (isVar) data = data.remove(QRegExp(" \\[.*\\]")); #else @@ -944,7 +945,7 @@ CommandIf::Ptr PageDesignIntf::createChangePosCommand() newPos.pos = reportItem->pos(); newPoses.append(newPos); } - } + } return PosChangedCommand::create(this, m_positionStamp, newPoses); } @@ -2651,7 +2652,7 @@ bool BandMoveFromToCommand::doIt() void BandMoveFromToCommand::undoIt() { if (page() && page()->pageItem()) - page()->pageItem()->moveBandFromTo(reverceFrom, reverceTo); + page()->pageItem()->moveBandFromTo(reverceFrom, reverceTo); } } diff --git a/limereport/lrpreviewreportwidget.cpp b/limereport/lrpreviewreportwidget.cpp index bed200e..4b2ff39 100644 --- a/limereport/lrpreviewreportwidget.cpp +++ b/limereport/lrpreviewreportwidget.cpp @@ -21,7 +21,7 @@ namespace LimeReport { bool PreviewReportWidgetPrivate::pageIsVisible(){ QGraphicsView* view = q_ptr->ui->graphicsView; - if ( m_currentPage-1 >= m_reportPages.size() || m_currentPage <= 0 ) + if ( m_currentPage-1 >= m_reportPages.size() || m_currentPage <= 0 ) return false; PageItemDesignIntf::Ptr page = m_reportPages.at(m_currentPage-1); return page->mapToScene(page->rect()).boundingRect().intersects( @@ -103,6 +103,7 @@ PreviewReportWidget::PreviewReportWidget(ReportEngine *report, QWidget *parent) d_ptr->m_zoomer = new GraphicsViewZoomer(ui->graphicsView); connect(d_ptr->m_zoomer, SIGNAL(zoomed(double)), this, SLOT(slotZoomed(double))); connect(&m_resizeTimer, SIGNAL(timeout()), this, SLOT(resizeDone())); + } PreviewReportWidget::~PreviewReportWidget() @@ -151,6 +152,7 @@ void PreviewReportWidget::initPreview() ui->graphicsView->centerOn(0, 0); ui->graphicsView->scene()->setBackgroundBrush(QColor(m_previewPageBackgroundColor)); setScalePercent(d_ptr->m_scalePercent); + PageDesignIntf* page = dynamic_cast(ui->graphicsView->scene()); if (page) connect(page, SIGNAL(itemInserted(LimeReport::PageDesignIntf*, QPointF, QString)), @@ -236,7 +238,7 @@ void PreviewReportWidget::printPages(QPrinter* printer) } void PreviewReportWidget::print() -{ +{ QPrinterInfo pi; QPrinter lp(QPrinter::HighResolution); diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index 6b7c608..19c3a3e 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -1119,6 +1119,7 @@ bool PageView::viewportEvent(QEvent *event) m_verticalRuller->setGeometry(0, y+20, 20, (height - y)); m_verticalRuller->update(); m_horizontalRuller->update(); + } break; default: diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index ea77d2d..bf7fd1d 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures @@ -1740,12 +1740,12 @@ p, li { white-space: pre-wrap; } Formulaire - + %1 file name %1 nom de fichier - + Report file name Nom du fichier du rapport @@ -4185,14 +4185,14 @@ Cet aperçu n'est plus valide. - - + + Attention! - - + + Selected elements have different parent containers Les éléments sélectionnés ont un parent différent diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 4d91f17..e6492dd 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie @@ -1752,12 +1752,12 @@ p, li { white-space: pre-wrap; } Formatka - + %1 file name %1 nazwa pliku - + Report file name Nazwa pliku raportu @@ -4197,14 +4197,14 @@ Ten podgląd nie jest już prawidłowy. Ciąg znaków - - + + Attention! Uwaga! - - + + Selected elements have different parent containers Wybrane elementy mają różne pojemniki nadrzędne From db571576903e980332ef036af1b9517af452ab77 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Wed, 4 May 2022 18:21:14 +0100 Subject: [PATCH 07/26] added shadow property for baseitem --- limereport/items/lrshapeitem.cpp | 2 +- limereport/lrbasedesignintf.cpp | 151 ++++++++++++++++++---------- limereport/lrbasedesignintf.h | 7 +- limereport/lrpageitemdesignintf.cpp | 24 +++++ translations/limereport_fr.ts | 46 ++++----- translations/limereport_pl.ts | 46 ++++----- 6 files changed, 174 insertions(+), 102 deletions(-) diff --git a/limereport/items/lrshapeitem.cpp b/limereport/items/lrshapeitem.cpp index e68169d..6c6b46e 100644 --- a/limereport/items/lrshapeitem.cpp +++ b/limereport/items/lrshapeitem.cpp @@ -80,7 +80,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, painter->save(); QPen pen(m_shapeColor); - pen.setWidthF(m_lineWidth+1); + pen.setWidthF(m_lineWidth); pen.setStyle(m_penStyle); pen.setJoinStyle(Qt::MiterJoin); painter->setPen(pen); diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 73d4ade..c51f27c 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -87,7 +87,8 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_unitType(Millimeters), m_itemGeometryLocked(false), m_isChangingPos(false), - m_isMoveable(false) + m_isMoveable(false), + m_shadow(false) { @@ -103,7 +104,7 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q QRectF BaseDesignIntf::boundingRect() const { qreal halfpw = pen().widthF() / 2; - halfpw += 2; + halfpw += 2; return rect().adjusted(-halfpw, -halfpw, halfpw, halfpw); } @@ -426,16 +427,17 @@ void BaseDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *o Q_UNUSED(option); Q_UNUSED(widget); ppainter->save(); - ppainter->setRenderHint(QPainter::HighQualityAntialiasing); setupPainter(ppainter); drawBorder(ppainter, rect()); -// if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);} -// if (isSelected() && !m_joinMarkerOn) {drawMarker(ppainter, Const::SELECTION_COLOR);} + if(m_shadow) + drawShadow(ppainter, rect()); + // if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);} + // if (isSelected() && !m_joinMarkerOn) {drawMarker(ppainter, Const::SELECTION_COLOR);} drawResizeZone(ppainter); ppainter->restore(); -// if (m_hovered) ppainter->drawImage( -// QRectF(QPointF(rect().topRight().x()-24, rect().bottomLeft().y()-24), -// QSizeF(24, 24)),QImage(":/items/images/settings.png")); + // if (m_hovered) ppainter->drawImage( + // QRectF(QPointF(rect().topRight().x()-24, rect().bottomLeft().y()-24), + // QSizeF(24, 24)),QImage(":/items/images/settings.png")); } QColor calcColor(QColor color){ @@ -445,9 +447,9 @@ QColor calcColor(QColor color){ int B = color.blue(); if (0.222*R + 0.707*G + 0.071*B <= 127) - return Qt::white; + return Qt::white; else - return Qt::black; + return Qt::black; } void BaseDesignIntf::prepareRect(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) @@ -488,22 +490,22 @@ void BaseDesignIntf::hoverMoveEvent(QGraphicsSceneHoverEvent *event) case ResizeRight: case ResizeLeft: setCursor(Qt::SizeHorCursor); - break; + break; case ResizeBottom: case ResizeTop: setCursor(Qt::SizeVerCursor); - break; + break; case ResizeRight | ResizeBottom: case ResizeLeft | ResizeTop: setCursor(Qt::SizeFDiagCursor); - break; + break; case ResizeLeft | ResizeBottom: case ResizeRight | ResizeTop: setCursor(Qt::SizeBDiagCursor); - break; + break; default: setCursor(Qt::ArrowCursor); - break; + break; } } } @@ -513,7 +515,7 @@ void BaseDesignIntf::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void BaseDesignIntf::invalidateRects(QVector rects) { foreach(QRectF * rect, rects) - scene()->update(mapToScene(*rect).boundingRect()); + scene()->update(mapToScene(*rect).boundingRect()); } void BaseDesignIntf::hoverLeaveEvent(QGraphicsSceneHoverEvent *) @@ -546,8 +548,8 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (m_resizeDirectionFlags & ResizeLeft) { if ((event->scenePos().x()) <= (mapToScene(0, 0).x() + (width() - Const::MINIMUM_ITEM_WIDTH)) && - (width() + (event->lastScenePos().x() - event->scenePos().x()) > Const::MINIMUM_ITEM_WIDTH) - ) { + (width() + (event->lastScenePos().x() - event->scenePos().x()) > Const::MINIMUM_ITEM_WIDTH) + ) { qreal posRightCorner = mapToScene(0, 0).x() + width(); qreal posLeftCorner = div(mapToParent(event->pos()).x(), hStep).quot * hStep; if (posLeftCorner < 0 ) @@ -559,15 +561,15 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (m_resizeDirectionFlags & ResizeRight) { if ((event->scenePos().x() >= (mapToScene(0, 0).x() + Const::MINIMUM_ITEM_WIDTH)) || - (event->scenePos().x() >= (mapToScene(0, 0).x() + width()))) { + (event->scenePos().x() >= (mapToScene(0, 0).x() + width()))) { setWidth(div(event->scenePos().x() - mapToScene(0, 0).x(), hStep).quot * hStep); } } if (m_resizeDirectionFlags & ResizeTop) { if ((event->scenePos().y()) <= (mapToScene(0, 0).y() + (height() - Const::MINIMUM_ITEM_HEIGHT)) && - (height() + (event->lastScenePos().y() - event->scenePos().y()) > Const::MINIMUM_ITEM_HEIGHT) - ) { + (height() + (event->lastScenePos().y() - event->scenePos().y()) > Const::MINIMUM_ITEM_HEIGHT) + ) { qreal posBottomCorner = mapToScene(0, 0).y() + height(); qreal posTopCorner = div(mapToParent(event->pos()).y(), vStep).quot * vStep; if (posTopCorner < 0 ) @@ -579,8 +581,8 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (m_resizeDirectionFlags & ResizeBottom) { if ((event->scenePos().y() > (mapToScene(0, 0).y() + height())) || - (event->scenePos().y() > (mapToScene(0, 0).y() + Const::MINIMUM_ITEM_HEIGHT)) - ) { + (event->scenePos().y() > (mapToScene(0, 0).y() + Const::MINIMUM_ITEM_HEIGHT)) + ) { setHeight(div(event->scenePos().y() - mapToScene(0, 0).y(), vStep).quot * vStep); } } @@ -656,11 +658,11 @@ Qt::CursorShape BaseDesignIntf::getPossibleCursor(int cursorFlags) if ((cursorFlags == Fixed) || (scene()->selectedItems().count() > 1)) return Qt::ArrowCursor; if (((cursorFlags & ResizeRight) && (cursorFlags & ResizeTop)) || - ((cursorFlags & ResizeLeft) && (cursorFlags & ResizeBottom))) { + ((cursorFlags & ResizeLeft) && (cursorFlags & ResizeBottom))) { return Qt::SizeBDiagCursor; } if (((cursorFlags & ResizeLeft) && (cursorFlags & ResizeTop)) || - ((cursorFlags & ResizeRight) && (cursorFlags & ResizeBottom))) { + ((cursorFlags & ResizeRight) && (cursorFlags & ResizeBottom))) { return Qt::SizeFDiagCursor; } if ((cursorFlags & ResizeLeft) || (cursorFlags & ResizeRight)) { return Qt::SizeHorCursor; } @@ -705,7 +707,7 @@ QPointF BaseDesignIntf::modifyPosForAlignedItem(const QPointF& pos){ case ParentWidthItemAlign: result.setX(leftBorder); case DesignedItemAlign: - break; + break; } } return result; @@ -753,7 +755,7 @@ void BaseDesignIntf::updatePossibleDirectionFlags(){ setPossibleResizeDirectionFlags(ResizeBottom|ResizeTop); case CenterItemAlign: case DesignedItemAlign: - break; + break; } } @@ -772,6 +774,21 @@ bool BaseDesignIntf::isShapeItem() const return QString(metaObject()->className()) == "LimeReport::ShapeItem"; } +bool BaseDesignIntf::hasShadow() +{ + return m_shadow; +} + +void BaseDesignIntf::setShadow(bool sh) +{ + if (m_shadow != sh){ + bool oldValue = m_shadow; + m_shadow = sh; + notify("shadow",oldValue,m_shadow); + update(); + } +} + bool BaseDesignIntf::isGeometryLocked() const { return m_itemGeometryLocked; @@ -996,7 +1013,7 @@ void BaseDesignIntf::moveUp() void BaseDesignIntf::sizeRight() { if ((m_possibleResizeDirectionFlags & ResizeLeft) || - (m_possibleResizeDirectionFlags & ResizeRight)) { + (m_possibleResizeDirectionFlags & ResizeRight)) { if (page()) setWidth(width() + page()->horizontalGridStep()); } } @@ -1004,7 +1021,7 @@ void BaseDesignIntf::sizeRight() void BaseDesignIntf::sizeLeft() { if ((m_possibleResizeDirectionFlags & ResizeLeft) || - (m_possibleResizeDirectionFlags & ResizeRight)) { + (m_possibleResizeDirectionFlags & ResizeRight)) { if(page()) setWidth(width() - page()->horizontalGridStep()); } } @@ -1012,7 +1029,7 @@ void BaseDesignIntf::sizeLeft() void BaseDesignIntf::sizeUp() { if ((m_possibleResizeDirectionFlags & ResizeTop) || - (m_possibleResizeDirectionFlags & ResizeBottom)) { + (m_possibleResizeDirectionFlags & ResizeBottom)) { if (page()) setHeight(height() - page()->verticalGridStep()); } } @@ -1020,7 +1037,7 @@ void BaseDesignIntf::sizeUp() void BaseDesignIntf::sizeDown() { if ((m_possibleResizeDirectionFlags & ResizeTop) || - (m_possibleResizeDirectionFlags & ResizeBottom)) { + (m_possibleResizeDirectionFlags & ResizeBottom)) { if (page()) setHeight(height() + page()->verticalGridStep()); } } @@ -1050,7 +1067,7 @@ Qt::PenStyle BaseDesignIntf::borderStyle() const void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const { if(isShapeItem()) - return; + return; painter->setPen(borderPen(TopLine)); painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y()); } @@ -1058,7 +1075,7 @@ void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const { if(isShapeItem()) - return; + return; painter->setPen(borderPen(BottomLine)); painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height()); } @@ -1066,7 +1083,7 @@ void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const { if(isShapeItem()) - return; + return; painter->setPen(borderPen(RightLine)); painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height()); @@ -1075,7 +1092,7 @@ void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const { if(isShapeItem()) - return; + return; painter->setPen(borderPen(LeftLine)); painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height()); } @@ -1083,7 +1100,7 @@ void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const { if(isShapeItem()) - return; + return; drawTopLine(painter, rect); drawBootomLine(painter, rect); drawLeftLine(painter, rect); @@ -1093,7 +1110,7 @@ void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawRenderModeBorder(QPainter *painter, QRectF rect) const { if(isShapeItem()) - return; + return; if (m_borderLinesFlags & RightLine) drawRightLine(painter, rect); if (m_borderLinesFlags & LeftLine) drawLeftLine(painter, rect); if (m_borderLinesFlags & TopLine ) drawTopLine(painter, rect); @@ -1110,6 +1127,32 @@ void BaseDesignIntf::drawBorder(QPainter *painter, QRectF rect) const painter->restore(); } +void BaseDesignIntf::drawShadow(QPainter *painter, QRectF rect) const +{ + + qreal shWidth = rect.width()/100; + QRectF rshadow(rect.topRight() + QPointF(0, shWidth), + rect.bottomRight() + QPointF(shWidth, 0)); + QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight()); + rgrad.setColorAt(0.0, QColor(0,0,0,255)); + rgrad.setColorAt(1.0, QColor(0,0,0,0)); + painter->fillRect(rshadow, QBrush(rgrad)); + QRectF bshadow(rect.bottomLeft() + QPointF(shWidth, 0), + rect.bottomRight() + QPointF(0, shWidth)); + QLinearGradient bgrad(bshadow.topLeft(), bshadow.bottomLeft()); + bgrad.setColorAt(0.0, QColor(0,0,0,255)); + bgrad.setColorAt(1.0, QColor(0,0,0,0)); + painter->fillRect(bshadow, QBrush(bgrad)); + QRectF cshadow(rect.bottomRight(), + rect.bottomRight() + QPointF(shWidth, shWidth)); + QRadialGradient cgrad(cshadow.topLeft(), shWidth, cshadow.topLeft()); + cgrad.setColorAt(0.0, QColor(0,0,0,255)); + cgrad.setColorAt(1.0, QColor(0,0,0,0)); + painter->fillRect(cshadow, QBrush(cgrad)); + + +} + void BaseDesignIntf::setGeometry(QRectF rect) { if (m_rect == rect) return; @@ -1270,13 +1313,13 @@ void BaseDesignIntf::drawMarker(QPainter *painter, QColor color) const painter->drawRect(QRectF(rect().right()-markerSize,rect().top()-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()-markerSize,rect().bottom()-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()-markerSize, - rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); + rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().right()-markerSize, - rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); + rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()+rect().width()/2-markerSize, - rect().top()-markerSize,markerSize*2,markerSize*2)); + rect().top()-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()+rect().width()/2-markerSize, - rect().bottom()-markerSize,markerSize*2,markerSize*2)); + rect().bottom()-markerSize,markerSize*2,markerSize*2)); pen.setStyle(Qt::DotLine); painter->setPen(pen); @@ -1366,7 +1409,7 @@ void BaseDesignIntf::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton && ((itemMode()&EditMode)||(itemMode()&DesignMode)) - ) { + ) { showEditorDialog(); } QGraphicsItem::mouseDoubleClickEvent(event); @@ -1468,14 +1511,14 @@ void BaseDesignIntf::setMarginSize(int value) void BaseDesignIntf::drawResizeZone(QPainter* /*painter*/) { -// if (m_resizeAreas.count() > 0) { -// painter->save(); -// painter->setPen(QPen(Const::RESIZE_ZONE_COLOR)); -// (isSelected()) ? painter->setOpacity(Const::SELECTED_RESIZE_ZONE_OPACITY) : painter->setOpacity(Const::RESIZE_ZONE_OPACITY); -// painter->setBrush(QBrush(Qt::green, Qt::SolidPattern)); -// foreach(QRectF * resizeArea, m_resizeAreas) painter->drawRect(*resizeArea); -// painter->restore(); -// } + // if (m_resizeAreas.count() > 0) { + // painter->save(); + // painter->setPen(QPen(Const::RESIZE_ZONE_COLOR)); + // (isSelected()) ? painter->setOpacity(Const::SELECTED_RESIZE_ZONE_OPACITY) : painter->setOpacity(Const::RESIZE_ZONE_OPACITY); + // painter->setBrush(QBrush(Qt::green, Qt::SolidPattern)); + // foreach(QRectF * resizeArea, m_resizeAreas) painter->drawRect(*resizeArea); + // painter->restore(); + // } } @@ -1706,7 +1749,7 @@ void BaseDesignIntf::notify(const QString &propertyName, const QVariant& oldValu void BaseDesignIntf::notify(const QVector& propertyNames) { if (!isLoading()) - emit propertyesChanged(propertyNames); + emit propertyesChanged(propertyNames); } @@ -1752,11 +1795,11 @@ void Marker::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) painter->drawRect(QRectF(rect().right()-markerSize,rect().top()-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()-markerSize,rect().bottom()-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()-markerSize, - rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); + rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().right()-markerSize, - rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); + rect().bottom()-rect().height()/2-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()+rect().width()/2-markerSize, - rect().top()-markerSize,markerSize*2,markerSize*2)); + rect().top()-markerSize,markerSize*2,markerSize*2)); painter->drawRect(QRectF(rect().left()+rect().width()/2-markerSize, rect().bottom()-markerSize,markerSize*2,markerSize*2)); } diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 6c7b317..5071206 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -92,6 +92,7 @@ class BaseDesignIntf : Q_PROPERTY(QString parentName READ parentReportItemName WRITE setParentReportItem DESIGNABLE false) Q_PROPERTY(int borderLineSize READ borderLineSize WRITE setBorderLineSize) Q_PROPERTY(bool isVisible READ isVisible WRITE setItemVisible DESIGNABLE false) + Q_PROPERTY(bool shadow READ hasShadow WRITE setShadow) Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor) Q_PROPERTY(bool geometryLocked READ isGeometryLocked WRITE setGeometryLocked) Q_PROPERTY(Qt::PenStyle borderStyle READ borderStyle WRITE setBorderStyle) @@ -335,7 +336,8 @@ public: bool isChangingPos() const; void setIsChangingPos(bool isChangingPos); bool isShapeItem() const; - + bool hasShadow(); + void setShadow(bool sh); Q_INVOKABLE QString setItemWidth(qreal width); Q_INVOKABLE QString setItemHeight(qreal height); Q_INVOKABLE qreal getItemWidth(); @@ -384,6 +386,7 @@ protected: void drawBorder(QPainter* painter, QRectF rect) const; + void drawShadow(QPainter* painter, QRectF rect) const; void drawDesignModeBorder(QPainter* painter, QRectF rect) const; void drawRenderModeBorder(QPainter *painter, QRectF rect) const; void drawResizeZone(QPainter*); @@ -443,6 +446,7 @@ private: bool m_fixedPos; int m_borderLineSize; + QRectF m_rect; mutable QRectF m_boundingRect; @@ -487,6 +491,7 @@ private: bool m_itemGeometryLocked; bool m_isChangingPos; bool m_isMoveable; + bool m_shadow; signals: void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry); diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp index f191a16..32475e1 100644 --- a/limereport/lrpageitemdesignintf.cpp +++ b/limereport/lrpageitemdesignintf.cpp @@ -98,6 +98,26 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte paintGrid(ppainter, rect); ppainter->setPen(gridColor()); ppainter->drawRect(boundingRect()); + //Draw shadow + qreal shWidth = boundingRect().width()/100; + QRectF rshadow(boundingRect().topRight() + QPointF(0, shWidth), + boundingRect().bottomRight() + QPointF(shWidth, 0)); + QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight()); + rgrad.setColorAt(0.0, QColor(0,0,0,255)); + rgrad.setColorAt(1.0, QColor(0,0,0,0)); + ppainter->fillRect(rshadow, QBrush(rgrad)); + QRectF bshadow(boundingRect().bottomLeft() + QPointF(shWidth, 0), + boundingRect().bottomRight() + QPointF(0, shWidth)); + QLinearGradient bgrad(bshadow.topLeft(), bshadow.bottomLeft()); + bgrad.setColorAt(0.0, QColor(0,0,0,255)); + bgrad.setColorAt(1.0, QColor(0,0,0,0)); + ppainter->fillRect(bshadow, QBrush(bgrad)); + QRectF cshadow(boundingRect().bottomRight(), + boundingRect().bottomRight() + QPointF(shWidth, shWidth)); + QRadialGradient cgrad(cshadow.topLeft(), shWidth, cshadow.topLeft()); + cgrad.setColorAt(0.0, QColor(0,0,0,255)); + cgrad.setColorAt(1.0, QColor(0,0,0,0)); + ppainter->fillRect(cshadow, QBrush(cgrad)); if (m_isExtendedInDesignMode){ QPen pen; pen.setColor(Qt::red); @@ -109,6 +129,7 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte ppainter->restore(); } + if (itemMode() & PreviewMode) { ppainter->save(); ppainter->fillRect(rect(), Qt::white); @@ -123,6 +144,9 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte ppainter->restore(); BaseDesignIntf::paint(ppainter,option,widget); } + + + } BaseDesignIntf *PageItemDesignIntf::createSameTypeItem(QObject *owner, QGraphicsItem *parent) diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index bf7fd1d..810801f 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures @@ -1697,37 +1697,37 @@ p, li { white-space: pre-wrap; } LimeReport::PageItemDesignIntf - + Paste Coller - - + + Page is TOC Table de contenus - - + + Reset page number Réinitialiser le numéro de page - - + + Full page Page entière - - + + Set page size to printer Adapterr la taille de la page à l'imprimante - - + + Mix with prior page @@ -1745,7 +1745,7 @@ p, li { white-space: pre-wrap; } %1 nom de fichier - + Report file name Nom du fichier du rapport diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index e6492dd..eae972f 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie @@ -1709,37 +1709,37 @@ p, li { white-space: pre-wrap; } LimeReport::PageItemDesignIntf - + Paste Wklej - - + + Page is TOC Strona to spis treści - - + + Reset page number Zresetuj numer strony - - + + Full page Cała strona - - + + Set page size to printer Ustaw rozmiar strony na drukarkę - - + + Mix with prior page @@ -1757,7 +1757,7 @@ p, li { white-space: pre-wrap; } %1 nazwa pliku - + Report file name Nazwa pliku raportu From f0da654e7fd40a4a3e4f77726ec1fd87bfdd6029 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Sat, 7 May 2022 19:07:43 +0100 Subject: [PATCH 08/26] border width precision has been improved --- designer/main.cpp | 1 + limereport/lrbasedesignintf.cpp | 12 +++++++----- limereport/lrbasedesignintf.h | 8 ++++---- limereport/lrpreviewreportwidget.cpp | 4 ++-- translations/limereport_fr.ts | 22 +++++++++++----------- translations/limereport_pl.ts | 22 +++++++++++----------- 6 files changed, 36 insertions(+), 33 deletions(-) diff --git a/designer/main.cpp b/designer/main.cpp index 96e73e4..e0478c9 100644 --- a/designer/main.cpp +++ b/designer/main.cpp @@ -7,6 +7,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); + DesignerSettingManager manager; QTranslator limeReportTranslator; diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index c51f27c..fdff800 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -426,6 +426,7 @@ void BaseDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *o { Q_UNUSED(option); Q_UNUSED(widget); + ppainter->save(); setupPainter(ppainter); drawBorder(ppainter, rect()); @@ -968,7 +969,7 @@ void BaseDesignIntf::emitObjectNamePropertyChanged(const QString &oldName, const emit propertyObjectNameChanged(oldName,newName); } -int BaseDesignIntf::borderLineSize() const +qreal BaseDesignIntf::borderLineSize() const { return m_borderLineSize; } @@ -981,9 +982,9 @@ void BaseDesignIntf::setBorderStyle(Qt::PenStyle b) notify("borderStyle",(BorderStyle)oldValue,(BorderStyle)b); } -void BaseDesignIntf::setBorderLineSize(int value) +void BaseDesignIntf::setBorderLineSize(qreal value) { - int oldValue = m_borderLineSize; + qreal oldValue = m_borderLineSize; m_borderLineSize = value; update(); notify("borderLineSize",oldValue,value); @@ -1076,6 +1077,7 @@ void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const { if(isShapeItem()) return; + painter->setPen(borderPen(BottomLine)); painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height()); } @@ -1215,8 +1217,8 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); pen.setStyle(m_borderStyle); - pen.setCosmetic(true); - pen.setWidthF(m_borderLineSize); + //pen.setCosmetic(true); + pen.setWidthF(m_borderLineSize+1); } else { pen.setColor(Qt::darkGray); diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 5071206..9284f53 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -90,7 +90,7 @@ class BaseDesignIntf : Q_PROPERTY(qreal zOrder READ zValue WRITE setZValueProperty DESIGNABLE false) Q_PROPERTY(BorderLines borders READ borderLines WRITE setBorderLinesFlags) Q_PROPERTY(QString parentName READ parentReportItemName WRITE setParentReportItem DESIGNABLE false) - Q_PROPERTY(int borderLineSize READ borderLineSize WRITE setBorderLineSize) + Q_PROPERTY(qreal borderLineSize READ borderLineSize WRITE setBorderLineSize) Q_PROPERTY(bool isVisible READ isVisible WRITE setItemVisible DESIGNABLE false) Q_PROPERTY(bool shadow READ hasShadow WRITE setShadow) Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor) @@ -298,9 +298,9 @@ public: QString itemTypeName() const; void setItemTypeName(const QString &itemTypeName); - int borderLineSize() const; + qreal borderLineSize() const; void setBorderStyle(Qt::PenStyle b); - void setBorderLineSize(int value); + void setBorderLineSize(qreal value); void showEditorDialog(); ItemAlign itemAlign() const; virtual void setItemAlign(const ItemAlign &itemAlign); @@ -444,7 +444,7 @@ private: QFont m_font; QColor m_fontColor; bool m_fixedPos; - int m_borderLineSize; + qreal m_borderLineSize; QRectF m_rect; diff --git a/limereport/lrpreviewreportwidget.cpp b/limereport/lrpreviewreportwidget.cpp index 4b2ff39..967ed8b 100644 --- a/limereport/lrpreviewreportwidget.cpp +++ b/limereport/lrpreviewreportwidget.cpp @@ -152,7 +152,7 @@ void PreviewReportWidget::initPreview() ui->graphicsView->centerOn(0, 0); ui->graphicsView->scene()->setBackgroundBrush(QColor(m_previewPageBackgroundColor)); setScalePercent(d_ptr->m_scalePercent); - + qDebug()<m_scalePercent; PageDesignIntf* page = dynamic_cast(ui->graphicsView->scene()); if (page) connect(page, SIGNAL(itemInserted(LimeReport::PageDesignIntf*, QPointF, QString)), @@ -484,7 +484,7 @@ void PreviewReportWidget::reportEngineDestroyed(QObject *object) void PreviewReportWidget::slotZoomed(double ) { -#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) +#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0)) d_ptr->m_scalePercent = ui->graphicsView->matrix().m11()*100; #else d_ptr->m_scalePercent = ui->graphicsView->transform().m11()*100; diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 810801f..4458f78 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index eae972f..59ce1e2 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie From e4dd1b6a86b7af2e07b025f8c5a3dde6c01f9afd Mon Sep 17 00:00:00 2001 From: yanis60 Date: Fri, 13 May 2022 15:59:48 +0100 Subject: [PATCH 09/26] added double border style --- limereport/lrbasedesignintf.cpp | 37 ++++++++++++++++++++++++--------- limereport/lrbasedesignintf.h | 10 +++++---- translations/limereport_fr.ts | 22 ++++++++++---------- translations/limereport_pl.ts | 22 ++++++++++---------- 4 files changed, 55 insertions(+), 36 deletions(-) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index fdff800..73ec832 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -65,7 +65,7 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_BGMode(OpaqueMode), m_opacity(100), m_borderLinesFlags(BorderLines()), - m_borderStyle(Qt::SolidLine), + m_borderStyle(BorderStyle::Solid), m_storageTypeName(storageTypeName), m_itemMode(DesignMode), m_objectState(ObjectCreated), @@ -974,9 +974,9 @@ qreal BaseDesignIntf::borderLineSize() const return m_borderLineSize; } -void BaseDesignIntf::setBorderStyle(Qt::PenStyle b) +void BaseDesignIntf::setBorderStyle(BorderStyle b) { - Qt::PenStyle oldValue = m_borderStyle; + BorderStyle oldValue = m_borderStyle; m_borderStyle = b; update(); notify("borderStyle",(BorderStyle)oldValue,(BorderStyle)b); @@ -1060,10 +1060,6 @@ BaseDesignIntf::BorderLines BaseDesignIntf::borderLines() const return m_borderLinesFlags; } -Qt::PenStyle BaseDesignIntf::borderStyle() const -{ - return m_borderStyle; -} void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const { @@ -1071,6 +1067,11 @@ void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const return; painter->setPen(borderPen(TopLine)); painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.x()+6+m_borderLineSize, + rect.y()+6+m_borderLineSize, + rect.width()-6-m_borderLineSize, + rect.y()+6+m_borderLineSize); } void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const @@ -1080,6 +1081,11 @@ void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const painter->setPen(borderPen(BottomLine)); painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.x()+6+m_borderLineSize, + rect.height()-6-m_borderLineSize, + rect.width()-6-m_borderLineSize, + rect.height()-6-m_borderLineSize); } void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const @@ -1089,6 +1095,11 @@ void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const painter->setPen(borderPen(RightLine)); painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.width()-6 - m_borderLineSize, + rect.y()+6+m_borderLineSize, + rect.width()-6-m_borderLineSize, + rect.height()-6-m_borderLineSize); } void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const @@ -1097,6 +1108,11 @@ void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const return; painter->setPen(borderPen(LeftLine)); painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.x()+6+m_borderLineSize, + rect.y()+6+m_borderLineSize, + rect.x()+6+m_borderLineSize, + rect.height()-6-m_borderLineSize); } void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const @@ -1216,9 +1232,10 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const QPen pen; if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); - pen.setStyle(m_borderStyle); - //pen.setCosmetic(true); - pen.setWidthF(m_borderLineSize+1); + if(borderStyle() != BorderStyle::Doubled) + pen.setStyle(static_cast(m_borderStyle)); + pen.setCosmetic(true); + pen.setWidthF(m_borderLineSize+1); //To draw with point precision (By default: 2px = 1 pt) } else { pen.setColor(Qt::darkGray); diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 9284f53..751e61a 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -95,7 +95,7 @@ class BaseDesignIntf : Q_PROPERTY(bool shadow READ hasShadow WRITE setShadow) Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor) Q_PROPERTY(bool geometryLocked READ isGeometryLocked WRITE setGeometryLocked) - Q_PROPERTY(Qt::PenStyle borderStyle READ borderStyle WRITE setBorderStyle) + Q_PROPERTY(BorderStyle borderStyle READ borderStyle WRITE setBorderStyle) friend class ReportRender; public: @@ -106,6 +106,7 @@ public: Dashed = Qt::DashLine, DashDot = Qt::DashDotLine, DashDotDot = Qt::DashDotDotLine, + Doubled = 7 }; @@ -188,6 +189,7 @@ public: QString parentReportItemName() const; BrushStyle backgroundBrushStyle() const {return m_backgroundBrushStyle;} + BorderStyle borderStyle() const {return m_borderStyle;} void setBackgroundBrushStyle(BrushStyle value); QColor backgroundColor() const {return m_backgroundColor;} void setBackgroundColor(QColor value); @@ -253,7 +255,7 @@ public: PageDesignIntf* page(); BorderLines borderLines() const; - Qt::PenStyle borderStyle() const; + QString storageTypeName() const {return m_storageTypeName;} ReportEnginePrivate *reportEditor(); @@ -299,7 +301,7 @@ public: void setItemTypeName(const QString &itemTypeName); qreal borderLineSize() const; - void setBorderStyle(Qt::PenStyle b); + void setBorderStyle(BorderStyle b); void setBorderLineSize(qreal value); void showEditorDialog(); ItemAlign itemAlign() const; @@ -454,7 +456,7 @@ private: BGMode m_BGMode; int m_opacity; BorderLines m_borderLinesFlags; - Qt::PenStyle m_borderStyle; + BorderStyle m_borderStyle; QRectF m_bottomRect; QRectF m_topRect; diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 4458f78..2adb87e 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 59ce1e2..556f35b 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie From 83da1592844e13a7b42fe9f2645e9fa39369391f Mon Sep 17 00:00:00 2001 From: yanis60 Date: Fri, 27 May 2022 12:33:00 +0100 Subject: [PATCH 10/26] fixed cosmetic pen --- limereport/lrbasedesignintf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 73ec832..0a0225d 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -1234,7 +1234,7 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const pen.setColor(m_borderColor); if(borderStyle() != BorderStyle::Doubled) pen.setStyle(static_cast(m_borderStyle)); - pen.setCosmetic(true); + //pen.setCosmetic(true); pen.setWidthF(m_borderLineSize+1); //To draw with point precision (By default: 2px = 1 pt) } else { From 8a2d824c5da4c5a0041661ff3b5e88b1d64fbdb8 Mon Sep 17 00:00:00 2001 From: yanis60 Date: Mon, 13 Jun 2022 19:18:57 +0100 Subject: [PATCH 11/26] Borders editor dialog added --- limereport/items/borderframeeditor.cpp | 287 +++++++++++++ limereport/items/borderframeeditor.h | 42 ++ limereport/items/borderframeeditor.ui | 73 ++++ .../editors/lritemsborderseditorwidget.cpp | 20 +- .../editors/lritemsborderseditorwidget.h | 4 + limereport/items/lrbordereditor.cpp | 182 ++++++++ limereport/items/lrbordereditor.h | 56 +++ limereport/items/lrbordereditor.ui | 389 ++++++++++++++++++ limereport/items/lrpageeditor.cpp | 104 +++++ limereport/items/lrpageeditor.h | 31 ++ limereport/items/lrpageeditor.ui | 341 +++++++++++++++ limereport/limereport.pri | 21 +- limereport/limereport.pro | 17 +- limereport/lrbanddesignintf.cpp | 10 +- limereport/lrbasedesignintf.cpp | 45 +- limereport/lrbasedesignintf.h | 3 +- limereport/lrpageitemdesignintf.cpp | 12 +- limereport/lrpreviewreportwidget.cpp | 1 - translations/limereport_ar.ts | 213 ++++++++++ translations/limereport_es.ts | 213 ++++++++++ translations/limereport_fr.ts | 312 +++++++++++++- translations/limereport_pl.ts | 312 +++++++++++++- translations/limereport_ru.qm | Bin 123390 -> 123741 bytes translations/limereport_ru.ts | 213 ++++++++++ translations/limereport_zh.ts | 213 ++++++++++ 25 files changed, 3036 insertions(+), 78 deletions(-) create mode 100644 limereport/items/borderframeeditor.cpp create mode 100644 limereport/items/borderframeeditor.h create mode 100644 limereport/items/borderframeeditor.ui create mode 100644 limereport/items/lrbordereditor.cpp create mode 100644 limereport/items/lrbordereditor.h create mode 100644 limereport/items/lrbordereditor.ui create mode 100644 limereport/items/lrpageeditor.cpp create mode 100644 limereport/items/lrpageeditor.h create mode 100644 limereport/items/lrpageeditor.ui diff --git a/limereport/items/borderframeeditor.cpp b/limereport/items/borderframeeditor.cpp new file mode 100644 index 0000000..a864550 --- /dev/null +++ b/limereport/items/borderframeeditor.cpp @@ -0,0 +1,287 @@ +#include "borderframeeditor.h" +#include "ui_borderframeeditor.h" +#include +#include +#include +#include +#include "lrbasedesignintf.h" +#include "lrbordereditor.h" +using namespace LimeReport; +BorderFrameEditor::BorderFrameEditor(QWidget *parent) + : QWidget(parent) + , ui(new Ui::BorderFrameEditor) +{ + ui->setupUi(this); + scene = new QGraphicsScene(ui->graphicsView); + + QRect vRect = rect(); + + //Draw corder lines + //topLeft + scene->addLine(10,5, 10,10,QPen(Qt::gray)); + scene->addLine(5,10, 10,10,QPen(Qt::gray)); + //bottomLeft + scene->addLine(10,vRect.bottom() -5, 10,vRect.bottom()-10,QPen(Qt::gray)); + scene->addLine(5,vRect.bottom()-10,10,vRect.bottom()-10,QPen(Qt::gray)); + //bottomRight + scene->addLine(vRect.right()-10,vRect.bottom() -5,vRect.right()- 10,vRect.bottom()-10,QPen(Qt::gray)); + scene->addLine(vRect.right()-5,vRect.bottom()-10,vRect.right()-10,vRect.bottom()-10,QPen(Qt::gray)); + //topRight + scene->addLine(vRect.width()-10,5,vRect.width()- 10,10,QPen(Qt::gray)); + scene->addLine(vRect.width()-5,10, vRect.width()-10,10,QPen(Qt::gray)); + scene->setSceneRect(vRect); + ui->graphicsView->setScene(scene); + QGraphicsSimpleTextItem * io = new QGraphicsSimpleTextItem(); + io->setAcceptedMouseButtons(Qt::LeftButton); + io->setPos(scene->sceneRect().center()); + io->setText(tr("Text")); + scene->addItem(io); + + QRectF bR = io->sceneBoundingRect(); + io->setPos( scene->sceneRect().center().x() - bR.width()/2, scene->sceneRect().center().y() - bR.height()/2 ); + connect(this,SIGNAL(borderSideClicked(int, bool)),this,SLOT(SlotBorderSideClicked(int,bool))); + +} + +BorderFrameEditor::~BorderFrameEditor() +{ + delete ui; +} + +void BorderFrameEditor::setPen(QPen pen) +{ + m_pen = pen; + updateBorders(); + +} + +QPen BorderFrameEditor::pen() +{ + return m_pen; +} + +void BorderFrameEditor::setAllLines() +{ + + topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen); + + + leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen); + + bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10 + ,rect().bottom() - 10),m_pen); + + + + rightLine = scene->addLine(QLineF(rect().width() - 10,10 + ,rect().width() - 10,rect().height() - 10),m_pen); + + +} + +void BorderFrameEditor::unSetAllLines() +{ + if(topLine) + { + scene->removeItem(topLine); + + } + if(leftLine) + { + scene->removeItem(leftLine); + + } + if(bottomLine) + { + scene->removeItem(bottomLine); + + + + } + if(rightLine) + { + scene->removeItem(rightLine); + + } + +} + +void BorderFrameEditor::mousePressEvent(QMouseEvent *event) +{ + + if(event->x() >= 10 && event->y() <30)//Draw top border + { + + if(!topLine) + { + + emit borderSideClicked(1,true); + + } + else + { + + emit borderSideClicked(1,false); + } + } + + if((event->x() >= 10 && event->x() < 30) && (event->y() > 10)) //Draw border left + { + if(!leftLine) + { + + emit borderSideClicked(4,true); + + } + else + { + + emit borderSideClicked(4,false); + + } + } + + if(event->x() >= 10 && (event->y() >80 && event->y() < rect().bottom())) //Draw bottom border + { + if(!bottomLine) + { + + emit borderSideClicked(2,true); + } + + else + { + + emit borderSideClicked(2,false); + + } + } + + if((event->x() >= 130 && event->x() < rect().width()) && event->y() > 10) //Draw border right + { + if(!rightLine) + { + + emit borderSideClicked(8,true); + + } + else + { + + emit borderSideClicked(8,false); + + } + + } + + +} + +void BorderFrameEditor::SlotBorderSideClicked(int side, bool show) +{ + + switch(side) + { + case BaseDesignIntf::BorderSide::TopLine: + { + if(show) + { + topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen); + + + } + else + { + scene->removeItem(topLine); + topLine = NULL; + + } + }break; + case BaseDesignIntf::LeftLine: + { + if(show) + { + leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen); + + + } + else + { + scene->removeItem(leftLine); + leftLine = NULL; + + + } + }break; + case BaseDesignIntf::BottomLine: + { + if(show) + { + bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10 + ,rect().bottom() - 10),m_pen); + + } + + else + { + scene->removeItem(bottomLine); + bottomLine = NULL; + + + } + }break; + case BaseDesignIntf::RightLine: + { + if(show) + { + rightLine = scene->addLine(QLineF(rect().width() - 10,10 + ,rect().width() - 10,rect().height() - 10),m_pen); + + } + else + { + scene->removeItem(rightLine); + rightLine = NULL; + + } + + } + + } + updateBorders(); +} + +void BorderFrameEditor::updateBorders() +{ + //if a line is set we redraw it + if(topLine) + { + scene->removeItem(topLine); + topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen); + + } + if(leftLine) + { + scene->removeItem(leftLine); + leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen); + + } + if(bottomLine) + { + scene->removeItem(bottomLine); + + bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10 + ,rect().bottom() - 10),m_pen); + + } + if(rightLine) + { + scene->removeItem(rightLine); + + rightLine = scene->addLine(QLineF(rect().width() - 10,10 + ,rect().width() - 10,rect().height() - 10),m_pen); + + } + +} + diff --git a/limereport/items/borderframeeditor.h b/limereport/items/borderframeeditor.h new file mode 100644 index 0000000..f0beae8 --- /dev/null +++ b/limereport/items/borderframeeditor.h @@ -0,0 +1,42 @@ +#ifndef WIDGET +#define WIDGET + +#include +#include +#include +#include "lrbasedesignintf.h" +QT_BEGIN_NAMESPACE +namespace Ui { class BorderFrameEditor; } +QT_END_NAMESPACE + +class BorderFrameEditor : public QWidget +{ + Q_OBJECT + +public: + BorderFrameEditor(QWidget *parent = nullptr); + ~BorderFrameEditor(); + void setPen(QPen pen); + QPen pen(); + void setAllLines(); + void unSetAllLines(); +protected: + void mousePressEvent(QMouseEvent *event); +signals: + void borderSideClicked(int side,bool show); +private slots: + void SlotBorderSideClicked(int side, bool show); + +private: + Ui::BorderFrameEditor *ui; + QGraphicsScene *scene; + QGraphicsLineItem *topLine = NULL + ,*bottomLine = NULL + ,*leftLine = NULL + ,*rightLine = NULL; + QPen m_pen; + void updateBorders(); + + +}; +#endif // WIDGET diff --git a/limereport/items/borderframeeditor.ui b/limereport/items/borderframeeditor.ui new file mode 100644 index 0000000..3324d90 --- /dev/null +++ b/limereport/items/borderframeeditor.ui @@ -0,0 +1,73 @@ + + + BorderFrameEditor + + + + 0 + 0 + 150 + 100 + + + + + 0 + 0 + + + + BorderFrameEditor + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 150 + 100 + + + + + 150 + 100 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustToContents + + + QGraphicsView::AnchorViewCenter + + + + + + + + diff --git a/limereport/items/editors/lritemsborderseditorwidget.cpp b/limereport/items/editors/lritemsborderseditorwidget.cpp index 201b981..7b4853a 100644 --- a/limereport/items/editors/lritemsborderseditorwidget.cpp +++ b/limereport/items/editors/lritemsborderseditorwidget.cpp @@ -29,7 +29,7 @@ ****************************************************************************/ #include "lritemsborderseditorwidget.h" #include - +#include "lrbordereditor.h" namespace LimeReport{ void ItemsBordersEditorWidget::setItemEvent(BaseDesignIntf* item) @@ -44,6 +44,7 @@ void ItemsBordersEditorWidget::setItemEvent(BaseDesignIntf* item) updateValues((BaseDesignIntf::BorderLines)borders.toInt()); setEnabled(true); } + itm = item; } void ItemsBordersEditorWidget::properyChangedEvent(const QString& property, const QVariant& oldValue, const QVariant& newValue) @@ -76,6 +77,18 @@ void ItemsBordersEditorWidget::buttonClicked(bool) } +void ItemsBordersEditorWidget::editBorderClicked() +{ + lrbordereditor be; + be.loadItem(itm); + if(be.exec() == QDialog::Rejected)return; + updateValues(be.borderSides()); + itm->setBorderLinesFlags(be.borderSides()); + itm->setBorderLineSize(be.border_width()); + itm->setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.border_style()); + itm->setBorderColor(be.borderColor()); +} + void ItemsBordersEditorWidget::initEditor() { @@ -114,6 +127,11 @@ void ItemsBordersEditorWidget::initEditor() m_allLines->setIcon(QIcon(":/report/images/allLines")); connect(m_allLines,SIGNAL(triggered()),this,SLOT(allBordesClicked())); addAction(m_allLines); + addSeparator(); + m_BorderEditor = new QAction(tr("Edit border"),this); + m_BorderEditor->setIcon(QIcon(":/report/images/allLines")); + connect(m_BorderEditor,SIGNAL(triggered()),this,SLOT(editBorderClicked())); + addAction(m_BorderEditor); setEnabled(false); diff --git a/limereport/items/editors/lritemsborderseditorwidget.h b/limereport/items/editors/lritemsborderseditorwidget.h index 233e5f5..2538258 100644 --- a/limereport/items/editors/lritemsborderseditorwidget.h +++ b/limereport/items/editors/lritemsborderseditorwidget.h @@ -49,6 +49,7 @@ protected slots: virtual void noBordesClicked(); virtual void allBordesClicked(); virtual void buttonClicked(bool); + void editBorderClicked(); protected: void setItemEvent(BaseDesignIntf *item); void properyChangedEvent(const QString &property, const QVariant &oldValue, const QVariant &newValue); @@ -62,8 +63,10 @@ private: QAction* m_topLine; QAction* m_bottomLine; QAction* m_allLines; + QAction* m_BorderEditor; bool m_changing; int m_borders; + BaseDesignIntf *itm; }; #ifdef HAVE_REPORT_DESIGNER @@ -78,6 +81,7 @@ protected slots: void allBordesClicked(); private: ReportDesignWidget* m_reportEditor; + }; #endif diff --git a/limereport/items/lrbordereditor.cpp b/limereport/items/lrbordereditor.cpp new file mode 100644 index 0000000..e8e2af3 --- /dev/null +++ b/limereport/items/lrbordereditor.cpp @@ -0,0 +1,182 @@ +#include "lrbordereditor.h" +#include "ui_lrbordereditor.h" +#include +#include "lrbasedesignintf.h" +lrbordereditor::lrbordereditor(QWidget *parent) : + QDialog(parent), + ui(new Ui::lrbordereditor) +{ + ui->setupUi(this); + + connect(ui->borderFrame,SIGNAL(borderSideClicked(int, bool)), this, SLOT(checkToolButtons(int, bool))); +} + +void lrbordereditor::loadItem(LimeReport::BaseDesignIntf *i) +{ + item = i; + if(item->borderLines() & LimeReport::BaseDesignIntf::TopLine) + { + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,true); + + } + if(item->borderLines() & LimeReport::BaseDesignIntf::LeftLine) + { + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,true); + + } + if(item->borderLines() & LimeReport::BaseDesignIntf::RightLine) + { + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,true); + + } + if(item->borderLines() & LimeReport::BaseDesignIntf::BottomLine) + { + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,true); + } + QPen pen; + pen.setWidthF(item->borderLineSize()); + pen.setColor(item->borderColor()); + pen.setStyle((Qt::PenStyle)item->borderStyle()); + ui->borderFrame->setPen(pen); + border_color = item->borderColor().name(); + ui->listWidget->setCurrentRow((Qt::PenStyle)item->borderStyle()); + ui->comboBox->setCurrentText(QString::number(item->borderLineSize())); + borderWidth = ui->comboBox->currentText().toDouble(); + borderStyle =ui->listWidget->currentRow(); + ui->pushButton->setStyleSheet(QString("#pushButton{background-color:%1;}").arg(border_color)); +} + +LimeReport::BaseDesignIntf::BorderLines lrbordereditor::borderSides() +{ + int borders = 0; + borders += (ui->topLine->isChecked())?LimeReport::BaseDesignIntf::TopLine:0; + borders += (ui->bottomLine->isChecked())?LimeReport::BaseDesignIntf::BottomLine:0; + borders += (ui->leftLine->isChecked())?LimeReport::BaseDesignIntf::LeftLine:0; + borders += (ui->rightLine->isChecked())?LimeReport::BaseDesignIntf::RightLine:0; + return (LimeReport::BaseDesignIntf::BorderLines)borders; +} + +LimeReport::BaseDesignIntf::BorderStyle lrbordereditor::border_style() +{ + return (LimeReport::BaseDesignIntf::BorderStyle)borderStyle; +} + +QString lrbordereditor::borderColor() +{ + return border_color; +} + +double lrbordereditor::border_width() +{ + return borderWidth; +} + +lrbordereditor::~lrbordereditor() +{ + delete ui; +} + +void lrbordereditor::on_listWidget_currentRowChanged(int currentRow) +{ + QPen pen = ui->borderFrame->pen(); + pen.setStyle((Qt::PenStyle)currentRow); + borderStyle = currentRow; + ui->borderFrame->setPen(pen); + + +} + + +void lrbordereditor::on_comboBox_currentTextChanged(const QString &arg1) +{ + QPen pen = ui->borderFrame->pen(); + pen.setWidthF(arg1.toDouble()); + ui->borderFrame->setPen(pen); + borderWidth = arg1.toDouble(); +} + + +void lrbordereditor::on_pushButton_clicked() +{ + QColorDialog cd(this); + if(cd.exec() == QDialog::Rejected)return; + QPen pen = ui->borderFrame->pen(); + pen.setColor(cd.selectedColor().name()); + border_color = pen.color().name(); + + ui->pushButton->setStyleSheet(QString("#pushButton{background-color:%1;}").arg(border_color)); + ui->borderFrame->setPen(pen); +} + + +void lrbordereditor::on_toolButton_4_clicked() +{ + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,true); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,true); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,true); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,true); + QPen pen = ui->borderFrame->pen(); + + ui->borderFrame->setPen(pen); +} + + +void lrbordereditor::on_noLines_clicked() +{ + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,false); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,false); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,false); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,false); + +} + + +void lrbordereditor::on_topLine_clicked() +{ + + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,ui->topLine->isChecked()); + +} + +void lrbordereditor::checkToolButtons(int side, bool check) +{ + + switch(side) + { + case LimeReport::BaseDesignIntf::BorderSide::TopLine: + { + ui->topLine->setChecked(check); + }break; + case LimeReport::BaseDesignIntf::BorderSide::BottomLine: + { + ui->bottomLine->setChecked(check); + }break; + case LimeReport::BaseDesignIntf::BorderSide::LeftLine: + { + ui->leftLine->setChecked(check); + }break; + case LimeReport::BaseDesignIntf::BorderSide::RightLine: + { + ui->rightLine->setChecked(check); + }break; + } +} + + +void lrbordereditor::on_bottomLine_clicked() +{ + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,ui->bottomLine->isChecked()); +} + + +void lrbordereditor::on_leftLine_clicked() +{ + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,ui->leftLine->isChecked()); +} + + +void lrbordereditor::on_toolButton_3_clicked() +{ + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,ui->rightLine->isChecked()); +} + diff --git a/limereport/items/lrbordereditor.h b/limereport/items/lrbordereditor.h new file mode 100644 index 0000000..5c2c9ba --- /dev/null +++ b/limereport/items/lrbordereditor.h @@ -0,0 +1,56 @@ +#ifndef LRBORDEREDITOR_H +#define LRBORDEREDITOR_H + +#include +#include "lrbasedesignintf.h" +namespace Ui { +class lrbordereditor; +} + +class lrbordereditor : public QDialog +{ + Q_OBJECT + +public: + explicit lrbordereditor(QWidget *parent = nullptr); + void loadItem(LimeReport::BaseDesignIntf *i); + LimeReport::BaseDesignIntf::BorderLines borderSides(); + LimeReport::BaseDesignIntf::BorderStyle border_style(); + QString borderColor(); + double border_width(); + + + ~lrbordereditor(); + +private slots: + void on_listWidget_currentRowChanged(int currentRow); + + void on_comboBox_currentTextChanged(const QString &arg1); + + void on_pushButton_clicked(); + + void on_toolButton_4_clicked(); + + void on_noLines_clicked(); + + void on_topLine_clicked(); + void checkToolButtons(int side, bool check); + + void on_bottomLine_clicked(); + + void on_leftLine_clicked(); + + void on_toolButton_3_clicked(); + +private: + Ui::lrbordereditor *ui; + LimeReport::BaseDesignIntf *item; + QString border_color; + int borderStyle = 1; + double borderWidth = 1; + + +}; + + +#endif // LRBORDEREDITOR_H diff --git a/limereport/items/lrbordereditor.ui b/limereport/items/lrbordereditor.ui new file mode 100644 index 0000000..7cd7a39 --- /dev/null +++ b/limereport/items/lrbordereditor.ui @@ -0,0 +1,389 @@ + + + lrbordereditor + + + + 0 + 0 + 381 + 311 + + + + Edit border + + + + + + + + Presets + + + true + + + + + + No lines + + + + :/report/images/noLines:/report/images/noLines + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + Outline + + + + :/report/images/allLines:/report/images/allLines + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + Border + + + true + + + + + + + + + + ... + + + + :/report/images/topLine:/report/images/topLine + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + ... + + + + :/report/images/bottomLine:/report/images/bottomLine + + + true + + + + + + + + + + + + + + ... + + + + :/report/images/leftLine:/report/images/leftLine + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + ... + + + + :/report/images/rightLine:/report/images/rightLine + + + true + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 120 + 16777215 + + + + Style + + + + + + + 0 + 0 + + + + + 0 + 125 + + + + + 125 + 16777215 + + + + 1 + + + + No style + + + + + Solid + + + + + Dash + + + + + Dot + + + + + Dash dot + + + + + Dash dot dot + + + + + + + + Width: + + + + + + + true + + + 1 + + + 2 + + + + 0.25 + + + + + 0.5 + + + + + 1 + + + + + 1.5 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + + + + Color: + + + + + + + #pushButton{background-color: black;} + + + Select... + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + BorderFrameEditor + QWidget +
borderframeeditor.h
+ 1 +
+
+ + + + + + + buttonBox + accepted() + lrbordereditor + accept() + + + 253 + 255 + + + 219 + 275 + + + + + buttonBox + rejected() + lrbordereditor + reject() + + + 316 + 258 + + + 345 + 277 + + + + +
diff --git a/limereport/items/lrpageeditor.cpp b/limereport/items/lrpageeditor.cpp new file mode 100644 index 0000000..d0c2f46 --- /dev/null +++ b/limereport/items/lrpageeditor.cpp @@ -0,0 +1,104 @@ +#include "lrpageeditor.h" +#include "ui_lrpageeditor.h" +#include "lrpagedesignintf.h" +#include +#include +lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page) : + QDialog(parent), + ui(new Ui::lrpageeditor) +{ + ui->setupUi(this); + m_page = page; + //Paper + QMetaEnum pageSizes = page->metaObject()->property(page->metaObject()->indexOfProperty("pageSize")).enumerator(); + + for (int i=0;iformat->addItem(pageSizes.key(i)); + } + ui->format->setCurrentIndex(m_page->pageSize()); + ui->width->setValue(m_page->width() / LimeReport::Const::mmFACTOR); + ui->height->setValue(m_page->height() / LimeReport::Const::mmFACTOR); + ui->portrait->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Portrait); + ui->landscape->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Landscape); + //Margins + ui->marginTop->setValue(m_page->topMargin()); + ui->marginRight->setValue(m_page->rightMargin()); + ui->marginLeft->setValue(m_page->leftMargin()); + ui->marginBottom->setValue(m_page->bottomMargin()); + ui->dropPrinterMargins->setChecked(m_page->dropPrinterMargins()); + + //Other + ui->endlessHeight->setChecked(m_page->endlessHeight()); + ui->extendedHeight->setValue(m_page->extendedHeight()); + ui->fullPage->setChecked(m_page->fullPage()); +} + +lrpageeditor::~lrpageeditor() +{ + delete ui; +} + +void lrpageeditor::applyChanges() +{ + m_page->setPageSize(static_cast(ui->format->currentIndex())); + m_page->setWidth(ui->width->value()* LimeReport::Const::mmFACTOR); + m_page->setHeight(ui->height->value()* LimeReport::Const::mmFACTOR); + m_page->setPageOrientation(ui->portrait->isChecked()?LimeReport::PageItemDesignIntf::Portrait : LimeReport::PageItemDesignIntf::Landscape); + + m_page->setTopMargin(ui->marginTop->value()); + m_page->setBottomMargin(ui->marginBottom->value()); + m_page->setRightMargin(ui->marginRight->value()); + m_page->setLeftMargin(ui->marginLeft->value()); + m_page->setDropPrinterMargins(ui->dropPrinterMargins->isChecked()); + ui->endlessHeight->setChecked(ui->endlessHeight->isChecked()); + m_page->setExtendedHeight(ui->extendedHeight->value()); +} + +void lrpageeditor::on_buttonBox_accepted() +{ + applyChanges(); + accept(); + +} + +QSizeF lrpageeditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size) +{ + if (size != LimeReport::PageItemDesignIntf::Custom) { + QPrinter printer; + printer.setOutputFormat(QPrinter::PdfFormat); +#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) + printer.setOrientation(ui->portrait->isChecked()?QPrinter::Portrait : QPrinter::Landscape); + printer.setPaperSize((QPrinter::PageSize)size); + return QSizeF(printer.paperSize(QPrinter::Millimeter).width() * 10, + printer.paperSize(QPrinter::Millimeter).height() * 10); + +#else + QPageSize pageSize = QPageSize((QPageSize::PageSizeId)size); + qreal width = pageSize.size(QPageSize::Millimeter).width() * 10; + qreal height = pageSize.size(QPageSize::Millimeter).height() * 10; + return QSizeF(pageOrientation() == Portrait ? width : height, + pageOrientation() == Portrait ? height : width); + +// printer.setPageOrientation((QPageLayout::Orientation)pageOrientation()); +// printer.setPageSize(QPageSize((QPageSize::PageSizeId)size)); +// return QSizeF(printer.pageLayout().pageSize().size(QPageSize::Millimeter).width() * 10, +// printer.pageLayout().pageSize().size(QPageSize::Millimeter).height() * 10); +#endif + } + + else { + return QSizeF(width(),height()); + } +} +void lrpageeditor::on_format_currentIndexChanged(int index) +{ + QPageSize ps = *new QPageSize(); + if(ui->format->currentText() != "Custom") + { + QSizeF pageSize = getRectByPageSize(static_cast(index)); + ui->width->setValue(pageSize.width()/10); + ui->height->setValue(pageSize.height()/10); + } + +} + diff --git a/limereport/items/lrpageeditor.h b/limereport/items/lrpageeditor.h new file mode 100644 index 0000000..545ca3e --- /dev/null +++ b/limereport/items/lrpageeditor.h @@ -0,0 +1,31 @@ +#ifndef LRPAGEEDITOR_H +#define LRPAGEEDITOR_H + +#include +#include "lrpageitemdesignintf.h" +#include +namespace Ui { +class lrpageeditor; +} + +class lrpageeditor : public QDialog +{ + Q_OBJECT + +public: + explicit lrpageeditor(QWidget *parent = nullptr,LimeReport::PageItemDesignIntf *page = nullptr); + ~lrpageeditor(); + +private slots: + void on_buttonBox_accepted(); + void on_format_currentIndexChanged(int index); + +private: + Ui::lrpageeditor *ui; + LimeReport::PageItemDesignIntf* m_page; + + void applyChanges(); + QSizeF getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size); +}; + +#endif // LRPAGEEDITOR_H diff --git a/limereport/items/lrpageeditor.ui b/limereport/items/lrpageeditor.ui new file mode 100644 index 0000000..70ca440 --- /dev/null +++ b/limereport/items/lrpageeditor.ui @@ -0,0 +1,341 @@ + + + lrpageeditor + + + + 0 + 0 + 306 + 322 + + + + Page setup + + + + + + 0 + + + + Paper + + + + + + + + Format + + + + + + + + + + + + Dimension + + + + + + Width: + + + + + + + + 100 + 16777215 + + + + true + + + mm + + + 99999999999999991611392.000000000000000 + + + 10.000000000000000 + + + + + + + Height: + + + + + + + + 100 + 16777215 + + + + true + + + mm + + + 99999999999999991611392.000000000000000 + + + 10.000000000000000 + + + + + + + + + + Orientation + + + + + + Portrait + + + true + + + + + + + Landscape + + + + + + + + + + + Margins + + + + + + Bottom: + + + + + + + Top: + + + + + + + Right: + + + + + + + mm + + + + + + + mm + + + + + + + mm + + + + + + + Left: + + + + + + + mm + + + + + + + Qt::Horizontal + + + + + + + Drop printer margins + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Other + + + + + + Height options + + + + + + Endless Height + + + + + + + false + + + + + + Extended Height: + + + + + + + 99999999.000000000000000 + + + + + + + + + + + + + Full page + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + rejected() + lrpageeditor + reject() + + + 325 + 312 + + + 286 + 274 + + + + + endlessHeight + clicked(bool) + horizontalFrame + setEnabled(bool) + + + 60 + 50 + + + 130 + 85 + + + + + diff --git a/limereport/limereport.pri b/limereport/limereport.pri index aca7167..524d3d8 100644 --- a/limereport/limereport.pri +++ b/limereport/limereport.pri @@ -78,12 +78,15 @@ SOURCES += \ $$REPORT_PATH/lrreporttranslation.cpp \ $$REPORT_PATH/exporters/lrpdfexporter.cpp \ $$REPORT_PATH/lraxisdata.cpp \ - $$REPORT_PATH/lrpreparedpages.cpp + $$REPORT_PATH/lrpreparedpages.cpp \ + $$REPORT_PATH/items/lrpageeditor.cpp \ + $$REPORT_PATH/items/borderframeeditor.cpp \ + $$REPORT_PATH/items/lrbordereditor.cpp CONFIG(staticlib) { SOURCES += $$REPORT_PATH/lrfactoryinitializer.cpp } - + CONFIG(zint) { SOURCES += $$REPORT_PATH/items/lrbarcodeitem.cpp } @@ -146,7 +149,7 @@ HEADERS += \ $$REPORT_PATH/lrcollection.h \ $$REPORT_PATH/lrpagedesignintf.h \ $$REPORT_PATH/lrreportengine_p.h \ - $$REPORT_PATH/lrdatasourcemanager.h \ + $$REPORT_PATH/lrdatasourcemanager.h \ $$REPORT_PATH/lrreportrender.h \ $$REPORT_PATH/lrpreviewreportwindow.h \ $$REPORT_PATH/lrpreviewreportwidget.h \ @@ -172,11 +175,14 @@ HEADERS += \ $$REPORT_PATH/lrreporttranslation.h \ $$REPORT_PATH/lrreportdesignwindowintrerface.h \ $$REPORT_PATH/lrexporterintf.h \ - $$REPORT_PATH/lrexportersfactory.h \ + $$REPORT_PATH/lrexportersfactory.h \ $$REPORT_PATH/exporters/lrpdfexporter.h \ $$REPORT_PATH/lrpreparedpages.h \ $$REPORT_PATH/lraxisdata.h \ - $$REPORT_PATH/lrpreparedpagesintf.h + $$REPORT_PATH/lrpreparedpagesintf.h \ + $$REPORT_PATH/items/lrpageeditor.h \ + $$REPORT_PATH/items/borderframeeditor.h \ + $$REPORT_PATH/items/lrbordereditor.h CONFIG(staticlib) { HEADERS += $$REPORT_PATH/lrfactoryinitializer.h @@ -199,7 +205,10 @@ FORMS += \ $$REPORT_PATH/items/lrchartitemeditor.ui \ $$REPORT_PATH/items/lrchartaxiseditor.ui \ $$REPORT_PATH/items/lrimageitemeditor.ui \ - $$REPORT_PATH/scripteditor/lrscripteditor.ui + $$REPORT_PATH/scripteditor/lrscripteditor.ui \ + $$REPORT_PATH/items/lrpageeditor.ui \ + $$REPORT_PATH/items/borderframeeditor.ui \ + $$REPORT_PATH/items/lrbordereditor.ui RESOURCES += \ $$REPORT_PATH/report.qrc \ diff --git a/limereport/limereport.pro b/limereport/limereport.pro index 1389ae2..90016a1 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -72,16 +72,16 @@ win32 { } QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DESTDIR}\" } else { - EXTRA_FILES ~= s,/,\\,g - BUILD_DIR ~= s,/,\\,g - DEST_DIR = $$DESTDIR/include - DEST_DIR ~= s,/,\\,g - DEST_INCLUDE_DIR ~= s,/,\\,g + EXTRA_FILES ~= s,/,\\,g + BUILD_DIR ~= s,/,\\,g + DEST_DIR = $$DESTDIR/include + DEST_DIR ~= s,/,\\,g + DEST_INCLUDE_DIR ~= s,/,\\,g for(FILE,EXTRA_FILES) { - QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) - } - QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\" + QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) + } + QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\" } } @@ -139,3 +139,4 @@ CONFIG(build_translations) { } #### EN AUTOMATIC TRANSLATIONS + diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index cfa9eb0..73a9404 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -60,7 +60,7 @@ void BandMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem* /**opt boundingRect().bottomLeft().y()-4, boundingRect().width(),4), Qt::lightGray ); - + qDebug()<setRenderHint(QPainter::Antialiasing); qreal size = (boundingRect().width()setColor(Qt::magenta); m_bandMarker->setHeight(height()); - m_bandMarker->setPos(pos().x()-m_bandMarker->width(),pos().y()); + m_bandMarker->setPos(pos().x()-m_bandMarker->width() - (itemMode() == ItemModes::PrintMode?boundingRect().width() : 0),pos().y()); if (scene()) scene()->addItem(m_bandMarker); m_bandNameLabel = new BandNameLabel(this); @@ -818,7 +818,7 @@ BandDesignIntf* BandDesignIntf::findParentBand() void BandDesignIntf::updateBandMarkerGeometry() { if (parentItem() && m_bandMarker){ - m_bandMarker->setPos(pos().x()-m_bandMarker->width(),pos().y()); + m_bandMarker->setPos(pos().x()-m_bandMarker->width() - (itemMode() == ItemModes::PrintMode?boundingRect().width() : 0),pos().y()); m_bandMarker->setHeight(rect().height()); } } @@ -839,7 +839,7 @@ QVariant BandDesignIntf::itemChange(QGraphicsItem::GraphicsItemChange change, co { if ((change==ItemPositionChange)&&((itemMode()&DesignMode)||(itemMode()&EditMode))){ if (m_bandMarker){ - m_bandMarker->setPos((value.toPointF().x()-m_bandMarker->boundingRect().width()), + m_bandMarker->setPos((value.toPointF().x()-m_bandMarker->boundingRect().width() - (itemMode() == ItemModes::PrintMode?boundingRect().width() : 0)), value.toPointF().y()); } } @@ -1142,7 +1142,7 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p restoreLinks(); snapshotItemsLayout(); - arrangeSubItems(pass, dataManager); + arrangeSubItems(pass, dataManager); if (autoHeight()){ if (!keepTopSpace()) { qreal minTop = findMinTop() + m_shiftItems; diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 0a0225d..3539601 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -37,7 +37,7 @@ #include "lrhorizontallayout.h" #include "serializators/lrstorageintf.h" #include "serializators/lrxmlreader.h" - +#include "lrbordereditor.h" #include #include #include @@ -1068,10 +1068,10 @@ void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const painter->setPen(borderPen(TopLine)); painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y()); if(borderStyle() == BorderStyle::Doubled) - painter->drawLine(rect.x()+6+m_borderLineSize, - rect.y()+6+m_borderLineSize, - rect.width()-6-m_borderLineSize, - rect.y()+6+m_borderLineSize); + painter->drawLine(rect.x()+3+m_borderLineSize, + rect.y()+3+m_borderLineSize, + rect.width()-3-m_borderLineSize, + rect.y()+3+m_borderLineSize); } void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const @@ -1082,10 +1082,10 @@ void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const painter->setPen(borderPen(BottomLine)); painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height()); if(borderStyle() == BorderStyle::Doubled) - painter->drawLine(rect.x()+6+m_borderLineSize, - rect.height()-6-m_borderLineSize, - rect.width()-6-m_borderLineSize, - rect.height()-6-m_borderLineSize); + painter->drawLine(rect.x()+3+m_borderLineSize, + rect.height()-3-m_borderLineSize, + rect.width()-3-m_borderLineSize, + rect.height()-3-m_borderLineSize); } void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const @@ -1096,10 +1096,10 @@ void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height()); if(borderStyle() == BorderStyle::Doubled) - painter->drawLine(rect.width()-6 - m_borderLineSize, - rect.y()+6+m_borderLineSize, - rect.width()-6-m_borderLineSize, - rect.height()-6-m_borderLineSize); + painter->drawLine(rect.width()-3 - m_borderLineSize, + rect.y()+3+m_borderLineSize, + rect.width()-3-m_borderLineSize, + rect.height()-3-m_borderLineSize); } void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const @@ -1109,10 +1109,10 @@ void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const painter->setPen(borderPen(LeftLine)); painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height()); if(borderStyle() == BorderStyle::Doubled) - painter->drawLine(rect.x()+6+m_borderLineSize, - rect.y()+6+m_borderLineSize, - rect.x()+6+m_borderLineSize, - rect.height()-6-m_borderLineSize); + painter->drawLine(rect.x()+3+m_borderLineSize, + rect.y()+3+m_borderLineSize, + rect.x()+3+m_borderLineSize, + rect.height()-3-m_borderLineSize); } void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const @@ -1477,6 +1477,7 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) menu.addSeparator(); QAction* noBordersAction = menu.addAction(QIcon(":/report/images/noLines"), tr("No borders")); QAction* allBordersAction = menu.addAction(QIcon(":/report/images/allLines"), tr("All borders")); + QAction* editBorderAction = menu.addAction(QIcon(":/report/images/allLines"), tr("Edit borders...")); preparePopUpMenu(menu); QAction* a = menu.exec(event->screenPos()); if (a){ @@ -1497,6 +1498,16 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) page->setBorders(BaseDesignIntf::NoLine); if (a == allBordersAction) page->setBorders(BaseDesignIntf::AllLines); + if(a == editBorderAction) + { + lrbordereditor be; + be.loadItem(this); + if(be.exec() == QDialog::Rejected)return; + setBorderLinesFlags(be.borderSides()); + setBorderLineSize(be.border_width()); + setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.border_style()); + setBorderColor(be.borderColor()); + } if (a == createHLayout) page->addHLayout(); if (a == createVLayout) diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 751e61a..adf7d21 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -102,8 +102,9 @@ public: enum BGMode { TransparentMode, OpaqueMode}; enum BorderStyle { NoStyle = Qt::NoPen, Solid = Qt::SolidLine, - Dot = Qt::DotLine, Dashed = Qt::DashLine, + Dot = Qt::DotLine, + DashDot = Qt::DashDotLine, DashDotDot = Qt::DashDotDotLine, Doubled = 7 diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp index 32475e1..0311707 100644 --- a/limereport/lrpageitemdesignintf.cpp +++ b/limereport/lrpageitemdesignintf.cpp @@ -34,7 +34,7 @@ #include #include #include - +#include namespace LimeReport { bool bandSortBandLessThenByIndex(const BandDesignIntf *c1, const BandDesignIntf *c2){ @@ -770,10 +770,15 @@ void PageItemDesignIntf::initPageSize(const QSizeF& size) void PageItemDesignIntf::preparePopUpMenu(QMenu &menu) { + + foreach (QAction* action, menu.actions()) { if (action->text().compare(tr("Paste")) != 0) action->setVisible(false); } + menu.addSeparator(); + menu.addAction(tr("Edit")); + menu.addSeparator(); @@ -821,6 +826,11 @@ void PageItemDesignIntf::processPopUpAction(QAction *action) if (action->text().compare(tr("Mix with prior page")) == 0){ page()->setPropertyToSelectedItems("mixWithPriorPage",action->isChecked()); } + if(action->text() == tr("Edit")) + { + lrpageeditor pageEdit(NULL,this); + pageEdit.exec(); + } } void PageItemDesignIntf::initPageSize(const PageItemDesignIntf::PageSize &size) diff --git a/limereport/lrpreviewreportwidget.cpp b/limereport/lrpreviewreportwidget.cpp index 967ed8b..ae5d5a5 100644 --- a/limereport/lrpreviewreportwidget.cpp +++ b/limereport/lrpreviewreportwidget.cpp @@ -152,7 +152,6 @@ void PreviewReportWidget::initPreview() ui->graphicsView->centerOn(0, 0); ui->graphicsView->scene()->setBackgroundBrush(QColor(m_previewPageBackgroundColor)); setScalePercent(d_ptr->m_scalePercent); - qDebug()<m_scalePercent; PageDesignIntf* page = dynamic_cast(ui->graphicsView->scene()); if (page) connect(page, SIGNAL(itemInserted(LimeReport::PageDesignIntf*, QPointF, QString)), diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts index 6a996f9..bf3a955 100644 --- a/translations/limereport_ar.ts +++ b/translations/limereport_ar.ts @@ -8,6 +8,17 @@
+ + BorderFrameEditor + + BorderFrameEditor + + + + Text + + + ChartAxisEditor @@ -504,6 +515,10 @@ p, li { white-space: pre-wrap; } Create Vertical Layout + + Edit borders... + + LimeReport::ConnectionDesc @@ -1288,6 +1303,10 @@ p, li { white-space: pre-wrap; } All borders محاط بإطار + + Edit border + + LimeReport::MasterDetailProxyModel @@ -1384,6 +1403,10 @@ p, li { white-space: pre-wrap; } Mix with prior page + + Edit + تحرير + LimeReport::PreviewReportWidget @@ -3374,4 +3397,194 @@ This preview is no longer valid. + + lrbordereditor + + Style + + + + No style + + + + Solid + + + + Presets + + + + No lines + + + + Outline + + + + Border + + + + ... + + + + Edit border + + + + Width: + + + + 1 + + + + 0.25 + + + + 0.5 + + + + 1.5 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + Color: + + + + Select... + + + + Dash + + + + Dot + + + + Dash dot + + + + Dash dot dot + + + + + lrpageeditor + + Paper + + + + Format + الصيغة + + + Dimension + + + + Width: + + + + mm + + + + Height: + + + + Orientation + + + + Portrait + + + + Landscape + + + + Margins + + + + Bottom: + + + + Top: + + + + Right: + + + + Left: + + + + Drop printer margins + + + + Other + + + + Height options + + + + Endless Height + + + + Extended Height: + + + + Full page + + + + Page setup + + + diff --git a/translations/limereport_es.ts b/translations/limereport_es.ts index 7c0253e..7219087 100644 --- a/translations/limereport_es.ts +++ b/translations/limereport_es.ts @@ -8,6 +8,17 @@
+ + BorderFrameEditor + + BorderFrameEditor + + + + Text + + + ChartAxisEditor @@ -632,6 +643,10 @@ p, li { white-space: pre-wrap; } Lock item geometry + + Edit borders... + + LimeReport::ConnectionDesc @@ -1416,6 +1431,10 @@ p, li { white-space: pre-wrap; } All borders Todos los bordes + + Edit border + + LimeReport::MasterDetailProxyModel @@ -1512,6 +1531,10 @@ p, li { white-space: pre-wrap; } Mix with prior page + + Edit + Editar + LimeReport::PreviewReportWidget @@ -3504,4 +3527,194 @@ Esta vista previa ya no es válida. + + lrbordereditor + + Style + + + + No style + + + + Solid + + + + Presets + + + + No lines + + + + Outline + + + + Border + + + + ... + + + + Edit border + + + + Width: + + + + 1 + + + + 0.25 + + + + 0.5 + + + + 1.5 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + Color: + + + + Select... + + + + Dash + + + + Dot + + + + Dash dot + + + + Dash dot dot + + + + + lrpageeditor + + Paper + + + + Format + Formato + + + Dimension + + + + Width: + + + + mm + + + + Height: + + + + Orientation + + + + Portrait + Retrato + + + Landscape + Apaisado (Horizontal) + + + Margins + + + + Bottom: + + + + Top: + + + + Right: + + + + Left: + + + + Drop printer margins + + + + Other + + + + Height options + + + + Endless Height + + + + Extended Height: + + + + Full page + Página completa + + + Page setup + + + diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 2adb87e..b7d37b4 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -9,6 +9,19 @@
+ + BorderFrameEditor + + + BorderFrameEditor + + + + + Text + + + ChartAxisEditor @@ -555,7 +568,7 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - + Lock item geometry Verrouiller la géométrie d'un élément @@ -604,6 +617,11 @@ p, li { white-space: pre-wrap; } All borders Toutes les bordures + + + Edit borders... + + LimeReport::ConnectionDesc @@ -1581,35 +1599,40 @@ p, li { white-space: pre-wrap; } LimeReport::ItemsBordersEditorWidget - + Top line ligne haute - + Bottom line Ligne basse - + Left line Ligne gauche - + Right line Ligne droite - + No borders Aucune bordure - + All borders Toutes les bordures + + + Edit border + + LimeReport::MasterDetailProxyModel @@ -1697,37 +1720,43 @@ p, li { white-space: pre-wrap; } LimeReport::PageItemDesignIntf - + + + Edit + Edition + + + Paste Coller - - + + Page is TOC Table de contenus - - + + Reset page number Réinitialiser le numéro de page - - + + Full page Page entière - - + + Set page size to printer Adapterr la taille de la page à l'imprimante - - + + Mix with prior page @@ -1745,7 +1774,7 @@ p, li { white-space: pre-wrap; } %1 nom de fichier - + Report file name Nom du fichier du rapport @@ -4357,4 +4386,249 @@ Cet aperçu n'est plus valide. + + lrbordereditor + + + Style + + + + + No style + + + + + Solid + + + + + Width: + + + + + + 1 + + + + + Select... + + + + + 0.25 + + + + + Dash + + + + + Dot + + + + + Dash dot + + + + + Dash dot dot + + + + + 0.5 + + + + + 1.5 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + Color: + + + + + Presets + + + + + Edit border + + + + + No lines + + + + + Outline + + + + + Border + + + + + + + + ... + + + + + lrpageeditor + + + Page setup + + + + + Paper + + + + + Format + + + + + Dimension + + + + + Width: + + + + + + + + + + mm + + + + + Height: + + + + + Orientation + + + + + Portrait + + + + + Landscape + Paysage + + + + Margins + + + + + Bottom: + + + + + Top: + + + + + Right: + + + + + Left: + + + + + Drop printer margins + + + + + Other + + + + + Height options + + + + + Endless Height + + + + + Extended Height: + + + + + Full page + Page entière + + diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 556f35b..aca5301 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -9,6 +9,19 @@ + + BorderFrameEditor + + + BorderFrameEditor + + + + + Text + + + ChartAxisEditor @@ -567,7 +580,7 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - + Lock item geometry Zablokuj geometrię pozycji @@ -616,6 +629,11 @@ p, li { white-space: pre-wrap; } All borders Pełne obramowanie + + + Edit borders... + + LimeReport::ConnectionDesc @@ -1593,35 +1611,40 @@ p, li { white-space: pre-wrap; } LimeReport::ItemsBordersEditorWidget - + Top line Górna krawędź - + Bottom line Dolna krawędź - + Left line Lewa krawędź - + Right line Prawa krawędź - + No borders Bez krawędzi - + All borders Wszystkie krawędzie + + + Edit border + + LimeReport::MasterDetailProxyModel @@ -1709,37 +1732,43 @@ p, li { white-space: pre-wrap; } LimeReport::PageItemDesignIntf - + + + Edit + Edycja + + + Paste Wklej - - + + Page is TOC Strona to spis treści - - + + Reset page number Zresetuj numer strony - - + + Full page Cała strona - - + + Set page size to printer Ustaw rozmiar strony na drukarkę - - + + Mix with prior page @@ -1757,7 +1786,7 @@ p, li { white-space: pre-wrap; } %1 nazwa pliku - + Report file name Nazwa pliku raportu @@ -4369,4 +4398,249 @@ Ten podgląd nie jest już prawidłowy. + + lrbordereditor + + + Style + + + + + No style + + + + + Solid + + + + + Width: + + + + + + 1 + + + + + Select... + + + + + 0.25 + + + + + Dash + + + + + Dot + + + + + Dash dot + + + + + Dash dot dot + + + + + 0.5 + + + + + 1.5 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + Color: + + + + + Presets + + + + + Edit border + + + + + No lines + + + + + Outline + + + + + Border + + + + + + + + ... + ... + + + + lrpageeditor + + + Page setup + + + + + Paper + + + + + Format + Format + + + + Dimension + + + + + Width: + + + + + + + + + + mm + + + + + Height: + + + + + Orientation + + + + + Portrait + Portret + + + + Landscape + Pejzaż + + + + Margins + + + + + Bottom: + + + + + Top: + + + + + Right: + + + + + Left: + + + + + Drop printer margins + + + + + Other + + + + + Height options + + + + + Endless Height + + + + + Extended Height: + + + + + Full page + Cała strona + + diff --git a/translations/limereport_ru.qm b/translations/limereport_ru.qm index 39d75115a0ffed81dfc62a36b84d084dc3c53ec0..cbbea89b99e75827f6b2abd20bf44d45d7f2b77e 100644 GIT binary patch delta 4761 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 + + BorderFrameEditor + + BorderFrameEditor + + + + Text + + + ChartAxisEditor @@ -509,6 +520,10 @@ p, li { white-space: pre-wrap; } Lock item geometry Заблокировать геометрию элемента + + Edit borders... + + LimeReport::ConnectionDesc @@ -1293,6 +1308,10 @@ p, li { white-space: pre-wrap; } All borders Все границы + + Edit border + + LimeReport::MasterDetailProxyModel @@ -1389,6 +1408,10 @@ p, li { white-space: pre-wrap; } Mix with prior page Смешивать с предыдущей страницей + + Edit + Правка + LimeReport::PreviewReportWidget @@ -3379,4 +3402,194 @@ This preview is no longer valid. + + lrbordereditor + + Style + + + + No style + + + + Solid + + + + Presets + + + + No lines + + + + Outline + + + + Border + + + + ... + ... + + + Edit border + + + + Width: + + + + 1 + + + + 0.25 + + + + 0.5 + + + + 1.5 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + Color: + + + + Select... + + + + Dash + + + + Dot + + + + Dash dot + + + + Dash dot dot + + + + + lrpageeditor + + Paper + + + + Format + Формат + + + Dimension + + + + Width: + + + + mm + + + + Height: + + + + Orientation + + + + Portrait + Портретная + + + Landscape + Альбомная + + + Margins + + + + Bottom: + + + + Top: + + + + Right: + + + + Left: + + + + Drop printer margins + + + + Other + + + + Height options + + + + Endless Height + + + + Extended Height: + + + + Full page + На всю страницу + + + Page setup + + + diff --git a/translations/limereport_zh.ts b/translations/limereport_zh.ts index bb36f7c..3e62d44 100644 --- a/translations/limereport_zh.ts +++ b/translations/limereport_zh.ts @@ -8,6 +8,17 @@ $ClassName$ + + BorderFrameEditor + + BorderFrameEditor + + + + Text + + + ChartAxisEditor @@ -516,6 +527,10 @@ p, li { white-space: pre-wrap; } Create Vertical Layout 创建水平布局 + + Edit borders... + + LimeReport::ConnectionDesc @@ -1300,6 +1315,10 @@ p, li { white-space: pre-wrap; } All borders 所有边框 + + Edit border + + LimeReport::MasterDetailProxyModel @@ -1396,6 +1415,10 @@ p, li { white-space: pre-wrap; } Mix with prior page + + Edit + 编辑 + LimeReport::PreviewReportWidget @@ -3388,4 +3411,194 @@ This preview is no longer valid. + + lrbordereditor + + Style + + + + No style + + + + Solid + + + + Presets + + + + No lines + + + + Outline + + + + Border + + + + ... + ... + + + Edit border + + + + Width: + + + + 1 + + + + 0.25 + + + + 0.5 + + + + 1.5 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + Color: + + + + Select... + + + + Dash + + + + Dot + + + + Dash dot + + + + Dash dot dot + + + + + lrpageeditor + + Paper + + + + Format + 格式 + + + Dimension + + + + Width: + + + + mm + + + + Height: + + + + Orientation + + + + Portrait + 纵向 + + + Landscape + 横向 + + + Margins + + + + Bottom: + + + + Top: + + + + Right: + + + + Left: + + + + Drop printer margins + + + + Other + + + + Height options + + + + Endless Height + + + + Extended Height: + + + + Full page + 全页 + + + Page setup + + + From f00f72efa98ce27aeaa1e5ecd8dee2ba9791acf0 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 30 Oct 2022 12:26:13 +0300 Subject: [PATCH 12/26] Github actions: add support msvc, mingw, macos --- .github/workflows/cmake.yml | 129 +++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 57437ed..be1b89b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: ubuntu_version: [20.04, 22.04] - qt_version: [5.12.12, 5.15.2, 6.3.0] + qt_version: [5.15.2, 6.4.0] static: [ON, OFF] steps: @@ -45,3 +45,130 @@ jobs: - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + MSVC: + name: windows-${{ matrix.win_version }}-Qt-${{ matrix.qt_version }}-static-${{ matrix.static }} + runs-on: windows-${{ matrix.win_version }} + strategy: + fail-fast: false + matrix: + win_version: [2019, 2022] + qt_version: [5.15.2, 6.4.0] + static: [ON, OFF] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.qt_version }} + cache: 'true' + cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }} + dir: ${{ github.workspace }}/Qt + + - name: Configure CMake for Qt5 + if: "startsWith(matrix.qt_version, '5.')" + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + + + - name: Configure CMake for Qt6 + if: "startsWith(matrix.qt_version, '6.')" + run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + MinGW-w64: + runs-on: windows-2022 + name: msys2-${{ matrix.msystem }}-Qt-${{ matrix.qt_version }}-static-${{ matrix.static }} + strategy: + fail-fast: false + matrix: + qt_version: [5, 6] + msystem: [UCRT64, CLANG64] + static: [ON, OFF] + defaults: + run: + shell: msys2 {0} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install MinGW-w64 packages Qt5 + if: "startsWith(matrix.qt_version, '5')" + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msystem }} + release: false + update: true + pacboy: >- + cc:p + cmake:p + ninja:p + qt${{ matrix.qt_version }}-base:p + qt${{ matrix.qt_version }}-svg:p + qt${{ matrix.qt_version }}-tools:p + qt${{ matrix.qt_version }}-quickcontrols:p + + - name: Install MinGW-w64 packages Qt6 + if: "startsWith(matrix.qt_version, '6')" + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msystem }} + release: false + update: true + pacboy: >- + cc:p + cmake:p + ninja:p + qt${{ matrix.qt_version }}-base:p + qt${{ matrix.qt_version }}-svg:p + qt${{ matrix.qt_version }}-tools:p + qt${{ matrix.qt_version }}-declarative:p + + - name: Configure CMake for Qt5 + if: "startsWith(matrix.qt_version, '5')" + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + + + - name: Configure CMake for Qt6 + if: "startsWith(matrix.qt_version, '6')" + run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + + - name: Build + run: cmake --build '${{github.workspace}}/build' --config ${{env.BUILD_TYPE}} + macos: + runs-on: macos-${{ matrix.macos_version }} + name: macos-${{ matrix.macos_version }}-Qt-${{ matrix.qt_version }}-static-${{ matrix.static }} + strategy: + fail-fast: false + matrix: + macos_version: [11, 12] + qt_version: [5.15.2, 6.4.0] + static: [ON, OFF] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.qt_version }} + cache: 'true' + cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }} + dir: ${{ github.workspace }}/Qt + + - name: Configure CMake for Qt5 + if: "startsWith(matrix.qt_version, '5.')" + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + + + - name: Configure CMake for Qt6 + if: "startsWith(matrix.qt_version, '6.')" + run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} \ No newline at end of file From e6ead26d31385cc62e969339623ce9d45717b0f8 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Sun, 30 Oct 2022 20:44:59 +0300 Subject: [PATCH 13/26] Cmake fixes: non exported symbols, missing files, shared import, rewrite cmake for demo and designer --- .github/workflows/cmake.yml | 16 ++++++------ CMakeLists.txt | 27 +++++++++++++++---- demo_r1/CMakeLists.txt | 9 ++++--- designer/CMakeLists.txt | 10 +++---- limereport/items/lrbordereditor.h | 2 +- limereport/items/lrpageeditor.cpp | 33 +++++++++++++----------- limereport/items/lrpageeditor.h | 2 +- limereport/lrbasedesignintf.h | 8 +++--- limereport/lrcollection.h | 6 ++--- limereport/lrglobal.h | 10 +++---- limereport/lritemscontainerdesignitf.h | 12 ++++----- limereport/lrpageitemdesignintf.h | 2 +- limereport/serializators/lrstorageintf.h | 7 ++--- 13 files changed, 83 insertions(+), 61 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index be1b89b..1233e7a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -35,12 +35,12 @@ jobs: - name: Configure CMake for Qt5 if: "startsWith(matrix.qt_version, '5.')" - run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Configure CMake for Qt6 if: "startsWith(matrix.qt_version, '6.')" - run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} @@ -69,12 +69,12 @@ jobs: - name: Configure CMake for Qt5 if: "startsWith(matrix.qt_version, '5.')" - run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Configure CMake for Qt6 if: "startsWith(matrix.qt_version, '6.')" - run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} @@ -130,12 +130,12 @@ jobs: - name: Configure CMake for Qt5 if: "startsWith(matrix.qt_version, '5')" - run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Configure CMake for Qt6 if: "startsWith(matrix.qt_version, '6')" - run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Build run: cmake --build '${{github.workspace}}/build' --config ${{env.BUILD_TYPE}} @@ -163,12 +163,12 @@ jobs: - name: Configure CMake for Qt5 if: "startsWith(matrix.qt_version, '5.')" - run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Configure CMake for Qt6 if: "startsWith(matrix.qt_version, '6.')" - run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -B "${{github.workspace}}/build" + run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build" - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 00f0869..64ce1b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ set(LIMEREPORT_VERSION_RELEASE 8) option(ENABLE_ZINT "Enable libzint build for barcode support" OFF) option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF) +option(LIMEREPORT_DEMO "Build LimeReport demos" OFF) option(USE_QT6 "Use Qt6" OFF) if(USE_QT6) @@ -37,8 +38,11 @@ if (Qt${QT_VERSION_MAJOR}Widgets_FOUND) endif() add_subdirectory(3rdparty) -add_subdirectory(designer EXCLUDE_FROM_ALL) -add_subdirectory(demo_r1 EXCLUDE_FROM_ALL) + +if (LIMEREPORT_DEMO) + add_subdirectory(designer) + add_subdirectory(demo_r1) +endif() set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) @@ -79,6 +83,8 @@ ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.cpp ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.cpp ${PROJECT_NAME}/items/lrabstractlayout.cpp ${PROJECT_NAME}/items/lralignpropitem.cpp +${PROJECT_NAME}/items/borderframeeditor.cpp +${PROJECT_NAME}/items/lrbordereditor.cpp ${PROJECT_NAME}/items/lrchartitem.cpp ${PROJECT_NAME}/items/lrchartaxiseditor.cpp ${PROJECT_NAME}/items/lrchartitemeditor.cpp @@ -86,6 +92,7 @@ ${PROJECT_NAME}/items/lrhorizontallayout.cpp ${PROJECT_NAME}/items/lrimageitem.cpp ${PROJECT_NAME}/items/lrimageitemeditor.cpp ${PROJECT_NAME}/items/lrlayoutmarker.cpp +${PROJECT_NAME}/items/lrpageeditor.cpp ${PROJECT_NAME}/items/lrshapeitem.cpp ${PROJECT_NAME}/items/lrsubitemparentpropitem.cpp ${PROJECT_NAME}/items/lrsvgitem.cpp @@ -191,6 +198,8 @@ ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.h ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.h ${PROJECT_NAME}/items/lrabstractlayout.h ${PROJECT_NAME}/items/lralignpropitem.h +${PROJECT_NAME}/items/borderframeeditor.h +${PROJECT_NAME}/items/lrbordereditor.h ${PROJECT_NAME}/items/lrchartitem.h ${PROJECT_NAME}/items/lrchartaxiseditor.h ${PROJECT_NAME}/items/lrchartitemeditor.h @@ -199,6 +208,7 @@ ${PROJECT_NAME}/items/lrhorizontallayout.h ${PROJECT_NAME}/items/lrimageitem.h ${PROJECT_NAME}/items/lrimageitemeditor.h ${PROJECT_NAME}/items/lrlayoutmarker.h +${PROJECT_NAME}/items/lrpageeditor.h ${PROJECT_NAME}/items/lrshapeitem.h ${PROJECT_NAME}/items/lrsubitemparentpropitem.h ${PROJECT_NAME}/items/lrsvgitem.h @@ -288,9 +298,12 @@ ${PROJECT_NAME}/databrowser/lrdatabrowser.ui ${PROJECT_NAME}/databrowser/lrsqleditdialog.ui ${PROJECT_NAME}/databrowser/lrvariabledialog.ui ${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui +${PROJECT_NAME}/items/borderframeeditor.ui +${PROJECT_NAME}/items/lrbordereditor.ui ${PROJECT_NAME}/items/lrchartitemeditor.ui ${PROJECT_NAME}/items/lrchartaxiseditor.ui ${PROJECT_NAME}/items/lrimageitemeditor.ui +${PROJECT_NAME}/items/lrpageeditor.ui ${PROJECT_NAME}/items/lrtextitemeditor.ui ${PROJECT_NAME}/lraboutdialog.ui ${PROJECT_NAME}/lrpreviewreportwidget.ui @@ -348,12 +361,13 @@ set(GLOBAL_HEADERS set(PROJECT_NAME ${PROJECT_NAME}-qt${QT_VERSION_MAJOR}) if (LIMEREPORT_STATIC) - message(STATUS "STATIC LIBRARY") - add_library(${PROJECT_NAME} STATIC ${EXTRA_FILES} ${LIMEREPORT_SOURCES}) + message(STATUS "STATIC LIBRARY") + add_library(${PROJECT_NAME} STATIC ${EXTRA_FILES} ${LIMEREPORT_SOURCES}) target_compile_definitions( ${PROJECT_NAME} PUBLIC -DHAVE_STATIC_BUILD) else() add_library(${PROJECT_NAME} SHARED ${EXTRA_FILES} ${LIMEREPORT_SOURCES}) - target_compile_definitions( ${PROJECT_NAME} PUBLIC -DLIMEREPORT_EXPORTS) + target_compile_definitions( ${PROJECT_NAME} PRIVATE -DLIMEREPORT_EXPORTS) + target_compile_definitions( ${PROJECT_NAME} INTERFACE -DLIMEREPORT_IMPORTS) endif() target_compile_definitions(${PROJECT_NAME} PUBLIC -DCMAKE_CONFIG) @@ -392,6 +406,9 @@ target_include_directories( ${PROJECT_NAME} PRIVATE limereport/serializators limereport/scripteditor ) +target_include_directories( ${PROJECT_NAME} INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/include) + install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib diff --git a/demo_r1/CMakeLists.txt b/demo_r1/CMakeLists.txt index da749ac..4f68d4a 100644 --- a/demo_r1/CMakeLists.txt +++ b/demo_r1/CMakeLists.txt @@ -1,3 +1,5 @@ +project(demo_r1) + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) @@ -9,15 +11,14 @@ set(PROJECT_SOURCES mainwindow.ui ) -add_executable(demo_r1 main.cpp ${PROJECT_SOURCES}) +add_executable(${PROJECT_NAME} main.cpp ${PROJECT_SOURCES}) -target_include_directories( demo_r1 PRIVATE ../include/ ) -target_link_libraries(demo_r1 PRIVATE +target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Sql - ${PROJECT_NAME}-qt${QT_VERSION_MAJOR} + limereport-qt${QT_VERSION_MAJOR} ) diff --git a/designer/CMakeLists.txt b/designer/CMakeLists.txt index d63ea0b..9ae1a39 100644 --- a/designer/CMakeLists.txt +++ b/designer/CMakeLists.txt @@ -1,3 +1,5 @@ +project(LRDesigner) + set(CMAKE_AUTOMOC ON) set(LRDESIGNER_FILES @@ -7,14 +9,12 @@ set(LRDESIGNER_FILES mainicon.rc ) -add_executable(LRDesigner ${LRDESIGNER_FILES}) +add_executable(${PROJECT_NAME} ${LRDESIGNER_FILES}) -target_include_directories(LRDesigner PUBLIC ${PROJECT_SOURCE_DIR}/include) - -target_link_libraries(LRDesigner PUBLIC +target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Qml - ${PROJECT_NAME}-qt${QT_VERSION_MAJOR} + limereport-qt${QT_VERSION_MAJOR} ) diff --git a/limereport/items/lrbordereditor.h b/limereport/items/lrbordereditor.h index 5c2c9ba..3158b48 100644 --- a/limereport/items/lrbordereditor.h +++ b/limereport/items/lrbordereditor.h @@ -7,7 +7,7 @@ namespace Ui { class lrbordereditor; } -class lrbordereditor : public QDialog +class LIMEREPORT_EXPORT lrbordereditor : public QDialog { Q_OBJECT diff --git a/limereport/items/lrpageeditor.cpp b/limereport/items/lrpageeditor.cpp index d0c2f46..0efe6f2 100644 --- a/limereport/items/lrpageeditor.cpp +++ b/limereport/items/lrpageeditor.cpp @@ -1,9 +1,12 @@ #include "lrpageeditor.h" #include "ui_lrpageeditor.h" -#include "lrpagedesignintf.h" +#include "lrpageitemdesignintf.h" #include #include -lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page) : + +using namespace LimeReport; + +lrpageeditor::lrpageeditor(QWidget *parent, PageItemDesignIntf *page) : QDialog(parent), ui(new Ui::lrpageeditor) { @@ -16,10 +19,10 @@ lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page ui->format->addItem(pageSizes.key(i)); } ui->format->setCurrentIndex(m_page->pageSize()); - ui->width->setValue(m_page->width() / LimeReport::Const::mmFACTOR); - ui->height->setValue(m_page->height() / LimeReport::Const::mmFACTOR); - ui->portrait->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Portrait); - ui->landscape->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Landscape); + ui->width->setValue(m_page->width() / Const::mmFACTOR); + ui->height->setValue(m_page->height() / Const::mmFACTOR); + ui->portrait->setChecked(m_page->pageOrientation() == PageItemDesignIntf::Portrait); + ui->landscape->setChecked(m_page->pageOrientation() == PageItemDesignIntf::Landscape); //Margins ui->marginTop->setValue(m_page->topMargin()); ui->marginRight->setValue(m_page->rightMargin()); @@ -40,10 +43,10 @@ lrpageeditor::~lrpageeditor() void lrpageeditor::applyChanges() { - m_page->setPageSize(static_cast(ui->format->currentIndex())); - m_page->setWidth(ui->width->value()* LimeReport::Const::mmFACTOR); - m_page->setHeight(ui->height->value()* LimeReport::Const::mmFACTOR); - m_page->setPageOrientation(ui->portrait->isChecked()?LimeReport::PageItemDesignIntf::Portrait : LimeReport::PageItemDesignIntf::Landscape); + m_page->setPageSize(static_cast(ui->format->currentIndex())); + m_page->setWidth(ui->width->value()* Const::mmFACTOR); + m_page->setHeight(ui->height->value()* Const::mmFACTOR); + m_page->setPageOrientation(ui->portrait->isChecked()?PageItemDesignIntf::Portrait : PageItemDesignIntf::Landscape); m_page->setTopMargin(ui->marginTop->value()); m_page->setBottomMargin(ui->marginBottom->value()); @@ -61,9 +64,9 @@ void lrpageeditor::on_buttonBox_accepted() } -QSizeF lrpageeditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size) +QSizeF lrpageeditor::getRectByPageSize(const PageItemDesignIntf::PageSize& size) { - if (size != LimeReport::PageItemDesignIntf::Custom) { + if (size != PageItemDesignIntf::Custom) { QPrinter printer; printer.setOutputFormat(QPrinter::PdfFormat); #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) @@ -76,8 +79,8 @@ QSizeF lrpageeditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::Pag QPageSize pageSize = QPageSize((QPageSize::PageSizeId)size); qreal width = pageSize.size(QPageSize::Millimeter).width() * 10; qreal height = pageSize.size(QPageSize::Millimeter).height() * 10; - return QSizeF(pageOrientation() == Portrait ? width : height, - pageOrientation() == Portrait ? height : width); + return QSizeF(m_page->pageOrientation() == PageItemDesignIntf::Portrait ? width : height, + m_page->pageOrientation() == PageItemDesignIntf::Orientation::Portrait ? height : width); // printer.setPageOrientation((QPageLayout::Orientation)pageOrientation()); // printer.setPageSize(QPageSize((QPageSize::PageSizeId)size)); @@ -95,7 +98,7 @@ void lrpageeditor::on_format_currentIndexChanged(int index) QPageSize ps = *new QPageSize(); if(ui->format->currentText() != "Custom") { - QSizeF pageSize = getRectByPageSize(static_cast(index)); + QSizeF pageSize = getRectByPageSize(static_cast(index)); ui->width->setValue(pageSize.width()/10); ui->height->setValue(pageSize.height()/10); } diff --git a/limereport/items/lrpageeditor.h b/limereport/items/lrpageeditor.h index 545ca3e..d1ed8d5 100644 --- a/limereport/items/lrpageeditor.h +++ b/limereport/items/lrpageeditor.h @@ -8,7 +8,7 @@ namespace Ui { class lrpageeditor; } -class lrpageeditor : public QDialog +class LIMEREPORT_EXPORT lrpageeditor : public QDialog { Q_OBJECT diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index adf7d21..44267c0 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -49,7 +49,7 @@ class ReportEnginePrivate; class PageDesignIntf; class BaseDesignIntf; -class Marker : public QGraphicsItem{ +class LIMEREPORT_EXPORT Marker : public QGraphicsItem{ public: Marker(QGraphicsItem* parent = 0, BaseDesignIntf* owner = 0): QGraphicsItem(parent), m_owner(owner){} QRectF boundingRect() const; @@ -65,7 +65,7 @@ private: BaseDesignIntf* m_owner; }; -class SelectionMarker : public Marker{ +class LIMEREPORT_EXPORT SelectionMarker : public Marker{ public: SelectionMarker(QGraphicsItem* parent=0, BaseDesignIntf* owner = 0); QColor color() const; @@ -80,7 +80,7 @@ protected: class DataSourceManager; class ReportRender; -class BaseDesignIntf : +class LIMEREPORT_EXPORT BaseDesignIntf : public QObject, public QGraphicsItem, public ICollectionContainer, public ObjectLoadingStateIntf { Q_OBJECT Q_INTERFACES(QGraphicsItem) @@ -515,7 +515,7 @@ signals: void afterRender(); }; -class BookmarkContainerDesignIntf: public BaseDesignIntf{ +class LIMEREPORT_EXPORT BookmarkContainerDesignIntf: public BaseDesignIntf{ Q_OBJECT public: BookmarkContainerDesignIntf(const QString& storageTypeName, QObject* owner = 0, QGraphicsItem* parent = 0) diff --git a/limereport/lrcollection.h b/limereport/lrcollection.h index 4e3aded..e66d1b9 100644 --- a/limereport/lrcollection.h +++ b/limereport/lrcollection.h @@ -35,7 +35,7 @@ #include "lrglobal.h" -class ACollectionProperty{ +class LIMEREPORT_EXPORT ACollectionProperty{ public: ACollectionProperty(){} ACollectionProperty(const ACollectionProperty& ){} @@ -45,8 +45,8 @@ Q_DECLARE_METATYPE(ACollectionProperty) namespace LimeReport{ -const int COLLECTION_TYPE_ID = qMetaTypeId(); -class ICollectionContainer{ +const int inline COLLECTION_TYPE_ID = qMetaTypeId(); +class LIMEREPORT_EXPORT ICollectionContainer{ public: virtual QObject* createElement(const QString& collectionName,const QString& elementType)=0; virtual int elementsCount(const QString& collectionName)=0; diff --git a/limereport/lrglobal.h b/limereport/lrglobal.h index b2fe56c..95f9801 100644 --- a/limereport/lrglobal.h +++ b/limereport/lrglobal.h @@ -125,12 +125,12 @@ namespace Const{ Q_DECLARE_FLAGS(PreviewHints, PreviewHint) Q_FLAGS(PreviewHints) - class ReportError : public std::runtime_error{ + class LIMEREPORT_EXPORT ReportError : public std::runtime_error{ public: ReportError(const QString& message); }; - class ReportSettings{ + class LIMEREPORT_EXPORT ReportSettings{ public: ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){} void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;} @@ -140,13 +140,13 @@ namespace Const{ bool m_suppressAbsentFieldsAndVarsWarnings; }; - class IExternalPainter{ + class LIMEREPORT_EXPORT IExternalPainter{ public: virtual void paintByExternalPainter(const QString& objectName, QPainter* painter, const QStyleOptionGraphicsItem* options) = 0; virtual ~IExternalPainter(); }; - class IPainterProxy{ + class LIMEREPORT_EXPORT IPainterProxy{ public: virtual void setExternalPainter(IExternalPainter* externalPainter) = 0; virtual ~IPainterProxy(); @@ -168,7 +168,7 @@ namespace Const{ #endif - class Enums + class LIMEREPORT_EXPORT Enums { public: enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime}; diff --git a/limereport/lritemscontainerdesignitf.h b/limereport/lritemscontainerdesignitf.h index 483bf95..5a87532 100644 --- a/limereport/lritemscontainerdesignitf.h +++ b/limereport/lritemscontainerdesignitf.h @@ -5,7 +5,7 @@ namespace LimeReport{ -class Segment{ +class LIMEREPORT_EXPORT Segment{ public: Segment(qreal segmentStart,qreal segmentEnd):m_begin(segmentStart),m_end(segmentEnd){} bool intersect(Segment value); @@ -15,17 +15,17 @@ private: qreal m_end; }; -class VSegment : public Segment{ +class LIMEREPORT_EXPORT VSegment : public Segment{ public: VSegment(QRectF rect):Segment(rect.top(),rect.bottom()){} }; -struct HSegment :public Segment{ +struct LIMEREPORT_EXPORT HSegment :public Segment{ public: HSegment(QRectF rect):Segment(rect.left(),rect.right()){} }; -struct ItemSortContainer { +struct LIMEREPORT_EXPORT ItemSortContainer { QRectF m_rect; BaseDesignIntf * m_item; ItemSortContainer(BaseDesignIntf *item){ @@ -35,9 +35,9 @@ struct ItemSortContainer { }; typedef QSharedPointer< ItemSortContainer > PItemSortContainer; -bool itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2); +bool LIMEREPORT_EXPORT itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2); -class ItemsContainerDesignInft : public BookmarkContainerDesignIntf{ +class LIMEREPORT_EXPORT ItemsContainerDesignInft : public BookmarkContainerDesignIntf{ Q_OBJECT public: ItemsContainerDesignInft(const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0): diff --git a/limereport/lrpageitemdesignintf.h b/limereport/lrpageitemdesignintf.h index 365c87d..1170a8f 100644 --- a/limereport/lrpageitemdesignintf.h +++ b/limereport/lrpageitemdesignintf.h @@ -39,7 +39,7 @@ namespace LimeReport{ class ReportRender; -class PageItemDesignIntf : public ItemsContainerDesignInft +class LIMEREPORT_EXPORT PageItemDesignIntf : public ItemsContainerDesignInft { Q_OBJECT Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin) diff --git a/limereport/serializators/lrstorageintf.h b/limereport/serializators/lrstorageintf.h index e0ec406..c178bd2 100644 --- a/limereport/serializators/lrstorageintf.h +++ b/limereport/serializators/lrstorageintf.h @@ -30,6 +30,7 @@ #ifndef LRSTORAGEINTF_H #define LRSTORAGEINTF_H +#include "lrglobal.h" #include class QString; @@ -37,14 +38,14 @@ class QObject; namespace LimeReport{ -class ObjectLoadingStateIntf{ +class LIMEREPORT_EXPORT ObjectLoadingStateIntf{ public: virtual bool isLoading() = 0; virtual void objectLoadStarted() = 0; virtual void objectLoadFinished() = 0; }; -class ItemsWriterIntf +class LIMEREPORT_EXPORT ItemsWriterIntf { public: virtual void putItem(QObject* item) = 0; @@ -55,7 +56,7 @@ public: virtual ~ItemsWriterIntf(){} }; -class ItemsReaderIntf +class LIMEREPORT_EXPORT ItemsReaderIntf { public: typedef QSharedPointer Ptr; From 7bf0ce51e6ddf1450fcedf264b916103213043a4 Mon Sep 17 00:00:00 2001 From: Alexander Arin Date: Mon, 31 Oct 2022 21:20:24 +0300 Subject: [PATCH 14/26] Border editor refactoring --- limereport/images/border_settings.png | Bin 0 -> 5843 bytes limereport/items/borderframeeditor.cpp | 287 ------------------ .../editors/lritemsborderseditorwidget.cpp | 54 ++-- .../editors/lritemsborderseditorwidget.h | 6 +- limereport/items/images/border_settings.png | Bin 0 -> 5788 bytes limereport/items/lrbordereditor.cpp | 206 ++++++------- limereport/items/lrbordereditor.h | 53 ++-- limereport/items/lrbordereditor.ui | 68 +++-- limereport/items/lrborderframeeditor.cpp | 181 +++++++++++ ...derframeeditor.h => lrborderframeeditor.h} | 20 +- ...rframeeditor.ui => lrborderframeeditor.ui} | 4 +- limereport/items/lrpageeditor.cpp | 77 ++--- limereport/items/lrpageeditor.h | 9 +- limereport/items/lrpageeditor.ui | 16 +- limereport/limereport.pri | 6 +- limereport/lrbasedesignintf.cpp | 22 +- limereport/lrbasedesignintf.h | 2 +- limereport/lrpagedesignintf.cpp | 14 + limereport/lrpagedesignintf.h | 5 + limereport/lrpageitemdesignintf.cpp | 34 +-- limereport/lrreportdesignwidget.cpp | 10 + limereport/lrreportdesignwidget.h | 2 + limereport/report.qrc | 1 + 23 files changed, 487 insertions(+), 590 deletions(-) create mode 100644 limereport/images/border_settings.png delete mode 100644 limereport/items/borderframeeditor.cpp create mode 100644 limereport/items/images/border_settings.png create mode 100644 limereport/items/lrborderframeeditor.cpp rename limereport/items/{borderframeeditor.h => lrborderframeeditor.h} (61%) rename limereport/items/{borderframeeditor.ui => lrborderframeeditor.ui} (94%) diff --git a/limereport/images/border_settings.png b/limereport/images/border_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..3bae2c8c8626033ef5c59aed46123ad2a09cae81 GIT binary patch literal 5843 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 C$=tdC literal 0 HcmV?d00001 diff --git a/limereport/items/borderframeeditor.cpp b/limereport/items/borderframeeditor.cpp deleted file mode 100644 index a864550..0000000 --- a/limereport/items/borderframeeditor.cpp +++ /dev/null @@ -1,287 +0,0 @@ -#include "borderframeeditor.h" -#include "ui_borderframeeditor.h" -#include -#include -#include -#include -#include "lrbasedesignintf.h" -#include "lrbordereditor.h" -using namespace LimeReport; -BorderFrameEditor::BorderFrameEditor(QWidget *parent) - : QWidget(parent) - , ui(new Ui::BorderFrameEditor) -{ - ui->setupUi(this); - scene = new QGraphicsScene(ui->graphicsView); - - QRect vRect = rect(); - - //Draw corder lines - //topLeft - scene->addLine(10,5, 10,10,QPen(Qt::gray)); - scene->addLine(5,10, 10,10,QPen(Qt::gray)); - //bottomLeft - scene->addLine(10,vRect.bottom() -5, 10,vRect.bottom()-10,QPen(Qt::gray)); - scene->addLine(5,vRect.bottom()-10,10,vRect.bottom()-10,QPen(Qt::gray)); - //bottomRight - scene->addLine(vRect.right()-10,vRect.bottom() -5,vRect.right()- 10,vRect.bottom()-10,QPen(Qt::gray)); - scene->addLine(vRect.right()-5,vRect.bottom()-10,vRect.right()-10,vRect.bottom()-10,QPen(Qt::gray)); - //topRight - scene->addLine(vRect.width()-10,5,vRect.width()- 10,10,QPen(Qt::gray)); - scene->addLine(vRect.width()-5,10, vRect.width()-10,10,QPen(Qt::gray)); - scene->setSceneRect(vRect); - ui->graphicsView->setScene(scene); - QGraphicsSimpleTextItem * io = new QGraphicsSimpleTextItem(); - io->setAcceptedMouseButtons(Qt::LeftButton); - io->setPos(scene->sceneRect().center()); - io->setText(tr("Text")); - scene->addItem(io); - - QRectF bR = io->sceneBoundingRect(); - io->setPos( scene->sceneRect().center().x() - bR.width()/2, scene->sceneRect().center().y() - bR.height()/2 ); - connect(this,SIGNAL(borderSideClicked(int, bool)),this,SLOT(SlotBorderSideClicked(int,bool))); - -} - -BorderFrameEditor::~BorderFrameEditor() -{ - delete ui; -} - -void BorderFrameEditor::setPen(QPen pen) -{ - m_pen = pen; - updateBorders(); - -} - -QPen BorderFrameEditor::pen() -{ - return m_pen; -} - -void BorderFrameEditor::setAllLines() -{ - - topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen); - - - leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen); - - bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10 - ,rect().bottom() - 10),m_pen); - - - - rightLine = scene->addLine(QLineF(rect().width() - 10,10 - ,rect().width() - 10,rect().height() - 10),m_pen); - - -} - -void BorderFrameEditor::unSetAllLines() -{ - if(topLine) - { - scene->removeItem(topLine); - - } - if(leftLine) - { - scene->removeItem(leftLine); - - } - if(bottomLine) - { - scene->removeItem(bottomLine); - - - - } - if(rightLine) - { - scene->removeItem(rightLine); - - } - -} - -void BorderFrameEditor::mousePressEvent(QMouseEvent *event) -{ - - if(event->x() >= 10 && event->y() <30)//Draw top border - { - - if(!topLine) - { - - emit borderSideClicked(1,true); - - } - else - { - - emit borderSideClicked(1,false); - } - } - - if((event->x() >= 10 && event->x() < 30) && (event->y() > 10)) //Draw border left - { - if(!leftLine) - { - - emit borderSideClicked(4,true); - - } - else - { - - emit borderSideClicked(4,false); - - } - } - - if(event->x() >= 10 && (event->y() >80 && event->y() < rect().bottom())) //Draw bottom border - { - if(!bottomLine) - { - - emit borderSideClicked(2,true); - } - - else - { - - emit borderSideClicked(2,false); - - } - } - - if((event->x() >= 130 && event->x() < rect().width()) && event->y() > 10) //Draw border right - { - if(!rightLine) - { - - emit borderSideClicked(8,true); - - } - else - { - - emit borderSideClicked(8,false); - - } - - } - - -} - -void BorderFrameEditor::SlotBorderSideClicked(int side, bool show) -{ - - switch(side) - { - case BaseDesignIntf::BorderSide::TopLine: - { - if(show) - { - topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen); - - - } - else - { - scene->removeItem(topLine); - topLine = NULL; - - } - }break; - case BaseDesignIntf::LeftLine: - { - if(show) - { - leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen); - - - } - else - { - scene->removeItem(leftLine); - leftLine = NULL; - - - } - }break; - case BaseDesignIntf::BottomLine: - { - if(show) - { - bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10 - ,rect().bottom() - 10),m_pen); - - } - - else - { - scene->removeItem(bottomLine); - bottomLine = NULL; - - - } - }break; - case BaseDesignIntf::RightLine: - { - if(show) - { - rightLine = scene->addLine(QLineF(rect().width() - 10,10 - ,rect().width() - 10,rect().height() - 10),m_pen); - - } - else - { - scene->removeItem(rightLine); - rightLine = NULL; - - } - - } - - } - updateBorders(); -} - -void BorderFrameEditor::updateBorders() -{ - //if a line is set we redraw it - if(topLine) - { - scene->removeItem(topLine); - topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen); - - } - if(leftLine) - { - scene->removeItem(leftLine); - leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen); - - } - if(bottomLine) - { - scene->removeItem(bottomLine); - - bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10 - ,rect().bottom() - 10),m_pen); - - } - if(rightLine) - { - scene->removeItem(rightLine); - - rightLine = scene->addLine(QLineF(rect().width() - 10,10 - ,rect().width() - 10,rect().height() - 10),m_pen); - - } - -} - diff --git a/limereport/items/editors/lritemsborderseditorwidget.cpp b/limereport/items/editors/lritemsborderseditorwidget.cpp index 7b4853a..a49aef2 100644 --- a/limereport/items/editors/lritemsborderseditorwidget.cpp +++ b/limereport/items/editors/lritemsborderseditorwidget.cpp @@ -44,7 +44,7 @@ void ItemsBordersEditorWidget::setItemEvent(BaseDesignIntf* item) updateValues((BaseDesignIntf::BorderLines)borders.toInt()); setEnabled(true); } - itm = item; + m_item = item; } void ItemsBordersEditorWidget::properyChangedEvent(const QString& property, const QVariant& oldValue, const QVariant& newValue) @@ -72,21 +72,18 @@ void ItemsBordersEditorWidget::allBordesClicked() updateValues((BaseDesignIntf::BorderLines)borders); } -void ItemsBordersEditorWidget::buttonClicked(bool) -{ - -} +void ItemsBordersEditorWidget::buttonClicked(bool){} void ItemsBordersEditorWidget::editBorderClicked() { - lrbordereditor be; - be.loadItem(itm); - if(be.exec() == QDialog::Rejected)return; + BorderEditor be; + be.loadItem(m_item); + if ( be.exec() == QDialog::Rejected ) return; updateValues(be.borderSides()); - itm->setBorderLinesFlags(be.borderSides()); - itm->setBorderLineSize(be.border_width()); - itm->setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.border_style()); - itm->setBorderColor(be.borderColor()); + m_item->setBorderLinesFlags(be.borderSides()); + m_item->setBorderLineSize(be.borderWidth()); + m_item->setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.borderStyle()); + m_item->setBorderColor(be.borderColor()); } void ItemsBordersEditorWidget::initEditor() @@ -129,7 +126,7 @@ void ItemsBordersEditorWidget::initEditor() addAction(m_allLines); addSeparator(); m_BorderEditor = new QAction(tr("Edit border"),this); - m_BorderEditor->setIcon(QIcon(":/report/images/allLines")); + m_BorderEditor->setIcon(QIcon(":/report/images/borderEditor")); connect(m_BorderEditor,SIGNAL(triggered()),this,SLOT(editBorderClicked())); addAction(m_BorderEditor); @@ -140,20 +137,20 @@ void ItemsBordersEditorWidget::initEditor() void ItemsBordersEditorWidget::updateValues(BaseDesignIntf::BorderLines borders) { m_changing = true; - m_topLine->setChecked(borders&BaseDesignIntf::TopLine); - m_bottomLine->setChecked(borders&BaseDesignIntf::BottomLine); - m_leftLine->setChecked(borders&BaseDesignIntf::LeftLine); - m_rightLine->setChecked(borders&BaseDesignIntf::RightLine); + m_topLine->setChecked(borders & BaseDesignIntf::TopLine); + m_bottomLine->setChecked(borders & BaseDesignIntf::BottomLine); + m_leftLine->setChecked(borders & BaseDesignIntf::LeftLine); + m_rightLine->setChecked(borders & BaseDesignIntf::RightLine); m_changing = false; } BaseDesignIntf::BorderLines ItemsBordersEditorWidget::createBorders() { int borders = 0; - borders += (m_topLine->isChecked())?BaseDesignIntf::TopLine:0; - borders += (m_bottomLine->isChecked())?BaseDesignIntf::BottomLine:0; - borders += (m_leftLine->isChecked())?BaseDesignIntf::LeftLine:0; - borders += (m_rightLine->isChecked())?BaseDesignIntf::RightLine:0; + borders += (m_topLine->isChecked()) ? BaseDesignIntf::TopLine:0; + borders += (m_bottomLine->isChecked()) ? BaseDesignIntf::BottomLine:0; + borders += (m_leftLine->isChecked()) ? BaseDesignIntf::LeftLine:0; + borders += (m_rightLine->isChecked()) ? BaseDesignIntf::RightLine:0; return (BaseDesignIntf::BorderLines)borders; } @@ -180,6 +177,21 @@ void ItemsBordersEditorWidgetForDesigner::allBordesClicked() ItemsBordersEditorWidget::allBordesClicked(); m_reportEditor->setBorders(createBorders()); } + +void ItemsBordersEditorWidgetForDesigner::editBorderClicked() +{ + BorderEditor be; + be.loadItem(m_item); + if ( be.exec() == QDialog::Rejected ) return; + + m_reportEditor->setBordersExt( + be.borderSides(), + be.borderWidth(), + (LimeReport::BaseDesignIntf::BorderStyle)be.borderStyle(), + be.borderColor() + ); +} + #endif } //namespace LimeReport diff --git a/limereport/items/editors/lritemsborderseditorwidget.h b/limereport/items/editors/lritemsborderseditorwidget.h index 2538258..ef83dbc 100644 --- a/limereport/items/editors/lritemsborderseditorwidget.h +++ b/limereport/items/editors/lritemsborderseditorwidget.h @@ -49,11 +49,12 @@ protected slots: virtual void noBordesClicked(); virtual void allBordesClicked(); virtual void buttonClicked(bool); - void editBorderClicked(); + virtual void editBorderClicked(); protected: void setItemEvent(BaseDesignIntf *item); void properyChangedEvent(const QString &property, const QVariant &oldValue, const QVariant &newValue); BaseDesignIntf::BorderLines createBorders(); + BaseDesignIntf *m_item; private: void initEditor(); void updateValues(BaseDesignIntf::BorderLines borders); @@ -66,7 +67,7 @@ private: QAction* m_BorderEditor; bool m_changing; int m_borders; - BaseDesignIntf *itm; + }; #ifdef HAVE_REPORT_DESIGNER @@ -79,6 +80,7 @@ protected slots: void buttonClicked(bool); void noBordesClicked(); void allBordesClicked(); + void editBorderClicked(); private: ReportDesignWidget* m_reportEditor; diff --git a/limereport/items/images/border_settings.png b/limereport/items/images/border_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..a74087414c9377b8499b89525b322e1246f61ed2 GIT binary patch literal 5788 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 literal 0 HcmV?d00001 diff --git a/limereport/items/lrbordereditor.cpp b/limereport/items/lrbordereditor.cpp index e8e2af3..63d8b88 100644 --- a/limereport/items/lrbordereditor.cpp +++ b/limereport/items/lrbordereditor.cpp @@ -2,181 +2,155 @@ #include "ui_lrbordereditor.h" #include #include "lrbasedesignintf.h" -lrbordereditor::lrbordereditor(QWidget *parent) : + +namespace LimeReport{ + +BorderEditor::BorderEditor(QWidget *parent) : QDialog(parent), - ui(new Ui::lrbordereditor) + ui(new Ui::BorderEditor), + m_borderStyle(1), + m_borderWidth(1) { ui->setupUi(this); - - connect(ui->borderFrame,SIGNAL(borderSideClicked(int, bool)), this, SLOT(checkToolButtons(int, bool))); + connect( + ui->borderFrame, SIGNAL(borderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)), + this, SLOT(checkToolButtons(LimeReport::BaseDesignIntf::BorderSide, bool)) + ); } -void lrbordereditor::loadItem(LimeReport::BaseDesignIntf *i) +void BorderEditor::loadItem(LimeReport::BaseDesignIntf *item) { - item = i; - if(item->borderLines() & LimeReport::BaseDesignIntf::TopLine) - { - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,true); + m_item = item; + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, + item->borderLines() & LimeReport::BaseDesignIntf::TopLine); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine, + item->borderLines() & LimeReport::BaseDesignIntf::LeftLine); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine, + item->borderLines() & LimeReport::BaseDesignIntf::RightLine); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine, + item->borderLines() & LimeReport::BaseDesignIntf::BottomLine); - } - if(item->borderLines() & LimeReport::BaseDesignIntf::LeftLine) - { - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,true); - - } - if(item->borderLines() & LimeReport::BaseDesignIntf::RightLine) - { - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,true); - - } - if(item->borderLines() & LimeReport::BaseDesignIntf::BottomLine) - { - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,true); - } QPen pen; pen.setWidthF(item->borderLineSize()); pen.setColor(item->borderColor()); pen.setStyle((Qt::PenStyle)item->borderStyle()); ui->borderFrame->setPen(pen); - border_color = item->borderColor().name(); + m_borderColor = item->borderColor().name(); ui->listWidget->setCurrentRow((Qt::PenStyle)item->borderStyle()); ui->comboBox->setCurrentText(QString::number(item->borderLineSize())); - borderWidth = ui->comboBox->currentText().toDouble(); - borderStyle =ui->listWidget->currentRow(); - ui->pushButton->setStyleSheet(QString("#pushButton{background-color:%1;}").arg(border_color)); + m_borderWidth = ui->comboBox->currentText().toDouble(); + m_borderStyle =ui->listWidget->currentRow(); + ui->colorIndicator->setStyleSheet(QString("background-color:%1;").arg(m_borderColor)); } -LimeReport::BaseDesignIntf::BorderLines lrbordereditor::borderSides() +LimeReport::BaseDesignIntf::BorderLines BorderEditor::borderSides() { int borders = 0; - borders += (ui->topLine->isChecked())?LimeReport::BaseDesignIntf::TopLine:0; - borders += (ui->bottomLine->isChecked())?LimeReport::BaseDesignIntf::BottomLine:0; - borders += (ui->leftLine->isChecked())?LimeReport::BaseDesignIntf::LeftLine:0; - borders += (ui->rightLine->isChecked())?LimeReport::BaseDesignIntf::RightLine:0; - return (LimeReport::BaseDesignIntf::BorderLines)borders; + borders += (ui->topLine->isChecked()) ? LimeReport::BaseDesignIntf::TopLine : 0; + borders += (ui->bottomLine->isChecked()) ? LimeReport::BaseDesignIntf::BottomLine : 0; + borders += (ui->leftLine->isChecked()) ? LimeReport::BaseDesignIntf::LeftLine : 0; + borders += (ui->rightLine->isChecked()) ? LimeReport::BaseDesignIntf::RightLine : 0; + return (LimeReport::BaseDesignIntf::BorderLines) borders; } -LimeReport::BaseDesignIntf::BorderStyle lrbordereditor::border_style() +LimeReport::BaseDesignIntf::BorderStyle BorderEditor::borderStyle() { - return (LimeReport::BaseDesignIntf::BorderStyle)borderStyle; + return (LimeReport::BaseDesignIntf::BorderStyle) m_borderStyle; } -QString lrbordereditor::borderColor() +QString BorderEditor::borderColor() { - return border_color; + return m_borderColor; } -double lrbordereditor::border_width() +double BorderEditor::borderWidth() { - return borderWidth; + return m_borderWidth; } -lrbordereditor::~lrbordereditor() +BorderEditor::~BorderEditor() { delete ui; } -void lrbordereditor::on_listWidget_currentRowChanged(int currentRow) +void BorderEditor::on_listWidget_currentRowChanged(int currentRow) { QPen pen = ui->borderFrame->pen(); pen.setStyle((Qt::PenStyle)currentRow); - borderStyle = currentRow; + m_borderStyle = currentRow; ui->borderFrame->setPen(pen); - - } - -void lrbordereditor::on_comboBox_currentTextChanged(const QString &arg1) +void BorderEditor::on_comboBox_currentTextChanged(const QString &arg1) { QPen pen = ui->borderFrame->pen(); pen.setWidthF(arg1.toDouble()); ui->borderFrame->setPen(pen); - borderWidth = arg1.toDouble(); + m_borderWidth = arg1.toDouble(); } - -void lrbordereditor::on_pushButton_clicked() +void BorderEditor::checkToolButtons(LimeReport::BaseDesignIntf::BorderSide side, bool check) { - QColorDialog cd(this); - if(cd.exec() == QDialog::Rejected)return; - QPen pen = ui->borderFrame->pen(); - pen.setColor(cd.selectedColor().name()); - border_color = pen.color().name(); - - ui->pushButton->setStyleSheet(QString("#pushButton{background-color:%1;}").arg(border_color)); - ui->borderFrame->setPen(pen); -} - - -void lrbordereditor::on_toolButton_4_clicked() -{ - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,true); - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,true); - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,true); - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,true); - QPen pen = ui->borderFrame->pen(); - - ui->borderFrame->setPen(pen); -} - - -void lrbordereditor::on_noLines_clicked() -{ - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,false); - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,false); - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,false); - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,false); - -} - - -void lrbordereditor::on_topLine_clicked() -{ - - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,ui->topLine->isChecked()); - -} - -void lrbordereditor::checkToolButtons(int side, bool check) -{ - switch(side) { - case LimeReport::BaseDesignIntf::BorderSide::TopLine: - { - ui->topLine->setChecked(check); - }break; - case LimeReport::BaseDesignIntf::BorderSide::BottomLine: - { - ui->bottomLine->setChecked(check); - }break; - case LimeReport::BaseDesignIntf::BorderSide::LeftLine: - { - ui->leftLine->setChecked(check); - }break; - case LimeReport::BaseDesignIntf::BorderSide::RightLine: - { - ui->rightLine->setChecked(check); - }break; + case BaseDesignIntf::BorderSide::TopLine: + ui->topLine->setChecked(check); + break; + case BaseDesignIntf::BorderSide::BottomLine: + ui->bottomLine->setChecked(check); + break; + case BaseDesignIntf::BorderSide::LeftLine: + ui->leftLine->setChecked(check); + break; + case BaseDesignIntf::BorderSide::RightLine: + ui->rightLine->setChecked(check); + break; } } +void BorderEditor::on_topLine_clicked(bool checked){ + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, checked); +} -void lrbordereditor::on_bottomLine_clicked() -{ - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,ui->bottomLine->isChecked()); +void BorderEditor::on_bottomLine_clicked(bool checked){ + emit ui->borderFrame->borderSideClicked(BaseDesignIntf::BorderSide::BottomLine, checked); +} + +void BorderEditor::on_leftLine_clicked(bool checked){ + emit ui->borderFrame->borderSideClicked(BaseDesignIntf::BorderSide::LeftLine, checked); +} + +void BorderEditor::on_rightLine_clicked(bool checked){ + emit ui->borderFrame->borderSideClicked(BaseDesignIntf::BorderSide::RightLine, checked); } -void lrbordereditor::on_leftLine_clicked() +void BorderEditor::on_allLines_clicked() { - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,ui->leftLine->isChecked()); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, true); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine, true); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine, true); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine, true); +} + +void BorderEditor::on_noLines_clicked() +{ + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, false); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine, false); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine, false); + emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine, false); } -void lrbordereditor::on_toolButton_3_clicked() +void BorderEditor::on_selectColor_clicked() { - emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,ui->rightLine->isChecked()); + QColorDialog cd(this); + if(cd.exec() == QDialog::Rejected) return; + QPen pen = ui->borderFrame->pen(); + pen.setColor(cd.selectedColor().name()); + m_borderColor = pen.color().name(); + ui->colorIndicator->setStyleSheet(QString("background-color:%1;").arg(m_borderColor)); + ui->borderFrame->setPen(pen); } +} // namespace LimeReport diff --git a/limereport/items/lrbordereditor.h b/limereport/items/lrbordereditor.h index 5c2c9ba..443cb63 100644 --- a/limereport/items/lrbordereditor.h +++ b/limereport/items/lrbordereditor.h @@ -3,54 +3,45 @@ #include #include "lrbasedesignintf.h" +namespace LimeReport{ + namespace Ui { -class lrbordereditor; +class BorderEditor; } -class lrbordereditor : public QDialog +class BorderEditor : public QDialog { Q_OBJECT public: - explicit lrbordereditor(QWidget *parent = nullptr); - void loadItem(LimeReport::BaseDesignIntf *i); + explicit BorderEditor(QWidget *parent = nullptr); + void loadItem(LimeReport::BaseDesignIntf *item); LimeReport::BaseDesignIntf::BorderLines borderSides(); - LimeReport::BaseDesignIntf::BorderStyle border_style(); + LimeReport::BaseDesignIntf::BorderStyle borderStyle(); QString borderColor(); - double border_width(); - - - ~lrbordereditor(); + double borderWidth(); + ~BorderEditor(); private slots: void on_listWidget_currentRowChanged(int currentRow); - void on_comboBox_currentTextChanged(const QString &arg1); - - void on_pushButton_clicked(); - - void on_toolButton_4_clicked(); - void on_noLines_clicked(); - - void on_topLine_clicked(); - void checkToolButtons(int side, bool check); - - void on_bottomLine_clicked(); - - void on_leftLine_clicked(); - - void on_toolButton_3_clicked(); + void on_topLine_clicked(bool checked); + void on_bottomLine_clicked(bool checked); + void on_leftLine_clicked(bool checked); + void on_rightLine_clicked(bool checked); + void on_allLines_clicked(); + void checkToolButtons(LimeReport::BaseDesignIntf::BorderSide side, bool check); + void on_selectColor_clicked(); private: - Ui::lrbordereditor *ui; - LimeReport::BaseDesignIntf *item; - QString border_color; - int borderStyle = 1; - double borderWidth = 1; - - + Ui::BorderEditor *ui; + LimeReport::BaseDesignIntf *m_item; + QString m_borderColor; + int m_borderStyle; + double m_borderWidth; }; +} // namespace LimeReport #endif // LRBORDEREDITOR_H diff --git a/limereport/items/lrbordereditor.ui b/limereport/items/lrbordereditor.ui index 7cd7a39..00c4108 100644 --- a/limereport/items/lrbordereditor.ui +++ b/limereport/items/lrbordereditor.ui @@ -1,13 +1,13 @@ - lrbordereditor - + LimeReport::BorderEditor + 0 0 381 - 311 + 352 @@ -46,7 +46,7 @@ - + Outline @@ -119,7 +119,7 @@ - + @@ -319,14 +319,34 @@ - - - #pushButton{background-color: black;} - - - Select... - - + + + + + + 20 + 20 + + + + + 10 + 10 + + + + background-color: rgb(0, 0, 0); + + + + + + + Select + + + + @@ -342,7 +362,7 @@ - BorderFrameEditor + LimeReport::BorderFrameEditor QWidget
borderframeeditor.h
1 @@ -356,32 +376,32 @@ buttonBox accepted() - lrbordereditor + LimeReport::BorderEditor accept() - 253 - 255 + 119 + 322 - 219 - 275 + 377 + 309 buttonBox rejected() - lrbordereditor + LimeReport::BorderEditor reject() - 316 - 258 + 48 + 334 - 345 - 277 + 66 + 348 diff --git a/limereport/items/lrborderframeeditor.cpp b/limereport/items/lrborderframeeditor.cpp new file mode 100644 index 0000000..46fd9b9 --- /dev/null +++ b/limereport/items/lrborderframeeditor.cpp @@ -0,0 +1,181 @@ +#include "lrborderframeeditor.h" +#include "ui_lrborderframeeditor.h" +#include +#include +#include +#include +#include "lrbasedesignintf.h" +#include "lrbordereditor.h" + +namespace LimeReport{ + +BorderFrameEditor::BorderFrameEditor(QWidget *parent) + : QWidget(parent) + , ui(new Ui::BorderFrameEditor) +{ + ui->setupUi(this); + scene = new QGraphicsScene(ui->graphicsView); + + QRect vRect = rect(); + + //Draw corder lines + //topLeft + scene->addLine(10, 5, 10, 10, QPen(Qt::gray)); + scene->addLine(5, 10, 10, 10, QPen(Qt::gray)); + //bottomLeft + scene->addLine(10,vRect.bottom() -5, 10, vRect.bottom()-10, QPen(Qt::gray)); + scene->addLine(5,vRect.bottom()-10, 10, vRect.bottom()-10, QPen(Qt::gray)); + //bottomRight + scene->addLine(vRect.right() - 10, vRect.bottom() - 5, vRect.right()- 10, vRect.bottom() - 10, QPen(Qt::gray)); + scene->addLine(vRect.right() - 5, vRect.bottom() - 10, vRect.right() - 10, vRect.bottom() - 10, QPen(Qt::gray)); + //topRight + scene->addLine(vRect.width() - 10, 5, vRect.width() - 10, 10, QPen(Qt::gray)); + scene->addLine(vRect.width() - 5, 10, vRect.width() - 10, 10, QPen(Qt::gray)); + scene->setSceneRect(vRect); + ui->graphicsView->setScene(scene); + QGraphicsSimpleTextItem * io = new QGraphicsSimpleTextItem(); + io->setAcceptedMouseButtons(Qt::LeftButton); + io->setPos(scene->sceneRect().center()); + io->setText(tr("Text")); + scene->addItem(io); + + QRectF bR = io->sceneBoundingRect(); + io->setPos( scene->sceneRect().center().x() - bR.width()/2, scene->sceneRect().center().y() - bR.height()/2 ); + connect( + this, SIGNAL(borderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)), + this, SLOT(slotBorderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)) + ); + +} + +BorderFrameEditor::~BorderFrameEditor() +{ + delete ui; +} + +void BorderFrameEditor::setPen(QPen pen) +{ + m_pen = pen; + updateBorders(); +} + +QPen BorderFrameEditor::pen() +{ + return m_pen; +} + +void BorderFrameEditor::setAllLines() +{ + if (!topLine) + topLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::TopLine); + if (!leftLine) + leftLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::LeftLine); + if (!bottomLine) + bottomLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::BottomLine); + if (!rightLine) + rightLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::RightLine); +} + +void BorderFrameEditor::unSetAllLines() +{ + if (topLine){ + scene->removeItem(topLine); + topLine = NULL; + } + if (leftLine){ + scene->removeItem(leftLine); + leftLine = NULL; + } + if (bottomLine){ + scene->removeItem(bottomLine); + bottomLine = NULL; + } + if (rightLine){ + scene->removeItem(rightLine); + rightLine = NULL; + } + +} + +void BorderFrameEditor::mousePressEvent(QMouseEvent *event) +{ + if (event->x() >= 10 && event->y() <30) + emit borderSideClicked(BaseDesignIntf::BorderSide::TopLine, !topLine); + + if ((event->x() >= 10 && event->x() < 30) && (event->y() > 10)) + emit borderSideClicked(BaseDesignIntf::BorderSide::LeftLine, !leftLine); + + if (event->x() >= 10 && (event->y() >80 && event->y() < rect().bottom())) + emit borderSideClicked(BaseDesignIntf::BorderSide::BottomLine, !bottomLine); + + if ((event->x() >= 130 && event->x() < rect().width()) && event->y() > 10) + emit borderSideClicked(BaseDesignIntf::BorderSide::RightLine, !rightLine); +} + +void BorderFrameEditor::slotBorderSideClicked(BaseDesignIntf::BorderSide side, bool show) +{ + + switch(side){ + + case BaseDesignIntf::BorderSide::TopLine: + if (show){ + if (!topLine) topLine = createSideLine(side); + } else { + if (topLine) scene->removeItem(topLine); + topLine = NULL; + } + break; + + case BaseDesignIntf::LeftLine: + if (show){ + if (!leftLine) leftLine = createSideLine(side); + } else { + if (leftLine) scene->removeItem(leftLine); + leftLine = NULL; + } + break; + + case BaseDesignIntf::BottomLine: + if (show){ + if (!bottomLine) bottomLine = createSideLine(side); + } else { + if (bottomLine) scene->removeItem(bottomLine); + bottomLine = NULL; + } + break; + + case BaseDesignIntf::RightLine: + if (show){ + if (!rightLine) rightLine = createSideLine(side); + } else { + if(rightLine) scene->removeItem(rightLine); + rightLine = NULL; + } + + } + updateBorders(); +} + +QGraphicsLineItem *BorderFrameEditor::createSideLine(LimeReport::BaseDesignIntf::BorderSide side) +{ + switch(side){ + case BaseDesignIntf::BorderSide::TopLine: + return scene->addLine(QLineF(10, 10, rect().width() - 10, 10), m_pen); + case BaseDesignIntf::BorderSide::LeftLine: + return scene->addLine(QLineF(10, 10, 10, rect().height() - 10), m_pen); + case BaseDesignIntf::BorderSide::RightLine: + return scene->addLine(QLineF(rect().width() - 10, 10 ,rect().width() - 10, rect().height() - 10), m_pen); + case BaseDesignIntf::BorderSide::BottomLine: + return scene->addLine(QLineF(10, rect().bottom() - 10, rect().width() - 10, rect().bottom() - 10), m_pen); + } +} + +void BorderFrameEditor::updateBorders() +{ + if (topLine) topLine->setPen(m_pen); + if (leftLine) leftLine->setPen(m_pen); + if (bottomLine) bottomLine->setPen(m_pen); + if (rightLine) rightLine->setPen(m_pen); +} + +} //namespace LimeReport diff --git a/limereport/items/borderframeeditor.h b/limereport/items/lrborderframeeditor.h similarity index 61% rename from limereport/items/borderframeeditor.h rename to limereport/items/lrborderframeeditor.h index f0beae8..9333677 100644 --- a/limereport/items/borderframeeditor.h +++ b/limereport/items/lrborderframeeditor.h @@ -5,9 +5,9 @@ #include #include #include "lrbasedesignintf.h" -QT_BEGIN_NAMESPACE +namespace LimeReport{ + namespace Ui { class BorderFrameEditor; } -QT_END_NAMESPACE class BorderFrameEditor : public QWidget { @@ -23,20 +23,24 @@ public: protected: void mousePressEvent(QMouseEvent *event); signals: - void borderSideClicked(int side,bool show); + void borderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show); private slots: - void SlotBorderSideClicked(int side, bool show); + void slotBorderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show); +private: + QGraphicsLineItem *createSideLine(LimeReport::BaseDesignIntf::BorderSide side); + void updateBorders(); private: Ui::BorderFrameEditor *ui; - QGraphicsScene *scene; - QGraphicsLineItem *topLine = NULL + QGraphicsScene *scene; + QGraphicsLineItem *topLine = NULL ,*bottomLine = NULL ,*leftLine = NULL ,*rightLine = NULL; - QPen m_pen; - void updateBorders(); + QPen m_pen; + }; +} // namespace LimeReport #endif // WIDGET diff --git a/limereport/items/borderframeeditor.ui b/limereport/items/lrborderframeeditor.ui similarity index 94% rename from limereport/items/borderframeeditor.ui rename to limereport/items/lrborderframeeditor.ui index 3324d90..3f70f12 100644 --- a/limereport/items/borderframeeditor.ui +++ b/limereport/items/lrborderframeeditor.ui @@ -1,7 +1,7 @@ - BorderFrameEditor - + LimeReport::BorderFrameEditor + 0 diff --git a/limereport/items/lrpageeditor.cpp b/limereport/items/lrpageeditor.cpp index d0c2f46..6f4c4e3 100644 --- a/limereport/items/lrpageeditor.cpp +++ b/limereport/items/lrpageeditor.cpp @@ -1,9 +1,11 @@ #include "lrpageeditor.h" #include "ui_lrpageeditor.h" #include "lrpagedesignintf.h" +#include "lrpageitemdesignintf.h" #include #include -lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page) : + +PageEditor::PageEditor(QWidget *parent, LimeReport::PageItemDesignIntf *page) : QDialog(parent), ui(new Ui::lrpageeditor) { @@ -16,8 +18,8 @@ lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page ui->format->addItem(pageSizes.key(i)); } ui->format->setCurrentIndex(m_page->pageSize()); - ui->width->setValue(m_page->width() / LimeReport::Const::mmFACTOR); - ui->height->setValue(m_page->height() / LimeReport::Const::mmFACTOR); + ui->width->setValue(m_page->width() / m_page->unitFactor()); + ui->height->setValue(m_page->height() / m_page->unitFactor()); ui->portrait->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Portrait); ui->landscape->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Landscape); //Margins @@ -33,18 +35,17 @@ lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page ui->fullPage->setChecked(m_page->fullPage()); } -lrpageeditor::~lrpageeditor() +PageEditor::~PageEditor() { delete ui; } -void lrpageeditor::applyChanges() +void PageEditor::applyChanges() { m_page->setPageSize(static_cast(ui->format->currentIndex())); - m_page->setWidth(ui->width->value()* LimeReport::Const::mmFACTOR); - m_page->setHeight(ui->height->value()* LimeReport::Const::mmFACTOR); - m_page->setPageOrientation(ui->portrait->isChecked()?LimeReport::PageItemDesignIntf::Portrait : LimeReport::PageItemDesignIntf::Landscape); - + m_page->setWidth(ui->width->value() * LimeReport::Const::mmFACTOR); + m_page->setHeight(ui->height->value() * LimeReport::Const::mmFACTOR); + m_page->setPageOrientation(ui->portrait->isChecked()? LimeReport::PageItemDesignIntf::Portrait : LimeReport::PageItemDesignIntf::Landscape); m_page->setTopMargin(ui->marginTop->value()); m_page->setBottomMargin(ui->marginBottom->value()); m_page->setRightMargin(ui->marginRight->value()); @@ -52,53 +53,55 @@ void lrpageeditor::applyChanges() m_page->setDropPrinterMargins(ui->dropPrinterMargins->isChecked()); ui->endlessHeight->setChecked(ui->endlessHeight->isChecked()); m_page->setExtendedHeight(ui->extendedHeight->value()); + ui->width->setValue(m_page->getItemWidth()); + ui->height->setValue(m_page->getItemHeight()); } -void lrpageeditor::on_buttonBox_accepted() -{ - applyChanges(); - accept(); - -} - -QSizeF lrpageeditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size) +QSizeF PageEditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size) { if (size != LimeReport::PageItemDesignIntf::Custom) { QPrinter printer; printer.setOutputFormat(QPrinter::PdfFormat); #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) - printer.setOrientation(ui->portrait->isChecked()?QPrinter::Portrait : QPrinter::Landscape); + printer.setOrientation(ui->portrait->isChecked() ? QPrinter::Portrait : QPrinter::Landscape); printer.setPaperSize((QPrinter::PageSize)size); - return QSizeF(printer.paperSize(QPrinter::Millimeter).width() * 10, - printer.paperSize(QPrinter::Millimeter).height() * 10); + return QSizeF(printer.paperSize(QPrinter::Millimeter).width() * m_page->unitFactor(), + printer.paperSize(QPrinter::Millimeter).height() * m_page->unitFactor()); #else - QPageSize pageSize = QPageSize((QPageSize::PageSizeId)size); - qreal width = pageSize.size(QPageSize::Millimeter).width() * 10; - qreal height = pageSize.size(QPageSize::Millimeter).height() * 10; - return QSizeF(pageOrientation() == Portrait ? width : height, - pageOrientation() == Portrait ? height : width); - -// printer.setPageOrientation((QPageLayout::Orientation)pageOrientation()); -// printer.setPageSize(QPageSize((QPageSize::PageSizeId)size)); -// return QSizeF(printer.pageLayout().pageSize().size(QPageSize::Millimeter).width() * 10, -// printer.pageLayout().pageSize().size(QPageSize::Millimeter).height() * 10); + printer.setPageOrientation((QPageLayout::Orientation)m_page->pageOrientation()); + printer.setPageSize(QPageSize((QPageSize::PageSizeId)size)); + return QSizeF(printer.pageLayout().pageSize().size(QPageSize::Millimeter).width() * m_page->unitFactor(), + printer.pageLayout().pageSize().size(QPageSize::Millimeter).height() * m_page->unitFactor()); #endif - } - - else { - return QSizeF(width(),height()); + } else { + return QSizeF(m_page->getItemWidth(), m_page->getItemHeight()); } } -void lrpageeditor::on_format_currentIndexChanged(int index) +void PageEditor::on_format_currentIndexChanged(int index) { QPageSize ps = *new QPageSize(); if(ui->format->currentText() != "Custom") { QSizeF pageSize = getRectByPageSize(static_cast(index)); - ui->width->setValue(pageSize.width()/10); - ui->height->setValue(pageSize.height()/10); + ui->width->setValue(pageSize.width() / m_page->unitFactor()); + ui->height->setValue(pageSize.height() / m_page->unitFactor()); } } + +void PageEditor::on_buttonBox_clicked(QAbstractButton *button) +{ + switch(ui->buttonBox->buttonRole(button)){ + case QDialogButtonBox::ApplyRole: + applyChanges(); + break; + case QDialogButtonBox::AcceptRole: + applyChanges(); + accept(); + } + + +} + diff --git a/limereport/items/lrpageeditor.h b/limereport/items/lrpageeditor.h index 545ca3e..1adf97b 100644 --- a/limereport/items/lrpageeditor.h +++ b/limereport/items/lrpageeditor.h @@ -8,17 +8,18 @@ namespace Ui { class lrpageeditor; } -class lrpageeditor : public QDialog +class PageEditor : public QDialog { Q_OBJECT public: - explicit lrpageeditor(QWidget *parent = nullptr,LimeReport::PageItemDesignIntf *page = nullptr); - ~lrpageeditor(); + explicit PageEditor(QWidget *parent = nullptr,LimeReport::PageItemDesignIntf *page = nullptr); + ~PageEditor(); private slots: - void on_buttonBox_accepted(); +// void on_buttonBox_accepted(); void on_format_currentIndexChanged(int index); + void on_buttonBox_clicked(QAbstractButton *button); private: Ui::lrpageeditor *ui; diff --git a/limereport/items/lrpageeditor.ui b/limereport/items/lrpageeditor.ui index 70ca440..af2f735 100644 --- a/limereport/items/lrpageeditor.ui +++ b/limereport/items/lrpageeditor.ui @@ -7,7 +7,7 @@ 0 0 306 - 322 + 350 @@ -297,7 +297,7 @@ Qt::Horizontal - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok + QDialogButtonBox::Apply|QDialogButtonBox::Close|QDialogButtonBox::Ok @@ -312,8 +312,8 @@ reject() - 325 - 312 + 296 + 340 286 @@ -328,12 +328,12 @@ setEnabled(bool) - 60 - 50 + 72 + 81 - 130 - 85 + 131 + 134 diff --git a/limereport/limereport.pri b/limereport/limereport.pri index 524d3d8..c86b575 100644 --- a/limereport/limereport.pri +++ b/limereport/limereport.pri @@ -80,7 +80,7 @@ SOURCES += \ $$REPORT_PATH/lraxisdata.cpp \ $$REPORT_PATH/lrpreparedpages.cpp \ $$REPORT_PATH/items/lrpageeditor.cpp \ - $$REPORT_PATH/items/borderframeeditor.cpp \ + $$REPORT_PATH/items/lrborderframeeditor.cpp \ $$REPORT_PATH/items/lrbordereditor.cpp CONFIG(staticlib) { @@ -181,7 +181,7 @@ HEADERS += \ $$REPORT_PATH/lraxisdata.h \ $$REPORT_PATH/lrpreparedpagesintf.h \ $$REPORT_PATH/items/lrpageeditor.h \ - $$REPORT_PATH/items/borderframeeditor.h \ + $$REPORT_PATH/items/lrborderframeeditor.h \ $$REPORT_PATH/items/lrbordereditor.h CONFIG(staticlib) { @@ -207,7 +207,7 @@ FORMS += \ $$REPORT_PATH/items/lrimageitemeditor.ui \ $$REPORT_PATH/scripteditor/lrscripteditor.ui \ $$REPORT_PATH/items/lrpageeditor.ui \ - $$REPORT_PATH/items/borderframeeditor.ui \ + $$REPORT_PATH/items/lrborderframeeditor.ui \ $$REPORT_PATH/items/lrbordereditor.ui RESOURCES += \ diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index d31165f..d66efeb 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -431,7 +431,7 @@ void BaseDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *o setupPainter(ppainter); drawBorder(ppainter, rect()); if(m_shadow) - drawShadow(ppainter, rect()); + drawShadow(ppainter, rect(), 6); // if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);} // if (isSelected() && !m_joinMarkerOn) {drawMarker(ppainter, Const::SELECTION_COLOR);} drawResizeZone(ppainter); @@ -1145,10 +1145,9 @@ void BaseDesignIntf::drawBorder(QPainter *painter, QRectF rect) const painter->restore(); } -void BaseDesignIntf::drawShadow(QPainter *painter, QRectF rect) const +void BaseDesignIntf::drawShadow(QPainter *painter, QRectF rect, qreal shadowSize) const { - - qreal shWidth = rect.width()/100; + qreal shWidth = shadowSize; QRectF rshadow(rect.topRight() + QPointF(0, shWidth), rect.bottomRight() + QPointF(shWidth, 0)); QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight()); @@ -1167,8 +1166,6 @@ void BaseDesignIntf::drawShadow(QPainter *painter, QRectF rect) const cgrad.setColorAt(0.0, QColor(0,0,0,255)); cgrad.setColorAt(1.0, QColor(0,0,0,0)); painter->fillRect(cshadow, QBrush(cgrad)); - - } void BaseDesignIntf::setGeometry(QRectF rect) @@ -1486,7 +1483,7 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) menu.addSeparator(); QAction* noBordersAction = menu.addAction(QIcon(":/report/images/noLines"), tr("No borders")); QAction* allBordersAction = menu.addAction(QIcon(":/report/images/allLines"), tr("All borders")); - QAction* editBorderAction = menu.addAction(QIcon(":/report/images/allLines"), tr("Edit borders...")); + QAction* editBorderAction = menu.addAction(QIcon(":/report/images/borderEditor"), tr("Edit borders...")); preparePopUpMenu(menu); QAction* a = menu.exec(event->screenPos()); if (a){ @@ -1507,15 +1504,12 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) page->setBorders(BaseDesignIntf::NoLine); if (a == allBordersAction) page->setBorders(BaseDesignIntf::AllLines); - if(a == editBorderAction) + if (a == editBorderAction) { - lrbordereditor be; + BorderEditor be; be.loadItem(this); - if(be.exec() == QDialog::Rejected)return; - setBorderLinesFlags(be.borderSides()); - setBorderLineSize(be.border_width()); - setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.border_style()); - setBorderColor(be.borderColor()); + if (be.exec() == QDialog::Rejected) return; + page->setBordersExt(be.borderSides(), be.borderWidth(), (LimeReport::BaseDesignIntf::BorderStyle)be.borderStyle(), be.borderColor()); } if (a == createHLayout) page->addHLayout(); diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index adf7d21..89f68d2 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -389,7 +389,7 @@ protected: void drawBorder(QPainter* painter, QRectF rect) const; - void drawShadow(QPainter* painter, QRectF rect) const; + void drawShadow(QPainter* painter, QRectF rect, qreal shadowSize) const; void drawDesignModeBorder(QPainter* painter, QRectF rect) const; void drawRenderModeBorder(QPainter *painter, QRectF rect) const; void drawResizeZone(QPainter*); diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 55907b4..bd0e583 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -1826,6 +1826,20 @@ void PageDesignIntf::setBorders(const BaseDesignIntf::BorderLines& border) changeSelectedGroupProperty("borders", (int)border); } +void PageDesignIntf::setBordersExt( + const BaseDesignIntf::BorderLines& border, + const double borderWidth, + const LimeReport::BaseDesignIntf::BorderStyle style, + const QString color + +) +{ + changeSelectedGroupProperty("borders", (int)border); + changeSelectedGroupProperty("borderLineSize", borderWidth); + changeSelectedGroupProperty("borderStyle", style); + changeSelectedGroupProperty("borderColor", color); +} + void PageDesignIntf::lockSelectedItems() { foreach(QGraphicsItem* graphicItem, selectedItems()){ diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index 0a49b4d..c64b501 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -254,6 +254,11 @@ namespace LimeReport { void setFont(const QFont &font); void setTextAlign(const Qt::Alignment& alignment); void setBorders(const BaseDesignIntf::BorderLines& border); + void setBordersExt(const BaseDesignIntf::BorderLines &border, + const double borderWidth, + const BaseDesignIntf::BorderStyle style, + const QString color + ); void lockSelectedItems(); void unlockSelectedItems(); void selectOneLevelItems(); diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp index 0311707..57f05ae 100644 --- a/limereport/lrpageitemdesignintf.cpp +++ b/limereport/lrpageitemdesignintf.cpp @@ -98,38 +98,10 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte paintGrid(ppainter, rect); ppainter->setPen(gridColor()); ppainter->drawRect(boundingRect()); - //Draw shadow - qreal shWidth = boundingRect().width()/100; - QRectF rshadow(boundingRect().topRight() + QPointF(0, shWidth), - boundingRect().bottomRight() + QPointF(shWidth, 0)); - QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight()); - rgrad.setColorAt(0.0, QColor(0,0,0,255)); - rgrad.setColorAt(1.0, QColor(0,0,0,0)); - ppainter->fillRect(rshadow, QBrush(rgrad)); - QRectF bshadow(boundingRect().bottomLeft() + QPointF(shWidth, 0), - boundingRect().bottomRight() + QPointF(0, shWidth)); - QLinearGradient bgrad(bshadow.topLeft(), bshadow.bottomLeft()); - bgrad.setColorAt(0.0, QColor(0,0,0,255)); - bgrad.setColorAt(1.0, QColor(0,0,0,0)); - ppainter->fillRect(bshadow, QBrush(bgrad)); - QRectF cshadow(boundingRect().bottomRight(), - boundingRect().bottomRight() + QPointF(shWidth, shWidth)); - QRadialGradient cgrad(cshadow.topLeft(), shWidth, cshadow.topLeft()); - cgrad.setColorAt(0.0, QColor(0,0,0,255)); - cgrad.setColorAt(1.0, QColor(0,0,0,0)); - ppainter->fillRect(cshadow, QBrush(cgrad)); - if (m_isExtendedInDesignMode){ - QPen pen; - pen.setColor(Qt::red); - pen.setStyle(Qt::DashLine); - pen.setWidth(2); - ppainter->setPen(pen); - ppainter->drawLine(pageRect().bottomLeft(),pageRect().bottomRight()); - } + drawShadow(ppainter, boundingRect(), 10); ppainter->restore(); } - if (itemMode() & PreviewMode) { ppainter->save(); ppainter->fillRect(rect(), Qt::white); @@ -145,8 +117,6 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte BaseDesignIntf::paint(ppainter,option,widget); } - - } BaseDesignIntf *PageItemDesignIntf::createSameTypeItem(QObject *owner, QGraphicsItem *parent) @@ -828,7 +798,7 @@ void PageItemDesignIntf::processPopUpAction(QAction *action) } if(action->text() == tr("Edit")) { - lrpageeditor pageEdit(NULL,this); + PageEditor pageEdit(NULL,this); pageEdit.exec(); } diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index 19c3a3e..58570bc 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -704,6 +704,16 @@ void ReportDesignWidget::setBorders(const BaseDesignIntf::BorderLines& borders) activePage()->setBorders(borders); } +void ReportDesignWidget::setBordersExt( + const BaseDesignIntf::BorderLines& border, + const double borderWidth, + const LimeReport::BaseDesignIntf::BorderStyle style, + const QString color +){ + if (activePage()) + activePage()->setBordersExt(border, borderWidth, style, color); +} + void ReportDesignWidget::prepareReport() { m_report->scriptContext()->setInitScript(m_scriptEditor->toPlainText()); diff --git a/limereport/lrreportdesignwidget.h b/limereport/lrreportdesignwidget.h index 8057f13..9a5a68a 100644 --- a/limereport/lrreportdesignwidget.h +++ b/limereport/lrreportdesignwidget.h @@ -194,6 +194,8 @@ public slots: void setFont(const QFont &font); void setTextAlign(const bool &horizontalAlign, const Qt::AlignmentFlag &alignment); void setBorders(const BaseDesignIntf::BorderLines& borders); + void setBordersExt(const BaseDesignIntf::BorderLines &border, const double borderWidth, + const LimeReport::BaseDesignIntf::BorderStyle style, const QString color); void editSetting(); void setUseGrid(bool value); void previewReport(); diff --git a/limereport/report.qrc b/limereport/report.qrc index 89999d9..dc59710 100644 --- a/limereport/report.qrc +++ b/limereport/report.qrc @@ -186,5 +186,6 @@ images/designer.png images/lock.png images/unlock.png + images/border_settings.png From 934e31ec1c8063f7151f686ef684b83451d96d67 Mon Sep 17 00:00:00 2001 From: Alexander Arin Date: Tue, 1 Nov 2022 13:22:20 +0300 Subject: [PATCH 15/26] Cmake fixed --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64ce1b6..481370e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,7 @@ ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.cpp ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.cpp ${PROJECT_NAME}/items/lrabstractlayout.cpp ${PROJECT_NAME}/items/lralignpropitem.cpp -${PROJECT_NAME}/items/borderframeeditor.cpp +${PROJECT_NAME}/items/lrborderframeeditor.cpp ${PROJECT_NAME}/items/lrbordereditor.cpp ${PROJECT_NAME}/items/lrchartitem.cpp ${PROJECT_NAME}/items/lrchartaxiseditor.cpp @@ -198,7 +198,7 @@ ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.h ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.h ${PROJECT_NAME}/items/lrabstractlayout.h ${PROJECT_NAME}/items/lralignpropitem.h -${PROJECT_NAME}/items/borderframeeditor.h +${PROJECT_NAME}/items/lrborderframeeditor.h ${PROJECT_NAME}/items/lrbordereditor.h ${PROJECT_NAME}/items/lrchartitem.h ${PROJECT_NAME}/items/lrchartaxiseditor.h From 2aaf467dc10eb8caa5cc821f61d7cedf8838b8fa Mon Sep 17 00:00:00 2001 From: Alexander Arin Date: Tue, 1 Nov 2022 13:29:52 +0300 Subject: [PATCH 16/26] Cmake fixed --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 481370e..482d337 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,7 +298,7 @@ ${PROJECT_NAME}/databrowser/lrdatabrowser.ui ${PROJECT_NAME}/databrowser/lrsqleditdialog.ui ${PROJECT_NAME}/databrowser/lrvariabledialog.ui ${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui -${PROJECT_NAME}/items/borderframeeditor.ui +${PROJECT_NAME}/items/lrborderframeeditor.ui ${PROJECT_NAME}/items/lrbordereditor.ui ${PROJECT_NAME}/items/lrchartitemeditor.ui ${PROJECT_NAME}/items/lrchartaxiseditor.ui From 288afc44e4b8f8cdfd4b9167f8ebe7ea2aa49697 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 9 Nov 2022 09:33:42 +0000 Subject: [PATCH 17/26] Update readme for cmake --- README.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78ff6ac..0bafa82 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,37 @@ ### How to use it -1. Build limereport.pro. It will create a limereport shared library -2. In your project connect the limereport library then in source code add: +#### QMake + +- Build limereport.pro. It will create a limereport shared library +- In your project connect the limereport library + +#### CMake + +To use in your application without installation + +There are 2 possible ways: + +- Use cmake subdirectory in your CMakeLists.txt: + +```cmake +add_subdirectory(LimeReport) +target_link_libraries(myapp PRIVATE limereport-qt${QT_VERSION_MAJOR}) +``` +- Use cmake FetchContent in your CMakeLists.txt: + +```cmake +include(FetchContent) +FetchContent_Declare( + LimeReport + GIT_REPOSITORY https://github.com/fralx/LimeReport.git + GIT_TAG sha-of-the-commit +) +FetchContent_MakeAvailable(LimeReport) +target_link_libraries(myapp PRIVATE limereport-qt${QT_VERSION_MAJOR}) +``` + +- Then in source code add: ```cpp #include "lrreportengine.h" to add report engine From 706eefba7c1582f2637ea376bf27e249b0f561b8 Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 5 Jan 2023 00:22:53 +0000 Subject: [PATCH 18/26] Fix cmake_minimum_required https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html Call the cmake_minimum_required() command at the beginning of the top-level CMakeLists.txt file even before calling the project() command. It is important to establish version and policy settings before invoking other commands whose behavior they may affect. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 482d337..930fa33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -project(limereport) cmake_minimum_required(VERSION 3.14) +project(limereport) set(LIMEREPORT_VERSION_MAJOR 1) set(LIMEREPORT_VERSION_MINOR 6) From 920037d387826659508ae49408378542d861ff21 Mon Sep 17 00:00:00 2001 From: yanis60 <30592254+yanis60@users.noreply.github.com> Date: Mon, 9 Jan 2023 09:42:19 +0000 Subject: [PATCH 19/26] Page free space calculation has been updated --- limereport/lrscriptenginemanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index 0b80203..9cb87ed 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -707,14 +707,13 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){ if (page){ int height = 0; foreach(BandDesignIntf* band, page->bands()){ - if(band->type() == BandDesignIntf::Data) { height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount(); } else height += band->height(); } - return page->height() - height; + return page->height() - height - (page->pageFooter()?page->pageFooter()->height() : 0); } else return -1; } From b0d0fd526b90cbeb125616a9fc32cc332e371abe Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 5 Jan 2023 00:37:27 +0000 Subject: [PATCH 20/26] fix cmake install dirs and public headers --- CMakeLists.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 930fa33..fbab265 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -409,16 +409,13 @@ target_include_directories( ${PROJECT_NAME} PRIVATE target_include_directories( ${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) +list (APPEND GLOBAL_HEADERS ${EXTRA_FILES}) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${GLOBAL_HEADERS}") + install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/limereport) -install(FILES - ${EXTRA_FILES} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") - -install(FILES - ${GLOBAL_HEADERS} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") From 266b6795daf79178f0abd74585593358975336f3 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Wed, 11 Jan 2023 20:47:11 +0300 Subject: [PATCH 21/26] fix build without UiTools --- limereport/lrscriptenginemanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index 9cb87ed..31220d3 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -1443,6 +1443,8 @@ DialogDescriber* ScriptEngineContext::findDialogContainer(const QString& dialogN return 0; } +#endif + TableOfContents* ScriptEngineContext::tableOfContents() const { return m_tableOfContents; @@ -1474,6 +1476,8 @@ void ScriptEngineContext::setCurrentBand(BandDesignIntf* currentBand) m_currentBand = currentBand; } +#ifdef HAVE_UI_LOADER + QDialog* ScriptEngineContext::getDialog(const QString& dialogName) { QDialog* dialog = findDialog(dialogName); From 3a7f4fef28ad39e79dfe9d564e77aee6b6c8f7a0 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Wed, 11 Jan 2023 21:55:01 +0300 Subject: [PATCH 22/26] remove local CMakeLists.txt.user --- CMakeLists.txt.user | 576 -------------------------------------------- 1 file changed, 576 deletions(-) delete mode 100644 CMakeLists.txt.user diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user deleted file mode 100644 index 4934a44..0000000 --- a/CMakeLists.txt.user +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - EnvironmentId - {33389db1-1b8e-4833-9ab8-a0816539f586} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - false - true - false - 0 - true - true - 0 - 8 - true - false - 1 - true - true - true - *.md, *.MD, Makefile - false - true - - - - ProjectExplorer.Project.PluginSettings - - - true - false - true - true - true - true - - - 0 - true - - -fno-delayed-template-parsing - - true - Builtin.BuildSystem - - true - true - Builtin.DefaultTidyAndClazy - 2 - - - - true - - - - - ProjectExplorer.Project.Target.0 - - Desktop - Desktop Qt 5.12.3 MinGW 64-bit - Desktop Qt 5.12.3 MinGW 64-bit - qt.qt5.5123.win64_mingw73_kit - 0 - 0 - 1 - - Debug - -GNinja --DCMAG=Debug --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:/Work/C++/Projects/build-LimeReport-Desktop_Qt_5_12_3_MinGW_64_bit-Debug - - - - all - - true - Build - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - Build - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Debug - CMakeProjectManager.CMakeBuildConfiguration - - - Release - -GNinja --DCMAKE_BUILD_TYPE:STRING=Release --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\Work\C++\Projects\build-LimeReport-Desktop_Qt_5_12_3_MinGW_64_bit-Release - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Release - CMakeProjectManager.CMakeBuildConfiguration - - - RelWithDebInfo - -GNinja --DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\Work\C++\Projects\build-LimeReport-Desktop_Qt_5_12_3_MinGW_64_bit-RelWithDebInfo - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Release with Debug Information - CMakeProjectManager.CMakeBuildConfiguration - - - MinSizeRel - -GNinja --DCMAKE_BUILD_TYPE:STRING=MinSizeRel --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\Work\C++\Projects\build-LimeReport-Desktop_Qt_5_12_3_MinGW_64_bit-MinSizeRel - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Minimum Size Release - CMakeProjectManager.CMakeBuildConfiguration - - 4 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - - false - ProjectExplorer.DefaultDeployConfiguration - - 1 - - true - true - true - - 2 - - LRDesigner - CMakeProjectManager.CMakeRunConfiguration.LRDesigner - LRDesigner - false - true - true - false - true - - - true - true - true - - 2 - - demo_r1 - CMakeProjectManager.CMakeRunConfiguration.demo_r1 - demo_r1 - false - true - true - false - true - - 2 - - - - ProjectExplorer.Project.Target.1 - - Desktop - Desktop Qt 5.15.1 MSVC2019 64bit - Desktop Qt 5.15.1 MSVC2019 64bit - qt.qt5.5151.win64_msvc2019_64_kit - 0 - 0 - 0 - - Debug - -GNinja --DCMAKE_BUILD_TYPE:STRING=Debug --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\Work\C++\Projects\build-LimeReport-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug - - - - all - - true - Build - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - Build - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Debug - CMakeProjectManager.CMakeBuildConfiguration - - - Release - -GNinja --DCMAKE_BUILD_TYPE:STRING=Release --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\Work\C++\Projects\build-LimeReport-Desktop_Qt_5_15_1_MSVC2019_64bit-Release - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Release - CMakeProjectManager.CMakeBuildConfiguration - - - RelWithDebInfo - -GNinja --DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\Work\C++\Projects\build-LimeReport-Desktop_Qt_5_15_1_MSVC2019_64bit-RelWithDebInfo - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Release with Debug Information - CMakeProjectManager.CMakeBuildConfiguration - - - MinSizeRel - -GNinja --DCMAKE_BUILD_TYPE:STRING=MinSizeRel --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\Work\C++\Projects\build-LimeReport-Desktop_Qt_5_15_1_MSVC2019_64bit-MinSizeRel - - - - all - - true - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Minimum Size Release - CMakeProjectManager.CMakeBuildConfiguration - - 4 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - - false - ProjectExplorer.DefaultDeployConfiguration - - 1 - - true - true - true - - 2 - - LRDesigner - CMakeProjectManager.CMakeRunConfiguration.LRDesigner - LRDesigner - false - true - true - false - true - - - true - true - true - - 2 - - demo_r1 - CMakeProjectManager.CMakeRunConfiguration.demo_r1 - demo_r1 - false - true - true - false - true - - 2 - - - - ProjectExplorer.Project.TargetCount - 2 - - - ProjectExplorer.Project.Updater.FileVersion - 22 - - - Version - 22 - - From 36d8878f6edbf1e39902365d5c42233f41ee749f Mon Sep 17 00:00:00 2001 From: yanis60 Date: Fri, 13 Jan 2023 09:26:30 +0100 Subject: [PATCH 23/26] added position info when dragging --- limereport/lrpagedesignintf.cpp | 28 +++++++++++++++++++++++++++- limereport/lrpagedesignintf.h | 1 + limereport/lrscriptenginemanager.cpp | 2 +- translations/limereport_ar.ts | 11 +++++++++++ translations/limereport_es.ts | 11 +++++++++++ translations/limereport_fr.ts | 21 +++++++++++++++++---- translations/limereport_pl.ts | 21 +++++++++++++++++---- translations/limereport_ru.ts | 11 +++++++++++ translations/limereport_zh.ts | 11 +++++++++++ 9 files changed, 107 insertions(+), 10 deletions(-) diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 2427d67..a45567a 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -73,6 +73,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent): m_itemInsertRect(0), m_itemMode(DesignMode), m_cutterBorder(0), + m_infoPosRect(0), m_currentCommand(-1), m_changeSizeMode(false), m_changePosMode(false), @@ -93,6 +94,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent): m_magneticMovement(false), m_reportSettings(0), m_currentPage(0) + { m_reportEditor = dynamic_cast(parent); updatePageRect(); @@ -314,6 +316,7 @@ void PageDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event) void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { + PageItemDesignIntf* page = pageItem() ? pageItem() : getCurrentPage(); if (event->buttons() & Qt::LeftButton) { if (!m_changePosOrSizeMode) { @@ -321,6 +324,25 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) saveSelectedItemsGeometry(); m_changePosOrSizeMode = true; } + qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); + qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep(); + if(!m_infoPosRect) + { + + + m_infoPosRect = new QGraphicsTextItem(); + m_infoPosRect->setDefaultTextColor(QColor(100,150,50)); + + QFont font("Arial"); + font.setPointSize(16); + font.setBold(true); + m_infoPosRect->setFont(font); + addItem(m_infoPosRect); + } + m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm"); + + m_infoPosRect->setPos(posX,posY+30); + } if (event->buttons() & Qt::LeftButton && m_multiSelectStarted){ @@ -340,7 +362,6 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) m_selectionRect->setRect(selectionRect); } - PageItemDesignIntf* page = pageItem() ? pageItem() : getCurrentPage(); if ((m_insertMode) && (page && page->rect().contains(page->mapFromScene(event->scenePos())))) { if (!m_itemInsertRect->isVisible()) m_itemInsertRect->setVisible(true); qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); @@ -402,6 +423,11 @@ void PageDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) m_selectionRect = 0; m_multiSelectStarted = false; } + if(m_infoPosRect) + { + delete m_infoPosRect; + m_infoPosRect = 0; + } QGraphicsScene::mouseReleaseEvent(event); } diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index 0a49b4d..622593b 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -295,6 +295,7 @@ namespace LimeReport { BaseDesignIntf::ItemMode m_itemMode; QGraphicsRectItem* m_cutterBorder; QGraphicsRectItem* m_pageRect; + QGraphicsTextItem* m_infoPosRect; QVector m_commandsList; QVector m_positionStamp; QVector m_geometryStamp; diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index 5b70554..7a65a6d 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -701,7 +701,7 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){ } else height += band->height(); } - return page->height() - height; + return page->height() - height - (page->pageFooter()?page->pageFooter()->height() : 0); } else return -1; } diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts index bf3a955..94cd017 100644 --- a/translations/limereport_ar.ts +++ b/translations/limereport_ar.ts @@ -520,6 +520,17 @@ p, li { white-space: pre-wrap; }
+ + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc diff --git a/translations/limereport_es.ts b/translations/limereport_es.ts index 7219087..7bac4e7 100644 --- a/translations/limereport_es.ts +++ b/translations/limereport_es.ts @@ -648,6 +648,17 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index b7d37b4..da93d65 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -623,6 +623,19 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + + BorderFrameEditor + + + + + Text + + + LimeReport::ConnectionDesc @@ -4214,14 +4227,14 @@ Cet aperçu n'est plus valide. - - + + Attention! - - + + Selected elements have different parent containers Les éléments sélectionnés ont un parent différent diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index aca5301..57c25f8 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -635,6 +635,19 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + + BorderFrameEditor + + + + + Text + + + LimeReport::ConnectionDesc @@ -4226,14 +4239,14 @@ Ten podgląd nie jest już prawidłowy. Ciąg znaków - - + + Attention! Uwaga! - - + + Selected elements have different parent containers Wybrane elementy mają różne pojemniki nadrzędne diff --git a/translations/limereport_ru.ts b/translations/limereport_ru.ts index 3dd7d0b..d769de0 100644 --- a/translations/limereport_ru.ts +++ b/translations/limereport_ru.ts @@ -525,6 +525,17 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc diff --git a/translations/limereport_zh.ts b/translations/limereport_zh.ts index 3e62d44..bc872a0 100644 --- a/translations/limereport_zh.ts +++ b/translations/limereport_zh.ts @@ -532,6 +532,17 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc From 4bb82ffa52d12cb2bc2e52dae5cc71a88126314b Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 7 Feb 2023 00:32:58 +0300 Subject: [PATCH 24/26] fix build for c++ < 17 --- limereport/lrbanddesignintf.cpp | 1 - limereport/lrcollection.h | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index 73a9404..321b729 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -60,7 +60,6 @@ void BandMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem* /**opt boundingRect().bottomLeft().y()-4, boundingRect().width(),4), Qt::lightGray ); - qDebug()<setRenderHint(QPainter::Antialiasing); qreal size = (boundingRect().width()= 201703L const int inline COLLECTION_TYPE_ID = qMetaTypeId(); +#else +const int inline COLLECTION_TYPE_ID = qMetaTypeId(); +#endif class LIMEREPORT_EXPORT ICollectionContainer{ public: virtual QObject* createElement(const QString& collectionName,const QString& elementType)=0; From 772a15b8678870d4d55c04b8c0a9e211801eafc6 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 7 Feb 2023 01:02:21 +0300 Subject: [PATCH 25/26] Temporary removed information label (it should be redesigned) --- limereport/lrpagedesignintf.cpp | 41 ++++++++++++++++----------------- limereport/lrpagedesignintf.h | 2 +- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 1243bc7..383ec8d 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -73,7 +73,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent): m_itemInsertRect(0), m_itemMode(DesignMode), m_cutterBorder(0), - m_infoPosRect(0), +// m_infoPosRect(0), m_currentCommand(-1), m_changeSizeMode(false), m_changePosMode(false), @@ -324,24 +324,23 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) saveSelectedItemsGeometry(); m_changePosOrSizeMode = true; } - qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); - qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep(); - if(!m_infoPosRect) - { +// qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); +// qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep(); +// if(!m_infoPosRect) +// { +// m_infoPosRect = new QGraphicsTextItem(); +// m_infoPosRect->setDefaultTextColor(QColor(100,150,50)); - m_infoPosRect = new QGraphicsTextItem(); - m_infoPosRect->setDefaultTextColor(QColor(100,150,50)); +// QFont font("Arial"); +// font.setPointSize(16); +// font.setBold(true); +// m_infoPosRect->setFont(font); +// addItem(m_infoPosRect); +// } - QFont font("Arial"); - font.setPointSize(16); - font.setBold(true); - m_infoPosRect->setFont(font); - addItem(m_infoPosRect); - } - m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm"); - - m_infoPosRect->setPos(posX,posY+30); +// m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm"); +// m_infoPosRect->setPos(posX,posY+30); } @@ -423,11 +422,11 @@ void PageDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) m_selectionRect = 0; m_multiSelectStarted = false; } - if(m_infoPosRect) - { - delete m_infoPosRect; - m_infoPosRect = 0; - } +// if(m_infoPosRect) +// { +// delete m_infoPosRect; +// m_infoPosRect = 0; +// } QGraphicsScene::mouseReleaseEvent(event); } diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index 1ef209e..fe3209d 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -300,7 +300,7 @@ namespace LimeReport { BaseDesignIntf::ItemMode m_itemMode; QGraphicsRectItem* m_cutterBorder; QGraphicsRectItem* m_pageRect; - QGraphicsTextItem* m_infoPosRect; +// QGraphicsTextItem* m_infoPosRect; QVector m_commandsList; QVector m_positionStamp; QVector m_geometryStamp; From 0b830069b24a32a1300f2f5ee780e92f90ad950a Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 7 Feb 2023 18:44:00 +0300 Subject: [PATCH 26/26] fix build for c++ < 17 --- limereport/lrcollection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/limereport/lrcollection.h b/limereport/lrcollection.h index 145443a..db9285e 100644 --- a/limereport/lrcollection.h +++ b/limereport/lrcollection.h @@ -47,7 +47,7 @@ namespace LimeReport{ #if __cplusplus >= 201703L const int inline COLLECTION_TYPE_ID = qMetaTypeId(); #else -const int inline COLLECTION_TYPE_ID = qMetaTypeId(); +const int COLLECTION_TYPE_ID = qMetaTypeId(); #endif class LIMEREPORT_EXPORT ICollectionContainer{ public: