mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Attempt to use `/sys/firmware/devicetree/base/compatible` to autodetect the device id for device profiles. This approach is described here: https://phosh.mobi/posts/notch-support/#the-compatibles-string
25 lines
550 B
C++
25 lines
550 B
C++
// SPDX-FileCopyrightText: 2025 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include <KConfigGroup>
|
|
#include <KSharedConfig>
|
|
|
|
class DevicePresets : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
DevicePresets(QObject *parent = nullptr);
|
|
|
|
void initialize();
|
|
|
|
private:
|
|
void setKey(KConfigGroup &fallbackGroup, KConfigGroup &fromGroup, KConfigGroup &toGroup, const QString &fromKey, const QString &toKey);
|
|
QStringList detectDeviceString();
|
|
|
|
KSharedConfig::Ptr m_mobileConfig;
|
|
};
|