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

guiprinterautosetup.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 automatic printer setup 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: guiprinterautosetup.h,v 1.7 2006/04/23 16:06:22 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 GUIPRINTERAUTOSETUP_H
00031 #define GUIPRINTERAUTOSETUP_H
00032 
00033 // App includes
00034 #include "guiprinterautosetupbase.h"
00035 #include "globalsprintersetup.h"
00036 
00037 using namespace LinuxPrinterSetup;
00038 
00039 // Qt includes
00040 //#include <qmap.h>
00041 
00042 // Forward Declarations
00043 class QDomDocument;
00044 class QDomNode;
00045 class QDomElement;
00046 class QDomNodeList;
00047 class PrinterSetupDb;
00048 
00049 
00062 class GuiPrinterAutoSetup : public GuiPrinterAutoSetupBase
00063 {
00064   Q_OBJECT
00065 
00066 public:
00067 
00068 
00074   GuiPrinterAutoSetup( QWidget * parent = 0, const char * name = 0 );
00075 
00076 
00080   ~GuiPrinterAutoSetup();
00081 
00082 
00083 public slots:
00084 
00085 
00092   virtual void show();
00093 
00094 
00095 signals:
00096 
00097 
00103   void back();
00104 
00105 
00113   void helpRequest( const QString & page );
00114 
00115 
00122   void showSmallHelp( const QString & page );
00123 
00124 
00134   void raiseWidget( int widgetNumber );
00135 
00136 
00137 protected slots:
00138 
00139 
00148   virtual void on_pushButton_saveSettings_clicked();
00149 
00150 
00155   virtual void on_pushButton_help_clicked();
00156 
00157 
00165   virtual void on_listBox_drivers_highlighted( QListBoxItem * item );
00166 
00167 
00176   virtual void on_listBox_printers_highlighted( QListBoxItem * item );
00177 
00178 
00184   virtual void on_pushButton_restart_clicked();
00185 
00186 
00194   virtual void on_checkBox_showAllDevices_stateChanged( int state );
00195 
00196 
00204   virtual void on_pushButton_driverDetails_clicked();
00205 
00206 
00211   virtual void on_pushButton_manualSetup_clicked();
00212 
00213 
00214 private:
00215 
00216 
00227   friend void LinuxPrinterSetup::showPrinterDriverDetails( const QString & driverName );
00228 
00229 
00240   friend void LinuxPrinterSetup::installPrinter(  QWidget * widget,
00241                                                   const QString & printerName,
00242                                                   const QString & deviceUri,
00243                                                   const QString & ppdFilePath
00244                                                );
00245 
00246 
00259   friend void LinuxPrinterSetup::testPrintRequest(  QWidget * widget,
00260                                                     const QString & printerName
00261                                                  );
00262 
00263 
00271   int findUsbPrinters();
00272 
00273 
00281   int findParPortPrinters();
00282 
00283 
00293   enum WidgetFlag {
00294     NoneFlag                  = 0,
00295     DriversFlag               = 1,
00296     PrintersFlag              = 2,
00297     SaveSettingsButtonFlag    = 4,
00298     HelpButtonFlag            = 8,
00299     RestartButtonFlag         = 16,
00300     ManualSetupButtonFlag     = 32,
00301     BackButtonFlag            = 64,
00302     AllFlags                  = 127
00303   };
00304 
00305 
00312   void enableWidgets( int wf );
00313 
00314 
00323   void fixManufacturer( QString & manufacturer );
00324 
00325 
00326 private:
00327 
00328   PrinterMap        m_printerMap;             
00329   PrinterSetupDb  * m_domDoc;                 
00330   QString           m_translationRecommended;
00331 
00332 };
00333 
00334 #endif
00335 


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)