From 9673e7ed20e9b6bf9007e45361d8062ab4bf9bf5 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Fri, 2 Mar 2018 22:22:33 +0300 Subject: [PATCH 01/20] Disable the context menu for non-editable items --- limereport/lrbasedesignintf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index bab44fa..e5591ed 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -1153,6 +1153,7 @@ void BaseDesignIntf::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { + if (!(flags() & QGraphicsItem::ItemIsSelectable)) return; PageDesignIntf* page = dynamic_cast(scene()); if (!page->selectedItems().contains(this)){ page->clearSelection(); From 215af87910f8a9eb3b5cdcb9a1b621356eee2e1d Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Wed, 7 Mar 2018 20:04:30 +0300 Subject: [PATCH 02/20] memory leak fixed --- limereport/lrdatadesignintf.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/limereport/lrdatadesignintf.cpp b/limereport/lrdatadesignintf.cpp index 6cb5678..18e0d49 100644 --- a/limereport/lrdatadesignintf.cpp +++ b/limereport/lrdatadesignintf.cpp @@ -70,7 +70,7 @@ bool QueryHolder::runQuery(IDataSource::DatasourceMode mode) m_mode = mode; QSqlDatabase db = QSqlDatabase::database(m_connectionName); - QSqlQuery* query = new QSqlQuery(db); + QSqlQuery query(db); if (!db.isValid()) { setLastError(QObject::tr("Invalid connection! %1").arg(m_connectionName)); @@ -82,13 +82,12 @@ bool QueryHolder::runQuery(IDataSource::DatasourceMode mode) if (!m_prepared) return false; } - query->prepare(m_preparedSQL); - - fillParams(query); - query->exec(); + query.prepare(m_preparedSQL); + fillParams(&query); + query.exec(); QSqlQueryModel *model = new QSqlQueryModel; - model->setQuery(*query); + model->setQuery(query); while (model->canFetchMore()) model->fetchMore(); From da9099cecb3abd0538812489fa25f10f43cb8da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?arne=20kr=C3=BCger?= Date: Fri, 9 Mar 2018 18:33:59 +0100 Subject: [PATCH 03/20] -target names for debug built dlls have now a "d" suffix --- 3rdparty/zint-2.4.4/backend_qt4/Zint.pro | 11 ++++++++- demo_r1/demo_r1.pro | 30 ++++++++++++++++++++---- demo_r2/demo_r2.pro | 28 ++++++++++++++++++---- designer/designer.pro | 28 ++++++++++++++++++---- limereport/limereport.pro | 20 ++++++++++++++-- translations/limereport_ar.ts | 10 ++++++++ translations/limereport_es_ES.ts | 10 ++++++++ translations/limereport_ru.ts | 10 ++++++++ 8 files changed, 132 insertions(+), 15 deletions(-) diff --git a/3rdparty/zint-2.4.4/backend_qt4/Zint.pro b/3rdparty/zint-2.4.4/backend_qt4/Zint.pro index b579cde..7b54d67 100644 --- a/3rdparty/zint-2.4.4/backend_qt4/Zint.pro +++ b/3rdparty/zint-2.4.4/backend_qt4/Zint.pro @@ -19,7 +19,16 @@ unix{ INCLUDEPATH += $$PWD/../backend DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS ZINT_VERSION=\\\"$$VERSION\\\" DEFINES += QZINT_LIBRARY -TARGET = QtZint +#TARGET = QtZint + +CONFIG(debug, debug|release) { + TARGET = QtZintd +} else { + TARGET = QtZint +} + + + !contains(DEFINES, NO_PNG) { SOURCES += $$PWD/../backend/png.c diff --git a/demo_r1/demo_r1.pro b/demo_r1/demo_r1.pro index 26f70cd..ecd57df 100644 --- a/demo_r1/demo_r1.pro +++ b/demo_r1/demo_r1.pro @@ -26,9 +26,21 @@ macx{ } unix:{ - LIBS += -L$${DEST_LIBS} -llimereport + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -llimereportd + } else { + LIBS += -llimereport + } + contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } } DESTDIR = $$DEST_DIR # QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) | @@ -54,9 +66,19 @@ win32 { QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR\\*) $$quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t) contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } } - LIBS += -L$${DEST_LIBS} -llimereport + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -llimereportd + } else { + LIBS += -llimereport + } } diff --git a/demo_r2/demo_r2.pro b/demo_r2/demo_r2.pro index cec1043..7a2ab07 100644 --- a/demo_r2/demo_r2.pro +++ b/demo_r2/demo_r2.pro @@ -26,9 +26,19 @@ macx{ } unix:{ - LIBS += -L$${DEST_LIBS} -llimereport + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -llimereportd + } else { + LIBS += -llimereport + } contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } } DESTDIR = $$DEST_DIR QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$REPORTS_DIR) $$escape_expand(\n\t) @@ -52,9 +62,19 @@ win32 { RC_FILE += mainicon.rc contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } + } + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -llimereportd + } else { + LIBS += -llimereport } - LIBS += -L$${DEST_LIBS} -llimereport QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t) } diff --git a/designer/designer.pro b/designer/designer.pro index e483859..1f0b8ee 100644 --- a/designer/designer.pro +++ b/designer/designer.pro @@ -17,9 +17,19 @@ macx{ } unix:{ - LIBS += -L$${DEST_LIBS} -llimereport + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -llimereportd + } else { + LIBS += -llimereport + } contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } } DESTDIR = $$DEST_DIR linux{ @@ -42,8 +52,18 @@ win32 { RC_FILE += mainicon.rc contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } + } + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -llimereportd + } else { + LIBS += -llimereport } - LIBS += -L$${DEST_LIBS} -llimereport } diff --git a/limereport/limereport.pro b/limereport/limereport.pro index 6397a71..45f42c1 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -1,4 +1,13 @@ -TARGET = limereport +#TARGET = limereport + + +CONFIG(debug, debug|release) { + TARGET = limereportd +} else { + TARGET = limereport +} + + TEMPLATE = lib CONFIG += lib @@ -60,7 +69,14 @@ contains(CONFIG,zint){ message(zint) INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt4 DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt4 - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } + } ####### diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts index 007f13d..a9354e5 100644 --- a/translations/limereport_ar.ts +++ b/translations/limereport_ar.ts @@ -1563,6 +1563,16 @@ p, li { white-space: pre-wrap; } Preview معاينة + + Report File Change + + + + The report file "%1" has changed names or been deleted. + +This preview is no longer valid. + + LimeReport::ReportFooter diff --git a/translations/limereport_es_ES.ts b/translations/limereport_es_ES.ts index 5d39e3f..bc96385 100644 --- a/translations/limereport_es_ES.ts +++ b/translations/limereport_es_ES.ts @@ -1388,6 +1388,16 @@ p, li { white-space: pre-wrap; } Preview + + Report File Change + + + + The report file "%1" has changed names or been deleted. + +This preview is no longer valid. + + LimeReport::ReportFooter diff --git a/translations/limereport_ru.ts b/translations/limereport_ru.ts index 3a76892..4adca96 100644 --- a/translations/limereport_ru.ts +++ b/translations/limereport_ru.ts @@ -1504,6 +1504,16 @@ p, li { white-space: pre-wrap; } Preview Предосмотр + + Report File Change + + + + The report file "%1" has changed names or been deleted. + +This preview is no longer valid. + + LimeReport::ReportFooter From e95dea21463d4a9fc09e128cfd4100f86a16b99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?arne=20kr=C3=BCger?= Date: Fri, 9 Mar 2018 19:12:39 +0100 Subject: [PATCH 04/20] -translations --- translations/limereport_ar.ts | 20 ++- translations/limereport_es_ES.qm | Bin 6410 -> 5938 bytes translations/limereport_es_ES.ts | 24 ++-- translations/limereport_fr.ts | 228 +++++++++++++++++-------------- translations/limereport_ru.qm | Bin 105708 -> 105473 bytes translations/limereport_ru.ts | 20 ++- 6 files changed, 176 insertions(+), 116 deletions(-) diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts index 10ebbf1..add2edf 100644 --- a/translations/limereport_ar.ts +++ b/translations/limereport_ar.ts @@ -587,6 +587,10 @@ p, li { white-space: pre-wrap; } already exists! + + Port + + LimeReport::ContentItemDesignIntf @@ -1891,11 +1895,11 @@ p, li { white-space: pre-wrap; } Hide left panel - إخفاء المقطع الأيسر + إخفاء المقطع الأيسر Hide right panel - إخفاء المقطع الأيمن + إخفاء المقطع الأيمن Report Tools @@ -2065,6 +2069,14 @@ p, li { white-space: pre-wrap; } Report has been modified! Do you want save the report? + + Hide left panel | Alt+L + + + + Hide right panel | Alt+R + + LimeReport::ReportEnginePrivate @@ -2347,6 +2359,10 @@ This preview is no longer valid. GENERAL + + Seconds + + LimeReport::SettingDialog diff --git a/translations/limereport_es_ES.qm b/translations/limereport_es_ES.qm index eb316e359f0890f04ad494279092808922d14daa..a7fe947df82040544d5ffe086859a3b04bc5a672 100644 GIT binary patch delta 546 zcmeA&+N4)+vm-^~)cZM8&nn97PguD3t`h?T;|~S~)@TL>uI&sAhI|YRY>y!{_fH0f z=ma3&pMhn?LIwuzLl9c9078p6L+SSntlC$AW*lN*^)O{%V6cPGLM>4G4+HCgRG@e< z1FIZ}Ap}%-@(|F#dItAtM;I8Gp|qgd#JS@2jSLZgzW{CJVu)$p3e>d(LJK=Ebg`E* zFz~EqxNLF(C_jNQV8v7h299{fQ|mi{wih$`#sOW<|D0*pqOS}Ld^Jozj~-=UV6kSl zS6B)ZcVLN9%LAHsgQaJE6425^EHga!Ffg#^L1@7r5V~IYAIqF5pzB!mSyo2_EfQ&9 z*~tUsb9u4s;{pZ`hX{lgvSHoX0dx@W4%YjnPk&B<27B Dcj=T` delta 894 zcmZWmT}YEr7=E^W-}deQ&#eU!XU2pmOd}=8Tx8h~MOGl8Ax`&EleG``QyW3M5c?6K zVmKlcG7_aO1gD@;R?-T^=+BF8q-b4K7lvR&Nk8xUO2RJAdEWD$_kEt{yl1GmV`H*n z)bE=5)ZO*Oz3N_L@7>w$fYJr<^?+Unl$rodxr~N=Kz$>iJ^*f@7ce+vv_)ieRLkh> z2fuEHI3~dFE(1_0qy5|;{0aWPNcjl()%n1l1wT1Kf-kTu{SZ(kWwfom+_NG%gCpM; zNL7cUZ6nlmL&kzCbZBDa;s;)CdPet`6g2}~fH0((8oWU25#|1d9ANpVynX#MV0x^vDY>G{{OcVys(fCM4+puBfJpDt#Swnh(j9A+Zi^B>sFk(EOX&|G5@!I%B;z^l4e50{z zTFj5r?SQexoLe(Syv_iQt7%!7FBlem z{sa@_fk-sMQmuxPj7oc0NY>&IwfGRk3BpjmjYwJ%BN7o|S`j)oL83TJbzwR&s?JL_ zQ#M2udBJ?dPzVo7Y4 diff --git a/translations/limereport_es_ES.ts b/translations/limereport_es_ES.ts index d5b0def..7aeadaf 100644 --- a/translations/limereport_es_ES.ts +++ b/translations/limereport_es_ES.ts @@ -454,6 +454,10 @@ p, li { white-space: pre-wrap; } already exists! + + Port + + LimeReport::ContentItemDesignIntf @@ -1710,14 +1714,6 @@ p, li { white-space: pre-wrap; } Horizontal layout - - Hide left panel - - - - Hide right panel - - Report Tools @@ -1866,6 +1862,14 @@ p, li { white-space: pre-wrap; } Report has been modified! Do you want save the report? + + Hide left panel | Alt+L + + + + Hide right panel | Alt+R + + LimeReport::ReportEnginePrivate @@ -2132,6 +2136,10 @@ This preview is no longer valid. GENERAL + + Seconds + + LimeReport::SettingDialog diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index f893b30..63df088 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -254,112 +254,112 @@ p, li { white-space: pre-wrap; } LimeReport::BandDesignIntf - + DataBand bande de données - + DataHeaderBand En-tête de données - + DataFooterBand Bande de pied de données - + ReportHeader En-tête du rapport - + ReportFooter Pied du rapport - + PageHeader En-tête de page - + PageFooter Pied de page - + SubDetailBand Bande de sous-détails - + SubDetailHeaderBand En-tête de sous-détails - + SubDetailFooterBand Pied de sous-détails - + GroupBandHeader Bande de groupe d'en-tête - + GroupBandFooter Bande de groupe de pieds - + TearOffBand Bande détachable - + connected to Connecté à - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - - + + Auto height Hauteur automatique - - + + Splittable Divisible - - + + Keep bottom space Garder l'espace inférieur - - + + Start from new page Démarrer depuis une nouvelle page - - + + Start new page Démarrer une nouvelle page @@ -367,37 +367,37 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + No borders Aucune bordure - + All borders Toutes les bordures @@ -405,8 +405,8 @@ p, li { white-space: pre-wrap; } LimeReport::ConnectionDesc - - + + defaultConnection Connexion par défaut @@ -430,57 +430,62 @@ p, li { white-space: pre-wrap; } Utiliser la connexion par défaut de l'application - + Driver Pilote - + Server Serveur - + + Port + + + + User Utilisateur - + Password Mot de passe - + Database Base de données - + ... - + Auto connect Connexion automatique - + Dont keep credentals in lrxml Ne pas enregistrer les informations personnelles - + Check connection Vérifier la connexion - + Cancel Annuler - + Ok @@ -511,7 +516,7 @@ p, li { white-space: pre-wrap; } existe déja! - + defaultConnection @@ -679,7 +684,7 @@ p, li { white-space: pre-wrap; } - + Datasource "%1" not found! Source de donnée "%1" introuvable! @@ -697,12 +702,12 @@ p, li { white-space: pre-wrap; } La source de donnée avec le nom "%1" existe déja! - + Database "%1" not found Base de données "%1 introuvable - + invalid connection Connexion invalide @@ -1196,12 +1201,12 @@ p, li { white-space: pre-wrap; } LimeReport::MasterDetailProxyModel - + Field: "%1" not found in "%2" child datasource Le champ: "%1"est introuvable dans la source de donnée enfant "%2" - + Field: "%1" not found in "%2" master datasource Le champ: "%1"est introuvable dans la source de donnée principale "%2" @@ -1209,7 +1214,7 @@ p, li { white-space: pre-wrap; } LimeReport::ModelToDataSource - + model is destroyed Le modèle a été supprimé @@ -1416,7 +1421,7 @@ p, li { white-space: pre-wrap; } LimeReport::ProxyHolder - + Datasource has been invalidated La source de donnée n'a pas été validée @@ -2087,14 +2092,22 @@ p, li { white-space: pre-wrap; } A propos - Hide left panel - Masquer le panneau de gauche + Masquer le panneau de gauche + + + Hide right panel + Masquer le panneau de droite + + + + Hide left panel | Alt+L + - Hide right panel - Masquer le panneau de droite + Hide right panel | Alt+R + @@ -2281,17 +2294,17 @@ p, li { white-space: pre-wrap; } Aperçu avant impression - + Error Erreur - + Report File Change Nom du fichier changé - + The report file "%1" has changed names or been deleted. This preview is no longer valid. @@ -2541,7 +2554,7 @@ 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 @@ -2549,89 +2562,96 @@ Cet aperçu n'est plus valide. LimeReport::ScriptEngineManager - + GROUP FUNCTIONS Fonctions de groupe - - - - - - - - + + + + + + + + Value Valeur - - + + BandName Nom de la bande - + Variable %1 not found Variable "%1" introuvable - + SYSTEM Système - - - + + + NUMBER Nombre - - - - + + + + + Format - + Precision Précision - - + + Locale Local - - - - - + + + + + + DATE&TIME DATE&HEURE - + + Seconds + + + + CurrencySymbol Symbolde de la monnaie - - - + + + GENERAL - - - + + + Name Nom @@ -2995,32 +3015,32 @@ Cet aperçu n'est plus valide. - + Invalid connection! %1 Connexion invalidé %1 - + Master datasource "%1" not found! Source de donnée principale "%1" introuvable! - + Master datasouce "%1" not found! Source de donnée principale "%1" introuvable! - + Child Enfant - + and child est enfant - + datasouce "%1" not found! Source de donnée "%1" introuvable! @@ -3136,7 +3156,7 @@ 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 diff --git a/translations/limereport_ru.qm b/translations/limereport_ru.qm index 6db79385a6986602dab7e2a95527253a8e70b790..57a32c9c45a26e881d8dd02a3cbd68184d7d326c 100644 GIT binary patch delta 2366 zcmXArd015E6~^Clw;6^R#<)O(79U)|1xOWf!HB>k5(yC`fGC@SETRxZK@nj<7FiUL zD;i^Ll)A({np)JLO;to{T&kee2E+u68i}!06ZHXlJa>$iMuJdDCL2&zsA*auI+Mvb(-j?CW>z329WA} z12idvHecD#^@*bG+3b{5PG9V(22HQ0UFUs4Q(n`hv*SU5chm;a&E9fZnEZ+pm2y__ z`q>9mP$$gV)&yEHST#vrmN}I|by^y`)vdAov9N7?GwA&s;aI&lC~k;wy7mR|XsB?p zUI$9QEBtE1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9+DUySd76nqzEr`snwbx>0NpAy$$J{8 z0)sRqB%127JdIfbKc?t%z(Gyn#)^D z0UjUFJRElx;6aFHKz@?;JVi4QMtdJKLSkj5=Fy)?$mxOUbS_7V6~8){>^42U+Z1I% zK90 already exists! уже существует! + + Port + + LimeReport::ContentItemDesignIntf @@ -1769,11 +1773,11 @@ p, li { white-space: pre-wrap; } Hide left panel - Спрятать левую панель + Спрятать левую панель Hide right panel - Спрятать правую панель + Спрятать правую панель Report Tools @@ -1951,6 +1955,14 @@ p, li { white-space: pre-wrap; } Report has been modified! Do you want save the report? Отчет был изменен! Хотите его сохранить? + + Hide left panel | Alt+L + + + + Hide right panel | Alt+R + + LimeReport::ReportEnginePrivate @@ -2225,6 +2237,10 @@ This preview is no longer valid. GENERAL ОБЩИЕ + + Seconds + + LimeReport::SettingDialog From 996d3ff16ac6a9904cdcf1608270d71f951d9465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?arne=20kr=C3=BCger?= Date: Mon, 12 Mar 2018 19:21:34 +0100 Subject: [PATCH 05/20] -zint dll is now created --- 3rdparty/zint-2.4.4/backend_qt4/Zint.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/3rdparty/zint-2.4.4/backend_qt4/Zint.pro b/3rdparty/zint-2.4.4/backend_qt4/Zint.pro index 2497f83..f9747a2 100644 --- a/3rdparty/zint-2.4.4/backend_qt4/Zint.pro +++ b/3rdparty/zint-2.4.4/backend_qt4/Zint.pro @@ -7,8 +7,9 @@ contains(CONFIG, static_build){ } !contains(CONFIG, staticlib){ -CONFIG += dll + CONFIG += dll DEFINES += QZINT_LIBRARY + } include(../../../common.pri) From 860be394a657ebd3cb990ea95b45ec1d32bd3aab Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 15 Mar 2018 10:59:44 +0300 Subject: [PATCH 06/20] Subgroup band fixed --- limereport/lrreportrender.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index 5eb81e6..6475f15 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -705,8 +705,8 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da foreach (BandDesignIntf* subBand, band->childrenByType(BandDesignIntf::GroupHeader)) { foreach(BandDesignIntf* footer, subBand->childrenByType(BandDesignIntf::GroupFooter)){ renderBand(footer, 0); - closeDataGroup(subBand); } + closeDataGroup(subBand); } foreach (BandDesignIntf* footer, band->childrenByType(BandDesignIntf::GroupFooter)) { From 9d11ba719d6b8aedeb55433b73057366f18a19e9 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 15 Mar 2018 11:01:09 +0300 Subject: [PATCH 07/20] Version changed --- common.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.pri b/common.pri index a99ca12..485bc51 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 63 +LIMEREPORT_VERSION_RELEASE = 68 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" From 24c9fa1827d61df9295c8b7ecc29b8ace9e6792e Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Thu, 22 Mar 2018 17:17:04 +0300 Subject: [PATCH 08/20] Watermark property has been added to TextItem and ImageItem --- limereport/items/lrimageitem.h | 1 + limereport/items/lrtextitem.h | 1 + limereport/lrbasedesignintf.cpp | 16 +++++++++++++++- limereport/lrbasedesignintf.h | 4 ++++ limereport/lrreportrender.cpp | 5 ++++- 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/limereport/items/lrimageitem.h b/limereport/items/lrimageitem.h index 18b236f..77ea8db 100644 --- a/limereport/items/lrimageitem.h +++ b/limereport/items/lrimageitem.h @@ -47,6 +47,7 @@ class ImageItem : public LimeReport::ItemDesignIntf Q_PROPERTY(bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio) Q_PROPERTY(bool center READ center WRITE setCenter) Q_PROPERTY(QString resourcePath READ resourcePath WRITE setResourcePath) + Q_PROPERTY(bool watermark READ isWatermark WRITE setWatermark) public: enum Format { Binary = 0, diff --git a/limereport/items/lrtextitem.h b/limereport/items/lrtextitem.h index f743d3d..ff02e06 100644 --- a/limereport/items/lrtextitem.h +++ b/limereport/items/lrtextitem.h @@ -71,6 +71,7 @@ class TextItem : public LimeReport::ContentItemDesignIntf, IPageInit { Q_PROPERTY(BrushStyle backgroundBrushStyle READ backgroundBrushStyle WRITE setBackgroundBrushStyle) Q_PROPERTY(qreal textIndent READ textIndent WRITE setTextIndent) Q_PROPERTY(Qt::LayoutDirection textLayoutDirection READ textLayoutDirection WRITE setTextLayoutDirection) + Q_PROPERTY(bool watermark READ isWatermark WRITE setWatermark) public: enum AutoWidth{NoneAutoWidth,MaxWordLength,MaxStringLength}; diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index e5591ed..83d9c7a 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -78,7 +78,8 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_changingItemAlign(false), m_borderColor(Qt::black), m_reportSettings(0), - m_patternName("") + m_patternName(""), + m_watermark(false) { setGeometry(QRectF(0, 0, m_width, m_height)); if (BaseDesignIntf *item = dynamic_cast(parent)) { @@ -701,6 +702,19 @@ void BaseDesignIntf::turnOnSelectionMarker(bool value) } } +bool BaseDesignIntf::isWatermark() const +{ + return m_watermark; +} + +void BaseDesignIntf::setWatermark(bool watermark) +{ + if (m_watermark != watermark){ + m_watermark = watermark; + notify("watermark",!watermark,watermark); + } +} + QString BaseDesignIntf::patternName() const { return (m_patternName.isEmpty()) ? objectName() : m_patternName; diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index ecced96..7c72a21 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -282,6 +282,9 @@ public: Q_INVOKABLE QString setItemPosX(qreal xValue); Q_INVOKABLE QString setItemPosY(qreal yValue); + bool isWatermark() const; + void setWatermark(bool watermark); + protected: //ICollectionContainer @@ -396,6 +399,7 @@ private: QColor m_borderColor; ReportSettings* m_reportSettings; QString m_patternName; + bool m_watermark; signals: void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry); void posChanged(QObject* object, QPointF newPos, QPointF oldPos); diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index 6475f15..ed72282 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -640,7 +640,10 @@ void ReportRender::renderPageItems(PageItemDesignIntf* patternPage) m_renderPageItem->restoreLinks(); m_renderPageItem->updateSubItemsSize(FirstPass,m_datasources); foreach(BaseDesignIntf* item, pageItems){ - item->setZValue(item->zValue()-100000); + if (!item->isWatermark()) + item->setZValue(item->zValue()-100000); + else + item->setZValue(item->zValue()+100000); } } From 87f5451cda24f40b2d86ba769017e46756999737 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Thu, 22 Mar 2018 17:21:02 +0300 Subject: [PATCH 09/20] Version changed to 1.4.69 --- common.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.pri b/common.pri index 485bc51..4feb9cb 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 68 +LIMEREPORT_VERSION_RELEASE = 69 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" From 25b4ace815fdcafa7d761d5f6d6fea57d53bd7d3 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Thu, 22 Mar 2018 17:54:18 +0300 Subject: [PATCH 10/20] Watermark fixed --- common.pri | 2 +- limereport/items/lrtextitem.cpp | 6 ++++++ limereport/items/lrtextitem.h | 2 ++ limereport/lrbasedesignintf.h | 5 ++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common.pri b/common.pri index 4feb9cb..0202559 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 69 +LIMEREPORT_VERSION_RELEASE = 70 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index 8c01e87..c0ed243 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -543,6 +543,12 @@ void TextItem::setTextLayoutDirection(const Qt::LayoutDirection &textLayoutDirec } } +void TextItem::setWatermark(bool watermark) +{ + setBackgroundMode(TransparentMode); + BaseDesignIntf::setWatermark(watermark); +} + QString TextItem::followTo() const { diff --git a/limereport/items/lrtextitem.h b/limereport/items/lrtextitem.h index ff02e06..5bc82fb 100644 --- a/limereport/items/lrtextitem.h +++ b/limereport/items/lrtextitem.h @@ -164,6 +164,8 @@ public: void setTextIndent(const qreal &textIndent); Qt::LayoutDirection textLayoutDirection() const; void setTextLayoutDirection(const Qt::LayoutDirection &textLayoutDirection); + + void setWatermark(bool watermark); protected: void updateLayout(); diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 7c72a21..904b64e 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -272,6 +272,8 @@ public: void setZValueProperty(qreal value); QString patternName() const; void setPatternName(const QString &patternName); + bool isWatermark() const; + virtual void setWatermark(bool watermark); Q_INVOKABLE QString setItemWidth(qreal width); Q_INVOKABLE QString setItemHeight(qreal height); @@ -282,9 +284,6 @@ public: Q_INVOKABLE QString setItemPosX(qreal xValue); Q_INVOKABLE QString setItemPosY(qreal yValue); - bool isWatermark() const; - void setWatermark(bool watermark); - protected: //ICollectionContainer From ae0deb183f28c9f0d6565948bed46a646df3d960 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Thu, 22 Mar 2018 20:36:14 +0300 Subject: [PATCH 11/20] watermark property translated --- common.pri | 2 +- limereport/objectinspector/lrobjectitemmodel.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common.pri b/common.pri index 0202559..fb9bdaf 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 70 +LIMEREPORT_VERSION_RELEASE = 71 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/objectinspector/lrobjectitemmodel.cpp b/limereport/objectinspector/lrobjectitemmodel.cpp index 080a7a2..71b3adb 100644 --- a/limereport/objectinspector/lrobjectitemmodel.cpp +++ b/limereport/objectinspector/lrobjectitemmodel.cpp @@ -134,6 +134,7 @@ void QObjectPropertyModel::translatePropertyName() tr("condition"); tr("groupFieldName"); tr("keepGroupTogether"); + tr("watermark"); } void QObjectPropertyModel::clearObjectsList() From af30f3582e4014399cd31e17770d6515355d7347 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Mon, 26 Mar 2018 23:32:25 +0300 Subject: [PATCH 12/20] bool propertyitem fixed --- common.pri | 2 +- .../propertyItems/lrboolpropitem.cpp | 29 ++++++++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/common.pri b/common.pri index fb9bdaf..50e1bb1 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 71 +LIMEREPORT_VERSION_RELEASE = 72 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/objectinspector/propertyItems/lrboolpropitem.cpp b/limereport/objectinspector/propertyItems/lrboolpropitem.cpp index c6c9f37..9ed1eea 100644 --- a/limereport/objectinspector/propertyItems/lrboolpropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrboolpropitem.cpp @@ -69,20 +69,29 @@ void BoolPropItem::setModelData(QWidget *propertyEditor, QAbstractItemModel *mod bool BoolPropItem::paint(QPainter *painter, const StyleOptionViewItem &option, const QModelIndex &index) { - if (index.column()==1){ - QStyleOptionButton so; - int border = (option.rect.height() - QApplication::style()->pixelMetric(QStyle::PM_IndicatorWidth))/2; - so.rect = option.rect.adjusted(border,border,0,-border); - so.rect.setWidth(QApplication::style()->pixelMetric(QStyle::PM_IndicatorWidth)); - if (!isValueReadonly()) - so.state = QStyle::State_Enabled; - else - so.state &= ~QStyle::State_Enabled; + QStyle* style = option.widget ? option.widget->style() : QApplication::style(); + int offset = 0; + +#ifdef Q_OS_MAC + offset = 2; +#endif + + if (index.column()==1){ + StyleOptionViewItem so(option); + int border = (option.rect.height() - style->pixelMetric(QStyle::PM_IndicatorWidth))/2; + so.rect = option.rect.adjusted(border,border,0,-border); + so.rect.setWidth(style->pixelMetric(QStyle::PM_IndicatorWidth)+offset); + so.rect.setHeight(style->pixelMetric(QStyle::PM_IndicatorHeight)+offset); + +// if (!isValueReadonly()) +// so.state = QStyle::State_Enabled; +// else +// so.state &= ~QStyle::State_Enabled; so.state |= propertyValue().toBool() ? QStyle::State_On : QStyle::State_Off; - option.widget->style()->drawPrimitive(QStyle::PE_IndicatorCheckBox,&so,painter); + style->drawPrimitive(QStyle::PE_IndicatorItemViewItemCheck,&so,painter); return true; } else return false; From fdab56b1d88797e3dcd81c4aaf8337e502a583f8 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 27 Mar 2018 00:39:59 +0300 Subject: [PATCH 13/20] Bool property item fixed --- common.pri | 2 +- .../propertyItems/lrboolpropitem.cpp | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/common.pri b/common.pri index 50e1bb1..d46e57d 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 72 +LIMEREPORT_VERSION_RELEASE = 73 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/objectinspector/propertyItems/lrboolpropitem.cpp b/limereport/objectinspector/propertyItems/lrboolpropitem.cpp index 9ed1eea..7e3cc5f 100644 --- a/limereport/objectinspector/propertyItems/lrboolpropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrboolpropitem.cpp @@ -71,28 +71,15 @@ bool BoolPropItem::paint(QPainter *painter, const StyleOptionViewItem &option, c { QStyle* style = option.widget ? option.widget->style() : QApplication::style(); - int offset = 0; - -#ifdef Q_OS_MAC - offset = 2; -#endif if (index.column()==1){ - StyleOptionViewItem so(option); + QStyleOptionButton so; int border = (option.rect.height() - style->pixelMetric(QStyle::PM_IndicatorWidth))/2; so.rect = option.rect.adjusted(border,border,0,-border); - so.rect.setWidth(style->pixelMetric(QStyle::PM_IndicatorWidth)+offset); - so.rect.setHeight(style->pixelMetric(QStyle::PM_IndicatorHeight)+offset); - -// if (!isValueReadonly()) -// so.state = QStyle::State_Enabled; -// else -// so.state &= ~QStyle::State_Enabled; - + so.rect.setWidth(style->pixelMetric(QStyle::PM_IndicatorWidth)); + so.rect.setHeight(style->pixelMetric(QStyle::PM_IndicatorHeight)); so.state |= propertyValue().toBool() ? QStyle::State_On : QStyle::State_Off; - style->drawPrimitive(QStyle::PE_IndicatorItemViewItemCheck,&so,painter); - return true; } else return false; } From ddf05fb956ed149ed2c5491a3dc3699a0a497b36 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 27 Mar 2018 01:10:24 +0300 Subject: [PATCH 14/20] Bool propertyitem modified --- common.pri | 2 +- .../propertyItems/lrboolpropitem.cpp | 32 +++++++++++++++---- .../propertyItems/lrboolpropitem.h | 2 ++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/common.pri b/common.pri index d46e57d..60d33f4 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 73 +LIMEREPORT_VERSION_RELEASE = 74 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/objectinspector/propertyItems/lrboolpropitem.cpp b/limereport/objectinspector/propertyItems/lrboolpropitem.cpp index 7e3cc5f..6e462a2 100644 --- a/limereport/objectinspector/propertyItems/lrboolpropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrboolpropitem.cpp @@ -67,19 +67,39 @@ void BoolPropItem::setModelData(QWidget *propertyEditor, QAbstractItemModel *mod setValueToObject(propertyName(),propertyValue()); } +QPixmap BoolPropItem::getIndicatorImage(const StyleOptionViewItem &option){ + QStyleOptionButton so; + so.state = option.state; + if (!isValueReadonly()) + so.state = QStyle::State_Enabled; + else + so.state &= ~QStyle::State_Enabled; + so.state |= propertyValue().toBool() ? QStyle::State_On : QStyle::State_Off; + so.rect = QRect(0,0, + QApplication::style()->pixelMetric(QStyle::PM_IndicatorWidth), + QApplication::style()->pixelMetric(QStyle::PM_IndicatorHeight)); + + QPixmap pixmap(so.rect.width(),so.rect.height()); + pixmap.fill(Qt::transparent); + QPainter p(&pixmap); + option.widget->style()->drawPrimitive(QStyle::PE_IndicatorItemViewItemCheck,&so, &p); + return pixmap; +} + bool BoolPropItem::paint(QPainter *painter, const StyleOptionViewItem &option, const QModelIndex &index) { QStyle* style = option.widget ? option.widget->style() : QApplication::style(); if (index.column()==1){ - QStyleOptionButton so; int border = (option.rect.height() - style->pixelMetric(QStyle::PM_IndicatorWidth))/2; - so.rect = option.rect.adjusted(border,border,0,-border); - so.rect.setWidth(style->pixelMetric(QStyle::PM_IndicatorWidth)); - so.rect.setHeight(style->pixelMetric(QStyle::PM_IndicatorHeight)); - so.state |= propertyValue().toBool() ? QStyle::State_On : QStyle::State_Off; - style->drawPrimitive(QStyle::PE_IndicatorItemViewItemCheck,&so,painter); +// QStyleOptionButton so; +// so.rect = option.rect.adjusted(border,border,0,-border); +// so.rect.setWidth(style->pixelMetric(QStyle::PM_IndicatorWidth)); +// so.rect.setHeight(style->pixelMetric(QStyle::PM_IndicatorHeight)); +// so.state |= propertyValue().toBool() ? QStyle::State_On : QStyle::State_Off; +// style->drawPrimitive(QStyle::PE_IndicatorItemViewItemCheck,&so,painter); + painter->drawPixmap(option.rect.x()+border,option.rect.y()+border, getIndicatorImage(option)); return true; } else return false; } diff --git a/limereport/objectinspector/propertyItems/lrboolpropitem.h b/limereport/objectinspector/propertyItems/lrboolpropitem.h index 3407925..9331c3d 100644 --- a/limereport/objectinspector/propertyItems/lrboolpropitem.h +++ b/limereport/objectinspector/propertyItems/lrboolpropitem.h @@ -45,6 +45,8 @@ public: virtual void setPropertyEditorData(QWidget * propertyEditor, const QModelIndex &) const; virtual void setModelData(QWidget * propertyEditor, QAbstractItemModel * model, const QModelIndex & index); bool paint(QPainter *painter, const StyleOptionViewItem &option, const QModelIndex &index); +protected: + QPixmap getIndicatorImage(const StyleOptionViewItem &option); }; } // namespace LimeReport From bae89854deb62aed9e326bcc0c574d4fedf3e841 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Wed, 28 Mar 2018 19:24:06 +0300 Subject: [PATCH 15/20] Background fixed --- common.pri | 2 +- limereport/items/lrtextitem.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common.pri b/common.pri index 60d33f4..9335ddf 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 74 +LIMEREPORT_VERSION_RELEASE = 75 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index c0ed243..15e5809 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -545,7 +545,9 @@ void TextItem::setTextLayoutDirection(const Qt::LayoutDirection &textLayoutDirec void TextItem::setWatermark(bool watermark) { - setBackgroundMode(TransparentMode); + if (watermark){ + setBackgroundMode(TransparentMode); + } BaseDesignIntf::setWatermark(watermark); } From 0dd864085955a5ee49871fcc76d1e597c7469788 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 30 Mar 2018 21:30:47 +0300 Subject: [PATCH 16/20] Band slicing has been fixed --- common.pri | 2 +- limereport/lrbanddesignintf.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.pri b/common.pri index 9335ddf..b2cb30a 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 75 +LIMEREPORT_VERSION_RELEASE = 76 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index 6ca39be..927081b 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -585,7 +585,7 @@ BaseDesignIntf *BandDesignIntf::cloneBottomPart(int height, QObject *owner, QGra BaseDesignIntf* tmpItem = item->cloneItem(item->itemMode(),bottomPart,bottomPart); tmpItem->setPos(tmpItem->pos().x(), (tmpItem->pos().y()-height)+borderLineSize()); } - else if ((item->geometry().top()geometry().bottom()>height)){ + else if ((item->geometry().top()<=height) && (item->geometry().bottom()>height)){ int sliceHeight = height-item->geometry().top(); if (item->isSplittable() && item->canBeSplitted(sliceHeight)) { BaseDesignIntf* tmpItem=item->cloneBottomPart(sliceHeight,bottomPart,bottomPart); @@ -597,7 +597,7 @@ BaseDesignIntf *BandDesignIntf::cloneBottomPart(int height, QObject *owner, QGra moveItemsDown(item->pos().y()+item->height(), sizeOffset + bottomOffset); } } else { - if ((item->geometry().bottom()-height)>height){ + if ((item->geometry().bottom()-height)>=height){ BaseDesignIntf* tmpItem = item->cloneItem(item->itemMode(),bottomPart,bottomPart); tmpItem->setPos(tmpItem->pos().x(),borderLineSize()); tmpItem->setHeight((this->height()-height)); From e5555900087e26914384d9573350f9367357b226 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Thu, 19 Apr 2018 22:39:17 +0300 Subject: [PATCH 17/20] backgroundMode property added to the band items --- limereport/lrbanddesignintf.cpp | 25 +++++++++++++++++++------ limereport/lrbanddesignintf.h | 4 ++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index 927081b..4e3b5fc 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -182,14 +182,27 @@ QString BandDesignIntf::translateBandName(const BaseDesignIntf* item) const{ } } +void BandDesignIntf::setBackgroundModeProperty(BaseDesignIntf::BGMode value) +{ + if (value!=backgroundMode()){ + BaseDesignIntf::BGMode oldValue = backgroundMode(); + setBackgroundMode(value); + notify("backgroundMode",oldValue,value); + } +} + +void BandDesignIntf::setBackgroundOpacity(int value) +{ + if (opacity()!=value){ + int oldValue = opacity(); + setOpacity(value); + notify("backgroundOpacity",oldValue,value); + } +} + void BandDesignIntf::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - - if ( !(backgroundColor() == Qt::white && backgroundBrushStyle() == SolidPattern) ) { - QBrush brush(backgroundColor(), static_cast(backgroundBrushStyle())); - brush.setTransform(painter->worldTransform().inverted()); - painter->fillRect(rect(), brush); - } + prepareRect(painter, option, widget); if (itemMode() & DesignMode){ painter->save(); diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index 5f56beb..7bf8401 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -105,6 +105,8 @@ class BandDesignIntf : public ItemsContainerDesignInft Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) Q_PROPERTY(BrushStyle backgroundBrushStyle READ backgroundBrushStyle WRITE setBackgroundBrushStyle) Q_PROPERTY(bool printIfEmpty READ printIfEmpty WRITE setPrintIfEmpty) + Q_PROPERTY(BGMode backgroundMode READ backgroundMode WRITE setBackgroundModeProperty) + Q_PROPERTY(int backgroundOpacity READ opacity WRITE setBackgroundOpacity) Q_ENUMS(BandColumnsLayoutType) friend class BandMarker; friend class BandNameLabel; @@ -235,6 +237,8 @@ public: QColor alternateBackgroundColor() const; void setAlternateBackgroundColor(const QColor &alternateBackgroundColor); qreal bottomSpace() const; + void setBackgroundModeProperty(BGMode value); + void setBackgroundOpacity(int value); signals: void bandRendered(BandDesignIntf* band); protected: From 017c280ff67a0202a81792467033b95e4bc2543e Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Thu, 19 Apr 2018 22:40:04 +0300 Subject: [PATCH 18/20] Version changed --- common.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.pri b/common.pri index b2cb30a..17e0291 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 76 +LIMEREPORT_VERSION_RELEASE = 77 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" From ab14b81ac30107f6857bdd6a3d35afab164ad295 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Fri, 20 Apr 2018 00:10:14 +0300 Subject: [PATCH 19/20] Prepare rect has been refactored --- common.pri | 2 +- limereport/lrbasedesignintf.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/common.pri b/common.pri index 17e0291..6a8f275 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 77 +LIMEREPORT_VERSION_RELEASE = 78 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 83d9c7a..61c7283 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -400,19 +400,21 @@ void BaseDesignIntf::prepareRect(QPainter *painter, const QStyleOptionGraphicsIt { painter->save(); + QRectF r = rect().adjusted(0, 0, borderLineSize(), borderLineSize()); QBrush brush(m_backgroundColor,static_cast(m_backgroundBrushStyle)); brush.setTransform(painter->worldTransform().inverted()); if (isSelected() && (opacity() == 100) && (m_BGMode!=TransparentMode)) { - painter->fillRect(rect(), brush); + painter->fillRect(r, brush); } else { if (m_BGMode == OpaqueMode) { - painter->setOpacity(qreal(m_opacity) / 100); - painter->fillRect(rect(), brush); + qreal o = (itemMode() & DesignMode) ? 0.5 : qreal(m_opacity) / 100; + painter->setOpacity(o); + painter->fillRect(r, brush); } else if (itemMode() & DesignMode){ painter->setOpacity(0.1); - painter->fillRect(rect(), QBrush(QPixmap(":/report/images/empty"))); + painter->fillRect(r, QBrush(QPixmap(":/report/images/empty"))); } } painter->restore(); From 36f75b011b895f1c3629872c439a4baccb85b5d0 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 24 Apr 2018 15:51:06 +0300 Subject: [PATCH 20/20] Parent object changing has been fixed --- limereport/items/lrsubitemparentpropitem.cpp | 3 +- limereport/objectsbrowser/lrobjectbrowser.cpp | 29 ++++++++++++++++--- limereport/objectsbrowser/lrobjectbrowser.h | 3 ++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/limereport/items/lrsubitemparentpropitem.cpp b/limereport/items/lrsubitemparentpropitem.cpp index 1587bc9..b02cfa7 100644 --- a/limereport/items/lrsubitemparentpropitem.cpp +++ b/limereport/items/lrsubitemparentpropitem.cpp @@ -77,8 +77,8 @@ void LimeReport::ItemLocationPropItem::setPropertyEditorData(QWidget *propertyEd } void LimeReport::ItemLocationPropItem::setModelData(QWidget *propertyEditor, QAbstractItemModel *model, const QModelIndex &index){ - object()->setProperty(propertyName().toLatin1(),stringToLocation(qobject_cast(propertyEditor)->text())); model->setData(index,object()->property(propertyName().toLatin1())); + setValueToObject(propertyName(), propertyValue()); } QString LimeReport::ItemLocationPropItem::locationToString(LimeReport::ItemDesignIntf::LocationType location) const{ @@ -92,6 +92,5 @@ LimeReport::ItemDesignIntf::LocationType LimeReport::ItemLocationPropItem::strin void LimeReport::ItemLocationPropItem::slotLocationChanged(const QString &text){ if ( locationToString(object()->property(propertyName().toLatin1()).toInt())!=text){ object()->setProperty(propertyName().toLatin1(),stringToLocation(text)); - dynamic_cast(sender())->setTextValue(locationToString(object()->property(propertyName().toLatin1()).toInt())); } } diff --git a/limereport/objectsbrowser/lrobjectbrowser.cpp b/limereport/objectsbrowser/lrobjectbrowser.cpp index e657a81..a5ee464 100644 --- a/limereport/objectsbrowser/lrobjectbrowser.cpp +++ b/limereport/objectsbrowser/lrobjectbrowser.cpp @@ -35,7 +35,8 @@ namespace LimeReport{ ObjectBrowser::ObjectBrowser(QWidget *parent) - :QWidget(parent), m_report(NULL), m_mainWindow(NULL), m_changingItemSelection(false) + :QWidget(parent), m_report(NULL), m_mainWindow(NULL), + m_changingItemSelection(false), m_movingItem(false) { QVBoxLayout *layout = new QVBoxLayout(this); setLayout(layout); @@ -86,6 +87,7 @@ void ObjectBrowser::slotClear() } void ObjectBrowser::fillNode(QTreeWidgetItem* parentNode, BaseDesignIntf* reportItem, BaseDesignIntf *ignoredItem){ + foreach (BaseDesignIntf* item, reportItem->childBaseItems()) { if (item != ignoredItem){ ObjectBrowserNode* treeItem = new ObjectBrowserNode(parentNode); @@ -93,11 +95,11 @@ void ObjectBrowser::fillNode(QTreeWidgetItem* parentNode, BaseDesignIntf* report treeItem->setObject(item); treeItem->setIcon(0,QIcon(":/items/"+extractClassName(item->metaObject()->className()))); connect(item, SIGNAL(propertyObjectNameChanged(QString,QString)), - this, SLOT(slotPropertyObjectNameChanged(QString,QString))); + this, SLOT(slotPropertyObjectNameChanged(QString,QString)), Qt::UniqueConnection); ItemDesignIntf* i = dynamic_cast(item); if (i){ connect(i, SIGNAL(itemLocationChanged(BaseDesignIntf*,BaseDesignIntf*)), - this, SLOT(slotItemParentChanged(BaseDesignIntf*,BaseDesignIntf*))); + this, SLOT(slotItemParentChanged(BaseDesignIntf*,BaseDesignIntf*)), Qt::UniqueConnection); } m_itemsMap.insert(item,treeItem); parentNode->addChild(treeItem); @@ -283,7 +285,9 @@ void ObjectBrowser::slotActivePageUpdated(LimeReport::PageDesignIntf *) buildTree(); } -void ObjectBrowser::slotItemParentChanged(BaseDesignIntf* item, BaseDesignIntf* parent) + + +void ObjectBrowser::moveItemNode(BaseDesignIntf* item, BaseDesignIntf* parent) { if (m_itemsMap.contains(item) && m_itemsMap.contains(parent)){ m_itemsMap.value(item)->parent()->removeChild(m_itemsMap.value(item)); @@ -293,7 +297,24 @@ void ObjectBrowser::slotItemParentChanged(BaseDesignIntf* item, BaseDesignIntf* item->setSelected(true); m_changingItemSelection = false; } +} +void ObjectBrowser::slotItemParentChanged(BaseDesignIntf* item, BaseDesignIntf* parent) +{ + if (!m_movingItem){ + m_movingItem = true; + moveItemNode(item, parent); + m_movingItem = false; + foreach(QObject* di, m_defferedItems){ + BaseDesignIntf* b = dynamic_cast(di); + if (b) + moveItemNode(b, parent); + } + m_defferedItems.clear(); + } else { + if (!m_defferedItems.contains(item)) + m_defferedItems.append(item); + } } void ObjectBrowserNode::setObject(QObject *value) diff --git a/limereport/objectsbrowser/lrobjectbrowser.h b/limereport/objectsbrowser/lrobjectbrowser.h index 4bdcb52..9d9482b 100644 --- a/limereport/objectsbrowser/lrobjectbrowser.h +++ b/limereport/objectsbrowser/lrobjectbrowser.h @@ -60,6 +60,7 @@ protected: void buildTree(BaseDesignIntf *ignoredItem = 0); void removeItem(BaseDesignIntf* item); void findAndRemove(QTreeWidgetItem *node, BaseDesignIntf *item); + void moveItemNode(BaseDesignIntf* item, BaseDesignIntf* parent); private slots: // void slotObjectNameChanged(const QString& objectName); void slotPropertyObjectNameChanged(const QString& oldName, const QString& newName); @@ -82,6 +83,8 @@ private: QTreeWidget* m_treeView; QMap m_itemsMap; bool m_changingItemSelection; + bool m_movingItem; + QList m_defferedItems; }; } //namespace LimeReport