File: shell_integration.h

package info (click to toggle)
kscreenlocker 6.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,328 kB
  • sloc: cpp: 5,698; xml: 88; sh: 30; makefile: 5
file content (64 lines) | stat: -rw-r--r-- 1,314 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org>
SPDX-FileCopyrightText: 2017 David Edmundson <davidedmundson@kde.org>

SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once

#include <KConfigPropertyMap>
#include <KPackage/Package>
#include <KSharedConfig>

class KConfigLoader;

namespace ScreenLocker
{
class ShellIntegration : public QObject
{
    Q_OBJECT

    Q_PROPERTY(KConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged)

public:
    explicit ShellIntegration(QObject *parent);
    ~ShellIntegration() override;

    void init();

    QString defaultShell() const;

    void setConfig(const KSharedConfig::Ptr &config)
    {
        m_config = config;
    }

    void setPackage(const KPackage::Package &package)
    {
        m_package = package;
    }

    KPackage::Package package() const
    {
        return m_package;
    }

    KConfigPropertyMap *configuration() const
    {
        return m_configuration;
    }

    KConfigLoader *configScheme();

Q_SIGNALS:
    void packageChanged();
    void configurationChanged();

private:
    KPackage::Package m_package;
    KSharedConfig::Ptr m_config;
    KConfigLoader *m_configLoader = nullptr;
    KConfigPropertyMap *m_configuration = nullptr;
};

}