1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef PROPERTYWIDGET_TEXTCOLOR_H
8 #define PROPERTYWIDGET_TEXTCOLOR_H
9 
10 #include "ui_propertywidget_textcolorbase.h"
11 
12 #include "propertywidgetbase.h"
13 
14 class ScribusDoc;
15 class ScribusMainWindow;
16 
17 class PropertyWidget_TextColor : public QFrame, Ui::PropertyWidget_TextColorBase,
18 	                             public PropertyWidgetBase
19 {
20 	Q_OBJECT
21 
22 public:
23 	PropertyWidget_TextColor(QWidget* parent);
~PropertyWidget_TextColor()24 	~PropertyWidget_TextColor() {};
25 
26 	void updateColorList();
27 	void setCurrentItem(PageItem *item);
28 
29 protected:
30 	PageItem *m_item {nullptr};
31 	ScribusMainWindow* m_ScMW {nullptr};
32 
33 	void connectSignals();
34 	void disconnectSignals();
35 
36 	void configureWidgets();
37 
38 	void changeEvent(QEvent *e) override;
39 
40 public slots:
41 	void setMainWindow(ScribusMainWindow *mw);
42 	void setDoc(ScribusDoc *d);
43 
44 	void handleSelectionChanged();
45 	void handleUpdateRequest(int);
46 
47 	void iconSetChange();
48 	void languageChange();
unitChange()49 	void unitChange() {};
50 	void localeChange();
51 
52 	void showOutlineW(double x);
53 	void showShadowOffset(double x, double y);
54 	void showStrikeThru(double p, double w);
55 	void showTextColors(const QString& strokeCol, const QString& fillCol, const QString& backCol, double strokeShd, double fillShd, double backShd);
56 	void showTextEffects(int s);
57 	void showUnderline(double p, double w);
58 
59 	void updateCharStyle(const CharStyle& charStyle);
60 	void updateStyle(const ParagraphStyle& newCurrent);
61 
62 private slots:
63 	void handleOutlineWidth();
64 	void handleShadowOffs();
65 	void handleStrikeThru();
66 	void handleTextFill();
67 	void handleTextShade();
68 	void handleTextStroke();
69 	void handleTextBackground();
70 	void handleTypeStyle(int s);
71 	void handleUnderline();
72 };
73 
74 #endif
75