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

kdeprint

printcapentry.h
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 #ifndef PRINTCAPENTRY_H
00021 #define PRINTCAPENTRY_H
00022 
00023 #if !defined( _KDEPRINT_COMPILE ) && defined( __GNUC__ )
00024 #warning internal header, do not use except if you are a KDEPrint developer
00025 #endif
00026 
00027 #include <tqstring.h>
00028 #include <tqmap.h>
00029 #include <tqstringlist.h>
00030 #include <tqtextstream.h>
00031 
00039 class Field
00040 {
00041 public:
00042     enum Type { String, Integer, Boolean };
00043     Field() : type(String) {}
00044     Field(const Field &f) : type(f.type), name(f.name), value(f.value) {}
00045     Field& operator= (const Field& f)
00046     {
00047         type = f.type;
00048         name = f.name;
00049         value = f.value;
00050         return (*this);
00051     }
00052     TQString toString() const;
00053 
00054     Type    type;
00055     TQString    name;
00056     TQString    value;
00057 };
00058 
00066 class PrintcapEntry
00067 {
00068 public:
00069     TQString            name;
00070     TQStringList        aliases;
00071     TQString            comment;
00072     TQMap<TQString,Field>   fields;
00073     TQString            postcomment;
00074 
00075     bool has(const TQString& f) const   { return fields.contains(f); }
00076     TQString field(const TQString& f) const { return fields[f].value; }
00077     bool writeEntry(TQTextStream&);
00078     void addField(const TQString& name, Field::Type type = Field::Boolean, const TQString& value = TQString::null);
00079 };
00080 
00081 #endif

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. |