[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2020-04-05 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

--- Comment #10 from Ralf Habacker  ---
Git commit dedf42deb88b2f89a749aba04bb1b7db52fae5c2 by Ralf Habacker.
Committed on 06/04/2020 at 02:42.
Pushed by habacker into branch 'master'.

Add print preview support to DrawIntoPainter and AdvancedHeaderFooter example

The print preview allows to check differences between printing
and display.
Reviewed By: danders
Differential Revision: https://phabricator.kde.org/D19680

M  +15   -0examples/DrawIntoPainter/mainwindow.cpp
M  +3-1examples/DrawIntoPainter/mainwindow.h
M  +7-0examples/DrawIntoPainter/mainwindow.ui
M  +11   -6examples/HeadersFooters/Advanced/mainwindow.cpp
M  +3-1examples/HeadersFooters/Advanced/mainwindow.h

https://commits.kde.org/kdiagram/dedf42deb88b2f89a749aba04bb1b7db52fae5c2

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-10-13 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

Ralf Habacker  changed:

   What|Removed |Added

  Latest Commit|https://commits.kde.org/kdi |https://commits.kde.org/kdi
   |agram/347e5dda7b684f49afbfd |agram/17b914e037c03626c8085
   |63177f28e4754891eb7 |169bd2d2113cada353c

--- Comment #9 from Ralf Habacker  ---
Git commit 17b914e037c03626c8085169bd2d2113cada353c by Ralf Habacker.
Committed on 13/10/2019 at 12:42.
Pushed by habacker into branch '2.6'.

Reimplement Chart::paint() to fix printing issues

The previous implementation did not take the headers and footers
into account when resizing the diagram.

The implementation has been taken from AbstractArea::paintIntoRectArea().

This patch adds the method PrintingParameters::scaleFactor(), because
in branch 2.6 the class member PrintingParameters::scaleFactor was made
private.
FIXED-IN:2.6.2

Test Plan: tested on linux
Reviewed By: danders
Differential Revision: https://phabricator.kde.org/D19541
(cherry picked from commit 347e5dda7b684f49afbfd63177f28e4754891eb7)

M  +14   -45   src/KChart/KChartChart.cpp
M  +2-2src/KChart/KChartChart.h
M  +11   -6src/KChart/KChartPrintingParameters.cpp
M  +2-1src/KChart/KChartPrintingParameters.h

https://commits.kde.org/kdiagram/17b914e037c03626c8085169bd2d2113cada353c

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-10-13 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

Ralf Habacker  changed:

   What|Removed |Added

  Latest Commit|https://commits.kde.org/kmy |https://commits.kde.org/kdi
   |money/455c23400dd3e679879a2 |agram/347e5dda7b684f49afbfd
   |d77d2259fc63e852247 |63177f28e4754891eb7
 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Ralf Habacker  ---
Git commit 347e5dda7b684f49afbfd63177f28e4754891eb7 by Ralf Habacker.
Committed on 13/10/2019 at 12:34.
Pushed by habacker into branch 'master'.

Reimplement Chart::paint() to fix printing issues

The previous implementation did not take the headers and footers
into account when resizing the diagram.

The implementation has been taken from AbstractArea::paintIntoRectArea().

This patch adds the method PrintingParameters::scaleFactor(), because
in branch 2.6 the class member PrintingParameters::scaleFactor was made
private.
FIXED-IN:2.6.2

Test Plan: tested on linux
Reviewed By: danders
Differential Revision: https://phabricator.kde.org/D19541

M  +12   -42   src/KChart/KChartChart.cpp
M  +2-2src/KChart/KChartChart.h
M  +11   -6src/KChart/KChartPrintingParameters.cpp
M  +2-1src/KChart/KChartPrintingParameters.h

https://commits.kde.org/kdiagram/347e5dda7b684f49afbfd63177f28e4754891eb7

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-26 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

--- Comment #7 from Ralf Habacker  ---
Git commit 9a08e03fa8941c07af60144497855a323fc87a6b by Ralf Habacker.
Committed on 26/03/2019 at 23:20.
Pushed by habacker into branch '4.8'.

Reimplement Chart::paint() to fix printing issues

The implementation has been taken from AbstractArea::paintIntoRectArea()
and fixes incorrect header and footer locations.

See https://phabricator.kde.org/D19541 for details on differences compared
with the previous implementation.

M  +10   -45   libkdchart/src/KDChart/KDChartChart.cpp

https://commits.kde.org/kmymoney/9a08e03fa8941c07af60144497855a323fc87a6b

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-09 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

--- Comment #6 from Ralf Habacker  ---
Git commit 03a7211df61c570430d7f4e436772dbd54810ef5 by Ralf Habacker.
Committed on 09/03/2019 at 14:20.
Pushed by habacker into branch 'master'.

Extend advanded headers/footers example with printing support

Adding printer support helps to see the issues with misplaced
header/footer.
Reviewed By: danders
Differential Revision: https://phabricator.kde.org/D19516

M  +1-1examples/HeadersFooters/Advanced/CMakeLists.txt
M  +59   -20   examples/HeadersFooters/Advanced/mainwindow.cpp
M  +7-0examples/HeadersFooters/Advanced/mainwindow.h
M  +78   -42   examples/HeadersFooters/Advanced/mainwindow.ui

https://commits.kde.org/kdiagram/03a7211df61c570430d7f4e436772dbd54810ef5

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-05 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

Ralf Habacker  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Resolution|FIXED   |---
 Status|RESOLVED|REOPENED

--- Comment #5 from Ralf Habacker  ---
This has been fixed for the KDE4 variant of KChart, which is embedded into
kmymoney sources. For a proposed KF5 fix see https://phabricator.kde.org/D19541

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-05 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

Ralf Habacker  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/kmy
   ||money/455c23400dd3e679879a2
   ||d77d2259fc63e852247
 Status|REPORTED|RESOLVED
   Version Fixed In||2.6.2

--- Comment #4 from Ralf Habacker  ---
Git commit 455c23400dd3e679879a2d77d2259fc63e852247 by Ralf Habacker.
Committed on 05/03/2019 at 13:08.
Pushed by habacker into branch '4.8-staging'.

Reimplement Chart::paint() to fix printing issues

The implementation has been taken from AbstractArea::paintIntoRectArea()
FIXED-IN:2.6.2

M  +10   -45   libkdchart/src/KDChart/KDChartChart.cpp

https://commits.kde.org/kmymoney/455c23400dd3e679879a2d77d2259fc63e852247

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-04 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

Ralf Habacker  changed:

   What|Removed |Added

 Attachment #118535|generated file  |printed file (partial fixed
description||with mentioned patch)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-04 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

