kmpropgeneral.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#include "kmpropgeneral.h"
00021
#include "kmprinter.h"
00022
#include "kmwizard.h"
00023
#include "kmfactory.h"
00024
#include "kmmanager.h"
00025
00026
#include <qlabel.h>
00027
#include <qlayout.h>
00028
#include <klocale.h>
00029
00030 KMPropGeneral::KMPropGeneral(
QWidget *parent,
const char *name)
00031 : KMPropWidget(parent,name)
00032 {
00033 m_name =
new QLabel(
"",
this);
00034 m_location =
new QLabel(
"",
this);
00035 m_description =
new QLabel(
"",
this);
00036
00037 QLabel *l1 =
new QLabel(i18n(
"Printer name:"),
this);
00038 QLabel *l2 =
new QLabel(i18n(
"Physical Location",
"Location:"),
this);
00039 QLabel *l3 =
new QLabel(i18n(
"Description:"),
this);
00040
00041
00042
QGridLayout *main_ =
new QGridLayout(
this, 4, 2, 10, 7);
00043 main_->
setColStretch(0,0);
00044 main_->
setColStretch(1,1);
00045 main_->
setRowStretch(3,1);
00046 main_->
addWidget(l1,0,0);
00047 main_->
addWidget(l2,1,0);
00048 main_->
addWidget(l3,2,0);
00049 main_->
addWidget(m_name,0,1);
00050 main_->
addWidget(m_location,1,1);
00051 main_->
addWidget(m_description,2,1);
00052
00053 m_pixmap =
"contents";
00054 m_title = i18n(
"General");
00055 m_header = i18n(
"General Settings");
00056 }
00057
00058 KMPropGeneral::~KMPropGeneral()
00059 {
00060 }
00061
00062
void KMPropGeneral::setPrinter(KMPrinter *p)
00063 {
00064
if (p)
00065 {
00066 m_name->setText(p->name());
00067 m_location->setText(p->location());
00068 m_description->setText(p->description());
00069 emit enableChange(!(p->isSpecial() || p->isRemote() || p->isImplicit()));
00070 }
00071
else
00072 {
00073 emit enableChange(
false);
00074 m_name->setText(
"");
00075 m_location->setText(
"");
00076 m_description->setText(
"");
00077 }
00078 }
00079
00080
void KMPropGeneral::configureWizard(KMWizard *w)
00081 {
00082 w->configure(KMWizard::Name,KMWizard::Name,
true);
00083 }
This file is part of the documentation for kdeprint Library Version 3.2.3.