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

tdeprint

  • tdeprint
  • cups
kmpropbanners.cpp
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (c) 2001 Michael Goffioul <tdeprint@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 "kmpropbanners.h"
21 #include "kmprinter.h"
22 #include "kmwizard.h"
23 #include "kmwbanners.h"
24 
25 #include <tqlabel.h>
26 #include <tqlayout.h>
27 #include <tdelocale.h>
28 
29 KMPropBanners::KMPropBanners(TQWidget *parent, const char *name)
30 : KMPropWidget(parent,name)
31 {
32  m_startbanner = new TQLabel(this);
33  m_stopbanner = new TQLabel(this);
34 
35  TQLabel *l1 = new TQLabel(i18n("&Starting banner:"), this);
36  TQLabel *l2 = new TQLabel(i18n("&Ending banner:"), this);
37 
38  l1->setBuddy(m_startbanner);
39  l2->setBuddy(m_stopbanner);
40 
41  TQGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 10);
42  main_->setColStretch(1,1);
43  main_->setRowStretch(2,1);
44  main_->addWidget(l1,0,0);
45  main_->addWidget(l2,1,0);
46  main_->addWidget(m_startbanner,0,1);
47  main_->addWidget(m_stopbanner,1,1);
48 
49  m_title = i18n("Banners");
50  m_header = i18n("Banner Settings");
51  m_pixmap = "edit-copy";
52 }
53 
54 KMPropBanners::~KMPropBanners()
55 {
56 }
57 
58 void KMPropBanners::setPrinter(KMPrinter *p)
59 {
60  if (p && p->isPrinter())
61  {
62  TQStringList l = TQStringList::split(',',p->option("kde-banners"),false);
63  while ( l.count() < 2 )
64  l.append( "none" );
65  m_startbanner->setText(i18n(mapBanner(l[0]).utf8()));
66  m_stopbanner->setText(i18n(mapBanner(l[1]).utf8()));
67  emit enable(true);
68  emit enableChange(p->isLocal());
69  }
70  else
71  {
72  emit enable(false);
73  m_startbanner->setText("");
74  m_stopbanner->setText("");
75  }
76 }
77 
78 void KMPropBanners::configureWizard(KMWizard *w)
79 {
80  w->configure(KMWizard::Banners,KMWizard::Banners,true);
81 }

tdeprint

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

tdeprint

Skip menu "tdeprint"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeprint by doxygen 1.9.1
This website is maintained by Timothy Pearson.