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

kdeprint

kmconfigcupsdir.cpp
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2001 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 "kmconfigcupsdir.h"
00021 
00022 #include <tqcheckbox.h>
00023 #include <kurlrequester.h>
00024 #include <klocale.h>
00025 #include <kdialog.h>
00026 #include <kconfig.h>
00027 #include <tqgroupbox.h>
00028 #include <tqlayout.h>
00029 #include <kcursor.h>
00030 
00031 KMConfigCupsDir::KMConfigCupsDir(TQWidget *parent)
00032 : KMConfigPage(parent,"ConfigCupsDir")
00033 {
00034     setPageName(i18n("Folder"));
00035     setPageHeader(i18n("CUPS Folder Settings"));
00036     setPagePixmap("folder");
00037 
00038     TQGroupBox *m_dirbox = new TQGroupBox(0, Qt::Vertical, i18n("Installation Folder"), this);
00039     m_installdir = new KURLRequester(m_dirbox);
00040     m_installdir->setMode((KFile::Mode)(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly));
00041     m_stddir = new TQCheckBox(i18n("Standard installation (/)"), m_dirbox);
00042     m_stddir->setCursor(KCursor::handCursor());
00043 
00044     TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
00045     lay0->addWidget(m_dirbox);
00046     lay0->addStretch(1);
00047     TQVBoxLayout *lay1 = new TQVBoxLayout(TQT_TQLAYOUT(m_dirbox->layout()), 10);
00048     lay1->addWidget(m_stddir);
00049     lay1->addWidget(m_installdir);
00050 
00051     connect(m_stddir,TQT_SIGNAL(toggled(bool)),m_installdir,TQT_SLOT(setDisabled(bool)));
00052     m_stddir->setChecked(true);
00053 }
00054 
00055 void KMConfigCupsDir::loadConfig(KConfig *conf)
00056 {
00057     conf->setGroup("CUPS");
00058     QString dir = conf->readPathEntry("InstallDir");
00059     m_stddir->setChecked(dir.isEmpty());
00060     m_installdir->setURL(dir);
00061 }
00062 
00063 void KMConfigCupsDir::saveConfig(KConfig *conf)
00064 {
00065     conf->setGroup("CUPS");
00066     conf->writePathEntry("InstallDir",(m_stddir->isChecked() ? TQString::null : m_installdir->url()));
00067 }

kdeprint

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

kdeprint

Skip menu "kdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeprint by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |