kdeprint Library API Documentation

ppdloader.h

00001 /* 00002 * This file is part of the KDE libraries 00003 * Copyright (c) 2001-2003 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., 59 Temple Place - Suite 330, 00017 * Boston, MA 02111-1307, USA. 00018 **/ 00019 00020 #ifndef PPDLOADER_H 00021 #define PPDLOADER_H 00022 00023 #include <qvaluestack.h> 00024 #include <qstring.h> 00025 #include <qstringlist.h> 00026 #include <qvariant.h> 00027 #include <qdict.h> 00028 00029 class DrGroup; 00030 class DrBase; 00031 class DrMain; 00032 struct PS_private; 00033 00034 class PPDLoader 00035 { 00036 public: 00037 PPDLoader(); 00038 ~PPDLoader(); 00039 00040 DrMain* readFromFile( const QString& filename ); 00041 00042 bool openUi( const QString& name, const QString& desc, const QString& type ); 00043 bool endUi( const QString& name ); 00044 bool openGroup( const QString& name, const QString& desc ); 00045 bool endGroup( const QString& name ); 00046 bool putStatement( const QString& keyword, const QString& name, const QString& desc, const QStringList& values ); 00047 bool putStatement2( const QString& keyword, const QString& value ); 00048 bool putDefault( const QString& keyword, const QString& value ); 00049 bool putConstraint( const QString& opt1, const QString& opt2, const QString& ch1, const QString& ch2 ); 00050 bool putFooData( const QString& data ); 00051 bool putFooProcessedData( const QVariant& var ); 00052 bool putPaperDimension( const QString& name, const QString& s ); 00053 bool putImageableArea( const QString& name, const QString& s ); 00054 00055 static DrMain* loadDriver( const QString& filename ); 00056 00057 private: 00058 QValueStack<DrGroup*> m_groups; 00059 DrBase* m_option; 00060 QDict<PS_private> m_ps; 00061 QStringList m_fonts; 00062 00063 friend int kdeprint_ppdparse(void*); 00064 DrGroup* findOrCreateGroupForOption( const QString& ); 00065 void processPageSizes( DrMain* ); 00066 }; 00067 00068 #endif /* PPDLOADER_H */
KDE Logo
This file is part of the documentation for kdeprint Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:50:02 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003