kmuimanager.h

00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2001 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., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #ifndef KMUIMANAGER_H
00021 #define KMUIMANAGER_H
00022 
00023 #include <qobject.h>
00024 #include <qptrlist.h>
00025 
00026 #include "kprinter.h"
00027 
00028 class KMPropertyPage;
00029 class KMWizard;
00030 class KPrintDialogPage;
00031 class KPrintDialog;
00032 class KPrinterPropertyDialog;
00033 class KMConfigDialog;
00034 class QListView;
00035 
00036 class KDEPRINT_EXPORT KMUiManager : public QObject
00037 {
00038     Q_OBJECT
00039 public:
00040     enum PrintDialogFlagType
00041     {
00042         Properties     = 0x0001,
00043         Default        = 0x0002,
00044         Preview        = 0x0004,
00045         OutputToFile   = 0x0008,
00046         PrintCommand   = 0x0020,
00047         Persistent     = 0x0040,
00048         PrintDialogAll = 0x001F
00049     };
00050     enum CopyFlagType
00051     {
00052         Current       = 0x001,
00053         Range         = 0x002,
00054         Collate       = 0x004,
00055         Order         = 0x008,
00056         PageSet       = 0x010,
00057         CopyAll       = 0x0FF,
00058         PSSelect      = Range|Order|PageSet,
00059         NoAutoCollate = 0x100
00060     };
00061 
00062     KMUiManager(QObject *parent = 0, const char *name = 0);
00063     virtual ~KMUiManager();
00064 
00065     // print management
00066     virtual void setupPropertyPages(KMPropertyPage*);
00067     virtual void setupWizard(KMWizard*);
00068     virtual void setupConfigDialog(KMConfigDialog*);
00069 
00070     // print dialog
00071     void addPrintDialogPage(KPrintDialogPage *page)     { m_printdialogpages.append(page); }
00072     int copyFlags(KPrinter *pr = 0, bool usePlugin = true);
00073     int dialogFlags();
00074     void setupPrintDialog(KPrintDialog*);
00075     virtual void setupPrintDialogPages(QPtrList<KPrintDialogPage>*);
00076 
00077     // printer property dialog
00078     void setupPropertyDialog(KPrinterPropertyDialog*);
00079     virtual void setupPrinterPropertyDialog(KPrinterPropertyDialog*);
00080 
00081     // page processing capabilities
00082     int systemPageCap();
00083     virtual int pluginPageCap();
00084     int pageCap();
00085 
00086     // job management
00087     virtual void setupJobViewer(QListView*);
00088 
00089 protected:
00090     int         m_printdialogflags;
00091     QPtrList<KPrintDialogPage>  m_printdialogpages;
00092 };
00093 
00094 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys