Main Page · Namespace List · Alphabetical List · Class List · File List · Namespace Members · Class Members · File Members · Related Pages

guiprinterdrivertoxml.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2006 by Konrad Wilhelm Kleine
00003  *   konrad@plothe-kleine.de
00004  *
00005  *   This file contains the "Printer Driver 2 XML" definition.
00006  *
00007  *   PLEASE NOTICE: If not stated otherwise, whenever we speak of 'printer
00008  *                  drivers' or simply 'drivers', we mean the PPD files
00009  *                  and not the actual drivers.
00010  *
00011  *   STATUS: File has been reviewed and commented
00012  *
00013  *   $Id: guiprinterdrivertoxml.h,v 1.3 2006/04/18 19:35:03 hbci Exp $
00014  *
00015  *   This program is free software; you can redistribute it and/or modify
00016  *   it under the terms of the GNU General Public License as published by
00017  *   the Free Software Foundation; either version 2 of the License, or
00018  *   (at your option) any later version.
00019  *
00020  *   This program is distributed in the hope that it will be useful,
00021  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  *   GNU General Public License for more details.
00024  *
00025  *   You should have received a copy of the GNU General Public License
00026  *   along with this program; if not, write to the Free Software Foundation,
00027  *   Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00028  ***************************************************************************/
00029 
00030 #ifndef GUIPRINTERDRIVER2XML_H
00031 #define GUIPRINTERDRIVER2XML_H
00032 
00033 // App includes
00034 #include "guiprinterdrivertoxmlbase.h"
00035 #include "globals.h"
00036 #include "globalsprintersetup.h"
00037 #include "printersetupdb.h"
00038 using namespace LinuxPrinterSetup;
00039 
00040 // Forward declarations
00041 class QDomDocument;
00042 class QDomElement;
00043 class QDir;
00044 
00053 class GuiPrinterDriverToXml : public GuiPrinterDriverToXmlBase
00054 {
00055 
00056 Q_OBJECT
00057 
00058 public:
00059 
00060 
00068   GuiPrinterDriverToXml( QWidget * parent = 0, const char * name = 0 );
00069 
00070 
00074   ~GuiPrinterDriverToXml();
00075 
00076 
00077 public slots:
00078 
00079 
00084   void show();
00085 
00086 
00091   void closeEvent( QCloseEvent * e );
00092 
00093 
00094 protected slots:
00095 
00096 
00102   virtual void on_pushButton_build_clicked();
00103 
00104 
00109   virtual void on_pushButton_browseSavePath_clicked();
00110 
00111 
00121   virtual void on_pushButton_browseCupsDir_clicked();
00122 
00123 
00128   virtual void on_pushButton_abort_clicked();
00129 
00130 
00135   virtual void on_pushButton_back_clicked();
00136 
00137 
00143   void on_pushButton_save_clicked();
00144 
00145 
00146 signals:
00147 
00153     void back();
00154 
00155 
00156 private:
00157 
00158 
00166   void logMessage( const QString & msg, bool isError = false );
00167 
00168 
00177   void traverseDir( const QString & dir );
00178 
00179 
00189   void parseFile( const QString & filePath );
00190 
00191 
00197   void addDriver( const PpdInfo & drv );
00198 
00199 
00200 private:
00201 
00202 
00208   void enableWidgets( int wf );
00209 
00210 
00211 private:
00212 
00222   enum WidgetFlag {
00223     NoneFlag       = 0,
00224     ProgressFlag   = 1,
00225     BuildFlag      = 2,
00226     SaveFlag       = 4,
00227     AllFlag        = 7
00228   };
00229 
00230   bool m_buildCanceled;       
00231 
00232   QString m_CupsModelDir;     
00233 
00234   PrinterSetupDb *m_domDoc;   
00235 };
00236 
00237 #endif
00238 


To get more information, please visit our project site hosted at SourceForge.net Logo
To support this project, please click on this image: Support This Project

Copyright © 2005-2006 Linux Printer Setup Documentation generated by Doxygen 1.4.4 LPS 1.0 (Disclaimer)