Commit Graph

1204 Commits

Author SHA1 Message Date
Filippo Gentile bd1f4efbdb PrintPreviewSceneProxy: use effective page size for font size
Calculate font size based on shorter edge of effective page size
This way when margin is bigger, font gets smaller
2022-01-23 21:06:37 +01:00
Filippo Gentile ce30ac0edc ScenePrintPreviewDlg: fix page just after setup dialog 2022-01-23 20:17:02 +01:00
Filippo Gentile 1c0646eb1a PrintOptionsPage: fix possible wrong page size 2022-01-23 20:13:31 +01:00
Filippo Gentile db70886108 PrintWizard: store a PrintLayoutOpt structure
PrintWorker: store copy of page layout
2022-01-23 19:59:26 +01:00
Filippo Gentile 3d25dc8171 ScenePrintPreviewDlg: fix page size sometimes wrong 2022-01-23 19:58:28 +01:00
Filippo Gentile d9bfe81cfd PrintOptionsPage: remove standard preview dialog 2022-01-23 16:22:37 +01:00
Filippo Gentile cf40959137 PrintPreviewSceneProxy: removed getters, use PageLayoutOpt directly
ScenePrintPreviewDlg: adapt to scene
2022-01-23 15:11:13 +01:00
Filippo Gentile 09ae6d932f PrintPreviewSceneProxy: allow to set page margins
- Draw page margins on top istead of below real page borders
2022-01-23 15:00:39 +01:00
Filippo Gentile eb6c94e59b PrintOptionsPage: update page layout after preview 2022-01-23 14:47:18 +01:00
Filippo Gentile ce689d5250 ScenePrintPreviewDlg: fix compilation, missing semicolon
CustomPageSetupDlg: fix not updating page size
2022-01-23 14:42:28 +01:00
Filippo Gentile 06e72ff1e7 PrintOptionsPage: allow to setup pages also for PDF 2022-01-23 14:35:01 +01:00
Filippo Gentile f4878cafb7 ScenePrintPreviewDlg: use QPageLayout directly 2022-01-23 14:34:36 +01:00
Filippo Gentile 3b532959a0 CustomPageSetupDlg: use QPageLayout::Orientation
It has better names than Qt::Orientation enum
2022-01-23 14:34:11 +01:00
Filippo Gentile d4c22f3d94 ScenePrintPreviewDlg: allow to setup page layout 2022-01-23 14:09:14 +01:00
Filippo Gentile 55ede00bd5 CustomPageSetupDlg: new dialog to set page on PDF printers
PageSizeModel: new model for page combobox
2022-01-23 13:58:55 +01:00
Filippo Gentile 1cc32a1913 PrintPreviewSceneProxy: draw page numbers on top of page rects 2022-01-23 13:12:29 +01:00
Filippo Gentile 63e94bfdab PrintPreviewSceneProxy: draw real page borders along margins 2022-01-23 12:58:36 +01:00
Filippo Gentile eaf8773004 PrintPreviewSceneProxy: draw row/column numbers on headers 2022-01-22 00:04:36 +01:00
Filippo Gentile 35b62322b2 ScenePrintPreviewDlg: painter coordinates are in points (dots) 2022-01-21 23:50:30 +01:00
Filippo Gentile 9b88e8cc1c PrintPreviewSceneProxy: fix vertical header
- Fix page count calculation (it was adding extra pages)
- Wash out colors of source scene in green so red page borders are more
visible
2022-01-21 23:22:48 +01:00
Filippo Gentile 472618ca80 PrintPreviewSceneProxy: shift by top left margin
- Move page drawing to drawPageBorders()
2022-01-21 19:02:44 +01:00
Filippo Gentile 5881f9135e ScenePrintPreviewDlg: pass zoom to proxy scene
Do not store zoom value, use BasicGraphView one
2022-01-21 18:22:00 +01:00
Filippo Gentile 91fd9abf1f LineGraphScene, ShiftGraphScene: fix function signature 2022-01-21 18:18:19 +01:00
Filippo Gentile a6cae27f8b IGraphScene: pass view scrolling in renderHeader()
This mainly is needed for proxy scenes.
2022-01-21 18:17:30 +01:00
Filippo Gentile 36df87b012 ScenePrintPreviewDlg: keep header size fixed
Keep header size independent from view zoom.
Use Qt::FlatCap for borders QPen to avoid exceeding line limits on big
zoom levels
2022-01-21 16:03:53 +01:00
Filippo Gentile e83d1d73f0 PrintPreviewSceneProxy: fix page borders limits
No need to updatePageLay() when source size changes
page caluclation is done already by updateSourceSizeAndRedraw()
2022-01-21 15:49:55 +01:00
Filippo Gentile 5979af91df PrintPreviewSceneProxy: cut page border lines, consider scale 2022-01-21 15:44:12 +01:00
Filippo Gentile 5eaabb9174 ShiftGraphScene: use floating point lines for better precision 2022-01-21 15:37:10 +01:00
Filippo Gentile de2f8dd414 ScenePrintPreviewDlg: set an initial default size 2022-01-21 15:36:44 +01:00
Filippo Gentile 8d05b55732 PrintPreviewSceneProxy: updatePageLay() on scene size change
Draw effective page borders inside margins on top
2022-01-21 15:36:21 +01:00
Filippo Gentile 01fe4d938a ScenePrintPreviewDlg: allow to scale source scene 2022-01-21 01:17:09 +01:00
Filippo Gentile b142d3f537 PrintPreviewSceneProxy: allow to set a page layout 2022-01-21 01:16:48 +01:00
Filippo Gentile 0226e08b0f PrintHelper: allow fractional QPen widths 2022-01-21 01:16:21 +01:00
Filippo Gentile 3d9d1e9b4b PrintPreviewSceneProxy: allow to scale source scene 2022-01-21 00:46:09 +01:00
Filippo Gentile 159d046773 ScenePrintPreviewDlg: allow to reset zoom on double click 2022-01-21 00:10:28 +01:00
Filippo Gentile 9c595279b2 LineGraphScene: allow fractional contents size 2022-01-20 23:57:54 +01:00
Filippo Gentile 1cd0b19536 PrintOptionsPage: temporary show new preview dialog 2022-01-20 23:40:13 +01:00
Filippo Gentile 9e541c7986 PrintPreviewSceneProxy: new IGraphScene proxy
Used in conjunction with ScenePrintPreviewDlg to draw a print preview on
top of a source IGraphucScene
2022-01-20 23:39:53 +01:00
Filippo Gentile 892bc9a6cf LineGraphToolbar: fix doxygen comment
LineGraphScene: add space
2022-01-20 23:38:44 +01:00
Filippo Gentile 73e5e6e179 ShiftGraphScene: move tooltip handling to ShiftGraphView 2022-01-20 22:24:58 +01:00
Filippo Gentile 5e56dc4b39 Doxygen: fix documentation
- BackgroundHelper: remove reference to deprecated classes
- IPagedItemModel: escape # character to suppress warning
2022-01-20 22:23:44 +01:00
Filippo Gentile 71f1e32c92 ShiftGraphEditor: adapt to scene changes 2022-01-20 21:58:22 +01:00
Filippo Gentile 40aff7d14a ShiftGraphHourPanel, ShiftGraphNameHeader: remove deprecated
They are replaced by BasicGraphHeader
2022-01-20 21:57:36 +01:00
Filippo Gentile 4d88c236e0 ShiftGraphScene: subclass IGraphScene
ShiftGraphView: subclass BasicGraphView
2022-01-20 21:56:16 +01:00
Filippo Gentile f46fe790d3 PrintWorker: adapt to LineGraphScene changes 2022-01-20 20:21:52 +01:00
Filippo Gentile 9e56c4f55e LineGraphManager: adapt to LineGraphScene changes 2022-01-20 20:21:41 +01:00
Filippo Gentile 06e929d1eb StationLabelsHeader, HourPanel: remove old classes
They are now replaced by BasicGraphHeader
2022-01-20 20:21:16 +01:00
Filippo Gentile 9562a667eb LineGraphView: subclass BasicGraphView 2022-01-20 20:18:06 +01:00
Filippo Gentile f0ed0bcaf6 BasicGraphView: react to scene header size changes 2022-01-20 20:03:20 +01:00
Filippo Gentile ff475f3eb8 LineGraphScene: subclass IGraphScene
- BackgroundHelper: adapt header drawing
2022-01-20 20:02:56 +01:00