| 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 | |
| 15 | class KColorButton; |
| 16 | class KFontRequester; |
| 17 | |
| 18 | class QCheckBox; |
| 19 | class QLabel; |
| 20 | class QLineEdit; |
| 21 | class QComboBox; |
| 22 | class QSpinBox; |
| 23 | class QGroupBox; |
| 24 | |
| 25 | namespace KatePrinter |
| 26 | { |
| 27 | // BEGIN Text settings |
| 28 | /* |
| 29 | * Text settings page: |
| 30 | * - Print Line Numbers |
| 31 | * () Smart () Yes () No |
| 32 | */ |
| 33 | class KatePrintTextSettings : public QWidget |
| 34 | { |
| 35 | public: |
| 36 | explicit KatePrintTextSettings(QWidget *parent = nullptr); |
| 37 | ~KatePrintTextSettings() override; |
| 38 | |
| 39 | bool printLineNumbers(); |
| 40 | bool printGuide(); |
| 41 | bool dontPrintFoldedCode() const; |
| 42 | |
| 43 | private: |
| 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 | |
| 62 | class : public QWidget |
| 63 | { |
| 64 | public: |
| 65 | explicit (QWidget *parent = nullptr); |
| 66 | () override; |
| 67 | |
| 68 | QFont (); |
| 69 | |
| 70 | bool (); |
| 71 | QStringList (); |
| 72 | QColor (); |
| 73 | QColor (); |
| 74 | bool (); |
| 75 | |
| 76 | bool (); |
| 77 | QStringList (); |
| 78 | QColor (); |
| 79 | QColor (); |
| 80 | bool (); |
| 81 | |
| 82 | public: |
| 83 | void (const QPoint &pos); |
| 84 | |
| 85 | private: |
| 86 | void (); |
| 87 | void (); |
| 88 | |
| 89 | QCheckBox *, *; |
| 90 | KFontRequester *; |
| 91 | QGroupBox *, *; |
| 92 | QLineEdit *, *, *; |
| 93 | KColorButton *, *; |
| 94 | QCheckBox *; |
| 95 | QLineEdit *, *, *; |
| 96 | KColorButton *, *; |
| 97 | QCheckBox *; |
| 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 | */ |
| 112 | class KatePrintLayout : public QWidget |
| 113 | { |
| 114 | public: |
| 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 | |
| 126 | private: |
| 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 |
| 144 | |