mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:12:43 +00:00 
			
		
		
		
	 5ca888132d
			
		
	
	
		5ca888132d
		
	
	
	
	
		
			
			Add method to FindInFilesWidget which resets the model in order to clear the output when needed, and use this when a new project is opened.
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			631 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			631 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGUI/Button.h>
 | |
| #include <LibGUI/TableView.h>
 | |
| #include <LibGUI/TextBox.h>
 | |
| #include <LibGUI/Widget.h>
 | |
| 
 | |
| namespace HackStudio {
 | |
| 
 | |
| class FindInFilesWidget final : public GUI::Widget {
 | |
|     C_OBJECT(FindInFilesWidget)
 | |
| public:
 | |
|     virtual ~FindInFilesWidget() override { }
 | |
| 
 | |
|     void focus_textbox_and_select_all();
 | |
| 
 | |
|     void reset();
 | |
| 
 | |
| private:
 | |
|     explicit FindInFilesWidget();
 | |
| 
 | |
|     RefPtr<GUI::TextBox> m_textbox;
 | |
|     RefPtr<GUI::Button> m_button;
 | |
|     RefPtr<GUI::TableView> m_result_view;
 | |
| };
 | |
| 
 | |
| }
 |