kpresenter

KPrBrushProperty.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19#ifndef BRUSHSTYLEWIDGET_H
20#define BRUSHSTYLEWIDGET_H
21
22#include <tqbrush.h>
23#include <tqwidget.h>
24
25#include "KPrCommand.h"
26
27class BrushPropertyUI;
28class GradientPropertyUI;
29class KPrPBPreview;
30
31class TQWidgetStack;
32
33class KComboBox;
34
35
36class KPrBrushProperty : public TQWidget
37{
38 TQ_OBJECT
39
40public:
41 KPrBrushProperty( TQWidget *parent, const char *name, const KPrBrushCmd::Brush &brush );
42 ~KPrBrushProperty();
43
44 int getBrushPropertyChange() const;
45 KPrBrushCmd::Brush getBrush() const;
46
47 void setBrush( KPrBrushCmd::Brush &brush );
48
49 void apply();
50
51protected:
52 FillType getFillType() const;
53 TQBrush getTQBrush() const;
54
55 TQColor getGColor1() const;
56 TQColor getGColor2() const;
57 BCType getGType() const;
58 bool getGUnbalanced() const;
59 int getGXFactor() const;
60 int getGYFactor() const;
61
62 void setTQBrush( const TQBrush &brush );
63 void setGradient( const TQColor &_c1, const TQColor &_c2, BCType _t,
64 bool _unbalanced, int _xfactor, int _yfactor );
65 void setUnbalancedEnabled( bool state );
66
67 KComboBox *m_typeCombo;
68 TQWidgetStack *m_stack;
69 BrushPropertyUI *m_brushUI;
70 GradientPropertyUI *m_gradientUI;
71 KPrPBPreview *m_preview_color;
72 KPrPBPreview *m_preview_gradient;
73
74 KPrBrushCmd::Brush m_brush;
75
76protected slots:
77 void slotReset();
78 void slotTypeChanged( int pos );
79 void slotBrushChanged();
80
81 void slotColor1Changed();
82 void slotColor2Changed();
83 void slotBackColorTypeChanged();
84 void slotUnbalancedChanged();
85 void slotXFactorChanged();
86 void slotYFactorChanged();
87};
88
89#endif /* BRUSHSTYLEWIDGET_H */