| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | #ifndef PREFERENCES_DIALOG_H
 | 
					
						
							|  |  |  | #define PREFERENCES_DIALOG_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QDialog>
 | 
					
						
							| 
									
										
										
										
											2013-05-28 11:21:27 -07:00
										 |  |  | #include "../dive.h"
 | 
					
						
							|  |  |  | #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
										 |  |  | 
 | 
					
						
							|  |  |  | class PreferencesDialog :public QDialog{ | 
					
						
							|  |  |  | Q_OBJECT | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  | 	static PreferencesDialog* instance(); | 
					
						
							| 
									
										
										
										
											2013-06-03 05:58:50 +09:00
										 |  |  | 	void showEvent(QShowEvent* ); | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | signals: | 
					
						
							|  |  |  | 	void settingsChanged(); | 
					
						
							|  |  |  | public slots: | 
					
						
							| 
									
										
										
										
											2013-06-03 05:58:50 +09:00
										 |  |  | 	void buttonClicked(QAbstractButton* button); | 
					
						
							| 
									
										
										
										
											2013-10-14 07:19:13 +03:00
										 |  |  | 	void on_chooseFile_clicked(); | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | 	void syncSettings(); | 
					
						
							| 
									
										
										
										
											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); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-24 15:19:48 -03:00
										 |  |  | private: | 
					
						
							|  |  |  | 	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
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-28 11:21:27 -07:00
										 |  |  | #endif
 |