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 <kprintdialogpage.h>
00025
00026
class KateDocument;
00027
00028
class KColorButton;
00029
class KPrinter;
00030
class QCheckBox;
00031
class QComboBox;
00032
class QGroupBox;
00033
class QLabel;
00034
class QLineEdit;
00035
class QSpinBox;
00036
00037
class KatePrinter
00038 {
00039
public:
00040
static bool print (KateDocument *doc);
00041 };
00042
00043
#ifndef Q_WS_WIN //TODO: reenable
00044
00045
00046
00047
00048
00049
00050
00051
class KatePrintTextSettings :
public KPrintDialogPage
00052 {
00053 Q_OBJECT
00054
public:
00055 KatePrintTextSettings( KPrinter *printer,
QWidget *parent=0,
const char *name=0 );
00056 ~KatePrintTextSettings(){};
00057
00058
void getOptions(
QMap<QString,QString>& opts,
bool incldef =
false);
00059
void setOptions(
const QMap<QString,QString>& opts);
00060
00061
00062
void enableSelection(
bool );
00063
00064
private:
00065
QCheckBox *cbSelection, *cbLineNumbers, *cbGuide;
00066 };
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
class KatePrintHeaderFooter :
public KPrintDialogPage
00079 {
00080 Q_OBJECT
00081
public:
00082 KatePrintHeaderFooter( KPrinter *printer,
QWidget *parent=0,
const char *name=0 );
00083 ~KatePrintHeaderFooter(){};
00084
00085
void getOptions(
QMap<QString,QString>& opts,
bool incldef =
false);
00086
void setOptions(
const QMap<QString,QString>& opts);
00087
00088
public slots:
00089
void setHFFont();
00090
00091
private:
00092
QCheckBox *cbEnableHeader, *cbEnableFooter;
00093
QLabel *lFontPreview;
00094
QString strFont;
00095
QGroupBox *gbHeader, *gbFooter;
00096
QLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
00097
KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
00098
QCheckBox *cbHeaderEnableBgColor;
00099
QLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
00100
KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
00101
QCheckBox *cbFooterEnableBgColor;
00102 };
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
class KatePrintLayout :
public KPrintDialogPage
00117 {
00118 Q_OBJECT
00119
public:
00120 KatePrintLayout( KPrinter *printer,
QWidget *parent=0,
const char *name=0 );
00121 ~KatePrintLayout(){};
00122
00123
void getOptions(
QMap<QString,QString>& opts,
bool incldef =
false);
00124
void setOptions(
const QMap<QString,QString>& opts);
00125
00126
private:
00127
QComboBox *cmbSchema;
00128
QCheckBox *cbEnableBox, *cbDrawBackground;
00129
QGroupBox *gbBoxProps;
00130
QSpinBox *sbBoxWidth, *sbBoxMargin;
00131
KColorButton* kcbtnBoxColor;
00132 };
00133
00134
#endif
00135
00136
#endif