| 
									
										
										
										
											2017-04-27 20:26:05 +02:00
										 |  |  | // SPDX-License-Identifier: GPL-2.0
 | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | #ifndef PREFERENCES_WIDGET_H
 | 
					
						
							|  |  |  | #define PREFERENCES_WIDGET_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QDialog>
 | 
					
						
							| 
									
										
										
										
											2016-04-04 22:02:03 -07:00
										 |  |  | #include "core/pref.h"
 | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | class AbstractPreferencesWidget; | 
					
						
							|  |  |  | class QListWidget; | 
					
						
							|  |  |  | class QStackedWidget; | 
					
						
							|  |  |  | class QDialogButtonBox; | 
					
						
							| 
									
										
										
										
											2015-09-17 17:53:39 -03:00
										 |  |  | class QAbstractButton; | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-31 21:02:16 -02:00
										 |  |  | class PreferencesDialog : public QDialog { | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | 	Q_OBJECT | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2015-10-31 21:02:16 -02:00
										 |  |  | 	static PreferencesDialog* instance(); | 
					
						
							| 
									
										
										
										
											2018-07-31 07:41:19 +02:00
										 |  |  | 	~PreferencesDialog(); | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | 	void addPreferencePage(AbstractPreferencesWidget *page); | 
					
						
							|  |  |  | 	void refreshPages(); | 
					
						
							| 
									
										
										
										
											2015-10-31 21:02:16 -02:00
										 |  |  | 	void emitSettingsChanged(); | 
					
						
							| 
									
										
										
										
											2015-10-02 11:09:13 -03:00
										 |  |  | signals: | 
					
						
							|  |  |  | 	void settingsChanged(); | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2015-10-31 21:02:16 -02:00
										 |  |  | 	PreferencesDialog(); | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | 	void cancelRequested(); | 
					
						
							| 
									
										
										
										
											2015-11-02 12:50:17 -08:00
										 |  |  | 	void applyRequested(bool closeIt); | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | 	void defaultsRequested(); | 
					
						
							| 
									
										
										
										
											2015-09-17 17:53:39 -03:00
										 |  |  | 	void buttonClicked(QAbstractButton *btn); | 
					
						
							| 
									
										
										
										
											2015-09-17 17:16:40 -03:00
										 |  |  | 	QList<AbstractPreferencesWidget*> pages; | 
					
						
							|  |  |  | 	QListWidget *pagesList; | 
					
						
							|  |  |  | 	QStackedWidget *pagesStack; | 
					
						
							|  |  |  | 	QDialogButtonBox *buttonBox; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-02 12:50:17 -08:00
										 |  |  | #endif
 |