/* * Copyright (c) 2021, Nick Vella * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "ProjectTemplatesModel.h" #include #include #include #include #include #include namespace HackStudio { class NewProjectDialog : public GUI::Dialog { C_OBJECT(NewProjectDialog); public: static int show(GUI::Window* parent_window); Optional created_project_path() const { return m_created_project_path; } private: NewProjectDialog(GUI::Window* parent); virtual ~NewProjectDialog() override = default; void update_dialog(); Optional get_available_project_name(); Optional get_project_full_path(); void do_create_project(); RefPtr selected_template(); NonnullRefPtr m_model; bool m_input_valid { false }; RefPtr m_icon_view_container; RefPtr m_icon_view; RefPtr m_description_label; RefPtr m_name_input; RefPtr m_create_in_input; RefPtr m_full_path_label; RefPtr m_ok_button; RefPtr m_cancel_button; RefPtr m_browse_button; Optional m_created_project_path; }; }