2022-01-20 13:23:55 +00:00
|
|
|
/*
|
2022-04-03 23:13:52 +00:00
|
|
|
* Copyright (c) 2022, cflip <cflip@cflip.net>
|
2022-01-20 13:23:55 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/RefPtr.h>
|
|
|
|
#include <LibGUI/SettingsWindow.h>
|
|
|
|
|
|
|
|
class ClockSettingsWidget final : public GUI::SettingsWindow::Tab {
|
|
|
|
C_OBJECT(ClockSettingsWidget)
|
|
|
|
|
|
|
|
private:
|
|
|
|
ClockSettingsWidget();
|
|
|
|
|
|
|
|
virtual void apply_settings() override;
|
|
|
|
virtual void reset_default_values() override;
|
2022-02-02 19:38:43 +00:00
|
|
|
|
2022-04-13 00:01:35 +00:00
|
|
|
void update_time_format_string();
|
2022-04-21 11:40:04 +00:00
|
|
|
void update_clock_preview();
|
2022-04-13 00:01:35 +00:00
|
|
|
|
2022-04-03 23:13:52 +00:00
|
|
|
RefPtr<GUI::RadioButton> m_24_hour_radio;
|
2022-04-13 00:01:35 +00:00
|
|
|
RefPtr<GUI::CheckBox> m_show_seconds_checkbox;
|
2022-04-03 23:13:52 +00:00
|
|
|
RefPtr<GUI::TextBox> m_custom_format_input;
|
2022-04-21 11:40:04 +00:00
|
|
|
RefPtr<GUI::Label> m_clock_preview;
|
2022-02-02 19:38:43 +00:00
|
|
|
|
2022-04-21 11:40:04 +00:00
|
|
|
RefPtr<Core::Timer> m_clock_preview_update_timer;
|
|
|
|
|
|
|
|
String m_time_format;
|
2022-01-20 13:23:55 +00:00
|
|
|
};
|