1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 01:58:12 +00:00
serenity/Userland/Applications/CalendarSettings/CalendarSettingsWidget.h
Olivier De Cannière a1d98b825d Calendar: Add setting to choose default view
This commit adds an entry to the Calendar Settings to allow the user to
select between the month and year views as the startup default.
2022-09-20 13:12:00 -04:00

25 lines
663 B
C++

/*
* Copyright (c) 2022-2022, Olivier De Cannière <olivier.decanniere96@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/ComboBox.h>
#include <LibGUI/SettingsWindow.h>
class CalendarSettingsWidget final : public GUI::SettingsWindow::Tab {
C_OBJECT(CalendarSettingsWidget)
public:
virtual void apply_settings() override;
virtual void reset_default_values() override;
private:
CalendarSettingsWidget();
static constexpr Array<StringView, 2> const m_view_modes = { "Month"sv, "Year"sv };
RefPtr<GUI::ComboBox> m_first_day_of_week_combobox;
RefPtr<GUI::ComboBox> m_default_view_combobox;
};