KTextEditor

printconfigwidgets.h
1/*
2 SPDX-FileCopyrightText: 2002-2010 Anders Lund <anders@alweb.dk>
3
4 Rewritten based on code of:
5 SPDX-FileCopyrightText: 2002 Michael Goffioul <kdeprint@swing.be>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9
10#ifndef KATE_PRINT_CONFIG_WIDGETS_H
11#define KATE_PRINT_CONFIG_WIDGETS_H
12
13#include <QWidget>
14
15class KColorButton;
16class KFontRequester;
17
18class QCheckBox;
19class QLabel;
20class QLineEdit;
21class QComboBox;
22class QSpinBox;
23class QGroupBox;
24
25namespace KatePrinter
26{
27// BEGIN Text settings
28/*
29 * Text settings page:
30 * - Print Line Numbers
31 * () Smart () Yes () No
32 */
33class KatePrintTextSettings : public QWidget
34{
35public:
36 explicit KatePrintTextSettings(QWidget *parent = nullptr);
37 ~KatePrintTextSettings() override;
38
39 bool printLineNumbers();
40 bool printGuide();
41 bool dontPrintFoldedCode() const;
42
43private:
44 void readSettings();
45 void writeSettings();
46
47 QCheckBox *cbLineNumbers;
48 QCheckBox *cbGuide;
49 QCheckBox *cbFolding;
50};
51// END Text Settings
52
53// BEGIN Header/Footer
54/*
55 * Header & Footer page:
56 * - enable header/footer
57 * - header/footer props
58 * o formats
59 * o colors
60 */
61
62class KatePrintHeaderFooter : public QWidget
63{
64public:
65 explicit KatePrintHeaderFooter(QWidget *parent = nullptr);
66 ~KatePrintHeaderFooter() override;
67
68 QFont font();
69
70 bool useHeader();
71 QStringList headerFormat();
72 QColor headerForeground();
73 QColor headerBackground();
74 bool useHeaderBackground();
75
76 bool useFooter();
77 QStringList footerFormat();
78 QColor footerForeground();
79 QColor footerBackground();
80 bool useFooterBackground();
81
82public:
83 void showContextMenu(const QPoint &pos);
84
85private:
86 void readSettings();
87 void writeSettings();
88
89 QCheckBox *cbEnableHeader, *cbEnableFooter;
90 KFontRequester *lFontPreview;
91 QGroupBox *gbHeader, *gbFooter;
92 QLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
93 KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
94 QCheckBox *cbHeaderEnableBgColor;
95 QLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
96 KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
97 QCheckBox *cbFooterEnableBgColor;
98};
99
100// END Header/Footer
101
102// BEGIN Layout
103/*
104 * Layout page:
105 * - Color scheme
106 * - Use Box
107 * - Box properties
108 * o Width
109 * o Margin
110 * o Color
111 */
112class KatePrintLayout : public QWidget
113{
114public:
115 explicit KatePrintLayout(QWidget *parent = nullptr);
116 ~KatePrintLayout() override;
117
118 QString colorScheme();
119 QFont textFont();
120 bool useBackground();
121 bool useBox();
122 int boxWidth();
123 int boxMargin();
124 QColor boxColor();
125
126private:
127 void readSettings();
128 void writeSettings();
129
130 QComboBox *cmbSchema;
131 KFontRequester *lFontPreview;
132 QCheckBox *cbEnableBox;
133 QCheckBox *cbDrawBackground;
134 QGroupBox *gbBoxProps;
135 QSpinBox *sbBoxWidth;
136 QSpinBox *sbBoxMargin;
137 KColorButton *kcbtnBoxColor;
138};
139// END Layout
140
141}
142
143#endif
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.