• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Kate

kateprinter.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE libraries and the Kate part.
00002  *
00003  *  Copyright (C) 2002-2010 Anders Lund <anders@alweb.dk>
00004  *
00005  *  Rewritten based on code of Copyright (c) 2002 Michael Goffioul <kdeprint@swing.be>
00006  *
00007  *  This library is free software; you can redistribute it and/or
00008  *  modify it under the terms of the GNU Library General Public
00009  *  License as published by the Free Software Foundation; either
00010  *  version 2 of the License, or (at your option) any later version.
00011  *
00012  *  This library is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *  Library General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU Library General Public License
00018  *  along with this library; see the file COPYING.LIB.  If not, write to
00019  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020  *  Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef __KATE_PRINTER_H__
00024 #define __KATE_PRINTER_H__
00025 
00026 #include <QtGui/QWidget>
00027 
00028 class KateDocument;
00029 
00030 class KColorButton;
00031 class QCheckBox;
00032 class QComboBox;
00033 class QGroupBox;
00034 class QLabel;
00035 class KLineEdit;
00036 class KIntSpinBox;
00037 class KComboBox;
00038 
00039 class KatePrinter
00040 {
00041   public:
00042     static bool print (KateDocument *doc);
00043 };
00044 
00045 //BEGIN Text settings
00046 /*
00047   Text settings page:
00048   - [ ] Print Selection (enabled if there is a selection in the view)
00049   - Print Line Numbers
00050     () Smart () Yes () No
00051 */
00052 class KatePrintTextSettings : public QWidget
00053 {
00054   Q_OBJECT
00055   public:
00056     explicit KatePrintTextSettings( QWidget *parent=0 );
00057     ~KatePrintTextSettings();
00058 
00059 //     bool printSelection();
00060     bool printLineNumbers();
00061     bool printGuide();
00062 
00063     /* call if view has a selection, enables the seelction checkbox according to the arg */
00064 //     void enableSelection( bool );
00065 
00066   private:
00067     void readSettings();
00068     void writeSettings();
00069     
00070     QCheckBox /* *cbSelection,*/ *cbLineNumbers, *cbGuide;
00071 };
00072 //END Text Settings
00073 
00074 //BEGIN Header/Footer
00075 /*
00076   Header & Footer page:
00077   - enable header/footer
00078   - header/footer props
00079     o formats
00080     o colors
00081 */
00082 
00083 class KatePrintHeaderFooter : public QWidget
00084 {
00085   Q_OBJECT
00086   public:
00087     explicit KatePrintHeaderFooter( QWidget *parent=0 );
00088     ~KatePrintHeaderFooter();
00089 
00090     QFont font();
00091 
00092     bool useHeader();
00093     QStringList headerFormat();
00094     QColor headerForeground();
00095     QColor headerBackground();
00096     bool useHeaderBackground();
00097 
00098     bool useFooter();
00099     QStringList footerFormat();
00100     QColor footerForeground();
00101     QColor footerBackground();
00102     bool useFooterBackground();
00103 
00104   public Q_SLOTS:
00105     void setHFFont();
00106 
00107   private:
00108     void readSettings();
00109     void writeSettings();
00110     
00111     QCheckBox *cbEnableHeader, *cbEnableFooter;
00112     QLabel *lFontPreview;
00113     QGroupBox *gbHeader, *gbFooter;
00114     KLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
00115     KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
00116     QCheckBox *cbHeaderEnableBgColor;
00117     KLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
00118     KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
00119     QCheckBox *cbFooterEnableBgColor;
00120 };
00121 
00122 //END Header/Footer
00123 
00124 //BEGIN Layout
00125 /*
00126   Layout page:
00127   - Color scheme
00128   - Use Box
00129   - Box properties
00130     o Width
00131     o Margin
00132     o Color
00133 */
00134 class KatePrintLayout : public QWidget
00135 {
00136   Q_OBJECT
00137   public:
00138     explicit KatePrintLayout( QWidget *parent=0 );
00139     ~KatePrintLayout();
00140 
00141     QString colorScheme();
00142     bool useBackground();
00143     bool useBox();
00144     int boxWidth();
00145     int boxMargin();
00146     QColor boxColor();
00147 
00148   private:
00149     void readSettings();
00150     void writeSettings();
00151     
00152     KComboBox *cmbSchema;
00153     QCheckBox *cbEnableBox, *cbDrawBackground;
00154     QGroupBox *gbBoxProps;
00155     KIntSpinBox *sbBoxWidth, *sbBoxMargin;
00156     KColorButton* kcbtnBoxColor;
00157 };
00158 //END Layout
00159 
00160 #endif

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal