| 
									
										
										
										
											2019-05-26 13:09:31 +01:00
										 |  |  | #include <AK/FileSystemPath.h>
 | 
					
						
							| 
									
										
										
										
											2019-05-08 22:10:00 +02:00
										 |  |  | #include <LibGUI/GDialog.h>
 | 
					
						
							| 
									
										
										
										
											2019-05-09 01:24:37 +02:00
										 |  |  | #include <LibGUI/GTableView.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class GDirectoryModel; | 
					
						
							| 
									
										
										
										
											2019-05-26 22:33:54 +02:00
										 |  |  | class GLabel; | 
					
						
							| 
									
										
										
										
											2019-03-09 21:38:13 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-08 22:10:00 +02:00
										 |  |  | class GFilePicker final : public GDialog { | 
					
						
							| 
									
										
										
										
											2019-03-09 21:38:13 +01:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2019-06-02 14:58:02 +02:00
										 |  |  |     GFilePicker(const StringView& path = "/", CObject* parent = nullptr); | 
					
						
							| 
									
										
										
										
											2019-03-09 21:38:13 +01:00
										 |  |  |     virtual ~GFilePicker() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-26 13:09:31 +01:00
										 |  |  |     FileSystemPath selected_file() const { return m_selected_file; } | 
					
						
							| 
									
										
										
										
											2019-05-09 04:56:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-09 21:38:13 +01:00
										 |  |  |     virtual const char* class_name() const override { return "GFilePicker"; } | 
					
						
							| 
									
										
										
										
											2019-03-16 12:57:04 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							| 
									
										
										
										
											2019-05-26 22:33:54 +02:00
										 |  |  |     void set_preview(const FileSystemPath&); | 
					
						
							|  |  |  |     void clear_preview(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-09 01:24:37 +02:00
										 |  |  |     GTableView* m_view { nullptr }; | 
					
						
							|  |  |  |     Retained<GDirectoryModel> m_model; | 
					
						
							| 
									
										
										
										
											2019-05-26 13:09:31 +01:00
										 |  |  |     FileSystemPath m_selected_file; | 
					
						
							| 
									
										
										
										
											2019-05-26 22:33:54 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     GLabel* m_preview_image_label { nullptr }; | 
					
						
							|  |  |  |     GLabel* m_preview_name_label { nullptr }; | 
					
						
							|  |  |  |     GLabel* m_preview_geometry_label { nullptr }; | 
					
						
							| 
									
										
										
										
											2019-03-09 21:38:13 +01:00
										 |  |  | }; |