2021-08-02 13:14:52 +03:00
|
|
|
/*
|
2022-02-10 22:28:48 +03:00
|
|
|
* Copyright (c) 2021-2022, the SerenityOS developers.
|
2021-08-02 13:14:52 +03:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-11-20 18:09:28 +03:00
|
|
|
#include "DoubleClickArrowWidget.h"
|
2021-10-25 05:47:33 +03:00
|
|
|
#include <LibGUI/CheckBox.h>
|
2021-11-20 18:09:28 +03:00
|
|
|
#include <LibGUI/SettingsWindow.h>
|
2021-08-02 13:14:52 +03:00
|
|
|
#include <LibGUI/Window.h>
|
|
|
|
|
2021-11-20 18:09:28 +03:00
|
|
|
class MouseWidget final : public GUI::SettingsWindow::Tab {
|
2023-05-09 23:44:43 +03:00
|
|
|
C_OBJECT_ABSTRACT(MouseWidget)
|
2021-08-02 13:14:52 +03:00
|
|
|
public:
|
2023-05-09 23:44:43 +03:00
|
|
|
static ErrorOr<NonnullRefPtr<MouseWidget>> try_create();
|
2022-02-10 22:28:48 +03:00
|
|
|
virtual ~MouseWidget() override = default;
|
2021-08-02 13:14:52 +03:00
|
|
|
|
2021-11-20 18:09:28 +03:00
|
|
|
virtual void apply_settings() override;
|
|
|
|
virtual void reset_default_values() override;
|
2021-08-02 13:14:52 +03:00
|
|
|
|
|
|
|
private:
|
2023-05-09 23:44:43 +03:00
|
|
|
MouseWidget() = default;
|
|
|
|
ErrorOr<void> setup();
|
2021-08-02 13:14:52 +03:00
|
|
|
|
2022-05-11 19:42:45 +03:00
|
|
|
void update_speed_label();
|
|
|
|
void update_double_click_speed_label();
|
2022-12-30 10:05:38 +03:00
|
|
|
void update_switch_buttons_image_label();
|
2022-05-11 19:42:45 +03:00
|
|
|
|
2021-08-02 13:14:52 +03:00
|
|
|
RefPtr<GUI::HorizontalSlider> m_speed_slider;
|
|
|
|
RefPtr<GUI::Label> m_speed_label;
|
|
|
|
RefPtr<GUI::SpinBox> m_scroll_length_spinbox;
|
|
|
|
RefPtr<GUI::HorizontalSlider> m_double_click_speed_slider;
|
|
|
|
RefPtr<GUI::Label> m_double_click_speed_label;
|
2021-10-25 05:47:33 +03:00
|
|
|
RefPtr<GUI::CheckBox> m_switch_buttons_checkbox;
|
2023-04-29 17:42:04 +03:00
|
|
|
RefPtr<GUI::ImageWidget> m_switch_buttons_image;
|
2022-11-30 15:52:42 +03:00
|
|
|
RefPtr<GUI::CheckBox> m_natural_scroll_checkbox;
|
2021-08-02 13:14:52 +03:00
|
|
|
RefPtr<MouseSettings::DoubleClickArrowWidget> m_double_click_arrow_widget;
|
|
|
|
};
|