00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#include "kmproprlpr.h"
00021
#include "kmprinter.h"
00022
#include "kmwizard.h"
00023
00024
#include <qlabel.h>
00025
#include <qlayout.h>
00026
#include <klocale.h>
00027
00028 KMPropRlpr::KMPropRlpr(
QWidget *parent,
const char *name)
00029 : KMPropWidget(parent,name)
00030 {
00031 m_host =
new QLabel(
"",
this);
00032 m_queue =
new QLabel(
"",
this);
00033
00034
QLabel *l1 =
new QLabel(i18n(
"Host:"),
this);
00035
QLabel *l2 =
new QLabel(i18n(
"Queue:"),
this);
00036
00037
00038
QGridLayout *main_ =
new QGridLayout(
this, 3, 2, 10, 7);
00039 main_->setColStretch(0,0);
00040 main_->setColStretch(1,1);
00041 main_->setRowStretch(2,1);
00042 main_->addWidget(l1,0,0);
00043 main_->addWidget(l2,1,0);
00044 main_->addWidget(m_host,0,1);
00045 main_->addWidget(m_queue,1,1);
00046
00047 m_pixmap =
"connect_established";
00048 m_title = i18n(
"Queue");
00049 m_header = i18n(
"Remote LPD Queue Settings");
00050 }
00051
00052 KMPropRlpr::~KMPropRlpr()
00053 {
00054 }
00055
00056
void KMPropRlpr::setPrinter(KMPrinter *p)
00057 {
00058
if (p && !p->isSpecial())
00059 {
00060 m_host->setText(p->option(
"host"));
00061 m_queue->setText(p->option(
"queue"));
00062 emit enable(
true);
00063 }
00064
else
00065 {
00066 emit enable(
false);
00067 m_host->setText(
"");
00068 m_queue->setText(
"");
00069 }
00070 }
00071
00072
void KMPropRlpr::configureWizard(KMWizard *w)
00073 {
00074 w->configure(KMWizard::Custom+1,KMWizard::Custom+1,
true);
00075 }