mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:52:44 +00:00 
			
		
		
		
	 1682f0b760
			
		
	
	
		1682f0b760
		
	
	
	
	
		
			
			SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
		
			
				
	
	
		
			39 lines
		
	
	
	
		
			913 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
	
		
			913 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibCore/Timer.h>
 | |
| #include <LibGUI/Dialog.h>
 | |
| 
 | |
| namespace GUI {
 | |
| 
 | |
| class ProcessChooser final : public GUI::Dialog {
 | |
|     C_OBJECT(ProcessChooser);
 | |
| 
 | |
| public:
 | |
|     virtual ~ProcessChooser() override;
 | |
| 
 | |
|     pid_t pid() const { return m_pid; }
 | |
| 
 | |
| private:
 | |
|     ProcessChooser(const StringView& window_title = "Process Chooser", const StringView& button_label = "Select", const Gfx::Bitmap* window_icon = nullptr, GUI::Window* parent_window = nullptr);
 | |
| 
 | |
|     void set_pid_from_index_and_close(const ModelIndex&);
 | |
| 
 | |
|     pid_t m_pid { 0 };
 | |
| 
 | |
|     String m_window_title;
 | |
|     String m_button_label;
 | |
|     RefPtr<Gfx::Bitmap> m_window_icon;
 | |
|     RefPtr<TableView> m_table_view;
 | |
| 
 | |
|     bool m_refresh_enabled { true };
 | |
|     unsigned m_refresh_interval { 1000 };
 | |
|     RefPtr<Core::Timer> m_refresh_timer;
 | |
| };
 | |
| 
 | |
| }
 |