20 #include "kmlpduimanager.h"
21 #include "kmfactory.h"
22 #include "kmmanager.h"
24 #include "kmwbackend.h"
25 #include "kmpropertypage.h"
26 #include "kmpropbackend.h"
27 #include "kmpropdriver.h"
30 #include <tdelocale.h>
32 KMLpdUiManager::KMLpdUiManager(TQObject *parent,
const char *name)
33 : KMUiManager(parent,name)
37 KMLpdUiManager::~KMLpdUiManager()
41 void KMLpdUiManager::setupWizard(KMWizard *wizard)
43 KMWBackend *backend = wizard->backendPage();
44 backend->addBackend(KMWizard::Local,i18n(
"Local printer (parallel, serial, USB)"),
true);
45 backend->addBackend(KMWizard::LPD,i18n(
"Remote LPD queue"),
true);
46 backend->addBackend(KMWizard::SMB,i18n(
"SMB shared printer (Windows)"),
false,KMWizard::Password);
47 backend->addBackend(KMWizard::TCP,i18n(
"Network printer (TCP)"),
false);
48 backend->addBackend(KMWizard::File,i18n(
"File printer (print to file)"),
true);
50 KMManager *mgr = KMFactory::self()->manager();
51 if (TQFile::exists(mgr->driverDirectory()+
"/smbprint")) backend->enableBackend(KMWizard::SMB,
true);
52 if (TQFile::exists(mgr->driverDirectory()+
"/directprint")) backend->enableBackend(KMWizard::TCP,
true);
53 if (TQFile::exists(mgr->driverDirectory()+
"/ncpprint")) backend->enableBackend(KMWizard::Custom+1,
true);
56 void KMLpdUiManager::setupPropertyPages(KMPropertyPage *p)
58 p->addPropPage(
new KMPropBackend(p,
"Backend"));
59 p->addPropPage(
new KMPropDriver(p,
"Driver"));