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

tdeprint

  • tdeprint
kpfileselectpage.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 "kpfileselectpage.h"
21 #include "tdefilelist.h"
22 
23 #include <tqlayout.h>
24 #include <tqstringlist.h>
25 #include <tqregexp.h>
26 #include <tqheader.h>
27 #include <tdelocale.h>
28 #include <kiconloader.h>
29 
30 KPFileSelectPage::KPFileSelectPage(TQWidget *parent, const char *name)
31 : KPrintDialogPage(parent, name)
32 {
33  setTitle(i18n("&Files"));
34  m_first = true;
35 
36  m_files = new KFileList(this);
37 
38  TQHBoxLayout *l0 = new TQHBoxLayout(this, 0, 10);
39  l0->addWidget(m_files);
40 
41  resize(100, 100);
42 }
43 
44 void KPFileSelectPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
45 {
46  // (incldef == false) is a hint telling that it should be the last time
47  // and we want to do it only once
48  if (!incldef)
49  {
50  TQStringList l = m_files->fileList();
51  opts["kde-filelist"] = l.join("@@");
52  }
53 }
54 
55 void KPFileSelectPage::setOptions(const TQMap<TQString,TQString>& opts)
56 {
57  // do it only once as files will only be selected there
58  if (m_first)
59  {
60  TQStringList l = TQStringList::split("@@", opts["kde-filelist"], false);
61  m_files->setFileList(l);
62 
63  m_first = false;
64  }
65 }
KPrintDialogPage
This class is intended to be used as base class for customized print dialog page.
Definition: kprintdialogpage.h:91

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.