mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
40 lines
837 B
C++
40 lines
837 B
C++
/*
|
|
SPDX-FileCopyrightText: 2021 Marco Martin <mart@kde.org>
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#include "homescreenutils.h"
|
|
#include "favoritesmodel.h"
|
|
|
|
#include <QtQml>
|
|
#include <QDebug>
|
|
#include <QQuickItem>
|
|
|
|
HomeScreenUtils::HomeScreenUtils(QObject *parent)
|
|
: QObject(parent)
|
|
{
|
|
|
|
}
|
|
|
|
HomeScreenUtils::~HomeScreenUtils() = default;
|
|
|
|
void HomeScreenUtils::stackBefore(QQuickItem *item1, QQuickItem *item2)
|
|
{
|
|
if (!item1 || !item2 || item1 == item2 || item1->parentItem() != item2->parentItem()) {
|
|
return;
|
|
}
|
|
|
|
item1->stackBefore(item2);
|
|
}
|
|
|
|
void HomeScreenUtils::stackAfter(QQuickItem *item1, QQuickItem *item2)
|
|
{
|
|
if (!item1 || !item2 || item1 == item2 || item1->parentItem() != item2->parentItem()) {
|
|
return;
|
|
}
|
|
|
|
item1->stackAfter(item2);
|
|
}
|
|
|
|
|
|
#include "moc_homescreenutils.cpp"
|