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:
parent
264782557e
commit
aed25991e6
14 changed files with 379 additions and 15 deletions
35
Userland/Applications/MapsSettings/MapsSettingsWidget.h
Normal file
35
Userland/Applications/MapsSettings/MapsSettingsWidget.h
Normal 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 };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue