| # kate Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kateprinter.h

    00001 /*
    00002  *  This file is part of the KDE libraries
    00003  *  Copyright (c) 2002 Michael Goffioul <kdeprint@swing.be>
    00004  *  Complete rewrite on Sat Jun 15 2002 (c) Anders Lund <anders@alweb.dk>
    00005  *
    00006  *  This library is free software; you can redistribute it and/or
    00007  *  modify it under the terms of the GNU Library General Public
    00008  *  License version 2 as published by the Free Software Foundation.
    00009  *
    00010  *  This library is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013  *  Library General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU Library General Public License
    00016  *  along with this library; see the file COPYING.LIB.  If not, write to
    00017  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018  *  Boston, MA 02111-1307, USA.
    00019  **/
    00020
    00021 #ifndef __KATE_PRINTER_H__
    00022 #define __KATE_PRINTER_H__
    00023
    00024 #include <kprintdialogpage.h>
    00025
    00026 class KateDocument;
    00027
    00028 class KColorButton;
    00029 class KPrinter;
    00030 class QCheckBox;
    00031 class QComboBox;
    00032 class QGroupBox;
    00033 class QLabel;
    00034 class QLineEdit;
    00035 class QSpinBox;
    00036
    00037 class KatePrinter
    00038 {
    00039   public:
    00040     static bool print (KateDocument *doc);
    00041 };
    00042
    00043 #ifndef Q_WS_WIN //TODO: reenable
    00044 //BEGIN Text settings
    00045 /*
    00046   Text settings page:
    00047   - [ ] Print Selection (enabled if there is a selection in the view)
    00048   - Print Line Numbers
    00049     () Smart () Yes () No
    00050 */
    00051 class KatePrintTextSettings : public KPrintDialogPage
    00052 {
    00053   Q_OBJECT
    00054   public:
    00055     KatePrintTextSettings( KPrinter *printer, QWidget *parent=0, const char *name=0 );
    00056     ~KatePrintTextSettings(){};
    00057
    00058     void getOptions(QMap<QString,QString>& opts, bool incldef = false);
    00059     void setOptions(const QMap<QString,QString>& opts);
    00060
    00061     /* call if view has a selection, enables the seelction checkbox according to the arg */
    00062     void enableSelection( bool );
    00063
    00064   private:
    00065     QCheckBox *cbSelection, *cbLineNumbers, *cbGuide;
    00066 };
    00067 //END Text Settings
    00068
    00069 //BEGIN Header/Footer
    00070 /*
    00071   Header & Footer page:
    00072   - enable header/footer
    00073   - header/footer props
    00074     o formats
    00075     o colors
    00076 */
    00077
    00078 class KatePrintHeaderFooter : public KPrintDialogPage
    00079 {
    00080   Q_OBJECT
    00081   public:
    00082     KatePrintHeaderFooter( KPrinter *printer, QWidget *parent=0, const char *name=0 );
    00083     ~KatePrintHeaderFooter(){};
    00084
    00085     void getOptions(QMap<QString,QString>& opts, bool incldef = false);
    00086     void setOptions(const QMap<QString,QString>& opts);
    00087
    00088   public slots:
    00089     void setHFFont();
    00090
    00091   private:
    00092     QCheckBox *cbEnableHeader, *cbEnableFooter;
    00093     QLabel *lFontPreview;
    00094     QString strFont;
    00095     QGroupBox *gbHeader, *gbFooter;
    00096     QLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
    00097     KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
    00098     QCheckBox *cbHeaderEnableBgColor;
    00099     QLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
    00100     KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
    00101     QCheckBox *cbFooterEnableBgColor;
    00102 };
    00103
    00104 //END Header/Footer
    00105
    00106 //BEGIN Layout
    00107 /*
    00108   Layout page:
    00109   - Color scheme
    00110   - Use Box
    00111   - Box properties
    00112     o Width
    00113     o Margin
    00114     o Color
    00115 */
    00116 class KatePrintLayout : public KPrintDialogPage
    00117 {
    00118   Q_OBJECT
    00119   public:
    00120     KatePrintLayout( KPrinter *printer, QWidget *parent=0, const char *name=0 );
    00121     ~KatePrintLayout(){};
    00122
    00123     void getOptions(QMap<QString,QString>& opts, bool incldef = false);
    00124     void setOptions(const QMap<QString,QString>& opts);
    00125
    00126   private:
    00127     QComboBox *cmbSchema;
    00128     QCheckBox *cbEnableBox, *cbDrawBackground;
    00129     QGroupBox *gbBoxProps;
    00130     QSpinBox *sbBoxWidth, *sbBoxMargin;
    00131     KColorButton* kcbtnBoxColor;
    00132 };
    00133 //END Layout
    00134 #endif
    00135
    00136 #endif

This file is part of the documentation for kate Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:36:36 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003