• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeprint
 

kdeprint

  • kdeprint
  • management
kmpropgeneral.cpp
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License version 2 as published by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  **/
19 
20 #include "kmpropgeneral.h"
21 #include "kmprinter.h"
22 #include "kmwizard.h"
23 #include "kmfactory.h"
24 #include "kmmanager.h"
25 
26 #include <tqlabel.h>
27 #include <tqlayout.h>
28 #include <klocale.h>
29 
30 KMPropGeneral::KMPropGeneral(TQWidget *parent, const char *name)
31 : KMPropWidget(parent,name)
32 {
33  m_name = new TQLabel("",this);
34  m_location = new TQLabel("",this);
35  m_description = new TQLabel("",this);
36 
37  TQLabel *l1 = new TQLabel(i18n("Printer name:"), this);
38  TQLabel *l2 = new TQLabel(i18n("Physical Location", "Location:"), this);
39  TQLabel *l3 = new TQLabel(i18n("Description:"), this);
40 
41  // layout
42  TQGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7);
43  main_->setColStretch(0,0);
44  main_->setColStretch(1,1);
45  main_->setRowStretch(3,1);
46  main_->addWidget(l1,0,0);
47  main_->addWidget(l2,1,0);
48  main_->addWidget(l3,2,0);
49  main_->addWidget(m_name,0,1);
50  main_->addWidget(m_location,1,1);
51  main_->addWidget(m_description,2,1);
52 
53  m_pixmap = "contents";
54  m_title = i18n("General");
55  m_header = i18n("General Settings");
56 }
57 
58 KMPropGeneral::~KMPropGeneral()
59 {
60 }
61 
62 void KMPropGeneral::setPrinter(KMPrinter *p)
63 {
64  if (p)
65  {
66  m_name->setText(p->name());
67  m_location->setText(p->location());
68  m_description->setText(p->description());
69  emit enableChange(!(p->isSpecial() || p->isRemote() || p->isImplicit()));
70  }
71  else
72  {
73  emit enableChange(false);
74  m_name->setText("");
75  m_location->setText("");
76  m_description->setText("");
77  }
78 }
79 
80 void KMPropGeneral::configureWizard(KMWizard *w)
81 {
82  w->configure(KMWizard::Name,KMWizard::Name,true);
83 }

kdeprint

Skip menu "kdeprint"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdeprint

Skip menu "kdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeprint by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |