20 #include "kmpropdriver.h"
21 #include "kmprinter.h"
26 #include <tdelocale.h>
28 KMPropDriver::KMPropDriver(TQWidget *parent,
const char *name)
29 : KMPropWidget(parent,name)
31 m_manufacturer =
new TQLabel(
"",
this);
32 m_model =
new TQLabel(
"",
this);
33 m_driverinfo =
new TQLabel(
"",
this);
34 m_driverinfo->setTextFormat(TQt::RichText);
36 TQLabel *l1 =
new TQLabel(i18n(
"Manufacturer:"),
this);
37 TQLabel *l2 =
new TQLabel(i18n(
"Printer model:"),
this);
38 TQLabel *l3 =
new TQLabel(i18n(
"Driver info:"),
this);
41 TQGridLayout *main_ =
new TQGridLayout(
this, 4, 2, 10, 7);
42 main_->setColStretch(0,0);
43 main_->setColStretch(1,1);
44 main_->setRowStretch(3,1);
45 main_->addWidget(l1,0,0);
46 main_->addWidget(l2,1,0);
47 main_->addWidget(l3,2,0,TQt::AlignTop|TQt::AlignLeft);
48 main_->addWidget(m_manufacturer,0,1);
49 main_->addWidget(m_model,1,1);
50 main_->addWidget(m_driverinfo,2,1);
53 m_title = i18n(
"Driver");
54 m_header = i18n(
"Driver Settings");
57 KMPropDriver::~KMPropDriver()
61 void KMPropDriver::setPrinter(KMPrinter *p)
63 if (p && p->isPrinter())
65 m_manufacturer->setText(p->manufacturer());
66 m_model->setText(p->model());
67 m_driverinfo->setText(p->driverInfo());
69 emit enableChange(p->isLocal());
74 m_manufacturer->setText(
"");
76 m_driverinfo->setText(
"");
80 void KMPropDriver::configureWizard(KMWizard *w)
82 w->configure(KMWizard::Driver,KMWizard::DriverTest,
true);