You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
latte-dock/app/settings/settingsdialog/tabpreferenceshandler.h

80 lines
1.5 KiB
C++

/*
SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
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 <QAction>
#include <QObject>
#include <QButtonGroup>
#include <QPushButton>
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