/* SPDX-FileCopyrightText: 2020 Michail Vourlakos SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef SETTINGSTABPREFERENCESHANDLER_H #define SETTINGSTABPREFERENCESHANDLER_H //! local #include "../generic/generichandler.h" #include "../../data/preferencesdata.h" //! Qt #include #include #include #include namespace Ui { class SettingsDialog; } namespace Latte { class Corona; namespace Settings { namespace Dialog { class SettingsDialog; } } } namespace Latte { namespace Settings { namespace Handler { //! Handlers are objects to handle the UI elements that semantically associate with specific //! ui::tabs or different windows. They are responsible also to handle the user interaction //! between controllers and views class TabPreferences : public Generic { Q_OBJECT public: TabPreferences(Latte::Settings::Dialog::SettingsDialog *parent); bool hasChangedData() const override; bool inDefaultValues() const override; void reset() override; void resetDefaults() override; void save() override; signals: void borderlessMaximizedChanged(); private slots: void initUi(); void initSettings(); void updateUi(); private: Latte::Settings::Dialog::SettingsDialog *m_parentDialog{nullptr}; Ui::SettingsDialog *m_ui{nullptr}; Latte::Corona *m_corona{nullptr}; QButtonGroup *m_mouseSensitivityButtons; //! current data Data::Preferences m_preferences; //! original data Data::Preferences o_preferences; }; } } } #endif