20 #include "tdehtml_printsettings.h"
23 #include <tqcheckbox.h>
25 #include <tqwhatsthis.h>
27 TDEHTMLPrintSettings::TDEHTMLPrintSettings(TQWidget *parent,
const char *name)
28 : KPrintDialogPage(parent,
name)
31 TQString 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 TQString 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 TQString 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 setTitle(i18n(
"HTML Settings"));
73 m_printfriendly =
new TQCheckBox(i18n(
"Printer friendly mode (black text, no background)"),
this);
74 TQWhatsThis::add(m_printfriendly, whatsThisPrinterFriendlyMode);
75 m_printfriendly->setChecked(
true);
76 m_printimages =
new TQCheckBox(i18n(
"Print images"),
this);
77 TQWhatsThis::add(m_printimages, whatsThisPrintImages);
78 m_printimages->setChecked(
true);
79 m_printheader =
new TQCheckBox(i18n(
"Print header"),
this);
80 TQWhatsThis::add(m_printheader, whatsThisPrintHeader);
81 m_printheader->setChecked(
true);
83 TQVBoxLayout *l0 =
new TQVBoxLayout(
this, 0, 10);
84 l0->addWidget(m_printfriendly);
85 l0->addWidget(m_printimages);
86 l0->addWidget(m_printheader);
90 TDEHTMLPrintSettings::~TDEHTMLPrintSettings()
94 void TDEHTMLPrintSettings::getOptions(TQMap<TQString,TQString>& opts,
bool )
96 opts[
"app-khtml-printfriendly"] = (m_printfriendly->isChecked() ?
"true" :
"false");
97 opts[
"app-khtml-printimages"] = (m_printimages->isChecked() ?
"true" :
"false");
98 opts[
"app-khtml-printheader"] = (m_printheader->isChecked() ?
"true" :
"false");
101 void TDEHTMLPrintSettings::setOptions(
const TQMap<TQString,TQString>& opts)
103 m_printfriendly->setChecked(opts[
"app-khtml-printfriendly"] !=
"false");
104 m_printimages->setChecked(opts[
"app-khtml-printimages"] !=
"false");
105 m_printheader->setChecked(opts[
"app-khtml-printheader"] !=
"false");
108 #include "tdehtml_printsettings.moc"
TQString name(StdAccel id)