20 #include "kmconfiglpr.h"
21 #include "lprsettings.h"
23 #include <tqcombobox.h>
26 #include <tqgroupbox.h>
27 #include <tdelocale.h>
28 #include <tdeconfig.h>
30 KMConfigLpr::KMConfigLpr(TQWidget *parent,
const char *name)
31 : KMConfigPage(parent, name)
33 setPageName(i18n(
"Spooler"));
34 setPageHeader(i18n(
"Spooler Settings"));
35 setPagePixmap(
"gear");
37 TQGroupBox *m_modebox =
new TQGroupBox(1, TQt::Vertical, i18n(
"Spooler"),
this);
39 m_mode =
new TQComboBox(m_modebox);
40 m_mode->insertItem(
"LPR (BSD compatible)");
41 m_mode->insertItem(
"LPRng");
43 TQVBoxLayout *l0 =
new TQVBoxLayout(
this, 5, 10);
44 l0->addWidget(m_modebox);
48 void KMConfigLpr::loadConfig(TDEConfig*)
50 m_mode->setCurrentItem(LprSettings::self()->mode());
53 void KMConfigLpr::saveConfig(TDEConfig *conf)
55 LprSettings::self()->setMode((LprSettings::Mode)(m_mode->currentItem()));
58 switch (m_mode->currentItem())
61 case 0: modestr =
"LPR";
break;
62 case 1: modestr =
"LPRng";
break;
64 conf->setGroup(
"LPR");
65 conf->writeEntry(
"Mode", modestr);