mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Move from a C++ library + QML plugin to a QML plugin only for simplicity, since the homescreen switching architecture will be done from Plasma, and so use of the shell library only needs to be from QML.
62 lines
1.2 KiB
C++
62 lines
1.2 KiB
C++
/*
|
|
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
*/
|
|
|
|
#include "quicksetting.h"
|
|
|
|
QuickSetting::QuickSetting(QObject *parent)
|
|
: QObject(parent)
|
|
{
|
|
}
|
|
|
|
void QuickSetting::setEnabled(bool enabled)
|
|
{
|
|
if (m_enabled == enabled)
|
|
return;
|
|
|
|
m_enabled = enabled;
|
|
Q_EMIT enabledChanged(enabled);
|
|
}
|
|
|
|
void QuickSetting::setSettingsCommand(const QString &settingsCommand)
|
|
{
|
|
if (m_settingsCommand == settingsCommand)
|
|
return;
|
|
|
|
m_settingsCommand = settingsCommand;
|
|
Q_EMIT settingsCommandChanged(settingsCommand);
|
|
}
|
|
|
|
void QuickSetting::setIconName(const QString &iconName)
|
|
{
|
|
if (m_iconName == iconName)
|
|
return;
|
|
|
|
m_iconName = iconName;
|
|
Q_EMIT iconNameChanged(iconName);
|
|
}
|
|
|
|
void QuickSetting::setText(const QString &text)
|
|
{
|
|
if (m_text == text)
|
|
return;
|
|
|
|
m_text = text;
|
|
Q_EMIT textChanged(text);
|
|
}
|
|
|
|
void QuickSetting::setStatus(const QString &status)
|
|
{
|
|
if (m_status == status)
|
|
return;
|
|
|
|
m_status = status;
|
|
Q_EMIT statusChanged(status);
|
|
}
|
|
|
|
QQmlListProperty<QObject> QuickSetting::children()
|
|
{
|
|
return QQmlListProperty<QObject>(this, &m_children);
|
|
}
|