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

tdeprint

  • tdeprint
  • management
kmpropertypage.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 "kmpropertypage.h"
21 #include "kmpropwidget.h"
22 #include "kmpropcontainer.h"
23 #include "kmprinter.h"
24 #include "kmfactory.h"
25 #include "kmuimanager.h"
26 
27 #include "kmpropgeneral.h"
28 
29 #include <tqvbox.h>
30 #include <kiconloader.h>
31 
32 KMPropertyPage::KMPropertyPage(TQWidget *parent, const char *name)
33 : CJanusWidget(parent,name)
34 {
35  m_widgets.setAutoDelete(false);
36 
37  initialize();
38 }
39 
40 KMPropertyPage::~KMPropertyPage()
41 {
42 }
43 
44 void KMPropertyPage::setPrinter(KMPrinter *p)
45 {
46  TQPtrListIterator<KMPropWidget> it(m_widgets);
47  for (;it.current();++it)
48  it.current()->setPrinterBase(p);
49 }
50 
51 void KMPropertyPage::addPropPage(KMPropWidget *w)
52 {
53  if (w)
54  {
55  m_widgets.append(w);
56  KMPropContainer *ctn = new KMPropContainer(this,"Container");
57  ctn->setWidget(w);
58  connect(ctn,TQ_SIGNAL(enable(bool)),TQ_SLOT(slotEnable(bool)));
59 
60  TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon(
61  w->pixmap(),
62  TDEIcon::NoGroup,
63  TDEIcon::SizeMedium
64  );
65  addPage(ctn,w->title(),w->header(),icon);
66  }
67 }
68 
69 void KMPropertyPage::slotEnable(bool on)
70 {
71  TQWidget *w = (TQWidget*)(sender());
72  if (on)
73  enablePage(w);
74  else
75  disablePage(w);
76 }
77 
78 void KMPropertyPage::initialize()
79 {
80  // add General page
81  addPropPage(new KMPropGeneral(this, "General"));
82  // add plugin specific pages
83  KMFactory::self()->uiManager()->setupPropertyPages(this);
84 }
85 
86 void KMPropertyPage::reload()
87 {
88  clearPages();
89  m_widgets.clear();
90  initialize();
91  setPrinter(0);
92 }
93 
94 #include "kmpropertypage.moc"

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.