2020-01-18 09:38:21 +01:00
|
|
|
/*
|
2023-02-20 19:03:44 +01:00
|
|
|
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
|
2022-02-26 10:50:04 -07:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2020-01-18 09:38:21 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
|
2019-09-02 19:45:55 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2023-02-28 16:39:41 +01:00
|
|
|
#include <AK/String.h>
|
2021-08-29 12:00:50 +02:00
|
|
|
#include <LibCore/Version.h>
|
2020-02-06 20:33:02 +01:00
|
|
|
#include <LibGUI/Dialog.h>
|
2019-09-02 19:45:55 +02:00
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
|
|
class AboutDialog final : public Dialog {
|
2023-02-02 17:07:49 +00:00
|
|
|
C_OBJECT_ABSTRACT(AboutDialog)
|
2019-09-02 19:45:55 +02:00
|
|
|
public:
|
2023-09-13 20:34:46 +01:00
|
|
|
[[nodiscard]] static NonnullRefPtr<AboutDialog> create(String const& name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr);
|
2022-02-26 10:50:04 -07:00
|
|
|
virtual ~AboutDialog() override = default;
|
2019-09-02 19:45:55 +02:00
|
|
|
|
2023-08-14 10:56:13 +02:00
|
|
|
static void show(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr, RefPtr<Gfx::Bitmap const> window_icon = nullptr);
|
2019-09-02 19:45:55 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-09-13 20:34:46 +01:00
|
|
|
AboutDialog(String const& name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr);
|
2019-09-29 20:37:02 +02:00
|
|
|
|
2023-02-28 16:39:41 +01:00
|
|
|
String m_name;
|
|
|
|
|
String m_version_string;
|
2023-02-20 19:03:44 +01:00
|
|
|
RefPtr<Gfx::Bitmap const> m_icon;
|
2019-09-02 19:45:55 +02:00
|
|
|
};
|
2020-02-02 15:07:41 +01:00
|
|
|
}
|