Changeset View
Changeset View
Standalone View
Standalone View
src/print.cpp
Show All 13 Lines | |||||
14 | * Lesser General Public License for more details. | 14 | * Lesser General Public License for more details. | ||
15 | * | 15 | * | ||
16 | * You should have received a copy of the GNU Lesser General Public | 16 | * You should have received a copy of the GNU Lesser General Public | ||
17 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 17 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
18 | * | 18 | * | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "print.h" | 21 | #include "print.h" | ||
22 | #include "utils.h" | ||||
22 | 23 | | |||
23 | #include <KProcess> | 24 | #include <KProcess> | ||
24 | 25 | | |||
25 | #include <QFile> | 26 | #include <QFile> | ||
26 | #include <QLoggingCategory> | 27 | #include <QLoggingCategory> | ||
27 | #include <QPrinter> | 28 | #include <QPrinter> | ||
28 | #include <QPrintEngine> | 29 | #include <QPrintEngine> | ||
29 | #include <QPrintDialog> | 30 | #include <QPrintDialog> | ||
▲ Show 20 Lines • Show All 564 Lines • ▼ Show 20 Line(s) | 594 | } else if (orientation == QLatin1String("portrait") || | |||
594 | orientation == QLatin1String("reverse_portrait")) { | 595 | orientation == QLatin1String("reverse_portrait")) { | ||
595 | printer->setPageOrientation(QPageLayout::Portrait); | 596 | printer->setPageOrientation(QPageLayout::Portrait); | ||
596 | } | 597 | } | ||
597 | } | 598 | } | ||
598 | 599 | | |||
599 | printer->setPageMargins(pageMargins, QPageLayout::Millimeter); | 600 | printer->setPageMargins(pageMargins, QPageLayout::Millimeter); | ||
600 | 601 | | |||
601 | QPrintDialog *printDialog = new QPrintDialog(printer); | 602 | QPrintDialog *printDialog = new QPrintDialog(printer); | ||
603 | Utils::setParentWindow(printDialog, parent_window); | ||||
602 | 604 | | |||
603 | // Process options | 605 | // Process options | ||
604 | 606 | | |||
605 | if (options.contains(QLatin1String("modal"))) { | 607 | if (options.contains(QLatin1String("modal"))) { | ||
606 | printDialog->setModal(options.value(QLatin1String("modal")).toBool()); | 608 | printDialog->setModal(options.value(QLatin1String("modal")).toBool()); | ||
607 | } | 609 | } | ||
608 | 610 | | |||
609 | // Pass back what we configured | 611 | // Pass back what we configured | ||
▲ Show 20 Lines • Show All 368 Lines • Show Last 20 Lines |