20 #include "kmpropwidget.h"
22 #include "kmfactory.h"
23 #include "kmmanager.h"
26 #include <tdemessagebox.h>
27 #include <tdelocale.h>
29 KMPropWidget::KMPropWidget(TQWidget *parent,
const char *name)
30 : TQWidget(parent,name)
33 m_title = m_header =
"Title";
35 m_canchange = ((KMFactory::self()->manager()->printerOperationMask() & KMManager::PrinterCreation) && KMFactory::self()->manager()->hasManagement());
37 connect(
this,TQ_SIGNAL(enable(
bool)),
this,TQ_SIGNAL(enableChange(
bool)));
40 KMPropWidget::~KMPropWidget()
44 void KMPropWidget::slotChange()
46 KMTimer::self()->hold();
47 int value = requestChange();
50 KMessageBox::error(
this, i18n(
"<qt>Unable to change printer properties. Error received from manager:<p>%1</p></qt>").arg(KMManager::self()->errorMsg()));
51 KMManager::self()->setErrorMsg(TQString::null);
53 KMTimer::self()->release((value == 1));
56 void KMPropWidget::setPrinterBase(KMPrinter *p)
62 void KMPropWidget::setPrinter(KMPrinter*)
66 void KMPropWidget::configureWizard(KMWizard*)
74 int KMPropWidget::requestChange()
79 configureWizard(&dlg);
80 dlg.setPrinter(m_printer);
82 return (KMFactory::self()->manager()->modifyPrinter(m_printer,dlg.printer()) ? 1 : -1);
86 #include "kmpropwidget.moc"