Kate
kateprinter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00044
00045
00046
00047
00048
00049
00050 class KatePrintTextSettings : public QWidget
00051 {
00052 Q_OBJECT
00053 public:
00054 explicit KatePrintTextSettings( QWidget *parent=0 );
00055 ~KatePrintTextSettings();
00056
00057
00058 bool printLineNumbers();
00059 bool printGuide();
00060
00061
00062
00063
00064 private:
00065 void readSettings();
00066 void writeSettings();
00067
00068 QCheckBox *cbLineNumbers, *cbGuide;
00069 };
00070
00071
00072
00073
00074
00075
00076
00077
00078
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
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
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
00157
00158 #endif