kprintdialog.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 KPRINTDIALOG_H
00021 #define KPRINTDIALOG_H
00022 
00023 #if !defined( _KDEPRINT_COMPILE ) && defined( __GNUC__ )
00024 #warning internal header, do not use except if you are a KDEPrint developer
00025 #endif
00026 
00027 #include <kdialog.h>
00028 #include <qptrlist.h>
00029 #include <kdeprint/kpreloadobject.h>
00030 
00031 class KPrinter;
00032 class KPrintDialogPage;
00033 
00041 class KDEPRINT_EXPORT KPrintDialog : public KDialog, public KPReloadObject
00042 {
00043     Q_OBJECT
00044 public:
00045     KPrintDialog(QWidget *parent = 0, const char *name = 0);
00046     ~KPrintDialog();
00047 
00048     void setFlags(int f);
00049     void setDialogPages(QPtrList<KPrintDialogPage> *pages);
00050     void enableDialogPage( int index, bool flag = true );
00051     KPrinter* printer() const;
00052 
00053     static KPrintDialog* printerDialog(KPrinter*, QWidget*, const QString& caption = QString::null, bool forceExpand = false);
00054 
00055 signals:
00056     void printRequested(KPrinter*);
00057 
00058 protected slots:
00059     void slotPrinterSelected(int);
00060     void slotProperties();
00061     void slotSetDefault();
00062     void slotOptions();
00063     virtual void done(int);
00064     void slotWizard();
00065     void slotExtensionClicked();
00066     void slotToggleFilter(bool);
00067     void slotHelp();
00068     void slotOutputFileSelected(const QString&);
00069     void slotUpdatePossible( bool );
00070     void slotOpenFileDialog();
00071 
00072 protected:
00073     bool checkOutputFile();
00074     void enableSpecial(bool on);
00075     void enableOutputFile(bool on);
00076     void setOutputFileExtension(const QString&);
00077     void reload();
00078     void configChanged();
00079     void expandDialog(bool on = true);
00080     void initialize( KPrinter* );
00081     void init();
00082 
00083 protected:
00084     class KPrintDialogPrivate;
00085     KPrintDialogPrivate *d;
00086 };
00087 
00088 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys