kdeprint Library API Documentation

kmproprlpr.cpp

00001 /* 00002 * This file is part of the KDE libraries 00003 * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License version 2 as published by the Free Software Foundation. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this library; see the file COPYING.LIB. If not, write to 00016 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 * Boston, MA 02111-1307, USA. 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 // layout 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 }
KDE Logo
This file is part of the documentation for kdeprint Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 16 17:23:17 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003