MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / print

Method print

src/dialogs/MainWindow.cpp:1532–1549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1530}
1531
1532void MainWindow::print()
1533{
1534 QPrintPreviewDialog printDialog(this, Qt::Window);
1535 EditorPrintPreviewRenderer renderer(currentEditor());
1536
1537 connect(&printDialog, &QPrintPreviewDialog::paintRequested, &renderer, &EditorPrintPreviewRenderer::render);
1538
1539 // TODO: load/save the page layout that was used and reload it next time
1540 //preview.printer()->setPageLayout( /* todo */ );
1541
1542 printDialog.printer()->setPageMargins(QMarginsF(.5, .5, .5, .5), QPageLayout::Inch);
1543
1544 connect(&printDialog, &QPrintPreviewDialog::accepted, this, [&]() {
1545 qInfo() << printDialog.printer()->pageLayout();
1546 });
1547
1548 printDialog.exec();
1549}
1550
1551void MainWindow::convertEOLs(int eolMode)
1552{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected