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

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • utils
kateprinter.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries and the Kate part.
2  *
3  * Copyright (C) 2002-2010 Anders Lund <anders@alweb.dk>
4  *
5  * Rewritten based on code of Copyright (c) 2002 Michael Goffioul <kdeprint@swing.be>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef __KATE_PRINTER_H__
24 #define __KATE_PRINTER_H__
25 
26 #include <QtGui/QWidget>
27 
28 class KateDocument;
29 
30 class KColorButton;
31 class QCheckBox;
32 class QComboBox;
33 class QGroupBox;
34 class QLabel;
35 class KLineEdit;
36 class KIntSpinBox;
37 class KComboBox;
38 
39 class KatePrinter
40 {
41  public:
42  static bool print (KateDocument *doc);
43  static void readSettings(QPrinter& printer);
44  static void writeSettings(QPrinter& printer);
45 };
46 
47 //BEGIN Text settings
48 /*
49  Text settings page:
50  - Print Line Numbers
51  () Smart () Yes () No
52 */
53 class KatePrintTextSettings : public QWidget
54 {
55  Q_OBJECT
56  public:
57  explicit KatePrintTextSettings( QWidget *parent=0 );
58  ~KatePrintTextSettings();
59 
60  bool printLineNumbers();
61  bool printGuide();
62 
63  private:
64  void readSettings();
65  void writeSettings();
66 
67  QCheckBox *cbLineNumbers;
68  QCheckBox *cbGuide;
69 };
70 //END Text Settings
71 
72 //BEGIN Header/Footer
73 /*
74  Header & Footer page:
75  - enable header/footer
76  - header/footer props
77  o formats
78  o colors
79 */
80 
81 class KatePrintHeaderFooter : public QWidget
82 {
83  Q_OBJECT
84  public:
85  explicit KatePrintHeaderFooter( QWidget *parent=0 );
86  ~KatePrintHeaderFooter();
87 
88  QFont font();
89 
90  bool useHeader();
91  QStringList headerFormat();
92  QColor headerForeground();
93  QColor headerBackground();
94  bool useHeaderBackground();
95 
96  bool useFooter();
97  QStringList footerFormat();
98  QColor footerForeground();
99  QColor footerBackground();
100  bool useFooterBackground();
101 
102  public Q_SLOTS:
103  void setHFFont();
104  void showContextMenu(const QPoint& pos);
105 
106  private:
107  void readSettings();
108  void writeSettings();
109 
110  QCheckBox *cbEnableHeader, *cbEnableFooter;
111  QLabel *lFontPreview;
112  QGroupBox *gbHeader, *gbFooter;
113  KLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
114  KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
115  QCheckBox *cbHeaderEnableBgColor;
116  KLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
117  KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
118  QCheckBox *cbFooterEnableBgColor;
119 };
120 
121 //END Header/Footer
122 
123 //BEGIN Layout
124 /*
125  Layout page:
126  - Color scheme
127  - Use Box
128  - Box properties
129  o Width
130  o Margin
131  o Color
132 */
133 class KatePrintLayout : public QWidget
134 {
135  Q_OBJECT
136  public:
137  explicit KatePrintLayout( QWidget *parent=0 );
138  ~KatePrintLayout();
139 
140  QString colorScheme();
141  bool useBackground();
142  bool useBox();
143  int boxWidth();
144  int boxMargin();
145  QColor boxColor();
146 
147  private:
148  void readSettings();
149  void writeSettings();
150 
151  KComboBox *cmbSchema;
152  QCheckBox *cbEnableBox, *cbDrawBackground;
153  QGroupBox *gbBoxProps;
154  KIntSpinBox *sbBoxWidth, *sbBoxMargin;
155  KColorButton* kcbtnBoxColor;
156 };
157 //END Layout
158 
159 #endif
KatePrintTextSettings::printLineNumbers
bool printLineNumbers()
Definition: kateprinter.cpp:709
QWidget
KatePrintHeaderFooter::headerFormat
QStringList headerFormat()
Definition: kateprinter.cpp:910
QPrinter
KatePrintLayout::colorScheme
QString colorScheme()
Definition: kateprinter.cpp:1196
QFont
QPoint
KatePrintLayout::boxColor
QColor boxColor()
Definition: kateprinter.cpp:1221
KatePrintLayout::boxWidth
int boxWidth()
Definition: kateprinter.cpp:1211
KatePrintLayout::KatePrintLayout
KatePrintLayout(QWidget *parent=0)
Definition: kateprinter.cpp:1111
QGroupBox
KatePrintHeaderFooter::setHFFont
void setHFFont()
Definition: kateprinter.cpp:959
KatePrintHeaderFooter
Definition: kateprinter.h:81
KatePrintLayout::useBox
bool useBox()
Definition: kateprinter.cpp:1206
QCheckBox
KatePrintLayout::useBackground
bool useBackground()
Definition: kateprinter.cpp:1201
KatePrintHeaderFooter::useFooter
bool useFooter()
Definition: kateprinter.cpp:932
QWidget::pos
QPoint pos() const
KatePrintTextSettings::~KatePrintTextSettings
~KatePrintTextSettings()
Definition: kateprinter.cpp:704
KatePrintTextSettings::printGuide
bool printGuide()
Definition: kateprinter.cpp:714
QString
KatePrintHeaderFooter::showContextMenu
void showContextMenu(const QPoint &pos)
Definition: kateprinter.cpp:971
QColor
KatePrintHeaderFooter::useHeader
bool useHeader()
Definition: kateprinter.cpp:905
QStringList
KatePrintHeaderFooter::KatePrintHeaderFooter
KatePrintHeaderFooter(QWidget *parent=0)
Definition: kateprinter.cpp:747
KateDocument
Definition: katedocument.h:74
KatePrintHeaderFooter::headerForeground
QColor headerForeground()
Definition: kateprinter.cpp:917
KatePrintHeaderFooter::footerFormat
QStringList footerFormat()
Definition: kateprinter.cpp:937
KatePrintHeaderFooter::headerBackground
QColor headerBackground()
Definition: kateprinter.cpp:922
KLineEdit
KatePrinter::writeSettings
static void writeSettings(QPrinter &printer)
Definition: kateprinter.cpp:87
KatePrintHeaderFooter::font
QFont font()
Definition: kateprinter.cpp:900
KatePrintHeaderFooter::useFooterBackground
bool useFooterBackground()
Definition: kateprinter.cpp:954
KatePrintTextSettings::KatePrintTextSettings
KatePrintTextSettings(QWidget *parent=0)
Definition: kateprinter.cpp:677
KatePrintLayout
Definition: kateprinter.h:133
KatePrintHeaderFooter::~KatePrintHeaderFooter
~KatePrintHeaderFooter()
Definition: kateprinter.cpp:895
KatePrintHeaderFooter::footerBackground
QColor footerBackground()
Definition: kateprinter.cpp:949
KatePrinter
Definition: kateprinter.h:39
KatePrinter::print
static bool print(KateDocument *doc)
Definition: kateprinter.cpp:102
KatePrinter::readSettings
static void readSettings(QPrinter &printer)
Definition: kateprinter.cpp:62
KatePrintHeaderFooter::footerForeground
QColor footerForeground()
Definition: kateprinter.cpp:944
QLabel
QObject::parent
QObject * parent() const
KatePrintHeaderFooter::useHeaderBackground
bool useHeaderBackground()
Definition: kateprinter.cpp:927
KatePrintTextSettings
Definition: kateprinter.h:53
KatePrintLayout::~KatePrintLayout
~KatePrintLayout()
Definition: kateprinter.cpp:1191
KatePrintLayout::boxMargin
int boxMargin()
Definition: kateprinter.cpp:1216
QComboBox
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal