From 74db10189fab1f7b4711300469a952bfe95bb8c5 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 5 Jul 2019 22:55:22 +0300 Subject: [PATCH 01/40] French language updated --- translations/limereport_fr.ts | 1078 ++++++++++++++++++++------------- 1 file changed, 666 insertions(+), 412 deletions(-) diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 5ea10c5..f7ec14c 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -97,7 +97,7 @@ Attention - + Erreur @@ -338,106 +338,116 @@ p, li { white-space: pre-wrap; } LimeReport::BandDesignIntf - + DataBand bande de données - + DataHeaderBand En-tête de données - + DataFooterBand Pied de données - + ReportHeader En-tête de rapport - + ReportFooter Pied de rapport - + PageHeader En-tête de page - + PageFooter Pied de page - + SubDetailBand Sous-détails - + SubDetailHeaderBand En-tête de sous-détails - + SubDetailFooterBand Pied de sous-détails - + GroupBandHeader Groupe d'en-tête - + GroupBandFooter 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 - - + + Cut + Couper + + + + Copy + Copier + + + + Auto height Hauteur automatique - - + + Splittable Divisible - - + + Keep bottom space Conserver l'espace inférieur - - + + Print if empty Imprimer si vide @@ -445,47 +455,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 @@ -493,8 +509,8 @@ p, li { white-space: pre-wrap; } LimeReport::ConnectionDesc - - + + defaultConnection Connexion par défaut @@ -565,7 +581,7 @@ p, li { white-space: pre-wrap; } Check connection - Vérifier la connexion + Tester la connexion @@ -596,17 +612,17 @@ p, li { white-space: pre-wrap; } Connection with name - + Le nom de la connexion already exists! - existe déja! + existe déjà! defaultConnection - + Connexion par défaut @@ -620,7 +636,7 @@ p, li { white-space: pre-wrap; } Use alternate background color - Utiliser les Couleurs de fond alternative + Utiliser les Couleurs de fond alternatives @@ -638,19 +654,19 @@ p, li { white-space: pre-wrap; } Slice last row - Couper la dernière rangée + Couper la dernière ligne Start from new page - Démarrer depuis une nouvelle page + Commencer sur une nouvelle page Start new page - Démarrer une nouvelle page + Commencer une nouvelle page @@ -658,7 +674,7 @@ p, li { white-space: pre-wrap; } - + Datasources Source de données @@ -697,7 +713,7 @@ p, li { white-space: pre-wrap; } Change datasource - Modifier la source de données + Changer la source de données @@ -735,45 +751,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 @@ -781,13 +797,13 @@ p, li { white-space: pre-wrap; } LimeReport::DataFooterBand - + DataFooter Pied de données - - + + Print always Toujours imprimé @@ -795,25 +811,25 @@ p, li { white-space: pre-wrap; } LimeReport::DataHeaderBand - + DataHeader En-tête de données - - + + Reprint on each page Imprimer dans chaque page - - + + Repeat on each row Répéter dans chaque ligne - - + + Print always Toujours imprimé @@ -821,41 +837,48 @@ 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éja! + 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éja! + 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 @@ -893,7 +916,7 @@ p, li { white-space: pre-wrap; } Object Inspector - Explorateur d'objets + Inspecteur d'objets @@ -913,7 +936,7 @@ p, li { white-space: pre-wrap; } Action Editor - Editeur d'action + Editeur d'actions @@ -951,7 +974,7 @@ p, li { white-space: pre-wrap; } TransparentMode - Mode transparence + Mode transparent @@ -961,32 +984,32 @@ p, li { white-space: pre-wrap; } Angle0 - + Angle 0° Angle90 - + Angle 90° Angle180 - + Angle 180° Angle270 - + Angle 270° Angle45 - + Angle 45° Angle315 - + Angle 315° @@ -1061,12 +1084,12 @@ p, li { white-space: pre-wrap; } BDiagPattern - + Motif Diagonal B FDiagPattern - + Motif diagonale F @@ -1086,7 +1109,7 @@ p, li { white-space: pre-wrap; } LeftItemAlign - Aligner l'élement à gauche + Aligner à gauche @@ -1096,7 +1119,7 @@ p, li { white-space: pre-wrap; } CenterItemAlign - Aligner l'élement au centre + Aligner au centre @@ -1208,6 +1231,26 @@ p, li { white-space: pre-wrap; } Table Tableau + + + Millimeters + Millimètres + + + + Inches + Pouces + + + + Scale + Échèlle + + + + Split + Diviser + LimeReport::FlagsPropItem @@ -1340,16 +1383,21 @@ p, li { white-space: pre-wrap; } LimeReport::ImageItem - - + + Watermark Filigrane - + Image Image + + + Ext. + Externe. + LimeReport::ItemLocationPropItem @@ -1453,12 +1501,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" @@ -1466,7 +1514,7 @@ p, li { white-space: pre-wrap; } LimeReport::ModelToDataSource - + model is destroyed Le modèle a été supprimé @@ -1479,6 +1527,24 @@ p, li { white-space: pre-wrap; } Objets + + LimeReport::ObjectInspectorWidget + + + Clear + Effacer + + + + Filter + Filtrer + + + + Translate properties + Traduire les popriétés + + LimeReport::PDFExporter @@ -1495,14 +1561,14 @@ p, li { white-space: pre-wrap; } Pied de page - - + + Print on first page Imprimer dans la première page - - + + Print on last page Imprimer dans la dernière page @@ -1518,31 +1584,31 @@ 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 @@ -1555,12 +1621,12 @@ p, li { white-space: pre-wrap; } Formulaire - + %1 file name %1 nom de fichier - + Report file name Nom du fichier du rapport @@ -1588,128 +1654,158 @@ p, li { white-space: pre-wrap; } Barre d'outils - + + toolBar_2 + Barre d'élements + + + Print Imprimer - + Ctrl+P - + Zoom In Zoom avant - + Zoom Out Zoom arrière - - + + Prior Page Page prioritaire - - + + Next Page Page suivante - - + + Close Preview Fermer l'aperçu - + Esc Echap - + Edit Mode Mode d'édition - - + + Save to file Enregistrer dans un fichier - - + + Show errors Afficher les erreurs - + First Page Première page - + First page Première page - - + + Last Page Dernière page - + Print To PDF Enregistrer en format PDF - + Fit page width Ajuster la largeur de la page - + Fit page Ajuster la page - + One to one Page par Page - + Show Toolbar Afficher la barre d'outils - + Show toolbar Afficher la barre d'outils - + + InsertTextItem + Insérer un élément texte + + + + Add new TextItem + Ajouter un élément texte + + + + Selection Mode + Mode sélection + + + + Delete Item + Supprimer un élément + + + + Del + Supprimer + + + Page: - + Font Police - + Text align Alignement de texte - + of %1 de %1 @@ -1717,7 +1813,7 @@ p, li { white-space: pre-wrap; } LimeReport::ProxyHolder - + Datasource has been invalidated La source de donnée n'a pas été validée @@ -2302,47 +2398,92 @@ p, li { white-space: pre-wrap; } 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 + + + Property Name Propriété - + Property value Valeur - + Warning Avertissement - LimeReport::RectMMPropItem + LimeReport::RectPropItem - - - + width Largeur - - - + height Hauteur - LimeReport::RectPropItem + LimeReport::RectUnitPropItem - + + + width Largeur - + + + height Hauteur @@ -2350,27 +2491,27 @@ p, li { white-space: pre-wrap; } LimeReport::ReportDesignWidget - + Script Script - + Translations Traductions - + Report file name Nom du rapport - + Error Erreur - + Wrong file format Format de fichier incorrect @@ -2378,349 +2519,364 @@ p, li { white-space: pre-wrap; } LimeReport::ReportDesignWindow - + 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 - + Rendering report Afficher l'aperçu du rapport - + Abort Quitter - + page rendered du rendu de la page - + Warning Avertissement - + File "%1" not found! Fichier "%1" introuvable! @@ -2728,27 +2884,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. @@ -2757,12 +2913,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 @@ -2786,24 +2942,24 @@ Cet aperçu n'est plus valide. LimeReport::ReportRender - - - + + + 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" @@ -2816,125 +2972,146 @@ Cet aperçu n'est plus valide. Source de donnée - + Connection Connexion - + Datasource Name Nom de source de donnée - + Subdetail Sous-détails - + Master datasource Banse de donnée principale - + Subquery mode Mode de sous-requêtes - + Filter mode Mode filtre - + + SQL - - + + Preview Aperçu - + Hide Preview Masquer l'aperçu - + Child datasource Source de donnée fille - + Fields map Champs - - + + ... - + Data preview Aperçu de données - + + CSV + + + + + Separator + Séparateur + + + + ; + + + + + Use first row as header + La première ligne est le nom des colonnes + + + Cancel Annuler - + Ok - + Error Erreur - + Datasource Name is empty! Nom de source de donnée est vide! - + SQL is empty! SQL est vide! - + Datasource with name: "%1" already exists! La source de donnée avec le nom "%1" existe déja! - + defaultConnection Connexion par défaut - + Datasource with name %1 already exist - La source de donnée avec le nom "%1" existe déja! + La source de donnée avec le nom "%1" existe déja - - + + Attention - + Connection is not specified La connexion n'est pas spécifiée - + Refresh Actualiser @@ -2977,29 +3154,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 @@ -3025,13 +3202,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 @@ -3039,150 +3216,164 @@ Cet aperçu n'est plus valide. LimeReport::ScriptEngineManager - + GROUP FUNCTIONS Fonctions de groupe - - - + - - - - + + + + + + Value Valeur - - + + BandName Nom de la bande - + Function manager with name "%1" already exists! - la fonction avec le nom \"%1\" existe déja + la fonction avec le nom \"%1\" existe déja! - + + 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 @@ -3192,50 +3383,70 @@ Cet aperçu n'est plus valide. Designer setting + Paramètres + + + + Designer settings Paramètres du Designer - - Designer Setting - Paramètres du Designer - - - + Default font Police par défaut - + Grid Grille - + Vertical grid step Grille verticale - + Horizontal grid step Grille horizontale - + Language Langue - - Use dark theme - Utiliser le thème sombre + + Theme + Thème - - Report Setting + + Report units + Unité du rapport + + + + Script editor settings + Éditeur de script + + + + Font + Police + + + + Indent size + Taille d'indentation + + + + Report settings Paramètres du rapport - + Suppress absent fields and variables warning Effacer les messages d'absences de champs et d'avertissement de variables @@ -3301,66 +3512,66 @@ Cet aperçu n'est plus valide. LimeReport::TextItem - - + + Edit Edition - - + + Auto height Hauteur automatique - - + + Allow HTML Interpréter HTML - - + + Allow HTML in fields Interpréter HTML dans les champs - - + + Stretch to max height Etirer à la hauteur maximale - - + + Transparent Transparent - - + + Watermark Filigrane - - + + Hide if empty 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! @@ -3378,37 +3589,22 @@ Cet aperçu n'est plus valide. Contenu - - Editor settings - Paramètres de l'éditeur - - - - Editor font - Police - - - - ... - - - - + Ok - + Ctrl+Return Ctrl+Arrière - + Cancel Annuler - + Esc Echap @@ -3442,17 +3638,17 @@ Cet aperçu n'est plus valide. Chaînes de caractère - + Source Text Texte source - + Translation Traduction - + Checked Vérifié @@ -3616,39 +3812,39 @@ Cet aperçu n'est plus valide. - + Text Item - + 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! @@ -3674,15 +3870,17 @@ Cet aperçu n'est plus valide. - - + + + datasource Source de donnée - + + field Champ @@ -3720,8 +3918,8 @@ Cet aperçu n'est plus valide. - + qreal @@ -3750,37 +3948,65 @@ 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 - + + + + + margin + Marge + + + + + + mm + + + + + + '' + + + + + + + + + + + Wrong file format @@ -3833,5 +4059,33 @@ Cet aperçu n'est plus valide. Export to PDF Exporter au format PDF + + + Dark + Sombre + + + + Light + Clair + + + + Default + par défaut + + + + + + Millimeters + Millimètres + + + + + Inches + Pouces + From e2118385951c98ad9eb3c6fd17e43f6de6e94213 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 9 Jul 2019 12:28:58 +0300 Subject: [PATCH 02/40] Edit mode toollbar has been removed for read only preview mode --- limereport/lrpreviewreportwindow.cpp | 9 +++++++-- limereport/lrpreviewreportwindow.ui | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/limereport/lrpreviewreportwindow.cpp b/limereport/lrpreviewreportwindow.cpp index 2f6f391..ee00a86 100644 --- a/limereport/lrpreviewreportwindow.cpp +++ b/limereport/lrpreviewreportwindow.cpp @@ -189,6 +189,10 @@ void PreviewReportWindow::setMenuVisible(bool value) void PreviewReportWindow::setHideResultEditButton(bool value) { ui->actionEdit_Mode->setVisible(value); + if (!value && ui->editModeTools) { + delete ui->editModeTools; + ui->editModeTools = 0; + } } void PreviewReportWindow::setHidePrintButton(bool value) @@ -292,7 +296,8 @@ void PreviewReportWindow::moveEvent(QMoveEvent* e) void PreviewReportWindow::showEvent(QShowEvent *) { m_fontEditor->setVisible(ui->actionEdit_Mode->isChecked()); - ui->editModeTools->setVisible(false); + if (ui->editModeTools) + ui->editModeTools->setVisible(false); m_textAlignmentEditor->setVisible(ui->actionEdit_Mode->isChecked()); switch (m_previewScaleType) { case FitWidth: @@ -500,7 +505,7 @@ void PreviewReportWindow::on_actionShow_Toolbar_triggered() writeSetting(); } -void PreviewReportWindow::slotCurrentPageChanged(int page) +void PreviewReportWindow::slotCurrentPageChanged(int /*page*/) { slotActivateItemSelectionMode(); } diff --git a/limereport/lrpreviewreportwindow.ui b/limereport/lrpreviewreportwindow.ui index 8ce8873..3db023f 100644 --- a/limereport/lrpreviewreportwindow.ui +++ b/limereport/lrpreviewreportwindow.ui @@ -60,7 +60,7 @@ - toolBar + MainToolBar @@ -98,7 +98,7 @@ true - toolBar_2 + EditModeTools LeftToolBarArea From 4fb39eaf3591b58d88f37cff1eaa86304207db4c Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 9 Jul 2019 12:35:36 +0300 Subject: [PATCH 03/40] Polish language has been added to the designer --- common.pri | 2 +- designer/designersettingmanager.cpp | 3 ++- designer/designersettingmanager.h | 1 - limereport/lrdatadesignintf.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common.pri b/common.pri index a0012c5..e6a988c 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 1 +LIMEREPORT_VERSION_RELEASE = 2 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/designer/designersettingmanager.cpp b/designer/designersettingmanager.cpp index 550772e..f523c6c 100644 --- a/designer/designersettingmanager.cpp +++ b/designer/designersettingmanager.cpp @@ -15,10 +15,11 @@ void DesignerSettingManager::getAvailableLanguages(QList* lan { languages->append(QLocale::Russian); languages->append(QLocale::English); - languages->append(QLocale::Arabic); +// languages->append(QLocale::Arabic); languages->append(QLocale::French); languages->append(QLocale::Chinese); languages->append(QLocale::Spanish); + languages->append(QLocale::Polish); } QLocale::Language DesignerSettingManager::getCurrentDefaultLanguage() diff --git a/designer/designersettingmanager.h b/designer/designersettingmanager.h index 4c1d28c..e1226fe 100644 --- a/designer/designersettingmanager.h +++ b/designer/designersettingmanager.h @@ -12,7 +12,6 @@ class DesignerSettingManager : public QObject public: explicit DesignerSettingManager(QObject *parent = 0); ~DesignerSettingManager(); - void setApplicationInstance(QApplication* application); public slots: void getAvailableLanguages(QList* languages); QLocale::Language getCurrentDefaultLanguage(); diff --git a/limereport/lrdatadesignintf.h b/limereport/lrdatadesignintf.h index 8665bc1..38b9207 100644 --- a/limereport/lrdatadesignintf.h +++ b/limereport/lrdatadesignintf.h @@ -176,7 +176,7 @@ public: bool isOwned() const {return true;} bool isEditable() const {return true;} bool isRemovable() const {return true;} - void invalidate(IDataSource::DatasourceMode mode, bool dbWillBeClosed){ updateModel();} + void invalidate(IDataSource::DatasourceMode mode, bool /*dbWillBeClosed*/){ updateModel();} void update(){ updateModel(); } void clearErrors(){} private: From 0397b7db0900017ef1d002c11652195467bc3324 Mon Sep 17 00:00:00 2001 From: Andrzej Woronko Date: Thu, 11 Jul 2019 00:07:46 +0200 Subject: [PATCH 04/40] Polish language updated --- translations/limereport_pl.ts | 1906 +++++++++++++++++++++++++-------- 1 file changed, 1438 insertions(+), 468 deletions(-) diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index e27d0ea..61f693b 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -2,47 +2,151 @@ - LRVariableDialog + $ClassName$ - - Variable - Zmienna + + $ClassName$ + + + + + ChartItemEditor + + + + Series editor + Edytor serii - + + + Series + Serie + + + + + Add + Dodaj + + + + + Delete + Usuń + + + + Name Nazwa - - Value - Wartość + + + Values field + Pole wartości - + + + Color + Kolor + + + + Type Typ - + + + Labels field + Pole etykiet + + + + + Ok + Ok + + + + Series name + Nazwa serii + + + + LRVariableDialog + + + + Variable + Zmienna + + + + + Name + Nazwa + + + + + Value + Wartość + + + + + Type + Typ + + + + + Mandatory + Obowiązkowy + + + Attention Uwaga + + LanguageSelectDialog + + + + Dialog + Dialog + + + + + Language + Język + + LimeReport::AboutDialog + About O + Lime Report 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; } @@ -72,11 +176,13 @@ p, li { white-space: pre-wrap; } + Author Autor + <!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; } @@ -87,11 +193,13 @@ p, li { white-space: pre-wrap; } + License Licencja + <!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; } @@ -210,11 +318,13 @@ p, li { white-space: pre-wrap; } + Close Zamknij + Version 1.1.1 Wersja 1.1.1 @@ -266,116 +376,116 @@ p, li { white-space: pre-wrap; } LimeReport::BandDesignIntf - + DataBand Sekcja danych - + DataHeaderBand Nagłówek sekcji danych - + DataFooterBand Stopka sekcji danych - + ReportHeader Nagłówek raportu - + ReportFooter Stopka raportu - + PageHeader Nagłówek strony - + PageFooter Stopka strony - + SubDetailBand Podsekcja danych - + SubDetailHeaderBand Podsekcja danych nagłówek - + SubDetailFooterBand Podsekcja danych stopka - + GroupBandHeader Nagłówek sekcji grupowania - + GroupBandFooter Stopka sekcji grupowania - + TearOffBand Urwanie sekcji - + connected to połączony do - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Cut Wytnij - + Copy Kopiuj - - + + Auto height Automatyczna wysokość - - + + Splittable Rozdzielane - - + + Keep bottom space Zachowaj dolną przestrzeń - - + + Print if empty Drukuj jeśli pusty @@ -383,37 +493,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 @@ -421,8 +547,8 @@ p, li { white-space: pre-wrap; } LimeReport::ConnectionDesc - - + + defaultConnection Domyślne połączenie @@ -432,76 +558,91 @@ p, li { white-space: pre-wrap; } + Connection Połączenie + Connection Name Nazwa połączenia + Use default application connection Używaj domyślnego połączenia aplikacji + Driver Sterownik + Server Serwer + Port Port + User Użytkownik + Password Hasło + Database Baza danych + ... ... + Auto connect Automatyczne połączenie + Dont keep credentals in lrxml Nie przechowuj referencji w lrxml + Check connection Sprawdź połączenie + Cancel Anuluj + Ok Ok @@ -545,32 +686,38 @@ p, li { white-space: pre-wrap; } Dane - - + + + Use alternate background color + Użyj alternatywnego koloru tła + + + + Keep footer together Trzymaj stopkę razem - - + + Keep subdetail together Trzymaj razem pod szczegóły - - + + Slice last row Przeciąć ostatni wiersz - - + + Start from new page Start od nowej strony - - + + Start new page Nowa strona @@ -580,12 +727,15 @@ p, li { white-space: pre-wrap; } - + + + Datasources Źródła danych + Add database connection Dodaj połączenie z bazą danych @@ -603,99 +753,122 @@ p, li { white-space: pre-wrap; } + + + + + + + + + + + + + ... ... + Add new datasource Dodaj źródło danych + View data Podgląd danych + Change datasource Zmień źródło danych + Delete datasource Usuń źródło danych + Show error Pokaż błąd + Variables Zmienne + Add new variable Dodaj zmienną + Edit variable Edytuj zmienną + Delete variable Usuń zmienną + Grab variable 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 @@ -703,13 +876,13 @@ p, li { white-space: pre-wrap; } LimeReport::DataFooterBand - + DataFooter Stopka danych - + Print always Zawsze drukuj @@ -717,25 +890,25 @@ p, li { white-space: pre-wrap; } LimeReport::DataHeaderBand - + DataHeader Nagłówek danych - - + + Reprint on each page Przedrukuj na każdej stronie - - + + Repeat on each row Powtórz przy każdym wierszu - - + + Print always Zawsze drukuj @@ -743,41 +916,48 @@ 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 @@ -785,21 +965,59 @@ p, li { white-space: pre-wrap; } LimeReport::DataSourceModel - + Datasources Źródła danych - + Variables Zmienne - + External variables Zmienne zewnętrzne + + LimeReport::DialogDesignerManager + + + Edit Widgets + Edytuj widżety + + + + Widget Box + Pudełko widżetów + + + + Object Inspector + Inspektor obiektów + + + + Property Editor + Edytor właściwości + + + + Signals && Slots Editor + Edytor sygnałów i slotów + + + + Resource Editor + Edytor zasobów + + + + Action Editor + Edytor akcji + + LimeReport::EnumPropItem @@ -1037,49 +1255,129 @@ p, li { white-space: pre-wrap; } VerticalUniform Pionowy jednolity + + + Pie + Wykres kołowy + + + + VerticalBar + Pionowy pasek + + + + HorizontalBar + Pasek poziomy + + + + LegendAlignTop + Wyrównaj do góry legendę + + + + LegendAlignCenter + Wyśrodkuj legendę + + + + LegendAlignBottom + Wyrównaj do dołu legendę + + + + TitleAlignLeft + Wyrównaj do lewej tytuł + + + + TitleAlignRight + Wyrównaj do prawej tytuł + + + + TitleAlignCenter + Wyśrodkuj tytuł + + + + Layout + Układ + + + + Table + Tabela + + + + Millimeters + Milimetry + + + + Inches + Cale + + + + Scale + Skala + + + + Split + Podział + LimeReport::FlagsPropItem - + NoLine Bez linii - + TopLine Górna linia - + BottomLine Dolna linia - + LeftLine Lewa linia - + RightLine Prawa linia + + + AllLines + Wszystkie linie + LimeReport::FontEditorWidget - + Font bold Czcionka pogrubiona - + Font Italic Czcionka pochylona - + Font Underline Czcionka podkreślona @@ -1141,22 +1439,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 @@ -1164,10 +1462,21 @@ p, li { white-space: pre-wrap; } LimeReport::ImageItem - + + + Watermark + Znak wodny + + + Image Obraz + + + Ext. + Zewn. + LimeReport::ItemLocationPropItem @@ -1238,32 +1547,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 @@ -1271,12 +1580,12 @@ p, li { white-space: pre-wrap; } LimeReport::MasterDetailProxyModel - + Field: "%1" not found in "%2" child datasource Pole: "%1" nie znalezione w "%2" źródle danch dziecka - + Field: "%1" not found in "%2" master datasource Pole: "%1" nie znalezione w "%2" głównym źródle danch @@ -1284,7 +1593,7 @@ p, li { white-space: pre-wrap; } LimeReport::ModelToDataSource - + model is destroyed Model danych jest zniszczony @@ -1297,13 +1606,51 @@ p, li { white-space: pre-wrap; } Obiekty + + LimeReport::ObjectInspectorWidget + + + Clear + Wyczyść + + + + Filter + Filtr + + + + Translate properties + Przetłumacz właściwości + + + + LimeReport::PDFExporter + + + Export to PDF + Eksport do PDF + + LimeReport::PageFooter - + Page Footer Stopka strony + + + + Print on first page + Drukuj na pierwszej stronie + + + + + Print on last page + Drukuj na ostatniej stronie + LimeReport::PageHeader @@ -1316,25 +1663,50 @@ 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ę + LimeReport::PreviewReportWidget + Form Formatka - - PDF file name - Nazwa pliku PDF + + %1 file name + %1 nazwa pliku - + Report file name Nazwa pliku raportu @@ -1343,177 +1715,213 @@ p, li { white-space: pre-wrap; } LimeReport::PreviewReportWindow - + Preview Podgląd - + View Widok - + Report Raport - - toolBar - Pasek narzędzi + + MainToolBar + Główny pasek narzędzi - - + + + EditModeTools + Narzędzia trybu edycji + + + + Print Drukuj - - + + Ctrl+P Ctrl+P - - + + Zoom In Powiększenie - - + + Zoom Out Pomniejszenie - - - - + + + + Prior Page Poprzednia strona - - - - + + + + Next Page Następna strona - - - - + + + + Close Preview Zamknij podgląd - - + + Esc Esc - - + + Edit Mode Tryb edycji - - - - + + + + Save to file Zapisz do pliku - - - - + + + + Show errors Pokaż błędy - - + + First Page Pierwsza strona - - + + First page Pierwsza strona - - - - + + + + Last Page Ostatnia strona - - + + Print To PDF Drukuj do PDF - - + + Fit page width Dopasuj szerokość strony - - + + Fit page Dopasowanie do strony - - + + One to one Jeden do jednego - - + + Show Toolbar Pokaż pasek narzędzi - - + + Show toolbar Pokaż pasek narzędzi - + + + InsertTextItem + Wstaw element tekstowy + + + + + Add new TextItem + Dodaj nowy element tekstowy + + + + + Selection Mode + Tryb wyboru + + + + + Delete Item + Usuń element + + + + + Del + Usuń + + + Page: Strona: - + Font Czcionka - + Text align Wyrównanie tekstu - + of %1 z %1 @@ -1521,7 +1929,7 @@ p, li { white-space: pre-wrap; } LimeReport::ProxyHolder - + Datasource has been invalidated Źródło danych zostało unieważnione @@ -2007,56 +2415,191 @@ p, li { white-space: pre-wrap; } + endlessHeight + Nieskończona wysokość + + + + extendedHeight + Wydłużona wysokość + + + + isExtendedInDesignMode + Czy jest rozszerzony w trybie projektowania + + + + pageIsTOC + Strona to spis treści + + + + setPageSizeToPrinter + Ustaw rozmiar strony na drukarkę + + + + fillInSecondPass + Wypełnij w drugim przejściu + + + + chartTitle + Tytuł wykresu + + + + chartType + Typ wykresu + + + + drawLegendBorder + Narysuj obramowanie legendy + + + + labelsField + Pole etykiety + + + + 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 + + + Property Name Nazwa właściwości - + Property value Wartość właściwości - + Warning Uwaga - LimeReport::RectMMPropItem + LimeReport::RectPropItem - - - + width Szerokość - - - + height Wysokość - LimeReport::RectPropItem + LimeReport::RectUnitPropItem - + + + width Szerokość - + + + height Wysokość @@ -2064,22 +2607,27 @@ p, li { white-space: pre-wrap; } LimeReport::ReportDesignWidget - + Script Skrypt - + + Translations + Tłumaczenia + + + Report file name Nazwa pliku raportu - + Error Błąd - + Wrong file format Zły format pliku @@ -2087,303 +2635,364 @@ p, li { white-space: pre-wrap; } LimeReport::ReportDesignWindow - + 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 - + Rendering report Renderowanie raportu - + Abort Przerwij - + page rendered strona wyrenderowana - + Warning Ostrzeżenie - + File "%1" not found! Plik "%1" nie znaleziony! @@ -2391,22 +3000,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. @@ -2414,6 +3028,16 @@ 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 + LimeReport::ReportFooter @@ -2434,25 +3058,24 @@ Ten podgląd nie jest już prawidłowy. LimeReport::ReportRender - - - - + + + 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 @@ -2461,129 +3084,172 @@ Ten podgląd nie jest już prawidłowy. LimeReport::SQLEditDialog + Datasource Źródło danych - + + Connection Połączenie - + + Datasource Name Nazwa źródła danych - + + Subdetail Podszczegóły - + + Master datasource Główne źródło danych - + + Subquery mode Tryb podkwerendy - + + Filter mode Tryb filtra - + + + + SQL SQL - - + + + Preview Podgląd - + + Hide Preview Ukryj podgląd - + + Child datasource Źródło danych dziecka - + + Fields map Mapa pól - - + + + + ... ... - + + Data preview Podgląd danych - + + + CSV + CSV + + + + + Separator + Separator + + + + + ; + ; + + + + + Use first row as header + Użyj pierwszego wiersza jako nagłówka + + + + Cancel Anuluj - + + Ok Ok - + Error Błąd - + Datasource Name is empty! Nazwa źródła danych jest pusta! - + SQL is empty! SQL jest pusty! - + Datasource with name: "%1" already exists! Źródło danych o nazwie: "%1" już istnieje! - + defaultConnection Domyślne połączenie - + Datasource with name %1 already exist Źródło danych o nazwie %1 już istnieje - - + + Attention Uwaga - + Connection is not specified Połączenie nie zostało określone - + Refresh Odśwież @@ -2592,11 +3258,13 @@ Ten podgląd nie jest już prawidłowy. LimeReport::ScriptBrowser + Form Formatka + Functions Funkcje @@ -2607,153 +3275,257 @@ Ten podgląd nie jest już prawidłowy. + + + + + + ... ... + Dialogs Dialogi + Type Typ + Name 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 + + LimeReport::ScriptEditor + + + + Form + Formatka + + + + + Data + Dane + + + + + Functions + Funkcje + + LimeReport::ScriptEngineContext - + Dialog with name: %1 can`t be created Okno dialogowe z nazwą:%1 nie można utworzyć + + + + Error + Błąd + LimeReport::ScriptEngineManager - + GROUP FUNCTIONS FUNKCJE GRUPUJĄCE - + - - - - - - + + + + + + Value Wartość - - + + BandName Nazwa sekcji - + + Function manager with name "%1" already exists! + Menedżer funkcji o nazwie "%1" już istnieje! + + + + + 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 - - Seconds - Sekundy + + 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 @@ -2761,42 +3533,86 @@ Ten podgląd nie jest już prawidłowy. LimeReport::SettingDialog - + + Designer setting Ustawienia projektanta - - Designer Setting - Ustawienia projektanta + + + Designer settings + Ustawienia projektowania - + + Default font Domyślna czcionka - + + Grid Siatka - + + Vertical grid step Pionowy krok siatki - + + Horizontal grid step Poziomy krok siatki - - Report Setting + + + Language + Język + + + + + Theme + Motyw + + + + + Report units + Jednostki raportu + + + + + Script editor settings + Ustawienia edytora skryptów + + + + + Font + Czcionka + + + + + Indent size + Rozmiar akapitu + + + + + Report settings Ustawienia raportu - + + Suppress absent fields and variables warning Pomiń ostrzerzenie o nieobecności pól i zmiennych @@ -2828,33 +3644,33 @@ Ten podgląd nie jest już prawidłowy. LimeReport::TextAlignmentEditorWidget - + Text align left Wyrównaj tekst do lewej - - + + Text align center Wyrównaj tekst do środka - + Text align right Wyrównaj tekst do prawej - + Text align justify Wyjustuj tekst - + Text align top Wyrównaj tekst do góry - + Text align bottom Wyrównaj tekst do dołu @@ -2862,48 +3678,66 @@ Ten podgląd nie jest już prawidłowy. LimeReport::TextItem - - + + Edit Edycja - - + + Auto height Automatyczna wysokość - - + + Allow HTML Zezwalaj HTML - - + + Allow HTML in fields Zezwalaj HTML w polach - - + + Stretch to max height Rozciągnij się do maksymalnej wysokości - - + + + Transparent + Przezroczysty + + + + + Watermark + Znak wodny + + + + + Hide if empty + 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"! @@ -2912,67 +3746,116 @@ Ten podgląd nie jest już prawidłowy. LimeReport::TextItemEditor + Text Item Editor Edytor pozycji tekstowych + Content Zawartość - - Data - Dane - - - - Functions - Funkcje - - - - Editor settings - Ustawienia edytora - - - - Editor font - Edytor czcionki - - - - ... - ... - - - + + Ok Ok - + + Ctrl+Return Ctrl+Return - + + Cancel Anuluj - + + Esc Esc + + LimeReport::TranslationEditor + + + + Form + Formatka + + + + + Languages + Języki + + + + + + + ... + ... + + + + + Pages + Strony + + + + + Strings + Ciąg znaków + + + + + Source Text + Tekst źródłowy + + + + + Translation + Tłumaczenie + + + + + Checked + Zaznaczony + + + + Report Item + Element raportu + + + + Property + Właściowość + + + + Source text + Tekst źródłowy + + LimeReport::VariablesHolder - + variable with name zmienna o nazwie @@ -2984,7 +3867,7 @@ Ten podgląd nie jest już prawidłowy. - + does not exists! nie istnieje! @@ -2994,45 +3877,45 @@ Ten podgląd nie jest już prawidłowy. - + Data Dane - + DataHeader Nagłówek danych - + DataFooter Stopka danych - + GroupHeader Nagłówek grupujący - + GroupFooter Stopka grupująca - + - + Page Footer Stopka strony - + Page Header Nagłówek strony @@ -3051,243 +3934,330 @@ Ten podgląd nie jest już prawidłowy. - + SubDetail Pod szczegóły - + SubDetailHeader Nagłówek pod szczegółów - + SubDetailFooter Stopka pod szczegółów - + Tear-off Band Sekcja zrywające - + alignment wyrównanie - + Barcode Item Kod kreskowy - + HLayout Układ poziomy - - + + Image Item Element obrazu - + Shape Item Kształt elementu - + itemLocation Lokalizacja elementu - - + + Text Item Element tekstowy - + Invalid connection! %1 Nieprawidłowe połączenie! %1 - + Master datasource "%1" not found! Nie znaleziono głównego źródła danych "%1"! - + Master datasouce "%1" not found! Nie znaleziono głównego źródła danych "%1"! - + Child Dziecko - + and child i dziecko - + datasouce "%1" not found! nie znaleziono źródła danych "%1"! - + bool Wartość logiczna - - + + QColor Color - + content Zawrtość - - - - - + + + + + + datasource Źródło danych - - + + - + field Pole - + enum wyliczenie - - + + flags Falgi - + QFont Czcionka - + QImage Obraz - + int Liczba całkowita - - - + + + qreal Liczba - + QRect QRect - + QRectF QRectF - + geometry geometria - + QString 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 + + + + + + + margin + margines + + + + + + mm mm - + + + + + '' + " + + + Wrong file format Zły format pliku - + File %1 not opened Plik %1 nie został otwarty - + Content string is empty Zawartość ciągu znaków pusta - + Content is empty Zawartość pusta + + + + Export to PDF + Eksport do PDF + + + + + Chart Item + Element wykresu + + + + First + Pierwszy + + + + Second + Drugi + + + + Thrid + Trzeci + + + + VLayout + Układ pionowy + + + + Dark + Ciemny + + + + Light + Jasny + + + + Default + Domyślny + + + + + + Millimeters + Milimetry + + + + + Inches + Cale + From 5cc1312dd9c720d23c81ad7e63f4719b8b5ca438 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 23 Jul 2019 17:06:07 +0300 Subject: [PATCH 05/40] Ruler ha been fixed --- limereport/lrreportdesignwidget.cpp | 68 ++++++++++++++--------------- limereport/lrreportdesignwidget.h | 2 + 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index 12d4116..880aea7 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -287,30 +287,31 @@ void ReportDesignWidget::loadState() applySettings(); } +PageView* ReportDesignWidget::createPageView(PageDesignIntf* page){ + PageView* view = new PageView(this); + view->setBackgroundBrush(QBrush(Qt::gray)); + view->setFrameShape(QFrame::NoFrame); + view->setScene(page); + view->setPageItem(page->pageItem()); + view->scale(0.5, 0.5); + view->centerOn(0, 0); + return view; +} void ReportDesignWidget::createTabs(){ m_tabWidget->clear(); int pageIndex = -1; + for (int i = 0; i < m_report->pageCount(); ++i){ - PageView* view = new PageView(qobject_cast(this)); - view->setBackgroundBrush(QBrush(Qt::gray)); - view->setFrameShape(QFrame::NoFrame); - view->setScene(m_report->pageAt(i)); - view->setPageItem(m_report->pageAt(i)->pageItem()); - - m_report->pageAt(i)->clearSelection(); - - view->centerOn(0,0); - view->scale(0.5,0.5); - connectPage(m_report->pageAt(i)); - pageIndex = m_tabWidget->addTab(view,QIcon(),m_report->pageAt(i)->pageItem()->objectName()); + PageDesignIntf* page = m_report->pageAt(i); + page->clearSelection(); + connectPage(page); + PageView* view = createPageView(page); + int pageIndex = m_tabWidget->addTab(view, QIcon(), page->pageItem()->objectName()); m_tabWidget->setTabWhatsThis(pageIndex, "page"); - connect(m_report->pageAt(i)->pageItem(), SIGNAL(propertyObjectNameChanged(QString,QString)), - this, SLOT(slotPagePropertyObjectNameChanged(QString,QString))); } m_scriptEditor = new ScriptEditor(this); - connect(m_scriptEditor, SIGNAL(textChanged()), this, SLOT(slotScriptTextChanged())); m_scriptEditor->setReportEngine(m_report); pageIndex = m_tabWidget->addTab(m_scriptEditor,QIcon(),tr("Script")); @@ -377,7 +378,8 @@ void ReportDesignWidget::connectPage(PageDesignIntf *page) this, SIGNAL(bandDeleted(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*))); connect(page, SIGNAL(pageUpdateFinished(LimeReport::PageDesignIntf*)), this, SIGNAL(activePageUpdated(LimeReport::PageDesignIntf*))); - + connect(page->pageItem(), SIGNAL(propertyObjectNameChanged(QString,QString)), + this, SLOT(slotPagePropertyObjectNameChanged(QString,QString))); emit activePageChanged(); } @@ -737,19 +739,13 @@ void ReportDesignWidget::printReport() void ReportDesignWidget::addPage() { - QGraphicsView* view = new QGraphicsView(qobject_cast(this)); - view->setBackgroundBrush(QBrush(Qt::gray)); - view->setFrameShape(QFrame::NoFrame); PageDesignIntf* page = m_report->appendPage("page"+QString::number(m_report->pageCount()+1)); - view->setScene(page); - int index = m_report->pageCount()-1; - m_tabWidget->insertTab(index,view,QIcon(),page->pageItem()->objectName()); - m_tabWidget->setCurrentIndex(index); - connect(page->pageItem(), SIGNAL(propertyObjectNameChanged(QString,QString)), - this, SLOT(slotPagePropertyObjectNameChanged(QString,QString))); connectPage(page); - view->scale(0.5,0.5); - view->centerOn(0,0); + PageView* view = createPageView(page); + int index = m_report->pageCount()-1; + m_tabWidget->insertTab(index, view, QIcon(), page->pageItem()->objectName()); + m_tabWidget->setTabWhatsThis(index, "page"); + m_tabWidget->setCurrentIndex(index); applyUseGrid(); emit pageAdded(page); } @@ -821,9 +817,9 @@ void ReportDesignWidget::editSetting() void ReportDesignWidget::applyUseGrid() { - int hGridStep = m_useGrid?m_horizontalGridStep:2; - int vGridStep = m_useGrid?m_verticalGridStep:2; - for(int i=0;ipageCount();++i){ + int hGridStep = m_useGrid ? m_horizontalGridStep : 2; + int vGridStep = m_useGrid ? m_verticalGridStep : 2; + for(int i = 0; i < m_report->pageCount(); ++i){ m_report->pageAt(i)->setVerticalGridStep(hGridStep); m_report->pageAt(i)->setHorizontalGridStep(vGridStep); } @@ -1071,14 +1067,16 @@ bool PageView::viewportEvent(QEvent *event) { switch (event->type()) { case QEvent::MouseMove: - m_horizontalRuller->setMousePos(dynamic_cast(event)->pos()); - m_verticalRuller->setMousePos(dynamic_cast(event)->pos()); - m_horizontalRuller->update(); - m_verticalRuller->update(); + if (m_horizontalRuller && m_verticalRuller){ + m_horizontalRuller->setMousePos(dynamic_cast(event)->pos()); + m_verticalRuller->setMousePos(dynamic_cast(event)->pos()); + m_horizontalRuller->update(); + m_verticalRuller->update(); + } break; //case QEvent::Resize: case QEvent::Paint: - if (m_horizontalRuller){ + if (m_horizontalRuller && m_verticalRuller){ int x = mapFromScene(m_pageItem->boundingRect().x(),m_pageItem->boundingRect().y()).x(); int y = mapFromScene(m_pageItem->boundingRect().x(),m_pageItem->boundingRect().y()).y(); int width = mapFromScene(m_pageItem->boundingRect().bottomRight().x(),m_pageItem->boundingRect().bottomRight().y()).x(); diff --git a/limereport/lrreportdesignwidget.h b/limereport/lrreportdesignwidget.h index f48879c..b840964 100644 --- a/limereport/lrreportdesignwidget.h +++ b/limereport/lrreportdesignwidget.h @@ -241,6 +241,7 @@ signals: void pageAdded(PageDesignIntf* page); void pageDeleted(); protected: + PageView *createPageView(PageDesignIntf *page); #ifdef HAVE_QTDESIGNER_INTEGRATION void createNewDialogTab(const QString& dialogName,const QByteArray& description); #endif @@ -275,6 +276,7 @@ private: QMap m_themes; QMap m_localToEng; BaseDesignIntf::UnitType m_defaultUnits; + }; } // namespace LimeReport From c498d9686263d0f079789fe34b33ec6adcbb0985 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 23 Jul 2019 18:15:32 +0300 Subject: [PATCH 06/40] CSV tab has been fixed --- limereport/databrowser/lrsqleditdialog.cpp | 5 ++-- limereport/databrowser/lrsqleditdialog.ui | 29 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/limereport/databrowser/lrsqleditdialog.cpp b/limereport/databrowser/lrsqleditdialog.cpp index d53bc3d..8f613b5 100644 --- a/limereport/databrowser/lrsqleditdialog.cpp +++ b/limereport/databrowser/lrsqleditdialog.cpp @@ -278,7 +278,8 @@ void SQLEditDialog::initQueryMode() ui->cbSubdetail->setChecked(false); ui->leMaster->setVisible(false); ui->lbMaster->setVisible(false); - ui->tabWidget->removeTab(1); + //ui->tabWidget->removeTab(1); + ui->tabWidget->addTab(ui->csvTab, tr("CSV")); } void SQLEditDialog::initSubQueryMode() @@ -314,7 +315,7 @@ void SQLEditDialog::initProxyMode() void SQLEditDialog::initCSVMode() { - ui->tabWidget->removeTab(0); + ui->tabWidget->setCurrentWidget(ui->csvTab); } void SQLEditDialog::slotPreviewData() diff --git a/limereport/databrowser/lrsqleditdialog.ui b/limereport/databrowser/lrsqleditdialog.ui index f0abfbe..177343d 100644 --- a/limereport/databrowser/lrsqleditdialog.ui +++ b/limereport/databrowser/lrsqleditdialog.ui @@ -7,7 +7,7 @@ 0 0 422 - 622 + 646 @@ -183,6 +183,15 @@ + + + + 0 + 0 + 0 + + + @@ -320,6 +329,15 @@ + + + + 0 + 0 + 0 + + + @@ -457,6 +475,15 @@ + + + + 0 + 0 + 0 + + + From 1a10fc496e2ac08b518c517075b017772feb6700 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 24 Jul 2019 03:13:23 +0300 Subject: [PATCH 07/40] Translations has been fixed --- common.pri | 2 +- limereport/lrbasedesignintf.cpp | 2 +- limereport/lrbasedesignintf.h | 2 +- limereport/lrdatadesignintf.h | 2 +- limereport/lrpagedesignintf.cpp | 1 + limereport/lrpagedesignintf.h | 1 + limereport/lrreportdesignwidget.cpp | 56 +++++++++++++------ limereport/lrreportdesignwidget.h | 1 + limereport/lrreportengine.cpp | 17 ++++-- limereport/lrreportengine_p.h | 3 +- limereport/lrreportrender.cpp | 2 +- limereport/lrreportrender.h | 2 +- limereport/lrreporttranslation.cpp | 56 ++++++++++++++++++- limereport/lrreporttranslation.h | 14 +++-- .../translationeditor/translationeditor.cpp | 20 +++++-- .../translationeditor/translationeditor.h | 1 + 16 files changed, 140 insertions(+), 42 deletions(-) diff --git a/common.pri b/common.pri index e6a988c..751d0e8 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 2 +LIMEREPORT_VERSION_RELEASE = 3 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 d76f341..71f2f94 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -500,7 +500,7 @@ void BaseDesignIntf::hoverLeaveEvent(QGraphicsSceneHoverEvent *) update(); } -void BaseDesignIntf::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +void BaseDesignIntf::hoverEnterEvent(QGraphicsSceneHoverEvent /**event*/) { m_hovered = true; update(); diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 462791f..40c4761 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -320,7 +320,7 @@ protected: void mousePressEvent(QGraphicsSceneMouseEvent* event); void hoverMoveEvent(QGraphicsSceneHoverEvent* event); void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); - void hoverEnterEvent(QGraphicsSceneHoverEvent *event); + void hoverEnterEvent(QGraphicsSceneHoverEvent); void mouseMoveEvent(QGraphicsSceneMouseEvent* event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event); diff --git a/limereport/lrdatadesignintf.h b/limereport/lrdatadesignintf.h index 38b9207..c682fc4 100644 --- a/limereport/lrdatadesignintf.h +++ b/limereport/lrdatadesignintf.h @@ -176,7 +176,7 @@ public: bool isOwned() const {return true;} bool isEditable() const {return true;} bool isRemovable() const {return true;} - void invalidate(IDataSource::DatasourceMode mode, bool /*dbWillBeClosed*/){ updateModel();} + void invalidate(IDataSource::DatasourceMode /*mode*/, bool /*dbWillBeClosed*/){ updateModel();} void update(){ updateModel(); } void clearErrors(){} private: diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 720d7bb..bc81b94 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -816,6 +816,7 @@ void PageDesignIntf::slotItemPropertyObjectNameChanged(const QString &oldName, c if (oldName.compare(newName)!=0 && !m_executingCommand){ CommandIf::Ptr command = PropertyObjectNameChangedCommand::create(this, oldName, newName); saveCommand(command, false); + emit itemPropertyObjectNameChanged(oldName, newName); } } diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index 2ed583c..d94abfe 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -218,6 +218,7 @@ namespace LimeReport { const QString& propertyName, const QVariant& oldValue, const QVariant& newValue); + void itemPropertyObjectNameChanged(const QString& oldName, const QString& newName); void itemAdded(LimeReport::PageDesignIntf* page, LimeReport::BaseDesignIntf* item); void itemRemoved(LimeReport::PageDesignIntf* page, LimeReport::BaseDesignIntf* item); void bandAdded(LimeReport::PageDesignIntf* page, LimeReport::BandDesignIntf* band); diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index 880aea7..c7f965e 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -360,26 +360,29 @@ QGraphicsView* ReportDesignWidget::activeView(){ void ReportDesignWidget::connectPage(PageDesignIntf *page) { - connect(page,SIGNAL(itemInserted(LimeReport::PageDesignIntf*,QPointF,QString)),this,SIGNAL(itemInserted(LimeReport::PageDesignIntf*,QPointF,QString))); - connect(page,SIGNAL(itemInsertCanceled(QString)),this,SIGNAL(itemInsertCanceled(QString))); - connect(page,SIGNAL(itemPropertyChanged(QString,QString,QVariant,QVariant)),this,SIGNAL(itemPropertyChanged(QString,QString,QVariant,QVariant))); - connect(page,SIGNAL(selectionChanged()),this,SLOT(slotSelectionChanged())); - connect(page,SIGNAL(insertModeStarted()),this,SIGNAL(insertModeStarted())); - connect(page,SIGNAL(commandHistoryChanged()),this,SIGNAL(commandHistoryChanged())); - connect(page,SIGNAL(sceneRectChanged(QRectF)),this,SLOT(slotSceneRectChanged(QRectF))); - - connect(page,SIGNAL(itemAdded(LimeReport::PageDesignIntf*,LimeReport::BaseDesignIntf*)), - this, SIGNAL(itemAdded(LimeReport::PageDesignIntf*,LimeReport::BaseDesignIntf*))); - connect(page,SIGNAL(itemRemoved(LimeReport::PageDesignIntf*,LimeReport::BaseDesignIntf*)), - this,SIGNAL(itemDeleted(LimeReport::PageDesignIntf*,LimeReport::BaseDesignIntf*))); - connect(page,SIGNAL(bandAdded(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*)), - this, SIGNAL(bandAdded(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*))); - connect(page, SIGNAL(bandRemoved(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*)), - this, SIGNAL(bandDeleted(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*))); + connect(page, SIGNAL(itemInserted(LimeReport::PageDesignIntf*, QPointF, QString)), + this, SIGNAL(itemInserted(LimeReport::PageDesignIntf*, QPointF, QString))); + connect(page, SIGNAL(itemInsertCanceled(QString)),this,SIGNAL(itemInsertCanceled(QString))); + connect(page, SIGNAL(itemPropertyChanged(QString, QString, QVariant, QVariant)), + this, SIGNAL(itemPropertyChanged(QString, QString, QVariant, QVariant))); + connect(page, SIGNAL(itemPropertyObjectNameChanged(QString, QString)), + this, SLOT(slotItemPropertyObjectNameChanged(QString, QString))); + connect(page, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); + connect(page, SIGNAL(insertModeStarted()), this, SIGNAL(insertModeStarted())); + connect(page, SIGNAL(commandHistoryChanged()), this, SIGNAL(commandHistoryChanged())); + connect(page, SIGNAL(sceneRectChanged(QRectF)), this, SLOT(slotSceneRectChanged(QRectF))); + connect(page, SIGNAL(itemAdded(LimeReport::PageDesignIntf*, LimeReport::BaseDesignIntf*)), + this, SIGNAL(itemAdded(LimeReport::PageDesignIntf*, LimeReport::BaseDesignIntf*))); + connect(page, SIGNAL(itemRemoved(LimeReport::PageDesignIntf*, LimeReport::BaseDesignIntf*)), + this, SIGNAL(itemDeleted(LimeReport::PageDesignIntf*, LimeReport::BaseDesignIntf*))); + connect(page, SIGNAL(bandAdded(LimeReport::PageDesignIntf*, LimeReport::BandDesignIntf*)), + this, SIGNAL(bandAdded(LimeReport::PageDesignIntf*, LimeReport::BandDesignIntf*))); + connect(page, SIGNAL(bandRemoved(LimeReport::PageDesignIntf*, LimeReport::BandDesignIntf*)), + this, SIGNAL(bandDeleted(LimeReport::PageDesignIntf*, LimeReport::BandDesignIntf*))); connect(page, SIGNAL(pageUpdateFinished(LimeReport::PageDesignIntf*)), this, SIGNAL(activePageUpdated(LimeReport::PageDesignIntf*))); - connect(page->pageItem(), SIGNAL(propertyObjectNameChanged(QString,QString)), - this, SLOT(slotPagePropertyObjectNameChanged(QString,QString))); + connect(page->pageItem(), SIGNAL(propertyObjectNameChanged(QString, QString)), + this, SLOT(slotPagePropertyObjectNameChanged(QString, QString))); emit activePageChanged(); } @@ -964,6 +967,18 @@ void ReportDesignWidget::slotScriptTextChanged() m_report->scriptContext()->setInitScript(m_scriptEditor->toPlainText()); } +void ReportDesignWidget::slotItemPropertyObjectNameChanged(const QString& oldName, const QString& newName) +{ + PageDesignIntf* page = qobject_cast(sender()); + if (page){ + ITranslationContainer* tc = dynamic_cast(report()); + for (int i = 0; i < tc->translations()->values().count(); ++i){ + PageTranslation* pt = tc->translations()->values().at(i)->findPageTranslation(page->pageItem()->objectName()); + if (pt) pt->renameItem(oldName, newName); + } + } +} + #ifdef HAVE_QTDESIGNER_INTEGRATION void ReportDesignWidget::addNewDialog() @@ -995,6 +1010,11 @@ void ReportDesignWidget::slotDialogNameChanged(QString oldName, QString newName) void ReportDesignWidget::slotPagePropertyObjectNameChanged(const QString &oldValue, const QString &newValue) { + ITranslationContainer* tc = dynamic_cast(report()); + foreach(ReportTranslation* translation, tc->translations()->values()){ + translation->renamePage(oldValue, newValue); + } + for (int i = 0; i < m_tabWidget->count(); ++i ){ if (m_tabWidget->tabText(i).compare(oldValue) == 0){ QGraphicsView* view = dynamic_cast(m_tabWidget->widget(i)); diff --git a/limereport/lrreportdesignwidget.h b/limereport/lrreportdesignwidget.h index b840964..4b7248e 100644 --- a/limereport/lrreportdesignwidget.h +++ b/limereport/lrreportdesignwidget.h @@ -216,6 +216,7 @@ private slots: void slotCurrentTabChanged(int index); void slotReportLoaded(); void slotScriptTextChanged(); + void slotItemPropertyObjectNameChanged(const QString& oldName, const QString& newName); #ifdef HAVE_QTDESIGNER_INTEGRATION void slotDialogChanged(QString); void slotDialogNameChanged(QString oldName, QString newName); diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 8006745..c07cff4 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -224,9 +224,11 @@ void ReportEnginePrivate::showError(QString message) void ReportEnginePrivate::updateTranslations() { foreach(ReportTranslation* translation, m_translations.values()){ + translation->invalidatePages(); foreach(PageDesignIntf* page, m_pages){ translation->updatePageTranslation(page); } + translation->clearInvalidPages(); } } @@ -500,7 +502,7 @@ bool ReportEnginePrivate::exportReport(QString exporterName, const QString &file return false; } -bool ReportEnginePrivate::showPreviewWindow(ReportPages pages, PreviewHints hints) +bool ReportEnginePrivate::showPreviewWindow(ReportPages pages, PreviewHints hints, QPrinter* printer) { if (pages.count()>0){ Q_Q(ReportEngine); @@ -515,6 +517,7 @@ bool ReportEnginePrivate::showPreviewWindow(ReportPages pages, PreviewHints hint w->setPages(pages); w->setLayoutDirection(m_previewLayoutDirection); w->setStyleSheet(styleSheet()); +// w->setDefaultPrinter() if (!dataManager()->errorsList().isEmpty()){ w->setErrorMessages(dataManager()->errorsList()); @@ -550,14 +553,13 @@ void ReportEnginePrivate::previewReport(PreviewHints hints) previewReport(0, hints); } -void ReportEnginePrivate::previewReport(QPrinter *printer, PreviewHints hints) +void ReportEnginePrivate::previewReport(QPrinter* printer, PreviewHints hints) { - // QTime start = QTime::currentTime(); try{ dataManager()->setDesignTime(false); ReportPages pages = renderToPages(); dataManager()->setDesignTime(true); - showPreviewWindow(pages, hints); + showPreviewWindow(pages, hints, printer); } catch (ReportError &exception){ saveError(exception.what()); showError(exception.what()); @@ -980,7 +982,12 @@ IPreparedPages *ReportEnginePrivate::preparedPages(){ bool ReportEnginePrivate::showPreparedPages(PreviewHints hints) { - return showPreviewWindow(m_preparedPages, hints); + return showPreparedPages(0, hints); +} + +bool ReportEnginePrivate::showPreparedPages(QPrinter* defaultPrinter, PreviewHints hints) +{ + return showPreviewWindow(m_preparedPages, hints, defaultPrinter); } bool ReportEnginePrivate::prepareReportPages() diff --git a/limereport/lrreportengine_p.h b/limereport/lrreportengine_p.h index 3ffec70..6bdefe6 100644 --- a/limereport/lrreportengine_p.h +++ b/limereport/lrreportengine_p.h @@ -246,6 +246,7 @@ public: void clearWatermarks(); IPreparedPages* preparedPages(); bool showPreparedPages(PreviewHints hints); + bool showPreparedPages(QPrinter *defaultPrinter, PreviewHints hints); bool prepareReportPages(); bool printPreparedPages(); signals: @@ -273,7 +274,7 @@ public slots: void cancelRender(); protected: PageDesignIntf* createPage(const QString& pageName="", bool preview = false); - bool showPreviewWindow(ReportPages pages, PreviewHints hints); + bool showPreviewWindow(ReportPages pages, PreviewHints hints, QPrinter *printer); protected slots: void slotDataSourceCollectionLoaded(const QString& collectionName); private slots: diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index ec608fd..f4c7944 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -189,7 +189,7 @@ void ReportRender::initDatasource(const QString& name){ } } -void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool isFirst, bool resetPageNumbers) +void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool /*isFirst*/, bool /*resetPageNumbers*/) { m_currentNameIndex = 0; m_patternPageItem = patternPage; diff --git a/limereport/lrreportrender.h b/limereport/lrreportrender.h index d31efce..dabaa79 100644 --- a/limereport/lrreportrender.h +++ b/limereport/lrreportrender.h @@ -116,7 +116,7 @@ private: void initGroups(); void clearPageMap(); - void renderPage(PageItemDesignIntf *patternPage, bool isTOC = false, bool isFirst = false, bool resetPageNumbers = false); + void renderPage(PageItemDesignIntf *patternPage, bool isTOC = false, bool isFirst = false, bool = false); BandDesignIntf* renderBand(BandDesignIntf *patternBand, BandDesignIntf *bandData, DataRenderMode mode = NotStartNewPage, bool isLast = false); void renderDataBand(BandDesignIntf* dataBand); void renderPageHeader(PageItemDesignIntf* patternPage); diff --git a/limereport/lrreporttranslation.cpp b/limereport/lrreporttranslation.cpp index aa6cfdd..d25b0d5 100644 --- a/limereport/lrreporttranslation.cpp +++ b/limereport/lrreporttranslation.cpp @@ -32,6 +32,7 @@ ReportTranslation::~ReportTranslation() PageTranslation* ReportTranslation::createPageTranslation(PageDesignIntf* page) { PageTranslation* pageTranslation = new PageTranslation; + pageTranslation->checked = true; pageTranslation->pageName = page->pageItem()->objectName(); foreach(BaseDesignIntf* item, page->pageItem()->allChildBaseItems()){ createItemTranslation(item, pageTranslation); @@ -43,6 +44,7 @@ void ReportTranslation::createItemTranslation(BaseDesignIntf* item, PageTranslat QMap stringsForTranslation = item->getStringForTranslation(); if (!stringsForTranslation.isEmpty()){ ItemTranslation* itemTranslation = new ItemTranslation; + itemTranslation->checked = true; itemTranslation->itemName = item->objectName(); foreach(QString propertyName, stringsForTranslation.keys()){ PropertyTranslation* propertyTranslation = new PropertyTranslation; @@ -57,16 +59,42 @@ void ReportTranslation::createItemTranslation(BaseDesignIntf* item, PageTranslat } } -PageTranslation* ReportTranslation::findPageTranslation(const QString& page_name) +PageTranslation* ReportTranslation::findPageTranslation(const QString& pageName) { foreach(PageTranslation* page, m_pagesTranslation){ - if (page->pageName.compare(page_name) == 0){ + if (page->pageName.compare(pageName) == 0){ return page; } } return 0; } +void ReportTranslation::renamePage(const QString &oldName, const QString &newName) +{ + PageTranslation* page = findPageTranslation(oldName); + if (page){ + page->pageName = newName; + } +} + +void ReportTranslation::invalidatePages() +{ + foreach(PageTranslation* page, m_pagesTranslation){ + page->checked = false; + } +} + +void ReportTranslation::clearInvalidPages() +{ + QList::Iterator it = m_pagesTranslation.begin(); + while (it != m_pagesTranslation.end()){ + if (!(*it)->checked){ + delete *it; + it = m_pagesTranslation.erase(it); + } else ++it; + } +} + void ReportTranslation::updatePageTranslation(PageDesignIntf* page) { PageTranslation* pageTranslation = findPageTranslation(page->pageItem()->objectName()); @@ -75,6 +103,10 @@ void ReportTranslation::updatePageTranslation(PageDesignIntf* page) m_pagesTranslation.append(pageTranslation); } if (pageTranslation){ + pageTranslation->checked = true; + foreach(ItemTranslation* item, pageTranslation->itemsTranslation){ + item->checked = false; + } foreach(BaseDesignIntf* item, page->pageItem()->allChildBaseItems()){ QMap stringsForTranslation = item->getStringForTranslation(); if (!stringsForTranslation.isEmpty()){ @@ -90,15 +122,23 @@ void ReportTranslation::updatePageTranslation(PageDesignIntf* page) propertyTranslation->sourceValue = stringsForTranslation.value(propertyName); if (!translated) propertyTranslation->value = propertyTranslation->sourceValue; } + itemTranslation->checked = true; } else { createItemTranslation(item, pageTranslation); } } } + QHash::Iterator it = pageTranslation->itemsTranslation.begin(); + while( it != pageTranslation->itemsTranslation.end()){ + if (!it.value()->checked) { + delete it.value(); + it = pageTranslation->itemsTranslation.erase(it); + } else ++it; + } } } -QList ReportTranslation::pagesTranslation() const +QList& ReportTranslation::pagesTranslation() { return m_pagesTranslation; } @@ -139,4 +179,14 @@ PageTranslation::~PageTranslation() } } +void PageTranslation::renameItem(const QString &oldName, const QString &newName) +{ + ItemTranslation* item = itemsTranslation.value(oldName); + if (item){ + itemsTranslation.remove(oldName); + item->itemName = newName; + itemsTranslation[newName] = item; + } +} + } //namespace LimeReport diff --git a/limereport/lrreporttranslation.h b/limereport/lrreporttranslation.h index 3c7b376..c9b82a2 100644 --- a/limereport/lrreporttranslation.h +++ b/limereport/lrreporttranslation.h @@ -31,6 +31,7 @@ struct PropertyTranslation{ struct ItemTranslation{ QString itemName; + bool checked; PropertyTranslation* findProperty(const QString& propertyName); ~ItemTranslation(); QList propertyesTranslation; @@ -38,8 +39,10 @@ struct ItemTranslation{ struct PageTranslation{ QString pageName; + bool checked; ~PageTranslation(); - QHash itemsTranslation; + void renameItem(const QString& oldName, const QString& newName); + QHash itemsTranslation; }; class ReportTranslation{ @@ -49,12 +52,15 @@ public: ReportTranslation(const ReportTranslation& reportTranslation); ~ReportTranslation(); QLocale::Language language() const; - QList pagesTranslation() const; + QList &pagesTranslation(); PageTranslation* createEmptyPageTranslation(); void updatePageTranslation(PageDesignIntf* page); - PageTranslation* findPageTranslation(const QString& page_name); - void createItemTranslation(BaseDesignIntf* item, PageTranslation* pageTranslation); + PageTranslation* findPageTranslation(const QString& pageName); + void renamePage(const QString& oldName, const QString& newName); + void invalidatePages(); + void clearInvalidPages(); private: + void createItemTranslation(BaseDesignIntf* item, PageTranslation* pageTranslation); PageTranslation* createPageTranslation(PageDesignIntf* page); private: QLocale::Language m_language; diff --git a/limereport/translationeditor/translationeditor.cpp b/limereport/translationeditor/translationeditor.cpp index d792d67..c686258 100644 --- a/limereport/translationeditor/translationeditor.cpp +++ b/limereport/translationeditor/translationeditor.cpp @@ -11,7 +11,8 @@ namespace LimeReport { TranslationEditor::TranslationEditor(QWidget *parent) : QWidget(parent), ui(new Ui::TranslationEditor), m_translationContainer(0), - m_currentReportTranslation(0), m_currentPageTranslation(0), m_currentPropertyTranslation(0) + m_currentReportTranslation(0), m_currentPageTranslation(0), + m_currentPropertyTranslation(0), m_translationChanging(false) { ui->setupUi(this); ui->splitter_3->setStretchFactor(1,10); @@ -78,11 +79,10 @@ void TranslationEditor::updateUi() ui->lvLanguages->addItem(QLocale::languageToString(language)); } if (!translations->keys().isEmpty()){ - if (ui->lvLanguages->count()!=0){ + if (ui->lvLanguages->count() != 0){ ui->lvLanguages->item(0)->setSelected(true); activateLanguage(getLanguageByName(ui->lvLanguages->item(0)->text())); } else { - //activateLanguage(QLocale::AnyLanguage); ui->twPages->clear(); ui->tbStrings->setRowCount(0); } @@ -93,7 +93,9 @@ void TranslationEditor::updateUi() void TranslationEditor::activateLanguage(QLocale::Language language) { + m_translationChanging = true; ui->teTranslation->setEnabled(false); + ui->teTranslation->setPlainText(""); ui->cbChecked->setEnabled(false); ui->twPages->clear(); Translations* translations = m_translationContainer->translations(); @@ -113,6 +115,7 @@ void TranslationEditor::activateLanguage(QLocale::Language language) activatePage(m_currentReportTranslation->findPageTranslation(ui->twPages->topLevelItem(0)->text(0))); } } + m_translationChanging = false; } void TranslationEditor::activatePage(PageTranslation* pageTranslation) @@ -171,13 +174,13 @@ void TranslationEditor::activateTranslation(const QString& itemName, const QStri void TranslationEditor::on_tbStrings_itemSelectionChanged() { - if (m_currentPageTranslation) + if (m_currentPageTranslation && !m_translationChanging) activateTranslation(ui->tbStrings->item(ui->tbStrings->currentRow(),1)->text(), ui->tbStrings->item(ui->tbStrings->currentRow(),2)->text()); } void TranslationEditor::on_teTranslation_textChanged() { - if (m_currentPropertyTranslation) + if (m_currentPropertyTranslation && !m_translationChanging) m_currentPropertyTranslation->value = ui->teTranslation->toPlainText(); } @@ -200,16 +203,23 @@ void TranslationEditor::on_tbAddLanguage_clicked() { LanguageSelectDialog dialog; if (dialog.exec()){ + m_translationChanging = true; m_translationContainer->addTranslationLanguage(dialog.getSelectedLanguage()); updateUi(); activateLanguage(dialog.getSelectedLanguage()); + foreach (QListWidgetItem* item, ui->lvLanguages->findItems(QLocale::languageToString(dialog.getSelectedLanguage()), Qt::MatchExactly)){ + item->setSelected(true); + } + m_translationChanging = false; } } void TranslationEditor::on_tbDeleteLanguage_clicked() { + m_translationChanging = true; m_translationContainer->removeTranslationLanguage(m_currentReportTranslation->language()); updateUi(); + m_translationChanging = false; } void TranslationEditor::slotItemChecked() diff --git a/limereport/translationeditor/translationeditor.h b/limereport/translationeditor/translationeditor.h index a270eb4..48fbb0b 100644 --- a/limereport/translationeditor/translationeditor.h +++ b/limereport/translationeditor/translationeditor.h @@ -45,6 +45,7 @@ private: ReportTranslation* m_currentReportTranslation; PageTranslation* m_currentPageTranslation; PropertyTranslation* m_currentPropertyTranslation; + bool m_translationChanging; }; } //namespace LimeReport From 74371c9af755728e68ceebe6c3ed0204eb61bc41 Mon Sep 17 00:00:00 2001 From: fralx Date: Wed, 24 Jul 2019 03:25:17 +0300 Subject: [PATCH 08/40] Update lrsqleditdialog.ui --- limereport/databrowser/lrsqleditdialog.ui | 29 +---------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/limereport/databrowser/lrsqleditdialog.ui b/limereport/databrowser/lrsqleditdialog.ui index 177343d..f0abfbe 100644 --- a/limereport/databrowser/lrsqleditdialog.ui +++ b/limereport/databrowser/lrsqleditdialog.ui @@ -7,7 +7,7 @@ 0 0 422 - 646 + 622 @@ -183,15 +183,6 @@ - - - - 0 - 0 - 0 - - - @@ -329,15 +320,6 @@ - - - - 0 - 0 - 0 - - - @@ -475,15 +457,6 @@ - - - - 0 - 0 - 0 - - - From ae040f58bd702bb3beb62ac6be1deaf302394d73 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 24 Jul 2019 03:32:39 +0300 Subject: [PATCH 09/40] Build fixed --- common.pri | 2 +- limereport/databrowser/lrsqleditdialog.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common.pri b/common.pri index 751d0e8..367a666 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 3 +LIMEREPORT_VERSION_RELEASE = 4 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/databrowser/lrsqleditdialog.ui b/limereport/databrowser/lrsqleditdialog.ui index f0abfbe..4a6ae92 100644 --- a/limereport/databrowser/lrsqleditdialog.ui +++ b/limereport/databrowser/lrsqleditdialog.ui @@ -7,7 +7,7 @@ 0 0 422 - 622 + 624 From 3999dc00bd6ba58046902c46487e73ebda4a61e9 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 30 Jul 2019 14:09:09 +0300 Subject: [PATCH 10/40] Static build has been fixed --- 3rdparty/zint-2.6.1/backend_qt/backend_qt.pro | 3 ++- 3rdparty/zint-2.6.1/backend_qt/qzint_global.h | 4 ++++ common.pri | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro b/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro index 63eadfd..2af6b7d 100644 --- a/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro +++ b/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro @@ -66,7 +66,8 @@ HEADERS += $$PWD/../backend/aztec.h \ $$PWD/../backend/sjis.h \ $$PWD/../backend/stdint_msvc.h \ $$PWD/../backend/zint.h \ - $$PWD/qzint.h + $$PWD/qzint.h \ + $$PWD/qzint_global.h SOURCES += $$PWD/../backend/2of5.c \ $$PWD/../backend/auspost.c \ diff --git a/3rdparty/zint-2.6.1/backend_qt/qzint_global.h b/3rdparty/zint-2.6.1/backend_qt/qzint_global.h index 025b16e..ea46fe2 100644 --- a/3rdparty/zint-2.6.1/backend_qt/qzint_global.h +++ b/3rdparty/zint-2.6.1/backend_qt/qzint_global.h @@ -3,10 +3,14 @@ #include +#ifdef HAVE_STATIC_BUILD +# define QZINTSHARED_EXPORT /**/ +#else #if defined(QZINT_LIBRARY) # define QZINTSHARED_EXPORT Q_DECL_EXPORT #else # define QZINTSHARED_EXPORT Q_DECL_IMPORT #endif +#endif #endif // QZINT_GLOBAL_H diff --git a/common.pri b/common.pri index 367a666..3dcb931 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 4 +LIMEREPORT_VERSION_RELEASE = 5 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" From da5a83b63ca9d3e3f014411a939e002e1e88936d Mon Sep 17 00:00:00 2001 From: compozitor <42234407+compozitor@users.noreply.github.com> Date: Tue, 30 Jul 2019 21:09:28 +0300 Subject: [PATCH 11/40] Update 2_simple_group.lrxml The script does not work with double quotes. --- demo_r1/demo_reports/1.4/2_simple_group.lrxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo_r1/demo_reports/1.4/2_simple_group.lrxml b/demo_r1/demo_reports/1.4/2_simple_group.lrxml index fc47597..5bc3c9f 100644 --- a/demo_r1/demo_reports/1.4/2_simple_group.lrxml +++ b/demo_r1/demo_reports/1.4/2_simple_group.lrxml @@ -681,7 +681,7 @@ - Count: $S{COUNT("DataBand1")} + Count: $S{COUNT(DataBand1)} From 09e95cd63351f7f0138ecd7e542bcac1967f105a Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 31 Jul 2019 00:28:45 +0300 Subject: [PATCH 12/40] Drawing of report items borders has been fixed --- common.pri | 2 +- limereport/lrbanddesignintf.cpp | 23 +++++++++++++++-------- limereport/lrbanddesignintf.h | 6 +++--- limereport/lrbasedesignintf.cpp | 4 +++- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/common.pri b/common.pri index 3dcb931..e76450d 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 5 +LIMEREPORT_VERSION_RELEASE = 6 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 caac574..d8a6bbb 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -356,7 +356,7 @@ void BandDesignIntf::setDataSourceName(const QString &datasource){ m_dataSourceName=datasource; } -void BandDesignIntf::setKeepBottomSpaceOption(bool value){ +void BandDesignIntf::setKeepBottomSpace(bool value){ if (m_keepBottomSpace!=value){ m_keepBottomSpace=value; if (!isLoading()) @@ -584,7 +584,11 @@ void BandDesignIntf::preparePopUpMenu(QMenu &menu) currAction = menu.addAction(tr("Keep bottom space")); currAction->setCheckable(true); - currAction->setChecked(keepBottomSpaceOption()); + currAction->setChecked(keepBottomSpace()); + + currAction = menu.addAction(tr("Keep top space")); + currAction->setCheckable(true); + currAction->setChecked(keepTopSpace()); currAction = menu.addAction(tr("Print if empty")); currAction->setCheckable(true); @@ -603,6 +607,9 @@ void BandDesignIntf::processPopUpAction(QAction *action) if (action->text().compare(tr("Keep bottom space")) == 0){ setProperty("keepBottomSpace",action->isChecked()); } + if (action->text().compare(tr("Keep top space")) == 0){ + setProperty("keepTopSpace",action->isChecked()); + } if (action->text().compare(tr("Print if empty")) == 0){ setProperty("printIfEmpty",action->isChecked()); @@ -1090,10 +1097,10 @@ void BandDesignIntf::setKeepFooterTogether(bool value) void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { - qreal spaceBorder=0; - if (keepBottomSpaceOption()) spaceBorder = bottomSpace(); + qreal spaceBorder = 0; + if (keepBottomSpace()) spaceBorder = bottomSpace(); spaceBorder = spaceBorder > 0 ? spaceBorder : 0; - if (borderLines()!=0){ + if (borderLines() != 0){ spaceBorder += borderLineSize(); } @@ -1105,14 +1112,14 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p arrangeSubItems(pass, dataManager); if (autoHeight()){ if (!keepTopSpace()) { - qreal minTop = findMinTop(); + qreal minTop = findMinTop() - spaceBorder; foreach (BaseDesignIntf* item, childBaseItems()) { item->setY(item->y() - minTop); } } - setHeight(findMaxBottom()+spaceBorder); + setHeight(findMaxBottom() + spaceBorder); } - if ((maxHeight>0)&&(height()>maxHeight)){ + if ((maxHeight > 0) && (height() > maxHeight)){ trimToMaxHeight(maxHeight); setHeight(maxHeight); } diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index a6e09be..3f4f5f7 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -105,7 +105,7 @@ class BandDesignIntf : public ItemsContainerDesignInft Q_OBJECT Q_PROPERTY(bool autoHeight READ autoHeight WRITE setAutoHeight ) Q_PROPERTY(int bandIndex READ bandIndex WRITE setBandIndex DESIGNABLE false ) - Q_PROPERTY(bool keepBottomSpace READ keepBottomSpaceOption WRITE setKeepBottomSpaceOption ) + Q_PROPERTY(bool keepBottomSpace READ keepBottomSpace WRITE setKeepBottomSpace ) Q_PROPERTY(bool keepTopSpace READ keepTopSpace WRITE setKeepTopSpace) Q_PROPERTY(QString parentBand READ parentBandName WRITE setParentBandName DESIGNABLE false ) Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) @@ -162,8 +162,8 @@ public: QString datasourceName(); void setDataSourceName(const QString& datasourceName); - void setKeepBottomSpaceOption(bool value); - bool keepBottomSpaceOption() const {return m_keepBottomSpace;} + void setKeepBottomSpace(bool value); + bool keepBottomSpace() const {return m_keepBottomSpace;} bool keepTopSpace() const; void setKeepTopSpace(bool value); diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 71f2f94..1555aaf 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -97,7 +97,9 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q QRectF BaseDesignIntf::boundingRect() const { - return rect(); + qreal halfpw = pen().widthF() / 2; + halfpw += 2; + return rect().adjusted(-halfpw, -halfpw, halfpw, halfpw); } BaseDesignIntf::~BaseDesignIntf(void) { From afa4bcb9bf95700129e0062e0d4cb62572a4b067 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 7 Aug 2019 12:40:42 +0300 Subject: [PATCH 13/40] If resourcePath contains a simple path to an image file, that image will be shown in design mode. --- limereport/items/lrimageitem.cpp | 15 +++++++++++++++ limereport/items/lrimageitem.h | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/limereport/items/lrimageitem.cpp b/limereport/items/lrimageitem.cpp index c3fce2f..9952479 100644 --- a/limereport/items/lrimageitem.cpp +++ b/limereport/items/lrimageitem.cpp @@ -340,6 +340,21 @@ void ImageItem::setImage(QImage value) } } +QImage ImageItem::image(){ + if (m_picture.isNull() && !resourcePath().isEmpty() && itemMode() == DesignMode){ + QFileInfo fileInfo(m_resourcePath); + if (fileInfo.exists()){ + return QImage(m_resourcePath); + } + } + return m_picture; +} + +void ImageItem::setResourcePath(const QString &value){ + m_resourcePath=value; + update(); +} + ImageItem::Format ImageItem::format() const { return m_format; diff --git a/limereport/items/lrimageitem.h b/limereport/items/lrimageitem.h index 5d474e2..8eb7da7 100644 --- a/limereport/items/lrimageitem.h +++ b/limereport/items/lrimageitem.h @@ -61,8 +61,8 @@ public: ImageItem(QObject *owner, QGraphicsItem *parent); virtual void paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option, QWidget *widget); void setImage(QImage value); - QImage image(){return m_picture;} - void setResourcePath(const QString &value){m_resourcePath=value;} + QImage image(); + void setResourcePath(const QString &value); QString resourcePath() const; QString datasource() const; void setDatasource(const QString &datasource); From 4556e3bc78fb85705cbe841e1b4b408331c411d3 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 7 Aug 2019 21:06:47 +0300 Subject: [PATCH 14/40] Image editor has been added --- common.pri | 2 +- limereport/items/lrimageitem.cpp | 59 ++++++--- limereport/items/lrimageitem.h | 5 +- limereport/items/lrimageitemeditor.cpp | 70 ++++++++++ limereport/items/lrimageitemeditor.h | 37 ++++++ limereport/items/lrimageitemeditor.ui | 170 +++++++++++++++++++++++++ limereport/limereport.pri | 3 + 7 files changed, 328 insertions(+), 18 deletions(-) create mode 100644 limereport/items/lrimageitemeditor.cpp create mode 100644 limereport/items/lrimageitemeditor.h create mode 100644 limereport/items/lrimageitemeditor.ui diff --git a/common.pri b/common.pri index e76450d..cbe3fc1 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 6 +LIMEREPORT_VERSION_RELEASE = 7 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/items/lrimageitem.cpp b/limereport/items/lrimageitem.cpp index 9952479..76542d3 100644 --- a/limereport/items/lrimageitem.cpp +++ b/limereport/items/lrimageitem.cpp @@ -32,6 +32,7 @@ #include "lrglobal.h" #include "lrdatasourcemanager.h" #include "lrpagedesignintf.h" +#include "lrimageitemeditor.h" namespace{ @@ -83,9 +84,15 @@ void ImageItem::loadPictureFromVariant(QVariant& data){ void ImageItem::preparePopUpMenu(QMenu &menu) { + QAction* editAction = menu.addAction(QIcon(":/report/images/edit_pecil2.png"),tr("Edit")); + menu.insertAction(menu.actions().at(0),editAction); + menu.insertSeparator(menu.actions().at(1)); + + menu.addSeparator(); QAction* action = menu.addAction(tr("Watermark")); action->setCheckable(true); action->setChecked(isWatermark()); + } void ImageItem::processPopUpAction(QAction *action) @@ -93,9 +100,26 @@ void ImageItem::processPopUpAction(QAction *action) if (action->text().compare(tr("Watermark")) == 0){ page()->setPropertyToSelectedItems("watermark",action->isChecked()); } + if (action->text().compare(tr("Edit")) == 0){ + this->showEditorDialog(); + } ItemDesignIntf::processPopUpAction(action); } +QImage getFileByResourcePath(QString resourcePath){ + QFileInfo resourceFile(resourcePath); + if (resourceFile.exists()) + return QImage(resourcePath); + return QImage(); +} + +QImage ImageItem::drawImage() +{ + if (image().isNull()) + return getFileByResourcePath(m_resourcePath); + return image(); +} + bool ImageItem::useExternalPainter() const { return m_useExternalPainter; @@ -110,6 +134,13 @@ void ImageItem::setUseExternalPainter(bool value) } } +QWidget *ImageItem::defaultEditor() +{ + ImageItemEditor* editor = new ImageItemEditor(this); + editor->setAttribute(Qt::WA_DeleteOnClose); + return editor; +} + void ImageItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { @@ -220,8 +251,8 @@ void ImageItem::setAutoSize(bool autoSize) if (m_autoSize != autoSize){ m_autoSize = autoSize; if (m_autoSize && !m_picture.isNull()){ - setWidth(image().width()); - setHeight(image().height()); + setWidth(drawImage().width()); + setHeight(drawImage().height()); setPossibleResizeDirectionFlags(Fixed); } else { setPossibleResizeDirectionFlags(AllDirections); @@ -271,10 +302,10 @@ void ImageItem::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option QPointF point = rect().topLeft(); QImage img; - if (m_scale && !image().isNull()){ - img = image().scaled(rect().width(), rect().height(), keepAspectRatio() ? Qt::KeepAspectRatio : Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + if (m_scale && !drawImage().isNull()){ + img = drawImage().scaled(rect().width(), rect().height(), keepAspectRatio() ? Qt::KeepAspectRatio : Qt::IgnoreAspectRatio, Qt::SmoothTransformation); } else { - img = image(); + img = drawImage(); } qreal shiftHeight = rect().height() - img.height(); @@ -328,9 +359,9 @@ void ImageItem::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option void ImageItem::setImage(QImage value) { - if (m_picture!=value){ + if (m_picture != value){ QImage oldValue = m_picture; - m_picture=value; + m_picture = value; if (m_autoSize){ setWidth(m_picture.width()); setHeight(m_picture.height()); @@ -341,18 +372,16 @@ void ImageItem::setImage(QImage value) } QImage ImageItem::image(){ - if (m_picture.isNull() && !resourcePath().isEmpty() && itemMode() == DesignMode){ - QFileInfo fileInfo(m_resourcePath); - if (fileInfo.exists()){ - return QImage(m_resourcePath); - } - } return m_picture; } void ImageItem::setResourcePath(const QString &value){ - m_resourcePath=value; - update(); + if (m_resourcePath != value){ + QString oldValue = m_resourcePath; + m_resourcePath = value; + update(); + notify("resourcePath", oldValue, value); + } } ImageItem::Format ImageItem::format() const diff --git a/limereport/items/lrimageitem.h b/limereport/items/lrimageitem.h index 8eb7da7..587d39d 100644 --- a/limereport/items/lrimageitem.h +++ b/limereport/items/lrimageitem.h @@ -89,6 +89,7 @@ public: bool useExternalPainter() const; void setUseExternalPainter(bool value); + QWidget* defaultEditor(); protected: BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent); void updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight); @@ -97,6 +98,7 @@ protected: void loadPictureFromVariant(QVariant& data); void preparePopUpMenu(QMenu &menu); void processPopUpAction(QAction *action); + QImage drawImage(); private: QImage m_picture; bool m_useExternalPainter; @@ -109,8 +111,7 @@ private: bool m_keepAspectRatio; bool m_center; Format m_format; - QString m_variable; - + QString m_variable; }; } diff --git a/limereport/items/lrimageitemeditor.cpp b/limereport/items/lrimageitemeditor.cpp new file mode 100644 index 0000000..9e34df9 --- /dev/null +++ b/limereport/items/lrimageitemeditor.cpp @@ -0,0 +1,70 @@ +#include "lrimageitemeditor.h" +#include "ui_lrimageitemeditor.h" +#include "lrimageitem.h" + +#include +#include + +ImageItemEditor::ImageItemEditor(LimeReport::ImageItem *item, QWidget *parent) : + QWidget(parent), + ui(new Ui::ImageItemEditor), m_item(item) +{ + ui->setupUi(this); + m_image = QPixmap::fromImage(m_item->image()); + ui->resourcePath->setText(m_item->resourcePath()); + updateImage(); +} + +ImageItemEditor::~ImageItemEditor() +{ + delete ui; +} + +void ImageItemEditor::updateImage() +{ + ui->imageViewer->setPixmap(m_image); + if (m_image.isNull() && !ui->resourcePath->text().isEmpty()){ + if (m_resourcePathImage.isNull()) + m_resourcePathImage = QPixmap(ui->resourcePath->text()); + ui->imageViewer->setPixmap(m_resourcePathImage); + } +} + +void ImageItemEditor::on_tbLoadImage_clicked() +{ + QString fileName = QFileDialog::getOpenFileName(this, tr("Select image file")); + m_image = QPixmap(fileName); + updateImage(); +} + +void ImageItemEditor::on_tbClearImage_clicked() +{ + m_image = QPixmap(); + updateImage(); +} + +void ImageItemEditor::on_buttonBox_accepted() +{ + m_item->setImage(m_image.toImage()); + m_item->setResourcePath(ui->resourcePath->text()); + this->close(); +} + +void ImageItemEditor::on_buttonBox_rejected() +{ + this->close(); +} + +void ImageItemEditor::on_toolButton_clicked() +{ + ui->resourcePath->setText(QFileDialog::getOpenFileName(this, tr("Select image file"))); + m_resourcePathImage = QPixmap(ui->resourcePath->text()); + if (!m_resourcePathImage.isNull() && m_image.isNull()) + ui->imageViewer->setPixmap(m_resourcePathImage); +} + +void ImageItemEditor::on_tbResourcePath_clicked() +{ + ui->resourcePath->setText(""); + updateImage(); +} diff --git a/limereport/items/lrimageitemeditor.h b/limereport/items/lrimageitemeditor.h new file mode 100644 index 0000000..a8cc474 --- /dev/null +++ b/limereport/items/lrimageitemeditor.h @@ -0,0 +1,37 @@ +#ifndef LRIMAGEITEMEDITOR_H +#define LRIMAGEITEMEDITOR_H + +#include + +namespace Ui { +class ImageItemEditor; +} + +namespace LimeReport { +class ImageItem; +} + +class ImageItemEditor : public QWidget +{ + Q_OBJECT + +public: + explicit ImageItemEditor(LimeReport::ImageItem* item, QWidget *parent = nullptr); + ~ImageItemEditor(); +private: + void updateImage(); +private: + Ui::ImageItemEditor *ui; + LimeReport::ImageItem* m_item; + QPixmap m_image; + QPixmap m_resourcePathImage; +private slots: + void on_tbLoadImage_clicked(); + void on_tbClearImage_clicked(); + void on_buttonBox_accepted(); + void on_buttonBox_rejected(); + void on_toolButton_clicked(); + void on_tbResourcePath_clicked(); +}; + +#endif // LRIMAGEITEMEDITOR_H diff --git a/limereport/items/lrimageitemeditor.ui b/limereport/items/lrimageitemeditor.ui new file mode 100644 index 0000000..12152d4 --- /dev/null +++ b/limereport/items/lrimageitemeditor.ui @@ -0,0 +1,170 @@ + + + ImageItemEditor + + + + 0 + 0 + 358 + 403 + + + + + 0 + 0 + + + + Image Item Editor + + + + :/items/images/imageItem3.png:/items/images/imageItem3.png + + + + + + + 0 + 0 + + + + Image + + + + + + + + ... + + + + :/report/images/folder:/report/images/folder + + + true + + + + + + + ... + + + + :/items/clear.png:/items/clear.png + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 0 + 0 + + + + + + + :/images/images/logo.png + + + true + + + + + + + + + + + + Resource path + + + + + + + + + + ... + + + + :/report/images/folder:/report/images/folder + + + true + + + + + + + ... + + + + :/items/clear.png:/items/clear.png + + + true + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + + + + + diff --git a/limereport/limereport.pri b/limereport/limereport.pri index e039138..0918890 100644 --- a/limereport/limereport.pri +++ b/limereport/limereport.pri @@ -36,6 +36,7 @@ SOURCES += \ $$REPORT_PATH/items/editors/lritemsborderseditorwidget.cpp \ $$REPORT_PATH/items/lrsimpletagparser.cpp \ $$REPORT_PATH/items/lrimageitem.cpp \ + $$REPORT_PATH/items/lrimageitemeditor.cpp \ $$REPORT_PATH/items/lrtextitemeditor.cpp \ $$REPORT_PATH/items/lrshapeitem.cpp \ $$REPORT_PATH/items/lrtextitem.cpp \ @@ -108,6 +109,7 @@ HEADERS += \ $$REPORT_PATH/items/lrtextitemeditor.h \ $$REPORT_PATH/items/lrshapeitem.h \ $$REPORT_PATH/items/lrimageitem.h \ + $$REPORT_PATH/items/lrimageitemeditor.h \ $$REPORT_PATH/items/lrsimpletagparser.h \ $$REPORT_PATH/items/lrverticallayout.h \ $$REPORT_PATH/items/lrlayoutmarker.h \ @@ -171,6 +173,7 @@ FORMS += \ $$REPORT_PATH/lraboutdialog.ui \ $$REPORT_PATH/lrsettingdialog.ui \ $$REPORT_PATH/items/lrchartitemeditor.ui \ + $$REPORT_PATH/items/lrimageitemeditor.ui \ $$REPORT_PATH/scripteditor/lrscripteditor.ui RESOURCES += \ From db015827054e4b5342878a66a0f471bc967ec76b Mon Sep 17 00:00:00 2001 From: fralx Date: Thu, 8 Aug 2019 21:48:14 +0300 Subject: [PATCH 15/40] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b1eafc3..aedcaa1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ + # LimeReport v1.5.0 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) ## Official LimeReport web site [http://limereport.ru](http://limereport.ru) -### Features +## Donation [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/arinalex) + +## Features * Multi-platform support * Pure Qt4/Qt5 compatible code From 4eb22ac6dff278a41695864f3adf1f2f20482e31 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 8 Aug 2019 22:02:44 +0300 Subject: [PATCH 16/40] Russian translation has been updated --- translations/limereport_ru.qm | Bin 123356 -> 124649 bytes translations/limereport_ru.ts | 99 ++++++++++++++++++++++------------ 2 files changed, 65 insertions(+), 34 deletions(-) diff --git a/translations/limereport_ru.qm b/translations/limereport_ru.qm index 12ec7530b47fb12eeb917efec1ff743ed4673b60..3a14c7e8b2b1993263ea938faeb5d67aaaa60cc5 100644 GIT binary patch delta 7046 zcmai&30O_}|HnU{d(Sy{zn5f2XEtY6gAxp9hrm;j_VM0`XF{5iAONemER*^Nb zM?^{#%8YdwW8WELOx9ui-}jz*=KnmuXa3Khhu691ocsNL_Rr^gZRH!VS55?3u z^V`}L6^-g2kIE|ir3+E5WFqQBoW6%hVI@AUClbFV;{Gz9=iA8{wPhYIBU1ShpMOWx z)`;(v%Y0NK^A+34=~HE{n=7**k;u|*6E+JX>OPlvxjRvhqr_eUc#`NwO_>im+sTQk zM7`39z0+hKUP(0YHF1sYM1zMAXZ%9+brjJx2p&HG0)0usybxklFPW|lN!UDv=;unA z_nwf&c7qdxNZ7iNxTqM+BKpl}CnsKznT3ULpNn3Qa6}+(LeDK z;VMgC`9gSWCvP}M;z_))AeO}PVxkv#e*QFZ=Q|{=Y)o9gJqS}*B#=~ENL-mtl1UyQ+N~hEs-_;%BM~#n)HB%;yhFWK#pE)!-9P4%2L!?4k=plN?@C7y6zW_$#F-y4Fa z8fk$liRe`xEjZysbh}vQ!wfsQsg@RNa)^B=)3Vbc#7)Q1rZL&Xdk@ei%ZdB8D5S#M z&?xpK9S7-7T{dEwb6g2+NPmh>o>My(!3^hvKAQ3K!K7q5&Sjc&Snl5*4wJRiMZ`OTh|$p4_x%JKKH zQNFWs?q4Ud@fXT@SMYh~ROK2g+Og6{nJqxD@5U($Zag3!-(7h+1ty%nUwL`hZq$oy z%B$Xpg_*CF*AGGSp%<06>kWkk^vc_V9pTC-<$VV?xUQe_*NGv-!J_hASA5=ePWgGH z1twfMLQvMqA+Ft5@Gwn;#ES&a>xk-an+RTKMB)%Xp;I4h*fLxQinv2;y(ENamJ@gX zAVfBWNh==VkG)9TPZUz~P^zz-6Vfgr zwpJbz(k)L{z$Ax+RbfYo9>>|q%cEo-`cYULS&Xbm64riH5I2}1bILuLCC`P-+pma| z5{0anHeM1o)!s|o%1NfByUf!|gq-L2zVj2AQ-fum^bsuE#JWVnOkw*FNK|oC*j^4z z*MF3mRUz#7`Um1;9&SRc zdn6pzL-6Mw!r?P;nb9g7c>w`><_d)>2-rGGre&)|zBv7pa7>HQ=}8?sd4(kW;9Crn zOTv}(*(gBK!rkc}Fy&t1?hF_3SK;o=Qe;VU;o;UCr0H;(@mFNd+8{h@gIGA?FT6qL zTr9^J z#*VYZbBT9|{>rhF8{8Bx6eD^+9I}&7)Dtg%xKBJMMZ6VMh4j28-bz9EW zGtN#vF;Y?oB4*w#l4?&zW!24*YQJ?PUb?nDS#rwT?NS!Z1v-#a+?s+Ej>}e^`87A#mDRujP8S%Wo zxhG!!d^Sc3FS|=zZM-ySdOXpi;nMI3%O!NR$+!R)eJe$|Ps0nfr07|#(O#!Xv6*Nd zL-f+5dQ!wbdYoI!kM2C1N;zDy_93zquPOPCLTXO{MjUI%tzUr47G8(or9zjqPC4 zpG|i1fp4Uo`U%AA3Z)%swGks{rQA=wh`)a&b5Bi~XAVj`cXlBj*i1Tvvj!hKEfw_{ zj93YjibF>bpLUkY0y|<@O_VH^+stSt`=lR+ekT61lVne~K7UBpcSF(*LDDnZ>^C7z zX1qaqvlB7#xs8geUSQ&Br_#>+0}JJ=s-HxV)_SX|w+eN^=Z?xb=K&@rLFL(MKk>pH zD$f~sZ(@q7!y;HFa-q!gl@?XEJ+m>BEmVaqd4O7fOVz(=Fa`=o)v%X7#7j1)#$HC= z<`=1Eq>sid*F=?i9!;dfO_@u2$;{}fS|o*IzCWl+J8=@(Fj|%N*Ck9+&sDbQXLA$P zeg~}Ap@ZsZF=A`vF;)4OV1LU(RfY3%%;i6;u1DS?HZ@gU-wKNiO;$ZSh2z$4DK5NAJAhd0MYQZzUnT%!)(i~cX( zu#d+O0=0E>Z8Dj@tcOH+5lj6I8YX>cUi1 zxQtcm6N8Y3;pyti`=K!1E%n7N2%_Pa)Q?v##yQ}3nJ?Dc$?NK>U-mT}1c5<^2jVoqGu2!jO zRg_44^pvKJo#Ql}_Cmm~b2NSxzu>;3CSWtt_A8?%Fy4rfO{WREeh-t;8_ft?`X0~J zm{&Hyp>)1x)H$T}ku#dnxt5E>3GZ=%=fRWaKj^_m!8@Y`JtHqE3}sAX$O$^`PyjP4Ig){*#{c6`>ZwRI%16WlX=(y zgyuamWL9j^#@(sH96;KH<}h_(jCN^iP2$O(+O>6)Fa__@ZmqQf3V3O^-)%(nbfk92 zak$1bUAy-uGtPeVvvX#tLh!F6bbB7a=bjqf#h+o(T@!TITEOJ> z9A)}%)?L?qCVJgZ&pnGV|973OSNFL~+{8t%?+O#HuB)$>R*FNZT3inf5_u z*$aK0;VC%z#Odq)ehGrT)4R2VM*g4lO(wpBtK9VN`cjN+we&4(*uK9)=F)*O%RB1Z zj=(+8K@x>ie*cy^h=uX`BbUS zz(Pqi4FL~^qaIWmg8mA@uUQuiU7IE0NabhfejV@4h%*dqxgXsx)eu>~AAXR~8e;V} z#u{Q%USrhz%P@K$j%JVZ43k>@ws>2skYEGZYNI zilCZcD7yMR^7po(WEFaX*idHbCBxIFa8;;ec%KXn>*dM}$Tm7;qOkok&{#JgE*TqZ zY_r?;`Jl0VAq1b)$zmK<%?B0lkuheb7ux9y;~X`mgdn#QX) zE}%}dk~zo0_~Zln{G(6CstQ=J;V$C`9b#mStMSwHU*YRfCRJ}w^!dT2T9ru8=v-5y zQcOOlhL~IzA_f)|nOv`e(=0wF_a2aZcAlx@ok<9`8>X176~xW=n9N=^k^fgs<_M(I z{A`)$w5Hfisl-#WOcM`5gIbxUgtwS>d8f&efCbBUo3?Lv#98mIX~*0r_$9<-+STzQ zrsV6UqqPu>s`;i&fHk_U!NI2jnqn2G?%Eg?e9O|QMPW~+V-v~Y}|-gb6BEzTxiUg#0itE zFTJ^q<-hN;O^l|3i{K-83m$^6;4cJ{i_k%6kE^yqAnvupGe6wv^UoI5?Mu7Z)^?E> z|F;e8OFIh7l{8ogwFr0Y3OH8n2Au~63fg~tYHg(AM)~_ie&}j43iYu|kkB0~V>fGlb55(_ z0FQaVN8Z@56SjjX^5fjOx6ZosG&i(1^kJv`!`}Q}>*gvn5VNl|0Y)Nj@<&_6%V{6o2pJShpX7fx~7Pm$rh6;Aa?Llg6zz8h?AZVPWfcUAa#Fu+{ut$syLk>)1_xEn^)gssG)FcXHXysGv^& zSb;lPZTGCE%^ae&TPB$L)4=>eo4Ko+hgpNxvs19_8&70NIMlHDED-AX3c>i~iGRLO zqZ<^Jy=hamJ??nnolbT$;JNkEF5dI+GG*;%xBNMIT(dg+Y|sjIoDdhOX?Cq#{cpWXP^^E!o-> z!XQTWC5*kH8GHXv_nCjM*X@0u``qXIJ^MM|`&Y60POjSA`RKSh=ier;Ew-tHKl1377b%ig6Sjp>JD$M$oNbN;@;b)?rJIMOiYbkM@4^f|N;&ygm z9#QECg^z1m$JT4GkYmK^c$JQ%TtIO zZYS|dGvZm(NxXrLoi{0*-ALgs2ykN+@sD#AZk(YorMto-vq*gYfq2(DlEllzbGDGA z&Lf`EM`2-Cl3HJfV*Vuca)Y6sC=?84>l@zGL*b5alEO=ft4&ha=rBpM6Nz42Au0L* z@%$K)&V<1|)f5VytmI9RB<11$(&r=<${KIQ~cr%J?jk)+K(OkCp}IfiP8O?Szu4lFXE201?;O8k2h^7=4~_}6#Tb6q0w z)J7nDd%eg?o*GWQfBqlQjX>)C4jZ26OMO}|BzDwNANRFHCH<&R=vZjpf%?v|1-DYa z4Y)SHsII)J2(*$Xn-oSH6vn0~OpH>v(M93r;R+9BQh)6Z;#0p+KnGZ^;e8tP4X!wA zM?sQy=iib z$M9V^O{>y$z*U+PJrC)(isn`c8gh^3J`W=vyO8DuWDx(CJ$;k4uI69k_( zoqPa|#`)4|kna6W1!5%f*@iByL_OH|j;^_0A^P(>-E4vwSig*J`>KdLJOUqqMtVN* zDJ(sh%FQ9rIHHvPX$@2UXs>W(Pp-cA6|pXzZ9)2TINNs@h2;TqPcz!HLDY5u{hx zylF0cU;iR+Nr{Kac5-TNSK`n{TzJZvm-j_;T(n;^rs$fjb0f5zjB; zke-jU{K~b0*vn64cNzCPJykX62E|V8P}z_4C)Qq6ITY9sOI=hRpOA)Iyj9*WeTmOx zn^nCx6v4E4s{X-`iT>570@jQrZv2ZXa1wmgf4(X-a4{<0JyqyW*yy&GD(q=2agSit ztcB3HZ6nnj=^`xRs*21#O}rpNwPp(nT6lmeehN77Cxz$BRU4eI6Nhb8Z8rE3efpw0 zlqFWY)55uiwhjL-yML**0!9vJ} zU^3I^nZlSFSm1zz5IO-}Z|x#s{2P2BtiAB_At(5>Qke1t8y&tPEd8E`jphi;Z{T{j zldw&MKyzLQ$M2L8Ps|t2MZ$9P+X^MY2T>PB3O8L51LkQ$=}~ALG)j12_djT!C_ET$ zOYHZr@T7VZAi=gSo{R≥+~OLpi!B)*9ktS3F5xx zsC0oB#RH3=u}~%+EbvB_l!-@zHRpLhiG(68dRulB@S`~4}`m!}Y? z^^)RzT!|i>km8O%CT>|EZH${qJo$*UX(!grtB{gc=Mr&eDKjw#!QW=3lzDX^Mz4d? zvE}GWor2D=fi01}M_h+G5m0XhEUak7xbt^f$MArBqW-2OV&9|;(W>1w|dp1g{=Cxe= zUt8kXwsO75Jk*0_aznw5=*=#3)Xa$R|kPQUpa0R3fsXjIc|YjKtEn0$G6uKA9^EiS_EJHFi5V- zZ|)u?C!ez=`VuQ|R@K2^Q7CV@3qeDFk+-|Uw6_LZ$%h)qY4szBH%yiH#MOq6z2&{% z`az%wg?rB_EO3p^%f0gKBS7mG3^;;>I9)zG9-^(wnX1qzp|F}~AXJ1upB&qoW&Jb@mt91+CW2o(- z{vl691vRVf)}uZ+yQv$dm0_rjQaiWF#3a;8ZFY{r7bkyFd#r+KhB+v_;H&O=Xfe{o zK|Q#6H*~pa>fm>7#4!!k6HAb{88g&T2@{BIR;gnyqi49DP#Aqd;kr@kRkAqPhS)m72YV>YWZt7ARanr3x&4uWcQ2X)aQDZXI8+AJv6<$XAy5s z(fGH-M#2Sf0ot~p@jr}qFE+N4cbgw;MwsJ?UJuj!Rxk^b$wtizFGO*@H=5OvWhkXP zG^-cDWIxx_td51r69P0Fg6k6de$Z_AYYCc7M@@3fC*pn@&6ZRZvG)bd)(~vi^Qpq3 z9L=_>>-hQ#x4hM)VLqVJO`6|hkX`2IZ#3z9*J3ovs{9w7+nrmGVJEQt*p0A6=Fk7hb zRVOQXgG%#mU>L@D7tOzKx?$3qWTlxZ_iFzAfQ5#9)O^A$&;8$MKJAAKT83x^%?{%6 z(b~ocCVFVHlAFeB9p)fZNU4MavUyr^66%cxSCw@m*X;YrE`3x(-d# z`b@LIc)nQcTlyF?Ww3TkRob4Yp$%Kt0Qv8HS3CY9^4a36ov`;B@wC|>g0kBk?N1sN z(Lb5m$=@Kr;~Q3Tvt8QRD<=~-`l6lv+Ld_O1#RS-8Zi9`?b16#iC2%&ri8$CcZO?I z)~3ON*R_^>DAZuPHg`@ry5>@C(Zy;APNVh@qZvo^?Y5J z8#HkltP9&~izt4pFf$K?#y#6BEV9!@w1jDo-qx*&sfj`3fG)Z2EV!(-Zda|fC}f*- z>5uGjKB&~~ISp4Bp6d?(8Acq;x~wE*L&N$y^O2)}V-yl~$HWXQv`&{DGZVr1Ug612 zx-(<5;EL(G{O2evs^tpbJ+qQmf6^8C>5(0ibVWm8F}oAGqA*-HYN{}^lkUPr)Qi~L zy5ge{=;s{W<+|HYg1_i)-*iTM?_$HYiK_P`}F(6;G!-;|JTMC+#~S8%(n)Q;|ozxk`12iOHfFT8a$8rq4XXxbl-9a zKPdDz_`4$5G|`|xv04Cw!7y+Ncn*YM8b@$HvD^hb1*RH;SEr)er5Z*La)Cuk4WY%o zQD=UvBJ%%yykT-tIMT$yFlT){YWaJ^g5@)bQ*sS!eL~T#$_?v23`E7sGHm>sjXoZ0 z*!Ue|`Jej@TLK_xT?fPOyXK%E{bk7feF?~5^mt>Jve7tdxf^}IcZZAm8+){vh2H~?8+(=Fd-IGa z3x*nx55I|^x?ntWa~bk?gfVwLdVp$~!WDy!FJ8b^zA45}bD&`zSB0HB+Em|)f_8hO zO{^VgS*wg0f z#Cz!bi8eRyT*WDPt-`2PHh+CaUoYEe^Pw0PY~XJ5S&tY=a$oO{@8a_j@iqgt6dKAZvHhndEuu7!yzO<^uI zQ2{eeVF5^|rA-u`n{Nu=5rZ>eL(}x5(7?8(DdJyDw>-&Yj=+NXO-$+Ow)kymu4&KG zztChBn)Y|RhEw!VQ+6!`qgZY#IO&M{CeyifOYj>|?45W6=fgy{(^i6@5ex z(IW$gBUMJicTvagN$pp14a)-!Uv)_O@+-GUy3m@JHft(27TaMdS3KHD93XZT`(Yt3 zu^s;R#2sIJ;$a!*#QpV_mmT<%u6;YP5x(n#moqkV#Wu<_9{-6`^`x)$UPtTG&K7ky z?k`(5_GUFFo$kwRE%AMMoXRrUpI=KtbFopQ&`_+zpG6zN|Eh#K_-4Nu+{ofQoBx!O@_KNfWz;-2s@cOb zaS@NHmSFp}q1IXKE4GKc?UJHWxrwEAA~)04?k-mU|BwF@-xij$0;eP3QUvyXqS(m(tl=1H+!_%Qfx2MNg~I@L%+V2|9o-FiНазвание ряда + + ImageItemEditor + + Image Item Editor + Редакор изображения + + + Image + Изображение + + + ... + ... + + + Resource path + Путь к русурсам + + + Select image file + Выбрать файл изображения + + LRVariableDialog @@ -392,6 +415,10 @@ p, li { white-space: pre-wrap; } Copy Копировать + + Keep top space + Сохранять отступ сверху + LimeReport::BaseDesignIntf @@ -433,7 +460,7 @@ p, li { white-space: pre-wrap; } Lock item geometry - Блокировать изменения геометрии + Заблокировать геометрию элемента @@ -1003,11 +1030,11 @@ p, li { white-space: pre-wrap; } Scale - Масштабировать + Масштаб Split - Разделять на части + Разделить @@ -1130,6 +1157,10 @@ p, li { white-space: pre-wrap; } Watermark Водный знак + + Edit + Правка + LimeReport::ItemLocationPropItem @@ -1249,7 +1280,7 @@ p, li { white-space: pre-wrap; } Translate properties - Переводить имена свойств + Свойства перевода @@ -1329,10 +1360,6 @@ p, li { white-space: pre-wrap; } Report Отчет - - toolBar - Панель инструментов - Print Печать @@ -1433,10 +1460,6 @@ p, li { white-space: pre-wrap; } Show toolbar Показать панель инструментов - - toolBar_2 - Редактирование - InsertTextItem Вставить текстовый элемент @@ -1457,6 +1480,14 @@ p, li { white-space: pre-wrap; } Del Удалить + + MainToolBar + Основная панель инструментов + + + EditModeTools + Панель инструментов редактирования + LimeReport::ProxyHolder @@ -1881,7 +1912,7 @@ p, li { white-space: pre-wrap; } setPageSizeToPrinter - Отправить параметры страницы в принтер + Оправитьпараметры страницы в принтер fillInSecondPass @@ -1961,11 +1992,11 @@ p, li { white-space: pre-wrap; } option3 - + Опция 3 units - Единицы измерения + Еденицы измерения geometryLocked @@ -1973,7 +2004,7 @@ p, li { white-space: pre-wrap; } printBehavior - Режим печати + Поведение при печати @@ -2301,15 +2332,15 @@ p, li { white-space: pre-wrap; } Lock selected items - Заблокировать выбранные элементы + Заблокировать выделенные элементы Unlock selected items - Разблокировать выбранные элементы + Разблокировать выделенные элементы Select one level items - Выбрать все элементы одного уровня + Выделить элементы одного уровня @@ -2482,7 +2513,7 @@ This preview is no longer valid. CSV - + CSV Separator @@ -2494,7 +2525,7 @@ This preview is no longer valid. Use first row as header - Первая строка как заголовок + Использовать первую строку в качестве заголовка @@ -2729,7 +2760,7 @@ This preview is no longer valid. Report units - Единицы измерения + Еденицы измерения @@ -3146,18 +3177,18 @@ This preview is no longer valid. Export to PDF Экспортировать в PDF + + Dark + Темная + + + Light + Светаля + Default По умолчанию - - margin - Поля - - - '' - - Millimeters Миллиметры @@ -3167,12 +3198,12 @@ This preview is no longer valid. Дюймы - Dark - Темная + margin + Поля - Light - Светлая + '' + '' From 6c44ce86d2c280fd1027e669b27c55b6cb395da2 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Sat, 10 Aug 2019 18:41:07 -0300 Subject: [PATCH 17/40] Update .travis.yml --- .travis.yml | 559 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 540 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 39dedbc..f879261 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,548 @@ -language: cpp +matrix: + include: + - env: Qt4.8.5_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + packages: + - qt4-default + + script: + - qmake -r limereport.pro + - make + - make check -compiler: - - gcc + - env: Qt4.8.5_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + packages: + - qt4-default + + script: + - qmake -r limereport.pro + - make + - make check + + - env: Qt5.1.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt511-trusty' + packages: + - qt51base + - qt51script + - qt51tools + + script: + - source /opt/qt51/bin/qt51-env.sh + - /opt/qt51/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.1.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt511-trusty' + packages: + - qt51base + - qt51script + - qt51tools + + script: + - source /opt/qt51/bin/qt51-env.sh + - /opt/qt51/bin/qmake -r limereport.pro + - make + - make check -sudo: required -dist: trusty + - env: Qt5.2.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt521-trusty' + packages: + - qt52base + - qt52script + - qt52tools + + script: + - source /opt/qt52/bin/qt52-env.sh + - /opt/qt52/bin/qmake -r limereport.pro + - make + - make check -env: - - QT_BASE=56 + - env: Qt5.2.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt521-trusty' + packages: + - qt52base + - qt52script + - qt52tools + + script: + - source /opt/qt52/bin/qt52-env.sh + - /opt/qt52/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.3.2_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt532-trusty' + packages: + - qt53base + - qt53script + - qt53tools + + script: + - source /opt/qt53/bin/qt53-env.sh + - /opt/qt53/bin/qmake -r limereport.pro + - make + - make check -before_install: - - if [ "$QT_BASE" = "56" ]; then sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y; fi - - sudo apt-get update -qq + - env: Qt5.3.2_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt532-trusty' + packages: + - qt53base + - qt53script + - qt53tools + + script: + - source /opt/qt53/bin/qt53-env.sh + - /opt/qt53/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.4.2_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt542-trusty' + packages: + - qt54base + - qt54script + - qt54tools + + script: + - source /opt/qt54/bin/qt54-env.sh + - /opt/qt54/bin/qmake -r limereport.pro + - make + - make check -install: - - if [ "$QT_BASE" = "56" ]; then sudo apt-get install -qq qt56base qt56script qt56tools ; source /opt/qt56/bin/qt56-env.sh; fi - + - env: Qt5.4.2_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt542-trusty' + packages: + - qt54base + - qt54script + - qt54tools + + script: + - source /opt/qt54/bin/qt54-env.sh + - /opt/qt54/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.5.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt551-trusty' + packages: + - qt55base + - qt55script + - qt55tools + + script: + - source /opt/qt55/bin/qt55-env.sh + - /opt/qt55/bin/qmake -r limereport.pro + - make + - make check -script: - - qmake -r limereport.pro - - make - - make check + - env: Qt5.5.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt551-trusty' + packages: + - qt55base + - qt55script + - qt55tools + + script: + - source /opt/qt55/bin/qt55-env.sh + - /opt/qt55/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.6.3_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt563-trusty' + packages: + - qt56base + - qt56script + - qt56tools + + script: + - source /opt/qt56/bin/qt56-env.sh + - /opt/qt56/bin/qmake -r limereport.pro + - make + - make check + - env: Qt5.6.3_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt563-trusty' + packages: + - qt56base + - qt56script + - qt56tools + + script: + - source /opt/qt56/bin/qt56-env.sh + - /opt/qt56/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.7.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt571-trusty' + packages: + - qt57base + - qt57script + - qt57tools + + script: + - source /opt/qt57/bin/qt57-env.sh + - /opt/qt57/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.7.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt571-trusty' + packages: + - qt57base + - qt57script + - qt57tools + + script: + - source /opt/qt57/bin/qt57-env.sh + - /opt/qt57/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.8.0_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt58-trusty' + packages: + - qt58base + - qt58script + - qt58tools + + script: + - source /opt/qt58/bin/qt58-env.sh + - /opt/qt58/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.8.0_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt58-trusty' + packages: + - qt58base + - qt58script + - qt58tools + + script: + - source /opt/qt58/bin/qt58-env.sh + - /opt/qt58/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.9.7_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt597-trusty' + packages: + - qt59base + - qt59script + - qt59tools + + script: + - source /opt/qt59/bin/qt59-env.sh + - /opt/qt59/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.9.7_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt597-trusty' + packages: + - qt59base + - qt59script + - qt59tools + + script: + - source /opt/qt59/bin/qt59-env.sh + - /opt/qt59/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.10.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt-5.10.1-trusty' + packages: + - qt510base + - qt510script + - qt510tools + + script: + - source /opt/qt510/bin/qt510-env.sh + - /opt/qt510/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.10.1_Ubuntu_14.04 + os: linux + dist: trusty + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt-5.10.1-trusty' + packages: + - qt510base + - qt510script + - qt510tools + + script: + - source /opt/qt510/bin/qt510-env.sh + - /opt/qt510/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.11.3_Ubuntu_18.04 + os: linux + dist: bionic + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt-5.11.3-bionic' + packages: + - qt511base + - qt511script + - qt511tools + - mesa-common-dev + - libgl1-mesa-dev + + script: + - source /opt/qt511/bin/qt511-env.sh + - /opt/qt511/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.11.3_Ubuntu_18.04 + os: linux + dist: bionic + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt-5.11.3-bionic' + packages: + - qt511base + - qt511script + - qt511tools + - mesa-common-dev + - libgl1-mesa-dev + + script: + - source /opt/qt511/bin/qt511-env.sh + - /opt/qt511/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.12.3_Ubuntu_18.04 + os: linux + dist: bionic + language: cpp + compiler: gcc + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic' + packages: + - qt512base + - qt512script + - qt512tools + - mesa-common-dev + - libgl1-mesa-dev + + script: + - source /opt/qt512/bin/qt512-env.sh + - /opt/qt512/bin/qmake -r limereport.pro + - make + - make check + + - env: Qt5.12.3_Ubuntu_18.04 + os: linux + dist: bionic + language: cpp + compiler: clang + cache: ccache + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic' + packages: + - qt512base + - qt512script + - qt512tools + - mesa-common-dev + - libgl1-mesa-dev + + script: + - source /opt/qt512/bin/qt512-env.sh + - /opt/qt512/bin/qmake -r limereport.pro + - make + - make check + notifications: - email: false - + email: false \ No newline at end of file From c549035c7638f844ab86b944d5d6d687022cee38 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Sat, 10 Aug 2019 18:45:27 -0300 Subject: [PATCH 18/40] Fix compilation Qt4 still have one remaining compiler error --- limereport.pro | 7 ++++++- limereport/exporters/lrpdfexporter.h | 2 +- limereport/items/lrimageitemeditor.h | 2 +- limereport/lrbanddesignintf.cpp | 2 +- limereport/lrreportdesignwidget.h | 4 ++-- limereport/lrreportengine.cpp | 4 ++-- limereport/lrscriptenginemanager.cpp | 2 +- limereport/objectinspector/lrobjectpropitem.h | 5 ++++- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/limereport.pro b/limereport.pro index 9e33bcc..9bc801f 100644 --- a/limereport.pro +++ b/limereport.pro @@ -16,9 +16,14 @@ SUBDIRS += \ limereport \ demo_r1 \ demo_r2 \ - console \ designer +greaterThan(QT_MAJOR_VERSION, 4){ +greaterThan(QT_MINOR_VERSION, 1){ + SUBDIRS += console + } +} + !contains(CONFIG, embedded_designer){ !contains(CONFIG, static_build){ SUBDIRS += designer_plugin diff --git a/limereport/exporters/lrpdfexporter.h b/limereport/exporters/lrpdfexporter.h index 225c80b..d758ff1 100644 --- a/limereport/exporters/lrpdfexporter.h +++ b/limereport/exporters/lrpdfexporter.h @@ -11,7 +11,7 @@ class PDFExporter : public QObject, public ReportExporterInterface { Q_OBJECT public: - explicit PDFExporter(ReportEnginePrivate *parent = nullptr); + explicit PDFExporter(ReportEnginePrivate *parent = NULL); // ReportExporterInterface interface bool exportPages(ReportPages pages, const QString &fileName, const QMap ¶ms); QString exporterName() diff --git a/limereport/items/lrimageitemeditor.h b/limereport/items/lrimageitemeditor.h index a8cc474..551baae 100644 --- a/limereport/items/lrimageitemeditor.h +++ b/limereport/items/lrimageitemeditor.h @@ -16,7 +16,7 @@ class ImageItemEditor : public QWidget Q_OBJECT public: - explicit ImageItemEditor(LimeReport::ImageItem* item, QWidget *parent = nullptr); + explicit ImageItemEditor(LimeReport::ImageItem* item, QWidget *parent = NULL); ~ImageItemEditor(); private: void updateImage(); diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index d8a6bbb..1690bbc 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -176,7 +176,7 @@ BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, Q if (parentItem) setWidth(parentItem->width()); } - setBackgroundMode(BGMode::TransparentMode); + setBackgroundMode(BaseDesignIntf::TransparentMode); setFillTransparentInDesignMode(false); setHeight(100); setFixedPos(true); diff --git a/limereport/lrreportdesignwidget.h b/limereport/lrreportdesignwidget.h index 4b7248e..ef3b81b 100644 --- a/limereport/lrreportdesignwidget.h +++ b/limereport/lrreportdesignwidget.h @@ -82,12 +82,12 @@ private: class PageView: public QGraphicsView{ public: - PageView(QWidget *parent = nullptr): QGraphicsView(parent), + PageView(QWidget *parent = NULL): QGraphicsView(parent), m_horizontalRuller(0), m_verticalRuller(0) { setViewportMargins(20,20,0,0); } - PageView(QGraphicsScene *scene, QWidget *parent = nullptr): + PageView(QGraphicsScene *scene, QWidget *parent = NULL): QGraphicsView(scene, parent), m_horizontalRuller(0), m_verticalRuller(0) { diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index c07cff4..8a624e2 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -299,7 +299,7 @@ void ReportEnginePrivate::printReport(ItemsReaderIntf::Ptr reader, QPrinter& pri void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer) { int currenPage = 1; - QMap> printProcessors; + QMap > printProcessors; printProcessors.insert("default",QSharedPointer(new PrintProcessor(&printer))); foreach(PageItemDesignIntf::Ptr page, pages){ if ( @@ -320,7 +320,7 @@ void ReportEnginePrivate::printReport(ReportPages pages, QMap> printProcessors; + QMap > printProcessors; for (int i = 0; i < printers.keys().count(); ++i) { printProcessors.insert(printers.keys()[i],QSharedPointer(new PrintProcessor(printers[printers.keys()[i]]))); } diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index cb6e219..f126a4c 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -1930,7 +1930,7 @@ bool DatasourceFunctions::isEOF(const QString &datasourceName) bool DatasourceFunctions::invalidate(const QString& datasourceName) { if (m_dataManager && m_dataManager->dataSource(datasourceName)){ - m_dataManager->dataSourceHolder(datasourceName)->invalidate(IDataSource::DatasourceMode::RENDER_MODE); + m_dataManager->dataSourceHolder(datasourceName)->invalidate(IDataSource::RENDER_MODE); return true; } return false; diff --git a/limereport/objectinspector/lrobjectpropitem.h b/limereport/objectinspector/lrobjectpropitem.h index 46392fc..f765213 100644 --- a/limereport/objectinspector/lrobjectpropitem.h +++ b/limereport/objectinspector/lrobjectpropitem.h @@ -99,7 +99,7 @@ namespace LimeReport{ #endif private: bool m_valid; - void invalidate(){m_object=0; m_objects=0; m_valid = false; m_name = ""; m_value=QVariant(), m_isClass=false;} + void invalidate(){m_object=0; m_objects=0; m_valid = false; m_name = ""; m_value=QVariant(); m_isClass=false;} protected: void beginChangeValue(){ m_changingValue = true; } @@ -140,4 +140,7 @@ namespace LimeReport{ }; } + +Q_DECLARE_METATYPE(LimeReport::ObjectPropItem*) + #endif // LROBJECTPROPITEM_H From fa795fe3ab922320b13b0a8bd11ba53106021b49 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sun, 11 Aug 2019 12:48:16 +0300 Subject: [PATCH 19/40] Qt4 build has been fixed --- common.pri | 2 +- limereport/lrbasedesignintf.h | 4 +++- limereport/lrpagedesignintf.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common.pri b/common.pri index cbe3fc1..64fa9c2 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 7 +LIMEREPORT_VERSION_RELEASE = 9 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 40c4761..b7fbbbb 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -262,7 +262,7 @@ public: QString itemTypeName() const; void setItemTypeName(const QString &itemTypeName); - void emitObjectNamePropertyChanged(const QString& oldName, const QString& newName); + int borderLineSize() const; void setBorderLineSize(int value); void showEditorDialog(); @@ -303,7 +303,9 @@ public: bool fillTransparentInDesignMode() const; void setFillTransparentInDesignMode(bool fillTransparentInDesignMode); + void emitPosChanged(QPointF oldPos, QPointF newPos); + void emitObjectNamePropertyChanged(const QString& oldName, const QString& newName); bool isGeometryLocked() const; void setGeometryLocked(bool itemLocked); diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index bc81b94..89a18f4 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -2136,7 +2136,7 @@ bool PosChangedCommand::doIt() if (reportItem && (reportItem->pos() != m_newPos[i].pos)){ QPointF oldValue = reportItem->pos(); reportItem->setPos(m_newPos[i].pos); - emit reportItem->posChanged(reportItem, oldValue, reportItem->pos()); + reportItem->emitPosChanged(oldValue, reportItem->pos()); } } From fde44e67c17d0470db991087d1448f9fb55e2c04 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Mon, 9 Sep 2019 21:25:08 +0300 Subject: [PATCH 20/40] Nested scripts have been fixed --- common.pri | 2 +- include/lrglobal.h | 4 ++ limereport/items/lrabstractlayout.h | 2 +- limereport/lrglobal.h | 4 ++ limereport/lrscriptenginemanager.cpp | 85 +++++++++++++++------------- limereport/lrscriptenginemanager.h | 74 ++++++++++++++---------- 6 files changed, 99 insertions(+), 72 deletions(-) diff --git a/common.pri b/common.pri index 64fa9c2..20eedaf 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 9 +LIMEREPORT_VERSION_RELEASE = 10 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/include/lrglobal.h b/include/lrglobal.h index da6ab47..3ba2b02 100644 --- a/include/lrglobal.h +++ b/include/lrglobal.h @@ -91,6 +91,10 @@ namespace Const{ const QString EOW("~!@#$%^&*()+{}|:\"<>?,/;'[]\\-="); const int DEFAULT_TAB_INDENTION = 4; const int DOCKWIDGET_MARGINS = 4; + + const char SCRIPT_SIGN = 'S'; + const char FIELD_SIGN = 'D'; + const char VARIABLE_SIGN = 'V'; } QString extractClassName(QString className); QString escapeSimbols(const QString& value); diff --git a/limereport/items/lrabstractlayout.h b/limereport/items/lrabstractlayout.h index 1324ff7..07a1d9f 100644 --- a/limereport/items/lrabstractlayout.h +++ b/limereport/items/lrabstractlayout.h @@ -34,7 +34,7 @@ public: int childrenCount(); int layoutSpacing() const; void setLayoutSpacing(int layoutSpacing); - qreal layoutSpacingMM(){ return m_layoutSpacing * unitFactor();} + qreal layoutSpacingMM(){ return m_layoutSpacing * Const::mmFACTOR;} protected: void beforeDelete(); void childAddedEvent(BaseDesignIntf *child); diff --git a/limereport/lrglobal.h b/limereport/lrglobal.h index da6ab47..3ba2b02 100644 --- a/limereport/lrglobal.h +++ b/limereport/lrglobal.h @@ -91,6 +91,10 @@ namespace Const{ const QString EOW("~!@#$%^&*()+{}|:\"<>?,/;'[]\\-="); const int DEFAULT_TAB_INDENTION = 4; const int DOCKWIDGET_MARGINS = 4; + + const char SCRIPT_SIGN = 'S'; + const char FIELD_SIGN = 'D'; + const char VARIABLE_SIGN = 'V'; } QString extractClassName(QString className); QString escapeSimbols(const QString& value); diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index f126a4c..05dba0a 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -465,15 +465,13 @@ QString ScriptEngineManager::expandScripts(QString context, QVariant& varValue, if (context.contains(rx)){ - if (ScriptEngineManager::instance().dataManager()!=dataManager()) + if (ScriptEngineManager::instance().dataManager() != dataManager()) ScriptEngineManager::instance().setDataManager(dataManager()); ScriptEngineType* se = ScriptEngineManager::instance().scriptEngine(); if (reportItem){ - ScriptValueType svThis; - #ifdef USE_QJSENGINE svThis = getJSValue(*se, reportItem); se->globalObject().setProperty("THIS",svThis); @@ -490,29 +488,37 @@ QString ScriptEngineManager::expandScripts(QString context, QVariant& varValue, ScriptExtractor scriptExtractor(context); if (scriptExtractor.parse()){ - for(int i=0; ievaluate(scriptBody); -#ifdef USE_QJSENGINE - if (!value.isError()){ - varValue = value.toVariant(); - context.replace(scriptExtractor.scriptAt(i),value.toString()); - } else { - context.replace(scriptExtractor.scriptAt(i),value.toString()); - } -#else - if (!se->hasUncaughtException()) { - varValue = value.toVariant(); - context.replace(scriptExtractor.scriptAt(i),value.toString()); - } else { - context.replace(scriptExtractor.scriptAt(i),se->uncaughtException().toString()); - } -#endif - } + context = replaceScripts(context, varValue, reportItem, se, scriptExtractor.scriptTree()); } - } + } + return context; +} + +QString ScriptEngineManager::replaceScripts(QString context, QVariant &varValue, QObject *reportItem, ScriptEngineType* se, ScriptNode *scriptTree) +{ + foreach(ScriptNode* item, scriptTree->children()){ + QString scriptBody = expandDataFields(item->body(), EscapeSymbols, varValue, reportItem); + if (item->children().size() > 0) + scriptBody = replaceScripts(scriptBody, varValue, reportItem, se, item); + scriptBody = expandUserVariables(scriptBody, FirstPass, EscapeSymbols, varValue); + ScriptValueType value = se->evaluate(scriptBody); +#ifdef USE_QJSENGINE + if (!value.isError()){ + varValue = value.toVariant(); + context.replace(item->script(), value.toString()); + } else { + context.replace(item->script(), value.toString()); + } +#else + if (!se->hasUncaughtException()) { + varValue = value.toVariant(); + context.replace(scriptTree->children()[i]->script(), value.toString()); + } else { + context.replace(scriptTree->children()[i]->script(), se->uncaughtException().toString()); + } +#endif + } return context; } @@ -530,7 +536,7 @@ QVariant ScriptEngineManager::evaluateScript(const QString& script){ ScriptExtractor scriptExtractor(script); if (scriptExtractor.parse()){ - QString scriptBody = expandDataFields(scriptExtractor.bodyAt(0),EscapeSymbols, varValue, 0); + QString scriptBody = expandDataFields(scriptExtractor.scriptTree()[0].body(), EscapeSymbols, varValue, 0); scriptBody = expandUserVariables(scriptBody, FirstPass, EscapeSymbols, varValue); ScriptValueType value = se->evaluate(scriptBody); #ifdef USE_QJSENGINE @@ -976,12 +982,11 @@ ScriptEngineManager::ScriptEngineManager() bool ScriptExtractor::parse() { int currentPos = 0; - parse(currentPos,None); - return m_scriptsBody.count()>0; - + parse(currentPos, None, m_scriptTree); + return m_scriptTree->children().count() > 0; } -bool ScriptExtractor::parse(int &curPos,const State& state) +bool ScriptExtractor::parse(int &curPos, const State& state, ScriptNode* scriptNode) { while (curPoscreateChildNode()); if (isStartFieldLexem(curPos) || isStartVariableLexem(curPos)) skipField(curPos); } @@ -1008,13 +1013,13 @@ bool ScriptExtractor::parse(int &curPos,const State& state) return false; } -void ScriptExtractor::extractScript(int &curPos, const QString& startStr) +void ScriptExtractor::extractScript(int &curPos, const QString& startStr, ScriptNode* scriptNode) { int startPos = curPos; - if (extractBracket(curPos)){ + if (extractBracket(curPos, scriptNode)){ QString scriptBody = substring(m_context,startPos+1,curPos); - m_scriptsBody.push_back(scriptBody); - m_scriptsStartLex.push_back(startStr+'{'); + scriptNode->setBody(scriptBody); + scriptNode->setStartLex(startStr+'{'); } } @@ -1028,10 +1033,10 @@ void ScriptExtractor::skipField(int &curPos){ } } -bool ScriptExtractor::extractBracket(int &curPos) +bool ScriptExtractor::extractBracket(int &curPos, ScriptNode* scriptNode) { curPos++; - return parse(curPos,OpenBracketFound); + return parse(curPos,OpenBracketFound, scriptNode); } bool ScriptExtractor::isStartLexem(int& curPos, QChar value){ @@ -1064,16 +1069,16 @@ bool ScriptExtractor::isStartLexem(int& curPos, QChar value){ bool ScriptExtractor::isStartScriptLexem(int& curPos) { - return isStartLexem(curPos, SCRIPT_SIGN); + return isStartLexem(curPos, Const::SCRIPT_SIGN); } bool ScriptExtractor::isStartFieldLexem(int& curPos){ - return isStartLexem(curPos, FIELD_SIGN); + return isStartLexem(curPos, Const::FIELD_SIGN); } bool ScriptExtractor::isStartVariableLexem(int &curPos) { - return isStartLexem(curPos, VARIABLE_SIGN); + return isStartLexem(curPos, Const::VARIABLE_SIGN); } diff --git a/limereport/lrscriptenginemanager.h b/limereport/lrscriptenginemanager.h index f59405c..784253d 100644 --- a/limereport/lrscriptenginemanager.h +++ b/limereport/lrscriptenginemanager.h @@ -396,6 +396,47 @@ private: QMap m_wrappersFactory; }; +class ScriptNode{ +public: + QString body(){return m_body;} + void setBody(const QString& body){ m_body = body;} + void setStartLex(const QString startLex){ m_startLex = startLex;} + QString script(){return m_startLex + m_body + '}';} + ScriptNode* createChildNode(){ + ScriptNode* result = new ScriptNode(); + m_children.append(result); + return result; + } + QVector children() const {return m_children;} +private: + QVector m_children; + QString m_body; + QString m_startLex; +}; + +class ScriptExtractor +{ +public: + enum State{None,BuksFound,SFound,StartScriptFound,OpenBracketFound,CloseBracketFound,DFound,VFound, SignFound}; + explicit ScriptExtractor(const QString& value): + m_context(value), m_scriptTree(new ScriptNode()){} + bool parse(); + ScriptNode* scriptTree(){return m_scriptTree;} +private: + bool isStartLexem(int &curPos, QChar value); + bool parse(int& curPos, const State &state, ScriptNode *scriptNode); + void skipField(int &curPos); + void extractScript(int& curPos, const QString &startStr, ScriptNode *scriptNode); + bool extractBracket(int& curPos, ScriptNode *scriptNode); + bool isStartScriptLexem(int &curPos); + bool isStartFieldLexem(int &curPos); + bool isStartVariableLexem(int &curPos); + QString substring(const QString& value, int start, int end); +private: + QString m_context; + ScriptNode* m_scriptTree; +}; + class ScriptEngineManager : public QObject, public Singleton, public IScriptEngineManager { Q_OBJECT @@ -423,6 +464,9 @@ public: QString expandUserVariables(QString context, RenderPass pass, ExpandType expandType, QVariant &varValue); QString expandDataFields(QString context, ExpandType expandType, QVariant &varValue, QObject* reportItem); QString expandScripts(QString context, QVariant &varValue, QObject* reportItem); + + QString replaceScripts(QString context, QVariant& varValue, QObject *reportItem, ScriptEngineType *se, ScriptNode* scriptTree); + QVariant evaluateScript(const QString &script); void addBookMark(const QString &uniqKey, const QString &content); int findPageIndexByBookmark(const QString& uniqKey); @@ -466,36 +510,6 @@ private: ScriptFunctionsManager* m_functionManager; }; -class ScriptExtractor -{ -public: - enum State{None,BuksFound,SFound,StartScriptFound,OpenBracketFound,CloseBracketFound,DFound,VFound, SignFound}; - explicit ScriptExtractor(const QString& value):m_context(value){} - bool parse(); - int count(){return m_scriptsBody.count();} - QString bodyAt(int index){return m_scriptsBody[index];} - QString scriptAt(int index){return m_scriptsStartLex[index]+m_scriptsBody[index]+'}';} - -private: - static const char SCRIPT_SIGN = 'S'; - static const char FIELD_SIGN = 'D'; - static const char VARIABLE_SIGN = 'V'; - - bool isStartLexem(int &curPos, QChar value); - bool parse(int& curPos, const State &state); - void skipField(int &curPos); - void extractScript(int& curPos, const QString &startStr); - bool extractBracket(int& curPos); - bool isStartScriptLexem(int &curPos); - bool isStartFieldLexem(int &curPos); - bool isStartVariableLexem(int &curPos); - QString substring(const QString& value, int start, int end); -private: - QString m_context; - QVector m_scriptsBody; - QVector m_scriptsStartLex; - -}; #ifdef USE_QTSCRIPTENGINE class QFontPrototype : public QObject, public QScriptable { From 3b360e0f71ea3771e40074b82bede7894e498fd8 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Mon, 9 Sep 2019 22:33:13 +0300 Subject: [PATCH 21/40] Qt4 build fixed --- common.pri | 2 +- limereport/lrscriptenginemanager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.pri b/common.pri index 20eedaf..e2a07e5 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 10 +LIMEREPORT_VERSION_RELEASE = 11 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index 05dba0a..91bc9bc 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -513,9 +513,9 @@ QString ScriptEngineManager::replaceScripts(QString context, QVariant &varValue, #else if (!se->hasUncaughtException()) { varValue = value.toVariant(); - context.replace(scriptTree->children()[i]->script(), value.toString()); + context.replace(item->script(), value.toString()); } else { - context.replace(scriptTree->children()[i]->script(), se->uncaughtException().toString()); + context.replace(item->script(), se->uncaughtException().toString()); } #endif } From 5c7c9a1baca943471e4861d28d16f3f112a99872 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 10 Sep 2019 22:49:49 +0300 Subject: [PATCH 22/40] Items alignment tools has been refactored --- common.pri | 2 +- limereport/lrpagedesignintf.cpp | 63 +++++++++++++++++++++++++++------ limereport/lrpagedesignintf.h | 2 ++ 3 files changed, 55 insertions(+), 12 deletions(-) diff --git a/common.pri b/common.pri index e2a07e5..fa50060 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 11 +LIMEREPORT_VERSION_RELEASE = 12 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 89a18f4..3e0ad34 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -1459,15 +1459,24 @@ void PageDesignIntf::sendToBack() } } +bool PageDesignIntf::selectionContainsBand(){ + foreach(QGraphicsItem * item,selectedItems()){ + BandDesignIntf *band = dynamic_cast(item); + if (band) return true; + } + return false; +} + void PageDesignIntf::alignToLeft() { if ((selectedItems().count() > 0) && m_firstSelectedItem) { CommandGroup::Ptr cm = CommandGroup::create(); + bool moveInBand = selectionContainsBand(); foreach(QGraphicsItem * item, selectedItems()) { BaseDesignIntf *bdItem = dynamic_cast(item); if (bdItem && !bdItem->isGeometryLocked()) { QRectF oldGeometry = bdItem->geometry(); - bdItem->setPos(QPoint(m_firstSelectedItem->pos().x(), item->pos().y())); + bdItem->setPos(QPointF(moveInBand ? 0 : m_firstSelectedItem->pos().x(), item->pos().y())); CommandIf::Ptr command = PropertyChangedCommand::create(this, bdItem->objectName(), "geometry", oldGeometry, bdItem->geometry()); cm->addCommand(command, false); } @@ -1480,11 +1489,19 @@ void PageDesignIntf::alignToRigth() { if ((selectedItems().count() > 0) && m_firstSelectedItem) { CommandGroup::Ptr cm = CommandGroup::create(); + bool moveInBand = selectionContainsBand(); foreach(QGraphicsItem * item, selectedItems()) { BaseDesignIntf *bdItem = dynamic_cast(item); - if (bdItem && !bdItem->isGeometryLocked()) { + if (bdItem && !bdItem->isGeometryLocked() && !bdItem->isBand()) { QRectF oldGeometry = bdItem->geometry(); - bdItem->setPos(QPoint(m_firstSelectedItem->geometry().right() - bdItem->width(), bdItem->pos().y())); + if (moveInBand && dynamic_cast(bdItem->parent())) + { + bdItem->setPos(QPointF(dynamic_cast(bdItem->parent())->geometry().width() - bdItem->width(), + bdItem->pos().y())); + } else { + qreal x = m_firstSelectedItem->geometry().right() - bdItem->width(); + bdItem->setPos(QPointF(x+1, bdItem->pos().y())); + } CommandIf::Ptr command = PropertyChangedCommand::create(this, bdItem->objectName(), "geometry", oldGeometry, bdItem->geometry()); cm->addCommand(command, false); } @@ -1497,11 +1514,18 @@ void PageDesignIntf::alignToVCenter() { if ((selectedItems().count() > 0) && m_firstSelectedItem) { CommandGroup::Ptr cm = CommandGroup::create(); + bool moveInBand = selectionContainsBand(); foreach(QGraphicsItem * item, selectedItems()) { BaseDesignIntf *bdItem = dynamic_cast(item); - if (bdItem && !bdItem->isGeometryLocked()) { + if (bdItem && !bdItem->isGeometryLocked() && !bdItem->isBand()) { QRectF oldGeometry = bdItem->geometry(); - bdItem->setPos(QPoint((m_firstSelectedItem->geometry().right() - m_firstSelectedItem->width() / 2) - bdItem->width() / 2, bdItem->pos().y())); + if (moveInBand && dynamic_cast(bdItem->parent())){ + bdItem->setPos(QPointF((dynamic_cast(bdItem->parent())->geometry().width() / 2) - bdItem->width() / 2, + bdItem->pos().y())); + } else { + qreal x = (m_firstSelectedItem->geometry().right() - m_firstSelectedItem->width() / 2) - bdItem->width() / 2; + bdItem->setPos(QPointF(x+1, bdItem->pos().y())); + } CommandIf::Ptr command = PropertyChangedCommand::create(this, bdItem->objectName(), "geometry", oldGeometry, bdItem->geometry()); cm->addCommand(command, false); } @@ -1514,11 +1538,16 @@ void PageDesignIntf::alignToTop() { if ((selectedItems().count() > 0) && m_firstSelectedItem) { CommandGroup::Ptr cm = CommandGroup::create(); + bool moveInBand = selectionContainsBand(); foreach(QGraphicsItem * item, selectedItems()) { BaseDesignIntf *bdItem = dynamic_cast(item); - if (bdItem && !bdItem->isGeometryLocked()) { + if (bdItem && !bdItem->isGeometryLocked() && !bdItem->isBand()) { QRectF oldGeometry = bdItem->geometry(); - bdItem->setPos(QPoint(bdItem->pos().x(), m_firstSelectedItem->pos().y())); + if (moveInBand){ + bdItem->setPos(QPointF(0, m_firstSelectedItem->pos().y())); + } else { + bdItem->setPos(QPointF(bdItem->pos().x(), m_firstSelectedItem->pos().y())); + } CommandIf::Ptr command = PropertyChangedCommand::create(this, bdItem->objectName(), "geometry", oldGeometry, bdItem->geometry()); cm->addCommand(command, false); } @@ -1531,11 +1560,17 @@ void PageDesignIntf::alignToBottom() { if ((selectedItems().count() > 0) && m_firstSelectedItem) { CommandGroup::Ptr cm = CommandGroup::create(); + bool moveInBand = selectionContainsBand(); foreach(QGraphicsItem * item, selectedItems()) { BaseDesignIntf *bdItem = dynamic_cast(item); - if (bdItem && !bdItem->isGeometryLocked()) { + if (bdItem && !bdItem->isGeometryLocked() && !bdItem->isBand()) { QRectF oldGeometry = bdItem->geometry(); - bdItem->setPos(QPoint(bdItem->pos().x(), m_firstSelectedItem->geometry().bottom() - bdItem->height())); + if (moveInBand && dynamic_cast(bdItem->parent())){ + bdItem->setPos(QPointF(bdItem->pos().x(), dynamic_cast(bdItem->parent())->height() - bdItem->height())); + } else { + qreal y = m_firstSelectedItem->geometry().bottom() - bdItem->height(); + bdItem->setPos(QPointF(bdItem->pos().x(), y+1)); + } CommandIf::Ptr command = PropertyChangedCommand::create(this, bdItem->objectName(), "geometry", oldGeometry, bdItem->geometry()); cm->addCommand(command, false); } @@ -1548,11 +1583,17 @@ void PageDesignIntf::alignToHCenter() { if ((selectedItems().count() > 0) && m_firstSelectedItem) { CommandGroup::Ptr cm = CommandGroup::create(); + bool moveInBand = selectionContainsBand(); foreach(QGraphicsItem * item, selectedItems()) { BaseDesignIntf *bdItem = dynamic_cast(item); - if (bdItem && !bdItem->isGeometryLocked()) { + if (bdItem && !bdItem->isGeometryLocked() && !bdItem->isBand()) { QRectF oldGeometry = bdItem->geometry(); - bdItem->setPos(QPoint(bdItem->pos().x(), (m_firstSelectedItem->geometry().bottom() - m_firstSelectedItem->height() / 2) - bdItem->height() / 2)); + if (moveInBand && dynamic_cast(bdItem->parent())){ + bdItem->setPos(QPointF(bdItem->pos().x(), (dynamic_cast(bdItem->parent())->height() / 2) - bdItem->height() / 2)); + } else { + qreal y = (m_firstSelectedItem->geometry().bottom() - m_firstSelectedItem->height() / 2) - bdItem->height() / 2; + bdItem->setPos(QPointF(bdItem->pos().x(), y+1)); + } CommandIf::Ptr command = PropertyChangedCommand::create(this, bdItem->objectName(), "geometry", oldGeometry, bdItem->geometry()); cm->addCommand(command, false); } diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index d94abfe..b02a2de 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -282,6 +282,7 @@ namespace LimeReport { void changeSelectedGroupProperty(const QString& name,const QVariant& value); void activateItemToJoin(QRectF itemRect, QList& items); void selectAllChildren(BaseDesignIntf* item); + bool selectionContainsBand(); private: enum JoinType{Width, Height}; LimeReport::PageItemDesignIntf::Ptr m_pageItem; @@ -322,6 +323,7 @@ namespace LimeReport { bool m_magneticMovement; ReportSettings* m_reportSettings; PageItemDesignIntf* m_currentPage; + }; class AbstractPageCommand : public CommandIf{ From 076576ce883888cc237718857a7fdfccf34ce074 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Mon, 23 Sep 2019 14:20:00 +0300 Subject: [PATCH 23/40] setPageItems method has been fixed --- common.pri | 2 +- limereport/lrpagedesignintf.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common.pri b/common.pri index fa50060..7913e8e 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 12 +LIMEREPORT_VERSION_RELEASE = 13 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 3e0ad34..52c1e4d 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -278,6 +278,7 @@ void PageDesignIntf::setPageItem(PageItemDesignIntf::Ptr pageItem) void PageDesignIntf::setPageItems(QList pages) { + m_currentPage = 0; if (!m_pageItem.isNull()) { removeItem(m_pageItem.data()); m_pageItem.clear(); From 9b914b05fd1fbeddcc40f60cc60dff9b11d0759a Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 8 Oct 2019 13:51:10 +0300 Subject: [PATCH 24/40] Group functions rendering has been optimized --- limereport/lrreportrender.cpp | 77 +++++++++++++++++++++++++---------- limereport/lrreportrender.h | 8 +++- 2 files changed, 63 insertions(+), 22 deletions(-) diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index f4c7944..8b01469 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -189,11 +189,45 @@ void ReportRender::initDatasource(const QString& name){ } } +void ReportRender::analizeItem(ContentItemDesignIntf* contentItem, BandDesignIntf* band){ + if (contentItem){ + QString content = contentItem->content(); + QVector functions; + foreach(const QString &functionName, m_datasources->groupFunctionNames()){ + QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); + rx.setMinimal(true); + if (rx.indexIn(content)>=0){ + functions.append(functionName); + } + } + if (functions.size()>0) + m_groupfunctionItems.insert(contentItem->patternName(), functions); + } +} + +void ReportRender::analizeContainer(BaseDesignIntf* item, BandDesignIntf* band){ + foreach(BaseDesignIntf* child, item->childBaseItems()){ + ContentItemDesignIntf* contentItem = dynamic_cast(child); + if (contentItem) analizeItem(contentItem, band); + else analizeContainer(child, band); + } +} + +void ReportRender::analizePage(PageItemDesignIntf* patternPage){ + foreach(BandDesignIntf* band, patternPage->bands()){ + if (band->isFooter() || band->isHeader()){ + analizeContainer(band,band); + } + } +} + void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool /*isFirst*/, bool /*resetPageNumbers*/) { m_currentNameIndex = 0; m_patternPageItem = patternPage; + analizePage(patternPage); + if (m_patternPageItem->resetPageNumber() && m_pageCount>0 && !isTOC) { resetPageNumber(PageReset); } @@ -380,33 +414,34 @@ void ReportRender::extractGroupFunctions(BandDesignIntf *band) extractGroupFunctionsFromContainer(band, band); } - void ReportRender::replaceGroupFunctionsInItem(ContentItemDesignIntf* contentItem, BandDesignIntf* band){ if (contentItem){ - QString content = contentItem->content(); - foreach(const QString &functionName, m_datasources->groupFunctionNames()){ - QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); - rx.setMinimal(true); - if (rx.indexIn(content)>=0){ - int pos = 0; - while ( (pos = rx.indexIn(content,pos))!= -1 ){ - QVector captures = normalizeCaptures(rx); - if (captures.size() >= 3){ - QString expressionIndex = datasources()->putGroupFunctionsExpressions(captures.at(Const::VALUE_INDEX)); - if (captures.size()<5){ - content.replace(captures.at(0),QString("%1(%2,%3)").arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"')); - } else { - content.replace(captures.at(0),QString("%1(%2,%3,%4)") - .arg(functionName) - .arg('"'+expressionIndex+'"') - .arg('"'+band->objectName()+'"') - .arg(captures.at(4))); + if (m_groupfunctionItems.contains(contentItem->patternName())){ + QString content = contentItem->content(); + foreach(QString functionName, m_groupfunctionItems.value(contentItem->patternName())){ + QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); + rx.setMinimal(true); + if (rx.indexIn(content)>=0){ + int pos = 0; + while ( (pos = rx.indexIn(content,pos))!= -1 ){ + QVector captures = normalizeCaptures(rx); + if (captures.size() >= 3){ + QString expressionIndex = datasources()->putGroupFunctionsExpressions(captures.at(Const::VALUE_INDEX)); + if (captures.size()<5){ + content.replace(captures.at(0),QString("%1(%2,%3)").arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"')); + } else { + content.replace(captures.at(0),QString("%1(%2,%3,%4)") + .arg(functionName) + .arg('"'+expressionIndex+'"') + .arg('"'+band->objectName()+'"') + .arg(captures.at(4))); + } } + pos += rx.matchedLength(); } - pos += rx.matchedLength(); } - contentItem->setContent(content); } + contentItem->setContent(content); } } } diff --git a/limereport/lrreportrender.h b/limereport/lrreportrender.h index dabaa79..65f1b45 100644 --- a/limereport/lrreportrender.h +++ b/limereport/lrreportrender.h @@ -82,6 +82,7 @@ private: int m_TOCRangeIndex; }; + class ReportRender: public QObject { Q_OBJECT @@ -109,6 +110,10 @@ signals: public slots: void cancelRender(); private: + void analizeContainer(BaseDesignIntf *item, BandDesignIntf *band); + void analizeItem(ContentItemDesignIntf *item, BandDesignIntf *band); + void analizePage(PageItemDesignIntf *patternPage); + void initDatasources(); void initDatasource(const QString &name); void initRenderPage(); @@ -193,7 +198,7 @@ private: QMultiMap< BandDesignIntf*, GroupBandsHolder* > m_childBands; QList m_reprintableBands; QList m_recalcBands; - + QMap> m_groupfunctionItems; int m_currentIndex; int m_pageCount; @@ -217,6 +222,7 @@ private: bool m_newPageStarted; bool m_lostHeadersMoved; + }; } // namespace LimeReport #endif // LRREPORTRENDER_H From 9756ddde9c975a84012197bd22b45b6f6fa416e6 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 8 Oct 2019 14:18:59 +0300 Subject: [PATCH 25/40] Cache clearing has been added --- limereport/lrreportrender.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index 8b01469..c17973d 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -214,6 +214,7 @@ void ReportRender::analizeContainer(BaseDesignIntf* item, BandDesignIntf* band){ } void ReportRender::analizePage(PageItemDesignIntf* patternPage){ + m_groupfunctionItems.clear(); foreach(BandDesignIntf* band, patternPage->bands()){ if (band->isFooter() || band->isHeader()){ analizeContainer(band,band); From 5a6ee275a75969abbbba34fdfb7a1664d4c73e8b Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sat, 12 Oct 2019 22:31:35 +0300 Subject: [PATCH 26/40] Some band improvements have been added. Printing signals have been added. Render & printing speed little bit has been increased --- include/lrglobal.h | 1 + include/lrreportengine.h | 5 + limereport/exporters/lrpdfexporter.cpp | 2 +- limereport/lrbanddesignintf.cpp | 38 +++++- limereport/lrbanddesignintf.h | 5 + limereport/lrglobal.h | 1 + limereport/lrpagedesignintf.cpp | 4 +- limereport/lrpageitemdesignintf.cpp | 2 +- limereport/lrpreviewreportwidget.cpp | 4 +- limereport/lrreportdesignwidget.cpp | 4 +- limereport/lrreportengine.cpp | 162 ++++++++++++------------- limereport/lrreportengine.h | 5 + limereport/lrreportengine_p.h | 14 ++- 13 files changed, 145 insertions(+), 102 deletions(-) diff --git a/include/lrglobal.h b/include/lrglobal.h index da6ab47..b0b462f 100644 --- a/include/lrglobal.h +++ b/include/lrglobal.h @@ -52,6 +52,7 @@ namespace LimeReport { namespace Const{ + int const DEFAULT_GRID_STEP = 1; int const RESIZE_HANDLE_SIZE = 5; int const SELECTION_PEN_SIZE = 1; int const MINIMUM_ITEM_WIDTH = 2*RESIZE_HANDLE_SIZE; diff --git a/include/lrreportengine.h b/include/lrreportengine.h index a4c314f..305ce72 100644 --- a/include/lrreportengine.h +++ b/include/lrreportengine.h @@ -212,6 +212,11 @@ signals: void renderStarted(); void renderFinished(); void renderPageFinished(int renderedPageCount); + + void printingStarted(int pageCount); + void printingFinished(); + void pagePrintingFinished(int index); + void onSave(bool& saved); void onSaveAs(bool& saved); void onLoad(bool& loaded); diff --git a/limereport/exporters/lrpdfexporter.cpp b/limereport/exporters/lrpdfexporter.cpp index d97bf7b..08f6f60 100644 --- a/limereport/exporters/lrpdfexporter.cpp +++ b/limereport/exporters/lrpdfexporter.cpp @@ -27,7 +27,7 @@ bool PDFExporter::exportPages(ReportPages pages, const QString &fileName, const printer.setOutputFileName(fileName); printer.setOutputFormat(QPrinter::PdfFormat); if (!pages.isEmpty()){ - m_reportEngine->printReport(pages, printer); + m_reportEngine->printPages(pages, &printer); } m_reportEngine->emitPrintedToPDF(fileName); return true; diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index caac574..f4db01d 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -166,7 +166,8 @@ BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, Q m_printAlways(false), m_repeatOnEachRow(false), m_useAlternateBackgroundColor(false), - m_bottomSpace(0) + m_bottomSpace(0), + m_shiftItems(0) { setPossibleResizeDirectionFlags(ResizeBottom); setPossibleMoveFlags(TopBotom); @@ -277,6 +278,11 @@ void BandDesignIntf::paint(QPainter *painter, const QStyleOptionGraphicsItem *op BaseDesignIntf::paint(painter,option,widget); } +QRectF BandDesignIntf::boundingRect() const +{ + return ItemsContainerDesignInft::boundingRect().adjusted(0,-4,0,4); +} + void BandDesignIntf::translateBandsName() { tr("DataBand"); @@ -582,6 +588,10 @@ void BandDesignIntf::preparePopUpMenu(QMenu &menu) currAction->setCheckable(true); currAction->setChecked(isSplittable()); + currAction = menu.addAction(tr("Keep top space")); + currAction->setCheckable(true); + currAction->setChecked(keepBottomSpaceOption()); + currAction = menu.addAction(tr("Keep bottom space")); currAction->setCheckable(true); currAction->setChecked(keepBottomSpaceOption()); @@ -595,17 +605,23 @@ void BandDesignIntf::preparePopUpMenu(QMenu &menu) void BandDesignIntf::processPopUpAction(QAction *action) { if (action->text().compare(tr("Auto height")) == 0){ - setProperty("autoHeight",action->isChecked()); + setProperty("autoHeight", action->isChecked()); } + if (action->text().compare(tr("Splittable")) == 0){ - setProperty("splittable",action->isChecked()); + setProperty("splittable", action->isChecked()); } + + if (action->text().compare(tr("Keep top space")) == 0){ + setProperty("keepTopSpace", action->isChecked()); + } + if (action->text().compare(tr("Keep bottom space")) == 0){ - setProperty("keepBottomSpace",action->isChecked()); + setProperty("keepBottomSpace", action->isChecked()); } if (action->text().compare(tr("Print if empty")) == 0){ - setProperty("printIfEmpty",action->isChecked()); + setProperty("printIfEmpty", action->isChecked()); } ItemsContainerDesignInft::processPopUpAction(action); } @@ -903,6 +919,16 @@ void BandDesignIntf::slotPropertyObjectNameChanged(const QString &, const QStrin m_bandNameLabel->updateLabel(newName); } +int BandDesignIntf::shiftItems() const +{ + return m_shiftItems; +} + +void BandDesignIntf::setShiftItems(int shiftItems) +{ + m_shiftItems = shiftItems; +} + bool BandDesignIntf::keepTopSpace() const { return m_keepTopSpace; @@ -1105,7 +1131,7 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p arrangeSubItems(pass, dataManager); if (autoHeight()){ if (!keepTopSpace()) { - qreal minTop = findMinTop(); + qreal minTop = findMinTop() + m_shiftItems; foreach (BaseDesignIntf* item, childBaseItems()) { item->setY(item->y() - minTop); } diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index a6e09be..8da77ed 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -113,6 +113,7 @@ class BandDesignIntf : public ItemsContainerDesignInft 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_PROPERTY(int shiftItems READ shiftItems WRITE setShiftItems) Q_ENUMS(BandColumnsLayoutType) friend class BandMarker; friend class BandNameLabel; @@ -142,6 +143,7 @@ public: ~BandDesignIntf(); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + QRectF boundingRect() const; void translateBandsName(); virtual BandsType bandType() const; virtual QString bandTitle() const; @@ -260,6 +262,8 @@ public: int bootomSpace() const; void setBootomSpace(int bootomSpace); void updateBandMarkerGeometry(); + int shiftItems() const; + void setShiftItems(int shiftItems); signals: void bandRendered(BandDesignIntf* band); @@ -323,6 +327,7 @@ private: bool m_useAlternateBackgroundColor; int m_bottomSpace; QMap m_bookmarks; + int m_shiftItems; }; class DataBandDesignIntf : public BandDesignIntf{ diff --git a/limereport/lrglobal.h b/limereport/lrglobal.h index da6ab47..b0b462f 100644 --- a/limereport/lrglobal.h +++ b/limereport/lrglobal.h @@ -52,6 +52,7 @@ namespace LimeReport { namespace Const{ + int const DEFAULT_GRID_STEP = 1; int const RESIZE_HANDLE_SIZE = 5; int const SELECTION_PEN_SIZE = 1; int const MINIMUM_ITEM_WIDTH = 2*RESIZE_HANDLE_SIZE; diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index bc81b94..c28bdcf 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -83,8 +83,8 @@ PageDesignIntf::PageDesignIntf(QObject *parent): m_executingGroupCommand(false), m_settings(0), m_selectionRect(0), - m_verticalGridStep(2), - m_horizontalGridStep(2), + m_verticalGridStep(Const::DEFAULT_GRID_STEP), + m_horizontalGridStep(Const::DEFAULT_GRID_STEP), m_updating(false), m_currentObjectIndex(1), m_multiSelectStarted(false), diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp index 47715c8..15b200f 100644 --- a/limereport/lrpageitemdesignintf.cpp +++ b/limereport/lrpageitemdesignintf.cpp @@ -1011,7 +1011,7 @@ void PageItemDesignIntf::setGridStep(int value) int PageItemDesignIntf::gridStep() { if (page()) return page()->horizontalGridStep(); - else return 2; + else return Const::DEFAULT_GRID_STEP; } void PageItemDesignIntf::objectLoadFinished() diff --git a/limereport/lrpreviewreportwidget.cpp b/limereport/lrpreviewreportwidget.cpp index 01cc68e..87a3bab 100644 --- a/limereport/lrpreviewreportwidget.cpp +++ b/limereport/lrpreviewreportwidget.cpp @@ -222,9 +222,9 @@ void PreviewReportWidget::lastPage() void PreviewReportWidget::printPages(QPrinter* printer) { if (!d_ptr->m_reportPages.isEmpty()) - ReportEnginePrivate::printReport( + d_ptr->m_report->printPages( d_ptr->m_reportPages, - *printer + printer ); foreach(PageItemDesignIntf::Ptr pageItem, d_ptr->m_reportPages){ d_ptr->m_previewPage->reactivatePageItem(pageItem); diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index c7f965e..cd09abc 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -820,8 +820,8 @@ void ReportDesignWidget::editSetting() void ReportDesignWidget::applyUseGrid() { - int hGridStep = m_useGrid ? m_horizontalGridStep : 2; - int vGridStep = m_useGrid ? m_verticalGridStep : 2; + int hGridStep = m_useGrid ? m_horizontalGridStep : Const::DEFAULT_GRID_STEP; + int vGridStep = m_useGrid ? m_verticalGridStep : Const::DEFAULT_GRID_STEP; for(int i = 0; i < m_report->pageCount(); ++i){ m_report->pageAt(i)->setVerticalGridStep(hGridStep); m_report->pageAt(i)->setHorizontalGridStep(vGridStep); diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index c07cff4..fc1b4c2 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -264,62 +264,74 @@ void ReportEnginePrivate::clearReport() emit cleared(); } -void ReportEnginePrivate::printReport(ItemsReaderIntf::Ptr reader, QPrinter& printer) +bool ReportEnginePrivate::printPages(ReportPages pages, QPrinter *printer) { - LimeReport::PageDesignIntf renderPage; - renderPage.setItemMode(PrintMode); - if (reader->first()){ - reader->readItem(renderPage.pageItem()); - printer.setFullPage(renderPage.pageItem()->fullPage()); - printer.setOrientation((QPrinter::Orientation)renderPage.pageItem()->pageOrientation()); - renderPage.setSceneRect(renderPage.pageItem()->mapToScene(renderPage.pageItem()->rect()).boundingRect()); - - if (renderPage.pageItem()->pageSize()==PageItemDesignIntf::Custom){ - QSizeF pageSize = (renderPage.pageItem()->pageOrientation()==PageItemDesignIntf::Landscape)? - QSizeF(renderPage.pageItem()->sizeMM().height(),renderPage.pageItem()->sizeMM().width()): - renderPage.pageItem()->sizeMM(); - printer.setPaperSize(pageSize,QPrinter::Millimeter); - } else { - printer.setPaperSize((QPrinter::PageSize)renderPage.pageItem()->pageSize()); - } - - QPainter painter(&printer); - renderPage.render(&painter); - - while (reader->next()){ - printer.newPage(); - renderPage.removeAllItems(); - reader->readItem(renderPage.pageItem()); - renderPage.setSceneRect(renderPage.pageItem()->mapToScene(renderPage.pageItem()->rect()).boundingRect()); - renderPage.render(&painter); - } + if (!printer&&!m_printerSelected){ + QPrinterInfo pi; + if (!pi.defaultPrinter().isNull()) +#ifdef HAVE_QT4 + m_printer.data()->setPrinterName(pi.defaultPrinter().printerName()); +#endif +#ifdef HAVE_QT5 +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + m_printer.data()->setPrinterName(pi.defaultPrinterName()); +#else + m_printer.data()->setPrinterName(pi.defaultPrinter().printerName()); +#endif +#endif + QPrintDialog dialog(m_printer.data(),QApplication::activeWindow()); + m_printerSelected = dialog.exec()!=QDialog::Rejected; } + if (!printer&&!m_printerSelected) return false; + + printer =(printer)?printer:m_printer.data(); + if (printer&&printer->isValid()){ + try{ + if (pages.count()>0){ + internalPrintPages( + pages, + *printer + ); + } + } catch(ReportError &exception){ + saveError(exception.what()); + } + return true; + } else return false; } -void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer) +void ReportEnginePrivate::internalPrintPages(ReportPages pages, QPrinter &printer) { + m_cancelPrinting = false; int currenPage = 1; QMap> printProcessors; printProcessors.insert("default",QSharedPointer(new PrintProcessor(&printer))); + emit printingStarted(printer.toPage() - printer.fromPage()); foreach(PageItemDesignIntf::Ptr page, pages){ - if ( - (printer.printRange() == QPrinter::AllPages) || + if ( !m_cancelPrinting && + ((printer.printRange() == QPrinter::AllPages) || ( (printer.printRange()==QPrinter::PageRange) && (currenPage>=printer.fromPage()) && (currenPage<=printer.toPage()) - ) + )) ) { printProcessors["default"]->printPage(page); + currenPage++; + emit pagePrintingFinished(currenPage); + QApplication::processEvents(); } - currenPage++; + + } + emit printingFinished(); } -void ReportEnginePrivate::printReport(ReportPages pages, QMap printers, bool printToAllPrinters) +void ReportEnginePrivate::printPages(ReportPages pages, QMap printers, bool printToAllPrinters) { if (printers.values().isEmpty()) return; - int currenPage = 1; + m_cancelPrinting = false; + QMap> printProcessors; for (int i = 0; i < printers.keys().count(); ++i) { printProcessors.insert(printers.keys()[i],QSharedPointer(new PrintProcessor(printers[printers.keys()[i]]))); @@ -329,7 +341,12 @@ void ReportEnginePrivate::printReport(ReportPages pages, QMapprinterName())) printProcessors[page->printerName()]->printPage(page); @@ -340,9 +357,11 @@ void ReportEnginePrivate::printReport(ReportPages pages, QMapsetDesignTime(designTime); if (pages.count()>0){ - printReport(pages,*printer); + internalPrintPages(pages, *printer); } } catch(ReportError &exception){ saveError(exception.what()); @@ -408,7 +427,7 @@ bool ReportEnginePrivate::printReport(QMap printers, bool pr ReportPages pages = renderToPages(); dataManager()->setDesignTime(designTime); if (pages.count()>0){ - printReport(pages, printers, printToAllPrinters); + printPages(pages, printers, printToAllPrinters); } } catch(ReportError &exception){ saveError(exception.what()); @@ -417,42 +436,6 @@ bool ReportEnginePrivate::printReport(QMap printers, bool pr return true; } -bool ReportEnginePrivate::printPages(ReportPages pages, QPrinter *printer) -{ - if (!printer&&!m_printerSelected){ - QPrinterInfo pi; - if (!pi.defaultPrinter().isNull()) -#ifdef HAVE_QT4 - m_printer.data()->setPrinterName(pi.defaultPrinter().printerName()); -#endif -#ifdef HAVE_QT5 -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - m_printer.data()->setPrinterName(pi.defaultPrinterName()); -#else - m_printer.data()->setPrinterName(pi.defaultPrinter().printerName()); -#endif -#endif - QPrintDialog dialog(m_printer.data(),QApplication::activeWindow()); - m_printerSelected = dialog.exec()!=QDialog::Rejected; - } - if (!printer&&!m_printerSelected) return false; - - printer =(printer)?printer:m_printer.data(); - if (printer&&printer->isValid()){ - try{ - if (pages.count()>0){ - printReport( - pages, - *printer - ); - } - } catch(ReportError &exception){ - saveError(exception.what()); - } - return true; - } else return false; -} - void ReportEnginePrivate::printToFile(const QString &fileName) { if (!fileName.isEmpty()){ @@ -739,6 +722,11 @@ void ReportEnginePrivate::cancelRender() m_reportRendering = false; } +void ReportEnginePrivate::cancelPrinting() +{ + m_cancelPrinting = true; +} + QGraphicsScene* ReportEngine::createPreviewScene(QObject* parent){ Q_D(ReportEngine); return d->createPreviewScene(parent); @@ -1387,6 +1375,12 @@ ReportEngine::ReportEngine(QObject *parent) connect(d, SIGNAL(renderPageFinished(int)), this, SIGNAL(renderPageFinished(int))); connect(d, SIGNAL(renderFinished()), this, SIGNAL(renderFinished())); + + connect(d, SIGNAL(printingStarted(int)), this, SIGNAL(printingStarted(int))); + connect(d, SIGNAL(pagePrintingFinished(int)), + this, SIGNAL(pagePrintingFinished(int))); + connect(d, SIGNAL(printingFinished()), this, SIGNAL(printingFinished())); + connect(d, SIGNAL(onSave(bool&)), this, SIGNAL(onSave(bool&))); connect(d, SIGNAL(onSaveAs(bool&)), this, SIGNAL(onSaveAs(bool&))); connect(d, SIGNAL(onLoad(bool&)), this, SIGNAL(onLoad(bool&))); @@ -1766,21 +1760,21 @@ ScriptEngineManager*LimeReport::ReportEnginePrivate::scriptManager(){ PrintProcessor::PrintProcessor(QPrinter* printer) : m_printer(printer), m_painter(0), m_firstPage(true) -{} +{m_renderPage.setItemMode(PrintMode);} bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page) { if (!m_firstPage && !m_painter->isActive()) return false; - LimeReport::PageDesignIntf renderPage; - renderPage.setItemMode(PrintMode); + //LimeReport::PageDesignIntf m_renderPage; + //m_renderPage.setItemMode(PrintMode); QPointF backupPagePos = page->pos(); page->setPos(0,0); - renderPage.setPageItem(page); - renderPage.setSceneRect(renderPage.pageItem()->mapToScene(renderPage.pageItem()->rect()).boundingRect()); - initPrinter(renderPage.pageItem()); + m_renderPage.setPageItem(page); + m_renderPage.setSceneRect(m_renderPage.pageItem()->mapToScene(m_renderPage.pageItem()->rect()).boundingRect()); + initPrinter(m_renderPage.pageItem()); if (!m_firstPage){ m_printer->newPage(); @@ -1809,7 +1803,7 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page) while (pageHeight > 0){ while (curWidth < pageWidth){ if (!first) m_printer->newPage(); else first = false; - renderPage.render(m_painter, m_printer->pageRect(), currentPrintingRect); + m_renderPage.render(m_painter, m_printer->pageRect(), currentPrintingRect); currentPrintingRect.adjust(printerPageRect.size().width(), 0, printerPageRect.size().width(), 0); curWidth += printerPageRect.size().width(); @@ -1822,7 +1816,7 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page) } } else { - renderPage.render(m_painter); + m_renderPage.render(m_painter); } page->setPos(backupPagePos); return true; diff --git a/limereport/lrreportengine.h b/limereport/lrreportengine.h index a4c314f..305ce72 100644 --- a/limereport/lrreportengine.h +++ b/limereport/lrreportengine.h @@ -212,6 +212,11 @@ signals: void renderStarted(); void renderFinished(); void renderPageFinished(int renderedPageCount); + + void printingStarted(int pageCount); + void printingFinished(); + void pagePrintingFinished(int index); + void onSave(bool& saved); void onSaveAs(bool& saved); void onLoad(bool& loaded); diff --git a/limereport/lrreportengine_p.h b/limereport/lrreportengine_p.h index 6bdefe6..17cacd7 100644 --- a/limereport/lrreportengine_p.h +++ b/limereport/lrreportengine_p.h @@ -122,6 +122,7 @@ private: private: QPrinter* m_printer; QPainter* m_painter; + LimeReport::PageDesignIntf m_renderPage; bool m_firstPage; }; @@ -141,9 +142,8 @@ class ReportEnginePrivate : public QObject, friend class PreviewReportWidget; public: - static void printReport(ItemsReaderIntf::Ptr reader, QPrinter &printer); - static void printReport(ReportPages pages, QPrinter &printer); - static void printReport(ReportPages pages, QMapprinters, bool printToAllPrinters = false); + bool printPages(ReportPages pages, QPrinter *printer); + void printPages(ReportPages pages, QMapprinters, bool printToAllPrinters = false); Q_INVOKABLE QStringList aviableReportTranslations(); Q_INVOKABLE void setReportTranslation(const QString& languageName); public: @@ -168,7 +168,7 @@ public: void clearReport(); bool printReport(QPrinter* printer=0); bool printReport(QMapprinters, bool printToAllPrinters); - bool printPages(ReportPages pages, QPrinter *printer); + void printToFile(const QString& fileName); bool printToPDF(const QString& fileName); bool exportReport(QString exporterName, const QString &fileName = "", const QMap& params = QMap()); @@ -268,13 +268,18 @@ signals: void currentDefaultDesignerLanguageChanged(QLocale::Language); QLocale::Language getCurrentDefaultDesignerLanguage(); void externalPaint(const QString& objectName, QPainter* painter, const QStyleOptionGraphicsItem*); + void printingStarted(int pageCount); + void printingFinished(); + void pagePrintingFinished(int index); public slots: bool slotLoadFromFile(const QString& fileName); void cancelRender(); + void cancelPrinting(); protected: PageDesignIntf* createPage(const QString& pageName="", bool preview = false); bool showPreviewWindow(ReportPages pages, PreviewHints hints, QPrinter *printer); + void internalPrintPages(ReportPages pages, QPrinter &printer); protected slots: void slotDataSourceCollectionLoaded(const QString& collectionName); private slots: @@ -344,6 +349,7 @@ private: bool m_saveToFileVisible; bool m_printToPdfVisible; bool m_printVisible; + bool m_cancelPrinting; }; } From d36defd3dcd021dc02218a508ef6508dd8a0f565 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sat, 12 Oct 2019 23:10:57 +0300 Subject: [PATCH 27/40] version has been changed --- common.pri | 2 +- limereport/lrbanddesignintf.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/common.pri b/common.pri index 7913e8e..20519eb 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 13 +LIMEREPORT_VERSION_RELEASE = 14 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 6881440..30661bd 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -590,16 +590,12 @@ void BandDesignIntf::preparePopUpMenu(QMenu &menu) currAction = menu.addAction(tr("Keep top space")); currAction->setCheckable(true); - currAction->setChecked(keepBottomSpaceOption()); + currAction->setChecked(keepTopSpace()); currAction = menu.addAction(tr("Keep bottom space")); currAction->setCheckable(true); currAction->setChecked(keepBottomSpace()); - currAction = menu.addAction(tr("Keep top space")); - currAction->setCheckable(true); - currAction->setChecked(keepTopSpace()); - currAction = menu.addAction(tr("Print if empty")); currAction->setCheckable(true); currAction->setChecked(printIfEmpty()); @@ -1138,7 +1134,7 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p arrangeSubItems(pass, dataManager); if (autoHeight()){ if (!keepTopSpace()) { - qreal minTop = findMinTop() + m_shiftItems - spaceBorder; + qreal minTop = findMinTop() + m_shiftItems; foreach (BaseDesignIntf* item, childBaseItems()) { item->setY(item->y() - minTop); } From 19739c9267aa609b0d3d39c319d76d568f95713c Mon Sep 17 00:00:00 2001 From: fralx Date: Sat, 12 Oct 2019 23:17:19 +0300 Subject: [PATCH 28/40] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aedcaa1..0060021 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# LimeReport v1.5.0 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) +# LimeReport v1.5.14 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) ## Official LimeReport web site [http://limereport.ru](http://limereport.ru) From 86177820df2a930145608b7b291310e65293c94a Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sat, 12 Oct 2019 23:25:30 +0300 Subject: [PATCH 29/40] cancelPrinting slot has been added --- common.pri | 2 +- limereport/lrreportengine.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common.pri b/common.pri index 20519eb..3085e0b 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 14 +LIMEREPORT_VERSION_RELEASE = 15 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 9ff1f52..3a818aa 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -1741,6 +1741,12 @@ void ReportEngine::cancelRender() d->cancelRender(); } +void ReportEngine::cancelPrinting() +{ + Q_D(ReportEngine); + d->cancelPrinting(); +} + ReportEngine::ReportEngine(ReportEnginePrivate &dd, QObject *parent) :QObject(parent),d_ptr(&dd) { From b2a4abad032c2834a19b1861deb55b24d68dbb60 Mon Sep 17 00:00:00 2001 From: fralx Date: Sat, 12 Oct 2019 23:26:43 +0300 Subject: [PATCH 30/40] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0060021..671020f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# LimeReport v1.5.14 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) +# LimeReport v1.5.15 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) ## Official LimeReport web site [http://limereport.ru](http://limereport.ru) From 41bfc5ad71f74b2ae6e01b2f7fb54a1220241129 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sun, 13 Oct 2019 14:20:26 +0300 Subject: [PATCH 31/40] cancelPrinting() slot has been fixed --- include/lrreportengine.h | 1 + limereport/lrreportengine.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/lrreportengine.h b/include/lrreportengine.h index 305ce72..289a9e9 100644 --- a/include/lrreportengine.h +++ b/include/lrreportengine.h @@ -233,6 +233,7 @@ signals: public slots: void cancelRender(); + void cancelPrinting(); protected: ReportEnginePrivate * const d_ptr; ReportEngine(ReportEnginePrivate &dd, QObject * parent=0); diff --git a/limereport/lrreportengine.h b/limereport/lrreportengine.h index 305ce72..289a9e9 100644 --- a/limereport/lrreportengine.h +++ b/limereport/lrreportengine.h @@ -233,6 +233,7 @@ signals: public slots: void cancelRender(); + void cancelPrinting(); protected: ReportEnginePrivate * const d_ptr; ReportEngine(ReportEnginePrivate &dd, QObject * parent=0); From e192efc6494143c6d6228e1b2dc7e62cb2f061e6 Mon Sep 17 00:00:00 2001 From: fralx Date: Sun, 13 Oct 2019 14:22:42 +0300 Subject: [PATCH 32/40] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 671020f..b72e356 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# LimeReport v1.5.15 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) +# LimeReport v1.5.16 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) ## Official LimeReport web site [http://limereport.ru](http://limereport.ru) From c543bb65f0d9d1bffb44f126c2e933abf6b31c45 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sun, 13 Oct 2019 14:28:39 +0300 Subject: [PATCH 33/40] build for some compilers has been fixed --- limereport/lrreportrender.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/limereport/lrreportrender.h b/limereport/lrreportrender.h index 65f1b45..a825ffc 100644 --- a/limereport/lrreportrender.h +++ b/limereport/lrreportrender.h @@ -198,7 +198,7 @@ private: QMultiMap< BandDesignIntf*, GroupBandsHolder* > m_childBands; QList m_reprintableBands; QList m_recalcBands; - QMap> m_groupfunctionItems; + QMap > m_groupfunctionItems; int m_currentIndex; int m_pageCount; From 22bd808d2fc70b12421aa2400f286a0ff5b9043d Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sun, 13 Oct 2019 15:12:20 +0300 Subject: [PATCH 34/40] build fixed --- limereport/lrreportengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 3a818aa..0253911 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -332,7 +332,7 @@ void ReportEnginePrivate::printPages(ReportPages pages, QMap if (printers.values().isEmpty()) return; m_cancelPrinting = false; - QMap> printProcessors; + QMap > printProcessors; for (int i = 0; i < printers.keys().count(); ++i) { printProcessors.insert(printers.keys()[i],QSharedPointer(new PrintProcessor(printers[printers.keys()[i]]))); } From eaf921501faa5b5df935ad8aeb9fe7d17656a022 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Mon, 14 Oct 2019 23:47:14 +0300 Subject: [PATCH 35/40] print process has been fixed --- common.pri | 2 +- limereport/lrpagedesignintf.cpp | 11 ++++++++++- limereport/lrpagedesignintf.h | 1 + limereport/lrreportengine.cpp | 3 +++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/common.pri b/common.pri index 3085e0b..6a5f6d5 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 15 +LIMEREPORT_VERSION_RELEASE = 19 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 09e6574..b767128 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -280,7 +280,8 @@ void PageDesignIntf::setPageItems(QList pages) { m_currentPage = 0; if (!m_pageItem.isNull()) { - removeItem(m_pageItem.data()); + if (m_pageItem->scene() == this) + removeItem(m_pageItem.data()); m_pageItem.clear(); } int curHeight = 0; @@ -303,6 +304,14 @@ void PageDesignIntf::setPageItems(QList pages) } +void PageDesignIntf::removePageItem(PageItemDesignIntf::Ptr pageItem) +{ + if (m_pageItem == pageItem){ + removeItem(m_pageItem.data()); + m_pageItem.clear(); + } +} + void PageDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (m_insertMode) { diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index b02a2de..1256c7a 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -113,6 +113,7 @@ namespace LimeReport { PageItemDesignIntf *pageItem(); void setPageItem(PageItemDesignIntf::Ptr pageItem); void setPageItems(QList pages); + void removePageItem(PageItemDesignIntf::Ptr pageItem); QList pageItems(){return m_reportPages;} bool isItemInsertMode(); diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 0253911..2c977f9 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -1772,6 +1772,7 @@ PrintProcessor::PrintProcessor(QPrinter* printer) bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page) { if (!m_firstPage && !m_painter->isActive()) return false; + PageDesignIntf* backupPage = dynamic_cast(page->scene()); //LimeReport::PageDesignIntf m_renderPage; //m_renderPage.setItemMode(PrintMode); @@ -1825,6 +1826,8 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page) m_renderPage.render(m_painter); } page->setPos(backupPagePos); + m_renderPage.removePageItem(page); + if (backupPage) backupPage->reactivatePageItem(page); return true; } From ccec7b416459caa0b4fdfc749501c5723032af36 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 16 Oct 2019 02:05:25 +0300 Subject: [PATCH 36/40] Invalidating data sources have been improved --- limereport/lrdatasourcemanager.cpp | 29 +++++++++++++++++++++++------ limereport/lrdatasourcemanager.h | 3 +++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/limereport/lrdatasourcemanager.cpp b/limereport/lrdatasourcemanager.cpp index 1fcc20d..9b9b876 100644 --- a/limereport/lrdatasourcemanager.cpp +++ b/limereport/lrdatasourcemanager.cpp @@ -525,6 +525,7 @@ void DataSourceManager::addQuery(const QString &name, const QString &sqlText, co putQueryDesc(queryDecs); putHolder(name,new QueryHolder(sqlText, connectionName, this)); m_hasChanges = true; + m_varToDataSource.clear(); emit datasourcesChanged(); } @@ -534,6 +535,7 @@ void DataSourceManager::addSubQuery(const QString &name, const QString &sqlText, putSubQueryDesc(subQueryDesc); putHolder(name,new SubQueryHolder(sqlText, connectionName, masterDatasource, this)); m_hasChanges = true; + m_varToDataSource.clear(); emit datasourcesChanged(); } @@ -1373,18 +1375,31 @@ void DataSourceManager::slotQueryTextChanged(const QString &queryName, const QSt if (holder){ holder->setQueryText(queryText); } + m_varToDataSource.clear(); } void DataSourceManager::invalidateQueriesContainsVariable(const QString& variableName) { if (!variableIsSystem(variableName)){ - foreach (const QString& datasourceName, dataSourceNames()){ - QueryHolder* holder = dynamic_cast(m_datasources.value(datasourceName)); - if (holder){ - QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName)); - if (holder->queryText().contains(rx)) - holder->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); + + if (m_varToDataSource.contains(variableName)){ + foreach(QString datasourceName, m_varToDataSource.value(variableName)){ + QueryHolder* holder = dynamic_cast(m_datasources.value(datasourceName)); + if (holder) holder->invalidate(designTime() ? IDataSource::DESIGN_MODE : IDataSource::RENDER_MODE); } + } else { + QVector datasources; + foreach (const QString& datasourceName, dataSourceNames()){ + QueryHolder* holder = dynamic_cast(m_datasources.value(datasourceName)); + if (holder){ + QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName)); + if (holder->queryText().contains(rx)){ + holder->invalidate(designTime() ? IDataSource::DESIGN_MODE : IDataSource::RENDER_MODE); + datasources.append(datasourceName); + } + } + } + m_varToDataSource.insert(variableName, datasources); } } } @@ -1413,6 +1428,8 @@ void DataSourceManager::slotCSVTextChanged(const QString &csvName, const QString void DataSourceManager::clear(ClearMethod method) { + m_varToDataSource.clear(); + DataSourcesMap::iterator dit; for( dit = m_datasources.begin(); dit != m_datasources.end(); ){ bool owned = (*dit)->isOwned() && (*dit)->isRemovable(); diff --git a/limereport/lrdatasourcemanager.h b/limereport/lrdatasourcemanager.h index de708fe..e462a96 100644 --- a/limereport/lrdatasourcemanager.h +++ b/limereport/lrdatasourcemanager.h @@ -280,6 +280,9 @@ private: QHash m_groupFunctionsExpressionsMap; QVector m_groupFunctionsExpressions; IDbCredentialsProvider* m_dbCredentialsProvider; + + QMap> m_varToDataSource; + bool m_hasChanges; }; From e3981cfd8899fdd1ba149047ca8cfa5f24f3206e Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 16 Oct 2019 02:08:45 +0300 Subject: [PATCH 37/40] Progress bars have been added to Design and Preview windows --- common.pri | 2 +- demo_r1/mainwindow.cpp | 17 +++++--- include/lrreportengine.h | 1 + limereport/lrpreviewreportwindow.cpp | 54 ++++++++++++++++++++++- limereport/lrpreviewreportwindow.h | 7 +++ limereport/lrreportdesignwidget.cpp | 3 ++ limereport/lrreportdesignwindow.cpp | 64 +++++++++++++++++++++------- limereport/lrreportdesignwindow.h | 8 ++++ limereport/lrreportengine.cpp | 17 ++++++-- limereport/lrreportengine.h | 1 + limereport/lrreportengine_p.h | 4 ++ 11 files changed, 150 insertions(+), 28 deletions(-) diff --git a/common.pri b/common.pri index 6a5f6d5..c7b5359 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 19 +LIMEREPORT_VERSION_RELEASE = 20 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/demo_r1/mainwindow.cpp b/demo_r1/mainwindow.cpp index 05488ce..348cbb1 100644 --- a/demo_r1/mainwindow.cpp +++ b/demo_r1/mainwindow.cpp @@ -77,7 +77,7 @@ MainWindow::MainWindow(QWidget *parent) : int index = m_customers->record().indexOf("CustomerID"); m_orders->bindValue(":id",m_customers->value(index)); m_orders->exec(); - }; + } } LimeReport::ICallbackDatasource * callbackDatasource = report->dataManager()->createCallbackDatasource("master"); @@ -156,18 +156,21 @@ void MainWindow::on_pushButton_2_clicked() // printers.insert("default",printer); // report->printReport(printers); // } + report->setShowProgressDialog(true); report->previewReport(); } } void MainWindow::renderStarted() { - m_currentPage = 0; - m_progressDialog = new QProgressDialog(tr("Start render"),tr("Cancel"),0,0,this); - m_progressDialog->setWindowModality(Qt::WindowModal); - connect(m_progressDialog, SIGNAL(canceled()), report, SLOT(cancelRender())); - m_progressDialog->show(); - QApplication::processEvents(); + if (report->isShowProgressDialog()){ + m_currentPage = 0; + m_progressDialog = new QProgressDialog(tr("Start render"),tr("Cancel"),0,0,this); + //m_progressDialog->setWindowModality(Qt::WindowModal); + connect(m_progressDialog, SIGNAL(canceled()), report, SLOT(cancelRender())); + QApplication::processEvents(); + m_progressDialog->show(); + } } void MainWindow::renderPageFinished(int renderedPageCount) diff --git a/include/lrreportengine.h b/include/lrreportengine.h index 289a9e9..8ef7ff0 100644 --- a/include/lrreportengine.h +++ b/include/lrreportengine.h @@ -164,6 +164,7 @@ public: void designReport(); ReportDesignWindowInterface* getDesignerWindow(); void setShowProgressDialog(bool value); + bool isShowProgressDialog(); IDataSourceManager* dataManager(); IScriptEngineManager* scriptManager(); bool loadFromFile(const QString& fileName, bool autoLoadPreviewOnChange = false); diff --git a/limereport/lrpreviewreportwindow.cpp b/limereport/lrpreviewreportwindow.cpp index ee00a86..01d42cb 100644 --- a/limereport/lrpreviewreportwindow.cpp +++ b/limereport/lrpreviewreportwindow.cpp @@ -42,6 +42,9 @@ #include #include #include +#include +#include +#include namespace LimeReport{ @@ -51,6 +54,25 @@ PreviewReportWindow::PreviewReportWindow(ReportEngine *report, QWidget *parent, m_scalePercentChanging(false) { ui->setupUi(this); + + m_progressWidget = new QWidget(ui->statusbar); + QHBoxLayout* progressLayout = new QHBoxLayout(); + progressLayout->setMargin(0); + progressLayout->addWidget(new QLabel(tr("Printing"))); + m_progressBar = new QProgressBar(ui->statusbar); + m_progressBar->setMaximumWidth(100); + m_progressBar->setMaximumHeight(ui->statusbar->fontMetrics().height()); + progressLayout->addWidget(m_progressBar); + QToolButton* tbCancel = new QToolButton(); + tbCancel->setIcon(QIcon(":/report/images/closebox")); + tbCancel->setAutoRaise(true); + connect(tbCancel, SIGNAL(clicked(bool)), this, SLOT(slotCancelPrinting(bool))); + progressLayout->addWidget(tbCancel); + progressLayout->setSizeConstraint(QLayout::SetFixedSize); + m_progressWidget->setLayout(progressLayout); + m_progressWidget->setVisible(false); + ui->statusbar->addPermanentWidget(m_progressWidget); + setWindowTitle("Lime Report Preview"); m_pagesNavigator = new QSpinBox(this); m_pagesNavigator->setMaximum(10000000); @@ -73,6 +95,10 @@ PreviewReportWindow::PreviewReportWindow(ReportEngine *report, QWidget *parent, connect(m_previewReportWidget, SIGNAL(onSave(bool&, LimeReport::IPreparedPages*)), this, SIGNAL(onSave(bool&, LimeReport::IPreparedPages*))); + connect(m_previewReportWidget->d_ptr->m_report, SIGNAL(printingStarted(int)), this, SLOT(slotPrintingStarted(int))); + connect(m_previewReportWidget->d_ptr->m_report, SIGNAL(pagePrintingFinished(int)), this, SLOT(slotPagePrintingFinished(int))); + connect(m_previewReportWidget->d_ptr->m_report, SIGNAL(printingFinished()), this, SLOT(slotPrintingFinished())); + m_fontEditor = new FontEditorWidgetForPage(m_previewReportWidget->d_ptr->m_previewPage,tr("Font"),this); m_fontEditor->setObjectName("fontTools"); m_fontEditor->setIconSize(ui->toolBar->iconSize()); @@ -260,8 +286,12 @@ void PreviewReportWindow::exec() if (deleteOnClose) delete this; } -void PreviewReportWindow::closeEvent(QCloseEvent *) +void PreviewReportWindow::closeEvent(QCloseEvent* e) { + if (m_progressBar->isVisible()){ + QMessageBox::critical(this, tr("Attention"), tr("The printing is in process")); + e->setAccepted(false); + } #ifdef Q_OS_WIN writeSetting(); #endif @@ -515,5 +545,27 @@ void PreviewReportWindow::slotItemInserted(PageDesignIntf *, QPointF, const QStr slotActivateItemSelectionMode(); } +void PreviewReportWindow::slotPrintingStarted(int pageCount) +{ + m_progressBar->setMinimum(1); + m_progressBar->setMaximum(pageCount); + m_progressWidget->setVisible(true); +} + +void PreviewReportWindow::slotPagePrintingFinished(int pageIndex) +{ + m_progressBar->setValue(pageIndex); +} + +void PreviewReportWindow::slotPrintingFinished() +{ + m_progressWidget->setVisible(false); +} + +void PreviewReportWindow::slotCancelPrinting(bool) +{ + m_previewReportWidget->d_ptr->m_report->cancelPrinting(); +} + }// namespace LimeReport diff --git a/limereport/lrpreviewreportwindow.h b/limereport/lrpreviewreportwindow.h index 4935201..98808a3 100644 --- a/limereport/lrpreviewreportwindow.h +++ b/limereport/lrpreviewreportwindow.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "serializators/lrxmlreader.h" #include "lrpreparedpagesintf.h" @@ -118,6 +119,10 @@ private slots: void on_actionShow_Toolbar_triggered(); void slotCurrentPageChanged(int page); void slotItemInserted(LimeReport::PageDesignIntf* report, QPointF pos, const QString& ItemType); + void slotPrintingStarted(int pageCount); + void slotPagePrintingFinished(int pageIndex); + void slotPrintingFinished(); + void slotCancelPrinting(bool); signals: void onSave(bool& saved, LimeReport::IPreparedPages* pages); private: @@ -139,6 +144,8 @@ private: ScaleType m_previewScaleType; int m_previewScalePercent; bool m_scalePercentChanging; + QProgressBar* m_progressBar; + QWidget* m_progressWidget; }; } //namespace LimeReport #endif // LRPREVIEWREPORTWINDOW_H diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index cd09abc..a1e8a3b 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -726,7 +726,10 @@ void ReportDesignWidget::previewReport() #ifdef HAVE_QTDESIGNER_INTEGRATION updateDialogs(); #endif + bool showProgressDialog = report()->isShowProgressDialog(); + report()->setShowProgressDialog(false); report()->previewReport(); + report()->setShowProgressDialog(showProgressDialog); } void ReportDesignWidget::printReport() diff --git a/limereport/lrreportdesignwindow.cpp b/limereport/lrreportdesignwindow.cpp index d98af07..5181c7b 100644 --- a/limereport/lrreportdesignwindow.cpp +++ b/limereport/lrreportdesignwindow.cpp @@ -65,6 +65,38 @@ namespace LimeReport{ ReportDesignWindow* ReportDesignWindow::m_instance=0; +void ReportDesignWindow::createProgressBar() +{ + m_progressWidget = new QWidget(m_statusBar); + QHBoxLayout* progressLayout = new QHBoxLayout(); + progressLayout->setMargin(0); + m_progressLabel = new QLabel(tr("Rendered %1 pages").arg(0)); + progressLayout->addWidget(m_progressLabel); + m_progressBar = new QProgressBar(m_statusBar); + m_progressBar->setFormat("%v pages"); + m_progressBar->setAlignment(Qt::AlignCenter); + m_progressBar->setMaximumWidth(100); + m_progressBar->setMaximumHeight(m_statusBar->fontMetrics().height()); + m_progressBar->setMinimum(0); + m_progressBar->setMaximum(0); + m_progressBar->setTextVisible(true); + progressLayout->addWidget(m_progressBar); + QToolButton* tbCancel = new QToolButton(); + tbCancel->setToolTip(tr("Cancel report rendering")); + tbCancel->setIcon(QIcon(":/report/images/closebox")); + tbCancel->setAutoRaise(true); + connect(tbCancel, SIGNAL(clicked(bool)), this, SLOT(slotCancelRendering(bool))); + progressLayout->addWidget(tbCancel); + progressLayout->setSizeConstraint(QLayout::SetFixedSize); + m_progressWidget->setLayout(progressLayout); + m_progressWidget->setVisible(false); + m_statusBar->addPermanentWidget(m_progressWidget); + + connect(dynamic_cast(m_reportDesignWidget->report()), SIGNAL(renderStarted()), this, SLOT(renderStarted())); + connect(dynamic_cast(m_reportDesignWidget->report()), SIGNAL(renderPageFinished(int)), this, SLOT(renderPageFinished(int))); + connect(dynamic_cast(m_reportDesignWidget->report()), SIGNAL(renderFinished()), this, SLOT(renderFinished())); +} + ReportDesignWindow::ReportDesignWindow(ReportEnginePrivateInterface* report, QWidget *parent, QSettings* settings) : ReportDesignWindowInterface(parent), m_textAttibutesIsChanging(false), m_settings(settings), m_ownedSettings(false), m_progressDialog(0), m_showProgressDialog(true), m_editorTabType(ReportDesignWidget::Page), m_reportItemIsLocked(false) @@ -77,6 +109,7 @@ ReportDesignWindow::ReportDesignWindow(ReportEnginePrivateInterface* report, QWi createDataWindow(); createScriptWindow(); createObjectsBrowser(); + #ifdef HAVE_QTDESIGNER_INTEGRATION createDialogWidgetBox(); createDialogPropertyEditor(); @@ -100,7 +133,8 @@ ReportDesignWindow::ReportDesignWindow(ReportEnginePrivateInterface* report, QWi showDefaultToolBars(); restoreSetting(); m_hideLeftPanel->setChecked(isDockAreaVisible(Qt::LeftDockWidgetArea)); - m_hideRightPanel->setChecked(isDockAreaVisible(Qt::RightDockWidgetArea)); + m_hideRightPanel->setChecked(isDockAreaVisible(Qt::RightDockWidgetArea)); + createProgressBar(); } ReportDesignWindow::~ReportDesignWindow() @@ -515,9 +549,6 @@ void ReportDesignWindow::initReportEditor(ReportEnginePrivateInterface* report) this, SLOT(slotBandAdded(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*))); connect(m_reportDesignWidget, SIGNAL(bandDeleted(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*)), this, SLOT(slotBandDeleted(LimeReport::PageDesignIntf*,LimeReport::BandDesignIntf*))); - connect(dynamic_cast(report), SIGNAL(renderStarted()), this, SLOT(renderStarted())); - connect(dynamic_cast(report), SIGNAL(renderPageFinished(int)), this, SLOT(renderPageFinished(int))); - connect(dynamic_cast(report), SIGNAL(renderFinished()), this, SLOT(renderFinished())); connect(m_reportDesignWidget, SIGNAL(pageAdded(PageDesignIntf*)), this, SLOT(slotPageAdded(PageDesignIntf*))); connect(m_reportDesignWidget, SIGNAL(pageDeleted()), this, SLOT(slotPageDeleted())); } @@ -1377,26 +1408,17 @@ void ReportDesignWindow::slotActivePageChanged() void ReportDesignWindow::renderStarted() { - if (m_showProgressDialog){ - m_progressDialog = new QProgressDialog(tr("Rendering report"),tr("Abort"),0,0,this); - m_progressDialog->open(dynamic_cast(m_reportDesignWidget->report()), SLOT(cancelRender())); - QApplication::processEvents(); - } + m_progressWidget->setVisible(true); } void ReportDesignWindow::renderPageFinished(int renderedPageCount) { - if (m_progressDialog) - m_progressDialog->setLabelText(QString::number(renderedPageCount)+tr(" page rendered")); + m_progressLabel->setText(tr("Rendered %1 pages").arg(renderedPageCount)); } void ReportDesignWindow::renderFinished() { - if (m_progressDialog){ - m_progressDialog->close(); - delete m_progressDialog; - } - m_progressDialog = 0; + m_progressWidget->setVisible(false); } void ReportDesignWindow::slotShowAbout() @@ -1536,8 +1558,18 @@ void ReportDesignWindow::slotSelectOneLevelItems() m_reportDesignWidget->selectOneLevelItems(); } +void ReportDesignWindow::slotCancelRendering(bool) +{ + m_reportDesignWidget->report()->cancelRender(); +} + void ReportDesignWindow::closeEvent(QCloseEvent * event) { + if (m_progressWidget->isVisible()){ + QMessageBox::critical(this, tr("Attention"), tr("The rendering is in process")); + event->ignore(); + return; + } if (checkNeedToSave()){ m_dataBrowser->closeAllDataWindows(); writeState(); diff --git a/limereport/lrreportdesignwindow.h b/limereport/lrreportdesignwindow.h index 5701894..b0ab082 100644 --- a/limereport/lrreportdesignwindow.h +++ b/limereport/lrreportdesignwindow.h @@ -128,6 +128,8 @@ private slots: void slotLockSelectedItems(); void slotUnlockSelectedItems(); void slotSelectOneLevelItems(); + void slotCancelRendering(bool); + protected: void closeEvent(QCloseEvent *event); void resizeEvent(QResizeEvent *); @@ -281,6 +283,12 @@ private: QMap m_leftDocVisibleState; QMap m_rightDocVisibleState; QSortFilterProxyModel* m_filterModel; + + QWidget* m_progressWidget; + QProgressBar* m_progressBar; + QLabel* m_progressLabel; + + void createProgressBar(); }; class ObjectNameValidator : public ValidatorIntf{ diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 2c977f9..1717f3f 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -302,11 +302,16 @@ bool ReportEnginePrivate::printPages(ReportPages pages, QPrinter *printer) void ReportEnginePrivate::internalPrintPages(ReportPages pages, QPrinter &printer) { - m_cancelPrinting = false; int currenPage = 1; + m_cancelPrinting = false; QMap > printProcessors; printProcessors.insert("default",QSharedPointer(new PrintProcessor(&printer))); - emit printingStarted(printer.toPage() - printer.fromPage()); + + int pageCount = (printer.printRange() == QPrinter::AllPages) ? + pages.size() : + printer.toPage() - printer.fromPage(); + + emit printingStarted(pageCount); foreach(PageItemDesignIntf::Ptr page, pages){ if ( !m_cancelPrinting && ((printer.printRange() == QPrinter::AllPages) || @@ -708,7 +713,7 @@ bool ReportEnginePrivate::slotLoadFromFile(const QString &fileName) } EASY_END_BLOCK; return true; - }; + } } m_lastError = reader->lastError(); EASY_END_BLOCK; @@ -1652,6 +1657,12 @@ void ReportEngine::setShowProgressDialog(bool value) d->setShowProgressDialog(value); } +bool ReportEngine::isShowProgressDialog() +{ + Q_D(ReportEngine); + return d->isShowProgressDialog(); +} + IDataSourceManager *ReportEngine::dataManager() { Q_D(ReportEngine); diff --git a/limereport/lrreportengine.h b/limereport/lrreportengine.h index 289a9e9..8ef7ff0 100644 --- a/limereport/lrreportengine.h +++ b/limereport/lrreportengine.h @@ -164,6 +164,7 @@ public: void designReport(); ReportDesignWindowInterface* getDesignerWindow(); void setShowProgressDialog(bool value); + bool isShowProgressDialog(); IDataSourceManager* dataManager(); IScriptEngineManager* scriptManager(); bool loadFromFile(const QString& fileName, bool autoLoadPreviewOnChange = false); diff --git a/limereport/lrreportengine_p.h b/limereport/lrreportengine_p.h index 17cacd7..3196f4e 100644 --- a/limereport/lrreportengine_p.h +++ b/limereport/lrreportengine_p.h @@ -110,6 +110,9 @@ public: virtual QList designerLanguages() = 0; virtual QLocale::Language currentDesignerLanguage() = 0; virtual void setCurrentDesignerLanguage(QLocale::Language language) = 0; + virtual void cancelRender() = 0; + virtual void setShowProgressDialog(bool value) = 0; + virtual bool isShowProgressDialog() const = 0; }; class PrintProcessor{ @@ -179,6 +182,7 @@ public: void designReport(); void setSettings(QSettings* value); void setShowProgressDialog(bool value){m_showProgressDialog = value;} + bool isShowProgressDialog() const {return m_showProgressDialog;} QSettings* settings(); bool loadFromFile(const QString& fileName, bool autoLoadPreviewOnChange); bool loadFromByteArray(QByteArray *data, const QString& name = ""); From 2efe2afa72ce52ca6b8d8b871c1a81807220951a Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 16 Oct 2019 13:43:23 +0300 Subject: [PATCH 38/40] Build fixed --- limereport/lrdatasourcemanager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/limereport/lrdatasourcemanager.h b/limereport/lrdatasourcemanager.h index e462a96..9c8518f 100644 --- a/limereport/lrdatasourcemanager.h +++ b/limereport/lrdatasourcemanager.h @@ -281,7 +281,7 @@ private: QVector m_groupFunctionsExpressions; IDbCredentialsProvider* m_dbCredentialsProvider; - QMap> m_varToDataSource; + QMap< QString, QVector > m_varToDataSource; bool m_hasChanges; }; From 40726db7456da9ca001069cc50647799215fdbd0 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 16 Oct 2019 22:55:35 +0300 Subject: [PATCH 39/40] Layout deletion has been fixed --- limereport/items/lrabstractlayout.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/limereport/items/lrabstractlayout.cpp b/limereport/items/lrabstractlayout.cpp index 02d8e97..22d17a2 100644 --- a/limereport/items/lrabstractlayout.cpp +++ b/limereport/items/lrabstractlayout.cpp @@ -158,6 +158,7 @@ void AbstractLayout::beforeDelete() #endif BaseDesignIntf *bi = dynamic_cast(item); if (bi) { + bi->disconnect(this); bi->setParentItem(parentItem()); bi->setParent(parent()); bi->setVisible(true); From a6a8c407a3247702dadedd19774ca7cf64be154f Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 17 Oct 2019 00:11:27 +0300 Subject: [PATCH 40/40] Russian translation has been updated --- common.pri | 2 +- .../objectinspector/lrobjectitemmodel.cpp | 1 + translations/limereport_ru.ts | 44 ++++++++++++++----- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/common.pri b/common.pri index c7b5359..78767ea 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 20 +LIMEREPORT_VERSION_RELEASE = 21 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 ea92de3..eb09d92 100644 --- a/limereport/objectinspector/lrobjectitemmodel.cpp +++ b/limereport/objectinspector/lrobjectitemmodel.cpp @@ -163,6 +163,7 @@ void QObjectPropertyModel::translatePropertyName() tr("units"); tr("geometryLocked"); tr("printBehavior"); + tr("shiftItems"); } void QObjectPropertyModel::clearObjectsList() diff --git a/translations/limereport_ru.ts b/translations/limereport_ru.ts index adf4c0e..198080b 100644 --- a/translations/limereport_ru.ts +++ b/translations/limereport_ru.ts @@ -1488,6 +1488,18 @@ p, li { white-space: pre-wrap; } EditModeTools Панель инструментов редактирования + + Printing + Печатается + + + Attention + Внимание + + + The printing is in process + Отчет находится в процессе печати + LimeReport::ProxyHolder @@ -2006,6 +2018,10 @@ p, li { white-space: pre-wrap; } printBehavior Поведение при печати + + shiftItems + Смещение элементов + LimeReport::RectPropItem @@ -2258,18 +2274,6 @@ p, li { white-space: pre-wrap; } Report file name Файл отчета - - Rendering report - Создается отчет - - - Abort - Прервать - - - page rendered - создается страница - Warning Предупреждение @@ -2342,6 +2346,22 @@ p, li { white-space: pre-wrap; } Select one level items Выделить элементы одного уровня + + Rendered %1 pages + Сформировано %1 страниц + + + Cancel report rendering + Отменить построение отчета + + + Attention + Внимание + + + The rendering is in process + Отчет находится в процессе создания + LimeReport::ReportEnginePrivate