• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kate

kateprinter.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00018  *  Boston, MA 02110-1301, USA.
00019  **/
00020 
00021 #ifndef __KATE_PRINTER_H__
00022 #define __KATE_PRINTER_H__
00023 
00024 #include <QtGui/QWidget>
00025 
00026 class KateDocument;
00027 
00028 class KColorButton;
00029 class QCheckBox;
00030 class QComboBox;
00031 class QGroupBox;
00032 class QLabel;
00033 class KLineEdit;
00034 class QSpinBox;
00035 class KComboBox;
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 QWidget
00051 {
00052   Q_OBJECT
00053   public:
00054     explicit KatePrintTextSettings( QWidget *parent=0 );
00055     ~KatePrintTextSettings();
00056 
00057 //     bool printSelection();
00058     bool printLineNumbers();
00059     bool printGuide();
00060 
00061     /* call if view has a selection, enables the seelction checkbox according to the arg */
00062 //     void enableSelection( bool );
00063 
00064   private:
00065     void readSettings();
00066     void writeSettings();
00067 
00068     QCheckBox /* *cbSelection,*/ *cbLineNumbers, *cbGuide;
00069 };
00070 //END Text Settings
00071 
00072 //BEGIN Header/Footer
00073 /*
00074   Header & Footer page:
00075   - enable header/footer
00076   - header/footer props
00077     o formats
00078     o colors
00079 */
00080 
00081 class KatePrintHeaderFooter : public QWidget
00082 {
00083   Q_OBJECT
00084   public:
00085     explicit KatePrintHeaderFooter( QWidget *parent=0 );
00086     ~KatePrintHeaderFooter();
00087 
00088     QFont font();
00089 
00090     bool useHeader();
00091     QStringList headerFormat();
00092     QColor headerForeground();
00093     QColor headerBackground();
00094     bool useHeaderBackground();
00095 
00096     bool useFooter();
00097     QStringList footerFormat();
00098     QColor footerForeground();
00099     QColor footerBackground();
00100     bool useFooterBackground();
00101 
00102   public Q_SLOTS:
00103     void setHFFont();
00104 
00105   private:
00106     void readSettings();
00107     void writeSettings();
00108 
00109     QCheckBox *cbEnableHeader, *cbEnableFooter;
00110     QLabel *lFontPreview;
00111     QGroupBox *gbHeader, *gbFooter;
00112     KLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
00113     KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
00114     QCheckBox *cbHeaderEnableBgColor;
00115     KLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
00116     KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
00117     QCheckBox *cbFooterEnableBgColor;
00118 };
00119 
00120 //END Header/Footer
00121 
00122 //BEGIN Layout
00123 /*
00124   Layout page:
00125   - Color scheme
00126   - Use Box
00127   - Box properties
00128     o Width
00129     o Margin
00130     o Color
00131 */
00132 class KatePrintLayout : public QWidget
00133 {
00134   Q_OBJECT
00135   public:
00136     explicit KatePrintLayout( QWidget *parent=0 );
00137     ~KatePrintLayout();
00138 
00139     QString colorScheme();
00140     bool useBackground();
00141     bool useBox();
00142     int boxWidth();
00143     int boxMargin();
00144     QColor boxColor();
00145 
00146   private:
00147     void readSettings();
00148     void writeSettings();
00149   
00150     KComboBox *cmbSchema;
00151     QCheckBox *cbEnableBox, *cbDrawBackground;
00152     QGroupBox *gbBoxProps;
00153     QSpinBox *sbBoxWidth, *sbBoxMargin;
00154     KColorButton* kcbtnBoxColor;
00155 };
00156 //END Layout
00157 
00158 #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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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