shift-shell/containments/homescreen/homescreen.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
984 B
C++
Raw Normal View History

2021-03-01 20:03:25 +00:00
/*
SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "homescreen.h"
#include <QDebug>
2019-09-04 16:39:31 +00:00
#include <QQuickItem>
#include <QtQml>
HomeScreen::HomeScreen(QObject *parent, const QVariantList &args)
: Plasma::Containment(parent, args)
{
2019-09-04 16:39:31 +00:00
setHasConfigurationInterface(true);
}
2020-03-20 00:08:59 +00:00
HomeScreen::~HomeScreen() = default;
void HomeScreen::configChanged()
{
Plasma::Containment::configChanged();
}
2019-09-04 16:39:31 +00:00
void HomeScreen::stackBefore(QQuickItem *item1, QQuickItem *item2)
{
if (!item1 || !item2 || item1 == item2 || item1->parentItem() != item2->parentItem()) {
2019-09-04 16:39:31 +00:00
return;
}
item1->stackBefore(item2);
}
void HomeScreen::stackAfter(QQuickItem *item1, QQuickItem *item2)
{
if (!item1 || !item2 || item1 == item2 || item1->parentItem() != item2->parentItem()) {
2019-09-04 16:39:31 +00:00
return;
}
item1->stackAfter(item2);
}
K_PLUGIN_CLASS_WITH_JSON(HomeScreen, "metadata.json")
#include "homescreen.moc"