Okular

printoptionswidget.cpp
1/*
2 SPDX-FileCopyrightText: 2019 Michael Weghorn <m.weghorn@posteo.de>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "printoptionswidget.h"
8
9#include <QComboBox>
10#include <QFormLayout>
11
12#include <KLocalizedString>
13
14namespace Okular
15{
16DefaultPrintOptionsWidget::DefaultPrintOptionsWidget(QWidget *parent)
17 : PrintOptionsWidget(parent)
18{
19 setWindowTitle(i18n("Print Options"));
20 QFormLayout *layout = new QFormLayout(this);
21 m_ignorePrintMargins = new QComboBox;
22 // value indicates whether full page is enabled (i.e. print margins ignored)
23 m_ignorePrintMargins->insertItem(0, i18n("Fit to printable area"), false);
24 m_ignorePrintMargins->insertItem(1, i18n("Fit to full page"), true);
25 layout->addRow(i18n("Scale mode:"), m_ignorePrintMargins);
26}
27
28bool DefaultPrintOptionsWidget::ignorePrintMargins() const
29{
30 return m_ignorePrintMargins->currentData().value<bool>();
31}
32
33}
QString i18n(const char *text, const TYPE &arg...)
global.h
Definition action.h:17
void insertItem(int index, const QIcon &icon, const QString &text, const QVariant &userData)
void addRow(QLayout *layout)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.