mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-13 17:57:42 +00:00
Add a settings page to halcyon, which allows for toggling whether the wallpaper is blurred and double tapping on the homescreen to lock the device. This also does a bit of refactoring for folio and halcyon to share the same wallpaper blurring item.
37 lines
No EOL
947 B
C++
37 lines
No EOL
947 B
C++
// SPDX-FileCopyrightText: 2025 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include <KConfigGroup>
|
|
|
|
class HalcyonSettings : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(bool showWallpaperBlur READ showWallpaperBlur WRITE setShowWallpaperBlur NOTIFY showWallpaperBlurChanged)
|
|
Q_PROPERTY(bool doubleTapToSleep READ doubleTapToSleep WRITE setDoubleTapToSleep NOTIFY doubleTapToSleepChanged)
|
|
|
|
public:
|
|
HalcyonSettings(QObject *parent = nullptr, KConfigGroup config = {});
|
|
|
|
bool showWallpaperBlur() const;
|
|
void setShowWallpaperBlur(bool blurWallpaper);
|
|
|
|
bool doubleTapToSleep() const;
|
|
void setDoubleTapToSleep(bool doubleTapToSleep);
|
|
|
|
Q_SIGNALS:
|
|
void showWallpaperBlurChanged();
|
|
void doubleTapToSleepChanged();
|
|
|
|
private:
|
|
void save();
|
|
void load();
|
|
|
|
bool m_showWallpaperBlur{false};
|
|
bool m_doubleTapToSleep{true};
|
|
|
|
KConfigGroup m_config;
|
|
}; |