20 #include "kmpropertypage.h"
21 #include "kmpropwidget.h"
22 #include "kmpropcontainer.h"
23 #include "kmprinter.h"
24 #include "kmfactory.h"
25 #include "kmuimanager.h"
27 #include "kmpropgeneral.h"
30 #include <kiconloader.h>
32 KMPropertyPage::KMPropertyPage(TQWidget *parent,
const char *name)
33 : CJanusWidget(parent,name)
35 m_widgets.setAutoDelete(
false);
40 KMPropertyPage::~KMPropertyPage()
44 void KMPropertyPage::setPrinter(KMPrinter *p)
46 TQPtrListIterator<KMPropWidget> it(m_widgets);
47 for (;it.current();++it)
48 it.current()->setPrinterBase(p);
51 void KMPropertyPage::addPropPage(KMPropWidget *w)
56 KMPropContainer *ctn =
new KMPropContainer(
this,
"Container");
58 connect(ctn,TQ_SIGNAL(enable(
bool)),TQ_SLOT(slotEnable(
bool)));
60 TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon(
65 addPage(ctn,w->title(),w->header(),icon);
69 void KMPropertyPage::slotEnable(
bool on)
71 TQWidget *w = (TQWidget*)(sender());
78 void KMPropertyPage::initialize()
81 addPropPage(
new KMPropGeneral(
this,
"General"));
83 KMFactory::self()->uiManager()->setupPropertyPages(
this);
86 void KMPropertyPage::reload()
94 #include "kmpropertypage.moc"