20 #include "kmconfigjobs.h"
22 #include <tqgroupbox.h>
25 #include <knuminput.h>
26 #include <tdelocale.h>
27 #include <tdeconfig.h>
30 KMConfigJobs::KMConfigJobs(TQWidget *parent,
const char *name)
31 : KMConfigPage(parent, name)
33 setPageName(i18n(
"Jobs"));
34 setPageHeader(i18n(
"Print Job Settings"));
35 setPagePixmap(
"application-x-executable");
37 TQGroupBox *box =
new TQGroupBox(0, TQt::Vertical, i18n(
"Jobs Shown"),
this);
39 m_limit =
new KIntNumInput(box);
40 m_limit->setRange(0, 9999, 1,
true);
41 m_limit->setSpecialValueText(i18n(
"Unlimited"));
42 m_limit->setLabel(i18n(
"Maximum number of jobs shown:"));
44 TQVBoxLayout *l0 =
new TQVBoxLayout(
this, 0, KDialog::spacingHint());
45 l0->addWidget(box, 0);
47 TQVBoxLayout *l1 =
new TQVBoxLayout(box->layout(), KDialog::spacingHint());
48 l1->addWidget(m_limit);
51 void KMConfigJobs::loadConfig(TDEConfig *conf)
53 conf->setGroup(
"Jobs");
54 m_limit->setValue(conf->readNumEntry(
"Limit", 0));
57 void KMConfigJobs::saveConfig(TDEConfig *conf)
59 conf->setGroup(
"Jobs");
60 conf->writeEntry(
"Limit", m_limit->value());
63 #include "kmconfigjobs.moc"