lpdtools.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #ifndef LPDTOOLS_H
00020 #define LPDTOOLS_H
00021 
00022 #include <qstring.h>
00023 #include <qmap.h>
00024 #include <qptrlist.h>
00025 #include <qtextstream.h>
00026 
00027 class KMLpdManager;
00028 class DrMain;
00029 class KMPrinter;
00030 
00031 class PrintcapEntry
00032 {
00033 friend class KMLpdManager;
00034 public:
00035     bool readLine(const QString& line);
00036     void writeEntry(QTextStream&);
00037     KMPrinter* createPrinter();
00038     QString arg(const QString& key) const   { return m_args[key]; }
00039     QString comment(int i);
00040 private:
00041     QString         m_name;
00042     QString         m_comment;
00043     QMap<QString,QString>   m_args;
00044 };
00045 
00046 
00047 
00048 struct Resolution
00049 {
00050     int     xdpi, ydpi;
00051     QString comment;
00052 };
00053 
00054 struct BitsPerPixel
00055 {
00056     QString bpp;
00057     QString comment;
00058 };
00059 
00060 class PrinttoolEntry
00061 {
00062 friend class KMLpdManager;
00063 public:
00064     bool readEntry(QTextStream& t);
00065     DrMain* createDriver();
00066 private:
00067     QString         m_name, m_gsdriver, m_description, m_about;
00068     QPtrList<Resolution>    m_resolutions;
00069     QPtrList<BitsPerPixel>  m_depths;
00070 };
00071 
00072 
00073 
00074 QString getPrintcapLine(QTextStream& t, QString *lastcomment = NULL);
00075 
00076 #endif // LPDTOOLS_H
 
This file is part of the documentation for kdeprint Library Version 3.2.0.