Bug 430452

Summary: Printing with row labels or on multiple pages does not work well
Product: [Applications] kdiagram Reporter: Dag Andersen <dag.andersen>
Component: KGanttAssignee: Dag Andersen <dag.andersen>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 2.7.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 2.7.89
Sentry Crash Report:

Description Dag Andersen 2020-12-16 07:50:16 UTC
1) The row labels are overprinted with parts of the diagram when specifying a start other than diagram start.

2) If there are more rows than fit on one page, the text is scaled to fit and will become illegible.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Dag Andersen 2020-12-18 10:42:55 UTC
Git commit 0bbdab1fe08f11403a21b7ed07338e9128eb8d21 by Dag Andersen.
Committed on 18/12/2020 at 09:58.
Pushed by danders into branch 'master'.

Fix Bug 430452 - Printing with row labels on multiple pages does not work well

Adds three scaling options:
- NoScaling to print the diagram on as many pages as needed.
- FitSingle to fit the diagram into a single page.
- FitVertical to fit diagram height to page height
  Might still print multiple pages 'horizontally'.

Issues:
- Bottom- and right margins not respected.
- Printing the datetime header above the rowlabels is not optimal
  especially when start is not at the diagram start.
- When start > diagram start and/or end < diagram end, lines may
  be empty because items lay outside the range.
  These should be removed from the printout.
FIXED-IN: 2.7.89

M  +1    -0    examples/Gantt/CMakeLists.txt
A  +9    -0    examples/Gantt/printing/CMakeLists.txt
A  +59   -0    examples/Gantt/printing/main.cpp     [License: GPL (v2+)]
A  +513  -0    examples/Gantt/printing/mainwindow.cpp     [License: GPL (v2+)]
A  +96   -0    examples/Gantt/printing/mainwindow.h     [License: GPL (v2+)]
A  +360  -0    examples/Gantt/printing/projectmodel.cpp     [License: GPL (v2+)]
A  +56   -0    examples/Gantt/printing/projectmodel.h     [License: GPL (v2+)]
M  +2    -0    src/KGantt/CMakeLists.txt
M  +117  -28   src/KGantt/kganttgraphicsscene.cpp
M  +11   -0    src/KGantt/kganttgraphicsscene.h
M  +4    -0    src/KGantt/kganttgraphicsview.cpp
M  +9    -0    src/KGantt/kganttgraphicsview.h
A  +128  -0    src/KGantt/kganttprintingcontext.cpp     [License: GPL (v2+)]
A  +118  -0    src/KGantt/kganttprintingcontext.h     [License: GPL (v2+)]
M  +4    -0    src/KGantt/kganttview.cpp
M  +9    -0    src/KGantt/kganttview.h

https://invent.kde.org/graphics/kdiagram/commit/0bbdab1fe08f11403a21b7ed07338e9128eb8d21