ladybird/Userland/Applications/GamesSettings/CardSettingsWidget.h
Ali Mohammad Pur 5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30

49 lines
1.3 KiB
C++

/*
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "CardGamePreview.h"
#include <LibGUI/ColorInput.h>
#include <LibGUI/ComboBox.h>
#include <LibGUI/Frame.h>
#include <LibGUI/IconView.h>
#include <LibGUI/ImageWidget.h>
#include <LibGUI/ModelIndex.h>
#include <LibGUI/SettingsWindow.h>
namespace GamesSettings {
class CardSettingsWidget final : public GUI::SettingsWindow::Tab {
C_OBJECT_ABSTRACT(CardSettingsWidget)
public:
static ErrorOr<NonnullRefPtr<CardSettingsWidget>> try_create();
static ErrorOr<NonnullRefPtr<CardSettingsWidget>> create();
virtual ~CardSettingsWidget() override = default;
virtual void apply_settings() override;
virtual void reset_default_values() override;
private:
CardSettingsWidget() = default;
ErrorOr<void> initialize();
bool set_card_back_image_path(StringView);
String card_back_image_path() const;
String card_front_images_set_name() const;
Vector<ByteString> m_card_front_sets;
RefPtr<CardGamePreview> m_preview_frame;
RefPtr<GUI::ColorInput> m_background_color_input;
RefPtr<GUI::ComboBox> m_card_front_images_combo_box;
RefPtr<GUI::IconView> m_card_back_image_view;
GUI::ModelIndex m_last_selected_card_back;
};
}