Ralf Habacker  changed:

   What|Removed |Added

 Attachment #118537|Generated file (variant 2)  |printed file
description||

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-04 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

--- Comment #3 from Ralf Habacker  ---
For easier inspection I extended the advanced header/footer example with
printing support (see https://phabricator.kde.org/D19516)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-04 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

--- Comment #2 from Ralf Habacker  ---
Created attachment 118537
  --> https://bugs.kde.org/attachment.cgi?id=118537&action=edit
Generated file (variant 2)

The overlapping header/footer issue showed with attachment 118535 was generated
with the following fix applied, which tries to fix a header offset issue.

commit 76a2b05015832fd903b8a760ba2aeb2e8f484864 (temp)
Author: Ralf Habacker 
Date:   Mon Mar 4 13:37:30 2019 +0100

Fix geometry change in diagram header and footer

When outputting to a printer, the geometry of a diagram changes,
but a corresponding adjustment request was not passed on to the
header and footer layout.

CCBUG:405061

diff --git a/src/KChart/KChartChart.cpp b/src/KChart/KChartChart.cpp
index fa14b8a..6976e76 100644
--- a/src/KChart/KChartChart.cpp
+++ b/src/KChart/KChartChart.cpp
@@ -1382,6 +1382,10 @@ void Chart::paint( QPainter* painter, const QRect&
target )
 d->isFloatingLegendsLayoutDirty = true;
 invalidateLayoutTree( d->dataAndLegendLayout );
 d->dataAndLegendLayout->setGeometry( QRect( QPoint(), target.size() )
);
+invalidateLayoutTree( d->headerLayout );
+d->headerLayout->setGeometry( QRect( QPoint(), target.size() ) );
+invalidateLayoutTree( d->footerLayout );
+d->footerLayout->setGeometry( QRect( QPoint(), target.size() ) );
 }

 d->overrideSize = target.size();
@@ -1391,6 +1395,10 @@ void Chart::paint( QPainter* painter, const QRect&
target )
 if ( differentSize ) {
 invalidateLayoutTree( d->dataAndLegendLayout );
 d->dataAndLegendLayout->setGeometry( oldGeometry );
+invalidateLayoutTree( d->headerLayout );
+d->headerLayout->setGeometry( oldGeometry );
+invalidateLayoutTree( d->footerLayout );
+d->footerLayout->setGeometry( oldGeometry );
 d->isPlanesLayoutDirty = true;
 d->isFloatingLegendsLayoutDirty = true;
 }

While the patch fixes some of the offset issues, it seems to not be complete.

To be able to see the original state, a generated pdf file without this patch
has been added with this comment.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdiagram] [Bug 405075] Overlapping problem when printing header/footer lines

2019-03-04 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=405075

--- Comment #1 from Ralf Habacker  ---
Created attachment 118536
  --> https://bugs.kde.org/attachment.cgi?id=118536&action=edit
Screenshot from running kchart advanced header/footer example

-- 
You are receiving this mail because:
You are watching all bug changes.