1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

Maps: Add MapsSettings with multiple tile providers options

This commit is contained in:
Bastiaan van der Plaat 2023-09-16 21:10:23 +02:00 committed by Andrew Kaster
parent 264782557e
commit aed25991e6
14 changed files with 379 additions and 15 deletions

View file

@ -0,0 +1,35 @@
/*
* Copyright (c) 2023, Bastiaan van der Plaat <bastiaan.v.d.plaat@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/SettingsWindow.h>
namespace MapsSettings {
class MapsSettingsWidget final : public GUI::SettingsWindow::Tab {
C_OBJECT_ABSTRACT(MapsSettingsWidget)
public:
static ErrorOr<NonnullRefPtr<MapsSettingsWidget>> create();
virtual void apply_settings() override;
virtual void reset_default_values() override;
private:
MapsSettingsWidget() = default;
static ErrorOr<NonnullRefPtr<MapsSettingsWidget>> try_create();
ErrorOr<void> setup();
void set_tile_provider(StringView url);
RefPtr<GUI::ComboBox> m_tile_provider_combobox;
RefPtr<GUI::Widget> m_custom_tile_provider_group;
RefPtr<GUI::TextBox> m_custom_tile_provider_textbox;
bool m_is_custom_tile_provider { false };
};
}