Serenity Operating System
at master 31 lines 981 B view raw
1/* 2 * Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org> 3 * Copyright (c) 2022, the SerenityOS developers. 4 * 5 * SPDX-License-Identifier: BSD-2-Clause 6 */ 7 8#pragma once 9 10#include <AK/String.h> 11#include <LibCore/Version.h> 12#include <LibGUI/Dialog.h> 13 14namespace GUI { 15 16class AboutDialog final : public Dialog { 17 C_OBJECT_ABSTRACT(AboutDialog) 18public: 19 static ErrorOr<NonnullRefPtr<AboutDialog>> try_create(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr); 20 virtual ~AboutDialog() override = default; 21 22 static ErrorOr<void> show(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr, RefPtr<Gfx::Bitmap const> window_icon = nullptr); 23 24private: 25 AboutDialog(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr); 26 27 String m_name; 28 String m_version_string; 29 RefPtr<Gfx::Bitmap const> m_icon; 30}; 31}