kate Library API Documentation

kateprinter.h

00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2002 Michael Goffioul <goffioul@imec.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 //BEGIN Text settings
00044 /*
00045   Text settings page:
00046   - [ ] Print Selection (enabled if there is a selection in the view)
00047   - Print Line Numbers
00048     () Smart () Yes () No
00049 */
00050 class KatePrintTextSettings : public KPrintDialogPage
00051 {
00052   Q_OBJECT
00053   public:
00054     KatePrintTextSettings( KPrinter *printer, QWidget *parent=0, const char *name=0 );
00055     ~KatePrintTextSettings(){};
00056 
00057     void getOptions(QMap<QString,QString>& opts, bool incldef = false);
00058     void setOptions(const QMap<QString,QString>& opts);
00059     
00060     /* call if view has a selection, enables the seelction checkbox according to the arg */
00061     void enableSelection( bool );
00062   
00063   private:
00064     QCheckBox *cbSelection, *cbLineNumbers, *cbGuide;
00065 };
00066 //END Text Settings
00067 
00068 //BEGIN Header/Footer
00069 /*
00070   Header & Footer page:
00071   - enable header/footer
00072   - header/footer props
00073     o formats
00074     0 colors
00075 */
00076 
00077 class KatePrintHeaderFooter : public KPrintDialogPage
00078 {
00079   Q_OBJECT
00080   public:
00081     KatePrintHeaderFooter( KPrinter *printer, QWidget *parent=0, const char *name=0 );
00082     ~KatePrintHeaderFooter(){};
00083 
00084     void getOptions(QMap<QString,QString>& opts, bool incldef = false);
00085     void setOptions(const QMap<QString,QString>& opts);
00086 
00087   public slots:  
00088     void setHFFont();
00089         
00090   private:
00091     QCheckBox *cbEnableHeader, *cbEnableFooter;
00092     QLabel *lFontPreview;
00093     QString strFont;
00094     QGroupBox *gbHeader, *gbFooter;
00095     QLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
00096     KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
00097     QCheckBox *cbHeaderEnableBgColor;
00098     QLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
00099     KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
00100     QCheckBox *cbFooterEnableBgColor;    
00101 };
00102 
00103 //END Header/Footer
00104 
00105 //BEGIN Layout
00106 /*
00107   Layout page:
00108   - Color scheme
00109   - Use Box
00110   - Box properties
00111     o Width
00112     o Margin
00113     o Color
00114 */
00115 class KatePrintLayout : public KPrintDialogPage
00116 {
00117   Q_OBJECT
00118   public:
00119     KatePrintLayout( KPrinter *printer, QWidget *parent=0, const char *name=0 );
00120     ~KatePrintLayout(){};
00121 
00122     void getOptions(QMap<QString,QString>& opts, bool incldef = false);
00123     void setOptions(const QMap<QString,QString>& opts);
00124   
00125   private:
00126     QComboBox *cmbSchema;
00127     QCheckBox *cbEnableBox, *cbDrawBackground;
00128     QGroupBox *gbBoxProps;
00129     QSpinBox *sbBoxWidth, *sbBoxMargin;
00130     KColorButton* kcbtnBoxColor;
00131 };
00132 //END Layout
00133 
00134 #endif
KDE Logo
This file is part of the documentation for kate Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 5 07:22:34 2004 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003