20#include "kmpropcontainer.h" 
   21#include "kmpropwidget.h" 
   23#include <kpushbutton.h> 
   26#include <kseparator.h> 
   29KMPropContainer::KMPropContainer(TQWidget *parent, 
const char *name)
 
   30: TQWidget(parent,name)
 
   32    KSeparator* sep = 
new KSeparator( KSeparator::HLine, 
this);
 
   33    sep->setFixedHeight(5);
 
   35    m_button = 
new KPushButton(KGuiItem(i18n(
"Change..."), 
"edit"), 
this);
 
   38    TQVBoxLayout    *main_ = 
new TQVBoxLayout(
this, 0, 10);
 
   39    TQHBoxLayout    *btn_ = 
new TQHBoxLayout(0, 0, 0);
 
   40    main_->addWidget(sep,0);
 
   41    main_->addLayout(btn_,0);
 
   43    btn_->addWidget(m_button);
 
   46KMPropContainer::~KMPropContainer()
 
   50void KMPropContainer::setWidget(KMPropWidget *w)
 
   55        m_widget->reparent(
this,TQPoint(0,0));
 
   56        connect(m_button,TQ_SIGNAL(clicked()),m_widget,TQ_SLOT(slotChange()));
 
   57        connect(m_widget,TQ_SIGNAL(enable(
bool)),TQ_SIGNAL(enable(
bool)));
 
   58        connect(m_widget,TQ_SIGNAL(enableChange(
bool)),TQ_SLOT(slotEnableChange(
bool)));
 
   59        TQVBoxLayout    *lay = 
dynamic_cast<TQVBoxLayout*
>(layout());
 
   62            lay->insertWidget(0,m_widget,1);
 
   67void KMPropContainer::setPrinter(KMPrinter *p)
 
   70        m_widget->setPrinterBase(p);
 
   73void KMPropContainer::slotEnableChange(
bool on)
 
   75    m_button->setEnabled(on && (m_widget ? m_widget->canChange() : 
true));
 
   77#include "kmpropcontainer.moc"