23#include <kdialogbase.h>
25#include <tqdatetime.h>
28#include "KPrBackground.h"
44class KPrBackPreview : public TQFrame
50 KPrBackPreview( TQWidget *parent, KPrPage *page );
51 virtual ~KPrBackPreview();
53 KPrBackGround *backGround() const {
58 virtual void drawContents( TQPainter *p );
65class KPrBackDialog : public KDialogBase
71 KPrBackDialog( TQWidget* parent, const char* name,
72 BackType backType, const TQColor &backColor1,
73 const TQColor &backColor2, BCType _bcType,
74 const KoPicture &backPic,
75 BackView backPicView, bool _unbalanced,
76 int _xfactor, int _yfactor, KPrPage *_page );
78 KPrBackGround::Settings getBackGround() const;
79 bool useMasterBackground() const;
82 void showEvent( TQShowEvent *e );
83 TQColor getBackColor1() const;
84 TQColor getBackColor2() const;
85 BCType getBackColorType() const;
86 BackType getBackType() const;
87 KoPicture getBackPicture() const { return m_picture; }
88 BackView getBackView() const;
89 bool getBackUnbalanced() const;
90 int getBackXFactor() const;
91 int getBackYFactor() const;
94 TQCheckBox *unbalanced;
95 TQComboBox *cType, *backCombo, *picView;
96 TQLabel *picChooseLabel;
97 KURLRequester *picChoose;
98 KColorButton *color1Choose, *color2Choose;
99 TQSlider *xfactor, *yfactor;
100 KPrBackPreview *preview;
101 bool picChanged, lockUpdate;
102 TQLabel *labXFactor, *labYFactor;
103 TQTabWidget *tabWidget;
104 TQCheckBox *m_useMasterBackground;
106 bool oldUseMasterBackground;
107 BackType oldBackType;
108 TQColor oldBackColor1;
109 TQColor oldBackColor2;
111 BackView oldBackPicView;
116 KoPicture m_picture, m_oldpicture;
120 void aboutToSelectPic();
121 void afterSelectPic( const TQString & );
122 void updateConfiguration();
124 void Ok() { emit backOk( this, false ); }
125 void Apply() { emit backOk( this, false ); }
126 void ApplyGlobal() { emit backOk( this, true ); }
128 void changeComboText( int _p);
132 void backOk( KPrBackDialog*, bool );
|