kmconfigjobs.cpp
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #include "kmconfigjobs.h"
00021 
00022 #include <qgroupbox.h>
00023 #include <qlayout.h>
00024 
00025 #include <knuminput.h>
00026 #include <klocale.h>
00027 #include <kconfig.h>
00028 #include <kdialog.h>
00029 
00030 KMConfigJobs::KMConfigJobs(QWidget *parent, const char *name)
00031 : KMConfigPage(parent, name)
00032 {
00033     setPageName(i18n("Jobs"));
00034     setPageHeader(i18n("Print Job Settings"));
00035     setPagePixmap("exec");
00036 
00037     QGroupBox   *box = new QGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this);
00038 
00039     m_limit = new KIntNumInput(box);
00040     m_limit->setRange(0, 9999, 1, true);
00041     m_limit->setSpecialValueText(i18n("Unlimited"));
00042     m_limit->setLabel(i18n("Maximum number of jobs shown:"));
00043 
00044     QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
00045     l0->addWidget(box, 0);
00046     l0->addStretch(1);
00047     QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
00048     l1->addWidget(m_limit);
00049 }
00050 
00051 void KMConfigJobs::loadConfig(KConfig *conf)
00052 {
00053     conf->setGroup("Jobs");
00054     m_limit->setValue(conf->readNumEntry("Limit", 0));
00055 }
00056 
00057 void KMConfigJobs::saveConfig(KConfig *conf)
00058 {
00059     conf->setGroup("Jobs");
00060     conf->writeEntry("Limit", m_limit->value());
00061 }
00062 
00063 #include "kmconfigjobs.moc"
 
This file is part of the documentation for kdeprint Library Version 3.2.0.