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

kdeprint

kpfileselectpage.cpp
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License version 2 as published by the Free Software Foundation.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #include "kpfileselectpage.h"
00021 #include "kfilelist.h"
00022 
00023 #include <tqlayout.h>
00024 #include <tqstringlist.h>
00025 #include <tqregexp.h>
00026 #include <tqheader.h>
00027 #include <klocale.h>
00028 #include <kiconloader.h>
00029 
00030 KPFileSelectPage::KPFileSelectPage(TQWidget *parent, const char *name)
00031 : KPrintDialogPage(parent, name)
00032 {
00033     setTitle(i18n("&Files"));
00034     m_first = true;
00035 
00036     m_files = new KFileList(this);
00037 
00038     TQHBoxLayout    *l0 = new TQHBoxLayout(this, 0, 10);
00039     l0->addWidget(m_files);
00040 
00041     resize(100, 100);
00042 }
00043 
00044 void KPFileSelectPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
00045 {
00046     // (incldef == false) is a hint telling that it should be the last time
00047     // and we want to do it only once
00048     if (!incldef)
00049     {
00050         TQStringList    l = m_files->fileList();
00051         opts["kde-filelist"] = l.join("@@");
00052     }
00053 }
00054 
00055 void KPFileSelectPage::setOptions(const TQMap<TQString,TQString>& opts)
00056 {
00057     // do it only once as files will only be selected there
00058     if (m_first)
00059     {
00060         TQStringList    l = TQStringList::split("@@", opts["kde-filelist"], false);
00061         m_files->setFileList(l);
00062 
00063         m_first = false;
00064     }
00065 }

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.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |