2021-11-20 15:55:05 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-01-19 18:20:42 +03:00
|
|
|
#include <AK/Vector.h>
|
2021-11-20 18:49:18 +03:00
|
|
|
#include <LibGUI/Button.h>
|
2021-11-20 15:55:05 +03:00
|
|
|
#include <LibGUI/CheckBox.h>
|
2022-02-25 13:37:23 +03:00
|
|
|
#include <LibGUI/ConnectionToWindowMangerServer.h>
|
2022-01-19 18:20:42 +03:00
|
|
|
#include <LibGUI/ListView.h>
|
2021-11-20 15:55:05 +03:00
|
|
|
#include <LibGUI/SettingsWindow.h>
|
2021-11-20 18:49:18 +03:00
|
|
|
#include <LibGUI/TextEditor.h>
|
2021-11-20 15:55:05 +03:00
|
|
|
|
|
|
|
class KeyboardSettingsWidget final : public GUI::SettingsWindow::Tab {
|
|
|
|
C_OBJECT(KeyboardSettingsWidget)
|
|
|
|
public:
|
2021-11-20 18:49:18 +03:00
|
|
|
virtual ~KeyboardSettingsWidget() override;
|
2021-11-20 15:55:05 +03:00
|
|
|
|
|
|
|
virtual void apply_settings() override;
|
|
|
|
|
2022-01-19 18:20:42 +03:00
|
|
|
void window_activated(bool is_active_window);
|
|
|
|
|
2021-11-20 15:55:05 +03:00
|
|
|
private:
|
|
|
|
KeyboardSettingsWidget();
|
|
|
|
|
2022-01-19 18:20:42 +03:00
|
|
|
void set_keymaps(Vector<String> const& keymaps);
|
|
|
|
|
|
|
|
Vector<String> m_initial_keymap_list;
|
2021-11-20 18:49:18 +03:00
|
|
|
|
2022-02-25 06:13:11 +03:00
|
|
|
String m_initial_active_keymap;
|
2021-11-20 15:55:05 +03:00
|
|
|
|
2022-01-19 18:20:42 +03:00
|
|
|
RefPtr<GUI::ListView> m_selected_keymaps_listview;
|
|
|
|
RefPtr<GUI::CheckBox> m_num_lock_checkbox;
|
|
|
|
RefPtr<GUI::Button> m_add_keymap_button;
|
|
|
|
RefPtr<GUI::Button> m_remove_keymap_button;
|
2021-11-20 18:49:18 +03:00
|
|
|
RefPtr<GUI::TextEditor> m_test_typing_area;
|
|
|
|
RefPtr<GUI::Button> m_clear_test_typing_area_button;
|
2021-11-20 15:55:05 +03:00
|
|
|
};
|