| 
									
										
										
										
											2014-02-11 19:14:46 +01:00
										 |  |  | #ifndef PREFERENCES_H
 | 
					
						
							|  |  |  | #define PREFERENCES_H
 | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <QDialog>
 | 
					
						
							| 
									
										
										
										
											2014-04-11 10:51:07 +02:00
										 |  |  | #include "pref.h"
 | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-03 11:54:24 -07:00
										 |  |  | #include "ui_preferences.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-03 05:58:50 +09:00
										 |  |  | class QAbstractButton; | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-27 20:09:57 -08:00
										 |  |  | class PreferencesDialog : public QDialog { | 
					
						
							|  |  |  | 	Q_OBJECT | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2014-02-27 20:09:57 -08:00
										 |  |  | 	static PreferencesDialog *instance(); | 
					
						
							|  |  |  | 	void showEvent(QShowEvent *); | 
					
						
							| 
									
										
										
										
											2014-02-06 11:38:28 -02:00
										 |  |  | 	void emitSettingsChanged(); | 
					
						
							| 
									
										
										
										
											2014-07-16 18:40:49 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | signals: | 
					
						
							|  |  |  | 	void settingsChanged(); | 
					
						
							| 
									
										
										
										
											2014-02-27 20:09:57 -08:00
										 |  |  | public | 
					
						
							|  |  |  | slots: | 
					
						
							|  |  |  | 	void buttonClicked(QAbstractButton *button); | 
					
						
							| 
									
										
										
										
											2013-10-14 07:19:13 +03:00
										 |  |  | 	void on_chooseFile_clicked(); | 
					
						
							| 
									
										
										
										
											2014-06-25 17:46:51 +08:00
										 |  |  | 	void on_resetSettings_clicked(); | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | 	void syncSettings(); | 
					
						
							| 
									
										
										
										
											2014-02-08 18:07:06 +01:00
										 |  |  | 	void loadSettings(); | 
					
						
							| 
									
										
										
										
											2013-06-03 21:08:49 +09:00
										 |  |  | 	void restorePrefs(); | 
					
						
							|  |  |  | 	void rememberPrefs(); | 
					
						
							| 
									
										
										
										
											2013-12-05 00:48:37 +01:00
										 |  |  | 	void gflowChanged(int gf); | 
					
						
							|  |  |  | 	void gfhighChanged(int gf); | 
					
						
							| 
									
										
										
										
											2014-06-28 15:01:51 +04:00
										 |  |  | 	void proxyType_changed(int idx); | 
					
						
							| 
									
										
										
										
											2014-07-16 18:40:49 -03:00
										 |  |  | 	void on_btnUseDefaultFile_toggled(bool toggle); | 
					
						
							| 
									
										
										
										
											2013-12-05 00:48:37 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2014-02-27 20:09:57 -08:00
										 |  |  | 	explicit PreferencesDialog(QWidget *parent = 0, Qt::WindowFlags f = 0); | 
					
						
							| 
									
										
										
										
											2013-06-03 21:08:49 +09:00
										 |  |  | 	void setUiFromPrefs(); | 
					
						
							| 
									
										
										
										
											2013-10-03 11:54:25 -07:00
										 |  |  | 	Ui::PreferencesDialog ui; | 
					
						
							| 
									
										
										
										
											2013-05-28 11:21:27 -07:00
										 |  |  | 	struct preferences oldPrefs; | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-11 19:14:46 +01:00
										 |  |  | #endif // PREFERENCES_H
 |