mirror of
https://github.com/RGBCube/serenity
synced 2025-10-28 21:42:06 +00:00
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).
This commit is auto-generated:
$ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
Meta Ports Ladybird Tests Kernel)
$ perl -pie 's/\bDeprecatedString\b/ByteString/g;
s/deprecated_string/byte_string/g' $xs
$ clang-format --style=file -i \
$(git diff --name-only | grep \.cpp\|\.h)
$ gn format $(git ls-files '*.gn' '*.gni')
36 lines
877 B
C++
36 lines
877 B
C++
/*
|
|
* Copyright (c) 2022, cflip <cflip@cflip.net>
|
|
*
|
|
* 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_ABSTRACT(ClockSettingsWidget)
|
|
|
|
public:
|
|
static ErrorOr<NonnullRefPtr<ClockSettingsWidget>> try_create();
|
|
|
|
private:
|
|
ClockSettingsWidget() = default;
|
|
ErrorOr<void> setup();
|
|
|
|
virtual void apply_settings() override;
|
|
virtual void reset_default_values() override;
|
|
|
|
void update_time_format_string();
|
|
void update_clock_preview();
|
|
|
|
RefPtr<GUI::RadioButton> m_24_hour_radio;
|
|
RefPtr<GUI::CheckBox> m_show_seconds_checkbox;
|
|
RefPtr<GUI::TextBox> m_custom_format_input;
|
|
RefPtr<GUI::Label> m_clock_preview;
|
|
|
|
RefPtr<Core::Timer> m_clock_preview_update_timer;
|
|
|
|
ByteString m_time_format;
|
|
};
|