2 * This file is part of the KDE libraries
3 * Copyright (c) 2002 Michael Goffioul <kdeprint@swing.be>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License version 2 as published by the Free Software Foundation.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #include "khtml_printsettings.h"
24 #include <QtGui/QCheckBox>
25 #include <QtGui/QLayout>
27 KHTMLPrintSettings::KHTMLPrintSettings(QWidget
*parent
)
30 //WhatsThis strings.... (added by pfeifle@kde.org)
31 QString whatsThisPrintImages
= i18n( "<qt>"
32 "<p><strong>'Print images'</strong></p>"
34 "If this checkbox is enabled, images contained in the HTML page will "
35 "be printed. Printing may take longer and use more ink or toner."
38 "If this checkbox is disabled, only the text of the HTML page will be "
39 "printed, without the included images. Printing will be faster and use "
43 QString whatsThisPrintHeader
= i18n( "<qt>"
44 "<p><strong>'Print header'</strong></p>"
46 "If this checkbox is enabled, the printout of the HTML document will "
47 "contain a header line at the top of each page. This header contains "
48 "the current date, the location URL of the printed page and the page "
52 "If this checkbox is disabled, the printout of the HTML document will "
53 "not contain such a header line."
56 QString whatsThisPrinterFriendlyMode
= i18n( "<qt>"
57 "<p><strong>'Printerfriendly mode'</strong></p>"
59 "If this checkbox is enabled, the printout of the HTML document will "
60 "be black and white only, and all colored background will be converted "
61 "into white. Printout will be faster and use less ink or toner."
64 "If this checkbox is disabled, the printout of the HTML document will "
65 "happen in the original color settings as you see in your application. "
66 "This may result in areas of full-page color (or grayscale, if you use "
67 "a black+white printer). Printout will possibly happen slower and will "
68 "certainly use much more toner or ink."
71 setWindowTitle(i18n("HTML Settings"));
73 m_printfriendly
= new QCheckBox(i18n("Printer friendly mode (black text, no background)"), this);
74 m_printfriendly
->setWhatsThis(whatsThisPrinterFriendlyMode
);
75 m_printfriendly
->setChecked(true);
76 m_printimages
= new QCheckBox(i18n("Print images"), this);
77 m_printimages
->setWhatsThis(whatsThisPrintImages
);
78 m_printimages
->setChecked(true);
79 m_printheader
= new QCheckBox(i18n("Print header"), this);
80 m_printheader
->setWhatsThis(whatsThisPrintHeader
);
81 m_printheader
->setChecked(true);
83 QVBoxLayout
*l0
= new QVBoxLayout(this);
84 l0
->setMargin(KDialog::marginHint());
85 l0
->setSpacing(KDialog::spacingHint());
86 l0
->addWidget(m_printfriendly
);
87 l0
->addWidget(m_printimages
);
88 l0
->addWidget(m_printheader
);
92 KHTMLPrintSettings::~KHTMLPrintSettings()
96 bool KHTMLPrintSettings::printFriendly()
98 return m_printfriendly
->isChecked();
101 bool KHTMLPrintSettings::printImages()
103 return m_printimages
->isChecked();
106 bool KHTMLPrintSettings::printHeader()
108 return m_printheader
->isChecked();
112 #include "khtml_printsettings.moc"