23#if !defined( _TDEPRINT_COMPILE ) && defined( __GNUC__ ) 
   24#warning internal header, do not use except if you are a TDEPrint developer 
   27#include <tdeprint/kmprinter.h> 
   35class KMVirtualManager;
 
   36class KMSpecialManager;
 
   38class TDEActionCollection;
 
   48class TDEPRINT_EXPORT KMManager : 
public TQObject
 
   52friend class KMVirtualManager;
 
   53friend class KMSpecialManager;
 
   54friend class KMFactory;
 
   57    enum PrinterOperations {
 
   58        PrinterEnabling  = 0x01,
 
   59        PrinterCreation  = 0x02,
 
   60        PrinterDefault   = 0x04,
 
   61        PrinterTesting   = 0x08,
 
   62        PrinterConfigure = 0x10,
 
   63        PrinterRemoval   = 0x20,
 
   66    enum ServerOperations {
 
   67        ServerRestarting = 0x1,
 
   68        ServerConfigure  = 0x2,
 
   72    KMManager(TQObject *parent = 0, 
const char *name = 0);
 
   75    static KMManager* self();
 
   78    TQString errorMsg()
 const       { 
return m_errormsg; }
 
   79    void setErrorMsg(
const TQString& s) { m_errormsg = s; }
 
   82    bool hasManagement()
 const      { 
return m_hasmanagement; }
 
   85    virtual bool createPrinter(KMPrinter *p);
 
   86    virtual bool removePrinter(KMPrinter *p);
 
   87    virtual bool enablePrinter(KMPrinter *p, 
bool on);
 
   88    virtual bool startPrinter(KMPrinter *p, 
bool on);
 
   89    virtual bool completePrinter(KMPrinter *p);
 
   90    virtual bool completePrinterShort(KMPrinter *p);
 
   91    virtual bool setDefaultPrinter(KMPrinter *p);
 
   92    virtual bool testPrinter(KMPrinter *p);
 
   93    bool upPrinter(KMPrinter *p, 
bool state);
 
   94    bool modifyPrinter(KMPrinter *oldp, KMPrinter *newp);
 
   95    bool removePrinter(
const TQString& name);
 
   96    bool enablePrinter(
const TQString& name, 
bool state);
 
   97    bool startPrinter(
const TQString& name, 
bool state);
 
   98    bool completePrinter(
const TQString& name);
 
   99    bool setDefaultPrinter(
const TQString& name);
 
  100    int printerOperationMask()
 const    { 
return m_printeroperationmask; }
 
  101    int addPrinterWizard(TQWidget *parent = 0);
 
  104    bool createSpecialPrinter(KMPrinter *p);
 
  105    bool removeSpecialPrinter(KMPrinter *p);
 
  108    KMPrinter* findPrinter(
const TQString& name);
 
  109    TQPtrList<KMPrinter>* printerList(
bool reload = 
true);
 
  110    TQPtrList<KMPrinter>* printerListComplete(
bool reload = 
true);
 
  111    KMPrinter* defaultPrinter();
 
  112    void enableFilter(
bool on);
 
  113    bool isFilterEnabled() 
const;
 
  116    virtual TQString driverDbCreationProgram();
 
  117    virtual TQString driverDirectory();
 
  120    virtual DrMain* loadPrinterDriver(KMPrinter *p, 
bool config = 
false);
 
  121    virtual DrMain* loadDbDriver(KMDBEntry *entry);
 
  122    virtual DrMain* loadFileDriver(
const TQString& filename);
 
  123    DrMain* loadDriver(KMPrinter *p, 
bool config = 
false);
 
  124    virtual bool savePrinterDriver(KMPrinter *p, DrMain *d);
 
  125    virtual bool validateDbDriver(KMDBEntry *entry);
 
  128    bool invokeOptionsDialog(TQWidget *parent = 0);
 
  129    virtual TQString stateInformation();
 
  132    int serverOperationMask()
 const     { 
return m_serveroperationmask; }
 
  133    virtual bool restartServer();
 
  134    virtual bool configureServer(TQWidget *parent = 0);
 
  135    virtual TQStringList detectLocalPrinters();
 
  138    virtual void createPluginActions(TDEActionCollection*);
 
  139    virtual void validatePluginActions(TDEActionCollection*, KMPrinter*);
 
  142    void checkUpdatePossible();
 
  145    void updatePossible(
bool);
 
  146    void printerListUpdated();
 
  150    virtual void listPrinters();
 
  153    void addPrinter(KMPrinter *p);  
 
  155    void setHardDefault(KMPrinter*);
 
  156    void setSoftDefault(KMPrinter*);
 
  157    KMPrinter* softDefault() 
const;
 
  158    KMPrinter* hardDefault() 
const;
 
  162    bool uncompressFile(
const TQString& srcname, TQString& destname);
 
  163    bool notImplemented();
 
  164    void setHasManagement(
bool on)      { m_hasmanagement = on; }
 
  165    void setPrinterOperationMask(
int m) { m_printeroperationmask = m; }
 
  166    void setServerOperationMask(
int m)  { m_serveroperationmask = m; }
 
  168    void discardAllPrinters(
bool);
 
  169    void setUpdatePossible( 
bool );
 
  170    virtual void checkUpdatePossibleInternal();
 
  174    KMPrinterList       m_printers, m_fprinters;    
 
  175    bool            m_hasmanagement;
 
  176    int         m_printeroperationmask;
 
  177    int             m_serveroperationmask;
 
  178    KMSpecialManager    *m_specialmgr;
 
  179    KMVirtualManager    *m_virtualmgr;
 
  180    PrinterFilter   *m_printerfilter;
 
  181    bool m_updatepossible;