2022-08-20 13:14:48 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibGUI/ColorInput.h>
|
2022-08-21 15:07:46 +00:00
|
|
|
#include <LibGUI/Frame.h>
|
2022-08-21 15:02:56 +00:00
|
|
|
#include <LibGUI/IconView.h>
|
2022-08-21 15:07:46 +00:00
|
|
|
#include <LibGUI/ImageWidget.h>
|
2022-09-18 21:32:59 +00:00
|
|
|
#include <LibGUI/ModelIndex.h>
|
2022-08-20 13:14:48 +00:00
|
|
|
#include <LibGUI/SettingsWindow.h>
|
|
|
|
|
|
|
|
class CardSettingsWidget final : public GUI::SettingsWindow::Tab {
|
|
|
|
C_OBJECT(CardSettingsWidget)
|
|
|
|
public:
|
|
|
|
virtual ~CardSettingsWidget() override = default;
|
|
|
|
|
|
|
|
virtual void apply_settings() override;
|
|
|
|
virtual void reset_default_values() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
CardSettingsWidget();
|
|
|
|
|
2022-08-21 15:07:46 +00:00
|
|
|
void set_cards_background_color(Gfx::Color);
|
2022-12-04 18:02:33 +00:00
|
|
|
bool set_card_back_image_path(DeprecatedString const&);
|
|
|
|
DeprecatedString card_back_image_path() const;
|
2022-08-21 15:02:56 +00:00
|
|
|
|
2022-08-21 15:07:46 +00:00
|
|
|
RefPtr<GUI::Frame> m_preview_frame;
|
|
|
|
RefPtr<GUI::ImageWidget> m_preview_card_back;
|
|
|
|
RefPtr<GUI::ImageWidget> m_preview_card_front_ace;
|
|
|
|
RefPtr<GUI::ImageWidget> m_preview_card_front_queen;
|
|
|
|
|
2022-08-20 13:14:48 +00:00
|
|
|
RefPtr<GUI::ColorInput> m_background_color_input;
|
2022-08-21 15:02:56 +00:00
|
|
|
RefPtr<GUI::IconView> m_card_back_image_view;
|
2022-09-18 21:32:59 +00:00
|
|
|
|
|
|
|
GUI::ModelIndex m_last_selected_card_back;
|
2022-08-20 13:14:48 +00:00
|
|
|
};
|