kpresenter
KPrBrushProperty.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef BRUSHSTYLEWIDGET_H
00020 #define BRUSHSTYLEWIDGET_H
00021
00022 #include <qbrush.h>
00023 #include <qwidget.h>
00024
00025 #include "KPrCommand.h"
00026
00027 class BrushPropertyUI;
00028 class GradientPropertyUI;
00029 class KPrPBPreview;
00030
00031 class QWidgetStack;
00032
00033 class KComboBox;
00034
00035
00036 class KPrBrushProperty : public QWidget
00037 {
00038 Q_OBJECT
00039 public:
00040 KPrBrushProperty( QWidget *parent, const char *name, const KPrBrushCmd::Brush &brush );
00041 ~KPrBrushProperty();
00042
00043 int getBrushPropertyChange() const;
00044 KPrBrushCmd::Brush getBrush() const;
00045
00046 void setBrush( KPrBrushCmd::Brush &brush );
00047
00048 void apply();
00049
00050 protected:
00051 FillType getFillType() const;
00052 QBrush getQBrush() const;
00053
00054 QColor getGColor1() const;
00055 QColor getGColor2() const;
00056 BCType getGType() const;
00057 bool getGUnbalanced() const;
00058 int getGXFactor() const;
00059 int getGYFactor() const;
00060
00061 void setQBrush( const QBrush &brush );
00062 void setGradient( const QColor &_c1, const QColor &_c2, BCType _t,
00063 bool _unbalanced, int _xfactor, int _yfactor );
00064 void setUnbalancedEnabled( bool state );
00065
00066 KComboBox *m_typeCombo;
00067 QWidgetStack *m_stack;
00068 BrushPropertyUI *m_brushUI;
00069 GradientPropertyUI *m_gradientUI;
00070 KPrPBPreview *m_preview_color;
00071 KPrPBPreview *m_preview_gradient;
00072
00073 KPrBrushCmd::Brush m_brush;
00074
00075 protected slots:
00076 void slotReset();
00077 void slotTypeChanged( int pos );
00078 void slotBrushChanged();
00079
00080 void slotColor1Changed();
00081 void slotColor2Changed();
00082 void slotBackColorTypeChanged();
00083 void slotUnbalancedChanged();
00084 void slotXFactorChanged();
00085 void slotYFactorChanged();
00086 };
00087
00088 #endif
|