mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 06:13:09 +00:00
This MR implements multiple things - Add `.vscode/` to .gitignore - Any files generated by Visual Studio code or its extensions will not be pushed. - Give `InitialStartModule` a required `name` property - Every `InitialStartModule` now requires a `name` property. This replaces the previous setup where a `property string name` was needed in the `contentitem` of the `InitialStartModule`. - Remove the cellular page if no modem - If the device has no modem (`PlasmaMM.SignalIndicator.modemAvailable == false`), the cellular page will no longer be shown.
56 lines
1 KiB
C++
56 lines
1 KiB
C++
// SPDX-FileCopyrightText: 2024 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
#include "initialstartmodule.h"
|
|
|
|
InitialStartModule::InitialStartModule(QObject *parent)
|
|
: QObject{parent}
|
|
{
|
|
}
|
|
|
|
QString InitialStartModule::name() const
|
|
{
|
|
return m_name;
|
|
}
|
|
|
|
void InitialStartModule::setName(QString name)
|
|
{
|
|
if (m_name == name) {
|
|
return;
|
|
}
|
|
m_name = name;
|
|
Q_EMIT nameChanged();
|
|
}
|
|
|
|
bool InitialStartModule::available() const
|
|
{
|
|
return m_available;
|
|
}
|
|
|
|
void InitialStartModule::setAvailable(bool available)
|
|
{
|
|
if (m_available == available) {
|
|
return;
|
|
}
|
|
m_available = available;
|
|
Q_EMIT availableChanged();
|
|
}
|
|
|
|
QQuickItem *InitialStartModule::contentItem()
|
|
{
|
|
return m_contentItem;
|
|
}
|
|
|
|
void InitialStartModule::setContentItem(QQuickItem *contentItem)
|
|
{
|
|
if (m_contentItem == contentItem) {
|
|
return;
|
|
}
|
|
m_contentItem = contentItem;
|
|
Q_EMIT contentItemChanged();
|
|
}
|
|
|
|
QQmlListProperty<QObject> InitialStartModule::children()
|
|
{
|
|
return QQmlListProperty<QObject>(this, &m_children);
|
|
}
|