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 
8 #ifndef PREFS_SCRIPTER_H
9 #define PREFS_SCRIPTER_H
10 
11 #include "ui_prefs_scripterbase.h"
12 #include "ui/prefs_pane.h"
13 #include "pconsole.h"
14 
15 class Prefs_Scripter : public Prefs_Pane, Ui::Prefs_Scripter
16 {
17 	Q_OBJECT
18 
19 	public:
20 		Prefs_Scripter(QWidget* parent=nullptr);
21 		~Prefs_Scripter();
22 
23 		void restoreDefaults(struct ApplicationPrefs *prefsData) override;
24 		void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const override;
25 
26 	public slots:
27 		void languageChange();
28 		//! \brief Apply changes to prefs. Auto connected.
29 		void apply() override;
30 
31 	protected:
32 		void setupSyntaxColors();
33 		QColor textColor;
34 		QColor commentColor;
35 		QColor keywordColor;
36 		QColor errorColor;
37 		QColor signColor;
38 		QColor stringColor;
39 		QColor numberColor;
40 
41 	protected slots:
42 		/*! \brief All requests for color change are handled here.
43 		\author Petr Vanek
44 		\warning I'm trying to handle multiple signals via single slot here. sender() Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise the return value is undefined. This function will return something apparently correct in other cases as well. However, its value may change during any function call, depending on what signal-slot connections are activated during that call. In Qt 3.0 the value will change more often than in 2.x. This function violates the object-oriented principle of modularity. However, getting access to the sender might be useful when many signals are connected to a single slot. The sender is undefined if the slot is called as a normal C++ function. */
45 		void setColor();
46 		void changeStartupScript();
47 
48 	signals:
49 		void prefsChanged();
50 };
51 
52 #endif // PREFS_SCRIPTER_H
53