Development over
This commit is contained in:
62
kde-settings/src/kcm_linux_hello.h
Normal file
62
kde-settings/src/kcm_linux_hello.h
Normal file
@@ -0,0 +1,62 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// SPDX-FileCopyrightText: 2024 Linux Hello Authors
|
||||
|
||||
#ifndef KCM_LINUX_HELLO_H
|
||||
#define KCM_LINUX_HELLO_H
|
||||
|
||||
#include <KQuickManagedConfigModule>
|
||||
#include <QObject>
|
||||
|
||||
#include "dbus_client.h"
|
||||
|
||||
class KcmLinuxHello : public KQuickManagedConfigModule
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(LinuxHelloDBusClient* client READ client CONSTANT)
|
||||
Q_PROPERTY(bool loading READ loading NOTIFY loadingChanged)
|
||||
|
||||
public:
|
||||
explicit KcmLinuxHello(QObject *parent, const KPluginMetaData &data);
|
||||
~KcmLinuxHello() override;
|
||||
|
||||
LinuxHelloDBusClient *client() const;
|
||||
bool loading() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* @brief Reload all data from the daemon
|
||||
*/
|
||||
void load() override;
|
||||
|
||||
/**
|
||||
* @brief Save any pending changes
|
||||
*/
|
||||
void save() override;
|
||||
|
||||
/**
|
||||
* @brief Reset to default settings
|
||||
*/
|
||||
void defaults() override;
|
||||
|
||||
/**
|
||||
* @brief Check if unsaved changes exist
|
||||
*/
|
||||
bool isSaveNeeded() const override;
|
||||
|
||||
/**
|
||||
* @brief Check if settings differ from defaults
|
||||
*/
|
||||
bool isDefaults() const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void loadingChanged();
|
||||
|
||||
private:
|
||||
LinuxHelloDBusClient *m_client;
|
||||
bool m_loading = false;
|
||||
|
||||
void setLoading(bool loading);
|
||||
};
|
||||
|
||||
#endif // KCM_LINUX_HELLO_H
|
||||
Reference in New Issue
Block a user