• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KHTML

khtml_printsettings.cpp

Go to the documentation of this file.
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2002 Michael Goffioul <kdeprint@swing.be>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License version 2 as published by the Free Software Foundation.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #include "khtml_printsettings.h"
00021 
00022 #include <kdialog.h>
00023 #include <klocale.h>
00024 #include <QtGui/QCheckBox>
00025 #include <QtGui/QLayout>
00026 
00027 KHTMLPrintSettings::KHTMLPrintSettings(QWidget *parent)
00028     : QWidget(parent)
00029 {
00030     //WhatsThis strings.... (added by pfeifle@kde.org)
00031     QString whatsThisPrintImages = i18n( "<qt>"
00032         "<p><strong>'Print images'</strong></p>"
00033         "<p>"
00034         "If this checkbox is enabled, images contained in the HTML page will "
00035         "be printed. Printing may take longer and use more ink or toner."
00036         "</p>"
00037         "<p>"
00038         "If this checkbox is disabled, only the text of the HTML page will be "
00039         "printed, without the included images. Printing will be faster and use "
00040         "less ink or toner."
00041         "</p>"
00042                         " </qt>" );
00043     QString whatsThisPrintHeader = i18n( "<qt>"
00044         "<p><strong>'Print header'</strong></p>"
00045         "<p>"
00046         "If this checkbox is enabled, the printout of the HTML document will "
00047         "contain a header line at the top of each page. This header contains "
00048         "the current date, the location URL of the printed page and the page "
00049         "number."
00050         "</p>"
00051         "<p>"
00052         "If this checkbox is disabled, the printout of the HTML document will "
00053         "not contain such a header line."
00054         "</p>"
00055                         " </qt>" );
00056     QString whatsThisPrinterFriendlyMode = i18n( "<qt>"
00057         "<p><strong>'Printerfriendly mode'</strong></p>"
00058         "<p>"
00059         "If this checkbox is enabled, the printout of the HTML document will "
00060         "be black and white only, and all colored background will be converted "
00061         "into white. Printout will be faster and use less ink or toner."
00062         "</p>"
00063         "<p>"
00064         "If this checkbox is disabled, the printout of the HTML document will "
00065         "happen in the original color settings as you see in your application. "
00066         "This may result in areas of full-page color (or grayscale, if you use "
00067         "a black+white printer). Printout will possibly happen slower and will "
00068         "certainly use much more toner or ink."
00069         "</p>"
00070                         " </qt>" );
00071     setWindowTitle(i18n("HTML Settings"));
00072 
00073     m_printfriendly = new QCheckBox(i18n("Printer friendly mode (black text, no background)"), this);
00074     m_printfriendly->setWhatsThis(whatsThisPrinterFriendlyMode);
00075     m_printfriendly->setChecked(true);
00076     m_printimages = new QCheckBox(i18n("Print images"), this);
00077     m_printimages->setWhatsThis(whatsThisPrintImages);
00078     m_printimages->setChecked(true);
00079     m_printheader = new QCheckBox(i18n("Print header"), this);
00080     m_printheader->setWhatsThis(whatsThisPrintHeader);
00081     m_printheader->setChecked(true);
00082 
00083     QVBoxLayout *l0 = new QVBoxLayout(this);
00084     l0->setMargin(KDialog::marginHint());
00085     l0->setSpacing(KDialog::spacingHint());
00086     l0->addWidget(m_printfriendly);
00087     l0->addWidget(m_printimages);
00088     l0->addWidget(m_printheader);
00089     l0->addStretch(1);
00090 }
00091 
00092 KHTMLPrintSettings::~KHTMLPrintSettings()
00093 {
00094 }
00095 
00096 bool KHTMLPrintSettings::printFriendly()
00097 {
00098     return m_printfriendly->isChecked();
00099 }
00100 
00101 bool KHTMLPrintSettings::printImages()
00102 {
00103     return m_printimages->isChecked();
00104 }
00105 
00106 bool KHTMLPrintSettings::printHeader()
00107 {
00108     return m_printheader->isChecked();
00109 }
00110 
00111 
00112 #include "khtml_printsettings.moc"

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal