72
82
LineEnd lineBegin, lineEnd;
73
83
KPGradient *gradient;
84
KoZoomHandler *_zoomHandler;
77
87
/******************************************************************/
88
/* class ConfPenDia */
79
89
/******************************************************************/
81
class StyleDia : public QTabDialog
91
class ConfPenDia : public QWidget
91
SdAll = SdPen | SdBrush | SdGradient | SdEndBeginLine
94
StyleDia( QWidget* parent = 0, const char* name = 0, int flags = SdAll );
96
ConfPenDia( QWidget* parent, const char* name, int flags);
97
99
void setPen( const QPen &_pen );
98
void setBrush( const QBrush &_brush );
99
100
void setLineBegin( LineEnd lb );
100
101
void setLineEnd( LineEnd le );
102
void resetConfigChangedValues();
105
LineEnd getLineBegin()const;
106
LineEnd getLineEnd()const;
107
int getPenConfigChange() const;
111
bool m_bLineBeginChanged, m_bLineEndChanged;
112
bool m_bColorChanged, m_bStyleChanged, m_bWidthChanged;
116
KColorButton *choosePCol;
117
KIntNumInput *choosePWidth;
119
KComboBox *choosePStyle, *clineBegin, *clineEnd;
123
void slotColorChanged();
124
void slotStyleChanged();
125
void slotWidthChanged();
126
void slotLineBeginChanged();
127
void slotLineEndChanged();
130
/******************************************************************/
131
/* class ConfBrushDia */
132
/******************************************************************/
134
class ConfBrushDia : public QWidget
139
ConfBrushDia( QWidget* parent, const char* name, int flags);
142
void setBrush( const QBrush &_brush );
101
143
void setFillType( FillType ft );
102
144
void setGradient( const QColor &_c1, const QColor &_c2, BCType _t,
103
bool _unbalanced, int _xfactor, int _yfactor );
104
void setSticky( bool s );
145
bool _unbalanced, int _xfactor, int _yfactor );
146
void resetConfigChangedValues();
108
LineEnd getLineBegin();
109
LineEnd getLineEnd();
110
FillType getFillType();
114
bool getGUnbalanced();
148
QBrush getBrush()const;
149
FillType getFillType() const;
150
QColor getGColor1()const;
151
QColor getGColor2()const;
152
BCType getGType()const;
153
bool getGUnbalanced()const;
154
int getGXFactor() const;
155
int getGYFactor() const;
156
int getBrushConfigChange() const;
125
KColorButton *choosePCol, *chooseBCol;
126
QComboBox *choosePStyle, *chooseBStyle, *clineBegin, *clineEnd, *cFillType;
127
QSpinBox *choosePWidth;
128
PBPreview *penPrev, *brushPrev;
129
QCheckBox *unbalanced, *sticky;
130
QComboBox *gradients;
160
bool m_bBrushColorChanged, m_bBrushStyleChanged, m_bFillTypeChanged;
161
bool m_bGColor1Changed, m_bGColor2Changed, m_bGTypeChanged, m_bGUnbalancedChanged;
162
int m_flags, oldXfactor, oldYfactor;
163
QCheckBox *unbalanced;
165
FillType oldFillType;
168
KComboBox *gradients, *chooseBStyle, *cFillType;
131
169
KColorButton *gradient1, *gradient2;
132
170
QSlider *xfactor, *yfactor;
133
171
QLabel *xfactorLabel, *yfactorLabel;
134
172
KPGradient *gradient;
174
KColorButton *chooseBCol;
175
PBPreview *brushPrev;
179
void slotBrushColorChanged();
180
void slotBrushStyleChanged();
181
void slotFillTypeChanged();
182
void slotGColor1Changed();
183
void slotGColor2Changed();
184
void slotGTypeChanged();
185
void slotGUnbalancedChanged();
186
void slotGXFactorChanged();
187
void slotGYFactorChanged();
190
/******************************************************************/
192
/******************************************************************/
194
class StyleDia : public QTabDialog
209
SdAll = SdPen | SdBrush | SdGradient | SdEndBeginLine
212
StyleDia( QWidget* parent = 0, const char* name = 0, KPresenterDoc *_doc = 0,
213
bool _noStickyObj = true, bool _oneObject=true, bool _alltextobj=false );
216
void setSticky( PropValue p );
217
bool isSticky()const;
218
bool stickyNoChange()const;
220
void setObjectName( QString &name );
221
QString getObjectName()const;
223
bool isOneObject()const {return oneObject;}
225
void setProtected( PropValue p );
226
bool isProtected()const;
227
bool protectNoChange()const;
229
void setKeepRatio( PropValue p );
230
bool isKeepRatio()const;
231
bool keepRatioNoChange()const;
234
void setMargins( double left, double right, double top, double bottom);
236
double marginsLeft();
237
double marginsRight();
238
double marginsBottom();
241
KoRect getNewSize() const;
242
void setSize(const KoRect &);
244
bool isAllTextObject()const {return allTextObj;}
245
void setProtectContent( bool p );
246
bool isProtectContent()const;
249
ConfPenDia* getConfPenDia()const { return m_confPenDia; }
250
ConfPieDia* getConfPieDia()const { return m_confPieDia; }
251
ConfBrushDia* getConfBrushDia()const { return m_confBrushDia; }
252
ConfRectDia* getConfRectangleDia()const { return m_confRectDia; }
253
ConfPolygonDia* getConfPolygonDia()const { return m_confPolygonDia; }
254
ConfPictureDia* getConfPictureDia()const { return m_confPictureDia; }
258
void setupTabBrush();
259
void setupTabGeneral();
260
void setupTabGeometry();
262
void setupTabPolygon();
263
void setupTabPicture();
264
void setupTabRectangle();
267
QCheckBox *sticky, *protect, *keepRatio, *protectContent;
268
QCheckBox *synchronize;
269
QLineEdit *objectName;
270
KDoubleNumInput *m_lineTop, *m_lineLeft, *m_lineWidth, *m_lineHeight;
271
KDoubleNumInput *sml, *smt, *smb, *smr;
273
KPresenterDoc *m_doc;
275
ConfPenDia *m_confPenDia;
276
ConfPieDia *m_confPieDia;
277
ConfRectDia *m_confRectDia;
278
ConfBrushDia *m_confBrushDia;
279
ConfPolygonDia *m_confPolygonDia;
280
ConfPictureDia *m_confPictureDia;
283
bool lockUpdate, stickyObj, oneObject;
286
QString oldObjectName;
287
bool oldProtectContent;
288
PropValue oldProtect;
289
PropValue oldKeepRatio;
294
double heightByWidthRatio;
139
void styleDone() { emit styleOk(); }
140
void updatePenConfiguration();
141
void updateBrushConfiguration();
299
void protectChanged();
300
void slotMarginsChanged( double );
301
void slotProtectContentChanged( bool );
302
void slotUpdateWidthForHeight( double );
303
void slotUpdateHeightForWidth( double );
304
void slotKeepRatioToggled( bool );
148
309
#endif //STYLEDIA_H