• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeprint
 

tdeprint

  • tdeprint
  • management
kmconfigpreview.cpp
1/*
2 * This file is part of the KDE libraries
3 * Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
4 *
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.
8 *
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.
13 *
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.
18 **/
19
20#include "kmconfigpreview.h"
21
22#include <tqcheckbox.h>
23#include <tqlayout.h>
24#include <tqgroupbox.h>
25#include <tqlabel.h>
26
27#include <tdelocale.h>
28#include <kurlrequester.h>
29#include <tdeconfig.h>
30#include <kdialog.h>
31
32KMConfigPreview::KMConfigPreview(TQWidget *parent, const char *name)
33: KMConfigPage(parent, name)
34{
35 setPageName(i18n("Preview"));
36 setPageHeader(i18n("Preview Settings"));
37 setPagePixmap("filefind");
38
39 TQGroupBox *box = new TQGroupBox(0, TQt::Vertical, i18n("Preview Program"), this);
40
41 m_useext = new TQCheckBox(i18n("&Use external preview program"), box);
42 m_program = new KURLRequester(box);
43 TQLabel *lab = new TQLabel(box);
44 lab->setText(i18n("You can use an external preview program (PS viewer) instead of the "
45 "TDE built-in preview system. Note that if the TDE default PS viewer "
46 "(KGhostView) cannot be found, TDE tries automatically to find another "
47 "external PostScript viewer"));
48 lab->setTextFormat(TQt::RichText);
49
50 TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
51 l0->addWidget(box);
52 l0->addStretch(1);
53 TQVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
54 l1->addWidget(lab);
55 l1->addWidget(m_useext);
56 l1->addWidget(m_program);
57
58 connect(m_useext, TQ_SIGNAL(toggled(bool)), m_program, TQ_SLOT(setEnabled(bool)));
59 m_program->setEnabled(false);
60}
61
62void KMConfigPreview::loadConfig(TDEConfig *conf)
63{
64 conf->setGroup("General");
65 m_useext->setChecked(conf->readBoolEntry("ExternalPreview", false));
66 m_program->setURL(conf->readPathEntry("PreviewCommand", "gv"));
67}
68
69void KMConfigPreview::saveConfig(TDEConfig *conf)
70{
71 conf->setGroup("General");
72 conf->writeEntry("ExternalPreview", m_useext->isChecked());
73 conf->writePathEntry("PreviewCommand", m_program->url());
74}

tdeprint

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

tdeprint

Skip menu "tdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeprint by doxygen 1.9.4
This website is maintained by Timothy Pearson.